Преглед на файлове

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

Yuki Takei преди 7 години
родител
ревизия
ca88faa70b
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      src/client/js/app.js

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

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