diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/css/mod_settings.css | 17 | ||||
-rw-r--r-- | view/css/mod_tokens.css | 16 | ||||
-rw-r--r-- | view/js/main.js | 29 | ||||
-rwxr-xr-x | view/tpl/abook_edit.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/conv_frame.tpl | 15 | ||||
-rwxr-xr-x | view/tpl/conv_item.tpl | 6 | ||||
-rwxr-xr-x | view/tpl/defperms.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/jot.tpl | 8 | ||||
-rw-r--r-- | view/tpl/permcats.tpl (renamed from view/tpl/settings_permcats.tpl) | 6 | ||||
-rwxr-xr-x | view/tpl/settings_features.tpl | 21 | ||||
-rwxr-xr-x | view/tpl/settings_module.tpl | 21 | ||||
-rw-r--r-- | view/tpl/settings_module_ajax.tpl | 11 | ||||
-rw-r--r-- | view/tpl/tokens.tpl (renamed from view/tpl/settings_tokens.tpl) | 6 |
13 files changed, 97 insertions, 63 deletions
diff --git a/view/css/mod_settings.css b/view/css/mod_settings.css index 4236b3dff..d8786eed2 100644 --- a/view/css/mod_settings.css +++ b/view/css/mod_settings.css @@ -9,20 +9,3 @@ .channel-menu { margin-top: 24px; } - -.zat-example { - color: red; -} - -#atoken-index { - width: 100%; -} - -#atoken-index td:nth-child(1){ - padding: 7px 3px 7px 10px; - white-space: nowrap; -} - -.atoken-index-tool { - padding: 7px 10px; -} diff --git a/view/css/mod_tokens.css b/view/css/mod_tokens.css new file mode 100644 index 000000000..ac3bd90d7 --- /dev/null +++ b/view/css/mod_tokens.css @@ -0,0 +1,16 @@ +.zat-example { + color: red; +} + +#atoken-index { + width: 100%; +} + +#atoken-index td:nth-child(1){ + padding: 7px 3px 7px 10px; + white-space: nowrap; +} + +.atoken-index-tool { + padding: 7px 10px; +} diff --git a/view/js/main.js b/view/js/main.js index 17f94dd16..48277f5cc 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -41,6 +41,8 @@ $.ajaxSetup({cache: false}); $(document).ready(function() { $(document).on('click focus', '.comment-edit-form', handle_comment_form); + $(document).on('click', '.conversation-settings-link', getConversationSettings); + $(document).on('click', '#settings_module_ajax_submit', postConversationSettings); jQuery.timeago.settings.strings = { prefixAgo : aStr['t01'], @@ -122,6 +124,33 @@ $(document).ready(function() { }); +function getConversationSettings() { + $.get('settings/conversation/?f=&aj=1',function(data) { + $('#conversation_settings_body').html(data); + }); + + + +} + +function postConversationSettings() { + $.post( + 'settings/conversation', + $('#settings_module_ajax_form').serialize() + "&auto_update=" + next_page + ); + + if(next_page === 1) { + page_load = true; + } + + $('#conversation_settings').modal('hide'); + + if(timer) clearTimeout(timer); + timer = setTimeout(updateInit,100); + + return false; +} + function datasrc2src(selector) { $(selector).each(function(i, el) { $(el).attr("src", $(el).data("src")); diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index d72258fa0..6ff7bffcd 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -485,7 +485,7 @@ </div> {{if $permcat_enable}} - <a href="settings/permcats" class="pull-right"><i class="fa fa-plus"></i> {{$permcat_new}}</a> + <a href="permcats" class="pull-right"><i class="fa fa-plus"></i> {{$permcat_new}}</a> {{include file="field_select.tpl" field=$permcat}} {{/if}} diff --git a/view/tpl/conv_frame.tpl b/view/tpl/conv_frame.tpl index 8aa865076..c6b3b0d9b 100755 --- a/view/tpl/conv_frame.tpl +++ b/view/tpl/conv_frame.tpl @@ -4,5 +4,16 @@ <div id="page-spinner" class="spinner-wrapper"> <div class="spinner m"></div> </div> - - +<div class="modal" id="conversation_settings" tabindex="-1" role="dialog" aria-labelledby="conversation_settings_label" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h3 class="modal-title" id="conversation_settings_label">{{$conversation_tools}}</h3> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + </div> + <div class="modal-body" id="conversation_settings_body"> + {{$wait}} + </div> + </div><!-- /.modal-content --> + </div><!-- /.modal-dialog --> +</div><!-- /.modal --> diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 05c3d7ae0..5720a2a5f 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -183,6 +183,10 @@ <div class="dropdown-divider"></div> <a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a> {{/if}} + {{if $item.settings}} + <div class="dropdown-divider"></div> + <a class="dropdown-item conversation-settings-link" href="" data-toggle="modal" data-target="#conversation_settings">{{$item.settings}}</a> + {{/if}} </div> </div> </div> @@ -210,7 +214,7 @@ <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> - <h4 class="modal-title">{{$response.count}} {{$response.button}}</h4> + <h3 class="modal-title">{{$response.count}} {{$response.button}}</h3> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body response-list"> diff --git a/view/tpl/defperms.tpl b/view/tpl/defperms.tpl index 5273ee91b..29f642cff 100755 --- a/view/tpl/defperms.tpl +++ b/view/tpl/defperms.tpl @@ -17,7 +17,7 @@ <p>{{$permnote_self}}</p> </div> {{if $permcat_enable}} - <a href="settings/permcats" class="pull-right"><i class="fa fa-plus"></i> {{$permcat_new}}</a> + <a href="permcats" class="pull-right"><i class="fa fa-plus"></i> {{$permcat_new}}</a> {{include file="field_select.tpl" field=$permcat}} {{/if}} diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 2137baf9b..cb80c6c7e 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -212,7 +212,7 @@ <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> - <h4 class="modal-title" id="expiryModalLabel">{{$jotnets_label}}</h4> + <h3 class="modal-title" id="expiryModalLabel">{{$jotnets_label}}</h3> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> @@ -239,7 +239,7 @@ <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> - <h4 class="modal-title" id="expiryModalLabel">{{$expires}}</h4> + <h3 class="modal-title" id="expiryModalLabel">{{$expires}}</h3> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body form-group" style="width:90%"> @@ -266,7 +266,7 @@ <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> - <h4 class="modal-title" id="createdModalLabel">{{$future_txt}}</h4> + <h3 class="modal-title" id="createdModalLabel">{{$future_txt}}</h3> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body form-group" style="width:90%"> @@ -293,7 +293,7 @@ <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> - <h4 class="modal-title" id="embedPhotoModalLabel">{{$embedPhotosModalTitle}}</h4> + <h3 class="modal-title" id="embedPhotoModalLabel">{{$embedPhotosModalTitle}}</h3> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body" id="embedPhotoModalBody" > diff --git a/view/tpl/settings_permcats.tpl b/view/tpl/permcats.tpl index bbbd41669..2cad2db5b 100644 --- a/view/tpl/settings_permcats.tpl +++ b/view/tpl/permcats.tpl @@ -8,7 +8,7 @@ {{$desc}} </div> - <form action="settings/permcats" id="settings-permcats-form" method="post" autocomplete="off" > + <form action="permcats" id="settings-permcats-form" method="post" autocomplete="off" > <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> {{include file="field_input.tpl" field=$name}} @@ -50,8 +50,8 @@ <table id="permcat-index"> {{foreach $permcats as $k => $v}} <tr class="permcat-row-{{$k}}"> - <td width="99%"><a href="settings/permcats/{{$k}}">{{$v}}</a></td> - <td width="1%"><i class="fa fa-trash-o drop-icons" onClick="dropItem('/settings/permcats/{{$k}}/drop', '.permcat-row-{{$k}}')"></i></td> + <td width="99%"><a href="permcats/{{$k}}">{{$v}}</a></td> + <td width="1%"><i class="fa fa-trash-o drop-icons" onClick="dropItem('permcats/{{$k}}/drop', '.permcat-row-{{$k}}')"></i></td> </tr> {{/foreach}} </table> diff --git a/view/tpl/settings_features.tpl b/view/tpl/settings_features.tpl index 998199c8e..12c4f44f3 100755 --- a/view/tpl/settings_features.tpl +++ b/view/tpl/settings_features.tpl @@ -1,31 +1,10 @@ -<script> - $(document).ready(function() { - $('#id_techlevel').change(function() { - var techlvl = $('#id_techlevel').val(); - window.location.href='{{$baseurl}}/settings/features?f=&techlevel=' + techlvl; - }); - }); -</script> - <div class="generic-content-wrapper"> <div class="section-title-wrapper"> <h2>{{$title}}</h2> </div> <form action="settings/features" method="post" autocomplete="off"> <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> - {{if ! $techlock}} - <div class="section-content-tools-wrapper"> - {{include file="field_select.tpl" field=$techlevel}} - </div> - {{else}} - <input type="hidden" name="techlevel" value="{{$techlevel.2}}" /> - {{/if}} - {{if $hiddens}} - {{foreach $hiddens as $k => $v}} - <input type="hidden" name="feature_{{$k}}" value="{{$v}}" /> - {{/foreach}} - {{/if}} <div class="panel-group" id="settings" role="tablist" aria-multiselectable="true"> {{foreach $features as $g => $f}} <div class="panel"> diff --git a/view/tpl/settings_module.tpl b/view/tpl/settings_module.tpl index cabefc3e5..a701ec364 100755 --- a/view/tpl/settings_module.tpl +++ b/view/tpl/settings_module.tpl @@ -4,15 +4,16 @@ </div> <div class="section-content-wrapper"> <form action="{{$action_url}}" method="post" autocomplete="off"> - <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> - {{if $rpath}} - <input type='hidden' name='rpath' value='{{$rpath}}'> - {{/if}} - {{foreach $features as $feature}} - {{include file="field_checkbox.tpl" field=$feature}} - {{/foreach}} - <div class="settings-submit-wrapper" > - <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button> - </div> + <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> + {{if $rpath}} + <input type='hidden' name='rpath' value='{{$rpath}}'> + {{/if}} + {{foreach $features as $feature}} + {{include file="field_checkbox.tpl" field=$feature}} + {{/foreach}} + <div class="settings-submit-wrapper" > + <button type="submit" name="submit" class="btn btn-primary">{{$submit}}</button> + </div> + </form> </div> </div> diff --git a/view/tpl/settings_module_ajax.tpl b/view/tpl/settings_module_ajax.tpl new file mode 100644 index 000000000..bd7b6f3df --- /dev/null +++ b/view/tpl/settings_module_ajax.tpl @@ -0,0 +1,11 @@ +<form id="settings_module_ajax_form" action="{{$action_url}}" method="post" autocomplete="off"> + <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> + <input type='hidden' name='aj' value='1'> + {{foreach $features as $feature}} + {{include file="field_checkbox.tpl" field=$feature}} + {{/foreach}} + <div class="settings-submit-wrapper" > + <button id="settings_module_ajax_submit" type="submit" name="submit" class="btn btn-primary">{{$submit}}</button> + </div> +</form> + diff --git a/view/tpl/settings_tokens.tpl b/view/tpl/tokens.tpl index 48190c00c..ccb1f8c61 100644 --- a/view/tpl/settings_tokens.tpl +++ b/view/tpl/tokens.tpl @@ -8,7 +8,7 @@ {{$desc}} </div> - <form action="settings/tokens" id="settings-account-form" method="post" autocomplete="off" > + <form action="tokens" id="settings-account-form" method="post" autocomplete="off" > <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> {{if $atoken}}<input type="hidden" name="atoken_id" value="{{$atoken.atoken_id}}" />{{/if}} {{include file="field_input.tpl" field=$name}} @@ -61,8 +61,8 @@ <table id="atoken-index"> {{foreach $tokens as $t}} <tr id="atoken-index-{{$t.atoken_id}}" class="atoken-index-row"> - <td width="99%"><a href="settings/tokens/{{$t.atoken_id}}">{{$t.atoken_name}}</a></td> - <td width="1%" class="atoken-index-tool"><i class="fa fa-trash-o drop-icons" onClick="dropItem('/settings/tokens/{{$t.atoken_id}}/drop', '#atoken-index-{{$t.atoken_id}}')"></i></td> + <td width="99%"><a href="tokens/{{$t.atoken_id}}">{{$t.atoken_name}}</a></td> + <td width="1%" class="atoken-index-tool"><i class="fa fa-trash-o drop-icons" onClick="dropItem('tokens/{{$t.atoken_id}}/drop', '#atoken-index-{{$t.atoken_id}}')"></i></td> </tr> {{/foreach}} </table> |