From 655c3e1b4784f4bc37af1e1db0d7bcf313e71e66 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 26 Oct 2014 19:32:12 -0700 Subject: put privacy role selector in settings page. Change visibility of various permissions items accordingly. --- view/css/mod_settings.css | 4 ++++ view/js/mod_settings.js | 16 ++++++++++++---- view/tpl/settings.tpl | 46 ++++++++++++++++++++++------------------------ 3 files changed, 38 insertions(+), 28 deletions(-) (limited to 'view') diff --git a/view/css/mod_settings.css b/view/css/mod_settings.css index 651167b47..d0c970989 100644 --- a/view/css/mod_settings.css +++ b/view/css/mod_settings.css @@ -12,6 +12,10 @@ ul#settings-privacy-macros { margin-top: 15px; } +#settings-default-perms { + margin-top: 15px; +} + #settings-perm-advanced { margin-top: 15px; } diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js index 77c9d0ced..87c8c3a2b 100644 --- a/view/js/mod_settings.js +++ b/view/js/mod_settings.js @@ -3,10 +3,18 @@ var ispublic = aStr['everybody'] ; $(document).ready(function() { - $("a#settings-default-perms-menu").colorbox({ - 'inline' : true, - 'transition' : 'elastic' - }); + $("a#settings-default-perms-menu").colorbox({ + 'inline' : true, + 'transition' : 'elastic' + }); + + $("#privacy-role-select").change(function() { + var role = $("#privacy-role-select").val(); + if(role == 'custom') + $('#advanced-perm').show(); + else + $('#advanced-perm').hide(); + }); $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { var selstr; diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 07a37f773..4c1b8eb8f 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -22,37 +22,44 @@

{{$h_prv}}

-{{include file="field_checkbox.tpl" field=$hide_presence}} - - +
+ +{{$role_select}} +
+
+{{include file="field_checkbox.tpl" field=$hide_presence}} +
-{{if !$expert}} -
{{$hint}}
-{{/if}} {{foreach $permiss_arr as $permit}} - {{if $expert}} - {{include file="field_select.tpl" field=$permit}} - {{else}} - {{include file="field_select_disabled.tpl" field=$permit}} - {{/if}} + {{include file="field_select.tpl" field=$permit}} {{/foreach}} - -{{if $expert}}
-{{/if}} +
+
+ + {{$aclselect}} +
-
+
+
+{{$group_select}} {{$profile_in_dir}} +
+ +
+ + + {{$suggestme}} {{include file="field_yesno.tpl" field=$blocktags}} @@ -62,15 +69,6 @@
-
- - {{$aclselect}} -
-
-
-
- -{{$group_select}}
-- cgit v1.2.3