guy 8 years ago
parent
commit
a8d35d0315
  1. 80
      bi/core.js
  2. 4
      bi/widget.css
  3. 3
      bi/widget.js
  4. 4
      demo/version.js
  5. 80
      dist/core.js
  6. 4
      dist/widget.css
  7. 3
      dist/widget.js
  8. 4
      src/base/base.js
  9. 176
      src/core/base.js
  10. 80
      src/core/proto/date.js
  11. 4
      src/css/widget/finetuningnumbereditor/finetuning.number.editor.css
  12. 4
      src/less/widget/finetuningnumbereditor/finetuning.number.editor.less
  13. 3
      src/widget/date/trigger.date.js

80
bi/core.js

@ -6301,56 +6301,56 @@ BI.Cache = {
document.cookie = cookieString; document.cookie = cookieString;
} }
};// full day names };// full day names
Date._DN = [BI.i18nText("BI-Sunday"), Date._DN = [BI.i18nText("BI-Basic_Sunday"),
BI.i18nText("BI-Monday"), BI.i18nText("BI-Basic_Monday"),
BI.i18nText("BI-Tuesday"), BI.i18nText("BI-Basic_Tuesday"),
BI.i18nText("BI-Wednesday"), BI.i18nText("BI-Basic_Wednesday"),
BI.i18nText("BI-Thursday"), BI.i18nText("BI-Basic_Thursday"),
BI.i18nText("BI-Friday"), BI.i18nText("BI-Basic_Friday"),
BI.i18nText("BI-Saturday"), BI.i18nText("BI-Basic_Saturday"),
BI.i18nText("BI-Sunday")]; BI.i18nText("BI-Basic_Sunday")];
// short day names // short day names
Date._SDN = ['', Date._SDN = [BI.i18nText("BI-Day_Ri"),
'', BI.i18nText("BI-Basic_One"),
'', BI.i18nText("BI-Basic_Two"),
'', BI.i18nText("BI-Basic_Three"),
'', BI.i18nText("BI-Basic_Four"),
'', BI.i18nText("BI-Basic_Five"),
'', BI.i18nText("BI-Basic_Six"),
'']; BI.i18nText("BI-Day_Ri")];
// Monday first, etc. // Monday first, etc.
Date._FD = 1; Date._FD = 1;
// full month names // full month names
Date._MN = [ Date._MN = [
'', BI.i18nText("BI-Basic_January"),
'', BI.i18nText("BI-Basic_February"),
'', BI.i18nText("BI-Basic_March"),
'', BI.i18nText("BI-Basic_April"),
'', BI.i18nText("BI-Basic_May"),
'', BI.i18nText("BI-Basic_June"),
'', BI.i18nText("BI-Basic_July"),
'', BI.i18nText("BI-Basic_August"),
'', BI.i18nText("BI-Basic_September"),
'', BI.i18nText("BI-Basic_October"),
'', BI.i18nText("BI-Basic_November"),
'']; BI.i18nText("BI-Basic_December")];
// short month names // short month names
Date._SMN = ['', Date._SMN = [0,
'', 1,
'', 2,
'', 3,
'', 4,
'', 5,
'', 6,
'', 7,
'', 8,
'', 9,
'', 10,
'']; 11];
Date._QN = ["", BI.i18nText("BI-Quarter_1"), Date._QN = ["", BI.i18nText("BI-Quarter_1"),
BI.i18nText("BI-Quarter_2"), BI.i18nText("BI-Quarter_2"),

4
bi/widget.css

@ -233,11 +233,13 @@
} }
.bi-fine-tuning-number-editor .top-button { .bi-fine-tuning-number-editor .top-button {
border-left: 1px solid #d4dadd; border-left: 1px solid #d4dadd;
border-bottom: 1px solid #d4dadd;
} }
.bi-fine-tuning-number-editor .bottom-button { .bi-fine-tuning-number-editor .bottom-button {
border-left: 1px solid #d4dadd; border-left: 1px solid #d4dadd;
} }
.bi-fine-tuning-number-editor .split-line {
background-color: #d4dadd;
}
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/

3
bi/widget.js

@ -4857,7 +4857,6 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
hgap: 4, hgap: 4,
vgap: 2, vgap: 2,
triggerWidth: 30, triggerWidth: 30,
watermark: BI.i18nText("BI-Unrestricted"),
yearLength: 4, yearLength: 4,
yearMonthLength: 7 yearMonthLength: 7
}, },
@ -4891,7 +4890,7 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
hgap: c.hgap, hgap: c.hgap,
vgap: c.vgap, vgap: c.vgap,
allowBlank: true, allowBlank: true,
watermark: c.watermark, watermark: BI.i18nText("BI-Unrestricted"),
errorText: function () { errorText: function () {
if (self.editor.isEditing()) { if (self.editor.isEditing()) {
return BI.i18nText("BI-Date_Trigger_Error_Text"); return BI.i18nText("BI-Date_Trigger_Error_Text");

4
demo/version.js

@ -5,3 +5,7 @@ Demo = {
BI.i18n = { BI.i18n = {
"BI-Basic_OK": "确定" "BI-Basic_OK": "确定"
}; };
BI.servletURL = "dist/";
BI.resourceURL = "dist/resource/";
BI.i18n = {};

80
dist/core.js vendored

@ -23672,56 +23672,56 @@ BI.Cache = {
document.cookie = cookieString; document.cookie = cookieString;
} }
};// full day names };// full day names
Date._DN = [BI.i18nText("BI-Sunday"), Date._DN = [BI.i18nText("BI-Basic_Sunday"),
BI.i18nText("BI-Monday"), BI.i18nText("BI-Basic_Monday"),
BI.i18nText("BI-Tuesday"), BI.i18nText("BI-Basic_Tuesday"),
BI.i18nText("BI-Wednesday"), BI.i18nText("BI-Basic_Wednesday"),
BI.i18nText("BI-Thursday"), BI.i18nText("BI-Basic_Thursday"),
BI.i18nText("BI-Friday"), BI.i18nText("BI-Basic_Friday"),
BI.i18nText("BI-Saturday"), BI.i18nText("BI-Basic_Saturday"),
BI.i18nText("BI-Sunday")]; BI.i18nText("BI-Basic_Sunday")];
// short day names // short day names
Date._SDN = ['', Date._SDN = [BI.i18nText("BI-Day_Ri"),
'', BI.i18nText("BI-Basic_One"),
'', BI.i18nText("BI-Basic_Two"),
'', BI.i18nText("BI-Basic_Three"),
'', BI.i18nText("BI-Basic_Four"),
'', BI.i18nText("BI-Basic_Five"),
'', BI.i18nText("BI-Basic_Six"),
'']; BI.i18nText("BI-Day_Ri")];
// Monday first, etc. // Monday first, etc.
Date._FD = 1; Date._FD = 1;
// full month names // full month names
Date._MN = [ Date._MN = [
'', BI.i18nText("BI-Basic_January"),
'', BI.i18nText("BI-Basic_February"),
'', BI.i18nText("BI-Basic_March"),
'', BI.i18nText("BI-Basic_April"),
'', BI.i18nText("BI-Basic_May"),
'', BI.i18nText("BI-Basic_June"),
'', BI.i18nText("BI-Basic_July"),
'', BI.i18nText("BI-Basic_August"),
'', BI.i18nText("BI-Basic_September"),
'', BI.i18nText("BI-Basic_October"),
'', BI.i18nText("BI-Basic_November"),
'']; BI.i18nText("BI-Basic_December")];
// short month names // short month names
Date._SMN = ['', Date._SMN = [0,
'', 1,
'', 2,
'', 3,
'', 4,
'', 5,
'', 6,
'', 7,
'', 8,
'', 9,
'', 10,
'']; 11];
Date._QN = ["", BI.i18nText("BI-Quarter_1"), Date._QN = ["", BI.i18nText("BI-Quarter_1"),
BI.i18nText("BI-Quarter_2"), BI.i18nText("BI-Quarter_2"),

4
dist/widget.css vendored

@ -233,11 +233,13 @@
} }
.bi-fine-tuning-number-editor .top-button { .bi-fine-tuning-number-editor .top-button {
border-left: 1px solid #d4dadd; border-left: 1px solid #d4dadd;
border-bottom: 1px solid #d4dadd;
} }
.bi-fine-tuning-number-editor .bottom-button { .bi-fine-tuning-number-editor .bottom-button {
border-left: 1px solid #d4dadd; border-left: 1px solid #d4dadd;
} }
.bi-fine-tuning-number-editor .split-line {
background-color: #d4dadd;
}
/****添加计算宽度的--运算符直接需要space****/ /****添加计算宽度的--运算符直接需要space****/
/****** common color(常用颜色,可用于普遍场景) *****/ /****** common color(常用颜色,可用于普遍场景) *****/
/**** custom color(自定义颜色,用于特定场景) ****/ /**** custom color(自定义颜色,用于特定场景) ****/

3
dist/widget.js vendored

@ -4857,7 +4857,6 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
hgap: 4, hgap: 4,
vgap: 2, vgap: 2,
triggerWidth: 30, triggerWidth: 30,
watermark: BI.i18nText("BI-Unrestricted"),
yearLength: 4, yearLength: 4,
yearMonthLength: 7 yearMonthLength: 7
}, },
@ -4891,7 +4890,7 @@ BI.shortcut('bi.date_combo', BI.DateCombo);BI.DateTrigger = BI.inherit(BI.Trigge
hgap: c.hgap, hgap: c.hgap,
vgap: c.vgap, vgap: c.vgap,
allowBlank: true, allowBlank: true,
watermark: c.watermark, watermark: BI.i18nText("BI-Unrestricted"),
errorText: function () { errorText: function () {
if (self.editor.isEditing()) { if (self.editor.isEditing()) {
return BI.i18nText("BI-Date_Trigger_Error_Text"); return BI.i18nText("BI-Date_Trigger_Error_Text");

4
src/base/base.js

@ -6,7 +6,3 @@ BI.Tooltips = new BI.TooltipsController();
BI.Popovers = new BI.FloatBoxController(); BI.Popovers = new BI.FloatBoxController();
BI.Broadcasts = new BI.BroadcastController(); BI.Broadcasts = new BI.BroadcastController();
BI.StyleLoaders = new BI.StyleLoaderManager(); BI.StyleLoaders = new BI.StyleLoaderManager();
BI.servletURL = "dist/";
BI.resourceURL = "dist/resource/";
BI.i18n = {};

176
src/core/base.js

@ -1076,28 +1076,7 @@ if (!window.BI) {
//encode //encode
encodeBIParam(option.data); encodeBIParam(option.data);
var async = true; var async = option.async;
if (BI.isNotNull(option.async)) {
async = option.async;
}
if (BI.isNull(loading)) {
loading = BI.createWidget({
type: "bi.request_loading"
});
}
if (BI.isNull(timeoutToast)) {
timeoutToast = BI.createWidget({
type: "bi.timeout_toast"
});
timeoutToast.setCallback(function (op) {
decodeBIParam(op.data);
BI.ajax(op);
});
}
timeoutToast.addReq(option);
option.data = BI.cjkEncodeDO(option.data); option.data = BI.cjkEncodeDO(option.data);
@ -1107,68 +1086,14 @@ if (!window.BI) {
type: "POST", type: "POST",
data: option.data, data: option.data,
async: async, async: async,
error: function () { error: option.error,
if (!timeoutToast.hasReq(option)) {
return;
}
timeoutToast.removeReq(option);
//失败 取消、重新加载
loading.setCallback(function () {
decodeBIParam(option.data);
BI.ajax(option);
});
loading.showError();
},
complete: function (res, status) { complete: function (res, status) {
if (!timeoutToast.hasReq(option)) {
return;
}
timeoutToast.removeReq(option);
//登录超时
if (BI.isNotNull(res.responseText) &&
res.responseText.indexOf("fs-login-content") > -1 &&
res.responseText.indexOf("fs-login-input-password-confirm") === -1) {
if (BI.Popovers.isVisible(BI.LoginTimeOut.POPOVER_ID)) {
return;
}
if (BI.isNotNull(BI.Popovers.get(BI.LoginTimeOut.POPOVER_ID))) {
BI.Popovers.open(BI.LoginTimeOut.POPOVER_ID);
return;
}
var loginTimeout = BI.createWidget({
type: "bi.login_timeout"
});
loginTimeout.on(BI.LoginTimeOut.EVENT_LOGIN, function () {
decodeBIParam(option.data);
BI.ajax(option);
BI.Popovers.remove(BI.LoginTimeOut.POPOVER_ID);
});
BI.Popovers.create(BI.LoginTimeOut.POPOVER_ID, loginTimeout, {
width: 600,
height: 400
}).open(BI.LoginTimeOut.POPOVER_ID);
} else if (BI.isNotNull(res.responseText) &&
res.responseText.indexOf("script") > -1 &&
res.responseText.indexOf("Session Timeout...") > -1) {
//登录失效
loading.setCallback(function () {
location.reload();
});
loading.showError();
} else if (status === "success" && BI.isFunction(option.success)) {
option.success(BI.jsonDecode(res.responseText));
}
if (BI.isFunction(option.complete)) { if (BI.isFunction(option.complete)) {
option.complete(BI.jsonDecode(res.responseText), status); option.complete(BI.jsonDecode(res.responseText), status);
} }
} }
}); });
return function cancel() {
timeoutToast.removeReq(option);
};
function encodeBIParam(data) { function encodeBIParam(data) {
for (var key in data) { for (var key in data) {
if (_.isObject(data[key])) { if (_.isObject(data[key])) {
@ -1188,101 +1113,6 @@ if (!window.BI) {
} }
} }
} }
})(), })()
/**
* 异步ajax请求
* @param {String} op op参数
* @param {String} cmd cmd参数
* @param {JSON} data ajax请求的参数
* @param {Function} callback 回调函数
* @param {Function} complete 回调
*/
requestAsync: function (op, cmd, data, callback, complete) {
data = data || {};
if (!BI.isKey(op)) {
op = 'fr_bi_dezi';
}
if (op === "fr_bi_dezi" || op === "fr_bi_configure") {
data.sessionID = Data.SharingPool.get("sessionID");
}
var url = BI.servletURL + '?op=' + op + '&cmd=' + cmd + "&_=" + Math.random();
return (BI.ajax)({
url: url,
type: 'POST',
data: data,
error: function () {
// BI.Msg.toast(BI.i18nText("BI-Ajax_Error"));
},
success: function (res) {
if (BI.isFunction(callback)) {
callback(res);
}
},
complete: function (res, status) {
if (BI.isFunction(complete)) {
complete(res);
}
}
});
},
/**
* 同步ajax请求
* @param {String} op op参数
* @param {String} cmd cmd参数
* @param {JSON} data ajax请求的参<EFBFBD>?
* @returns {Object} ajax同步请求返回的JSON对象
*/
requestSync: function (op, cmd, data) {
data = data || {};
if (!BI.isKey(op)) {
op = 'fr_bi_dezi';
}
if (op === "fr_bi_dezi") {
data.sessionID = Data.SharingPool.get("sessionID");
}
var url = BI.servletURL + '?op=' + op + '&cmd=' + cmd + "&_=" + Math.random();
var result = {};
(BI.ajax)({
url: url,
type: 'POST',
async: false,
data: data,
error: function () {
BI.Msg.toast(BI.i18nText("BI-Ajax_Error"));
},
complete: function (res, status) {
if (status === 'success') {
result = res;
}
}
});
return result;
},
/**
* 请求方法
* @param cmd 命令
* @param data 数据
* @param extend 参数
* @returns {*}
*/
request: function (cmd, data, extend) {
extend = extend || {};
data = data || {};
var op = extend.op;
if (!BI.isKey(op)) {
op = 'fr_bi_dezi';
}
if (op === "fr_bi_dezi") {
data.sessionID = Data.SharingPool.get("sessionID");
}
if (extend.async === true) {
BI.requestAsync(op, cmd, data, extend.complete || extend.success);
} else {
return BI.requestSync(op, cmd, data);
}
}
}); });
})(jQuery); })(jQuery);

80
src/core/proto/date.js

@ -1,54 +1,54 @@
// full day names // full day names
Date._DN = [BI.i18nText("BI-Sunday"), Date._DN = [BI.i18nText("BI-Basic_Sunday"),
BI.i18nText("BI-Monday"), BI.i18nText("BI-Basic_Monday"),
BI.i18nText("BI-Tuesday"), BI.i18nText("BI-Basic_Tuesday"),
BI.i18nText("BI-Wednesday"), BI.i18nText("BI-Basic_Wednesday"),
BI.i18nText("BI-Thursday"), BI.i18nText("BI-Basic_Thursday"),
BI.i18nText("BI-Friday"), BI.i18nText("BI-Basic_Friday"),
BI.i18nText("BI-Saturday"), BI.i18nText("BI-Basic_Saturday"),
BI.i18nText("BI-Sunday")]; BI.i18nText("BI-Basic_Sunday")];
// short day names // short day names
Date._SDN = ['', Date._SDN = [BI.i18nText("BI-Day_Ri"),
'', BI.i18nText("BI-Basic_One"),
'', BI.i18nText("BI-Basic_Two"),
'', BI.i18nText("BI-Basic_Three"),
'', BI.i18nText("BI-Basic_Four"),
'', BI.i18nText("BI-Basic_Five"),
'', BI.i18nText("BI-Basic_Six"),
'']; BI.i18nText("BI-Day_Ri")];
// Monday first, etc. // Monday first, etc.
Date._FD = 1; Date._FD = 1;
// full month names // full month names
Date._MN = [ Date._MN = [
'', BI.i18nText("BI-Basic_January"),
'', BI.i18nText("BI-Basic_February"),
'', BI.i18nText("BI-Basic_March"),
'', BI.i18nText("BI-Basic_April"),
'', BI.i18nText("BI-Basic_May"),
'', BI.i18nText("BI-Basic_June"),
'', BI.i18nText("BI-Basic_July"),
'', BI.i18nText("BI-Basic_August"),
'', BI.i18nText("BI-Basic_September"),
'', BI.i18nText("BI-Basic_October"),
'', BI.i18nText("BI-Basic_November"),
'']; BI.i18nText("BI-Basic_December")];
// short month names // short month names
Date._SMN = ['', Date._SMN = [0,
'', 1,
'', 2,
'', 3,
'', 4,
'', 5,
'', 6,
'', 7,
'', 8,
'', 9,
'', 10,
'']; 11];
Date._QN = ["", BI.i18nText("BI-Quarter_1"), Date._QN = ["", BI.i18nText("BI-Quarter_1"),
BI.i18nText("BI-Quarter_2"), BI.i18nText("BI-Quarter_2"),

4
src/css/widget/finetuningnumbereditor/finetuning.number.editor.css

@ -9,8 +9,10 @@
} }
.bi-fine-tuning-number-editor .top-button { .bi-fine-tuning-number-editor .top-button {
border-left: 1px solid #d4dadd; border-left: 1px solid #d4dadd;
border-bottom: 1px solid #d4dadd;
} }
.bi-fine-tuning-number-editor .bottom-button { .bi-fine-tuning-number-editor .bottom-button {
border-left: 1px solid #d4dadd; border-left: 1px solid #d4dadd;
} }
.bi-fine-tuning-number-editor .split-line {
background-color: #d4dadd;
}

4
src/less/widget/finetuningnumbereditor/finetuning.number.editor.less

@ -5,9 +5,11 @@
.border-radius(2px); .border-radius(2px);
& .top-button { & .top-button {
border-left: 1px solid @border-color-normal; border-left: 1px solid @border-color-normal;
border-bottom: 1px solid @border-color-normal;
} }
& .bottom-button { & .bottom-button {
border-left: 1px solid @border-color-normal; border-left: 1px solid @border-color-normal;
} }
& .split-line{
background-color: @border-color-normal;
}
} }

3
src/widget/date/trigger.date.js

@ -3,7 +3,6 @@ BI.DateTrigger = BI.inherit(BI.Trigger, {
hgap: 4, hgap: 4,
vgap: 2, vgap: 2,
triggerWidth: 30, triggerWidth: 30,
watermark: BI.i18nText("BI-Unrestricted"),
yearLength: 4, yearLength: 4,
yearMonthLength: 7 yearMonthLength: 7
}, },
@ -37,7 +36,7 @@ BI.DateTrigger = BI.inherit(BI.Trigger, {
hgap: c.hgap, hgap: c.hgap,
vgap: c.vgap, vgap: c.vgap,
allowBlank: true, allowBlank: true,
watermark: c.watermark, watermark: BI.i18nText("BI-Unrestricted"),
errorText: function () { errorText: function () {
if (self.editor.isEditing()) { if (self.editor.isEditing()) {
return BI.i18nText("BI-Date_Trigger_Error_Text"); return BI.i18nText("BI-Date_Trigger_Error_Text");

Loading…
Cancel
Save