community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864292 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/drafts.js wizard.js
Date Sat, 03 Aug 2019 02:12:15 GMT
Author: humbedooh
Date: Sat Aug  3 02:12:15 2019
New Revision: 1864292

URL: http://svn.apache.org/viewvc?rev=1864292&view=rev
Log:
updates for draft handling:
- fall back to existing stepper reference if null is passed
- rebuild entire panel on deleting a file

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=1864292&r1=1864291&r2=1864292&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 Sat Aug  3 02:12:15 2019
@@ -64,7 +64,7 @@ function list_drafts(pdata, editor) {
 
 function show_draft_list(state, json) {
   if (json && json) { saved_drafts = json.drafts || {}; }
-  draft_stepper = state.stepper; // hackish for now!
+  draft_stepper = state.stepper||drafts_stepper; // hackish for now!
   let txt = "";
   let filenames = Object.keys(saved_drafts);
   if (filenames.length > 0) {
@@ -108,7 +108,7 @@ function deleted_draft(state, json) {
                 break
             }
         }
-        show_draft_list({}, {drafts: saved_drafts});
+        draft_stepper.build(0, false);
     } else {
         modal("Could not remove report draft :/");
     }

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=1864292&r1=1864291&r2=1864292&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Sat Aug  3 02:12:15 2019
@@ -1079,7 +1079,7 @@ function list_drafts(pdata, editor) {
 
 function show_draft_list(state, json) {
   if (json && json) { saved_drafts = json.drafts || {}; }
-  draft_stepper = state.stepper; // hackish for now!
+  draft_stepper = state.stepper||drafts_stepper; // hackish for now!
   let txt = "";
   let filenames = Object.keys(saved_drafts);
   if (filenames.length > 0) {
@@ -1123,7 +1123,7 @@ function deleted_draft(state, json) {
                 break
             }
         }
-        show_draft_list({}, {drafts: saved_drafts});
+        draft_stepper.build(0, false);
     } else {
         modal("Could not remove report draft :/");
     }



Mime
View raw message