diff options
author | Mario <mario@mariovavti.com> | 2021-03-08 19:25:01 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-03-09 12:11:39 +0100 |
commit | 7612d8246ec2a791cdc3752d99089557c5980635 (patch) | |
tree | a81a6feb445c1c3a2cfc389ee74d3c2021495c1a | |
parent | 53bb16e799040828511dd7a068577a469f1b2191 (diff) | |
download | volse-hubzilla-7612d8246ec2a791cdc3752d99089557c5980635.tar.gz volse-hubzilla-7612d8246ec2a791cdc3752d99089557c5980635.tar.bz2 volse-hubzilla-7612d8246ec2a791cdc3752d99089557c5980635.zip |
fix summary not saved in browser autosave draft
(cherry picked from commit 8d26961639eedf76fce06e81c81ebc8fa9b29ae2)
-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 98dccdaa0..ec1b3c6e5 100644 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -571,6 +571,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()); @@ -591,6 +592,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); } @@ -606,6 +608,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; @@ -614,6 +617,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; |