Skip to content

Commit e5e87e3

Browse files
author
minjk-bl
committed
Frame, Popup module run/add/apply operation bug fixed
1 parent 586300f commit e5e87e3

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/common/vpFrameEditor.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,20 +1131,22 @@ define([
11311131
return code.toString();
11321132
}
11331133

1134-
FrameEditor.prototype.apply = function(runCell = true) {
1134+
FrameEditor.prototype.apply = function(addCell=false, runCell=false) {
11351135
var code = this.generateCode();
11361136
if (this.pageThis) {
11371137
$(this.pageThis.wrapSelector('#' + this.targetId)).val(code);
11381138
$(this.pageThis.wrapSelector('#' + this.targetId)).trigger({
11391139
type: 'frame_run',
11401140
code: code,
1141+
addCell: addCell,
11411142
runCell: runCell
11421143
});
11431144
} else {
11441145
$(vpCommon.wrapSelector('#' + this.targetId)).val(code);
11451146
$(vpCommon.wrapSelector('#' + this.targetId)).trigger({
11461147
type: 'frame_run',
11471148
code: code,
1149+
addCell: addCell,
11481150
runCell: runCell
11491151
});
11501152
}
@@ -1551,7 +1553,7 @@ define([
15511553

15521554
// click run
15531555
$(document).on('click', this.wrapSelector('.' + VP_FE_BUTTON_RUN), function() {
1554-
that.apply();
1556+
that.apply(true, true);
15551557
that.close();
15561558
});
15571559

@@ -1561,11 +1563,14 @@ define([
15611563
$(that.wrapSelector('.' + VP_FE_DETAIL_BOX)).show();
15621564
});
15631565

1564-
// click add
1566+
// click add / apply
15651567
$(document).on('click', this.wrapSelector('.' + VP_FE_DETAIL_ITEM), function() {
15661568
var type = $(this).data('type');
15671569
if (type == 'add') {
1568-
that.apply(false);
1570+
that.apply(true);
1571+
that.close();
1572+
} else if (type == 'apply') {
1573+
that.apply();
15691574
that.close();
15701575
}
15711576
});

src/common/vpPopupPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ define([
216216

217217
// click run
218218
$(document).on('click', this.wrapSelector('.' + VP_PP_BUTTON_RUN), function() {
219-
that.apply();
219+
that.apply(true, true);
220220
that.close();
221221
});
222222

0 commit comments

Comments
 (0)