2
0
Эх сурвалжийг харах

set 'submitOpts.overwriteScopesOfDescendants' param when post to /_api/pages.update

Yuki Takei 7 жил өмнө
parent
commit
ca88faa70b

+ 4 - 1
src/client/js/app.js

@@ -213,7 +213,7 @@ const saveWithSubmitButtonSuccessHandler = function() {
   location.href = pagePath;
   location.href = pagePath;
 };
 };
 
 
-const saveWithSubmitButton = function() {
+const saveWithSubmitButton = function(submitOpts) {
   const editorMode = crowi.getCrowiForJquery().getCurrentEditorMode();
   const editorMode = crowi.getCrowiForJquery().getCurrentEditorMode();
   if (editorMode == null) {
   if (editorMode == null) {
     // do nothing
     // do nothing
@@ -225,6 +225,9 @@ const saveWithSubmitButton = function() {
   const options = componentInstances.savePageControls.getCurrentOptionsToSave();
   const options = componentInstances.savePageControls.getCurrentOptionsToSave();
   options.socketClientId = socketClientId;
   options.socketClientId = socketClientId;
 
 
+  // set 'submitOpts.overwriteScopesOfDescendants' to options
+  options.overwriteScopesOfDescendants = submitOpts ? !!submitOpts.overwriteScopesOfDescendants : false;
+
   let promise = undefined;
   let promise = undefined;
   if (editorMode === 'hackmd') {
   if (editorMode === 'hackmd') {
     // get markdown
     // get markdown