diff options
author | zotlabs <mike@macgirvin.com> | 2017-02-08 17:21:32 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-02-08 17:21:32 -0800 |
commit | 91819bfc2d475e1b16d3f5e9ca685ca2531a9084 (patch) | |
tree | 0a139ef141996efc1dedae5476b4f6fb8ddde981 /view | |
parent | 6ee691e0190a7d6488888d2fd5009324e3a88f74 (diff) | |
download | volse-hubzilla-91819bfc2d475e1b16d3f5e9ca685ca2531a9084.tar.gz volse-hubzilla-91819bfc2d475e1b16d3f5e9ca685ca2531a9084.tar.bz2 volse-hubzilla-91819bfc2d475e1b16d3f5e9ca685ca2531a9084.zip |
bringer - all basic functionality is implemented
Diffstat (limited to 'view')
-rw-r--r-- | view/js/mod_settings.js | 32 | ||||
-rwxr-xr-x | view/tpl/abook_edit.tpl | 3 | ||||
-rw-r--r-- | view/tpl/settings_permcats.tpl | 13 |
3 files changed, 48 insertions, 0 deletions
diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js index db321ae70..5c729fa48 100644 --- a/view/js/mod_settings.js +++ b/view/js/mod_settings.js @@ -17,6 +17,16 @@ $(document).ready(function() { else $('#advanced-perm').hide(); }); + + $('#id_permcat_list').change(function() { + $('.loading-role-rotator').spin(true); + var permName = $('#id_permcat').val(); + loadPermcat(permName); + }); + + + + }); @@ -137,3 +147,25 @@ function channel_privacy_macro(n) { $('#id_profile_in_directory').val(1); } } + + + +function loadPermcat(name) { + + if(! name) + name = 'default'; + + $('.abook-edit-me').each(function() { + if(! $(this).is(':disabled')) + $(this).removeAttr('checked'); + }); + + $.get('permcat/' + name, function(data) { + $(data.perms).each(function() { + if(this.value) + $('#me_id_perms_' + this.name).attr('checked','checked'); + }); + $('.loading-role-rotator').spin(false); + }); +} + diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index 231841659..ebc69c5f8 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -473,8 +473,11 @@ {{if $self}}{{$permnote_self}}{{/if}} </div> + {{if $permcat_enable}} <div class="loading-role-rotator"></div> + <a href="settings/permcats" class="pull-right"><i class="fa fa-plus"></i> {{$permcat_new}}</a> {{include file="field_select.tpl" field=$permcat}} + {{/if}} <table id="perms-tool-table" class=form-group> <tr> diff --git a/view/tpl/settings_permcats.tpl b/view/tpl/settings_permcats.tpl index 597002815..f6bb9b036 100644 --- a/view/tpl/settings_permcats.tpl +++ b/view/tpl/settings_permcats.tpl @@ -45,6 +45,19 @@ </div> </div> </div> + {{if $permcats}} + <div class="section-content-wrapper-np"> + <table id="permcat-index"> + {{foreach $permcats as $k => $v}} + <tr class="permcat-row-{{$k}}"> + <td width="99%"><a href="settings/permcats/{{$k}}">{{$k}}</a></td> + <td width="1%"><i class="fa fa-trash-o drop-icons" onClick="dropItem('/settings/permcats/{{$k}}/drop', '.permcat-row-{{$k}}')"></i></td> + </tr> + {{/foreach}} + </table> + </div> + {{/if}} + </div> </form> |