community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864376 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/drafts.js wizard.js
Date Sun, 04 Aug 2019 11:09:12 GMT
Author: humbedooh
Date: Sun Aug  4 11:09:11 2019
New Revision: 1864376

URL: http://svn.apache.org/viewvc?rev=1864376&view=rev
Log:
when saving a draft, add to drafts lists internally

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/js/source/drafts.js
    comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/drafts.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/drafts.js?rev=1864376&r1=1864375&r2=1864376&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/drafts.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/drafts.js Sun Aug  4 11:09:11 2019
@@ -30,6 +30,13 @@ function draft_saved(state, json) {
     
     if (json.filename) {
         modal("Draft was saved in the reporter database as <kbd>%s</kbd>. You
can revisit this draft at any time by loading it from the base data tab. Drafts are kept for
up to two months.".format(json.filename));
+        let obj = {
+          yours: true,
+          filename: json.filename
+        };
+        let a = json.filename.split('-');
+        let ts = a[2];
+        saved_drafts[ts] = obj;
     } else {
         modal("Could not save draft: %s".format(json.error || "Unspecified error"));
     }

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js?rev=1864376&r1=1864375&r2=1864376&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Sun Aug  4 11:09:11 2019
@@ -1045,6 +1045,13 @@ function draft_saved(state, json) {
     
     if (json.filename) {
         modal("Draft was saved in the reporter database as <kbd>%s</kbd>. You
can revisit this draft at any time by loading it from the base data tab. Drafts are kept for
up to two months.".format(json.filename));
+        let obj = {
+          yours: true,
+          filename: json.filename
+        };
+        let a = json.filename.split('-');
+        let ts = a[2];
+        saved_drafts[ts] = obj;
     } else {
         modal("Could not save draft: %s".format(json.error || "Unspecified error"));
     }



Mime
View raw message