diff options
Diffstat (limited to 'view/tpl')
-rwxr-xr-x | view/tpl/admin_site.tpl | 1 | ||||
-rw-r--r-- | view/tpl/cloud_header.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/comment_item.tpl | 3 | ||||
-rwxr-xr-x | view/tpl/jot-header.tpl | 88 | ||||
-rwxr-xr-x | view/tpl/photo_album.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/photos_recent.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/settings.tpl | 1 | ||||
-rwxr-xr-x | view/tpl/settings_features.tpl | 22 | ||||
-rwxr-xr-x | view/tpl/settings_oauth2.tpl | 35 | ||||
-rwxr-xr-x | view/tpl/settings_oauth2_edit.tpl | 21 | ||||
-rwxr-xr-x | view/tpl/settings_oauth_edit.tpl | 1 |
11 files changed, 174 insertions, 4 deletions
diff --git a/view/tpl/admin_site.tpl b/view/tpl/admin_site.tpl index fb96ef2cf..7e99b2c86 100755 --- a/view/tpl/admin_site.tpl +++ b/view/tpl/admin_site.tpl @@ -101,6 +101,7 @@ {{include file="field_input.tpl" field=$maxloadavg}} {{include file="field_input.tpl" field=$abandon_days}} {{include file="field_input.tpl" field=$default_expire_days}} + {{include file="field_input.tpl" field=$active_expire_days}} <div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div> diff --git a/view/tpl/cloud_header.tpl b/view/tpl/cloud_header.tpl index 307dc8956..642fb1866 100644 --- a/view/tpl/cloud_header.tpl +++ b/view/tpl/cloud_header.tpl @@ -6,7 +6,7 @@ <a href="/sharedwithme" class="btn btn-sm btn-outline-secondary"><i class="fa fa-cloud-download"></i> {{$shared}}</a> {{/if}} <button id="files-create-btn" class="btn btn-sm btn-primary" onclick="openClose('files-mkdir-tools'); closeMenu('files-upload-tools');"><i class="fa fa-folder-o"></i> {{$create}}</button> - <button id="files-upload-btn" class="btn btn-sm btn-success" onclick="openClose('files-upload-tools'); closeMenu('files-mkdir-tools');"><i class="fa fa-arrow-circle-o-up"></i> {{$upload}}</button> + <button id="files-upload-btn" class="btn btn-sm btn-success" onclick="openClose('files-upload-tools'); closeMenu('files-mkdir-tools');"><i class="fa fa-plus-circle"></i> {{$upload}}</button> {{/if}} </div> diff --git a/view/tpl/comment_item.tpl b/view/tpl/comment_item.tpl index 3b51971ec..23594677c 100755 --- a/view/tpl/comment_item.tpl +++ b/view/tpl/comment_item.tpl @@ -1,3 +1,6 @@ + <script> + var auto_save_draft = {{$auto_save_draft}}; + </script> {{if $threaded}} <div class="comment-wwedit-wrapper threaded" id="comment-edit-wrapper-{{$id}}" style="display: block;"> {{else}} diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index c1dab52d5..991a4c8b1 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -560,3 +560,91 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del } }); </script> + + +<script> + var postSaveTimer = null; + + function postSaveChanges(action, type) { + if({{$auto_save_draft}}) { + + if(action != 'clean') { + localStorage.setItem("post_title", $("#jot-title").val()); + localStorage.setItem("post_body", $("#profile-jot-text").val()); + if($("#jot-category").length) + localStorage.setItem("post_category", $("#jot-category").val()); + } + + if(action == 'start') { + postSaveTimer = setTimeout(function () { + postSaveChanges('start'); + },10000); + } + + if(action == 'stop') { + clearTimeout(postSaveTimer); + postSaveTimer = null; + } + + if(action == 'clean') { + clearTimeout(postSaveTimer); + postSaveTimer = null; + localStorage.removeItem("post_title"); + localStorage.removeItem("post_body"); + localStorage.removeItem("post_category"); + } + } + + } + + $(document).ready(function() { + + var cleaned = false; + + if({{$auto_save_draft}}) { + var postTitle = localStorage.getItem("post_title"); + var postBody = localStorage.getItem("post_body"); + var postCategory = (($("#jot-category").length) ? localStorage.getItem("post_category") : ''); + var openEditor = false; + + if(postTitle) { + $('#jot-title').val(postTitle); + openEditor = true; + } + if(postBody) { + $('#profile-jot-text').val(postBody); + openEditor = true; + } + if(postCategory) { + var categories = postCategory.split(','); + categories.forEach(function(cat) { + $('#jot-category').tagsinput('add', cat); + }); + openEditor = true; + } + if(openEditor) { + initEditor(); + } + } else { + postSaveChanges('clean'); + } + + $(document).on('submit', '#profile-jot-form', function() { + postSaveChanges('clean'); + cleaned = true; + }); + + $(document).on('focusout',"#profile-jot-wrapper",function(e){ + if(! cleaned) + postSaveChanges('stop'); + }); + + $(document).on('focusin',"#profile-jot-wrapper",function(e){ + postSaveTimer = setTimeout(function () { + postSaveChanges('start'); + },10000); + }); + + + }); +</script> diff --git a/view/tpl/photo_album.tpl b/view/tpl/photo_album.tpl index 678e790ac..de59809f4 100755 --- a/view/tpl/photo_album.tpl +++ b/view/tpl/photo_album.tpl @@ -9,7 +9,7 @@ <i class="fa fa-pencil btn btn-outline-secondary btn-sm" title="{{$album_edit.0}}" onclick="openClose('photo-album-edit-wrapper'); closeMenu('photo-upload-form');"></i> {{/if}} {{if $can_post}} - <button class="btn btn-sm btn-success btn-sm" title="{{$usage}}" onclick="openClose('photo-upload-form'); {{if $album_edit.1}}closeMenu('photo-album-edit-wrapper');{{/if}}"><i class="fa fa-arrow-circle-o-up"></i> {{$upload.0}}</button> + <button class="btn btn-sm btn-success btn-sm" title="{{$usage}}" onclick="openClose('photo-upload-form'); {{if $album_edit.1}}closeMenu('photo-album-edit-wrapper');{{/if}}"><i class="fa fa-plus-circle"></i> {{$upload.0}}</button> {{/if}} </div> </div> diff --git a/view/tpl/photos_recent.tpl b/view/tpl/photos_recent.tpl index a9574aade..d24b362f8 100755 --- a/view/tpl/photos_recent.tpl +++ b/view/tpl/photos_recent.tpl @@ -2,7 +2,7 @@ <div class="section-title-wrapper"> <div class="pull-right"> {{if $can_post}} - <button class="btn btn-sm btn-success acl-form-trigger" title="{{$usage}}" onclick="openClose('photo-upload-form');" data-form_id="photos-upload-form"><i class="fa fa-arrow-circle-o-up"></i> {{$upload.0}}</button> + <button class="btn btn-sm btn-success acl-form-trigger" title="{{$usage}}" onclick="openClose('photo-upload-form');" data-form_id="photos-upload-form"><i class="fa fa-plus-circle"></i> {{$upload.0}}</button> {{/if}} </div> <h2>{{$title}}</h2> diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 0055fa265..d258f1992 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -145,6 +145,7 @@ {{if $vnotify13}} {{include file="field_intcheckbox.tpl" field=$vnotify13}} {{/if}} + {{include file="field_intcheckbox.tpl" field=$vnotify14}} {{include file="field_intcheckbox.tpl" field=$always_show_in_notices}} {{include file="field_input.tpl" field=$evdays}} </div> diff --git a/view/tpl/settings_features.tpl b/view/tpl/settings_features.tpl index f8c162e17..998199c8e 100755 --- a/view/tpl/settings_features.tpl +++ b/view/tpl/settings_features.tpl @@ -1,9 +1,31 @@ +<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_oauth2.tpl b/view/tpl/settings_oauth2.tpl new file mode 100755 index 000000000..882d34ea9 --- /dev/null +++ b/view/tpl/settings_oauth2.tpl @@ -0,0 +1,35 @@ +<div class="generic-content-wrapper"> +<div class="section-title-wrapper"> + <h2>{{$title}}</h2> +</div> + +<div class="section-content-tools-wrapper"> +<form action="settings/oauth2" method="post" autocomplete="off"> +<input type='hidden' name='form_security_token' value='{{$form_security_token}}'> + + <div id="profile-edit-links"> + <ul> + <li> + <a id="profile-edit-view-link" href="{{$baseurl}}/settings/oauth2/add">{{$add}}</a> + </li> + </ul> + </div> + + {{foreach $apps as $app}} + <div class='oauthapp'> + {{if $app.client_id}}<h4>{{$app.client_id}}</h4>{{else}}<h4>{{$noname}}</h4>{{/if}} + {{if $app.my}} + {{if $app.oauth_token}} + <div class="settings-submit-wrapper" ><button class="settings-submit" type="submit" name="remove" value="{{$app.oauth_token}}">{{$remove}}</button></div> + {{/if}} + {{/if}} + {{if $app.my}} + <a href="{{$baseurl}}/settings/oauth2/edit/{{$app.client_id}}" title="{{$edit}}"><i class="fa fa-pencil btn btn-outline-secondary"></i></a> + <a href="{{$baseurl}}/settings/oauth2/delete/{{$app.client_id}}?t={{$form_security_token}}" title="{{$delete}}"><i class="fa fa-trash-o btn btn-outline-secondary"></i></a> + {{/if}} + </div> + {{/foreach}} + +</form> +</div> +</div> diff --git a/view/tpl/settings_oauth2_edit.tpl b/view/tpl/settings_oauth2_edit.tpl new file mode 100755 index 000000000..399c64977 --- /dev/null +++ b/view/tpl/settings_oauth2_edit.tpl @@ -0,0 +1,21 @@ +<div class="generic-content-wrapper"> + <div class="section-title-wrapper"> + <h2>{{$title}}</h2> + </div> +<div class="section-content-tools-wrapper"> +<form method="POST"> +<input type='hidden' name='form_security_token' value='{{$form_security_token}}'> +{{include file="field_input.tpl" field=$name}} +{{include file="field_input.tpl" field=$secret}} +{{include file="field_input.tpl" field=$redirect}} +{{include file="field_input.tpl" field=$grant}} +{{include file="field_input.tpl" field=$scope}} + +<div class="settings-submit-wrapper" > +<input type="submit" name="submit" class="settings-submit" value="{{$submit}}" /> +<input type="submit" name="cancel" class="settings-submit" value="{{$cancel}}" /> +</div> + +</form> +</div> +</div> diff --git a/view/tpl/settings_oauth_edit.tpl b/view/tpl/settings_oauth_edit.tpl index b94dec48a..e44b44723 100755 --- a/view/tpl/settings_oauth_edit.tpl +++ b/view/tpl/settings_oauth_edit.tpl @@ -5,7 +5,6 @@ <div class="section-content-tools-wrapper"> <form method="POST"> <input type='hidden' name='form_security_token' value='{{$form_security_token}}'> - {{include file="field_input.tpl" field=$name}} {{include file="field_input.tpl" field=$key}} {{include file="field_input.tpl" field=$secret}} |