Browse Source

Merge pull request #996 in VISUAL/fineui from ~DAILER/fineui:master to master

* commit 'e4e58f198587865c70b434d38c06b68fa270aa6d':
  uodate 去掉cjkEncode
es6
guy 5 years ago
parent
commit
575a7a33b1
  1. 4
      dist/2.0/fineui.css
  2. 276
      dist/2.0/fineui.ie.js
  3. 67
      dist/2.0/fineui.ie.min.js
  4. 264
      dist/2.0/fineui.js
  5. 2
      dist/2.0/fineui.min.css
  6. 66
      dist/2.0/fineui.min.js
  7. 30
      dist/base.js
  8. 4
      dist/bundle.css
  9. 276
      dist/bundle.ie.js
  10. 67
      dist/bundle.ie.min.js
  11. 264
      dist/bundle.js
  12. 2
      dist/bundle.min.css
  13. 66
      dist/bundle.min.js
  14. 103
      dist/case.js
  15. 33
      dist/core.js
  16. 4
      dist/fineui.css
  17. 276
      dist/fineui.ie.js
  18. 66
      dist/fineui.ie.min.js
  19. 264
      dist/fineui.js
  20. 2
      dist/fineui.min.css
  21. 64
      dist/fineui.min.js
  22. 187
      dist/fineui_without_jquery_polyfill.js
  23. 4
      dist/resource.css
  24. 2
      dist/utils.js
  25. 4
      dist/utils.min.js
  26. 98
      dist/widget.js
  27. 16
      src/base/single/input/file.js

4
dist/2.0/fineui.css vendored

@ -5083,11 +5083,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";

276
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);
@ -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
}; };
}, },
@ -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);
@ -54288,43 +54270,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(BI.string2Array(BI.Cache.getItem("colors") || ""))],
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 +54297,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 +54345,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 +54419,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 = BI.string2Array(BI.Cache.getItem("colors") || "");
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 +54443,12 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -56450,7 +56428,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 +56453,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 +60051,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 +63752,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 +64122,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 +68544,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -68664,7 +68641,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 +68750,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 +68789,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 +69518,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69741,9 +69723,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 +69762,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 +71017,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 +71397,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 +71794,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 +73947,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 +73990,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 +80644,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 +81719,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 +84798,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 +85834,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 +86661,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 +86761,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 +88020,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 +88131,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 +88224,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 +88411,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 +88426,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 () {

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

File diff suppressed because one or more lines are too long

264
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);
@ -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
}; };
}, },
@ -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);
@ -54692,43 +54674,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(BI.string2Array(BI.Cache.getItem("colors") || ""))],
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 +54701,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 +54749,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 +54823,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 = BI.string2Array(BI.Cache.getItem("colors") || "");
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 +54847,12 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -56854,7 +56832,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 +56857,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 +60455,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 +64156,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 +64526,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 +68948,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69068,7 +69045,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 +69154,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 +69193,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 +69922,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -70145,9 +70127,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 +70166,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 +71421,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 +71801,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 +72198,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 +74351,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 +74394,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 +81048,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 +82123,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 +85202,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 +86238,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 +87065,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 +87165,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 +88424,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 +88535,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 +88628,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

66
dist/2.0/fineui.min.js vendored

File diff suppressed because one or more lines are too long

30
dist/base.js vendored

@ -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

4
dist/bundle.css vendored

@ -5083,11 +5083,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";

276
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);
@ -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
}; };
}, },
@ -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);
@ -54288,43 +54270,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(BI.string2Array(BI.Cache.getItem("colors") || ""))],
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 +54297,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 +54345,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 +54419,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 = BI.string2Array(BI.Cache.getItem("colors") || "");
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 +54443,12 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -56450,7 +56428,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 +56453,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 +60051,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 +63752,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 +64122,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 +68544,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -68664,7 +68641,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 +68750,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 +68789,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 +69518,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69741,9 +69723,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 +69762,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 +71017,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 +71397,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 +71794,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 +73947,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 +73990,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 +80644,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 +81719,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 +84798,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 +85834,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 +86661,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 +86761,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 +88020,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 +88131,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 +88224,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 +88411,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 +88426,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 () {

67
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

264
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);
@ -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
}; };
}, },
@ -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);
@ -54692,43 +54674,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(BI.string2Array(BI.Cache.getItem("colors") || ""))],
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 +54701,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 +54749,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 +54823,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 = BI.string2Array(BI.Cache.getItem("colors") || "");
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 +54847,12 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -56854,7 +56832,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 +56857,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 +60455,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 +64156,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 +64526,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 +68948,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69068,7 +69045,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 +69154,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 +69193,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 +69922,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -70145,9 +70127,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 +70166,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 +71421,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 +71801,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 +72198,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 +74351,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 +74394,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 +81048,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 +82123,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 +85202,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 +86238,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 +87065,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 +87165,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 +88424,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 +88535,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 +88628,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

66
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

103
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);
@ -2357,43 +2328,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(BI.string2Array(BI.Cache.getItem("colors") || ""))],
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 +2355,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 +2403,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 +2477,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 = BI.string2Array(BI.Cache.getItem("colors") || "");
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 +2501,12 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -4519,7 +4486,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 +4511,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 +8109,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) {

33
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);
@ -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
}; };
}, },

4
dist/fineui.css vendored

@ -5083,11 +5083,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";

276
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);
@ -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
}; };
}, },
@ -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);
@ -54533,43 +54515,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(BI.string2Array(BI.Cache.getItem("colors") || ""))],
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 +54542,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 +54590,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 +54664,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 = BI.string2Array(BI.Cache.getItem("colors") || "");
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 +54688,12 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -56695,7 +56673,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 +56698,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 +60296,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 +63997,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 +64367,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 +68789,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -68909,7 +68886,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 +68995,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 +69034,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 +69763,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69986,9 +69968,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 +70007,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 +71262,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 +71642,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 +72039,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 +74192,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 +74235,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 +80889,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 +81964,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 +85043,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 +86079,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 +86906,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 +87006,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 +88265,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 +88376,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 +88469,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 +89240,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 +89255,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 () {

66
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

264
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);
@ -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
}; };
}, },
@ -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);
@ -54937,43 +54919,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(BI.string2Array(BI.Cache.getItem("colors") || ""))],
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 +54946,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 +54994,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 +55068,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 = BI.string2Array(BI.Cache.getItem("colors") || "");
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 +55092,12 @@ BI.ColorChooserPopup = BI.inherit(BI.Widget, {
disabled: true disabled: true
}); });
}); });
this.storeColors.populate([items]); return items;
},
setStoreColors: function (colors) {
if (BI.isArray(colors)) {
this.storeColors.populate([this._digestStoreColors(colors)]);
} }
}, },
@ -57099,7 +57077,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 +57102,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 +60700,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 +64401,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 +64771,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 +69193,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -69313,7 +69290,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 +69399,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 +69438,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 +70167,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -70390,9 +70372,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 +70411,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 +71666,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 +72046,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 +72443,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 +74596,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 +74639,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 +81293,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 +82368,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 +85447,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 +86483,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 +87310,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 +87410,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 +88669,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 +88780,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 +88873,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

64
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

187
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
}; };
}, },
@ -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",
@ -39708,7 +39693,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 +39718,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 +43316,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 +46741,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 +47111,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 +51533,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -51646,7 +51630,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 +51739,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 +51778,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 +52507,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}] }]
}, },
value: o.value, value: o.value,
maxHeight: 400 maxHeight: 400,
minHeight: 240
} }
}; };
}, },
@ -52723,9 +52712,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 +52751,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 +54006,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 +54386,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 +54783,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 +56936,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 +56979,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 +63633,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 +64708,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 +67787,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 +68823,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 +69650,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 +69750,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 +71009,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 +71120,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 +71213,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.

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 {

Loading…
Cancel
Save