Browse Source

Merge remote-tracking branch 'origin/master'

es6
imp 5 years ago
parent
commit
155eeb14c7
  1. 10
      dist/2.0/fineui.css
  2. 313
      dist/2.0/fineui.ie.js
  3. 69
      dist/2.0/fineui.ie.min.js
  4. 301
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.min.css
  6. 68
      dist/2.0/fineui.min.js
  7. 6
      dist/base.css
  8. 32
      dist/base.js
  9. 10
      dist/bundle.css
  10. 313
      dist/bundle.ie.js
  11. 69
      dist/bundle.ie.min.js
  12. 301
      dist/bundle.js
  13. 2
      dist/bundle.min.css
  14. 68
      dist/bundle.min.js
  15. 136
      dist/case.js
  16. 35
      dist/core.js
  17. 10
      dist/fineui.css
  18. 313
      dist/fineui.ie.js
  19. 68
      dist/fineui.ie.min.js
  20. 301
      dist/fineui.js
  21. 2
      dist/fineui.min.css
  22. 66
      dist/fineui.min.js
  23. 201
      dist/fineui_without_jquery_polyfill.js
  24. 4
      dist/resource.css
  25. 2
      dist/utils.js
  26. 4
      dist/utils.min.js
  27. 98
      dist/widget.js
  28. 3
      src/base/grid/grid.js
  29. 5
      src/base/list/virtuallist.js
  30. 2
      src/base/single/button/button.basic.js
  31. 16
      src/base/single/input/file.js
  32. 21
      src/case/colorchooser/colorchooser.popup.js
  33. 4
      src/case/colorchooser/colorchooser.popup.simple.js
  34. 12
      src/case/combo/bubblecombo/popup.bubble.js
  35. 2
      src/core/platform/web/jquery/_jquery.js
  36. 5
      src/core/utils/prefixIntervalTree.js
  37. 6
      src/css/base/single/button/button.css
  38. 22
      src/css/widget/multilayerselecttree/multilayerselecttree.css
  39. 22
      src/css/widget/multilayersingletree/multilayersingletree.css
  40. 3
      src/less/base/single/button/button.less
  41. 20
      src/less/widget/multilayerselecttree/multilayerselecttree.combo.less
  42. 20
      src/less/widget/multilayersingletree/multilayersingletree.combo.less
  43. 2
      src/widget/multilayersingletree/multilayersingletree.combo.js
  44. 7
      typescript/core/func/array.ts
  45. 108
      typescript/core/func/date.ts
  46. 8
      typescript/core/func/function.ts
  47. 10
      typescript/core/func/index.ts
  48. 8
      typescript/core/func/number.ts
  49. 11
      typescript/core/func/string.ts
  50. 5
      typescript/core/i18n.ts
  51. 42
      typescript/index.ts

10
dist/2.0/fineui.css vendored

@ -2880,6 +2880,12 @@ body .bi-button,
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
} }
body .bi-button.hack,
#body .bi-button.hack {
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
body .bi-button.block, body .bi-button.block,
#body .bi-button.block { #body .bi-button.block {
font-size: inherit; font-size: inherit;
@ -5083,11 +5089,11 @@ textarea::-webkit-scrollbar-thumb:hover {
.dot-e-font:hover .b-font:before, .dot-e-font:hover .b-font:before,
.dot-e-font.hover .b-font:before { .dot-e-font.hover .b-font:before {
content: "\e762"; content: "\e762";
color: rgba(54, 133, 242, 0.06); color: transparent;
} }
.dot-e-font:active .b-font:before { .dot-e-font:active .b-font:before {
content: "\e762"; content: "\e762";
color: #3685f2; color: transparent;
} }
.dot-e-font.active .b-font:before { .dot-e-font.active .b-font:before {
content: "\e762"; content: "\e762";

313
dist/2.0/fineui.ie.js vendored

@ -20478,7 +20478,7 @@ _.extend(BI, {
}; };
}, },
afterFunc: function (func) { afterFunc: function (sFunc, func) {
var __self = sFunc; var __self = sFunc;
return function () { return function () {
var ret = __self.apply(sFunc, arguments); var ret = __self.apply(sFunc, arguments);
@ -22725,7 +22725,7 @@ var
// List of deleted data cache ids, so we can reuse them // List of deleted data cache ids, so we can reuse them
core_deletedIds = [], core_deletedIds = [],
core_version = "1.9.1", core_version = "1.12.4",
// Save a reference to some core methods // Save a reference to some core methods
core_concat = core_deletedIds.concat, core_concat = core_deletedIds.concat,
@ -33732,7 +33732,9 @@ BI.shortcut("bi.inline_vertical_adapt", BI.InlineVerticalAdaptLayout);/**
BI.FlexCenterLayout = BI.inherit(BI.Layout, { BI.FlexCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-center-adapt-layout" baseCls: "bi-flex-center-adapt-layout",
hgap: 0,
vgap: 0
}); });
}, },
render: function () { render: function () {
@ -33743,7 +33745,14 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({
position: "relative",
"flex-shrink": "0",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -33792,8 +33801,6 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -33923,12 +33930,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, hgap: o.hgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -34043,7 +34048,13 @@ BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({
position: "relative",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -34103,8 +34114,6 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -34242,8 +34251,6 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -38505,7 +38512,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), _baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "", value: "",
text: "", text: "",
stopEvent: false, stopEvent: false,
@ -45373,9 +45380,12 @@ BI.Button = BI.inherit(BI.BasicButton, {
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon_label",
cls: o.iconCls,
width: 18, width: 18,
height: o.height - 2 height: o.height - 2,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
@ -45385,14 +45395,9 @@ BI.Button = BI.inherit(BI.BasicButton, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
cls: o.iconCls,
element: this, element: this,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap,
items: [{ items: [{
type: "bi.horizontal", type: "bi.horizontal",
items: [this.icon, this.text] items: [this.icon, this.text]
@ -47667,7 +47672,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var multipart = function (boundary, name, file) { var multipart = function (boundary, name, file) {
return "--".concat( return "--".concat(
boundary, CRLF, boundary, CRLF,
"Content-Disposition: form-data; name=\"", name, "\"; filename=\"", BI.cjkEncode(file.fileName), "\"", CRLF, "Content-Disposition: form-data; name=\"", name, "\"; filename=\"", _global.encodeURIComponent(file.fileName), "\"", CRLF,
"Content-Type: application/octet-stream", CRLF, "Content-Type: application/octet-stream", CRLF,
CRLF, CRLF,
file.getAsBinary(), CRLF, file.getAsBinary(), CRLF,
@ -47756,7 +47761,9 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
switch (xhr.readyState) { switch (xhr.readyState) {
case 2: case 2:
case 3: case 3:
if (rpe.total <= rpe.loaded) {rpe.loaded = rpe.total;} if (rpe.total <= rpe.loaded) {
rpe.loaded = rpe.total;
}
upload.onprogress(rpe); upload.onprogress(rpe);
break; break;
case 4: case 4:
@ -47822,8 +47829,12 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"),
rpe = { rpe = {
loaded: 1, total: 100, simulation: true, interval: setInterval(function () { loaded: 1, total: 100, simulation: true, interval: setInterval(function () {
if (rpe.loaded < rpe.total) {++rpe.loaded;} if (rpe.loaded < rpe.total) {
if (isFunction(handler.onprogress)) {handler.onprogress(rpe, {});} ++rpe.loaded;
}
if (isFunction(handler.onprogress)) {
handler.onprogress(rpe, {});
}
}, 100) }, 100)
}, },
onload = function () { onload = function () {
@ -47840,7 +47851,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
} }
// attachO.fileSize = responseText.length; // attachO.fileSize = responseText.length;
attachO.filename = BI.cjkDecode(handler.file.fileName); attachO.filename = _global.decodeURIComponent(handler.file.fileName);
if (handler.maxlength == 1) { if (handler.maxlength == 1) {
handler.attach_array[0] = attachO; handler.attach_array[0] = attachO;
} else { } else {
@ -49329,7 +49340,7 @@ BI.Toast = BI.inherit(BI.Tip, {
}); });
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY"; BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/** BI.shortcut("bi.toast", BI.Toast);/**
* toast提示 * title提示
* *
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.Tooltip * @class BI.Tooltip
@ -52221,12 +52232,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
} }
}); });
BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-item bi-list-item-active", extraCls: "bi-single-select-item bi-list-item-active",
@ -52978,12 +52984,7 @@ BI.Switch = BI.inherit(BI.BasicButton, {
} }
}); });
BI.Switch.EVENT_CHANGE = "EVENT_CHANGE"; BI.Switch.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.switch", BI.Switch);/** BI.shortcut("bi.switch", BI.Switch);BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-first-tree-leaf-item bi-list-item-active", extraCls: "bi-first-tree-leaf-item bi-list-item-active",
@ -53169,12 +53170,7 @@ BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem
} }
}); });
BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-last-tree-leaf-item bi-list-item-active", extraCls: "bi-last-tree-leaf-item bi-list-item-active",
@ -53273,12 +53269,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-mid-tree-leaf-item bi-list-item-active", extraCls: "bi-mid-tree-leaf-item bi-list-item-active",
@ -54221,16 +54212,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
var fn = function () { var fn = function () {
var color = self.colorPicker.getValue(); var color = self.colorPicker.getValue();
self.trigger.setValue(color); self.trigger.setValue(color);
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
BI.Cache.setItem("colors", BI.array2String(que.toArray()));
}; };
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""));
});
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
@ -54274,13 +54256,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 230, width: 230,
height: 145 height: 145,
simple: false // 简单模式, popup中没有自动和透明
}, },
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value, value: o.value,
cls: "bi-header-background bi-border-bottom", cls: "bi-header-background bi-border-bottom",
height: 30 height: 30
@ -54288,43 +54271,21 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
self.setValue(this.getValue()); self.setValue(this.getValue());
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments);
}); });
this.storeColors = BI.createWidget({ this.storeColors = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right", cls: "bi-border-bottom bi-border-right",
items: [[{ items: [this._digestStoreColors(this._getStoreColors())],
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}]],
width: 210, width: 210,
height: 24, height: 24,
value: o.value value: o.value
}); });
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -54337,6 +54298,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () { this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -54384,6 +54346,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
break; break;
case 1: case 1:
self.setValue(self.customColorChooser.getValue()); self.setValue(self.customColorChooser.getValue());
self._dealStoreColors();
self.more.hideView(); self.more.hideView();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
break; break;
@ -54457,8 +54420,19 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.mask.setVisible(!enable); this.mask.setVisible(!enable);
}, },
setStoreColors: function (colors) { _dealStoreColors: function () {
if (BI.isArray(colors)) { var color = this.getValue();
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
var array = que.toArray();
BI.Cache.setItem("colors", BI.array2String(array));
this.setStoreColors(array);
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) { var items = BI.map(colors, function (i, color) {
return { return {
value: color value: color
@ -54470,7 +54444,24 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -54508,9 +54499,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup", type: "bi.color_chooser_popup",
value: o.value, value: o.value,
element: this, element: this,
editor: { simple: true // 是否有自动
type: "bi.simple_color_picker_editor"
}
}); });
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -55881,9 +55870,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{ buttons: [{
value: BI.i18nText("BI-Basic_Cancel"), value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] }, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
}); });
}, },
_init: function () { _init: function () {
@ -55973,7 +55966,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button", type: "bi.button",
height: 24, height: 24,
handler: function (v) { handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
} }
}, buttonOpt); }, buttonOpt);
@ -56000,7 +55993,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text); this.text.setText(v || this.options.text);
} }
}); });
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView); BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/** /**
* Created by Young's on 2016/4/28. * Created by Young's on 2016/4/28.
@ -56450,7 +56443,12 @@ BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, { BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-icon-text-icon-popup" baseCls: "bi-icon-text-icon-popup",
behaviors: {
redmark: function () {
return true;
}
}
}); });
}, },
@ -56470,11 +56468,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}], }],
behaviors: { behaviors: o.behaviors,
redmark: function () {
return true;
}
},
value: o.value value: o.value
}); });
@ -60072,6 +60066,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
this.options.pages = v; this.options.pages = v;
this.pager.setAllPages(v); this.pager.setAllPages(v);
this.editor.setEnable(v >= 1); this.editor.setEnable(v >= 1);
this.setPagerVisible(v > 1);
}, },
setValue: function (v) { setValue: function (v) {
@ -63772,7 +63767,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls1, cls: o.iconCls1,
width: 36, width: 36,
forceNotSelected: true, disableSelected: true,
selected: this._digest(o.value) selected: this._digest(o.value)
}); });
@ -64142,11 +64137,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE"; BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE"; BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.shortcut("bi.down_list_popup", BI.DownListPopup);/** BI.shortcut("bi.down_list_popup", BI.DownListPopup);!(function () {
* 汇总表格帮助类
* Created by Young's on 2017/1/19.
*/
!(function () {
BI.DynamicDateHelper = {}; BI.DynamicDateHelper = {};
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
@ -68568,7 +68559,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -68664,7 +68656,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* guy * guy
* 二级树 * 二级树
* @class BI.MultiLayerSelectLevelTree * @class BI.MultiLayerSelectLevelTree
* @extends BI.Select * @extends BI.Pane
*/ */
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, { BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
@ -68773,9 +68765,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -68812,8 +68804,12 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -69537,7 +69533,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69741,9 +69738,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -69780,8 +69777,12 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -71031,7 +71032,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -71409,7 +71412,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -71804,7 +71809,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
} }
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -73955,6 +73962,9 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
onClickContinueSelect: function () { onClickContinueSelect: function () {
self.switcher.hideView(); self.switcher.hideView();
}, },
ref: function (_ref) {
self.checkPane = _ref;
},
value: o.value value: o.value
}, o.popup), }, o.popup),
adapter: o.adapter, adapter: o.adapter,
@ -73995,6 +74005,11 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
this.switcher.setValue(v); this.switcher.setValue(v);
}, },
// 与setValue的区别是只更新查看已选面板的的selectedValue, 不会更新按钮的计数
updateSelectedValue: function (v) {
this.checkPane.setValue(v);
},
setButtonChecked: function (v) { setButtonChecked: function (v) {
this.button.setValue(v); this.button.setValue(v);
}, },
@ -80644,12 +80659,7 @@ BI.SingleSelectInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item", extraCls: "bi-single-select-radio-item",
@ -81724,9 +81734,6 @@ BI.SingleSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher); BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher);
/**
* Created by User on 2017/11/16.
*/
BI.SignTextEditor = BI.inherit(BI.Widget, { BI.SignTextEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments);
@ -84806,7 +84813,7 @@ BI.DynamicYearTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP";
BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/** BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/**
* 展示面板 * 展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -85842,7 +85849,7 @@ BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);
/** /**
* 展示面板 * 季度展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -86669,30 +86676,33 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
if (options.keyword) { if (options.keyword) {
keywords.push(options.keyword); keywords.push(options.keyword);
} }
var resultItems = []; var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
resultItems = resultItems.concat(search.match).concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems); resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: items, items: resultItems,
hasNext: false hasNext: false
}); });
} }
@ -86766,7 +86776,7 @@ BI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, {
}); });
BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/** BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值 * 简单的复选面板, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
@ -88025,7 +88035,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
}); });
BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/** BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/**
* 简单的复选下拉树控件, 适用于数据量少的情况 * 简单的树面板, 适用于数据量少的情况
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
* @class BI.TreeValueChooserPane * @class BI.TreeValueChooserPane
@ -88136,29 +88146,34 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
} }
function call (items) { function call (items) {
var keywords = (options.keywords || []).slice(); var keywords = (options.keywords || []).slice();
var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.match.concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: self._getItemsByTimes(items, options.times), items: self._getItemsByTimes(resultItems, options.times),
hasNext: self._hasNextByTimes(items, options.times) hasNext: self._hasNextByTimes(resultItems, options.times)
}); });
} }
} }
@ -88224,7 +88239,7 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {
}); });
BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/** BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 * 简单的复选面板, 适用于数据量少的情况
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
@ -88411,18 +88426,12 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
return needPop; return needPop;
} }
BI.Widget.prototype._init = function () { BI.Widget.prototype._initRender = function () {
BI.Widget.superclass._init.apply(this, arguments);
this._initRoot();
this._initElementWidth();
this._initElementHeight();
this._initVisual();
this._initState();
if (this.beforeInit) { if (this.beforeInit) {
this.__asking = true; this.__asking = true;
this.beforeInit(BI.bind(function () { this.beforeInit(BI.bind(function () {
if (this.model && this.model.$vm) { if (this.model && this.model.$vm) {
this.model.$vm.$digest() this.model.$vm.$digest();
} }
this._render(); this._render();
}, this)); }, this));
@ -88432,7 +88441,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
} else { } else {
this._render(); this._render();
} }
} };
var _init = BI.Widget.prototype._init; var _init = BI.Widget.prototype._init;
BI.Widget.prototype._init = function () { BI.Widget.prototype._init = function () {

69
dist/2.0/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

301
dist/2.0/fineui.js vendored

@ -20478,7 +20478,7 @@ _.extend(BI, {
}; };
}, },
afterFunc: function (func) { afterFunc: function (sFunc, func) {
var __self = sFunc; var __self = sFunc;
return function () { return function () {
var ret = __self.apply(sFunc, arguments); var ret = __self.apply(sFunc, arguments);
@ -22725,7 +22725,7 @@ var
// List of deleted data cache ids, so we can reuse them // List of deleted data cache ids, so we can reuse them
core_deletedIds = [], core_deletedIds = [],
core_version = "1.9.1", core_version = "1.12.4",
// Save a reference to some core methods // Save a reference to some core methods
core_concat = core_deletedIds.concat, core_concat = core_deletedIds.concat,
@ -33732,7 +33732,9 @@ BI.shortcut("bi.inline_vertical_adapt", BI.InlineVerticalAdaptLayout);/**
BI.FlexCenterLayout = BI.inherit(BI.Layout, { BI.FlexCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-center-adapt-layout" baseCls: "bi-flex-center-adapt-layout",
hgap: 0,
vgap: 0
}); });
}, },
render: function () { render: function () {
@ -33743,7 +33745,14 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({
position: "relative",
"flex-shrink": "0",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -33792,8 +33801,6 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -33923,12 +33930,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, hgap: o.hgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -34043,7 +34048,13 @@ BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({
position: "relative",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -34103,8 +34114,6 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -34242,8 +34251,6 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -38909,7 +38916,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), _baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "", value: "",
text: "", text: "",
stopEvent: false, stopEvent: false,
@ -45777,9 +45784,12 @@ BI.Button = BI.inherit(BI.BasicButton, {
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon_label",
cls: o.iconCls,
width: 18, width: 18,
height: o.height - 2 height: o.height - 2,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
@ -45789,14 +45799,9 @@ BI.Button = BI.inherit(BI.BasicButton, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
cls: o.iconCls,
element: this, element: this,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap,
items: [{ items: [{
type: "bi.horizontal", type: "bi.horizontal",
items: [this.icon, this.text] items: [this.icon, this.text]
@ -48071,7 +48076,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var multipart = function (boundary, name, file) { var multipart = function (boundary, name, file) {
return "--".concat( return "--".concat(
boundary, CRLF, boundary, CRLF,
"Content-Disposition: form-data; name=\"", name, "\"; filename=\"", BI.cjkEncode(file.fileName), "\"", CRLF, "Content-Disposition: form-data; name=\"", name, "\"; filename=\"", _global.encodeURIComponent(file.fileName), "\"", CRLF,
"Content-Type: application/octet-stream", CRLF, "Content-Type: application/octet-stream", CRLF,
CRLF, CRLF,
file.getAsBinary(), CRLF, file.getAsBinary(), CRLF,
@ -48160,7 +48165,9 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
switch (xhr.readyState) { switch (xhr.readyState) {
case 2: case 2:
case 3: case 3:
if (rpe.total <= rpe.loaded) {rpe.loaded = rpe.total;} if (rpe.total <= rpe.loaded) {
rpe.loaded = rpe.total;
}
upload.onprogress(rpe); upload.onprogress(rpe);
break; break;
case 4: case 4:
@ -48226,8 +48233,12 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"),
rpe = { rpe = {
loaded: 1, total: 100, simulation: true, interval: setInterval(function () { loaded: 1, total: 100, simulation: true, interval: setInterval(function () {
if (rpe.loaded < rpe.total) {++rpe.loaded;} if (rpe.loaded < rpe.total) {
if (isFunction(handler.onprogress)) {handler.onprogress(rpe, {});} ++rpe.loaded;
}
if (isFunction(handler.onprogress)) {
handler.onprogress(rpe, {});
}
}, 100) }, 100)
}, },
onload = function () { onload = function () {
@ -48244,7 +48255,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
} }
// attachO.fileSize = responseText.length; // attachO.fileSize = responseText.length;
attachO.filename = BI.cjkDecode(handler.file.fileName); attachO.filename = _global.decodeURIComponent(handler.file.fileName);
if (handler.maxlength == 1) { if (handler.maxlength == 1) {
handler.attach_array[0] = attachO; handler.attach_array[0] = attachO;
} else { } else {
@ -49733,7 +49744,7 @@ BI.Toast = BI.inherit(BI.Tip, {
}); });
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY"; BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/** BI.shortcut("bi.toast", BI.Toast);/**
* toast提示 * title提示
* *
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.Tooltip * @class BI.Tooltip
@ -52625,12 +52636,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
} }
}); });
BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-item bi-list-item-active", extraCls: "bi-single-select-item bi-list-item-active",
@ -53382,12 +53388,7 @@ BI.Switch = BI.inherit(BI.BasicButton, {
} }
}); });
BI.Switch.EVENT_CHANGE = "EVENT_CHANGE"; BI.Switch.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.switch", BI.Switch);/** BI.shortcut("bi.switch", BI.Switch);BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-first-tree-leaf-item bi-list-item-active", extraCls: "bi-first-tree-leaf-item bi-list-item-active",
@ -53573,12 +53574,7 @@ BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem
} }
}); });
BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-last-tree-leaf-item bi-list-item-active", extraCls: "bi-last-tree-leaf-item bi-list-item-active",
@ -53677,12 +53673,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-mid-tree-leaf-item bi-list-item-active", extraCls: "bi-mid-tree-leaf-item bi-list-item-active",
@ -54625,16 +54616,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
var fn = function () { var fn = function () {
var color = self.colorPicker.getValue(); var color = self.colorPicker.getValue();
self.trigger.setValue(color); self.trigger.setValue(color);
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
BI.Cache.setItem("colors", BI.array2String(que.toArray()));
}; };
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""));
});
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
@ -54678,13 +54660,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 230, width: 230,
height: 145 height: 145,
simple: false // 简单模式, popup中没有自动和透明
}, },
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value, value: o.value,
cls: "bi-header-background bi-border-bottom", cls: "bi-header-background bi-border-bottom",
height: 30 height: 30
@ -54692,43 +54675,21 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
self.setValue(this.getValue()); self.setValue(this.getValue());
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments);
}); });
this.storeColors = BI.createWidget({ this.storeColors = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right", cls: "bi-border-bottom bi-border-right",
items: [[{ items: [this._digestStoreColors(this._getStoreColors())],
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}]],
width: 210, width: 210,
height: 24, height: 24,
value: o.value value: o.value
}); });
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -54741,6 +54702,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () { this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -54788,6 +54750,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
break; break;
case 1: case 1:
self.setValue(self.customColorChooser.getValue()); self.setValue(self.customColorChooser.getValue());
self._dealStoreColors();
self.more.hideView(); self.more.hideView();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
break; break;
@ -54861,8 +54824,19 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.mask.setVisible(!enable); this.mask.setVisible(!enable);
}, },
setStoreColors: function (colors) { _dealStoreColors: function () {
if (BI.isArray(colors)) { var color = this.getValue();
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
var array = que.toArray();
BI.Cache.setItem("colors", BI.array2String(array));
this.setStoreColors(array);
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) { var items = BI.map(colors, function (i, color) {
return { return {
value: color value: color
@ -54874,7 +54848,24 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -54912,9 +54903,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup", type: "bi.color_chooser_popup",
value: o.value, value: o.value,
element: this, element: this,
editor: { simple: true // 是否有自动
type: "bi.simple_color_picker_editor"
}
}); });
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -56285,9 +56274,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{ buttons: [{
value: BI.i18nText("BI-Basic_Cancel"), value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] }, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
}); });
}, },
_init: function () { _init: function () {
@ -56377,7 +56370,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button", type: "bi.button",
height: 24, height: 24,
handler: function (v) { handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
} }
}, buttonOpt); }, buttonOpt);
@ -56404,7 +56397,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text); this.text.setText(v || this.options.text);
} }
}); });
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView); BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/** /**
* Created by Young's on 2016/4/28. * Created by Young's on 2016/4/28.
@ -56854,7 +56847,12 @@ BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, { BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-icon-text-icon-popup" baseCls: "bi-icon-text-icon-popup",
behaviors: {
redmark: function () {
return true;
}
}
}); });
}, },
@ -56874,11 +56872,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}], }],
behaviors: { behaviors: o.behaviors,
redmark: function () {
return true;
}
},
value: o.value value: o.value
}); });
@ -60476,6 +60470,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
this.options.pages = v; this.options.pages = v;
this.pager.setAllPages(v); this.pager.setAllPages(v);
this.editor.setEnable(v >= 1); this.editor.setEnable(v >= 1);
this.setPagerVisible(v > 1);
}, },
setValue: function (v) { setValue: function (v) {
@ -64176,7 +64171,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls1, cls: o.iconCls1,
width: 36, width: 36,
forceNotSelected: true, disableSelected: true,
selected: this._digest(o.value) selected: this._digest(o.value)
}); });
@ -64546,11 +64541,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE"; BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE"; BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.shortcut("bi.down_list_popup", BI.DownListPopup);/** BI.shortcut("bi.down_list_popup", BI.DownListPopup);!(function () {
* 汇总表格帮助类
* Created by Young's on 2017/1/19.
*/
!(function () {
BI.DynamicDateHelper = {}; BI.DynamicDateHelper = {};
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
@ -68972,7 +68963,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69068,7 +69060,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* guy * guy
* 二级树 * 二级树
* @class BI.MultiLayerSelectLevelTree * @class BI.MultiLayerSelectLevelTree
* @extends BI.Select * @extends BI.Pane
*/ */
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, { BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
@ -69177,9 +69169,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -69216,8 +69208,12 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -69941,7 +69937,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -70145,9 +70142,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -70184,8 +70181,12 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -71435,7 +71436,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -71813,7 +71816,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -72208,7 +72213,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
} }
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -74359,6 +74366,9 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
onClickContinueSelect: function () { onClickContinueSelect: function () {
self.switcher.hideView(); self.switcher.hideView();
}, },
ref: function (_ref) {
self.checkPane = _ref;
},
value: o.value value: o.value
}, o.popup), }, o.popup),
adapter: o.adapter, adapter: o.adapter,
@ -74399,6 +74409,11 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
this.switcher.setValue(v); this.switcher.setValue(v);
}, },
// 与setValue的区别是只更新查看已选面板的的selectedValue, 不会更新按钮的计数
updateSelectedValue: function (v) {
this.checkPane.setValue(v);
},
setButtonChecked: function (v) { setButtonChecked: function (v) {
this.button.setValue(v); this.button.setValue(v);
}, },
@ -81048,12 +81063,7 @@ BI.SingleSelectInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item", extraCls: "bi-single-select-radio-item",
@ -82128,9 +82138,6 @@ BI.SingleSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher); BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher);
/**
* Created by User on 2017/11/16.
*/
BI.SignTextEditor = BI.inherit(BI.Widget, { BI.SignTextEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments);
@ -85210,7 +85217,7 @@ BI.DynamicYearTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP";
BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/** BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/**
* 展示面板 * 展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -86246,7 +86253,7 @@ BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);
/** /**
* 展示面板 * 季度展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -87073,30 +87080,33 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
if (options.keyword) { if (options.keyword) {
keywords.push(options.keyword); keywords.push(options.keyword);
} }
var resultItems = []; var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
resultItems = resultItems.concat(search.match).concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems); resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: items, items: resultItems,
hasNext: false hasNext: false
}); });
} }
@ -87170,7 +87180,7 @@ BI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, {
}); });
BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/** BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值 * 简单的复选面板, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
@ -88429,7 +88439,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
}); });
BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/** BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/**
* 简单的复选下拉树控件, 适用于数据量少的情况 * 简单的树面板, 适用于数据量少的情况
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
* @class BI.TreeValueChooserPane * @class BI.TreeValueChooserPane
@ -88540,29 +88550,34 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
} }
function call (items) { function call (items) {
var keywords = (options.keywords || []).slice(); var keywords = (options.keywords || []).slice();
var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.match.concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: self._getItemsByTimes(items, options.times), items: self._getItemsByTimes(resultItems, options.times),
hasNext: self._hasNextByTimes(items, options.times) hasNext: self._hasNextByTimes(resultItems, options.times)
}); });
} }
} }
@ -88628,7 +88643,7 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {
}); });
BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/** BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 * 简单的复选面板, 适用于数据量少的情况
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.

2
dist/2.0/fineui.min.css vendored

File diff suppressed because one or more lines are too long

68
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

6
dist/base.css vendored

@ -725,6 +725,12 @@ body .bi-button,
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
} }
body .bi-button.hack,
#body .bi-button.hack {
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
body .bi-button.block, body .bi-button.block,
#body .bi-button.block { #body .bi-button.block {
font-size: inherit; font-size: inherit;

32
dist/base.js vendored

@ -684,7 +684,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), _baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "", value: "",
text: "", text: "",
stopEvent: false, stopEvent: false,
@ -7552,9 +7552,12 @@ BI.Button = BI.inherit(BI.BasicButton, {
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon_label",
cls: o.iconCls,
width: 18, width: 18,
height: o.height - 2 height: o.height - 2,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
@ -7564,14 +7567,9 @@ BI.Button = BI.inherit(BI.BasicButton, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
cls: o.iconCls,
element: this, element: this,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap,
items: [{ items: [{
type: "bi.horizontal", type: "bi.horizontal",
items: [this.icon, this.text] items: [this.icon, this.text]
@ -9846,7 +9844,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var multipart = function (boundary, name, file) { var multipart = function (boundary, name, file) {
return "--".concat( return "--".concat(
boundary, CRLF, boundary, CRLF,
"Content-Disposition: form-data; name=\"", name, "\"; filename=\"", BI.cjkEncode(file.fileName), "\"", CRLF, "Content-Disposition: form-data; name=\"", name, "\"; filename=\"", _global.encodeURIComponent(file.fileName), "\"", CRLF,
"Content-Type: application/octet-stream", CRLF, "Content-Type: application/octet-stream", CRLF,
CRLF, CRLF,
file.getAsBinary(), CRLF, file.getAsBinary(), CRLF,
@ -9935,7 +9933,9 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
switch (xhr.readyState) { switch (xhr.readyState) {
case 2: case 2:
case 3: case 3:
if (rpe.total <= rpe.loaded) {rpe.loaded = rpe.total;} if (rpe.total <= rpe.loaded) {
rpe.loaded = rpe.total;
}
upload.onprogress(rpe); upload.onprogress(rpe);
break; break;
case 4: case 4:
@ -10001,8 +10001,12 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"),
rpe = { rpe = {
loaded: 1, total: 100, simulation: true, interval: setInterval(function () { loaded: 1, total: 100, simulation: true, interval: setInterval(function () {
if (rpe.loaded < rpe.total) {++rpe.loaded;} if (rpe.loaded < rpe.total) {
if (isFunction(handler.onprogress)) {handler.onprogress(rpe, {});} ++rpe.loaded;
}
if (isFunction(handler.onprogress)) {
handler.onprogress(rpe, {});
}
}, 100) }, 100)
}, },
onload = function () { onload = function () {
@ -10019,7 +10023,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
} }
// attachO.fileSize = responseText.length; // attachO.fileSize = responseText.length;
attachO.filename = BI.cjkDecode(handler.file.fileName); attachO.filename = _global.decodeURIComponent(handler.file.fileName);
if (handler.maxlength == 1) { if (handler.maxlength == 1) {
handler.attach_array[0] = attachO; handler.attach_array[0] = attachO;
} else { } else {
@ -11508,7 +11512,7 @@ BI.Toast = BI.inherit(BI.Tip, {
}); });
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY"; BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/** BI.shortcut("bi.toast", BI.Toast);/**
* toast提示 * title提示
* *
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.Tooltip * @class BI.Tooltip

10
dist/bundle.css vendored

@ -2880,6 +2880,12 @@ body .bi-button,
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
} }
body .bi-button.hack,
#body .bi-button.hack {
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
body .bi-button.block, body .bi-button.block,
#body .bi-button.block { #body .bi-button.block {
font-size: inherit; font-size: inherit;
@ -5083,11 +5089,11 @@ textarea::-webkit-scrollbar-thumb:hover {
.dot-e-font:hover .b-font:before, .dot-e-font:hover .b-font:before,
.dot-e-font.hover .b-font:before { .dot-e-font.hover .b-font:before {
content: "\e762"; content: "\e762";
color: rgba(54, 133, 242, 0.06); color: transparent;
} }
.dot-e-font:active .b-font:before { .dot-e-font:active .b-font:before {
content: "\e762"; content: "\e762";
color: #3685f2; color: transparent;
} }
.dot-e-font.active .b-font:before { .dot-e-font.active .b-font:before {
content: "\e762"; content: "\e762";

313
dist/bundle.ie.js vendored

@ -20478,7 +20478,7 @@ _.extend(BI, {
}; };
}, },
afterFunc: function (func) { afterFunc: function (sFunc, func) {
var __self = sFunc; var __self = sFunc;
return function () { return function () {
var ret = __self.apply(sFunc, arguments); var ret = __self.apply(sFunc, arguments);
@ -22725,7 +22725,7 @@ var
// List of deleted data cache ids, so we can reuse them // List of deleted data cache ids, so we can reuse them
core_deletedIds = [], core_deletedIds = [],
core_version = "1.9.1", core_version = "1.12.4",
// Save a reference to some core methods // Save a reference to some core methods
core_concat = core_deletedIds.concat, core_concat = core_deletedIds.concat,
@ -33732,7 +33732,9 @@ BI.shortcut("bi.inline_vertical_adapt", BI.InlineVerticalAdaptLayout);/**
BI.FlexCenterLayout = BI.inherit(BI.Layout, { BI.FlexCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-center-adapt-layout" baseCls: "bi-flex-center-adapt-layout",
hgap: 0,
vgap: 0
}); });
}, },
render: function () { render: function () {
@ -33743,7 +33745,14 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({
position: "relative",
"flex-shrink": "0",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -33792,8 +33801,6 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -33923,12 +33930,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, hgap: o.hgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -34043,7 +34048,13 @@ BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({
position: "relative",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -34103,8 +34114,6 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -34242,8 +34251,6 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -38505,7 +38512,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), _baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "", value: "",
text: "", text: "",
stopEvent: false, stopEvent: false,
@ -45373,9 +45380,12 @@ BI.Button = BI.inherit(BI.BasicButton, {
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon_label",
cls: o.iconCls,
width: 18, width: 18,
height: o.height - 2 height: o.height - 2,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
@ -45385,14 +45395,9 @@ BI.Button = BI.inherit(BI.BasicButton, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
cls: o.iconCls,
element: this, element: this,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap,
items: [{ items: [{
type: "bi.horizontal", type: "bi.horizontal",
items: [this.icon, this.text] items: [this.icon, this.text]
@ -47667,7 +47672,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var multipart = function (boundary, name, file) { var multipart = function (boundary, name, file) {
return "--".concat( return "--".concat(
boundary, CRLF, boundary, CRLF,
"Content-Disposition: form-data; name=\"", name, "\"; filename=\"", BI.cjkEncode(file.fileName), "\"", CRLF, "Content-Disposition: form-data; name=\"", name, "\"; filename=\"", _global.encodeURIComponent(file.fileName), "\"", CRLF,
"Content-Type: application/octet-stream", CRLF, "Content-Type: application/octet-stream", CRLF,
CRLF, CRLF,
file.getAsBinary(), CRLF, file.getAsBinary(), CRLF,
@ -47756,7 +47761,9 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
switch (xhr.readyState) { switch (xhr.readyState) {
case 2: case 2:
case 3: case 3:
if (rpe.total <= rpe.loaded) {rpe.loaded = rpe.total;} if (rpe.total <= rpe.loaded) {
rpe.loaded = rpe.total;
}
upload.onprogress(rpe); upload.onprogress(rpe);
break; break;
case 4: case 4:
@ -47822,8 +47829,12 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"),
rpe = { rpe = {
loaded: 1, total: 100, simulation: true, interval: setInterval(function () { loaded: 1, total: 100, simulation: true, interval: setInterval(function () {
if (rpe.loaded < rpe.total) {++rpe.loaded;} if (rpe.loaded < rpe.total) {
if (isFunction(handler.onprogress)) {handler.onprogress(rpe, {});} ++rpe.loaded;
}
if (isFunction(handler.onprogress)) {
handler.onprogress(rpe, {});
}
}, 100) }, 100)
}, },
onload = function () { onload = function () {
@ -47840,7 +47851,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
} }
// attachO.fileSize = responseText.length; // attachO.fileSize = responseText.length;
attachO.filename = BI.cjkDecode(handler.file.fileName); attachO.filename = _global.decodeURIComponent(handler.file.fileName);
if (handler.maxlength == 1) { if (handler.maxlength == 1) {
handler.attach_array[0] = attachO; handler.attach_array[0] = attachO;
} else { } else {
@ -49329,7 +49340,7 @@ BI.Toast = BI.inherit(BI.Tip, {
}); });
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY"; BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/** BI.shortcut("bi.toast", BI.Toast);/**
* toast提示 * title提示
* *
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.Tooltip * @class BI.Tooltip
@ -52221,12 +52232,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
} }
}); });
BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-item bi-list-item-active", extraCls: "bi-single-select-item bi-list-item-active",
@ -52978,12 +52984,7 @@ BI.Switch = BI.inherit(BI.BasicButton, {
} }
}); });
BI.Switch.EVENT_CHANGE = "EVENT_CHANGE"; BI.Switch.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.switch", BI.Switch);/** BI.shortcut("bi.switch", BI.Switch);BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-first-tree-leaf-item bi-list-item-active", extraCls: "bi-first-tree-leaf-item bi-list-item-active",
@ -53169,12 +53170,7 @@ BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem
} }
}); });
BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-last-tree-leaf-item bi-list-item-active", extraCls: "bi-last-tree-leaf-item bi-list-item-active",
@ -53273,12 +53269,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-mid-tree-leaf-item bi-list-item-active", extraCls: "bi-mid-tree-leaf-item bi-list-item-active",
@ -54221,16 +54212,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
var fn = function () { var fn = function () {
var color = self.colorPicker.getValue(); var color = self.colorPicker.getValue();
self.trigger.setValue(color); self.trigger.setValue(color);
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
BI.Cache.setItem("colors", BI.array2String(que.toArray()));
}; };
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""));
});
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
@ -54274,13 +54256,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 230, width: 230,
height: 145 height: 145,
simple: false // 简单模式, popup中没有自动和透明
}, },
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value, value: o.value,
cls: "bi-header-background bi-border-bottom", cls: "bi-header-background bi-border-bottom",
height: 30 height: 30
@ -54288,43 +54271,21 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
self.setValue(this.getValue()); self.setValue(this.getValue());
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments);
}); });
this.storeColors = BI.createWidget({ this.storeColors = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right", cls: "bi-border-bottom bi-border-right",
items: [[{ items: [this._digestStoreColors(this._getStoreColors())],
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}]],
width: 210, width: 210,
height: 24, height: 24,
value: o.value value: o.value
}); });
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -54337,6 +54298,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () { this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -54384,6 +54346,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
break; break;
case 1: case 1:
self.setValue(self.customColorChooser.getValue()); self.setValue(self.customColorChooser.getValue());
self._dealStoreColors();
self.more.hideView(); self.more.hideView();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
break; break;
@ -54457,8 +54420,19 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.mask.setVisible(!enable); this.mask.setVisible(!enable);
}, },
setStoreColors: function (colors) { _dealStoreColors: function () {
if (BI.isArray(colors)) { var color = this.getValue();
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
var array = que.toArray();
BI.Cache.setItem("colors", BI.array2String(array));
this.setStoreColors(array);
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) { var items = BI.map(colors, function (i, color) {
return { return {
value: color value: color
@ -54470,7 +54444,24 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -54508,9 +54499,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup", type: "bi.color_chooser_popup",
value: o.value, value: o.value,
element: this, element: this,
editor: { simple: true // 是否有自动
type: "bi.simple_color_picker_editor"
}
}); });
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -55881,9 +55870,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{ buttons: [{
value: BI.i18nText("BI-Basic_Cancel"), value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] }, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
}); });
}, },
_init: function () { _init: function () {
@ -55973,7 +55966,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button", type: "bi.button",
height: 24, height: 24,
handler: function (v) { handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
} }
}, buttonOpt); }, buttonOpt);
@ -56000,7 +55993,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text); this.text.setText(v || this.options.text);
} }
}); });
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView); BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/** /**
* Created by Young's on 2016/4/28. * Created by Young's on 2016/4/28.
@ -56450,7 +56443,12 @@ BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, { BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-icon-text-icon-popup" baseCls: "bi-icon-text-icon-popup",
behaviors: {
redmark: function () {
return true;
}
}
}); });
}, },
@ -56470,11 +56468,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}], }],
behaviors: { behaviors: o.behaviors,
redmark: function () {
return true;
}
},
value: o.value value: o.value
}); });
@ -60072,6 +60066,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
this.options.pages = v; this.options.pages = v;
this.pager.setAllPages(v); this.pager.setAllPages(v);
this.editor.setEnable(v >= 1); this.editor.setEnable(v >= 1);
this.setPagerVisible(v > 1);
}, },
setValue: function (v) { setValue: function (v) {
@ -63772,7 +63767,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls1, cls: o.iconCls1,
width: 36, width: 36,
forceNotSelected: true, disableSelected: true,
selected: this._digest(o.value) selected: this._digest(o.value)
}); });
@ -64142,11 +64137,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE"; BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE"; BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.shortcut("bi.down_list_popup", BI.DownListPopup);/** BI.shortcut("bi.down_list_popup", BI.DownListPopup);!(function () {
* 汇总表格帮助类
* Created by Young's on 2017/1/19.
*/
!(function () {
BI.DynamicDateHelper = {}; BI.DynamicDateHelper = {};
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
@ -68568,7 +68559,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -68664,7 +68656,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* guy * guy
* 二级树 * 二级树
* @class BI.MultiLayerSelectLevelTree * @class BI.MultiLayerSelectLevelTree
* @extends BI.Select * @extends BI.Pane
*/ */
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, { BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
@ -68773,9 +68765,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -68812,8 +68804,12 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -69537,7 +69533,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69741,9 +69738,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -69780,8 +69777,12 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -71031,7 +71032,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -71409,7 +71412,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -71804,7 +71809,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
} }
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -73955,6 +73962,9 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
onClickContinueSelect: function () { onClickContinueSelect: function () {
self.switcher.hideView(); self.switcher.hideView();
}, },
ref: function (_ref) {
self.checkPane = _ref;
},
value: o.value value: o.value
}, o.popup), }, o.popup),
adapter: o.adapter, adapter: o.adapter,
@ -73995,6 +74005,11 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
this.switcher.setValue(v); this.switcher.setValue(v);
}, },
// 与setValue的区别是只更新查看已选面板的的selectedValue, 不会更新按钮的计数
updateSelectedValue: function (v) {
this.checkPane.setValue(v);
},
setButtonChecked: function (v) { setButtonChecked: function (v) {
this.button.setValue(v); this.button.setValue(v);
}, },
@ -80644,12 +80659,7 @@ BI.SingleSelectInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item", extraCls: "bi-single-select-radio-item",
@ -81724,9 +81734,6 @@ BI.SingleSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher); BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher);
/**
* Created by User on 2017/11/16.
*/
BI.SignTextEditor = BI.inherit(BI.Widget, { BI.SignTextEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments);
@ -84806,7 +84813,7 @@ BI.DynamicYearTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP";
BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/** BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/**
* 展示面板 * 展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -85842,7 +85849,7 @@ BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);
/** /**
* 展示面板 * 季度展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -86669,30 +86676,33 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
if (options.keyword) { if (options.keyword) {
keywords.push(options.keyword); keywords.push(options.keyword);
} }
var resultItems = []; var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
resultItems = resultItems.concat(search.match).concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems); resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: items, items: resultItems,
hasNext: false hasNext: false
}); });
} }
@ -86766,7 +86776,7 @@ BI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, {
}); });
BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/** BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值 * 简单的复选面板, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
@ -88025,7 +88035,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
}); });
BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/** BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/**
* 简单的复选下拉树控件, 适用于数据量少的情况 * 简单的树面板, 适用于数据量少的情况
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
* @class BI.TreeValueChooserPane * @class BI.TreeValueChooserPane
@ -88136,29 +88146,34 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
} }
function call (items) { function call (items) {
var keywords = (options.keywords || []).slice(); var keywords = (options.keywords || []).slice();
var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.match.concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: self._getItemsByTimes(items, options.times), items: self._getItemsByTimes(resultItems, options.times),
hasNext: self._hasNextByTimes(items, options.times) hasNext: self._hasNextByTimes(resultItems, options.times)
}); });
} }
} }
@ -88224,7 +88239,7 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {
}); });
BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/** BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 * 简单的复选面板, 适用于数据量少的情况
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
@ -88411,18 +88426,12 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
return needPop; return needPop;
} }
BI.Widget.prototype._init = function () { BI.Widget.prototype._initRender = function () {
BI.Widget.superclass._init.apply(this, arguments);
this._initRoot();
this._initElementWidth();
this._initElementHeight();
this._initVisual();
this._initState();
if (this.beforeInit) { if (this.beforeInit) {
this.__asking = true; this.__asking = true;
this.beforeInit(BI.bind(function () { this.beforeInit(BI.bind(function () {
if (this.model && this.model.$vm) { if (this.model && this.model.$vm) {
this.model.$vm.$digest() this.model.$vm.$digest();
} }
this._render(); this._render();
}, this)); }, this));
@ -88432,7 +88441,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
} else { } else {
this._render(); this._render();
} }
} };
var _init = BI.Widget.prototype._init; var _init = BI.Widget.prototype._init;
BI.Widget.prototype._init = function () { BI.Widget.prototype._init = function () {

69
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

301
dist/bundle.js vendored

@ -20478,7 +20478,7 @@ _.extend(BI, {
}; };
}, },
afterFunc: function (func) { afterFunc: function (sFunc, func) {
var __self = sFunc; var __self = sFunc;
return function () { return function () {
var ret = __self.apply(sFunc, arguments); var ret = __self.apply(sFunc, arguments);
@ -22725,7 +22725,7 @@ var
// List of deleted data cache ids, so we can reuse them // List of deleted data cache ids, so we can reuse them
core_deletedIds = [], core_deletedIds = [],
core_version = "1.9.1", core_version = "1.12.4",
// Save a reference to some core methods // Save a reference to some core methods
core_concat = core_deletedIds.concat, core_concat = core_deletedIds.concat,
@ -33732,7 +33732,9 @@ BI.shortcut("bi.inline_vertical_adapt", BI.InlineVerticalAdaptLayout);/**
BI.FlexCenterLayout = BI.inherit(BI.Layout, { BI.FlexCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-center-adapt-layout" baseCls: "bi-flex-center-adapt-layout",
hgap: 0,
vgap: 0
}); });
}, },
render: function () { render: function () {
@ -33743,7 +33745,14 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({
position: "relative",
"flex-shrink": "0",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -33792,8 +33801,6 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -33923,12 +33930,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, hgap: o.hgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -34043,7 +34048,13 @@ BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({
position: "relative",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -34103,8 +34114,6 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -34242,8 +34251,6 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -38909,7 +38916,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), _baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "", value: "",
text: "", text: "",
stopEvent: false, stopEvent: false,
@ -45777,9 +45784,12 @@ BI.Button = BI.inherit(BI.BasicButton, {
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon_label",
cls: o.iconCls,
width: 18, width: 18,
height: o.height - 2 height: o.height - 2,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
@ -45789,14 +45799,9 @@ BI.Button = BI.inherit(BI.BasicButton, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
cls: o.iconCls,
element: this, element: this,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap,
items: [{ items: [{
type: "bi.horizontal", type: "bi.horizontal",
items: [this.icon, this.text] items: [this.icon, this.text]
@ -48071,7 +48076,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var multipart = function (boundary, name, file) { var multipart = function (boundary, name, file) {
return "--".concat( return "--".concat(
boundary, CRLF, boundary, CRLF,
"Content-Disposition: form-data; name=\"", name, "\"; filename=\"", BI.cjkEncode(file.fileName), "\"", CRLF, "Content-Disposition: form-data; name=\"", name, "\"; filename=\"", _global.encodeURIComponent(file.fileName), "\"", CRLF,
"Content-Type: application/octet-stream", CRLF, "Content-Type: application/octet-stream", CRLF,
CRLF, CRLF,
file.getAsBinary(), CRLF, file.getAsBinary(), CRLF,
@ -48160,7 +48165,9 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
switch (xhr.readyState) { switch (xhr.readyState) {
case 2: case 2:
case 3: case 3:
if (rpe.total <= rpe.loaded) {rpe.loaded = rpe.total;} if (rpe.total <= rpe.loaded) {
rpe.loaded = rpe.total;
}
upload.onprogress(rpe); upload.onprogress(rpe);
break; break;
case 4: case 4:
@ -48226,8 +48233,12 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"),
rpe = { rpe = {
loaded: 1, total: 100, simulation: true, interval: setInterval(function () { loaded: 1, total: 100, simulation: true, interval: setInterval(function () {
if (rpe.loaded < rpe.total) {++rpe.loaded;} if (rpe.loaded < rpe.total) {
if (isFunction(handler.onprogress)) {handler.onprogress(rpe, {});} ++rpe.loaded;
}
if (isFunction(handler.onprogress)) {
handler.onprogress(rpe, {});
}
}, 100) }, 100)
}, },
onload = function () { onload = function () {
@ -48244,7 +48255,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
} }
// attachO.fileSize = responseText.length; // attachO.fileSize = responseText.length;
attachO.filename = BI.cjkDecode(handler.file.fileName); attachO.filename = _global.decodeURIComponent(handler.file.fileName);
if (handler.maxlength == 1) { if (handler.maxlength == 1) {
handler.attach_array[0] = attachO; handler.attach_array[0] = attachO;
} else { } else {
@ -49733,7 +49744,7 @@ BI.Toast = BI.inherit(BI.Tip, {
}); });
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY"; BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/** BI.shortcut("bi.toast", BI.Toast);/**
* toast提示 * title提示
* *
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.Tooltip * @class BI.Tooltip
@ -52625,12 +52636,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
} }
}); });
BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-item bi-list-item-active", extraCls: "bi-single-select-item bi-list-item-active",
@ -53382,12 +53388,7 @@ BI.Switch = BI.inherit(BI.BasicButton, {
} }
}); });
BI.Switch.EVENT_CHANGE = "EVENT_CHANGE"; BI.Switch.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.switch", BI.Switch);/** BI.shortcut("bi.switch", BI.Switch);BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-first-tree-leaf-item bi-list-item-active", extraCls: "bi-first-tree-leaf-item bi-list-item-active",
@ -53573,12 +53574,7 @@ BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem
} }
}); });
BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-last-tree-leaf-item bi-list-item-active", extraCls: "bi-last-tree-leaf-item bi-list-item-active",
@ -53677,12 +53673,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-mid-tree-leaf-item bi-list-item-active", extraCls: "bi-mid-tree-leaf-item bi-list-item-active",
@ -54625,16 +54616,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
var fn = function () { var fn = function () {
var color = self.colorPicker.getValue(); var color = self.colorPicker.getValue();
self.trigger.setValue(color); self.trigger.setValue(color);
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
BI.Cache.setItem("colors", BI.array2String(que.toArray()));
}; };
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""));
});
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
@ -54678,13 +54660,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 230, width: 230,
height: 145 height: 145,
simple: false // 简单模式, popup中没有自动和透明
}, },
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value, value: o.value,
cls: "bi-header-background bi-border-bottom", cls: "bi-header-background bi-border-bottom",
height: 30 height: 30
@ -54692,43 +54675,21 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
self.setValue(this.getValue()); self.setValue(this.getValue());
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments);
}); });
this.storeColors = BI.createWidget({ this.storeColors = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right", cls: "bi-border-bottom bi-border-right",
items: [[{ items: [this._digestStoreColors(this._getStoreColors())],
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}]],
width: 210, width: 210,
height: 24, height: 24,
value: o.value value: o.value
}); });
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -54741,6 +54702,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () { this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -54788,6 +54750,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
break; break;
case 1: case 1:
self.setValue(self.customColorChooser.getValue()); self.setValue(self.customColorChooser.getValue());
self._dealStoreColors();
self.more.hideView(); self.more.hideView();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
break; break;
@ -54861,8 +54824,19 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.mask.setVisible(!enable); this.mask.setVisible(!enable);
}, },
setStoreColors: function (colors) { _dealStoreColors: function () {
if (BI.isArray(colors)) { var color = this.getValue();
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
var array = que.toArray();
BI.Cache.setItem("colors", BI.array2String(array));
this.setStoreColors(array);
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) { var items = BI.map(colors, function (i, color) {
return { return {
value: color value: color
@ -54874,7 +54848,24 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -54912,9 +54903,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup", type: "bi.color_chooser_popup",
value: o.value, value: o.value,
element: this, element: this,
editor: { simple: true // 是否有自动
type: "bi.simple_color_picker_editor"
}
}); });
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -56285,9 +56274,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{ buttons: [{
value: BI.i18nText("BI-Basic_Cancel"), value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] }, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
}); });
}, },
_init: function () { _init: function () {
@ -56377,7 +56370,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button", type: "bi.button",
height: 24, height: 24,
handler: function (v) { handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
} }
}, buttonOpt); }, buttonOpt);
@ -56404,7 +56397,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text); this.text.setText(v || this.options.text);
} }
}); });
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView); BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/** /**
* Created by Young's on 2016/4/28. * Created by Young's on 2016/4/28.
@ -56854,7 +56847,12 @@ BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, { BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-icon-text-icon-popup" baseCls: "bi-icon-text-icon-popup",
behaviors: {
redmark: function () {
return true;
}
}
}); });
}, },
@ -56874,11 +56872,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}], }],
behaviors: { behaviors: o.behaviors,
redmark: function () {
return true;
}
},
value: o.value value: o.value
}); });
@ -60476,6 +60470,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
this.options.pages = v; this.options.pages = v;
this.pager.setAllPages(v); this.pager.setAllPages(v);
this.editor.setEnable(v >= 1); this.editor.setEnable(v >= 1);
this.setPagerVisible(v > 1);
}, },
setValue: function (v) { setValue: function (v) {
@ -64176,7 +64171,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls1, cls: o.iconCls1,
width: 36, width: 36,
forceNotSelected: true, disableSelected: true,
selected: this._digest(o.value) selected: this._digest(o.value)
}); });
@ -64546,11 +64541,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE"; BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE"; BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.shortcut("bi.down_list_popup", BI.DownListPopup);/** BI.shortcut("bi.down_list_popup", BI.DownListPopup);!(function () {
* 汇总表格帮助类
* Created by Young's on 2017/1/19.
*/
!(function () {
BI.DynamicDateHelper = {}; BI.DynamicDateHelper = {};
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
@ -68972,7 +68963,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69068,7 +69060,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* guy * guy
* 二级树 * 二级树
* @class BI.MultiLayerSelectLevelTree * @class BI.MultiLayerSelectLevelTree
* @extends BI.Select * @extends BI.Pane
*/ */
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, { BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
@ -69177,9 +69169,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -69216,8 +69208,12 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -69941,7 +69937,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -70145,9 +70142,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -70184,8 +70181,12 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -71435,7 +71436,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -71813,7 +71816,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -72208,7 +72213,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
} }
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -74359,6 +74366,9 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
onClickContinueSelect: function () { onClickContinueSelect: function () {
self.switcher.hideView(); self.switcher.hideView();
}, },
ref: function (_ref) {
self.checkPane = _ref;
},
value: o.value value: o.value
}, o.popup), }, o.popup),
adapter: o.adapter, adapter: o.adapter,
@ -74399,6 +74409,11 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
this.switcher.setValue(v); this.switcher.setValue(v);
}, },
// 与setValue的区别是只更新查看已选面板的的selectedValue, 不会更新按钮的计数
updateSelectedValue: function (v) {
this.checkPane.setValue(v);
},
setButtonChecked: function (v) { setButtonChecked: function (v) {
this.button.setValue(v); this.button.setValue(v);
}, },
@ -81048,12 +81063,7 @@ BI.SingleSelectInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item", extraCls: "bi-single-select-radio-item",
@ -82128,9 +82138,6 @@ BI.SingleSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher); BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher);
/**
* Created by User on 2017/11/16.
*/
BI.SignTextEditor = BI.inherit(BI.Widget, { BI.SignTextEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments);
@ -85210,7 +85217,7 @@ BI.DynamicYearTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP";
BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/** BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/**
* 展示面板 * 展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -86246,7 +86253,7 @@ BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);
/** /**
* 展示面板 * 季度展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -87073,30 +87080,33 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
if (options.keyword) { if (options.keyword) {
keywords.push(options.keyword); keywords.push(options.keyword);
} }
var resultItems = []; var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
resultItems = resultItems.concat(search.match).concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems); resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: items, items: resultItems,
hasNext: false hasNext: false
}); });
} }
@ -87170,7 +87180,7 @@ BI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, {
}); });
BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/** BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值 * 简单的复选面板, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
@ -88429,7 +88439,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
}); });
BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/** BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/**
* 简单的复选下拉树控件, 适用于数据量少的情况 * 简单的树面板, 适用于数据量少的情况
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
* @class BI.TreeValueChooserPane * @class BI.TreeValueChooserPane
@ -88540,29 +88550,34 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
} }
function call (items) { function call (items) {
var keywords = (options.keywords || []).slice(); var keywords = (options.keywords || []).slice();
var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.match.concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: self._getItemsByTimes(items, options.times), items: self._getItemsByTimes(resultItems, options.times),
hasNext: self._hasNextByTimes(items, options.times) hasNext: self._hasNextByTimes(resultItems, options.times)
}); });
} }
} }
@ -88628,7 +88643,7 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {
}); });
BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/** BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 * 简单的复选面板, 适用于数据量少的情况
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

68
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

136
dist/case.js vendored

@ -290,12 +290,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
} }
}); });
BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-item bi-list-item-active", extraCls: "bi-single-select-item bi-list-item-active",
@ -1047,12 +1042,7 @@ BI.Switch = BI.inherit(BI.BasicButton, {
} }
}); });
BI.Switch.EVENT_CHANGE = "EVENT_CHANGE"; BI.Switch.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.switch", BI.Switch);/** BI.shortcut("bi.switch", BI.Switch);BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-first-tree-leaf-item bi-list-item-active", extraCls: "bi-first-tree-leaf-item bi-list-item-active",
@ -1238,12 +1228,7 @@ BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem
} }
}); });
BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-last-tree-leaf-item bi-list-item-active", extraCls: "bi-last-tree-leaf-item bi-list-item-active",
@ -1342,12 +1327,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-mid-tree-leaf-item bi-list-item-active", extraCls: "bi-mid-tree-leaf-item bi-list-item-active",
@ -2290,16 +2270,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
var fn = function () { var fn = function () {
var color = self.colorPicker.getValue(); var color = self.colorPicker.getValue();
self.trigger.setValue(color); self.trigger.setValue(color);
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
BI.Cache.setItem("colors", BI.array2String(que.toArray()));
}; };
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""));
});
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
@ -2343,13 +2314,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 230, width: 230,
height: 145 height: 145,
simple: false // 简单模式, popup中没有自动和透明
}, },
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value, value: o.value,
cls: "bi-header-background bi-border-bottom", cls: "bi-header-background bi-border-bottom",
height: 30 height: 30
@ -2357,43 +2329,21 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
self.setValue(this.getValue()); self.setValue(this.getValue());
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments);
}); });
this.storeColors = BI.createWidget({ this.storeColors = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right", cls: "bi-border-bottom bi-border-right",
items: [[{ items: [this._digestStoreColors(this._getStoreColors())],
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}]],
width: 210, width: 210,
height: 24, height: 24,
value: o.value value: o.value
}); });
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -2406,6 +2356,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () { this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -2453,6 +2404,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
break; break;
case 1: case 1:
self.setValue(self.customColorChooser.getValue()); self.setValue(self.customColorChooser.getValue());
self._dealStoreColors();
self.more.hideView(); self.more.hideView();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
break; break;
@ -2526,8 +2478,19 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.mask.setVisible(!enable); this.mask.setVisible(!enable);
}, },
setStoreColors: function (colors) { _dealStoreColors: function () {
if (BI.isArray(colors)) { var color = this.getValue();
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
var array = que.toArray();
BI.Cache.setItem("colors", BI.array2String(array));
this.setStoreColors(array);
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) { var items = BI.map(colors, function (i, color) {
return { return {
value: color value: color
@ -2539,7 +2502,24 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -2577,9 +2557,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup", type: "bi.color_chooser_popup",
value: o.value, value: o.value,
element: this, element: this,
editor: { simple: true // 是否有自动
type: "bi.simple_color_picker_editor"
}
}); });
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -3950,9 +3928,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{ buttons: [{
value: BI.i18nText("BI-Basic_Cancel"), value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] }, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
}); });
}, },
_init: function () { _init: function () {
@ -4042,7 +4024,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button", type: "bi.button",
height: 24, height: 24,
handler: function (v) { handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
} }
}, buttonOpt); }, buttonOpt);
@ -4069,7 +4051,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text); this.text.setText(v || this.options.text);
} }
}); });
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView); BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/** /**
* Created by Young's on 2016/4/28. * Created by Young's on 2016/4/28.
@ -4519,7 +4501,12 @@ BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, { BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-icon-text-icon-popup" baseCls: "bi-icon-text-icon-popup",
behaviors: {
redmark: function () {
return true;
}
}
}); });
}, },
@ -4539,11 +4526,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}], }],
behaviors: { behaviors: o.behaviors,
redmark: function () {
return true;
}
},
value: o.value value: o.value
}); });
@ -8141,6 +8124,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
this.options.pages = v; this.options.pages = v;
this.pager.setAllPages(v); this.pager.setAllPages(v);
this.editor.setEnable(v >= 1); this.editor.setEnable(v >= 1);
this.setPagerVisible(v > 1);
}, },
setValue: function (v) { setValue: function (v) {

35
dist/core.js vendored

@ -20478,7 +20478,7 @@ _.extend(BI, {
}; };
}, },
afterFunc: function (func) { afterFunc: function (sFunc, func) {
var __self = sFunc; var __self = sFunc;
return function () { return function () {
var ret = __self.apply(sFunc, arguments); var ret = __self.apply(sFunc, arguments);
@ -22725,7 +22725,7 @@ var
// List of deleted data cache ids, so we can reuse them // List of deleted data cache ids, so we can reuse them
core_deletedIds = [], core_deletedIds = [],
core_version = "1.9.1", core_version = "1.12.4",
// Save a reference to some core methods // Save a reference to some core methods
core_concat = core_deletedIds.concat, core_concat = core_deletedIds.concat,
@ -33732,7 +33732,9 @@ BI.shortcut("bi.inline_vertical_adapt", BI.InlineVerticalAdaptLayout);/**
BI.FlexCenterLayout = BI.inherit(BI.Layout, { BI.FlexCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-center-adapt-layout" baseCls: "bi-flex-center-adapt-layout",
hgap: 0,
vgap: 0
}); });
}, },
render: function () { render: function () {
@ -33743,7 +33745,14 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({
position: "relative",
"flex-shrink": "0",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -33792,8 +33801,6 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -33923,12 +33930,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, hgap: o.hgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -34043,7 +34048,13 @@ BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({
position: "relative",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -34103,8 +34114,6 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -34242,8 +34251,6 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },

10
dist/fineui.css vendored

@ -2880,6 +2880,12 @@ body .bi-button,
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
} }
body .bi-button.hack,
#body .bi-button.hack {
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
body .bi-button.block, body .bi-button.block,
#body .bi-button.block { #body .bi-button.block {
font-size: inherit; font-size: inherit;
@ -5083,11 +5089,11 @@ textarea::-webkit-scrollbar-thumb:hover {
.dot-e-font:hover .b-font:before, .dot-e-font:hover .b-font:before,
.dot-e-font.hover .b-font:before { .dot-e-font.hover .b-font:before {
content: "\e762"; content: "\e762";
color: rgba(54, 133, 242, 0.06); color: transparent;
} }
.dot-e-font:active .b-font:before { .dot-e-font:active .b-font:before {
content: "\e762"; content: "\e762";
color: #3685f2; color: transparent;
} }
.dot-e-font.active .b-font:before { .dot-e-font.active .b-font:before {
content: "\e762"; content: "\e762";

313
dist/fineui.ie.js vendored

@ -20723,7 +20723,7 @@ _.extend(BI, {
}; };
}, },
afterFunc: function (func) { afterFunc: function (sFunc, func) {
var __self = sFunc; var __self = sFunc;
return function () { return function () {
var ret = __self.apply(sFunc, arguments); var ret = __self.apply(sFunc, arguments);
@ -22970,7 +22970,7 @@ var
// List of deleted data cache ids, so we can reuse them // List of deleted data cache ids, so we can reuse them
core_deletedIds = [], core_deletedIds = [],
core_version = "1.9.1", core_version = "1.12.4",
// Save a reference to some core methods // Save a reference to some core methods
core_concat = core_deletedIds.concat, core_concat = core_deletedIds.concat,
@ -33977,7 +33977,9 @@ BI.shortcut("bi.inline_vertical_adapt", BI.InlineVerticalAdaptLayout);/**
BI.FlexCenterLayout = BI.inherit(BI.Layout, { BI.FlexCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-center-adapt-layout" baseCls: "bi-flex-center-adapt-layout",
hgap: 0,
vgap: 0
}); });
}, },
render: function () { render: function () {
@ -33988,7 +33990,14 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({
position: "relative",
"flex-shrink": "0",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -34037,8 +34046,6 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -34168,12 +34175,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, hgap: o.hgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -34288,7 +34293,13 @@ BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({
position: "relative",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -34348,8 +34359,6 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -34487,8 +34496,6 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -38750,7 +38757,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), _baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "", value: "",
text: "", text: "",
stopEvent: false, stopEvent: false,
@ -45618,9 +45625,12 @@ BI.Button = BI.inherit(BI.BasicButton, {
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon_label",
cls: o.iconCls,
width: 18, width: 18,
height: o.height - 2 height: o.height - 2,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
@ -45630,14 +45640,9 @@ BI.Button = BI.inherit(BI.BasicButton, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
cls: o.iconCls,
element: this, element: this,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap,
items: [{ items: [{
type: "bi.horizontal", type: "bi.horizontal",
items: [this.icon, this.text] items: [this.icon, this.text]
@ -47912,7 +47917,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var multipart = function (boundary, name, file) { var multipart = function (boundary, name, file) {
return "--".concat( return "--".concat(
boundary, CRLF, boundary, CRLF,
"Content-Disposition: form-data; name=\"", name, "\"; filename=\"", BI.cjkEncode(file.fileName), "\"", CRLF, "Content-Disposition: form-data; name=\"", name, "\"; filename=\"", _global.encodeURIComponent(file.fileName), "\"", CRLF,
"Content-Type: application/octet-stream", CRLF, "Content-Type: application/octet-stream", CRLF,
CRLF, CRLF,
file.getAsBinary(), CRLF, file.getAsBinary(), CRLF,
@ -48001,7 +48006,9 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
switch (xhr.readyState) { switch (xhr.readyState) {
case 2: case 2:
case 3: case 3:
if (rpe.total <= rpe.loaded) {rpe.loaded = rpe.total;} if (rpe.total <= rpe.loaded) {
rpe.loaded = rpe.total;
}
upload.onprogress(rpe); upload.onprogress(rpe);
break; break;
case 4: case 4:
@ -48067,8 +48074,12 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"),
rpe = { rpe = {
loaded: 1, total: 100, simulation: true, interval: setInterval(function () { loaded: 1, total: 100, simulation: true, interval: setInterval(function () {
if (rpe.loaded < rpe.total) {++rpe.loaded;} if (rpe.loaded < rpe.total) {
if (isFunction(handler.onprogress)) {handler.onprogress(rpe, {});} ++rpe.loaded;
}
if (isFunction(handler.onprogress)) {
handler.onprogress(rpe, {});
}
}, 100) }, 100)
}, },
onload = function () { onload = function () {
@ -48085,7 +48096,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
} }
// attachO.fileSize = responseText.length; // attachO.fileSize = responseText.length;
attachO.filename = BI.cjkDecode(handler.file.fileName); attachO.filename = _global.decodeURIComponent(handler.file.fileName);
if (handler.maxlength == 1) { if (handler.maxlength == 1) {
handler.attach_array[0] = attachO; handler.attach_array[0] = attachO;
} else { } else {
@ -49574,7 +49585,7 @@ BI.Toast = BI.inherit(BI.Tip, {
}); });
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY"; BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/** BI.shortcut("bi.toast", BI.Toast);/**
* toast提示 * title提示
* *
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.Tooltip * @class BI.Tooltip
@ -52466,12 +52477,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
} }
}); });
BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-item bi-list-item-active", extraCls: "bi-single-select-item bi-list-item-active",
@ -53223,12 +53229,7 @@ BI.Switch = BI.inherit(BI.BasicButton, {
} }
}); });
BI.Switch.EVENT_CHANGE = "EVENT_CHANGE"; BI.Switch.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.switch", BI.Switch);/** BI.shortcut("bi.switch", BI.Switch);BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-first-tree-leaf-item bi-list-item-active", extraCls: "bi-first-tree-leaf-item bi-list-item-active",
@ -53414,12 +53415,7 @@ BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem
} }
}); });
BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-last-tree-leaf-item bi-list-item-active", extraCls: "bi-last-tree-leaf-item bi-list-item-active",
@ -53518,12 +53514,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-mid-tree-leaf-item bi-list-item-active", extraCls: "bi-mid-tree-leaf-item bi-list-item-active",
@ -54466,16 +54457,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
var fn = function () { var fn = function () {
var color = self.colorPicker.getValue(); var color = self.colorPicker.getValue();
self.trigger.setValue(color); self.trigger.setValue(color);
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
BI.Cache.setItem("colors", BI.array2String(que.toArray()));
}; };
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""));
});
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
@ -54519,13 +54501,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 230, width: 230,
height: 145 height: 145,
simple: false // 简单模式, popup中没有自动和透明
}, },
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value, value: o.value,
cls: "bi-header-background bi-border-bottom", cls: "bi-header-background bi-border-bottom",
height: 30 height: 30
@ -54533,43 +54516,21 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
self.setValue(this.getValue()); self.setValue(this.getValue());
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments);
}); });
this.storeColors = BI.createWidget({ this.storeColors = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right", cls: "bi-border-bottom bi-border-right",
items: [[{ items: [this._digestStoreColors(this._getStoreColors())],
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}]],
width: 210, width: 210,
height: 24, height: 24,
value: o.value value: o.value
}); });
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -54582,6 +54543,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () { this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -54629,6 +54591,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
break; break;
case 1: case 1:
self.setValue(self.customColorChooser.getValue()); self.setValue(self.customColorChooser.getValue());
self._dealStoreColors();
self.more.hideView(); self.more.hideView();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
break; break;
@ -54702,8 +54665,19 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.mask.setVisible(!enable); this.mask.setVisible(!enable);
}, },
setStoreColors: function (colors) { _dealStoreColors: function () {
if (BI.isArray(colors)) { var color = this.getValue();
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
var array = que.toArray();
BI.Cache.setItem("colors", BI.array2String(array));
this.setStoreColors(array);
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) { var items = BI.map(colors, function (i, color) {
return { return {
value: color value: color
@ -54715,7 +54689,24 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -54753,9 +54744,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup", type: "bi.color_chooser_popup",
value: o.value, value: o.value,
element: this, element: this,
editor: { simple: true // 是否有自动
type: "bi.simple_color_picker_editor"
}
}); });
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -56126,9 +56115,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{ buttons: [{
value: BI.i18nText("BI-Basic_Cancel"), value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] }, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
}); });
}, },
_init: function () { _init: function () {
@ -56218,7 +56211,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button", type: "bi.button",
height: 24, height: 24,
handler: function (v) { handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
} }
}, buttonOpt); }, buttonOpt);
@ -56245,7 +56238,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text); this.text.setText(v || this.options.text);
} }
}); });
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView); BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/** /**
* Created by Young's on 2016/4/28. * Created by Young's on 2016/4/28.
@ -56695,7 +56688,12 @@ BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, { BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-icon-text-icon-popup" baseCls: "bi-icon-text-icon-popup",
behaviors: {
redmark: function () {
return true;
}
}
}); });
}, },
@ -56715,11 +56713,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}], }],
behaviors: { behaviors: o.behaviors,
redmark: function () {
return true;
}
},
value: o.value value: o.value
}); });
@ -60317,6 +60311,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
this.options.pages = v; this.options.pages = v;
this.pager.setAllPages(v); this.pager.setAllPages(v);
this.editor.setEnable(v >= 1); this.editor.setEnable(v >= 1);
this.setPagerVisible(v > 1);
}, },
setValue: function (v) { setValue: function (v) {
@ -64017,7 +64012,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls1, cls: o.iconCls1,
width: 36, width: 36,
forceNotSelected: true, disableSelected: true,
selected: this._digest(o.value) selected: this._digest(o.value)
}); });
@ -64387,11 +64382,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE"; BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE"; BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.shortcut("bi.down_list_popup", BI.DownListPopup);/** BI.shortcut("bi.down_list_popup", BI.DownListPopup);!(function () {
* 汇总表格帮助类
* Created by Young's on 2017/1/19.
*/
!(function () {
BI.DynamicDateHelper = {}; BI.DynamicDateHelper = {};
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
@ -68813,7 +68804,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -68909,7 +68901,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* guy * guy
* 二级树 * 二级树
* @class BI.MultiLayerSelectLevelTree * @class BI.MultiLayerSelectLevelTree
* @extends BI.Select * @extends BI.Pane
*/ */
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, { BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
@ -69018,9 +69010,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -69057,8 +69049,12 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -69782,7 +69778,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69986,9 +69983,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -70025,8 +70022,12 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -71276,7 +71277,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -71654,7 +71657,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -72049,7 +72054,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
} }
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -74200,6 +74207,9 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
onClickContinueSelect: function () { onClickContinueSelect: function () {
self.switcher.hideView(); self.switcher.hideView();
}, },
ref: function (_ref) {
self.checkPane = _ref;
},
value: o.value value: o.value
}, o.popup), }, o.popup),
adapter: o.adapter, adapter: o.adapter,
@ -74240,6 +74250,11 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
this.switcher.setValue(v); this.switcher.setValue(v);
}, },
// 与setValue的区别是只更新查看已选面板的的selectedValue, 不会更新按钮的计数
updateSelectedValue: function (v) {
this.checkPane.setValue(v);
},
setButtonChecked: function (v) { setButtonChecked: function (v) {
this.button.setValue(v); this.button.setValue(v);
}, },
@ -80889,12 +80904,7 @@ BI.SingleSelectInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item", extraCls: "bi-single-select-radio-item",
@ -81969,9 +81979,6 @@ BI.SingleSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher); BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher);
/**
* Created by User on 2017/11/16.
*/
BI.SignTextEditor = BI.inherit(BI.Widget, { BI.SignTextEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments);
@ -85051,7 +85058,7 @@ BI.DynamicYearTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP";
BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/** BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/**
* 展示面板 * 展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -86087,7 +86094,7 @@ BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);
/** /**
* 展示面板 * 季度展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -86914,30 +86921,33 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
if (options.keyword) { if (options.keyword) {
keywords.push(options.keyword); keywords.push(options.keyword);
} }
var resultItems = []; var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
resultItems = resultItems.concat(search.match).concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems); resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: items, items: resultItems,
hasNext: false hasNext: false
}); });
} }
@ -87011,7 +87021,7 @@ BI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, {
}); });
BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/** BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值 * 简单的复选面板, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
@ -88270,7 +88280,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
}); });
BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/** BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/**
* 简单的复选下拉树控件, 适用于数据量少的情况 * 简单的树面板, 适用于数据量少的情况
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
* @class BI.TreeValueChooserPane * @class BI.TreeValueChooserPane
@ -88381,29 +88391,34 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
} }
function call (items) { function call (items) {
var keywords = (options.keywords || []).slice(); var keywords = (options.keywords || []).slice();
var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.match.concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: self._getItemsByTimes(items, options.times), items: self._getItemsByTimes(resultItems, options.times),
hasNext: self._hasNextByTimes(items, options.times) hasNext: self._hasNextByTimes(resultItems, options.times)
}); });
} }
} }
@ -88469,7 +88484,7 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {
}); });
BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/** BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 * 简单的复选面板, 适用于数据量少的情况
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
@ -89240,18 +89255,12 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
return needPop; return needPop;
} }
BI.Widget.prototype._init = function () { BI.Widget.prototype._initRender = function () {
BI.Widget.superclass._init.apply(this, arguments);
this._initRoot();
this._initElementWidth();
this._initElementHeight();
this._initVisual();
this._initState();
if (this.beforeInit) { if (this.beforeInit) {
this.__asking = true; this.__asking = true;
this.beforeInit(BI.bind(function () { this.beforeInit(BI.bind(function () {
if (this.model && this.model.$vm) { if (this.model && this.model.$vm) {
this.model.$vm.$digest() this.model.$vm.$digest();
} }
this._render(); this._render();
}, this)); }, this));
@ -89261,7 +89270,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);(function () {
} else { } else {
this._render(); this._render();
} }
} };
var _init = BI.Widget.prototype._init; var _init = BI.Widget.prototype._init;
BI.Widget.prototype._init = function () { BI.Widget.prototype._init = function () {

68
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

301
dist/fineui.js vendored

@ -20723,7 +20723,7 @@ _.extend(BI, {
}; };
}, },
afterFunc: function (func) { afterFunc: function (sFunc, func) {
var __self = sFunc; var __self = sFunc;
return function () { return function () {
var ret = __self.apply(sFunc, arguments); var ret = __self.apply(sFunc, arguments);
@ -22970,7 +22970,7 @@ var
// List of deleted data cache ids, so we can reuse them // List of deleted data cache ids, so we can reuse them
core_deletedIds = [], core_deletedIds = [],
core_version = "1.9.1", core_version = "1.12.4",
// Save a reference to some core methods // Save a reference to some core methods
core_concat = core_deletedIds.concat, core_concat = core_deletedIds.concat,
@ -33977,7 +33977,9 @@ BI.shortcut("bi.inline_vertical_adapt", BI.InlineVerticalAdaptLayout);/**
BI.FlexCenterLayout = BI.inherit(BI.Layout, { BI.FlexCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-center-adapt-layout" baseCls: "bi-flex-center-adapt-layout",
hgap: 0,
vgap: 0
}); });
}, },
render: function () { render: function () {
@ -33988,7 +33990,14 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({
position: "relative",
"flex-shrink": "0",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -34037,8 +34046,6 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -34168,12 +34175,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, hgap: o.hgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -34288,7 +34293,13 @@ BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({
position: "relative",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -34348,8 +34359,6 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -34487,8 +34496,6 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -39154,7 +39161,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), _baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "", value: "",
text: "", text: "",
stopEvent: false, stopEvent: false,
@ -46022,9 +46029,12 @@ BI.Button = BI.inherit(BI.BasicButton, {
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon_label",
cls: o.iconCls,
width: 18, width: 18,
height: o.height - 2 height: o.height - 2,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
@ -46034,14 +46044,9 @@ BI.Button = BI.inherit(BI.BasicButton, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
cls: o.iconCls,
element: this, element: this,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap,
items: [{ items: [{
type: "bi.horizontal", type: "bi.horizontal",
items: [this.icon, this.text] items: [this.icon, this.text]
@ -48316,7 +48321,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var multipart = function (boundary, name, file) { var multipart = function (boundary, name, file) {
return "--".concat( return "--".concat(
boundary, CRLF, boundary, CRLF,
"Content-Disposition: form-data; name=\"", name, "\"; filename=\"", BI.cjkEncode(file.fileName), "\"", CRLF, "Content-Disposition: form-data; name=\"", name, "\"; filename=\"", _global.encodeURIComponent(file.fileName), "\"", CRLF,
"Content-Type: application/octet-stream", CRLF, "Content-Type: application/octet-stream", CRLF,
CRLF, CRLF,
file.getAsBinary(), CRLF, file.getAsBinary(), CRLF,
@ -48405,7 +48410,9 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
switch (xhr.readyState) { switch (xhr.readyState) {
case 2: case 2:
case 3: case 3:
if (rpe.total <= rpe.loaded) {rpe.loaded = rpe.total;} if (rpe.total <= rpe.loaded) {
rpe.loaded = rpe.total;
}
upload.onprogress(rpe); upload.onprogress(rpe);
break; break;
case 4: case 4:
@ -48471,8 +48478,12 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"),
rpe = { rpe = {
loaded: 1, total: 100, simulation: true, interval: setInterval(function () { loaded: 1, total: 100, simulation: true, interval: setInterval(function () {
if (rpe.loaded < rpe.total) {++rpe.loaded;} if (rpe.loaded < rpe.total) {
if (isFunction(handler.onprogress)) {handler.onprogress(rpe, {});} ++rpe.loaded;
}
if (isFunction(handler.onprogress)) {
handler.onprogress(rpe, {});
}
}, 100) }, 100)
}, },
onload = function () { onload = function () {
@ -48489,7 +48500,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
} }
// attachO.fileSize = responseText.length; // attachO.fileSize = responseText.length;
attachO.filename = BI.cjkDecode(handler.file.fileName); attachO.filename = _global.decodeURIComponent(handler.file.fileName);
if (handler.maxlength == 1) { if (handler.maxlength == 1) {
handler.attach_array[0] = attachO; handler.attach_array[0] = attachO;
} else { } else {
@ -49978,7 +49989,7 @@ BI.Toast = BI.inherit(BI.Tip, {
}); });
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY"; BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/** BI.shortcut("bi.toast", BI.Toast);/**
* toast提示 * title提示
* *
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.Tooltip * @class BI.Tooltip
@ -52870,12 +52881,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
} }
}); });
BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-item bi-list-item-active", extraCls: "bi-single-select-item bi-list-item-active",
@ -53627,12 +53633,7 @@ BI.Switch = BI.inherit(BI.BasicButton, {
} }
}); });
BI.Switch.EVENT_CHANGE = "EVENT_CHANGE"; BI.Switch.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.switch", BI.Switch);/** BI.shortcut("bi.switch", BI.Switch);BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-first-tree-leaf-item bi-list-item-active", extraCls: "bi-first-tree-leaf-item bi-list-item-active",
@ -53818,12 +53819,7 @@ BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem
} }
}); });
BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-last-tree-leaf-item bi-list-item-active", extraCls: "bi-last-tree-leaf-item bi-list-item-active",
@ -53922,12 +53918,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-mid-tree-leaf-item bi-list-item-active", extraCls: "bi-mid-tree-leaf-item bi-list-item-active",
@ -54870,16 +54861,7 @@ BI.ColorChooser = BI.inherit(BI.Widget, {
var fn = function () { var fn = function () {
var color = self.colorPicker.getValue(); var color = self.colorPicker.getValue();
self.trigger.setValue(color); self.trigger.setValue(color);
var colors = BI.string2Array(BI.Cache.getItem("colors") || "");
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
BI.Cache.setItem("colors", BI.array2String(que.toArray()));
}; };
this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {
self.colorPicker.setStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""));
});
this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () { this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {
self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);
@ -54923,13 +54905,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 230, width: 230,
height: 145 height: 145,
simple: false // 简单模式, popup中没有自动和透明
}, },
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value, value: o.value,
cls: "bi-header-background bi-border-bottom", cls: "bi-header-background bi-border-bottom",
height: 30 height: 30
@ -54937,43 +54920,21 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () { this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {
self.setValue(this.getValue()); self.setValue(this.getValue());
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments);
}); });
this.storeColors = BI.createWidget({ this.storeColors = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right", cls: "bi-border-bottom bi-border-right",
items: [[{ items: [this._digestStoreColors(this._getStoreColors())],
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}, {
value: "",
disabled: true
}]],
width: 210, width: 210,
height: 24, height: 24,
value: o.value value: o.value
}); });
this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () { this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -54986,6 +54947,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () { this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {
self.setValue(this.getValue()[0]); self.setValue(this.getValue()[0]);
self._dealStoreColors();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
}); });
@ -55033,6 +54995,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
break; break;
case 1: case 1:
self.setValue(self.customColorChooser.getValue()); self.setValue(self.customColorChooser.getValue());
self._dealStoreColors();
self.more.hideView(); self.more.hideView();
self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);
break; break;
@ -55106,8 +55069,19 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.mask.setVisible(!enable); this.mask.setVisible(!enable);
}, },
setStoreColors: function (colors) { _dealStoreColors: function () {
if (BI.isArray(colors)) { var color = this.getValue();
var colors = this._getStoreColors();
var que = new BI.Queue(8);
que.fromArray(colors);
que.remove(color);
que.unshift(color);
var array = que.toArray();
BI.Cache.setItem("colors", BI.array2String(array));
this.setStoreColors(array);
},
_digestStoreColors: function (colors) {
var items = BI.map(colors, function (i, color) { var items = BI.map(colors, function (i, color) {
return { return {
value: color value: color
@ -55119,7 +55093,24 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -55157,9 +55148,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup", type: "bi.color_chooser_popup",
value: o.value, value: o.value,
element: this, element: this,
editor: { simple: true // 是否有自动
type: "bi.simple_color_picker_editor"
}
}); });
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);
@ -56530,9 +56519,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{ buttons: [{
value: BI.i18nText("BI-Basic_Cancel"), value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] }, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
}); });
}, },
_init: function () { _init: function () {
@ -56622,7 +56615,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button", type: "bi.button",
height: 24, height: 24,
handler: function (v) { handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
} }
}, buttonOpt); }, buttonOpt);
@ -56649,7 +56642,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text); this.text.setText(v || this.options.text);
} }
}); });
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView); BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/** /**
* Created by Young's on 2016/4/28. * Created by Young's on 2016/4/28.
@ -57099,7 +57092,12 @@ BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, { BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-icon-text-icon-popup" baseCls: "bi-icon-text-icon-popup",
behaviors: {
redmark: function () {
return true;
}
}
}); });
}, },
@ -57119,11 +57117,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}], }],
behaviors: { behaviors: o.behaviors,
redmark: function () {
return true;
}
},
value: o.value value: o.value
}); });
@ -60721,6 +60715,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
this.options.pages = v; this.options.pages = v;
this.pager.setAllPages(v); this.pager.setAllPages(v);
this.editor.setEnable(v >= 1); this.editor.setEnable(v >= 1);
this.setPagerVisible(v > 1);
}, },
setValue: function (v) { setValue: function (v) {
@ -64421,7 +64416,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls1, cls: o.iconCls1,
width: 36, width: 36,
forceNotSelected: true, disableSelected: true,
selected: this._digest(o.value) selected: this._digest(o.value)
}); });
@ -64791,11 +64786,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE"; BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE"; BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.shortcut("bi.down_list_popup", BI.DownListPopup);/** BI.shortcut("bi.down_list_popup", BI.DownListPopup);!(function () {
* 汇总表格帮助类
* Created by Young's on 2017/1/19.
*/
!(function () {
BI.DynamicDateHelper = {}; BI.DynamicDateHelper = {};
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
@ -69217,7 +69208,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69313,7 +69305,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* guy * guy
* 二级树 * 二级树
* @class BI.MultiLayerSelectLevelTree * @class BI.MultiLayerSelectLevelTree
* @extends BI.Select * @extends BI.Pane
*/ */
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, { BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
@ -69422,9 +69414,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -69461,8 +69453,12 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -70186,7 +70182,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -70390,9 +70387,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -70429,8 +70426,12 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -71680,7 +71681,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -72058,7 +72061,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -72453,7 +72458,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
} }
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -74604,6 +74611,9 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
onClickContinueSelect: function () { onClickContinueSelect: function () {
self.switcher.hideView(); self.switcher.hideView();
}, },
ref: function (_ref) {
self.checkPane = _ref;
},
value: o.value value: o.value
}, o.popup), }, o.popup),
adapter: o.adapter, adapter: o.adapter,
@ -74644,6 +74654,11 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
this.switcher.setValue(v); this.switcher.setValue(v);
}, },
// 与setValue的区别是只更新查看已选面板的的selectedValue, 不会更新按钮的计数
updateSelectedValue: function (v) {
this.checkPane.setValue(v);
},
setButtonChecked: function (v) { setButtonChecked: function (v) {
this.button.setValue(v); this.button.setValue(v);
}, },
@ -81293,12 +81308,7 @@ BI.SingleSelectInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item", extraCls: "bi-single-select-radio-item",
@ -82373,9 +82383,6 @@ BI.SingleSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher); BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher);
/**
* Created by User on 2017/11/16.
*/
BI.SignTextEditor = BI.inherit(BI.Widget, { BI.SignTextEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments);
@ -85455,7 +85462,7 @@ BI.DynamicYearTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP";
BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/** BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/**
* 展示面板 * 展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -86491,7 +86498,7 @@ BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);
/** /**
* 展示面板 * 季度展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -87318,30 +87325,33 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
if (options.keyword) { if (options.keyword) {
keywords.push(options.keyword); keywords.push(options.keyword);
} }
var resultItems = []; var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
resultItems = resultItems.concat(search.match).concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems); resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: items, items: resultItems,
hasNext: false hasNext: false
}); });
} }
@ -87415,7 +87425,7 @@ BI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, {
}); });
BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/** BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值 * 简单的复选面板, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
@ -88674,7 +88684,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
}); });
BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/** BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/**
* 简单的复选下拉树控件, 适用于数据量少的情况 * 简单的树面板, 适用于数据量少的情况
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
* @class BI.TreeValueChooserPane * @class BI.TreeValueChooserPane
@ -88785,29 +88795,34 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
} }
function call (items) { function call (items) {
var keywords = (options.keywords || []).slice(); var keywords = (options.keywords || []).slice();
var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.match.concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: self._getItemsByTimes(items, options.times), items: self._getItemsByTimes(resultItems, options.times),
hasNext: self._hasNextByTimes(items, options.times) hasNext: self._hasNextByTimes(resultItems, options.times)
}); });
} }
} }
@ -88873,7 +88888,7 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {
}); });
BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/** BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 * 简单的复选面板, 适用于数据量少的情况
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

66
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

201
dist/fineui_without_jquery_polyfill.js vendored

@ -20224,7 +20224,7 @@ _.extend(BI, {
}; };
}, },
afterFunc: function (func) { afterFunc: function (sFunc, func) {
var __self = sFunc; var __self = sFunc;
return function () { return function () {
var ret = __self.apply(sFunc, arguments); var ret = __self.apply(sFunc, arguments);
@ -22556,7 +22556,9 @@ BI.shortcut("bi.inline_vertical_adapt", BI.InlineVerticalAdaptLayout);/**
BI.FlexCenterLayout = BI.inherit(BI.Layout, { BI.FlexCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-flex-center-adapt-layout" baseCls: "bi-flex-center-adapt-layout",
hgap: 0,
vgap: 0
}); });
}, },
render: function () { render: function () {
@ -22567,7 +22569,14 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative", "flex-shrink": "0"}); w.element.css({
position: "relative",
"flex-shrink": "0",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -22616,8 +22625,6 @@ BI.FlexHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -22747,12 +22754,10 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
scrollx: o.scrollx, scrollx: o.scrollx,
scrolly: o.scrolly, scrolly: o.scrolly,
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap, hgap: o.hgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -22867,7 +22872,13 @@ BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
_addElement: function (i, item) { _addElement: function (i, item) {
var o = this.options; var o = this.options;
var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments); var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments);
w.element.css({position: "relative"}); w.element.css({
position: "relative",
"margin-left": (i === 0 ? o.hgap : 0) + "px",
"margin-right": o.hgap + "px",
"margin-top": o.vgap + "px",
"margin-bottom": o.vgap + "px"
});
return w; return w;
}, },
@ -22927,8 +22938,6 @@ BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
scrollable: o.scrollable, scrollable: o.scrollable,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap,
rgap: o.rgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap, bgap: o.bgap,
items: o.items items: o.items
@ -23066,8 +23075,6 @@ BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
vgap: o.vgap, vgap: o.vgap,
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap, rgap: o.rgap,
tgap: o.tgap,
bgap: o.bgap,
items: o.items items: o.items
}; };
}, },
@ -27532,7 +27539,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), _baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "", value: "",
text: "", text: "",
stopEvent: false, stopEvent: false,
@ -33142,9 +33149,12 @@ BI.Button = BI.inherit(BI.BasicButton, {
} }
if (BI.isKey(o.iconCls)) { if (BI.isKey(o.iconCls)) {
this.icon = BI.createWidget({ this.icon = BI.createWidget({
type: "bi.icon", type: "bi.icon_label",
cls: o.iconCls,
width: 18, width: 18,
height: o.height - 2 height: o.height - 2,
iconWidth: o.iconWidth,
iconHeight: o.iconHeight
}); });
this.text = BI.createWidget({ this.text = BI.createWidget({
type: "bi.label", type: "bi.label",
@ -33154,14 +33164,9 @@ BI.Button = BI.inherit(BI.BasicButton, {
}); });
BI.createWidget({ BI.createWidget({
type: "bi.center_adapt", type: "bi.center_adapt",
cls: o.iconCls,
element: this, element: this,
hgap: o.hgap, hgap: o.hgap,
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap,
bgap: o.bgap,
lgap: o.lgap,
rgap: o.rgap,
items: [{ items: [{
type: "bi.horizontal", type: "bi.horizontal",
items: [this.icon, this.text] items: [this.icon, this.text]
@ -36473,7 +36478,7 @@ BI.Toast = BI.inherit(BI.Tip, {
}); });
BI.Toast.EVENT_DESTORY = "EVENT_DESTORY"; BI.Toast.EVENT_DESTORY = "EVENT_DESTORY";
BI.shortcut("bi.toast", BI.Toast);/** BI.shortcut("bi.toast", BI.Toast);/**
* toast提示 * title提示
* *
* Created by GUY on 2015/9/7. * Created by GUY on 2015/9/7.
* @class BI.Tooltip * @class BI.Tooltip
@ -37022,12 +37027,7 @@ BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
} }
}); });
BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);/** BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.SingleSelectItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-item bi-list-item-active", extraCls: "bi-single-select-item bi-list-item-active",
@ -37779,12 +37779,7 @@ BI.Switch = BI.inherit(BI.BasicButton, {
} }
}); });
BI.Switch.EVENT_CHANGE = "EVENT_CHANGE"; BI.Switch.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.switch", BI.Switch);/** BI.shortcut("bi.switch", BI.Switch);BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-first-tree-leaf-item bi-list-item-active", extraCls: "bi-first-tree-leaf-item bi-list-item-active",
@ -37970,12 +37965,7 @@ BI.shortcut("bi.first_tree_leaf_item", BI.FirstTreeLeafItem);BI.IconTreeLeafItem
} }
}); });
BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);/** BI.shortcut("bi.icon_tree_leaf_item", BI.IconTreeLeafItem);BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-last-tree-leaf-item bi-list-item-active", extraCls: "bi-last-tree-leaf-item bi-list-item-active",
@ -38074,12 +38064,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
} }
}); });
BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);/** BI.shortcut("bi.last_tree_leaf_item", BI.LastTreeLeafItem);BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
* guy
* 复选框item
* @type {*|void|Object}
*/
BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-mid-tree-leaf-item bi-list-item-active", extraCls: "bi-mid-tree-leaf-item bi-list-item-active",
@ -39139,9 +39124,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{ buttons: [{
value: BI.i18nText("BI-Basic_Cancel"), value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] }, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
}); });
}, },
_init: function () { _init: function () {
@ -39231,7 +39220,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button", type: "bi.button",
height: 24, height: 24,
handler: function (v) { handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
} }
}, buttonOpt); }, buttonOpt);
@ -39258,7 +39247,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text); this.text.setText(v || this.options.text);
} }
}); });
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView); BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);
/** /**
* Created by Young's on 2016/4/28. * Created by Young's on 2016/4/28.
@ -39708,7 +39697,12 @@ BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, { BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-icon-text-icon-popup" baseCls: "bi-icon-text-icon-popup",
behaviors: {
redmark: function () {
return true;
}
}
}); });
}, },
@ -39728,11 +39722,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
}], }],
behaviors: { behaviors: o.behaviors,
redmark: function () {
return true;
}
},
value: o.value value: o.value
}); });
@ -43330,6 +43320,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
this.options.pages = v; this.options.pages = v;
this.pager.setAllPages(v); this.pager.setAllPages(v);
this.editor.setEnable(v >= 1); this.editor.setEnable(v >= 1);
this.setPagerVisible(v > 1);
}, },
setValue: function (v) { setValue: function (v) {
@ -46754,7 +46745,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls1, cls: o.iconCls1,
width: 36, width: 36,
forceNotSelected: true, disableSelected: true,
selected: this._digest(o.value) selected: this._digest(o.value)
}); });
@ -47124,11 +47115,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE"; BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE"; BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.shortcut("bi.down_list_popup", BI.DownListPopup);/** BI.shortcut("bi.down_list_popup", BI.DownListPopup);!(function () {
* 汇总表格帮助类
* Created by Young's on 2017/1/19.
*/
!(function () {
BI.DynamicDateHelper = {}; BI.DynamicDateHelper = {};
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
@ -51550,7 +51537,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -51646,7 +51634,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* guy * guy
* 二级树 * 二级树
* @class BI.MultiLayerSelectLevelTree * @class BI.MultiLayerSelectLevelTree
* @extends BI.Select * @extends BI.Pane
*/ */
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, { BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
@ -51755,9 +51743,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -51794,8 +51782,12 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -52519,7 +52511,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -52723,9 +52716,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -52762,8 +52755,12 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -54013,7 +54010,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -54391,7 +54390,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -54786,7 +54787,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
} }
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -56937,6 +56940,9 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
onClickContinueSelect: function () { onClickContinueSelect: function () {
self.switcher.hideView(); self.switcher.hideView();
}, },
ref: function (_ref) {
self.checkPane = _ref;
},
value: o.value value: o.value
}, o.popup), }, o.popup),
adapter: o.adapter, adapter: o.adapter,
@ -56977,6 +56983,11 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
this.switcher.setValue(v); this.switcher.setValue(v);
}, },
// 与setValue的区别是只更新查看已选面板的的selectedValue, 不会更新按钮的计数
updateSelectedValue: function (v) {
this.checkPane.setValue(v);
},
setButtonChecked: function (v) { setButtonChecked: function (v) {
this.button.setValue(v); this.button.setValue(v);
}, },
@ -63626,12 +63637,7 @@ BI.SingleSelectInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item", extraCls: "bi-single-select-radio-item",
@ -64706,9 +64712,6 @@ BI.SingleSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher); BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher);
/**
* Created by User on 2017/11/16.
*/
BI.SignTextEditor = BI.inherit(BI.Widget, { BI.SignTextEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments);
@ -67788,7 +67791,7 @@ BI.DynamicYearTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP";
BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/** BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/**
* 展示面板 * 展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -68824,7 +68827,7 @@ BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);
/** /**
* 展示面板 * 季度展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -69651,30 +69654,33 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
if (options.keyword) { if (options.keyword) {
keywords.push(options.keyword); keywords.push(options.keyword);
} }
var resultItems = []; var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
resultItems = resultItems.concat(search.match).concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems); resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: items, items: resultItems,
hasNext: false hasNext: false
}); });
} }
@ -69748,7 +69754,7 @@ BI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, {
}); });
BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/** BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值 * 简单的复选面板, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
@ -71007,7 +71013,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
}); });
BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/** BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/**
* 简单的复选下拉树控件, 适用于数据量少的情况 * 简单的树面板, 适用于数据量少的情况
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
* @class BI.TreeValueChooserPane * @class BI.TreeValueChooserPane
@ -71118,29 +71124,34 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
} }
function call (items) { function call (items) {
var keywords = (options.keywords || []).slice(); var keywords = (options.keywords || []).slice();
var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.match.concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: self._getItemsByTimes(items, options.times), items: self._getItemsByTimes(resultItems, options.times),
hasNext: self._hasNextByTimes(items, options.times) hasNext: self._hasNextByTimes(resultItems, options.times)
}); });
} }
} }
@ -71206,7 +71217,7 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {
}); });
BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/** BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 * 简单的复选面板, 适用于数据量少的情况
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.

4
dist/resource.css vendored

@ -507,11 +507,11 @@ textarea::-webkit-scrollbar-thumb:hover {
.dot-e-font:hover .b-font:before, .dot-e-font:hover .b-font:before,
.dot-e-font.hover .b-font:before { .dot-e-font.hover .b-font:before {
content: "\e762"; content: "\e762";
color: rgba(54, 133, 242, 0.06); color: transparent;
} }
.dot-e-font:active .b-font:before { .dot-e-font:active .b-font:before {
content: "\e762"; content: "\e762";
color: #3685f2; color: transparent;
} }
.dot-e-font.active .b-font:before { .dot-e-font.active .b-font:before {
content: "\e762"; content: "\e762";

2
dist/utils.js vendored

@ -10945,7 +10945,7 @@ _.extend(BI, {
}; };
}, },
afterFunc: function (func) { afterFunc: function (sFunc, func) {
var __self = sFunc; var __self = sFunc;
return function () { return function () {
var ret = __self.apply(sFunc, arguments); var ret = __self.apply(sFunc, arguments);

4
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

98
dist/widget.js vendored

@ -1916,7 +1916,7 @@ BI.shortcut("bi.down_list_item", BI.DownListItem);BI.DownListGroupItem = BI.inhe
type: "bi.icon_button", type: "bi.icon_button",
cls: o.iconCls1, cls: o.iconCls1,
width: 36, width: 36,
forceNotSelected: true, disableSelected: true,
selected: this._digest(o.value) selected: this._digest(o.value)
}); });
@ -2286,11 +2286,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE"; BI.DownListPopup.EVENT_CHANGE = "EVENT_CHANGE";
BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE"; BI.DownListPopup.EVENT_SON_VALUE_CHANGE = "EVENT_SON_VALUE_CHANGE";
BI.shortcut("bi.down_list_popup", BI.DownListPopup);/** BI.shortcut("bi.down_list_popup", BI.DownListPopup);!(function () {
* 汇总表格帮助类
* Created by Young's on 2017/1/19.
*/
!(function () {
BI.DynamicDateHelper = {}; BI.DynamicDateHelper = {};
BI.extend(BI.DynamicDateHelper, { BI.extend(BI.DynamicDateHelper, {
getCalculation: function (obj) { getCalculation: function (obj) {
@ -6712,7 +6708,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -6808,7 +6805,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* guy * guy
* 二级树 * 二级树
* @class BI.MultiLayerSelectLevelTree * @class BI.MultiLayerSelectLevelTree
* @extends BI.Select * @extends BI.Pane
*/ */
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, { BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () { _defaultConfig: function () {
@ -6917,9 +6914,9 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -6956,8 +6953,12 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -7681,7 +7682,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -7885,9 +7887,9 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
el: { el: {
type: "bi.loader", type: "bi.loader",
isDefaultInit: o.itemsCreator !== BI.emptyFn, isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: { el: {
type: "bi.button_tree", type: "bi.button_tree",
chooseType: o.chooseType,
behaviors: o.behaviors, behaviors: o.behaviors,
layouts: [{ layouts: [{
type: "bi.vertical" type: "bi.vertical"
@ -7924,8 +7926,12 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
}, },
setValue: function (v) { setValue: function (v) {
// getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了
if(this.options.chooseType === BI.Selection.None) {
} else {
this.storeValue = v; this.storeValue = v;
this.tree.setValue(v); this.tree.setValue(v);
}
}, },
getValue: function () { getValue: function () {
@ -9175,7 +9181,9 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -9553,7 +9561,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM); self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -9948,7 +9958,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
} }
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {
this.getCounter().setValue(self.storeValue); // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)
// 只需要更新查看面板的selectedValue用以请求已选数据
this.getCounter().updateSelectedValue(self.storeValue);
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {
if (!self.combo.isViewVisible()) { if (!self.combo.isViewVisible()) {
@ -12099,6 +12111,9 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
onClickContinueSelect: function () { onClickContinueSelect: function () {
self.switcher.hideView(); self.switcher.hideView();
}, },
ref: function (_ref) {
self.checkPane = _ref;
},
value: o.value value: o.value
}, o.popup), }, o.popup),
adapter: o.adapter, adapter: o.adapter,
@ -12139,6 +12154,11 @@ BI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {
this.switcher.setValue(v); this.switcher.setValue(v);
}, },
// 与setValue的区别是只更新查看已选面板的的selectedValue, 不会更新按钮的计数
updateSelectedValue: function (v) {
this.checkPane.setValue(v);
},
setButtonChecked: function (v) { setButtonChecked: function (v) {
this.button.setValue(v); this.button.setValue(v);
}, },
@ -18788,12 +18808,7 @@ BI.SingleSelectInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);/** BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo);BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
* guy
* 单选框item
* @type {*|void|Object}
*/
BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-radio-item", extraCls: "bi-single-select-radio-item",
@ -19868,9 +19883,6 @@ BI.SingleSelectSearcher.EVENT_STOP = "EVENT_STOP";
BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.SingleSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE";
BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.SingleSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING";
BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher); BI.shortcut("bi.single_select_searcher", BI.SingleSelectSearcher);
/**
* Created by User on 2017/11/16.
*/
BI.SignTextEditor = BI.inherit(BI.Widget, { BI.SignTextEditor = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments); var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments);
@ -22950,7 +22962,7 @@ BI.DynamicYearTrigger.EVENT_START = "EVENT_START";
BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.DynamicYearTrigger.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP"; BI.DynamicYearTrigger.EVENT_STOP = "EVENT_STOP";
BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/** BI.shortcut("bi.dynamic_year_trigger", BI.DynamicYearTrigger);/**
* 展示面板 * 展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -23986,7 +23998,7 @@ BI.YearMonthInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.year_month_interval", BI.YearMonthInterval); BI.shortcut("bi.year_month_interval", BI.YearMonthInterval);
/** /**
* 展示面板 * 季度展示面板
* *
* Created by GUY on 2015/9/2. * Created by GUY on 2015/9/2.
* @class BI.YearCard * @class BI.YearCard
@ -24813,30 +24825,33 @@ BI.AbstractAllValueChooser = BI.inherit(BI.Widget, {
if (options.keyword) { if (options.keyword) {
keywords.push(options.keyword); keywords.push(options.keyword);
} }
var resultItems = []; var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
resultItems = resultItems.concat(search.match).concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems); resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: items, items: resultItems,
hasNext: false hasNext: false
}); });
} }
@ -24910,7 +24925,7 @@ BI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, {
}); });
BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.AllValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/** BI.shortcut("bi.all_value_chooser_combo", BI.AllValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值 * 简单的复选面板, 适用于数据量少的情况 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
@ -26169,7 +26184,7 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {
}); });
BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TreeValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/** BI.shortcut("bi.tree_value_chooser_combo", BI.TreeValueChooserCombo);/**
* 简单的复选下拉树控件, 适用于数据量少的情况 * 简单的树面板, 适用于数据量少的情况
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.
* @class BI.TreeValueChooserPane * @class BI.TreeValueChooserPane
@ -26280,29 +26295,34 @@ BI.AbstractValueChooser = BI.inherit(BI.Widget, {
} }
function call (items) { function call (items) {
var keywords = (options.keywords || []).slice(); var keywords = (options.keywords || []).slice();
var resultItems = items;
if(BI.isNotEmptyArray(keywords)) {
resultItems = [];
BI.each(keywords, function (i, kw) { BI.each(keywords, function (i, kw) {
var search = BI.Func.getSearchResult(items, kw); var search = BI.Func.getSearchResult(items, kw);
items = search.match.concat(search.find); resultItems = resultItems.concat(search.match).concat(search.find);
}); });
resultItems = BI.uniq(resultItems);
}
if (options.selectedValues) {// 过滤 if (options.selectedValues) {// 过滤
var filter = BI.makeObject(options.selectedValues, true); var filter = BI.makeObject(options.selectedValues, true);
items = BI.filter(items, function (i, ob) { resultItems = BI.filter(resultItems, function (i, ob) {
return !filter[ob.value]; return !filter[ob.value];
}); });
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) { if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {
callback({ callback({
items: items items: resultItems
}); });
return; return;
} }
if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) { if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {
callback({count: items.length}); callback({count: resultItems.length});
return; return;
} }
callback({ callback({
items: self._getItemsByTimes(items, options.times), items: self._getItemsByTimes(resultItems, options.times),
hasNext: self._hasNextByTimes(items, options.times) hasNext: self._hasNextByTimes(resultItems, options.times)
}); });
} }
} }
@ -26368,7 +26388,7 @@ BI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {
}); });
BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.ValueChooserCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/** BI.shortcut("bi.value_chooser_combo", BI.ValueChooserCombo);/**
* 简单的复选下拉框控件, 适用于数据量少的情况 * 简单的复选面板, 适用于数据量少的情况
* 封装了字段处理逻辑 * 封装了字段处理逻辑
* *
* Created by GUY on 2015/10/29. * Created by GUY on 2015/10/29.

3
src/base/grid/grid.js

@ -208,7 +208,8 @@ BI.GridView = BI.inherit(BI.Widget, {
BI.each(addSet, function (index, key) { BI.each(addSet, function (index, key) {
addedItems.push(renderedCells[key[2]]); addedItems.push(renderedCells[key[2]]);
}); });
this.container.addItems(addedItems); // 与listview一样, 给上下文
this.container.addItems(addedItems, this);
// 拦截父子级关系 // 拦截父子级关系
this.container._children = renderedWidgets; this.container._children = renderedWidgets;
this.container.attr("items", renderedCells); this.container.attr("items", renderedCells);

5
src/base/list/virtuallist.js

@ -151,7 +151,7 @@ BI.VirtualList = BI.inherit(BI.Widget, {
_clearChildren: function () { _clearChildren: function () {
BI.each(this.container._children, function (i, cell) { BI.each(this.container._children, function (i, cell) {
cell && cell.el._destroy(); cell && cell._destroy();
}); });
this.container._children = {}; this.container._children = {};
this.container.attr("items", []); this.container.attr("items", []);
@ -162,6 +162,9 @@ BI.VirtualList = BI.inherit(BI.Widget, {
this._clearChildren(); this._clearChildren();
this.cache = {}; this.cache = {};
this.options.scrollTop = 0; this.options.scrollTop = 0;
// 依赖于cache的占位元素也要初始化
this.topBlank.setHeight(0);
this.bottomBlank.setHeight(0);
}, },
populate: function (items) { populate: function (items) {

2
src/base/single/button/button.basic.js

@ -9,7 +9,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"), _baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer") + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
value: "", value: "",
text: "", text: "",
stopEvent: false, stopEvent: false,

16
src/base/single/input/file.js

@ -84,7 +84,7 @@
var multipart = function (boundary, name, file) { var multipart = function (boundary, name, file) {
return "--".concat( return "--".concat(
boundary, CRLF, boundary, CRLF,
"Content-Disposition: form-data; name=\"", name, "\"; filename=\"", BI.cjkEncode(file.fileName), "\"", CRLF, "Content-Disposition: form-data; name=\"", name, "\"; filename=\"", _global.encodeURIComponent(file.fileName), "\"", CRLF,
"Content-Type: application/octet-stream", CRLF, "Content-Type: application/octet-stream", CRLF,
CRLF, CRLF,
file.getAsBinary(), CRLF, file.getAsBinary(), CRLF,
@ -173,7 +173,9 @@
switch (xhr.readyState) { switch (xhr.readyState) {
case 2: case 2:
case 3: case 3:
if (rpe.total <= rpe.loaded) {rpe.loaded = rpe.total;} if (rpe.total <= rpe.loaded) {
rpe.loaded = rpe.total;
}
upload.onprogress(rpe); upload.onprogress(rpe);
break; break;
case 4: case 4:
@ -239,8 +241,12 @@
var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"), var url = handler.url.concat(-1 === handler.url.indexOf("?") ? "?" : "&", "AjaxUploadFrame=true"),
rpe = { rpe = {
loaded: 1, total: 100, simulation: true, interval: setInterval(function () { loaded: 1, total: 100, simulation: true, interval: setInterval(function () {
if (rpe.loaded < rpe.total) {++rpe.loaded;} if (rpe.loaded < rpe.total) {
if (isFunction(handler.onprogress)) {handler.onprogress(rpe, {});} ++rpe.loaded;
}
if (isFunction(handler.onprogress)) {
handler.onprogress(rpe, {});
}
}, 100) }, 100)
}, },
onload = function () { onload = function () {
@ -257,7 +263,7 @@
} }
// attachO.fileSize = responseText.length; // attachO.fileSize = responseText.length;
attachO.filename = BI.cjkDecode(handler.file.fileName); attachO.filename = _global.decodeURIComponent(handler.file.fileName);
if (handler.maxlength == 1) { if (handler.maxlength == 1) {
handler.attach_array[0] = attachO; handler.attach_array[0] = attachO;
} else { } else {

21
src/case/colorchooser/colorchooser.popup.js

@ -10,13 +10,14 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "bi-color-chooser-popup", baseCls: "bi-color-chooser-popup",
width: 230, width: 230,
height: 145 height: 145,
simple: false // 简单模式, popup中没有自动和透明
}, },
render: function () { render: function () {
var self = this, o = this.options; var self = this, o = this.options;
this.colorEditor = BI.createWidget(o.editor, { this.colorEditor = BI.createWidget(o.editor, {
type: "bi.color_picker_editor", type: o.simple ? "bi.simple_color_picker_editor" : "bi.color_picker_editor",
value: o.value, value: o.value,
cls: "bi-header-background bi-border-bottom", cls: "bi-header-background bi-border-bottom",
height: 30 height: 30
@ -31,7 +32,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
this.storeColors = BI.createWidget({ this.storeColors = BI.createWidget({
type: "bi.color_picker", type: "bi.color_picker",
cls: "bi-border-bottom bi-border-right", cls: "bi-border-bottom bi-border-right",
items: [this._digestStoreColors(BI.string2Array(BI.Cache.getItem("colors") || ""))], items: [this._digestStoreColors(this._getStoreColors())],
width: 210, width: 210,
height: 24, height: 24,
value: o.value value: o.value
@ -175,7 +176,7 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
_dealStoreColors: function () { _dealStoreColors: function () {
var color = this.getValue(); var color = this.getValue();
var colors = BI.string2Array(BI.Cache.getItem("colors") || ""); var colors = this._getStoreColors();
var que = new BI.Queue(8); var que = new BI.Queue(8);
que.fromArray(colors); que.fromArray(colors);
que.remove(color); que.remove(color);
@ -200,6 +201,18 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
return items; return items;
}, },
_getStoreColors: function() {
var self = this, o = this.options;
var colorsArray = BI.string2Array(BI.Cache.getItem("colors") || "");
return BI.filter(colorsArray, function (idx, color) {
return o.simple ? self._isRGBColor(color) : true;
});
},
_isRGBColor: function (color) {
return BI.isNotEmptyString(color) && color !== "transparent";
},
setStoreColors: function (colors) { setStoreColors: function (colors) {
if (BI.isArray(colors)) { if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]); this.storeColors.populate([this._digestStoreColors(colors)]);

4
src/case/colorchooser/colorchooser.popup.simple.js

@ -20,9 +20,7 @@ BI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {
type: "bi.color_chooser_popup", type: "bi.color_chooser_popup",
value: o.value, value: o.value,
element: this, element: this,
editor: { simple: true // 是否有自动
type: "bi.simple_color_picker_editor"
}
}); });
this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () { this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {
self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments); self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);

12
src/case/combo/bubblecombo/popup.bubble.js

@ -32,9 +32,13 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view", extraCls: "bi-bubble-bar-popup-view",
buttons: [{ buttons: [{
value: BI.i18nText("BI-Basic_Cancel"), value: false,
text: BI.i18nText("BI-Basic_Cancel"),
ghost: true ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}] }, {
text: BI.i18nText(BI.i18nText("BI-Basic_Sure")),
value: true
}]
}); });
}, },
_init: function () { _init: function () {
@ -124,7 +128,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
type: "bi.button", type: "bi.button",
height: 24, height: 24,
handler: function (v) { handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);
} }
}, buttonOpt); }, buttonOpt);
@ -151,5 +155,5 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
this.text.setText(v || this.options.text); this.text.setText(v || this.options.text);
} }
}); });
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE"; BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView); BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);

2
src/core/platform/web/jquery/_jquery.js vendored

@ -45,7 +45,7 @@ var
// List of deleted data cache ids, so we can reuse them // List of deleted data cache ids, so we can reuse them
core_deletedIds = [], core_deletedIds = [],
core_version = "1.9.1", core_version = "1.12.4",
// Save a reference to some core methods // Save a reference to some core methods
core_concat = core_deletedIds.concat, core_concat = core_deletedIds.concat,

5
src/core/utils/prefixIntervalTree.js

@ -23,13 +23,15 @@
BI.PrefixIntervalTree = function (xs) { BI.PrefixIntervalTree = function (xs) {
this._size = xs.length; this._size = xs.length;
this._half = ceilLog2(this._size); this._half = ceilLog2(this._size);
// _heap是一个_size两倍以上的堆
this._heap = new Int32Array(2 * this._half); this._heap = new Int32Array(2 * this._half);
var i; var i;
// 初始化 >= _size 的堆空间, 即叶子节点
for (i = 0; i < this._size; ++i) { for (i = 0; i < this._size; ++i) {
this._heap[this._half + i] = xs[i]; this._heap[this._half + i] = xs[i];
} }
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
for (i = this._half - 1; i > 0; --i) { for (i = this._half - 1; i > 0; --i) {
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1]; this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];
} }
@ -37,6 +39,7 @@
BI.PrefixIntervalTree.prototype = { BI.PrefixIntervalTree.prototype = {
constructor: BI.PrefixIntervalTree, constructor: BI.PrefixIntervalTree,
// 往_half之后的空间set值,需要更新其所有祖先节点的值
set: function (index, value) { set: function (index, value) {
var node = this._half + index; var node = this._half + index;
this._heap[node] = value; this._heap[node] = value;

6
src/css/base/single/button/button.css

@ -23,6 +23,12 @@ body .bi-button,
vertical-align: middle; vertical-align: middle;
cursor: pointer; cursor: pointer;
} }
body .bi-button.hack,
#body .bi-button.hack {
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
body .bi-button.block, body .bi-button.block,
#body .bi-button.block { #body .bi-button.block {
font-size: inherit; font-size: inherit;

22
src/css/widget/multilayerselecttree/multilayerselecttree.css

@ -1,3 +1,25 @@
.bi-multilayer-select-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-select-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-select-level-tree .tree-view { .bi-multilayer-select-level-tree .tree-view {
min-width: 100%; min-width: 100%;
} }

22
src/css/widget/multilayersingletree/multilayersingletree.css

@ -1,3 +1,25 @@
.bi-multilayer-single-tree-combo .trigger-icon-button {
font-size: 16px;
}
.bi-multilayer-single-tree-combo .bi-combo.bi-combo-popup + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
transform: rotate(180deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-tree-combo .bi-combo + .bi-trigger-icon-button .x-icon {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: transform 0.3s ease;
-moz-transition: transform 0.3s ease;
-o-transition: transform 0.3s ease;
transition: transform 0.3s ease;
}
.bi-multilayer-single-level-tree .tree-view { .bi-multilayer-single-level-tree .tree-view {
min-width: 100%; min-width: 100%;
} }

3
src/less/base/single/button/button.less

@ -3,6 +3,9 @@
@activeVal: transform .5s ease, opacity 1s ease; @activeVal: transform .5s ease, opacity 1s ease;
@activeStopVal: transform 0s; @activeStopVal: transform 0s;
body .bi-button, #body .bi-button { body .bi-button, #body .bi-button {
&.hack {
.border-radius(0px);
}
.border-radius(2px); .border-radius(2px);
border: 1px solid @color-bi-border-highlight; border: 1px solid @color-bi-border-highlight;
background-color: @color-bi-background-highlight; background-color: @color-bi-background-highlight;

20
src/less/widget/multilayerselecttree/multilayerselecttree.combo.less

@ -0,0 +1,20 @@
@import "../../index";
@val: transform .3s ease;
.bi-multilayer-select-tree-combo {
& .trigger-icon-button{
font-size: 16px;
}
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button {
& .x-icon {
.rotate(180deg);
.transition(@val);
}
}
& .bi-combo + .bi-trigger-icon-button {
& .x-icon {
.rotate(0deg);
.transition(@val);
}
}
}

20
src/less/widget/multilayersingletree/multilayersingletree.combo.less

@ -0,0 +1,20 @@
@import "../../index";
@val: transform .3s ease;
.bi-multilayer-single-tree-combo {
& .trigger-icon-button{
font-size: 16px;
}
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button {
& .x-icon {
.rotate(180deg);
.transition(@val);
}
}
& .bi-combo + .bi-trigger-icon-button {
& .x-icon {
.rotate(0deg);
.transition(@val);
}
}
}

2
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -9,7 +9,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-singletree-combo", baseCls: "bi-multilayer-single-tree-combo",
isDefaultInit: false, isDefaultInit: false,
height: 24, height: 24,
text: "", text: "",

7
typescript/core/func/array.ts

@ -3,3 +3,10 @@ export declare type _pushArray = (sArray: any[], array: any[]) => void;
export declare type _pushDistinct = (sArray: any[], obj: any) => void; export declare type _pushDistinct = (sArray: any[], obj: any) => void;
export declare type _pushDistinctArray = (sArray: any[], array: any[]) => void; export declare type _pushDistinctArray = (sArray: any[], array: any[]) => void;
declare type _array = {
pushArray: _pushArray;
pushDistinct: _pushDistinct;
pushDistinctArray: _pushDistinctArray;
}
export default _array;

108
typescript/core/func/date.ts

@ -0,0 +1,108 @@
export declare type _Date = {
SECOND: number;
MINUTE: number;
HOUR: number;
DAY: number;
WEEK: number;
_DN: string[];
_SDN: string[];
_FD: number;
_MN: string[];
_SMN: number[];
_QN: string[];
_MD: number[];
_OFFSET: number[];
}
/**
*
*/
export declare type _getTimezone = (date: Date) => string;
/**
*
*/
export declare type _getMonthDays = (date: Date, month: number) => string;
/**
*
*/
export declare type _getLastDateOfMonth = (data: Date) => Date;
/**
*
*/
export declare type _getDayOfYear = (data: Date) => number;
/**
*
*/
export declare type _getWeekNumber = (data: Date) => number;
/**
*
*/
export declare type _getQuarter = (date: Date) => number;
/**
*
*/
export declare type _getOffsetDate = (date: Date, offset: number) => Date;
/**
*
*/
export declare type _getOffsetQuarter = (date: Date, n: number) => Date;
/**
*
*/
export declare type _getQuarterStartMonth = (date: Date) => number;
/**
*
*/
export declare type _getQuarterStartDate = (date: Date) => number;
/**
*
*/
export declare type _getQuarterEndDate = (date: Date) => number;
/**
* n个月之前或之后的日期
*/
export declare type _getOffsetMonth = (date: Date, n: number) => Date;
/**
*
*/
export declare type _getWeekStartDate = (date: Date) => Date;
/**
*
*/
export declare type _getWeekEndDate = (date: Date) => Date;
/**
*
*/
export declare type _print = (date: Date, str: string) => string;
declare type _date = {
getTimezone: _getTimezone;
getMonthDays: _getMonthDays;
getLastDateOfMonth: _getLastDateOfMonth;
getDayOfYear: _getDayOfYear;
getWeekNumber: _getWeekNumber;
getQuarter: _getQuarter;
getOffsetDate: _getOffsetDate;
getOffsetQuarter: _getOffsetQuarter;
getQuarterStartMonth: _getQuarterStartMonth;
getQuarterStartDate: _getQuarterStartDate;
getQuarterEndDate: _getQuarterEndDate;
getOffsetMonth: _getOffsetMonth;
getWeekStartDate: _getWeekStartDate;
getWeekEndDate: _getWeekEndDate;
print: _print;
}
export default _date;

8
typescript/core/func/function.ts

@ -27,3 +27,11 @@ export declare type _beforeFunc = (sFunc: Function, func: Function) => Function;
* @param func B * @param func B
*/ */
export declare type _afterFunc = (sFunc: Function, func: Function) => Function; export declare type _afterFunc = (sFunc: Function, func: Function) => Function;
declare type _function = {
createDistinctName: _createDistinctName;
getSearchResult: _getSearchResult;
beforeFunc: _beforeFunc;
afterFunc: _afterFunc;
}
export default _function;

10
typescript/core/func/index.ts

@ -0,0 +1,10 @@
import _array from "./array";
import _string from "./string";
import _number from "./number";
import _function from "./function";
import _date, {_Date} from "./date";
interface _func extends _array, _string, _number, _function {
Date: _Date;
}
export default _func;

8
typescript/core/func/number.ts

@ -30,3 +30,11 @@ export declare type _mul = (num: number, arg: number) => number;
* @return {Number} * @return {Number}
*/ */
export declare type _div = (num: number, arg: number) => number; export declare type _div = (num: number, arg: number) => number;
declare type _number = {
add: _add;
sub: _sub;
mul: _mul;
div: _div;
}
export default _number

11
typescript/core/func/string.ts

@ -54,3 +54,14 @@ export declare type _perfectStart = (str: string, start: string) => string;
* @return {Number[]} * @return {Number[]}
*/ */
export declare type _allIndexOf = (str: string, sub: string) => number[]; export declare type _allIndexOf = (str: string, sub: string) => number[];
declare type _string = {
startWith: _startWith;
endWith: _endWith;
getQuery: _getQuery;
appendQuery: _appendQuery;
replaceAll: _replaceAll;
perfectStart: _perfectStart;
allIndexOf: _allIndexOf;
}
export default _string

5
typescript/core/i18n.ts

@ -1,3 +1,8 @@
export declare type _addI18n = (v: string) => string; export declare type _addI18n = (v: string) => string;
export declare type _i18nText = (key: string) => string; export declare type _i18nText = (key: string) => string;
export declare type _i18n = {
addI18n: _addI18n;
i18nText: _i18nText;
}

42
typescript/index.ts

@ -1,40 +1,8 @@
import { _addI18n, _i18nText } from "./core/i18n"; import { _i18n } from "./core/i18n";
import { _OB } from "./core/ob"; import { _OB } from "./core/ob";
import { _pushArray, _pushDistinct, _pushDistinctArray} from "./core/func/array"; import _func from "./core/func";
import {_startWith, _allIndexOf, _appendQuery, _endWith, _getQuery, _perfectStart, _replaceAll} from "./core/func/string";
import {_add, _sub, _mul, _div} from "./core/func/number";
import {_afterFunc, _beforeFunc, _createDistinctName, _getSearchResult} from "./core/func/function";
export declare module BI { export interface BI extends _func {
namespace i18n { i18n: _i18n;
const addI18n: _addI18n; OB: _OB;
const i18nText: _i18nText;
}
const OB: _OB;
const pushArray: _pushArray;
const pushDistinct: _pushDistinct;
const pushDistinctArray: _pushDistinctArray;
const startWith: _startWith;
const endWith: _endWith;
const getQuery: _getQuery;
const appendQuery: _appendQuery;
const replaceAll: _replaceAll;
const perfectStart: _perfectStart;
const allIndexOf: _allIndexOf;
const add: _add;
const sub: _sub;
const mul: _mul;
const div: _div;
const afterFunc: _afterFunc;
const beforeFunc: _beforeFunc;
namespace Func {
const createDistinctName: _createDistinctName;
const getSearchResult: _getSearchResult;
}
} }
Loading…
Cancel
Save