Skip to content

Commit c6ad132

Browse files
author
minjk-bl
committed
change confirm popup's default button
1 parent 5b0e305 commit c6ad132

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/api_block/blockContainer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ define([
11241124
if (prevSelectedBlock && prevSelectedBlock.isModified) {
11251125
// Ask to save
11261126
var apiBlockPackage = this.getImportPackageThis();
1127-
apiBlockPackage.openMultiBtnModal_new('Unsaved Changes', 'Save changes before leave?',['Don’t save', 'Save'], [() => {
1127+
apiBlockPackage.openMultiBtnModal_new('Unsaved Changes', 'Save changes before leave?',['Don’t save', 'Save'], 2, [() => {
11281128
// cancel
11291129
// $(VP_ID_PREFIX + VP_APIBLOCK_BOARD_OPTION_CANCEL_BUTTON).trigger(STR_CLICK);
11301130
blockContainerThis.cancelBlock();

src/api_block/component/boardMenuBar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ define([
111111

112112
var saveFilePath = vpCommon.formatString("./{0}.{1}", saveFileName, vpConst.VP_NOTE_EXTENSION);
113113
var apiBlockPackage = blockContainer.getImportPackageThis();
114-
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], [() => {
114+
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], 3, [() => {
115115
saveNotePageAction_newVersion(vpCommon.formatString("{0}.{1}", saveFileName, vpConst.VP_NOTE_EXTENSION), saveFilePath);
116116

117117
blockContainer.deleteAllBlock();
@@ -161,7 +161,7 @@ define([
161161

162162
var saveFilePath = $(vpCommon.wrapSelector(vpCommon.formatString("#{0}", vpConst.VP_NOTE_REAL_FILE_PATH))).val();
163163
var apiBlockPackage = blockContainer.getImportPackageThis();
164-
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], [() => {
164+
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], 3, [() => {
165165
if (saveFilePath == '') {
166166
saveAsNotePage();
167167
} else {

src/api_block/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ define([
812812
/** File navigation을 open하지 않고 alert창 띄움*/
813813
} else {
814814
var saveFilePath = vpCommon.formatString("./{0}.{1}", saveFileName, vpConst.VP_NOTE_EXTENSION);
815-
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes','No', 'Cancel'], [() => {
815+
apiBlockPackage.openMultiBtnModal_new('Save As', `Save changes to '${saveFileName}.vp'`,['Yes', 'No', 'Cancel'], 3, [() => {
816816
saveNotePageAction_newVersion(saveFileName, saveFilePath);
817817
openNotePage();
818818

src/common/vpFuncJS.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ define([
415415
* @param {Array<string>} buttons 버튼 캡션
416416
* @param {Array<function>} callback 선택 콜백 함수
417417
*/
418-
VpFuncJS.prototype.openMultiBtnModal_new = function(message = "", submessage, buttons = new Array(), callbackList) {
419-
var mbmModal = new vpMultiButtonModal_new.vpMultiButtonModal(message, submessage, buttons);
418+
VpFuncJS.prototype.openMultiBtnModal_new = function(message = "", submessage, buttons = new Array(), defaultButtonIdx, callbackList) {
419+
var mbmModal = new vpMultiButtonModal_new.vpMultiButtonModal(message, submessage, buttons, defaultButtonIdx);
420420
mbmModal.openModal(callbackList);
421421
}
422422
return {'VpFuncJS': VpFuncJS};

0 commit comments

Comments
 (0)