diff options
author | Andrew Manning <tamanning@zoho.com> | 2018-04-08 14:18:10 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2018-04-08 14:18:10 -0400 |
commit | 43cafcc761bc12f442c30ab952164736aa18f9d8 (patch) | |
tree | 52a890ff54a9a413460c38b61833139639e6d341 /view/tpl/jot.tpl | |
parent | be6dcb5d0a96d3618c4d4d824bf94b0a6753fefc (diff) | |
download | volse-hubzilla-43cafcc761bc12f442c30ab952164736aa18f9d8.tar.gz volse-hubzilla-43cafcc761bc12f442c30ab952164736aa18f9d8.tar.bz2 volse-hubzilla-43cafcc761bc12f442c30ab952164736aa18f9d8.zip |
Auto-save post and comment entry using localStorage in browser.
Diffstat (limited to 'view/tpl/jot.tpl')
-rwxr-xr-x | view/tpl/jot.tpl | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 90058ab30..bc9339d4c 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -40,38 +40,6 @@ <input name="category" id="jot-category" type="text" placeholder="{{$placeholdercategory}}" value="{{$category}}" data-role="cat-tagsinput"> </div> {{/if}} - - <script> - - var postSaveTimer = null; - - $(document).on('focusout',"#profile-jot-text",function(e){ - if(postSaveTimer) - clearTimeout(postSaveTimer); - postSaveChanges(true); - postSaveTimer = null; - }); - - $(document).on('focusin',"#profile-jot-text",function(e){ - postSaveTimer = setTimeout(function () { - postSaveChanges(false); - },10000); - }); - - function postSaveChanges(isFinal = false, type) { - $.post('autosavetext', - { - 'type' : 'post', - 'body' : $("#profile-jot-text").val(), - 'title': $("#jot-title").val() - } - ); - if( !isFinal) { - postSaveTimer = setTimeout(postSaveChanges,10000); - } - - } - </script> <div id="jot-text-wrap"> <textarea class="profile-jot-text" id="profile-jot-text" name="body" tabindex="2" placeholder="{{$placeholdtext}}" >{{$content}}</textarea> </div> |