diff options
author | Mario <mario@mariovavti.com> | 2021-03-08 19:25:01 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-03-08 19:25:01 +0000 |
commit | 8d26961639eedf76fce06e81c81ebc8fa9b29ae2 (patch) | |
tree | 6212bc195c90945b7e6e076b60de4202192b9d60 /view | |
parent | 1561e4a89c33d215c82e60fb4bcfdef0d925dcd7 (diff) | |
download | volse-hubzilla-8d26961639eedf76fce06e81c81ebc8fa9b29ae2.tar.gz volse-hubzilla-8d26961639eedf76fce06e81c81ebc8fa9b29ae2.tar.bz2 volse-hubzilla-8d26961639eedf76fce06e81c81ebc8fa9b29ae2.zip |
fix summary not saved in browser autosave draft
Diffstat (limited to 'view')
-rw-r--r-- | view/tpl/jot-header.tpl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index dde623783..2ec581e05 100644 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -570,6 +570,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del if(action != 'clean') { localStorage.setItem("post_title" + postid, $("#jot-title").val()); + localStorage.setItem("post_summary" + postid, $("#jot-summary").val()); localStorage.setItem("post_body" + postid, $("#profile-jot-text").val()); if($("#jot-category").length) localStorage.setItem("post_category" + postid, $("#jot-category").val()); @@ -590,6 +591,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del clearTimeout(postSaveTimer); postSaveTimer = null; localStorage.removeItem("post_title" + postid); + localStorage.removeItem("post_summary" + postid); localStorage.removeItem("post_body" + postid); localStorage.removeItem("post_category" + postid); } @@ -605,6 +607,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del var doctype = $('#jot-webpage').val(); var postid = '-' + doctype + '-' + $('#jot-postid').val(); var postTitle = localStorage.getItem("post_title" + postid); + var postSummary = localStorage.getItem("post_summary" + postid); var postBody = localStorage.getItem("post_body" + postid); var postCategory = (($("#jot-category").length) ? localStorage.getItem("post_category" + postid) : ''); var openEditor = false; @@ -613,6 +616,10 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del $('#jot-title').val(postTitle); openEditor = true; } + if(postSummary) { + $('#jot-summary').val(postSummary); + openEditor = true; + } if(postBody) { $('#profile-jot-text').val(postBody); openEditor = true; |