From 7f712973831212694de824a2e63961b98ef53959 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 14 Jul 2015 12:46:40 +0200 Subject: cleanup connedit --- view/css/mod_connedit.css | 186 +------------------- view/js/mod_connedit.js | 134 +-------------- view/theme/redbasic/css/style.css | 17 +- view/tpl/abook_edit.tpl | 349 +++++++++++++++++++++++--------------- view/tpl/contact_slider.tpl | 20 ++- view/tpl/field_acheckbox.tpl | 14 +- view/tpl/rating_slider.tpl | 19 ++- 7 files changed, 270 insertions(+), 469 deletions(-) (limited to 'view') diff --git a/view/css/mod_connedit.css b/view/css/mod_connedit.css index 44a0a1abf..87eff66d4 100644 --- a/view/css/mod_connedit.css +++ b/view/css/mod_connedit.css @@ -1,188 +1,18 @@ - -.field_abook_help { - color: #000; -} -.abook-them { - padding: 5px; - text-align: center; -} +.abook-them, .abook-me { - padding: 5px 5px 5px 15px; - text-align: center; -} -.acheckbox { - margin-bottom: 5px !important; -} - -.abook-pending-contact, .abook-autotext { - background: orange; - font-weight: bold; - margin: 10px; - padding: 20px 5px 10px; -} - -.abook-perms-msg { - background: orange; - font-weight: bold; - margin: 10px; - padding: 20px 5px 10px; -} - -.abook-permschange { - width: 100%; -} - -.abook-perms-steps { - float: left; - width: 200px; - height: 210px; - background: orange; - font-weight: bold; - margin: 10px; - padding: 20px 5px 10px; - -} - -.abook-permssave { - margin-left: 10px; - clear: both; -} - -#contact-slider { - width: 600px !important; -} - -#rating-slider { - width: 600px !important; -} - -#rating-text { - width: 400px; - height: 60px; -} - -.abook-edit-them, .abook-edit-me { - float: left; - margin-left: 10px; - margin-right: 10px; -} -.field_abook_help { - float: left; -} - -#contacts-main { - margin-top: 20px; - margin-bottom: 20px; -} - - - -#contact-edit-wrapper { - margin-top: 10px; -} - -#contact-edit-banner-name { - font-size: 1.4em; font-weight: bold; } -#contact-edit-poll-wrapper { - margin-top: 15px; +.slider { + position: relative; + left: 1%; + padding-bottom: 15px; } -#contact-edit-poll-text { - margin-top: 15px; - margin-bottom: 5px; -} - -#contact-edit-update-now { - margin-top: 15px; -} - -#contact-edit-links{ - clear: both; -} - -#contact-edit-links ul { - list-style: none; - list-style-type: none; - margin-left: 0px; - padding-left: 0px; -} - -#contact-edit-links li { - margin-top: 5px; -} - -#contact-edit-drop-link { - float: right; - margin-right: 20px; -} - -#contact-edit-nav-end { - clear: both; -} - -#contact-edit-wrapper { +#perms-tool-table { width: 100%; } -#contact-edit-end { - clear: both; - margin-top: 15px; -} - -#contact-profile-selector { - width: 175px; - margin-left: 175px; -} - -.contact-edit-submit { - margin-top: 20px; -} - -.contact-entry-wrapper { - float: left; - width: 120px; - height: 120px; - padding: 10px; -} - -#contacts-search { - font-size: 1em; - width: 300px; -} - -#contacts-search-end { - margin-bottom: 10px; -} - -.contact-entry-photo-end { - clear: both; -} - -.contact-entry-name { - float: left; - margin-left: 0px; - margin-right: 10px; - width: 120px; - overflow: hidden; -} - -.contact-entry-end { - clear: both; -} - -#abook-advanced-panel, #abook-advanced { - opacity: 0.3; - filter:alpha(opacity=30); -} - -#abook-advanced-panel:hover, #abook-advanced:hover { - opacity: 1.0; - filter:alpha(opacity=100); -} - -#abook-advanced { - margin-top: 15px; +#perms-tool-table td { + vertical-align: top; } diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js index ee34f0508..fd545afeb 100644 --- a/view/js/mod_connedit.js +++ b/view/js/mod_connedit.js @@ -1,138 +1,6 @@ - -function abook_perms_msg() { -// $('.abook-permsmsg').show(); -// $('.abook-permschange').html(aStr['permschange']); -// $('.abook-permssave').show(); -} - -function abook_perms_new() { -// $('.abook-permsnew').show(); -// $('.abook-permssave').show(); -} - - $(document).ready(function() { - if(typeof(after_following) !== 'undefined' && after_following) { - if(typeof(connectDefaultShare) !== 'undefined') - connectDefaultShare(); - else - connectFullShare(); - abook_perms_new(); - } - - $('#id_pending').click(function() { - if(typeof(connectDefaultShare) !== 'undefined') - connectDefaultShare(); - else - connectFullShare(); - abook_perms_new(); - }); -// $('.abook-edit-me').click(function() { -// abook_perms_msg(); -// }); + $('form').areYouSure({'addRemoveFieldsMarksDirty':true, 'message': aStr['leavethispage'] }); // Warn user about unsaved settings }); - -function connectFullShare() { - $('.abook-edit-me').each(function() { - if(! $(this).is(':disabled')) - $(this).removeAttr('checked'); - }); - $('#me_id_perms_view_stream').attr('checked','checked'); - $('#me_id_perms_view_profile').attr('checked','checked'); - $('#me_id_perms_view_photos').attr('checked','checked'); - $('#me_id_perms_view_contacts').attr('checked','checked'); - $('#me_id_perms_view_storage').attr('checked','checked'); - $('#me_id_perms_view_pages').attr('checked','checked'); - $('#me_id_perms_send_stream').attr('checked','checked'); - $('#me_id_perms_post_wall').attr('checked','checked'); - $('#me_id_perms_post_comments').attr('checked','checked'); - $('#me_id_perms_post_mail').attr('checked','checked'); - $('#me_id_perms_chat').attr('checked','checked'); - $('#me_id_perms_view_storage').attr('checked','checked'); - $('#me_id_perms_republish').attr('checked','checked'); - $('#me_id_perms_post_like').attr('checked','checked'); -// abook_perms_msg(); -} - -function connectCautiousShare() { - $('.abook-edit-me').each(function() { - if(! $(this).is(':disabled')) - $(this).removeAttr('checked'); - }); - - $('#me_id_perms_view_stream').attr('checked','checked'); - $('#me_id_perms_view_profile').attr('checked','checked'); - $('#me_id_perms_view_photos').attr('checked','checked'); - $('#me_id_perms_view_storage').attr('checked','checked'); - $('#me_id_perms_view_pages').attr('checked','checked'); - $('#me_id_perms_send_stream').attr('checked','checked'); - $('#me_id_perms_post_comments').attr('checked','checked'); - $('#me_id_perms_post_mail').attr('checked','checked'); - $('#me_id_perms_post_like').attr('checked','checked'); -// abook_perms_msg(); - -} - -function connectForum() { - $('.abook-edit-me').each(function() { - if(! $(this).is(':disabled')) - $(this).removeAttr('checked'); - }); - - $('#me_id_perms_view_stream').attr('checked','checked'); - $('#me_id_perms_view_profile').attr('checked','checked'); - $('#me_id_perms_view_photos').attr('checked','checked'); - $('#me_id_perms_view_contacts').attr('checked','checked'); - $('#me_id_perms_view_storage').attr('checked','checked'); - $('#me_id_perms_view_pages').attr('checked','checked'); - $('#me_id_perms_send_stream').attr('checked','checked'); - $('#me_id_perms_post_wall').attr('checked','checked'); - $('#me_id_perms_post_comments').attr('checked','checked'); - $('#me_id_perms_post_mail').attr('checked','checked'); - $('#me_id_perms_tag_deliver').attr('checked','checked'); - $('#me_id_perms_republish').attr('checked','checked'); - $('#me_id_perms_post_like').attr('checked','checked'); -// abook_perms_msg(); - -} - -function connectClear() { - $('.abook-edit-me').each(function() { - if(! $(this).is(':disabled')) - $(this).removeAttr('checked'); - }); -// abook_perms_msg(); - -} - -function connectSoapBox() { - $('.abook-edit-me').each(function() { - if(! $(this).is(':disabled')) - $(this).removeAttr('checked'); - }); - - $('#me_id_perms_view_stream').attr('checked','checked'); - $('#me_id_perms_view_profile').attr('checked','checked'); - $('#me_id_perms_view_photos').attr('checked','checked'); - $('#me_id_perms_view_contacts').attr('checked','checked'); - $('#me_id_perms_view_storage').attr('checked','checked'); - $('#me_id_perms_view_pages').attr('checked','checked'); -// abook_perms_msg(); - -} - - -function connectFollowOnly() { - $('.abook-edit-me').each(function() { - if(! $(this).is(':disabled')) - $(this).removeAttr('checked'); - }); - - $('#me_id_perms_send_stream').attr('checked','checked'); -// abook_perms_msg(); - -} - diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 939b9cf54..679d48edb 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1284,13 +1284,7 @@ div.jGrowl div.jGrowl-notification { text-align: center; } -#contact-slider { - position: relative; - left: 5%; - width: 90%; -} - -a.rconnect, a.rateme, div.rateme { +.rconnect, a.rateme, div.rateme { color: $nav_active_icon_colour; text-decoration: none; font-weight: normal; @@ -1932,7 +1926,7 @@ nav .dropdown-menu { .section-content-wrapper .section-content-warning-wrapper, .section-content-tools-wrapper .section-content-danger-wrapper, .section-content-wrapper .section-content-danger-wrapper { - margin-bottom: 0px; + margin-bottom: 10px; border-radius: $radiuspx; } @@ -1965,6 +1959,10 @@ nav .dropdown-menu { background-color: $item_colour; } +#perms-tool-table .highlight:hover { + background-color: $item_colour; +} + nav ul li .undefined, nav ul li .notify-seen, nav ul li .notify-unseen @@ -2299,3 +2297,6 @@ nav .badge.mail-update:hover { margin-top: -5px !important; } +.collapse { +width: 100% !important; +} diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index d118cbb9c..202c6881e 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -1,140 +1,211 @@ -
-

{{$header}}

- -

{{$addr}}

- -{{if $notself}} -
-{{$tabs}} -
-
-{{foreach $buttons as $b }} - -{{/foreach}} -{{/if}} - - -
-
- - - - - - - - -{{if $last_update}} -{{$lastupdtext}} {{$last_update}} -{{/if}} - - -{{if $is_pending}} -
-{{include file="field_checkbox.tpl" field=$unapproved}} -
-{{/if}} - - -{{if $notself}} -{{if $slide}} -

{{$lbl_slider}}

- -{{$slide}} - -{{/if}} - -{{if $connfilter}} - {{include file="field_textarea.tpl" field=$incl}} - {{include file="field_textarea.tpl" field=$excl}} -{{else}} - - -{{/if}} - -{{if $rating}} -

{{$lbl_rating}}

- -{{$rating}} - - -{{/if}} - - - -{{/if}} - - -{{if $self}} -
-
{{$autolbl}}
-{{include file="field_checkbox.tpl" field=$autoperms}} -
-{{/if}} - - - - - - -{{if $rating}} -{{if $notself}} - {{include file="field_textarea.tpl" field=$rating_text}} -{{/if}} -{{/if}} - -{{if $notself}} -{{if $multiprofs }} -
-

{{$lbl_vis1}}

-
{{$lbl_vis2}}
- -{{$profile_select}} -
-{{/if}} -{{/if}} - -

{{$permlbl}}

- -{{if $notself}} - - - -{{if $notself}} -
-{{/if}} - - - -{{if $self && $noperms}} - -{{/if}} - - -
+
+ +
+ {{if $notself}} + + {{/if}} + +
+ + + +
+ {{if $notself}} + + {{if $is_pending}} +
+ +
+
+ {{include file="field_checkbox.tpl" field=$unapproved}} +
+ +
+
+
+
+ + + {{/if}} + + {{if $affinity }} +
+ +
+
+ {{if $slide}} +
{{$lbl_slider}}
+ {{$slide}} + + {{/if}} + + {{if $multiprofs }} +
+ {{$lbl_vis2}} + {{$profile_select}} +
+ {{/if}} +
+ +
+
+
+
+ {{/if}} + + {{if $connfilter}} +
+ +
+
+ {{include file="field_textarea.tpl" field=$incl}} + {{include file="field_textarea.tpl" field=$excl}} +
+ +
+
+
+
+ {{else}} + + + {{/if}} + + {{if $rating}} +
+ +
+
+
+ {{$rating_info}} +
+
{{$lbl_rating_label}}
+ {{$rating}} + {{include file="field_textarea.tpl" field=$rating_text}} + +
+ +
+
+
+
+ {{/if}} + + {{/if}} + +
+ {{if $notself}} + + {{/if}} +
+
+
+ {{$permnote}} +
+ + + + + {{if $notself}} + + {{/if}} + + + {{foreach $perms as $prm}} + {{include file="field_acheckbox.tpl" field=$prm}} + {{/foreach}} +
{{$them}}{{$me}}
+ + {{if $self}} +
+
{{$autolbl}}
+ {{include file="field_checkbox.tpl" field=$autoperms}} +
+ {{/if}} + +
+ +
+
+
+
+
+
+
diff --git a/view/tpl/contact_slider.tpl b/view/tpl/contact_slider.tpl index 5c15e1c2c..550abc147 100755 --- a/view/tpl/contact_slider.tpl +++ b/view/tpl/contact_slider.tpl @@ -1,4 +1,20 @@ -
+
diff --git a/view/tpl/field_acheckbox.tpl b/view/tpl/field_acheckbox.tpl index 816af2a65..a4f271f1a 100755 --- a/view/tpl/field_acheckbox.tpl +++ b/view/tpl/field_acheckbox.tpl @@ -1,17 +1,17 @@ - + - +
+ {{$field.6}} + {{if $notself}} + {{/if}} - + {{if $field.5}}{{$inherited}} {{/if}} - - {{$field.6}} - - \ No newline at end of file + diff --git a/view/tpl/rating_slider.tpl b/view/tpl/rating_slider.tpl index 4702fc65b..4c36504e6 100644 --- a/view/tpl/rating_slider.tpl +++ b/view/tpl/rating_slider.tpl @@ -1,4 +1,19 @@ -
+
-- cgit v1.2.3 From a28da40fa8937e87d633689527c84594a771855d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 14 Jul 2015 12:52:50 +0200 Subject: css fixes --- view/theme/redbasic/css/style.css | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'view') diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 679d48edb..046d8471b 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1284,7 +1284,7 @@ div.jGrowl div.jGrowl-notification { text-align: center; } -.rconnect, a.rateme, div.rateme { +a.rconnect, a.rateme, div.rateme { color: $nav_active_icon_colour; text-decoration: none; font-weight: normal; @@ -2296,7 +2296,3 @@ nav .badge.mail-update:hover { .channels_ckbx, .pending_ckbx, .users_ckbx { margin-top: -5px !important; } - -.collapse { -width: 100% !important; -} -- cgit v1.2.3 From f267bd55d68f6d3c63c33b1d307728e4ed12ddd5 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 14 Jul 2015 14:20:23 +0200 Subject: revert this until further investigation --- view/tpl/field_acheckbox.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view') diff --git a/view/tpl/field_acheckbox.tpl b/view/tpl/field_acheckbox.tpl index a4f271f1a..2b5195322 100755 --- a/view/tpl/field_acheckbox.tpl +++ b/view/tpl/field_acheckbox.tpl @@ -9,7 +9,7 @@ {{/if}} - + {{if $field.5}}{{$inherited}} {{/if}} -- cgit v1.2.3 From cc1764989f70b28654b47fd58fd59b12b270b470 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 14 Jul 2015 17:37:33 +0200 Subject: fix mod_connedit.js after cleanup --- view/js/mod_connedit.js | 34 ++++++++++++++++++++++++++++++++++ view/tpl/field_acheckbox.tpl | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) (limited to 'view') diff --git a/view/js/mod_connedit.js b/view/js/mod_connedit.js index fd545afeb..d6cc42175 100644 --- a/view/js/mod_connedit.js +++ b/view/js/mod_connedit.js @@ -2,5 +2,39 @@ $(document).ready(function() { $('form').areYouSure({'addRemoveFieldsMarksDirty':true, 'message': aStr['leavethispage'] }); // Warn user about unsaved settings + if(typeof(after_following) !== 'undefined' && after_following) { + if(typeof(connectDefaultShare) !== 'undefined') + connectDefaultShare(); + else + connectFullShare(); + } + + $('#id_pending').click(function() { + if(typeof(connectDefaultShare) !== 'undefined') + connectDefaultShare(); + else + connectFullShare(); + }); + }); +function connectFullShare() { + $('.abook-edit-me').each(function() { + if(! $(this).is(':disabled')) + $(this).removeAttr('checked'); + }); + $('#me_id_perms_view_stream').attr('checked','checked'); + $('#me_id_perms_view_profile').attr('checked','checked'); + $('#me_id_perms_view_photos').attr('checked','checked'); + $('#me_id_perms_view_contacts').attr('checked','checked'); + $('#me_id_perms_view_storage').attr('checked','checked'); + $('#me_id_perms_view_pages').attr('checked','checked'); + $('#me_id_perms_send_stream').attr('checked','checked'); + $('#me_id_perms_post_wall').attr('checked','checked'); + $('#me_id_perms_post_comments').attr('checked','checked'); + $('#me_id_perms_post_mail').attr('checked','checked'); + $('#me_id_perms_chat').attr('checked','checked'); + $('#me_id_perms_view_storage').attr('checked','checked'); + $('#me_id_perms_republish').attr('checked','checked'); + $('#me_id_perms_post_like').attr('checked','checked'); +} diff --git a/view/tpl/field_acheckbox.tpl b/view/tpl/field_acheckbox.tpl index 2b5195322..5b03a7848 100755 --- a/view/tpl/field_acheckbox.tpl +++ b/view/tpl/field_acheckbox.tpl @@ -12,6 +12,6 @@ - {{if $field.5}}{{$inherited}} {{/if}} + {{if $field.5}}{{$inherited}}{{/if}} -- cgit v1.2.3 From 4fe64179c8c99dbcbabd1580ddf760288d049547 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 14 Jul 2015 19:29:49 +0200 Subject: disable the inherited checkboxes for notself --- view/tpl/field_acheckbox.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view') diff --git a/view/tpl/field_acheckbox.tpl b/view/tpl/field_acheckbox.tpl index 5b03a7848..d2aad3875 100755 --- a/view/tpl/field_acheckbox.tpl +++ b/view/tpl/field_acheckbox.tpl @@ -9,7 +9,7 @@ {{/if}} - + {{if $field.5}}{{$inherited}}{{/if}} -- cgit v1.2.3 From 104cbcab722477340961d45a93a441bb9fbc7e7a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 14 Jul 2015 21:32:18 +0200 Subject: make strings translateable --- view/tpl/abook_edit.tpl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'view') diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index 202c6881e..71693a553 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -46,7 +46,7 @@ @@ -64,15 +64,15 @@
@@ -116,7 +116,7 @@ -- cgit v1.2.3