diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-05-20 09:23:44 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-05-20 09:23:44 +0200 |
commit | 7e99931733c75ded40c5c6bdd12a42213ccb7a2e (patch) | |
tree | 579ab25266cd2fad5af6eb43c8e935a45c870f14 /view/tpl/jot-header.tpl | |
parent | 7a1afc315d51366efcf604fc1fe3737375aac799 (diff) | |
download | volse-hubzilla-7e99931733c75ded40c5c6bdd12a42213ccb7a2e.tar.gz volse-hubzilla-7e99931733c75ded40c5c6bdd12a42213ccb7a2e.tar.bz2 volse-hubzilla-7e99931733c75ded40c5c6bdd12a42213ccb7a2e.zip |
implement jot reset button
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-x | view/tpl/jot-header.tpl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index f2b68ece0..39aa9d9c4 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -7,10 +7,11 @@ var pretext = '{{$pretext}}'; function initEditor(cb){ if (editor==false){ $("#profile-jot-text-loading").show(); + $("#profile-jot-reset").removeClass('d-none'); {{$geotag}} if(plaintext == 'none') { $("#profile-jot-text-loading").hide(); - $("#profile-jot-text").css({ 'height': 200 }); + //$("#profile-jot-text").css({ 'height': 200 }); {{if $bbco_autocomplete}} $("#profile-jot-text").bbco_autocomplete('{{$bbco_autocomplete}}'); // autocomplete bbcode {{/if}} @@ -361,8 +362,16 @@ var activeCommentText = ''; $("#jot-title").val(''); $("#profile-jot-text").val(''); $("#jot-category").val(''); - postSaveChanges('clean',''); + postSaveChanges('clean'); + + {{if $reset}} + $(".jothidden").hide(); + $("#profile-jot-text").removeClass('jot-expanded'); + $("#profile-jot-reset").addClass('d-none'); + editor = false; + {{else}} window.history.back(); + {{/if}} } function itemFiler(id) { @@ -573,7 +582,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del <script> var postSaveTimer = null; - function postSaveChanges(action, type) { + function postSaveChanges(action) { if({{$auto_save_draft}}) { var doctype = $('#jot-webpage').val(); |