提交 432347d1 编写于 作者: C Catouse

* ajusted code of droppable.js.

 * rebuilt zui.
上级 83de9ea1
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -2364,7 +2364,7 @@ if (typeof jQuery === "undefined") { throw new Error("ZUI requires jQuery") }
{
$targets.removeClass('drop-to');
}
$targets.each(function(index, el)
$targets.each(function(index)
{
var t = $(this);
var tPos = t.offset();
......@@ -2981,7 +2981,7 @@ if (typeof jQuery === "undefined") { throw new Error("ZUI requires jQuery") }
var hl = $('html').attr('lang');
lang = hl? hl : 'en';
}
return lang.replace(/-/, '_').toLowerCase();
return lang.replace('-', '_').toLowerCase();
}
/**
......@@ -3074,7 +3074,7 @@ if (typeof jQuery === "undefined") { throw new Error("ZUI requires jQuery") }
}
if (!button.className) {
if (total <= 2 && index === total-1) {
if (total == 1 || (total >= 2 && key === 'confirm')) {
// always add a primary to the main option in a two-button dialog
button.className = "btn-primary";
} else {
......@@ -3219,7 +3219,7 @@ if (typeof jQuery === "undefined") { throw new Error("ZUI requires jQuery") }
exports.confirm = function() {
var options;
options = mergeDialogOptions("confirm", ["cancel", "confirm"], ["message", "callback"], arguments);
options = mergeDialogOptions("confirm", ["confirm", "cancel"], ["message", "callback"], arguments);
/**
* overrides; undo anything the user tried to set they shouldn't have
......@@ -3262,7 +3262,7 @@ if (typeof jQuery === "undefined") { throw new Error("ZUI requires jQuery") }
// just because of 'value' and 'inputType' - can we refactor?
defaults = {
className: "bootbox-prompt",
buttons: createLabels("cancel", "confirm"),
buttons: createLabels("confirm", "cancel"),
value: "",
inputType: "text"
};
......@@ -3667,12 +3667,12 @@ if (typeof jQuery === "undefined") { throw new Error("ZUI requires jQuery") }
CONFIRM : "OK"
},
zh_cn : {
OK : "OK",
OK : "好的",
CANCEL : "取消",
CONFIRM : "确认"
},
zh_tw : {
OK : "OK",
OK : "好的",
CANCEL : "取消",
CONFIRM : "確認"
}
......
......@@ -87,7 +87,7 @@
{
$targets.removeClass('drop-to');
}
$targets.each(function(index, el)
$targets.each(function(index)
{
var t = $(this);
var tPos = t.offset();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册