From e5e87e3be4ece428a2589ad3e64791d076585b50 Mon Sep 17 00:00:00 2001 From: minjk-bl Date: Wed, 18 Aug 2021 10:25:49 +0900 Subject: [PATCH] Frame, Popup module run/add/apply operation bug fixed --- src/common/vpFrameEditor.js | 13 +++++++++---- src/common/vpPopupPage.js | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/common/vpFrameEditor.js b/src/common/vpFrameEditor.js index b1f36c2b..1d4eac0a 100644 --- a/src/common/vpFrameEditor.js +++ b/src/common/vpFrameEditor.js @@ -1131,13 +1131,14 @@ define([ return code.toString(); } - FrameEditor.prototype.apply = function(runCell = true) { + FrameEditor.prototype.apply = function(addCell=false, runCell=false) { var code = this.generateCode(); if (this.pageThis) { $(this.pageThis.wrapSelector('#' + this.targetId)).val(code); $(this.pageThis.wrapSelector('#' + this.targetId)).trigger({ type: 'frame_run', code: code, + addCell: addCell, runCell: runCell }); } else { @@ -1145,6 +1146,7 @@ define([ $(vpCommon.wrapSelector('#' + this.targetId)).trigger({ type: 'frame_run', code: code, + addCell: addCell, runCell: runCell }); } @@ -1551,7 +1553,7 @@ define([ // click run $(document).on('click', this.wrapSelector('.' + VP_FE_BUTTON_RUN), function() { - that.apply(); + that.apply(true, true); that.close(); }); @@ -1561,11 +1563,14 @@ define([ $(that.wrapSelector('.' + VP_FE_DETAIL_BOX)).show(); }); - // click add + // click add / apply $(document).on('click', this.wrapSelector('.' + VP_FE_DETAIL_ITEM), function() { var type = $(this).data('type'); if (type == 'add') { - that.apply(false); + that.apply(true); + that.close(); + } else if (type == 'apply') { + that.apply(); that.close(); } }); diff --git a/src/common/vpPopupPage.js b/src/common/vpPopupPage.js index 19d122dc..46848fd9 100644 --- a/src/common/vpPopupPage.js +++ b/src/common/vpPopupPage.js @@ -216,7 +216,7 @@ define([ // click run $(document).on('click', this.wrapSelector('.' + VP_PP_BUTTON_RUN), function() { - that.apply(); + that.apply(true, true); that.close(); });