aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-07-14 16:55:58 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-07-14 16:55:58 -0700
commit3687fef53c5eeef7153306f45c5f187d5bfca68c (patch)
treefbf8d14b53d0cad61305886b8160a11afbe51df4 /view
parenta5989b0f310b117238fc4728d359a2151f3de6e7 (diff)
parent104cbcab722477340961d45a93a441bb9fbc7e7a (diff)
downloadvolse-hubzilla-3687fef53c5eeef7153306f45c5f187d5bfca68c.tar.gz
volse-hubzilla-3687fef53c5eeef7153306f45c5f187d5bfca68c.tar.bz2
volse-hubzilla-3687fef53c5eeef7153306f45c5f187d5bfca68c.zip
Merge https://github.com/redmatrix/redmatrix into pending_merge
Diffstat (limited to 'view')
-rw-r--r--view/css/mod_connedit.css186
-rw-r--r--view/js/mod_connedit.js102
-rw-r--r--view/theme/redbasic/css/style.css13
-rwxr-xr-xview/tpl/abook_edit.tpl349
-rwxr-xr-xview/tpl/contact_slider.tpl20
-rwxr-xr-xview/tpl/field_acheckbox.tpl16
-rw-r--r--view/tpl/rating_slider.tpl19
7 files changed, 268 insertions, 437 deletions
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..d6cc42175 100644
--- a/view/js/mod_connedit.js
+++ b/view/js/mod_connedit.js
@@ -1,23 +1,12 @@
+$(document).ready(function() {
-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();
-}
-
+ $('form').areYouSure({'addRemoveFieldsMarksDirty':true, 'message': aStr['leavethispage'] }); // Warn user about unsaved settings
-$(document).ready(function() {
if(typeof(after_following) !== 'undefined' && after_following) {
if(typeof(connectDefaultShare) !== 'undefined')
connectDefaultShare();
else
connectFullShare();
- abook_perms_new();
}
$('#id_pending').click(function() {
@@ -25,16 +14,10 @@ $(document).ready(function() {
connectDefaultShare();
else
connectFullShare();
- abook_perms_new();
});
-// $('.abook-edit-me').click(function() {
-// abook_perms_msg();
-// });
-
});
-
function connectFullShare() {
$('.abook-edit-me').each(function() {
if(! $(this).is(':disabled'))
@@ -54,85 +37,4 @@ function connectFullShare() {
$('#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..046d8471b 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1284,12 +1284,6 @@ div.jGrowl div.jGrowl-notification {
text-align: center;
}
-#contact-slider {
- position: relative;
- left: 5%;
- width: 90%;
-}
-
a.rconnect, a.rateme, div.rateme {
color: $nav_active_icon_colour;
text-decoration: none;
@@ -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
@@ -2298,4 +2296,3 @@ nav .badge.mail-update:hover {
.channels_ckbx, .pending_ckbx, .users_ckbx {
margin-top: -5px !important;
}
-
diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl
index d118cbb9c..71693a553 100755
--- a/view/tpl/abook_edit.tpl
+++ b/view/tpl/abook_edit.tpl
@@ -1,140 +1,211 @@
-<div class="generic-content-wrapper-styled">
-<h2>{{$header}}</h2>
-
-<h3>{{$addr}}</h3>
-
-{{if $notself}}
-<div id="connection-flag-tabs">
-{{$tabs}}
-</div>
-<div id="connection-edit-buttons">
-{{foreach $buttons as $b }}
-<button class="btn btn-sm btn-default" title="{{$b.title}}" onclick="window.location.href='{{$b.url}}'; return false;">{{$b.label}}</button>
-{{/foreach}}
-{{/if}}
-
-
-<div id="contact-edit-wrapper">
-<form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" >
-
-<div class="abook-permsnew" style="display: none;">
-<div class="abook-perms-msg">{{$perms_step1}}</div>
-</div>
-
-<div class="abook-permsmsg" style="display: none;">
-<div class="abook-perms-msg">{{$perms_new}}</div>
-</div>
-
-
-<div class="abook-permssave" style="display: none;">
-<input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" />
-</div>
-
-{{if $last_update}}
-{{$lastupdtext}} {{$last_update}}
-{{/if}}
-
-
-{{if $is_pending}}
-<div class="abook-pending-contact">
-{{include file="field_checkbox.tpl" field=$unapproved}}
-</div>
-{{/if}}
-
-
-{{if $notself}}
-{{if $slide}}
-<h3>{{$lbl_slider}}</h3>
-
-{{$slide}}
-
-{{/if}}
-
-{{if $connfilter}}
- {{include file="field_textarea.tpl" field=$incl}}
- {{include file="field_textarea.tpl" field=$excl}}
-{{else}}
- <input type="hidden" name="{{$incl.0}}" value="{{$incl.2}}" />
- <input type="hidden" name="{{$excl.0}}" value="{{$excl.2}}" />
-{{/if}}
-
-{{if $rating}}
-<h3>{{$lbl_rating}}</h3>
-
-{{$rating}}
-
-
-{{/if}}
-
-
-
-{{/if}}
-
-
-{{if $self}}
-<div class="abook-autotext">
-<div id="autoperm-desc" class="descriptive-paragraph">{{$autolbl}}</div>
-{{include file="field_checkbox.tpl" field=$autoperms}}
-</div>
-{{/if}}
-
-<input type="hidden" name="contact_id" value="{{$contact_id}}">
-<input id="contact-closeness-mirror" type="hidden" name="closeness" value="{{$close}}" />
-<input id="contact-rating-mirror" type="hidden" name="rating" value="{{$rating_val}}" />
-
-
-{{if $rating}}
-{{if $notself}}
- {{include file="field_textarea.tpl" field=$rating_text}}
-{{/if}}
-{{/if}}
-
-{{if $notself}}
-{{if $multiprofs }}
-<div>
-<h3>{{$lbl_vis1}}</h3>
-<div>{{$lbl_vis2}}</div>
-
-{{$profile_select}}
-</div>
-{{/if}}
-{{/if}}
-
-<h3>{{$permlbl}}</h3>
-
-{{if $notself}}
-<div id="connedit-perms-wrap" class="fakelink" onclick="openClose('connedit-perms');">{{$clickme}}</div>
-<div id="connedit-perms" style="display: none;" >
-{{/if}}
-
-<div id="perm-desc" class="descriptive-text">{{$permnote}}</div>
-<table>
-<tr><td></td><td class="abook-them">{{$them}}</td><td colspan="2" class="abook-me">{{$me}}</td><td></td></tr>
-<tr><td colspan="5"><hr /></td></tr>
-{{foreach $perms as $prm}}
-{{include file="field_acheckbox.tpl" field=$prm}}
-{{/foreach}}
-<tr><td colspan="5"><hr /></td></tr>
-</table>
-
-</div>
-
-{{if $notself}}
-</div>
-{{/if}}
-
-<input class="contact-edit-submit" type="submit" name="done" value="{{$submit}}" />
-
-{{if $self && $noperms}}
-<script>
- if(typeof(connectDefaultShare) !== 'undefined')
- connectDefaultShare();
- else
- connectFullShare();
- abook_perms_msg();
-</script>
-{{/if}}
-
-</form>
-</div>
+<div class="generic-content-wrapper">
+ <div class="section-title-wrapper">
+ {{if $notself}}
+ <div class="dropdown pull-right">
+ <button id="connection-dropdown" class="btn btn-default btn-xs" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ <i class="icon-caret-down"></i>
+ </button>
+ <ul class="dropdown-menu" aria-labelledby="dLabel">
+ <li><a href="{{$buttons.view.url}}" title="{{$buttons.view.title}}">{{$buttons.view.label}}</a></li>
+ <li><a href="{{$buttons.recent.url}}" title="{{$buttons.recent.title}}">{{$buttons.recent.label}}</a></li>
+ <li class="divider"></li>
+ <li><a href="#" title="{{$buttons.refresh.title}}" onclick="window.location.href='{{$buttons.refresh.url}}'; return false;">{{$buttons.refresh.label}}</a></li>
+ <li><a href="#" title="{{$buttons.block.title}}" onclick="window.location.href='{{$buttons.block.url}}'; return false;">{{$buttons.block.label}}</a></li>
+ <li><a href="#" title="{{$buttons.ignore.title}}" onclick="window.location.href='{{$buttons.ignore.url}}'; return false;">{{$buttons.ignore.label}}</a></li>
+ <li><a href="#" title="{{$buttons.archive.title}}" onclick="window.location.href='{{$buttons.archive.url}}'; return false;">{{$buttons.archive.label}}</a></li>
+ <li><a href="#" title="{{$buttons.hide.title}}" onclick="window.location.href='{{$buttons.hide.url}}'; return false;">{{$buttons.hide.label}}</a></li>
+ <li><a href="#" title="{{$buttons.delete.title}}" onclick="window.location.href='{{$buttons.delete.url}}'; return false;">{{$buttons.delete.label}}</a></li>
+ </ul>
+ </div>
+ {{/if}}
+ <h2>{{$header}}</h2>
+ </div>
+ <div class="section-content-wrapper-np">
+ {{if $notself}}
+ <div class="section-content-info-wrapper">
+ <div>
+ {{$addr_text}} <strong>'{{$addr}}'</strong>
+ </div>
+ {{if $last_update}}
+ <div>
+ {{$lastupdtext}} {{$last_update}}
+ </div>
+ {{/if}}
+ </div>
+ {{/if}}
+
+ <form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" >
+
+ <input type="hidden" name="contact_id" value="{{$contact_id}}">
+
+ <div class="panel-group" id="contact-edit-tools" role="tablist" aria-multiselectable="true">
+ {{if $notself}}
+
+ {{if $is_pending}}
+ <div class="panel">
+ <div class="section-subtitle-wrapper" role="tab" id="pending-tool">
+ <h3>
+ <a data-toggle="collapse" data-parent="#contact-edit-tools" href="#pending-tool-collapse" aria-expanded="true" aria-controls="pending-tool-collapse">
+ {{$pending_label}}
+ </a>
+ </h3>
+ </div>
+ <div id="pending-tool-collapse" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="pending-tool">
+ <div class="section-content-tools-wrapper">
+ {{include file="field_checkbox.tpl" field=$unapproved}}
+ <div class="settings-submit-wrapper" >
+ <button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="modal" id="abook-pending-modal" tabindex="-1" role="dialog">
+ <div class="modal-dialog" role="document">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title" id="myModalLabel">{{$pending_modal_title}}</h4>
+ </div>
+ <div class="modal-body">
+ <strong>{{$name}}</strong> {{$pending_modal_body}}
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-sm btn-danger pull-left" title="{{$buttons.delete.title}}" onclick="window.location.href='{{$buttons.delete.url}}'; return false;">{{$buttons.delete.label}}</button>
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{$pending_modal_dismiss}}</button>
+ <button type="submit" class="btn btn-primary" name="pending" value="1">{{$pending_modal_approve}}</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ <script>$('#abook-pending-modal').modal('show');</script>
+ {{/if}}
+
+ {{if $affinity }}
+ <div class="panel">
+ <div class="section-subtitle-wrapper" role="tab" id="affinity-tool">
+ <h3>
+ <a data-toggle="collapse" data-parent="#contact-edit-tools" href="#affinity-tool-collapse" aria-expanded="true" aria-controls="affinity-tool-collapse">
+ {{$affinity }}
+ </a>
+ </h3>
+ </div>
+ <div id="affinity-tool-collapse" class="panel-collapse collapse{{if !$is_pending}} in{{/if}}" role="tabpanel" aria-labelledby="affinity-tool">
+ <div class="section-content-tools-wrapper">
+ {{if $slide}}
+ <div class="form-group"><strong>{{$lbl_slider}}</strong></div>
+ {{$slide}}
+ <input id="contact-closeness-mirror" type="hidden" name="closeness" value="{{$close}}" />
+ {{/if}}
+
+ {{if $multiprofs }}
+ <div class="form-group">
+ <strong>{{$lbl_vis2}}</strong>
+ {{$profile_select}}
+ </div>
+ {{/if}}
+ <div class="settings-submit-wrapper" >
+ <button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ {{/if}}
+
+ {{if $connfilter}}
+ <div class="panel">
+ <div class="section-subtitle-wrapper" role="tab" id="fitert-tool">
+ <h3>
+ <a data-toggle="collapse" data-parent="#contact-edit-tools" href="#fitert-tool-collapse" aria-expanded="true" aria-controls="fitert-tool-collapse">
+ {{$connfilter_label}}
+ </a>
+ </h3>
+ </div>
+ <div id="fitert-tool-collapse" class="panel-collapse collapse{{if !$is_pending && !($slide || $multiprofs)}} in{{/if}}" role="tabpanel" aria-labelledby="fitert-tool">
+ <div class="section-content-tools-wrapper">
+ {{include file="field_textarea.tpl" field=$incl}}
+ {{include file="field_textarea.tpl" field=$excl}}
+ <div class="settings-submit-wrapper" >
+ <button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ {{else}}
+ <input type="hidden" name="{{$incl.0}}" value="{{$incl.2}}" />
+ <input type="hidden" name="{{$excl.0}}" value="{{$excl.2}}" />
+ {{/if}}
+
+ {{if $rating}}
+ <div class="panel">
+ <div class="section-subtitle-wrapper" role="tab" id="rating-tool">
+ <h3>
+ <a data-toggle="collapse" data-parent="#contact-edit-tools" href="#rating-tool-collapse" aria-expanded="true" aria-controls="rating-tool-collapse">
+ {{$lbl_rating}}
+ </a>
+ </h3>
+ </div>
+ <div id="rating-tool-collapse" class="panel-collapse collapse{{if !$is_pending && !($slide || $multiprofs) && !$connfilter}} in{{/if}}" role="tabpanel" aria-labelledby="rating-tool">
+ <div class="section-content-tools-wrapper">
+ <div class="section-content-warning-wrapper">
+ {{$rating_info}}
+ </div>
+ <div class="form-group"><strong>{{$lbl_rating_label}}</strong></div>
+ {{$rating}}
+ {{include file="field_textarea.tpl" field=$rating_text}}
+ <input id="contact-rating-mirror" type="hidden" name="rating" value="{{$rating_val}}" />
+ <div class="settings-submit-wrapper" >
+ <button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ {{/if}}
+
+ {{/if}}
+
+ <div class="panel">
+ {{if $notself}}
+ <div class="section-subtitle-wrapper" role="tab" id="perms-tool">
+ <h3>
+ <a data-toggle="collapse" data-parent="#contact-edit-tools" href="#perms-tool-collapse" aria-expanded="true" aria-controls="perms-tool-collapse">
+ {{$permlbl}}
+ </a>
+ </h3>
+ </div>
+ {{/if}}
+ <div id="perms-tool-collapse" class="panel-collapse collapse{{if $self}} in{{/if}}" role="tabpanel" aria-labelledby="perms-tool">
+ <div class="section-content-tools-wrapper">
+ <div class="section-content-warning-wrapper">
+ {{$permnote}}
+ </div>
+
+ <table id="perms-tool-table" class=form-group>
+ <tr>
+ <td></td>
+ {{if $notself}}
+ <td class="abook-them">{{$them}}</td>
+ {{/if}}
+ <td colspan="2" class="abook-me">{{$me}}</td>
+ </tr>
+ {{foreach $perms as $prm}}
+ {{include file="field_acheckbox.tpl" field=$prm}}
+ {{/foreach}}
+ </table>
+
+ {{if $self}}
+ <div>
+ <div>{{$autolbl}}</div>
+ {{include file="field_checkbox.tpl" field=$autoperms}}
+ </div>
+ {{/if}}
+
+ <div class="settings-submit-wrapper" >
+ <button type="submit" name="done" value="{{$submit}}" class="btn btn-primary">{{$submit}}</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
</div>
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 @@
-<div id="contact-slider" class="slider" style="height: 32px; position: relative; left: 5%; width: 90%;"><input id="contact-range" type="text" name="fake-closeness" value="{{$val}}" /></div>
+<div id="contact-slider" class="slider form-group"><input id="contact-range" type="text" name="fake-closeness" value="{{$val}}" /></div>
<script>
- $("#contact-range").jRange({ from: {{$min|default:'0'}}, to: 99, step: 1, scale: [{{$labels}}], width:'100%', showLabels: false, onstatechange: function(v) { $("#contact-closeness-mirror").val(v); } });
+$(document).ready(function() {
+ // The slider does not render correct if width is given in % and
+ // the slider container is hidden (display: none) during rendering.
+ // So let's unhide it to render and hide again afterwards.
+ if(!$("#affinity-tool-collapse").hasClass("in")) {
+ $("#affinity-tool-collapse").addClass("in");
+ makeContactSlider();
+ $("#affinity-tool-collapse").removeClass("in");
+ }
+ else {
+ makeContactSlider();
+ }
+});
+
+function makeContactSlider() {
+ $("#contact-range").jRange({ from: {{$min|default:'0'}}, to: 99, step: 1, scale: [{{$labels}}], width:'98%', showLabels: false, onstatechange: function(v) { $("#contact-closeness-mirror").val(v); } });
+}
</script>
diff --git a/view/tpl/field_acheckbox.tpl b/view/tpl/field_acheckbox.tpl
index 816af2a65..d2aad3875 100755
--- a/view/tpl/field_acheckbox.tpl
+++ b/view/tpl/field_acheckbox.tpl
@@ -1,17 +1,17 @@
-<tr>
+<tr class="highlight">
<td>
- <label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label>
+ <label class="mainlabel" for='id_{{$field.0}}'>{{$field.1}}</label><br>
+ <span class='field_abook_help'>{{$field.6}}</span>
</td>
+ {{if $notself}}
<td class="abook-them">
<input type="checkbox" name='them_{{$field.0}}' id='them_id_{{$field.0}}' value="1" disabled="disabled" {{if $field.2}}checked="checked"{{/if}} />
</td>
+ {{/if}}
<td class="abook-me">
- <input type="checkbox" name='{{$field.0}}' class='abook-edit-me' id='me_id_{{$field.0}}' value="{{$field.4}}" {{if $field.3}}checked="checked"{{/if}} />
- </td>
- <td>
- {{if $field.5}}<span class="permission-inherited">{{$inherited}}</span> {{/if}}
+ <input type="checkbox" name='{{$field.0}}' class='abook-edit-me' id='me_id_{{$field.0}}' value="{{$field.4}}" {{if $field.3}}checked="checked"{{/if}}{{if $field.5 && $notself}} disabled="disabled"{{/if}}/>
</td>
<td>
- <span class='field_abook_help'>{{$field.6}}</span>
+ {{if $field.5}}<span class="permission-inherited">{{$inherited}}</span>{{/if}}
</td>
-</tr> \ No newline at end of file
+</tr>
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 @@
-<div id="rating-slider" class="slider" style="height: 32px; position: relative; left: 5%; width: 90%;"><input id="rating-range" type="text" name="fake-rating" value="{{$val}}" /></div>
+<div id="rating-slider" class="slider form-group"><input id="rating-range" type="text" name="fake-rating" value="{{$val}}" /></div>
<script>
- $("#rating-range").jRange({ from: -10, to: 10, step: 1, width:'100%', showLabels: false, showScale: true, scale : [ '-10','-8','-6','-4','-2','0','2','4','6','8','10' ], onstatechange: function(v) { $("#contact-rating-mirror").val(v); } });
+$(document).ready(function() {
+ // The slider does not render correct if width is given in % and
+ // the slider container is hidden (display: none) during rendering.
+ // So let's unhide it to render and hide again afterwards.
+ if(!$("#rating-tool-collapse").hasClass("in")) {
+ $("#rating-tool-collapse").addClass("in");
+ makeRatingSlider();
+ $("#rating-tool-collapse").removeClass("in");
+ }
+ else {
+ makeRatingSlider();
+ }
+});
+function makeRatingSlider() {
+ $("#rating-range").jRange({ from: -10, to: 10, step: 1, width:'98%', showLabels: false, showScale: true, scale : [ '-10','-8','-6','-4','-2','0','2','4','6','8','10' ], onstatechange: function(v) { $("#contact-rating-mirror").val(v); } });
+}
</script>