Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/ui/editorui.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
k = btnCmds.length;
while (k --) {
cmd = btnCmds[k];
editorui[cmd] = function (cmd){
editorui[cmd] = (function (cmd){
return function (editor, title){
title = title || defaultLabelMap[cmd.toLowerCase()] || '';
var ui = new editorui.Button({
Expand All @@ -45,7 +45,7 @@
});
return ui;
};
}(cmd);
})(cmd);
}

editorui.Justify = function (editor, side, title){
Expand Down Expand Up @@ -102,7 +102,7 @@
k = colorCmds.length;
while (k --) {
cmd = colorCmds[k];
editorui[cmd] = function (cmd){
editorui[cmd] = (function (cmd){
return function (editor, title){
title = title || defaultLabelMap[cmd.toLowerCase()] || '';
var ui = new editorui.ColorButton({
Expand Down Expand Up @@ -131,15 +131,15 @@
});
return ui;
};
}(cmd);
})(cmd);
}

//不需要确定取消按钮的dialog
var dialogNoButton = ['SearchReplace','Emoticon','Help','Spechars'];
k = dialogNoButton.length;
while(k --){
cmd = dialogNoButton[k];
editorui[cmd] = function (cmd){
editorui[cmd] = (function (cmd){
cmd = cmd.toLowerCase();
return function (editor, iframeUrl, title){
iframeUrl = iframeUrl || defaultIframeUrlMap[cmd.toLowerCase()] || 'about:blank';
Expand Down Expand Up @@ -179,14 +179,14 @@
});
return ui;
};
}(cmd);
})(cmd);
}

var dialogCmds = ['Link', 'Image', 'Map', 'Video'];
k = dialogCmds.length;
while (k --) {
cmd = dialogCmds[k];
editorui[cmd] = function (cmd){
editorui[cmd] = (function (cmd){
cmd = cmd.toLowerCase();
return function (editor, iframeUrl, title){
iframeUrl = iframeUrl || defaultIframeUrlMap[cmd.toLowerCase()] || 'about:blank';
Expand Down Expand Up @@ -242,7 +242,7 @@
});
return ui;
};
}(cmd);
})(cmd);
}

var FONT_MAP = {
Expand Down