Zhenfei.Li 6 years ago
parent
commit
07325d390e
  1. 37
      Gruntfile.js
  2. 7
      demo/config.js
  3. 1
      demo/js/base/demo.label.js
  4. 5
      demo/js/base/editor/demo.textarea_editor.js
  5. 12
      demo/js/case/combo/demo.text_value_down_list_combo.js
  6. 215
      demo/js/category/customATree/demo.multilayerselecttree.leveltree.js
  7. 4
      demo/js/config/base.js
  8. 4
      demo/js/config/category.js
  9. 85
      demo/js/core/layout/demo.horizontal.js
  10. 83
      demo/js/core/popup/demo.popover.js
  11. 2
      demo/js/widget/multiselect/demo.multi_select_combo.js
  12. 5
      demo/js/widget/multiselect/demo.multi_select_list.js
  13. 23
      demo/js/widget/tree/demo.multilayer_single_level_tree.js
  14. 427
      dist/base.css
  15. 462
      dist/base.js
  16. 453
      dist/bundle.css
  17. 82862
      dist/bundle.ie.js
  18. 39
      dist/bundle.ie.min.js
  19. 2575
      dist/bundle.js
  20. 2
      dist/bundle.min.css
  21. 76
      dist/bundle.min.js
  22. 461
      dist/case.js
  23. 24
      dist/core.css
  24. 785
      dist/core.js
  25. 24
      dist/core_without_normalize.css
  26. 470
      dist/demo.js
  27. 453
      dist/fineui.css
  28. 82917
      dist/fineui.ie.js
  29. 39
      dist/fineui.ie.min.js
  30. 3152
      dist/fineui.js
  31. 2
      dist/fineui.min.css
  32. 76
      dist/fineui.min.js
  33. 2476
      dist/fineui_without_jquery_polyfill.js
  34. 325
      dist/fix/fix.compact.ie.js
  35. 1033
      dist/fix/fix.ie.js
  36. 32
      dist/fix/fix.js
  37. BIN
      dist/font/iconfont.eot
  38. 479
      dist/font/iconfont.svg
  39. BIN
      dist/font/iconfont.ttf
  40. BIN
      dist/font/iconfont.woff
  41. BIN
      dist/images/1x/icon/wave_loading.gif
  42. BIN
      dist/images/2x/icon/wave_loading.gif
  43. 2
      dist/resource.css
  44. 857
      dist/utils.js
  45. 8
      dist/utils.min.js
  46. 710
      dist/widget.js
  47. 2
      lodash.md
  48. 2
      public/css/app.css
  49. 3
      public/js/fineui.i18n.js
  50. 65
      src/base/combination/combo.js
  51. 106
      src/base/foundation/message.js
  52. 63
      src/base/layer/layer.popover.js
  53. 12
      src/base/layer/layer.popup.js
  54. 30
      src/base/pane.js
  55. 15
      src/base/single/button/button.basic.js
  56. 2
      src/base/single/button/button.node.js
  57. 2
      src/base/single/button/buttons/button.icon.js
  58. 35
      src/base/single/editor/editor.js
  59. 8
      src/base/single/editor/editor.textarea.js
  60. 5
      src/base/single/iframe/iframe.js
  61. 4
      src/base/single/img/img.js
  62. 21
      src/base/single/input/file.js
  63. 22
      src/base/single/input/input.js
  64. 7
      src/base/single/label/label.js
  65. 46
      src/base/single/single.js
  66. 8
      src/base/single/text.js
  67. 2
      src/base/single/tip/tip.js
  68. 3
      src/base/single/tip/tip.toast.js
  69. 2
      src/base/single/trigger/trigger.js
  70. 0
      src/base/tree/ztree/asynctree.js
  71. 0
      src/base/tree/ztree/parttree.js
  72. 3
      src/base/tree/ztree/treeview.js
  73. 4
      src/case/button/treeitem/item.first.treeleaf.js
  74. 4
      src/case/button/treeitem/item.last.treeleaf.js
  75. 2
      src/case/button/treeitem/item.mid.treeleaf.js
  76. 21
      src/case/calendar/calendar.js
  77. 8
      src/case/checkbox/check.last.treenode.js
  78. 7
      src/case/combo/bubblecombo/combo.bubble.js
  79. 157
      src/case/combo/bubblecombo/popup.bubble.js
  80. 6
      src/case/combo/icontextvaluecombo/combo.icontextvalue.js
  81. 3
      src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js
  82. 5
      src/case/combo/textvaluecombo/combo.textvalue.js
  83. 13
      src/case/combo/textvaluedownlistcombo/combo.textvaluedownlist.js
  84. 8
      src/case/editor/editor.state.js
  85. 2
      src/case/layer/layer.multipopup.js
  86. 4
      src/case/pager/pager.all.count.js
  87. 10
      src/case/pager/pager.direction.js
  88. 35
      src/case/tree/tree.level.js
  89. 3
      src/case/tree/ztree/tree.display.js
  90. 0
      src/case/tree/ztree/tree.simple.js
  91. 6
      src/case/trigger/trigger.text.js
  92. 8
      src/case/trigger/trigger.text.select.js
  93. 1
      src/component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo.js
  94. 45
      src/core/base.js
  95. 4
      src/core/func/array.js
  96. 46
      src/core/func/date.js
  97. 2
      src/core/func/function.js
  98. 18
      src/core/inject.js
  99. 2
      src/core/listener/listener.show.js
  100. 38
      src/core/lodash.js
  101. Some files were not shown because too many files have changed in this diff Show More

37
Gruntfile.js

@ -46,9 +46,9 @@ module.exports = function (grunt) {
"src/base/single/tip/tip.js",
"src/base/combination/group.button.js",
"src/base/combination/tree.button.js",
"src/base/tree/treeview.js",
"src/base/tree/asynctree.js",
"src/base/tree/parttree.js",
"src/base/tree/ztree/treeview.js",
"src/base/tree/ztree/asynctree.js",
"src/base/tree/ztree/parttree.js",
"src/base/**/*.js"
],
dest: "dist/base.js"
@ -100,6 +100,11 @@ module.exports = function (grunt) {
dest: "dist/bundle.js"
},
bundleIEJs: {
src: ["dist/core.js", "dist/fix/fix.ie.js", "dist/base.js", "dist/case.js", "dist/widget.js", "dist/fix/fix.compact.ie.js", "dist/router.js", "public/js/**/*.js", "public/js/index.js"],
dest: "dist/bundle.ie.js"
},
bundleCss: {
src: ["dist/core.css", "dist/base.css", "dist/widget.css", "public/css/app.css", "public/css/**/*.css"],
dest: "dist/bundle.css"
@ -107,10 +112,16 @@ module.exports = function (grunt) {
fineuiJs: {
src: ["dist/polyfill.js", "dist/core.js", "dist/fix/fix.js", "dist/base.js",
"dist/case.js", "dist/widget.js", "dist/fix/fix.compact.js", "dist/router.js", "ui/js/**/*.js", "!ui/js/fineui.i18n.js"],
"dist/case.js", "dist/widget.js", "dist/router.js", "dist/fix/fix.compact.js", "ui/js/**/*.js", "!ui/js/fineui.i18n.js"],
dest: "dist/fineui.js"
},
fineuiIEJs: {
src: ["dist/polyfill.js", "dist/core.js", "dist/fix/fix.ie.js", "dist/base.js",
"dist/case.js", "dist/widget.js", "dist/router.js", "dist/fix/fix.compact.ie.js", "ui/js/**/*.js", "!ui/js/fineui.i18n.js"],
dest: "dist/fineui.ie.js"
},
fineuiWithoutJqueryAndPolyfillJs: {
src: ["src/core/foundation.js",
"src/core/lodash.js",
@ -142,13 +153,13 @@ module.exports = function (grunt) {
"src/base/combination/tree.button.js",
"src/base/combination/map.button.js",
"src/base/**/*.js",
"!src/base/tree/**/*.js",
"!src/base/tree/ztree/**/*.js",
"!src/base/single/input/file.js",
"src/case/combo/popup.bubble.js",
"src/case/**/*.js",
"!src/case/colorchooser/**/*.js",
"!src/case/tree/tree.display.js",
"!src/case/tree/ztree/**/*.js",
"dist/widget.js", "dist/fix/fix.compact.js", "ui/js/**/*.js"],
dest: "dist/fineui_without_jquery_polyfill.js"
@ -176,11 +187,11 @@ module.exports = function (grunt) {
"src/core/foundation.js",
"src/core/lodash.js",
"src/core/var.js",
"src/core/proto/array.js",
"src/core/proto/number.js",
"src/core/proto/string.js",
"src/core/proto/date.js",
"src/core/proto/function.js",
"src/core/func/array.js",
"src/core/func/number.js",
"src/core/func/string.js",
"src/core/func/date.js",
"src/core/func/function.js",
"src/core/base.js",
"src/core/ob.js",
"src/core/alias.js",
@ -242,8 +253,10 @@ module.exports = function (grunt) {
dist: {
files: {
"dist/bundle.min.js": ["<%= concat.bundleJs.dest %>"],
"dist/bundle.ie.min.js": ["<%= concat.bundleIEJs.dest %>"],
"dist/utils.min.js": ["<%= concat.utilsJs.dest %>"],
"dist/fineui.min.js": ["<%= concat.fineuiJs.dest %>"]
"dist/fineui.min.js": ["<%= concat.fineuiJs.dest %>"],
"dist/fineui.ie.min.js": ["<%= concat.fineuiIEJs.dest %>"]
}
}
},

7
demo/config.js

@ -1524,7 +1524,12 @@ Demo.CONSTANTS = {
{id: 121, pId: 12, value: "第三级目录1", text: "第三级目录1"},
{id: 122, pId: 12, value: "第三级文件1", text: "第三级文件1"},
{id: 1211, pId: 121, value: "第四级目录1", text: "第四级目录1"},
{id: 12111, pId: 1211, value: "第五级文件1", text: "第五级文件111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"},
{
id: 12111,
pId: 1211,
value: "第五级文件1",
text: "第五级文件111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
},
{id: 2, pId: -1, value: "第一级目录2", text: "第一级目录2"},
{id: 21, pId: 2, value: "第二级目录3", text: "第二级目录3"},
{id: 22, pId: 2, value: "第二级文件2", text: "第二级文件2"},

1
demo/js/base/demo.label.js

@ -9,6 +9,7 @@ Demo.Label = BI.inherit(BI.Widget, {
type: "bi.label",
cls: "layout-bg6",
text: "这是一个label控件,默认居中",
disabled: true,
textAlign: "center"
}, {
type: "bi.label",

5
demo/js/base/editor/demo.textarea_editor.js

@ -5,9 +5,10 @@ Demo.CodeEditor = BI.inherit(BI.Widget, {
render: function () {
var editor = BI.createWidget({
type: "bi.textarea_editor",
cls: "mvc-border",
cls: "bi-border",
width: 600,
height: 400
height: 400,
watermark: "请输入内容"
});
editor.on(BI.TextAreaEditor.EVENT_FOCUS, function () {
BI.Msg.toast("Focus");

12
demo/js/case/combo/demo.text_value_down_list_combo.js

@ -19,26 +19,26 @@ Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
text: "默认值",
value: 11,
items: [[{
text: BI.i18nText("BI-Basic_Number_IN"),
text: "属于",
value: 1,
cls: "dot-e-font"
}, {
text: BI.i18nText("BI-Basic_Not_Number_In"),
text: "不属于",
value: 2,
cls: "dot-e-font"
}], [{
el: {
text: BI.i18nText("BI-Basic_More_Than"),
text: "大于",
value: 3,
cls: "dot-e-font"
iconCls1: "dot-e-font"
},
value: 3,
children: [{
text: BI.i18nText("BI-Basic_Settled_Value"),
text: "固定值",
value: 4,
cls: "dot-e-font"
}, {
text: BI.i18nText("BI-Basic_Average_Value"),
text: "平均值",
value: 5,
cls: "dot-e-font"
}]

215
demo/js/category/customATree/demo.multilayerselecttree.leveltree.js

@ -1,215 +0,0 @@
/**
* guy
* 二级树
* @class BI.PlatformLevelTree
* @extends BI.Select
*/
BI.PlatformLevelTree = BI.inherit(BI.Widget, {
props: {
baseCls: "platform-level-tree",
itemsCreator: BI.emptyFn
},
render: function () {
var self = this, o = this.options;
this.tree = BI.createWidget({
type: "bi.custom_tree",
element: this,
expander: {
type: "bi.select_tree_expander",
isDefaultInit: false,
el: {},
popup: {
type: "bi.custom_tree"
}
},
itemsCreator: function (op, callback) {
o.itemsCreator(op, function (items) {
callback(self._formatItems(items));
});
},
el: {
type: "bi.loader",
next: false,
el: {
type: "bi.button_tree",
chooseType: 0,
layouts: [{
type: "bi.vertical"
}]
}
}
});
this.tree.on(BI.CustomTree.EVENT_CHANGE, function () {
self.fireEvent(BI.PlatformLevelTree.EVENT_CHANGE, arguments);
});
},
_formatItems: function (nodes) {
var self = this;
BI.each(nodes, function (i, node) {
var extend = {};
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
switch (i) {
case 0 :
extend.type = "bi.multilayer_select_tree_first_plus_group_node";
break;
case nodes.length - 1 :
extend.type = "bi.multilayer_select_tree_last_plus_group_node";
break;
default :
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
break;
}
BI.defaults(node, extend);
} else {
switch (i) {
case nodes.length - 1:
extend.type = "bi.multilayer_single_tree_last_tree_leaf_item";
break;
default :
extend.type = "bi.multilayer_single_tree_mid_tree_leaf_item";
}
BI.defaults(node, extend);
}
});
return nodes;
},
populate: function () {
this.tree.populate();
},
getValue: function () {
return this.tree.getValue();
}
});
BI.PlatformLevelTree.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.platform_level_tree", BI.PlatformLevelTree);
BI.DemoLevelTree = BI.inherit(BI.Widget, {
render: function () {
var self = this;
return {
type: "bi.vtape",
items: [{
el: {
type: "bi.platform_level_tree",
ref: function () {
self.tree = this;
},
itemsCreator: function (op, callback) {
if (!op.node) {// 根节点
callback([{
id: 1,
pId: 0,
text: "A",
value: 1,
isParent: true
}, {
id: 2,
pId: 0,
text: "B",
value: 2,
isParent: true,
open: true
}]);
} else {
if (op.node.id == 1) {
callback([
{
id: 11,
pId: 1,
text: "test11",
value: 11,
layer: 1,
isParent: true
},
{
id: 12,
pId: 1,
text: "test12",
value: 12,
layer: 1
},
{
id: 13,
pId: 1,
text: "test13",
value: 13,
layer: 1
},
{
id: 14,
pId: 1,
text: "test14",
value: 14,
layer: 1,
height: 35
},
{
id: 15,
pId: 1,
text: "test15",
value: 15,
layer: 1
},
{
id: 16,
pId: 1,
text: "test16",
value: 16,
layer: 1
},
{id: 17, pId: 1, text: "test17", layer: 1, value: 17}
]);
} else if (op.node.id == 2) {
callback([{
id: 21,
pId: 2,
text: "test21",
value: 21,
layer: 1
},
{
id: 22,
pId: 2,
text: "test22",
value: 22,
layer: 1
}]);
} else if (op.node.id == 11) {
callback([{
id: 111,
pId: 11,
text: "test111",
value: 111,
layer: 2
}]);
}
}
}
}
}, {
el: {
type: "bi.button",
text: "确定",
handler: function () {
BI.Msg.toast(JSON.stringify(self.tree.getValue()));
}
},
height: 25
}]
};
},
mounted: function () {
}
});
BI.shortcut("demo.platform_level_tree", BI.DemoLevelTree);

4
demo/js/config/base.js

@ -22,10 +22,6 @@ Demo.BASE_CONFIG = [{
pId: 2,
text: "toast提示",
value: "demo.toast"
}, {
pId: 2,
text: "message提示",
value: "demo.message"
}, {
pId: 2,
id: 201,

4
demo/js/config/category.js

@ -1,10 +1,6 @@
Demo.CATEGORY_CONFIG = [{
id: 100000,
text: "专题"
}, {
pId: 100000,
text: "自定义一棵树",
value: "demo.platform_level_tree"
}, {
pId: 100000,
text: "可以排序的树",

85
demo/js/core/layout/demo.horizontal.js

@ -7,7 +7,11 @@ Demo.Horizontal = BI.inherit(BI.Widget, {
},
render: function () {
return {
type: "bi.vertical",
vgap: 10,
items: [{
type: "bi.horizontal",
height: 150,
hgap: 10,
items: [{
type: "bi.label",
@ -35,6 +39,87 @@ Demo.Horizontal = BI.inherit(BI.Widget, {
width: 300,
height: 30
}]
}, {
type: "bi.layout",
height: 1,
cls: "bi-border-bottom bi-high-light-border"
}, {
type: "bi.horizontal",
height: 150,
verticalAlign: BI.VerticalAlign.Middle,
horizontalAlign: BI.HorizontalAlign.Left,
vgap: 10,
items: [{
type: "bi.label",
text: "以horizontal实现的vertical_adapt垂直居中",
cls: "layout-bg1",
width: 300,
height: 30
}, {
type: "bi.label",
text: "以horizontal实现的vertical_adapt垂直居中",
cls: "layout-bg2",
width: 300,
height: 30
}]
}, {
type: "bi.layout",
height: 1,
cls: "bi-border-bottom bi-high-light-border"
}, {
type: "bi.horizontal",
height: 150,
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Center,
items: [{
type: "bi.label",
text: "以horizontal代替horizontal_adapt实现的水平居中(单元素)",
cls: "layout-bg1",
width: 300,
height: 30
}]
}, {
type: "bi.layout",
height: 1,
cls: "bi-border-bottom bi-high-light-border"
}, {
type: "bi.horizontal",
height: 150,
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Center,
columnSize: [300, "fill"],
items: [{
type: "bi.label",
text: "以horizontal代替horizontal_adapt实现的用于水平适应布局",
cls: "layout-bg1",
height: 30
}, {
type: "bi.label",
text: "以horizontal代替horizontal_adapt实现的水平自适应列",
cls: "layout-bg2",
height: 30
}]
}, {
type: "bi.layout",
height: 1,
cls: "bi-border-bottom bi-high-light-border"
}, {
type: "bi.center_adapt",
height: 150,
verticalAlign: BI.VerticalAlign.Middle,
horizontalAlign: BI.HorizontalAlign.Center,
items: [{
type: "bi.label",
text: "以horizontal代替center_adapt实现的水平垂直居中",
width: 300,
height: 100,
cls: "layout-bg1"
}]
}, {
type: "bi.layout",
height: 1,
cls: "bi-border-bottom bi-high-light-border"
}]
};
}
});

83
demo/js/core/popup/demo.popover.js

@ -7,18 +7,19 @@ Demo.Func = BI.inherit(BI.Widget, {
},
render: function () {
var id = BI.UUID();
var body;
return {
type: "bi.vertical",
vgap: 10,
items: [{
type: "bi.text_button",
text: "点击弹出Popover(normal size)",
text: "点击弹出Popover(normal size & fixed)",
height: 30,
handler: function () {
BI.Popovers.remove(id);
BI.Popovers.create(id, {
type: "bi.bar_popover",
size: "big",
size: "normal",
header: {
type: "bi.label",
text: "这个是header"
@ -31,7 +32,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}, {
type: "bi.text_button",
text: "点击弹出Popover(small size)",
text: "点击弹出Popover(small size & fixed)",
height: 30,
handler: function () {
BI.Popovers.remove(id);
@ -50,7 +51,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}, {
type: "bi.text_button",
text: "点击弹出Popover(big size)",
text: "点击弹出Popover(big size & fixed)",
height: 30,
handler: function () {
BI.Popovers.remove(id);
@ -67,6 +68,80 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}).open(id);
}
}, {
type: "bi.text_button",
text: "点击弹出Popover(normal size & adapt body区域高度是300)",
height: 30,
handler: function () {
BI.Popovers.remove(id);
BI.Popovers.create(id, {
type: "bi.bar_popover",
size: "normal",
logic: {
dynamic: true
},
header: {
type: "bi.label",
text: "这个是header"
},
body: {
type: "bi.vertical",
items: [{
type: "bi.button_group",
ref: function () {
body = this;
},
items: BI.map(BI.range(0, 10), function () {
return {
type: "bi.label",
text: "1",
height: 30
};
}),
layouts: [{
type: "bi.vertical"
}]
}]
}
}).open(id);
}
}, {
type: "bi.text_button",
text: "点击弹出Popover(small size & adapt body区域高度是900)",
height: 30,
handler: function () {
BI.Popovers.remove(id);
BI.Popovers.create(id, {
type: "bi.bar_popover",
size: "small",
logic: {
dynamic: true
},
header: {
type: "bi.label",
text: "这个是header"
},
body: {
type: "bi.vertical",
items: [{
type: "bi.button_group",
ref: function () {
body = this;
},
items: BI.map(BI.range(0, 30), function () {
return {
type: "bi.label",
text: "1",
height: 30
};
}),
layouts: [{
type: "bi.vertical"
}]
}]
}
}).open(id);
}
}, {
type: "bi.text_button",
text: "点击弹出Popover(custom)",

2
demo/js/widget/multiselect/demo.multi_select_combo.js

@ -39,7 +39,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
_itemsCreator: function (options, callback) {
var self = this;
var items = [];
var items = Demo.CONSTANTS.ITEMS;
var keywords = (options.keywords || []).slice();
if (options.keyword) {
keywords.push(options.keyword);

5
demo/js/widget/multiselect/demo.multi_select_tree.js → demo/js/widget/multiselect/demo.multi_select_list.js

@ -18,7 +18,10 @@ Demo.MultiSelectList = BI.inherit(BI.Widget, {
self.list = ref;
},
itemsCreator: BI.bind(this._itemsCreator, this),
value: {
type: 1,
value: ["柳州市城贸金属材料有限责任公司", "柳州市建福房屋租赁有限公司", "柳州市迅昌数码办公设备有限责任公司"]
}
});
widget.on(BI.MultiSelectCombo.EVENT_CONFIRM, function () {
@ -42,7 +45,7 @@ Demo.MultiSelectList = BI.inherit(BI.Widget, {
_itemsCreator: function (options, callback) {
var self = this;
var items = [];
var items = Demo.CONSTANTS.ITEMS;
var keywords = (options.keywords || []).slice();
if (options.keyword) {
keywords.push(options.keyword);

23
demo/js/widget/tree/demo.multilayer_single_level_tree.js

@ -44,7 +44,28 @@ Demo.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
},
mounted: function () {
this.tree.populate(BI.deepClone(Demo.CONSTANTS.TREE));
var tree = [
// {id: -2, pId: 0, value: "根目录1", text: "根目录1"},
{id: -1, pId: 0, value: "根目录", text: "根目录"},
{id: 1, pId: -1, value: "第一级目录1", text: "第一级目录1"},
{id: 11, pId: 1, value: "第二级文件1", text: "第二级文件1"},
{id: 12, pId: 1, value: "第二级目录2", text: "第二级目录2"},
{id: 121, pId: 12, value: "第三级目录1", text: "第三级目录1"},
{id: 122, pId: 12, value: "第三级文件1", text: "第三级文件1"},
{id: 1211, pId: 121, value: "第四级目录1", text: "第四级目录1"},
{id: 2, pId: -1, value: "第一级目录2", text: "第一级目录2"},
{id: 21, pId: 2, value: "第二级目录3", text: "第二级目录3"},
{id: 22, pId: 2, value: "第二级文件2", text: "第二级文件2"},
{id: 211, pId: 21, value: "第三级目录2", text: "第三级目录2"},
{id: 212, pId: 21, value: "第三级文件2", text: "第三级文件2"},
{id: 2111, pId: 211, value: "第四级文件1", text: "第四级文件1"},
{id: 3, pId: -1, value: "第一级目录3", text: "第一级目录3"},
{id: 31, pId: 3, value: "第二级文件2", text: "第二级文件2"},
{id: 33, pId: 3, value: "第二级目录3", text: "第二级目录1"},
{id: 32, pId: 3, value: "第二级文件3", text: "第二级文件3"},
{id: 331, pId: 33, value: "第三级文件1", text: "第三级文件1"}
];
this.tree.populate(tree);
}
});

427
dist/base.css vendored

@ -421,6 +421,7 @@
}
.bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important;
line-height: 0;
z-index: 10000000;
}
.bi-bubble-combo .bubble-combo-triangle-left {
@ -428,13 +429,14 @@
position: absolute;
width: 6px;
height: 16px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: -3px;
margin-left: -3px;
margin-top: 4px;
content: "";
transform: rotate(-45deg);
}
@ -443,6 +445,7 @@
position: absolute;
width: 6px;
height: 16px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute;
@ -458,12 +461,13 @@
position: absolute;
width: 16px;
height: 6px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute;
width: 6px;
height: 6px;
margin-left: 3px;
margin-left: 4px;
margin-top: -3px;
content: "";
transform: rotate(45deg);
@ -473,12 +477,13 @@
position: absolute;
width: 16px;
height: 6px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute;
width: 6px;
height: 6px;
margin-left: 3px;
margin-left: 4px;
margin-top: 2px;
content: "";
transform: rotate(-135deg);
@ -557,6 +562,10 @@
.bi-text-value-down-list-combo:hover > .bi-border {
border-color: #3685f2;
}
.bi-bubble-bar-popup-view .bar-popup-container {
max-height: 456px;
}
/*************BI.SearchEditor******************/
.bi-search-editor {
-webkit-border-radius: 2px;
@ -653,363 +662,25 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.farbtastic .wheel {
background: url('images/1x/background/wheel.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/wheel.png');
_background: none;
}
.farbtastic .overlay {
background: url('images/1x/background/mask.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/mask.png');
_background: none;
}
.farbtastic .marker {
background: url('images/1x/background/marker.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/marker.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.center_open {
background: url('images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.roots_open {
background: url('images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.bottom_open {
background: url('images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.ztree li ul.line {
background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_1.png');
_background: none;
}
.bi-theme-dark .ztree li ul.line {
background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_1.png');
_background: none;
}
.ztree li span.button.chk.checkbox_false_full {
background: url('images/2x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_normal.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_false_full_focus {
background: url('images/2x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_normal.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_false_part {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_false_part_focus {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_full {
background: url('images/2x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_active.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_full_focus {
background: url('images/2x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_active.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_part {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_part_focus {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_full {
background: url('images/1x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_normal.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_full_focus {
background: url('images/1x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_normal.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_part {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_part_focus {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_full {
background: url('images/1x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_active.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_full_focus {
background: url('images/1x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_active.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_part {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_part_focus {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree li span.button.root_open {
background: url('images/1x/icon/tree_expand_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_1.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.root_open {
background: url('images/1x/icon/dark/tree_expand_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_1.png');
_background: none;
}
.ztree li span.button.root_close {
background: url('images/1x/icon/tree_collapse_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_1.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.root_close {
background: url('images/1x/icon/dark/tree_collapse_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_1.png');
_background: none;
}
.ztree li span.button.roots_open {
background: url('images/1x/icon/tree_expand_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_open {
background: url('images/1x/icon/dark/tree_expand_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_2.png');
_background: none;
}
.ztree li span.button.roots_close {
background: url('images/1x/icon/tree_collapse_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_close {
background: url('images/1x/icon/dark/tree_collapse_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_2.png');
_background: none;
}
.ztree li span.button.center_open {
background: url('images/1x/icon/tree_expand_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_open {
background: url('images/1x/icon/dark/tree_expand_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_3.png');
_background: none;
}
.ztree li span.button.center_close {
background: url('images/1x/icon/tree_collapse_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_close {
background: url('images/1x/icon/dark/tree_collapse_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_3.png');
_background: none;
}
.ztree li span.button.bottom_open {
background: url('images/1x/icon/tree_expand_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_open {
background: url('images/1x/icon/dark/tree_expand_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_4.png');
_background: none;
}
.ztree li span.button.bottom_close {
background: url('images/1x/icon/tree_collapse_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_close {
background: url('images/1x/icon/dark/tree_collapse_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_4.png');
_background: none;
}
.ztree li span.button.roots_docu {
background: url('images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_docu {
background: url('images/1x/icon/dark/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_2.png');
_background: none;
}
.ztree li span.button.center_docu {
background: url('images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_docu {
background: url('images/1x/icon/dark/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_3.png');
_background: none;
}
.ztree li span.button.bottom_docu {
background: url('images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_docu {
background: url('images/1x/icon/dark/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_4.png');
_background: none;
}
.ztree li span.button.ico_loading {
background: url('images/1x/icon/loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/loading.gif');
_background: none;
}
.base-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_1.png');
_background: none;
}
.bi-theme-dark .base-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_1.png');
_background: none;
}
.first-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-theme-dark .first-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_2.png');
_background: none;
}
.mid-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-theme-dark .mid-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_3.png');
_background: none;
}
.last-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.bi-theme-dark .last-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_4.png');
_background: none;
}
.loading-background {
background: url('images/2x/icon/loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/loading.gif');
background-size: contain;
_background: none;
}
.auto-color-background {
background: url('images/2x/background/auto_color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/auto_color.png');
background-size: contain;
_background: none;
}
.auto-color-normal-background {
background: url('images/2x/background/auto_color_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/auto_color_normal.png');
background-size: contain;
_background: none;
}
.auto-color-normal-disabled-background {
background: url('images/2x/background/auto_color_normal_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/auto_color_normal_disable.png');
background-size: contain;
_background: none;
}
.trans-color-background {
background: url('images/2x/background/trans_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/trans_normal.png');
background-size: contain;
_background: none;
}
.trans-color-disabled-background {
background: url('images/2x/background/trans_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/trans_disable.png');
background-size: contain;
_background: none;
}
.auto-color-background.hack {
background: url('images/1x/background/auto_color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/auto_color.png');
_background: none;
}
.auto-color-normal-background.hack {
background: url('images/1x/background/auto_color_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/auto_color_normal.png');
_background: none;
}
.auto-color-normal-disabled-background.hack {
background: url('images/1x/background/auto_color_normal_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/auto_color_normal_disable.png');
_background: none;
}
.trans-color-background.hack {
background: url('images/1x/background/trans_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/trans_normal.png');
_background: none;
}
.trans-color-disabled-background.hack {
background: url('images/1x/background/trans_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/trans_disable.png');
_background: none;
}
.bi-pane {
min-height: 25px;
}
.bi-pane.loading-status {
min-height: 55px;
}
.bi-pane .loading-container {
background-color: rgba(247, 248, 250, 0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00f7f8fa,endColorstr=#00f7f8fa);
}
.bi-loading-widget div {
.bi-loading-widget {
font-size: 0;
}
.bi-loading-widget .animate-rect {
background-color: rgba(54, 133, 242, 0.9);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e63685f2,endColorstr=#e63685f2);
-webkit-border-radius: 2.5px;
-moz-border-radius: 2.5px;
border-radius: 2.5px;
-webkit-border-radius: 1.5px;
-moz-border-radius: 1.5px;
border-radius: 1.5px;
-webkit-animation: loading-widget 0.8s infinite linear;
-moz-animation: loading-widget 0.8s infinite linear;
-ms-animation: loading-widget 0.8s infinite linear;
@ -1116,12 +787,11 @@
}
}
.bi-loading-widget.hack {
background: url('images/2x/icon/loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/loading.gif');
background-size: contain;
background: url('images/1x/icon/wave_loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/wave_loading.gif');
_background: none;
}
.bi-loading-widget.hack div {
.bi-loading-widget.hack .animate-rect {
background-color: rgba(54, 133, 242, 0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2);
}
@ -1171,6 +841,14 @@ body .bi-button,
border-radius: 2px;
border: 1px solid #3685f2;
background-color: #3685f2;
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
text-align: center;
vertical-align: middle;
cursor: pointer;
@ -1294,7 +972,7 @@ body .bi-button.button-warning.clear .b-font:before,
body .bi-button.button-error,
#body .bi-button.button-error {
background-color: #ff4949;
border-color: #e85050;
border-color: #FF4949;
}
body .bi-button.button-error,
#body .bi-button.button-error,
@ -1545,7 +1223,7 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
-webkit-border-radius: 40px 40px 40px 40px;
-moz-border-radius: 40px 40px 40px 40px;
border-radius: 40px 40px 40px 40px;
background-color: #d4dadd;
background-color: #d0d4da;
}
.bi-switch:active,
.bi-switch.active {
@ -1556,6 +1234,25 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
-moz-border-radius: 9px 9px 9px 9px;
border-radius: 9px 9px 9px 9px;
}
.bi-switch.disabled {
background-color: #F2F4F7;
}
.bi-switch.disabled:active {
background-color: #F2F4F7;
}
.bi-theme-dark .bi-switch {
background-color: #606479;
}
.bi-theme-dark .bi-switch:active,
.bi-theme-dark .bi-switch.active {
background-color: #3685f2;
}
.bi-theme-dark .bi-switch.disabled {
background-color: #2F3149;
}
.bi-theme-dark .bi-switch.disabled:active {
background-color: #2F3149;
}
.bi-multifile-editor .multifile-editor {
text-align: right;
@ -1694,7 +1391,7 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
}
.bi-tooltip.tooltip-warning {
background: #ff4949;
border: 1px solid #e85050;
border: 1px solid #FF4949;
}
.bi-branch-tree .bi-branch-tree-view {
min-width: 300px;
@ -1957,18 +1654,6 @@ ul.ztree.zTreeDragUL {
.bi-trigger .bi-trigger-icon-button {
font-size: 16px;
}
.bi-trigger .trigger-up {
display: none;
}
.bi-trigger .trigger-down {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-up {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-down {
display: none;
}
.bi-select-text-trigger {
-webkit-border-radius: 2px;

462
dist/base.js vendored

File diff suppressed because it is too large Load Diff

453
dist/bundle.css vendored

@ -1066,7 +1066,7 @@ textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.button-warning:hover,
.bi-list-item-select.button-warning.hover {
@ -1087,7 +1087,7 @@ textarea {
}
.bi-list-item-select.button-warning:hover.bi-high-light-border,
.bi-list-item-select.button-warning.hover.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.button-warning:active,
.bi-list-item-select.button-warning.active {
@ -1108,7 +1108,7 @@ textarea {
}
.bi-list-item-select.button-warning:active.bi-high-light-border,
.bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.disabled {
color: #9ea6b2 !important;
@ -1937,6 +1937,15 @@ textarea {
vertical-align: middle;
content: ' ';
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item {
display: inline-block;
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-center-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout:after {
display: inline-block;
@ -1945,6 +1954,15 @@ textarea {
vertical-align: middle;
content: ' ';
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item {
display: inline-block;
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-theme-dark {
background-color: #191B2B;
color: #d6e0dc;
@ -2375,6 +2393,7 @@ textarea {
}
.bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important;
line-height: 0;
z-index: 10000000;
}
.bi-bubble-combo .bubble-combo-triangle-left {
@ -2382,13 +2401,14 @@ textarea {
position: absolute;
width: 6px;
height: 16px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: -3px;
margin-left: -3px;
margin-top: 4px;
content: "";
transform: rotate(-45deg);
}
@ -2397,6 +2417,7 @@ textarea {
position: absolute;
width: 6px;
height: 16px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute;
@ -2412,12 +2433,13 @@ textarea {
position: absolute;
width: 16px;
height: 6px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute;
width: 6px;
height: 6px;
margin-left: 3px;
margin-left: 4px;
margin-top: -3px;
content: "";
transform: rotate(45deg);
@ -2427,12 +2449,13 @@ textarea {
position: absolute;
width: 16px;
height: 6px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute;
width: 6px;
height: 6px;
margin-left: 3px;
margin-left: 4px;
margin-top: 2px;
content: "";
transform: rotate(-135deg);
@ -2511,6 +2534,10 @@ textarea {
.bi-text-value-down-list-combo:hover > .bi-border {
border-color: #3685f2;
}
.bi-bubble-bar-popup-view .bar-popup-container {
max-height: 456px;
}
/*************BI.SearchEditor******************/
.bi-search-editor {
-webkit-border-radius: 2px;
@ -2607,363 +2634,25 @@ textarea {
-moz-border-radius: 2px;
border-radius: 2px;
}
.farbtastic .wheel {
background: url('images/1x/background/wheel.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/wheel.png');
_background: none;
}
.farbtastic .overlay {
background: url('images/1x/background/mask.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/mask.png');
_background: none;
}
.farbtastic .marker {
background: url('images/1x/background/marker.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/marker.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.center_open {
background: url('images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.roots_open {
background: url('images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.bottom_open {
background: url('images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.ztree li ul.line {
background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_1.png');
_background: none;
}
.bi-theme-dark .ztree li ul.line {
background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_1.png');
_background: none;
}
.ztree li span.button.chk.checkbox_false_full {
background: url('images/2x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_normal.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_false_full_focus {
background: url('images/2x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_normal.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_false_part {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_false_part_focus {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_full {
background: url('images/2x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_active.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_full_focus {
background: url('images/2x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_active.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_part {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_part_focus {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_full {
background: url('images/1x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_normal.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_full_focus {
background: url('images/1x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_normal.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_part {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_part_focus {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_full {
background: url('images/1x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_active.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_full_focus {
background: url('images/1x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_active.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_part {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_part_focus {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree li span.button.root_open {
background: url('images/1x/icon/tree_expand_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_1.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.root_open {
background: url('images/1x/icon/dark/tree_expand_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_1.png');
_background: none;
}
.ztree li span.button.root_close {
background: url('images/1x/icon/tree_collapse_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_1.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.root_close {
background: url('images/1x/icon/dark/tree_collapse_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_1.png');
_background: none;
}
.ztree li span.button.roots_open {
background: url('images/1x/icon/tree_expand_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_open {
background: url('images/1x/icon/dark/tree_expand_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_2.png');
_background: none;
}
.ztree li span.button.roots_close {
background: url('images/1x/icon/tree_collapse_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_close {
background: url('images/1x/icon/dark/tree_collapse_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_2.png');
_background: none;
}
.ztree li span.button.center_open {
background: url('images/1x/icon/tree_expand_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_open {
background: url('images/1x/icon/dark/tree_expand_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_3.png');
_background: none;
}
.ztree li span.button.center_close {
background: url('images/1x/icon/tree_collapse_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_close {
background: url('images/1x/icon/dark/tree_collapse_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_3.png');
_background: none;
}
.ztree li span.button.bottom_open {
background: url('images/1x/icon/tree_expand_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_open {
background: url('images/1x/icon/dark/tree_expand_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_4.png');
_background: none;
}
.ztree li span.button.bottom_close {
background: url('images/1x/icon/tree_collapse_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_close {
background: url('images/1x/icon/dark/tree_collapse_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_4.png');
_background: none;
}
.ztree li span.button.roots_docu {
background: url('images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_docu {
background: url('images/1x/icon/dark/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_2.png');
_background: none;
}
.ztree li span.button.center_docu {
background: url('images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_docu {
background: url('images/1x/icon/dark/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_3.png');
_background: none;
}
.ztree li span.button.bottom_docu {
background: url('images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_docu {
background: url('images/1x/icon/dark/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_4.png');
_background: none;
}
.ztree li span.button.ico_loading {
background: url('images/1x/icon/loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/loading.gif');
_background: none;
}
.base-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_1.png');
_background: none;
}
.bi-theme-dark .base-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_1.png');
_background: none;
}
.first-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-theme-dark .first-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_2.png');
_background: none;
}
.mid-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-theme-dark .mid-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_3.png');
_background: none;
}
.last-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.bi-theme-dark .last-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_4.png');
_background: none;
}
.loading-background {
background: url('images/2x/icon/loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/loading.gif');
background-size: contain;
_background: none;
}
.auto-color-background {
background: url('images/2x/background/auto_color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/auto_color.png');
background-size: contain;
_background: none;
}
.auto-color-normal-background {
background: url('images/2x/background/auto_color_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/auto_color_normal.png');
background-size: contain;
_background: none;
}
.auto-color-normal-disabled-background {
background: url('images/2x/background/auto_color_normal_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/auto_color_normal_disable.png');
background-size: contain;
_background: none;
}
.trans-color-background {
background: url('images/2x/background/trans_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/trans_normal.png');
background-size: contain;
_background: none;
}
.trans-color-disabled-background {
background: url('images/2x/background/trans_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/trans_disable.png');
background-size: contain;
_background: none;
}
.auto-color-background.hack {
background: url('images/1x/background/auto_color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/auto_color.png');
_background: none;
}
.auto-color-normal-background.hack {
background: url('images/1x/background/auto_color_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/auto_color_normal.png');
_background: none;
}
.auto-color-normal-disabled-background.hack {
background: url('images/1x/background/auto_color_normal_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/auto_color_normal_disable.png');
_background: none;
}
.trans-color-background.hack {
background: url('images/1x/background/trans_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/trans_normal.png');
_background: none;
}
.trans-color-disabled-background.hack {
background: url('images/1x/background/trans_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/trans_disable.png');
_background: none;
}
.bi-pane {
min-height: 25px;
}
.bi-pane.loading-status {
min-height: 55px;
}
.bi-pane .loading-container {
background-color: rgba(247, 248, 250, 0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00f7f8fa,endColorstr=#00f7f8fa);
}
.bi-loading-widget div {
.bi-loading-widget {
font-size: 0;
}
.bi-loading-widget .animate-rect {
background-color: rgba(54, 133, 242, 0.9);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e63685f2,endColorstr=#e63685f2);
-webkit-border-radius: 2.5px;
-moz-border-radius: 2.5px;
border-radius: 2.5px;
-webkit-border-radius: 1.5px;
-moz-border-radius: 1.5px;
border-radius: 1.5px;
-webkit-animation: loading-widget 0.8s infinite linear;
-moz-animation: loading-widget 0.8s infinite linear;
-ms-animation: loading-widget 0.8s infinite linear;
@ -3070,12 +2759,11 @@ textarea {
}
}
.bi-loading-widget.hack {
background: url('images/2x/icon/loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/loading.gif');
background-size: contain;
background: url('images/1x/icon/wave_loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/wave_loading.gif');
_background: none;
}
.bi-loading-widget.hack div {
.bi-loading-widget.hack .animate-rect {
background-color: rgba(54, 133, 242, 0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2);
}
@ -3125,6 +2813,14 @@ body .bi-button,
border-radius: 2px;
border: 1px solid #3685f2;
background-color: #3685f2;
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
text-align: center;
vertical-align: middle;
cursor: pointer;
@ -3248,7 +2944,7 @@ body .bi-button.button-warning.clear .b-font:before,
body .bi-button.button-error,
#body .bi-button.button-error {
background-color: #ff4949;
border-color: #e85050;
border-color: #FF4949;
}
body .bi-button.button-error,
#body .bi-button.button-error,
@ -3499,7 +3195,7 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
-webkit-border-radius: 40px 40px 40px 40px;
-moz-border-radius: 40px 40px 40px 40px;
border-radius: 40px 40px 40px 40px;
background-color: #d4dadd;
background-color: #d0d4da;
}
.bi-switch:active,
.bi-switch.active {
@ -3510,6 +3206,25 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
-moz-border-radius: 9px 9px 9px 9px;
border-radius: 9px 9px 9px 9px;
}
.bi-switch.disabled {
background-color: #F2F4F7;
}
.bi-switch.disabled:active {
background-color: #F2F4F7;
}
.bi-theme-dark .bi-switch {
background-color: #606479;
}
.bi-theme-dark .bi-switch:active,
.bi-theme-dark .bi-switch.active {
background-color: #3685f2;
}
.bi-theme-dark .bi-switch.disabled {
background-color: #2F3149;
}
.bi-theme-dark .bi-switch.disabled:active {
background-color: #2F3149;
}
.bi-multifile-editor .multifile-editor {
text-align: right;
@ -3648,7 +3363,7 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
}
.bi-tooltip.tooltip-warning {
background: #ff4949;
border: 1px solid #e85050;
border: 1px solid #FF4949;
}
.bi-branch-tree .bi-branch-tree-view {
min-width: 300px;
@ -3911,18 +3626,6 @@ ul.ztree.zTreeDragUL {
.bi-trigger .bi-trigger-icon-button {
font-size: 16px;
}
.bi-trigger .trigger-up {
display: none;
}
.bi-trigger .trigger-down {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-up {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-down {
display: none;
}
.bi-select-text-trigger {
-webkit-border-radius: 2px;
@ -4310,7 +4013,7 @@ body {
-o-user-select: none;
user-select: none;
color: #3d4d66;
font: normal 12px "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti;
font: normal 12px "Microsoft YaHei", "PingFangSC-Light", SimHei, SimSun, FangSong, KaiTi, Arial, Tahoma, Verdana, "Times New Roman";
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none;

82862
dist/bundle.ie.js vendored

File diff suppressed because one or more lines are too long

39
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

2575
dist/bundle.js vendored

File diff suppressed because it is too large Load Diff

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

76
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

461
dist/case.js vendored

@ -1069,7 +1069,7 @@ BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
width: 12,
el: {
type: "bi.layout",
cls: "base-line-conn-background",
cls: (o.pNode && o.pNode.isLastNode) ? "" : "base-line-conn-background",
width: 12,
height: o.height
}
@ -1077,7 +1077,7 @@ BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
width: 24,
el: {
type: "bi.layout",
cls: "mid-line-conn-background",
cls: "first-line-conn-background",
width: 24,
height: o.height
}
@ -1260,7 +1260,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
width: 12,
el: {
type: "bi.layout",
cls: "base-line-conn-background",
cls: (o.pNode && o.pNode.isLastNode) ? "" : "base-line-conn-background",
width: 12,
height: o.height
}
@ -1268,7 +1268,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
width: 24,
el: {
type: "bi.layout",
cls: "mid-line-conn-background",
cls: "last-line-conn-background",
width: 24,
height: o.height
}
@ -1364,7 +1364,7 @@ BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
width: 12,
el: {
type: "bi.layout",
cls: "base-line-conn-background",
cls: (o.pNode && o.pNode.isLastNode) ? "" : "base-line-conn-background",
width: 12,
height: o.height
}
@ -1677,23 +1677,26 @@ BI.Calendar = BI.inherit(BI.Widget, {
// 是周几
log.FDay = De.getDay();
// 当前BI.StartOfWeek与周日对齐后的FDay是周几
var offSetFDay = (7 - BI.StartOfWeek + log.FDay) % 7;
// 当前月页第一天是几号
log.PDay = MD[M === 0 ? 11 : M - 1] - log.FDay + 1;
log.PDay = MD[M === 0 ? 11 : M - 1] - offSetFDay + 1;
log.NDay = 1;
var items = [];
BI.each(BI.range(42), function (i) {
var td = {}, YY = log.ymd[0], MM = log.ymd[1] + 1, DD;
// 上个月的日期
if (i < log.FDay) {
if (i < offSetFDay) {
td.lastMonth = true;
DD = i + log.PDay;
// 上一年
MM === 1 && (YY -= 1);
MM = MM === 1 ? 12 : MM - 1;
} else if (i >= log.FDay && i < log.FDay + MD[log.ymd[1]]) {
DD = i - log.FDay + 1;
if (i - log.FDay + 1 === log.ymd[2]) {
} else if (i >= offSetFDay && i < offSetFDay + MD[log.ymd[1]]) {
DD = i - offSetFDay + 1;
if (i - offSetFDay + 1 === log.ymd[2]) {
td.currentDay = true;
}
} else {
@ -1714,7 +1717,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
_init: function () {
BI.Calendar.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var items = BI.map(BI.Date._SDN.slice(0, 7), function (i, value) {
var items = BI.map(this._getWeekLabel(), function (i, value) {
return {
type: "bi.label",
height: 24,
@ -1781,6 +1784,12 @@ BI.Calendar = BI.inherit(BI.Widget, {
}))));
},
_getWeekLabel: function () {
return BI.map(BI.range(0, 7), function (idx, v) {
return BI.Date._SDN[(v + BI.StartOfWeek) % 7];
});
},
isFrontDate: function () {
var o = this.options, c = this._const;
var Y = o.year, M = o.month, De = BI.getDate(), day = De.getDay();
@ -2062,7 +2071,7 @@ BI.shortcut("bi.first_tree_node_checkbox", BI.FirstTreeNodeCheckbox);/**
*/
BI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend( BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "tree-collapse-icon-type4",
iconWidth: 24,
iconHeight: 24
@ -2074,10 +2083,10 @@ BI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, {
},
setSelected: function (v) {
BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v === true) {
this.element.addClass("tree-expand-icon-type3");
if (v === true) {
this.element.addClass("tree-expand-icon-type4");
} else {
this.element.removeClass("tree-expand-icon-type3");
this.element.removeClass("tree-expand-icon-type4");
}
}
});
@ -3777,7 +3786,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
baseCls: "bi-bubble-combo",
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
direction: "bottom,left", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整
@ -3933,22 +3942,18 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
case "left,top":
case "left,bottom":
this._createLeftTriangle();
//this.combo.getView().showLine("right");
break;
case "right,top":
case "right,bottom":
this._createRightTriangle();
//this.combo.getView().showLine("left");
break;
case "top,left":
case "top,right":
this._createTopTriangle();
//this.combo.getView().showLine("bottom");
break;
case "bottom,left":
case "bottom,right":
this._createBottomTriangle();
//this.combo.getView().showLine("top");
break;
}
},
@ -3956,7 +3961,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
//this.combo.getView() && this.combo.getView().hideLine();
},
hideView: function () {
@ -3994,65 +3998,14 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
_defaultConfig: function () {
var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);
return BI.extend(config, {
baseCls: config.baseCls + " bi-bubble-popup-view"
baseCls: config.baseCls + " bi-bubble-popup-view",
minWidth: 220,
maxWidth: 300,
minHeight: 90
});
},
_init: function () {
BI.BubblePopupView.superclass._init.apply(this, arguments);
},
showLine: function (direction) {
var pos = {}, op = {};
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -1
};
op = {width: 3};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -1
};
op = {width: 3};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -1
};
op = {height: 3};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -1
};
op = {height: 3};
break;
default:
break;
}
this.line = BI.createWidget(op, {
type: "bi.layout",
cls: "bubble-popup-line bi-high-light-background"
});
pos.el = this.line;
BI.createWidget({
type: "bi.absolute",
element: this,
items: [pos]
});
},
hideLine: function () {
this.line && this.line.destroy();
}
});
@ -4068,7 +4021,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
_defaultConfig: function () {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view",
buttons: [{value: BI.i18nText("BI-Basic_Cancel"), ghost: true}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
});
},
_init: function () {
@ -4079,12 +4035,12 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = [];
BI.each(o.buttons, function (i, buttonOpt) {
if(BI.isWidget(buttonOpt)) {
if (BI.isWidget(buttonOpt)) {
items.push(buttonOpt);
}else{
} else {
items.push(BI.extend({
type: "bi.button",
height: 30,
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
@ -4092,12 +4048,34 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
return BI.createWidget({
type: "bi.right_vertical_adapt",
type: "bi.center",
height: 44,
hgap: 10,
bgap: 10,
rgap: 15,
items: [{
type: "bi.right_vertical_adapt",
lgap: 10,
items: items
}]
});
},
_createView: function () {
var o = this.options;
var button = BI.createWidget({
type: "bi.button_group",
items: [o.el],
layouts: [{
type: "bi.vertical",
cls: "bar-popup-container",
hgap: 15,
tgap: 10
}]
});
button.element.css("min-height", o.minHeight - 44);
return button;
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
@ -4111,22 +4089,42 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
*/
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: {
props: function () {
return {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250
buttons: [{
level: "ignore",
value: false,
text: BI.i18nText("BI-Basic_Cancel")
}, {
value: true,
text: BI.i18nText("BI-Basic_Sure")
}]
};
},
render: function(){
render: function () {
var self = this, o = this.options;
var buttons = BI.map(o.buttons, function (index, buttonOpt) {
if (BI.isWidget(buttonOpt)) {
return buttonOpt;
}
return BI.extend({
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
}, buttonOpt);
});
return {
type: "bi.bubble_bar_popup_view",
ref: function () {
self.popup = this;
},
el: {
type: "bi.vertical",
items: [{
type: "bi.label",
text: o.text,
whiteSpace: "normal",
@ -4134,40 +4132,13 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
ref: function () {
self.text = this;
}
}],
hgap: 10,
tgap: 25,
bgap: 10
},
buttons: [{
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}]
buttons: buttons
};
},
populate: function (v) {
this.text.setText(v || this.options.text);
},
showLine: function (direction) {
this.popup.showLine(direction);
},
hideLine: function () {
this.popup.hideLine();
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";
@ -4543,7 +4514,9 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
iconWrapperWidth: o.iconWrapperWidth,
title: o.title,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
@ -4584,8 +4557,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.options.tipType = "warning";
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
}
}
@ -4608,7 +4583,8 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
}
});
BI.IconTextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);/**
BI.shortcut("bi.icon_text_value_combo", BI.IconTextValueCombo);
/**
* Created by Windy on 2017/12/12.
*/
BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
@ -4751,7 +4727,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
action: function () {
// self.trigger.stopEditing();
self.trigger.stopEditing();
}
}, {
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
@ -4815,6 +4791,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
},
populate: function (items) {
this.options.items = items;
this.combo.populate(items);
},
@ -5246,7 +5223,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
@ -5285,8 +5263,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error");
}
}
@ -5309,7 +5289,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
}
});
BI.TextValueCombo.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.text_value_combo", BI.TextValueCombo);/**
BI.shortcut("bi.text_value_combo", BI.TextValueCombo);
/**
* @class BI.SmallTextValueCombo
* @extend BI.Widget
* combo : text + icon, popup : text
@ -5458,7 +5439,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
this._createValueMap();
var value;
if(BI.isNotNull(o.value)){
if(BI.isNotNull(o.value)) {
value = this._digest(o.value);
}
this.trigger = BI.createWidget({
@ -5482,13 +5463,19 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
});
this.combo.on(BI.DownListCombo.EVENT_CHANGE, function () {
self.setValue(self.combo.getValue()[0].value);
var currentVal = self.combo.getValue()[0].value;
if (currentVal !== self.value) {
self.setValue(currentVal);
self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);
}
});
this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, function () {
self.setValue(self.combo.getValue()[0].childValue);
var currentVal = self.combo.getValue()[0].childValue;
if (currentVal !== self.value) {
self.setValue(currentVal);
self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);
}
});
},
@ -5507,6 +5494,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
},
_digest: function (v) {
this.value = v;
return this.valueMap[v];
},
@ -6341,7 +6329,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
title = self.stateValue[0];
}
return title;
}
},
warningTitle: o.warningTitle,
tipType: o.tipType
});
this.text.on(BI.TextButton.EVENT_CHANGE, function () {
BI.nextTick(function () {
@ -6531,6 +6521,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.removeClass("state-editor-infinite-text");
}
}
},
setTipType: function (v) {
this.text.options.tipType = v;
}
});
BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE";
@ -6551,7 +6545,8 @@ BI.StateEditor.EVENT_RESTRICT = "EVENT_RESTRICT";
BI.StateEditor.EVENT_SPACE = "EVENT_SPACE";
BI.StateEditor.EVENT_EMPTY = "EVENT_EMPTY";
BI.shortcut("bi.state_editor", BI.StateEditor);/**
BI.shortcut("bi.state_editor", BI.StateEditor);
/**
* 无限制-已选择状态输入框
* Created by GUY on 2016/5/18.
* @class BI.SimpleStateEditor
@ -6819,7 +6814,7 @@ BI.MultiPopupView = BI.inherit(BI.PopupView, {
_defaultConfig: function () {
var conf = BI.MultiPopupView.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-multi-list-view",
_baseCls: (conf._baseCls || "") + " bi-multi-list-view",
buttons: [BI.i18nText("BI-Basic_Sure")]
});
},
@ -7979,7 +7974,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-all-count-pager",
height: 30,
height: 20,
pages: 1, // 必选项
curr: 1, // 初始化当前页, pages为数字时可用,
count: 1 // 总行数
@ -7999,7 +7994,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
value: o.curr,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
width: 35,
height: 20
height: 16
});
this.pager = BI.createWidget({
@ -8149,7 +8144,7 @@ BI.DirectionPager = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-direction-pager",
height: 30,
height: 20,
horizontal: {
pages: false, // 总页数
curr: 1, // 初始化当前页, pages为数字时可用
@ -8182,19 +8177,19 @@ BI.DirectionPager = BI.inherit(BI.Widget, {
element: this,
items: [{
el: this.vpager,
top: 5,
top: 0,
right: 74
}, {
el: this.vlabel,
top: 5,
top: 0,
right: 111
}, {
el: this.hpager,
top: 5,
top: 0,
right: -9
}, {
el: this.hlabel,
top: 5,
top: 0,
right: 28
}]
});
@ -8957,77 +8952,6 @@ BI.MultiSelectBar = BI.inherit(BI.BasicButton, {
BI.MultiSelectBar.EVENT_CHANGE = "MultiSelectBar.EVENT_CHANGE";
BI.shortcut("bi.multi_select_bar", BI.MultiSelectBar);
/**
* guy
* 异步树
* @class BI.DisplayTree
* @extends BI.TreeView
*/
BI.DisplayTree = BI.inherit(BI.TreeView, {
_defaultConfig: function () {
return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-display-tree"
});
},
_init: function () {
BI.DisplayTree.superclass._init.apply(this, arguments);
},
// 配置属性
_configSetting: function () {
var setting = {
view: {
selectedMulti: false,
dblClickExpand: false,
showIcon: false,
nameIsHTML: true,
showTitle: false
},
data: {
key: {
title: "title",
name: "text"
},
simpleData: {
enable: true
}
},
callback: {
beforeCollapse: beforeCollapse
}
};
function beforeCollapse (treeId, treeNode) {
return false;
}
return setting;
},
_dealWidthNodes: function (nodes) {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options;
BI.each(nodes, function (i, node) {
if (node.text == null) {
if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";
}
}
});
return nodes;
},
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {
BI.DisplayTree.superclass.destroy.apply(this, arguments);
}
});
BI.DisplayTree.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.display_tree", BI.DisplayTree);/**
* guy
* 二级树
* @class BI.LevelTree
@ -9052,34 +8976,35 @@ BI.LevelTree = BI.inherit(BI.Widget, {
this.initTree(this.options.items);
},
_formatItems: function (nodes, layer) {
_formatItems: function (nodes, layer, pNode) {
var self = this;
BI.each(nodes, function (i, node) {
var extend = {layer: layer};
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
switch (i) {
case 0 :
extend.type = "bi.first_plus_group_node";
break;
case nodes.length - 1 :
extend.type = "bi.last_plus_group_node";
break;
default :
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.mid_plus_group_node";
break;
if (i === nodes.length - 1) {
extend.type = "bi.last_plus_group_node";
extend.isLastNode = true;
}
if (i === 0 && !pNode) {
extend.type = "bi.first_plus_group_node"
}
if (i === 0 && i === nodes.length - 1) { // 根
extend.type = "bi.plus_group_node";
}
BI.defaults(node, extend);
self._formatItems(node.children, layer + 1);
self._formatItems(node.children, layer + 1, node);
} else {
switch (i) {
case nodes.length - 1:
extend.type = "bi.last_tree_leaf_item";
break;
default :
extend.type = "bi.mid_tree_leaf_item";
if (i === 0 && !pNode) {
extend.type = "bi.first_tree_leaf_item"
}
if (i === nodes.length - 1) {
extend.type = "bi.last_tree_leaf_item";
}
BI.defaults(node, extend);
}
@ -9162,6 +9087,78 @@ BI.LevelTree = BI.inherit(BI.Widget, {
BI.LevelTree.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.level_tree", BI.LevelTree);/**
* guy
* 异步树
* @class BI.DisplayTree
* @extends BI.TreeView
*/
BI.DisplayTree = BI.inherit(BI.TreeView, {
_defaultConfig: function () {
return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-display-tree"
});
},
_init: function () {
BI.DisplayTree.superclass._init.apply(this, arguments);
},
// 配置属性
_configSetting: function () {
var setting = {
view: {
selectedMulti: false,
dblClickExpand: false,
showIcon: false,
nameIsHTML: true,
showTitle: false
},
data: {
key: {
title: "title",
name: "text"
},
simpleData: {
enable: true
}
},
callback: {
beforeCollapse: beforeCollapse
}
};
function beforeCollapse(treeId, treeNode) {
return false;
}
return setting;
},
_dealWidthNodes: function (nodes) {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options;
BI.each(nodes, function (i, node) {
node.isParent = node.isParent || node.parent;
if (node.text == null) {
if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";
}
}
});
return nodes;
},
initTree: function (nodes, setting) {
var setting = setting || this._configSetting();
this.nodes = $.fn.zTree.init(this.tree.element, setting, nodes);
},
destroy: function () {
BI.DisplayTree.superclass.destroy.apply(this, arguments);
}
});
BI.DisplayTree.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.display_tree", BI.DisplayTree);/**
* 简单的多选树
*
* Created by GUY on 2016/2/16.
@ -9589,6 +9586,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () {
return self.text.getText();
},
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap,
readonly: o.readonly
});
@ -9613,9 +9612,14 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) {
this.text.setText(text);
},
setTipType: function (v) {
this.text.options.tipType = v;
}
});
BI.shortcut("bi.text_trigger", BI.TextTrigger);/**
BI.shortcut("bi.text_trigger", BI.TextTrigger);
/**
* 选择字段trigger
*
* Created by GUY on 2015/9/15.
@ -9640,7 +9644,9 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
readonly: o.readonly,
text: this._digest(o.value, o.items)
text: this._digest(o.value, o.items),
tipType: o.tipType,
warningTitle: o.warningTitle
});
},
@ -9666,11 +9672,16 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items));
},
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) {
this.options.items = items;
}
});
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);/**
BI.shortcut("bi.select_text_trigger", BI.SelectTextTrigger);
/**
* 选择字段trigger小一号的
*
* @class BI.SmallSelectTextTrigger

24
dist/core.css vendored

@ -1066,7 +1066,7 @@ textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.button-warning:hover,
.bi-list-item-select.button-warning.hover {
@ -1087,7 +1087,7 @@ textarea {
}
.bi-list-item-select.button-warning:hover.bi-high-light-border,
.bi-list-item-select.button-warning.hover.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.button-warning:active,
.bi-list-item-select.button-warning.active {
@ -1108,7 +1108,7 @@ textarea {
}
.bi-list-item-select.button-warning:active.bi-high-light-border,
.bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.disabled {
color: #9ea6b2 !important;
@ -1937,6 +1937,15 @@ textarea {
vertical-align: middle;
content: ' ';
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item {
display: inline-block;
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-center-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout:after {
display: inline-block;
@ -1945,6 +1954,15 @@ textarea {
vertical-align: middle;
content: ' ';
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item {
display: inline-block;
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-theme-dark {
background-color: #191B2B;
color: #d6e0dc;

785
dist/core.js vendored

File diff suppressed because it is too large Load Diff

24
dist/core_without_normalize.css vendored

@ -785,7 +785,7 @@ textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.button-warning:hover,
.bi-list-item-select.button-warning.hover {
@ -806,7 +806,7 @@ textarea {
}
.bi-list-item-select.button-warning:hover.bi-high-light-border,
.bi-list-item-select.button-warning.hover.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.button-warning:active,
.bi-list-item-select.button-warning.active {
@ -827,7 +827,7 @@ textarea {
}
.bi-list-item-select.button-warning:active.bi-high-light-border,
.bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.disabled {
color: #9ea6b2 !important;
@ -1656,6 +1656,15 @@ textarea {
vertical-align: middle;
content: ' ';
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item {
display: inline-block;
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-center-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout:after {
display: inline-block;
@ -1664,6 +1673,15 @@ textarea {
vertical-align: middle;
content: ' ';
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item {
display: inline-block;
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-theme-dark {
background-color: #191B2B;
color: #d6e0dc;

470
dist/demo.js vendored

@ -349,6 +349,7 @@ BI.shortcut("demo.icon_label", Demo.IconLabel);Demo.Label = BI.inherit(BI.Widget
type: "bi.label",
cls: "layout-bg6",
text: "这是一个label控件,默认居中",
disabled: true,
textAlign: "center"
}, {
type: "bi.label",
@ -744,9 +745,10 @@ BI.shortcut("demo.multifile_editor", Demo.CodeEditor);Demo.CodeEditor = BI.inher
render: function () {
var editor = BI.createWidget({
type: "bi.textarea_editor",
cls: "mvc-border",
cls: "bi-border",
width: 600,
height: 400
height: 400,
watermark: "请输入内容"
});
editor.on(BI.TextAreaEditor.EVENT_FOCUS, function () {
BI.Msg.toast("Focus");
@ -1563,26 +1565,26 @@ Demo.TextValueDownListCombo = BI.inherit(BI.Widget, {
text: "默认值",
value: 11,
items: [[{
text: BI.i18nText("BI-Basic_Number_IN"),
text: "属于",
value: 1,
cls: "dot-e-font"
}, {
text: BI.i18nText("BI-Basic_Not_Number_In"),
text: "不属于",
value: 2,
cls: "dot-e-font"
}], [{
el: {
text: BI.i18nText("BI-Basic_More_Than"),
text: "大于",
value: 3,
cls: "dot-e-font"
iconCls1: "dot-e-font"
},
value: 3,
children: [{
text: BI.i18nText("BI-Basic_Settled_Value"),
text: "固定值",
value: 4,
cls: "dot-e-font"
}, {
text: BI.i18nText("BI-Basic_Average_Value"),
text: "平均值",
value: 5,
cls: "dot-e-font"
}]
@ -2644,220 +2646,6 @@ BI.shortcut("demo.select_text_trigger", Demo.Func);Demo.Func = BI.inherit(BI.Wid
}
});
BI.shortcut("demo.text_trigger", Demo.Func);/**
* guy
* 二级树
* @class BI.PlatformLevelTree
* @extends BI.Select
*/
BI.PlatformLevelTree = BI.inherit(BI.Widget, {
props: {
baseCls: "platform-level-tree",
itemsCreator: BI.emptyFn
},
render: function () {
var self = this, o = this.options;
this.tree = BI.createWidget({
type: "bi.custom_tree",
element: this,
expander: {
type: "bi.select_tree_expander",
isDefaultInit: false,
el: {},
popup: {
type: "bi.custom_tree"
}
},
itemsCreator: function (op, callback) {
o.itemsCreator(op, function (items) {
callback(self._formatItems(items));
});
},
el: {
type: "bi.loader",
next: false,
el: {
type: "bi.button_tree",
chooseType: 0,
layouts: [{
type: "bi.vertical"
}]
}
}
});
this.tree.on(BI.CustomTree.EVENT_CHANGE, function () {
self.fireEvent(BI.PlatformLevelTree.EVENT_CHANGE, arguments);
});
},
_formatItems: function (nodes) {
var self = this;
BI.each(nodes, function (i, node) {
var extend = {};
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
switch (i) {
case 0 :
extend.type = "bi.multilayer_select_tree_first_plus_group_node";
break;
case nodes.length - 1 :
extend.type = "bi.multilayer_select_tree_last_plus_group_node";
break;
default :
extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
break;
}
BI.defaults(node, extend);
} else {
switch (i) {
case nodes.length - 1:
extend.type = "bi.multilayer_single_tree_last_tree_leaf_item";
break;
default :
extend.type = "bi.multilayer_single_tree_mid_tree_leaf_item";
}
BI.defaults(node, extend);
}
});
return nodes;
},
populate: function () {
this.tree.populate();
},
getValue: function () {
return this.tree.getValue();
}
});
BI.PlatformLevelTree.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.platform_level_tree", BI.PlatformLevelTree);
BI.DemoLevelTree = BI.inherit(BI.Widget, {
render: function () {
var self = this;
return {
type: "bi.vtape",
items: [{
el: {
type: "bi.platform_level_tree",
ref: function () {
self.tree = this;
},
itemsCreator: function (op, callback) {
if (!op.node) {// 根节点
callback([{
id: 1,
pId: 0,
text: "A",
value: 1,
isParent: true
}, {
id: 2,
pId: 0,
text: "B",
value: 2,
isParent: true,
open: true
}]);
} else {
if (op.node.id == 1) {
callback([
{
id: 11,
pId: 1,
text: "test11",
value: 11,
layer: 1,
isParent: true
},
{
id: 12,
pId: 1,
text: "test12",
value: 12,
layer: 1
},
{
id: 13,
pId: 1,
text: "test13",
value: 13,
layer: 1
},
{
id: 14,
pId: 1,
text: "test14",
value: 14,
layer: 1,
height: 35
},
{
id: 15,
pId: 1,
text: "test15",
value: 15,
layer: 1
},
{
id: 16,
pId: 1,
text: "test16",
value: 16,
layer: 1
},
{id: 17, pId: 1, text: "test17", layer: 1, value: 17}
]);
} else if (op.node.id == 2) {
callback([{
id: 21,
pId: 2,
text: "test21",
value: 21,
layer: 1
},
{
id: 22,
pId: 2,
text: "test22",
value: 22,
layer: 1
}]);
} else if (op.node.id == 11) {
callback([{
id: 111,
pId: 11,
text: "test111",
value: 111,
layer: 2
}]);
}
}
}
}
}, {
el: {
type: "bi.button",
text: "确定",
handler: function () {
BI.Msg.toast(JSON.stringify(self.tree.getValue()));
}
},
height: 25
}]
};
},
mounted: function () {
}
});
BI.shortcut("demo.platform_level_tree", BI.DemoLevelTree);/**
* Created by roy on 16/5/23.
*/
BI.DetailTableCell = BI.inherit(BI.Widget, {
@ -3239,10 +3027,6 @@ BI.shortcut("demo.value_chooser_pane", Demo.ValueChooserPane);Demo.BASE_CONFIG =
pId: 2,
text: "toast提示",
value: "demo.toast"
}, {
pId: 2,
text: "message提示",
value: "demo.message"
}, {
pId: 2,
id: 201,
@ -3486,10 +3270,6 @@ BI.shortcut("demo.value_chooser_pane", Demo.ValueChooserPane);Demo.BASE_CONFIG =
}];Demo.CATEGORY_CONFIG = [{
id: 100000,
text: "专题"
}, {
pId: 100000,
text: "自定义一棵树",
value: "demo.platform_level_tree"
}, {
pId: 100000,
text: "可以排序的树",
@ -6193,7 +5973,11 @@ Demo.Horizontal = BI.inherit(BI.Widget, {
},
render: function () {
return {
type: "bi.vertical",
vgap: 10,
items: [{
type: "bi.horizontal",
height: 150,
hgap: 10,
items: [{
type: "bi.label",
@ -6221,6 +6005,87 @@ Demo.Horizontal = BI.inherit(BI.Widget, {
width: 300,
height: 30
}]
}, {
type: "bi.layout",
height: 1,
cls: "bi-border-bottom bi-high-light-border"
}, {
type: "bi.horizontal",
height: 150,
verticalAlign: BI.VerticalAlign.Middle,
horizontalAlign: BI.HorizontalAlign.Left,
vgap: 10,
items: [{
type: "bi.label",
text: "以horizontal实现的vertical_adapt垂直居中",
cls: "layout-bg1",
width: 300,
height: 30
}, {
type: "bi.label",
text: "以horizontal实现的vertical_adapt垂直居中",
cls: "layout-bg2",
width: 300,
height: 30
}]
}, {
type: "bi.layout",
height: 1,
cls: "bi-border-bottom bi-high-light-border"
}, {
type: "bi.horizontal",
height: 150,
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Center,
items: [{
type: "bi.label",
text: "以horizontal代替horizontal_adapt实现的水平居中(单元素)",
cls: "layout-bg1",
width: 300,
height: 30
}]
}, {
type: "bi.layout",
height: 1,
cls: "bi-border-bottom bi-high-light-border"
}, {
type: "bi.horizontal",
height: 150,
verticalAlign: BI.VerticalAlign.Top,
horizontalAlign: BI.HorizontalAlign.Center,
columnSize: [300, "fill"],
items: [{
type: "bi.label",
text: "以horizontal代替horizontal_adapt实现的用于水平适应布局",
cls: "layout-bg1",
height: 30
}, {
type: "bi.label",
text: "以horizontal代替horizontal_adapt实现的水平自适应列",
cls: "layout-bg2",
height: 30
}]
}, {
type: "bi.layout",
height: 1,
cls: "bi-border-bottom bi-high-light-border"
}, {
type: "bi.center_adapt",
height: 150,
verticalAlign: BI.VerticalAlign.Middle,
horizontalAlign: BI.HorizontalAlign.Center,
items: [{
type: "bi.label",
text: "以horizontal代替center_adapt实现的水平垂直居中",
width: 300,
height: 100,
cls: "layout-bg1"
}]
}, {
type: "bi.layout",
height: 1,
cls: "bi-border-bottom bi-high-light-border"
}]
};
}
});
@ -6261,7 +6126,30 @@ Demo.HtapeLayout = BI.inherit(BI.Widget, {
};
}
});
BI.shortcut("demo.htape", Demo.HtapeLayout);/**
BI.shortcut("demo.htape", Demo.HtapeLayout);Demo.InlineVerticalLayout = BI.inherit(BI.Widget, {
props: {
baseCls: "demo-absolute"
},
render: function () {
return {
type: "bi.inline_vertical_adapt",
items: [{
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 200
}, {
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 100
}]
};
}
});
BI.shortcut("demo.inline_vertical", Demo.InlineVerticalLayout);/**
* Created by User on 2017/3/22.
*/
Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, {
@ -6705,18 +6593,19 @@ Demo.Func = BI.inherit(BI.Widget, {
},
render: function () {
var id = BI.UUID();
var body;
return {
type: "bi.vertical",
vgap: 10,
items: [{
type: "bi.text_button",
text: "点击弹出Popover(normal size)",
text: "点击弹出Popover(normal size & fixed)",
height: 30,
handler: function () {
BI.Popovers.remove(id);
BI.Popovers.create(id, {
type: "bi.bar_popover",
size: "big",
size: "normal",
header: {
type: "bi.label",
text: "这个是header"
@ -6729,7 +6618,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}, {
type: "bi.text_button",
text: "点击弹出Popover(small size)",
text: "点击弹出Popover(small size & fixed)",
height: 30,
handler: function () {
BI.Popovers.remove(id);
@ -6748,7 +6637,7 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}, {
type: "bi.text_button",
text: "点击弹出Popover(big size)",
text: "点击弹出Popover(big size & fixed)",
height: 30,
handler: function () {
BI.Popovers.remove(id);
@ -6765,6 +6654,80 @@ Demo.Func = BI.inherit(BI.Widget, {
}
}).open(id);
}
}, {
type: "bi.text_button",
text: "点击弹出Popover(normal size & adapt body区域高度是300)",
height: 30,
handler: function () {
BI.Popovers.remove(id);
BI.Popovers.create(id, {
type: "bi.bar_popover",
size: "normal",
logic: {
dynamic: true
},
header: {
type: "bi.label",
text: "这个是header"
},
body: {
type: "bi.vertical",
items: [{
type: "bi.button_group",
ref: function () {
body = this;
},
items: BI.map(BI.range(0, 10), function () {
return {
type: "bi.label",
text: "1",
height: 30
};
}),
layouts: [{
type: "bi.vertical"
}]
}]
}
}).open(id);
}
}, {
type: "bi.text_button",
text: "点击弹出Popover(small size & adapt body区域高度是900)",
height: 30,
handler: function () {
BI.Popovers.remove(id);
BI.Popovers.create(id, {
type: "bi.bar_popover",
size: "small",
logic: {
dynamic: true
},
header: {
type: "bi.label",
text: "这个是header"
},
body: {
type: "bi.vertical",
items: [{
type: "bi.button_group",
ref: function () {
body = this;
},
items: BI.map(BI.range(0, 30), function () {
return {
type: "bi.label",
text: "1",
height: 30
};
}),
layouts: [{
type: "bi.vertical"
}]
}]
}
}).open(id);
}
}, {
type: "bi.text_button",
text: "点击弹出Popover(custom)",
@ -10711,7 +10674,7 @@ Demo.MultiSelectCombo = BI.inherit(BI.Widget, {
_itemsCreator: function (options, callback) {
var self = this;
var items = [];
var items = Demo.CONSTANTS.ITEMS;
var keywords = (options.keywords || []).slice();
if (options.keyword) {
keywords.push(options.keyword);
@ -10776,7 +10739,10 @@ Demo.MultiSelectList = BI.inherit(BI.Widget, {
self.list = ref;
},
itemsCreator: BI.bind(this._itemsCreator, this),
value: {
type: 1,
value: ["柳州市城贸金属材料有限责任公司", "柳州市建福房屋租赁有限公司", "柳州市迅昌数码办公设备有限责任公司"]
}
});
widget.on(BI.MultiSelectCombo.EVENT_CONFIRM, function () {
@ -10800,7 +10766,7 @@ Demo.MultiSelectList = BI.inherit(BI.Widget, {
_itemsCreator: function (options, callback) {
var self = this;
var items = [];
var items = Demo.CONSTANTS.ITEMS;
var keywords = (options.keywords || []).slice();
if (options.keyword) {
keywords.push(options.keyword);
@ -11652,7 +11618,28 @@ Demo.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
},
mounted: function () {
this.tree.populate(BI.deepClone(Demo.CONSTANTS.TREE));
var tree = [
// {id: -2, pId: 0, value: "根目录1", text: "根目录1"},
{id: -1, pId: 0, value: "根目录", text: "根目录"},
{id: 1, pId: -1, value: "第一级目录1", text: "第一级目录1"},
{id: 11, pId: 1, value: "第二级文件1", text: "第二级文件1"},
{id: 12, pId: 1, value: "第二级目录2", text: "第二级目录2"},
{id: 121, pId: 12, value: "第三级目录1", text: "第三级目录1"},
{id: 122, pId: 12, value: "第三级文件1", text: "第三级文件1"},
{id: 1211, pId: 121, value: "第四级目录1", text: "第四级目录1"},
{id: 2, pId: -1, value: "第一级目录2", text: "第一级目录2"},
{id: 21, pId: 2, value: "第二级目录3", text: "第二级目录3"},
{id: 22, pId: 2, value: "第二级文件2", text: "第二级文件2"},
{id: 211, pId: 21, value: "第三级目录2", text: "第三级目录2"},
{id: 212, pId: 21, value: "第三级文件2", text: "第三级文件2"},
{id: 2111, pId: 211, value: "第四级文件1", text: "第四级文件1"},
{id: 3, pId: -1, value: "第一级目录3", text: "第一级目录3"},
{id: 31, pId: 3, value: "第二级文件2", text: "第二级文件2"},
{id: 33, pId: 3, value: "第二级目录3", text: "第二级目录1"},
{id: 32, pId: 3, value: "第二级文件3", text: "第二级文件3"},
{id: 331, pId: 33, value: "第三级文件1", text: "第三级文件1"}
];
this.tree.populate(tree);
}
});
@ -13459,7 +13446,12 @@ Demo.CONSTANTS = {
{id: 121, pId: 12, value: "第三级目录1", text: "第三级目录1"},
{id: 122, pId: 12, value: "第三级文件1", text: "第三级文件1"},
{id: 1211, pId: 121, value: "第四级目录1", text: "第四级目录1"},
{id: 12111, pId: 1211, value: "第五级文件1", text: "第五级文件111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"},
{
id: 12111,
pId: 1211,
value: "第五级文件1",
text: "第五级文件111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
},
{id: 2, pId: -1, value: "第一级目录2", text: "第一级目录2"},
{id: 21, pId: 2, value: "第二级目录3", text: "第二级目录3"},
{id: 22, pId: 2, value: "第二级文件2", text: "第二级文件2"},

453
dist/fineui.css vendored

@ -1066,7 +1066,7 @@ textarea {
color: #ff4949;
}
.bi-list-item-select.button-warning.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.button-warning:hover,
.bi-list-item-select.button-warning.hover {
@ -1087,7 +1087,7 @@ textarea {
}
.bi-list-item-select.button-warning:hover.bi-high-light-border,
.bi-list-item-select.button-warning.hover.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.button-warning:active,
.bi-list-item-select.button-warning.active {
@ -1108,7 +1108,7 @@ textarea {
}
.bi-list-item-select.button-warning:active.bi-high-light-border,
.bi-list-item-select.button-warning.active.bi-high-light-border {
border-color: #e85050;
border-color: #FF4949;
}
.bi-list-item-select.disabled {
color: #9ea6b2 !important;
@ -1937,6 +1937,15 @@ textarea {
vertical-align: middle;
content: ' ';
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item {
display: inline-block;
}
.bi-inline-center-adapt-layout > .inline-center-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-center-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout:after {
display: inline-block;
@ -1945,6 +1954,15 @@ textarea {
vertical-align: middle;
content: ' ';
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item {
display: inline-block;
}
.bi-inline-vertical-adapt-layout > .inline-vertical-adapt-item.x-icon {
display: inline-block !important;
}
.bi-inline-vertical-adapt-layout > .bi-combo.bi-combo-popup {
display: inline-block !important;
}
.bi-theme-dark {
background-color: #191B2B;
color: #d6e0dc;
@ -2375,6 +2393,7 @@ textarea {
}
.bi-bubble-combo .button-combo-triangle-wrapper {
position: fixed !important;
line-height: 0;
z-index: 10000000;
}
.bi-bubble-combo .bubble-combo-triangle-left {
@ -2382,13 +2401,14 @@ textarea {
position: absolute;
width: 6px;
height: 16px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-left:before {
position: absolute;
width: 6px;
height: 6px;
margin-left: 2px;
margin-top: -3px;
margin-left: -3px;
margin-top: 4px;
content: "";
transform: rotate(-45deg);
}
@ -2397,6 +2417,7 @@ textarea {
position: absolute;
width: 6px;
height: 16px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-right:before {
position: absolute;
@ -2412,12 +2433,13 @@ textarea {
position: absolute;
width: 16px;
height: 6px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-top:before {
position: absolute;
width: 6px;
height: 6px;
margin-left: 3px;
margin-left: 4px;
margin-top: -3px;
content: "";
transform: rotate(45deg);
@ -2427,12 +2449,13 @@ textarea {
position: absolute;
width: 16px;
height: 6px;
text-align: left;
}
.bi-bubble-combo .bubble-combo-triangle-bottom:before {
position: absolute;
width: 6px;
height: 6px;
margin-left: 3px;
margin-left: 4px;
margin-top: 2px;
content: "";
transform: rotate(-135deg);
@ -2511,6 +2534,10 @@ textarea {
.bi-text-value-down-list-combo:hover > .bi-border {
border-color: #3685f2;
}
.bi-bubble-bar-popup-view .bar-popup-container {
max-height: 456px;
}
/*************BI.SearchEditor******************/
.bi-search-editor {
-webkit-border-radius: 2px;
@ -2607,363 +2634,25 @@ textarea {
-moz-border-radius: 2px;
border-radius: 2px;
}
.farbtastic .wheel {
background: url('images/1x/background/wheel.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/wheel.png');
_background: none;
}
.farbtastic .overlay {
background: url('images/1x/background/mask.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/mask.png');
_background: none;
}
.farbtastic .marker {
background: url('images/1x/background/marker.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/marker.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.center_open {
background: url('images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.roots_open {
background: url('images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-display-tree .ztree li span.button.switch.bottom_open {
background: url('images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.ztree li ul.line {
background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 1px 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_1.png');
_background: none;
}
.bi-theme-dark .ztree li ul.line {
background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 1px 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_1.png');
_background: none;
}
.ztree li span.button.chk.checkbox_false_full {
background: url('images/2x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_normal.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_false_full_focus {
background: url('images/2x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_normal.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_false_part {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_false_part_focus {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_full {
background: url('images/2x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_active.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_full_focus {
background: url('images/2x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/check_box_active.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_part {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree li span.button.chk.checkbox_true_part_focus {
background: url('images/2x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/half_selected.png');
background-size: contain;
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_full {
background: url('images/1x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_normal.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_full_focus {
background: url('images/1x/icon/check_box_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_normal.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_part {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_false_part_focus {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_full {
background: url('images/1x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_active.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_full_focus {
background: url('images/1x/icon/check_box_active.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/check_box_active.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_part {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree.hack li span.button.chk.checkbox_true_part_focus {
background: url('images/1x/icon/half_selected.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/half_selected.png');
_background: none;
}
.ztree li span.button.root_open {
background: url('images/1x/icon/tree_expand_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_1.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.root_open {
background: url('images/1x/icon/dark/tree_expand_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_1.png');
_background: none;
}
.ztree li span.button.root_close {
background: url('images/1x/icon/tree_collapse_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_1.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.root_close {
background: url('images/1x/icon/dark/tree_collapse_1.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_1.png');
_background: none;
}
.ztree li span.button.roots_open {
background: url('images/1x/icon/tree_expand_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_open {
background: url('images/1x/icon/dark/tree_expand_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_2.png');
_background: none;
}
.ztree li span.button.roots_close {
background: url('images/1x/icon/tree_collapse_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_close {
background: url('images/1x/icon/dark/tree_collapse_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_2.png');
_background: none;
}
.ztree li span.button.center_open {
background: url('images/1x/icon/tree_expand_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_open {
background: url('images/1x/icon/dark/tree_expand_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_3.png');
_background: none;
}
.ztree li span.button.center_close {
background: url('images/1x/icon/tree_collapse_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_close {
background: url('images/1x/icon/dark/tree_collapse_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_3.png');
_background: none;
}
.ztree li span.button.bottom_open {
background: url('images/1x/icon/tree_expand_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_expand_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_open {
background: url('images/1x/icon/dark/tree_expand_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_expand_4.png');
_background: none;
}
.ztree li span.button.bottom_close {
background: url('images/1x/icon/tree_collapse_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_collapse_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_close {
background: url('images/1x/icon/dark/tree_collapse_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_collapse_4.png');
_background: none;
}
.ztree li span.button.roots_docu {
background: url('images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.roots_docu {
background: url('images/1x/icon/dark/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_2.png');
_background: none;
}
.ztree li span.button.center_docu {
background: url('images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.center_docu {
background: url('images/1x/icon/dark/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_3.png');
_background: none;
}
.ztree li span.button.bottom_docu {
background: url('images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.bi-theme-dark .ztree li span.button.bottom_docu {
background: url('images/1x/icon/dark/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_4.png');
_background: none;
}
.ztree li span.button.ico_loading {
background: url('images/1x/icon/loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/loading.gif');
_background: none;
}
.base-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_1.png');
_background: none;
}
.bi-theme-dark .base-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_1.png') repeat-y 0 0;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_1.png');
_background: none;
}
.first-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_2.png');
_background: none;
}
.bi-theme-dark .first-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_2.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_2.png');
_background: none;
}
.mid-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_3.png');
_background: none;
}
.bi-theme-dark .mid-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_3.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_3.png');
_background: none;
}
.last-line-conn-background {
background: url('images/1x/icon/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/tree_vertical_line_4.png');
_background: none;
}
.bi-theme-dark .last-line-conn-background {
background: url('images/1x/icon/dark/tree_vertical_line_4.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/dark/tree_vertical_line_4.png');
_background: none;
}
.loading-background {
background: url('images/2x/icon/loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/loading.gif');
background-size: contain;
_background: none;
}
.auto-color-background {
background: url('images/2x/background/auto_color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/auto_color.png');
background-size: contain;
_background: none;
}
.auto-color-normal-background {
background: url('images/2x/background/auto_color_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/auto_color_normal.png');
background-size: contain;
_background: none;
}
.auto-color-normal-disabled-background {
background: url('images/2x/background/auto_color_normal_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/auto_color_normal_disable.png');
background-size: contain;
_background: none;
}
.trans-color-background {
background: url('images/2x/background/trans_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/trans_normal.png');
background-size: contain;
_background: none;
}
.trans-color-disabled-background {
background: url('images/2x/background/trans_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/background/trans_disable.png');
background-size: contain;
_background: none;
}
.auto-color-background.hack {
background: url('images/1x/background/auto_color.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/auto_color.png');
_background: none;
}
.auto-color-normal-background.hack {
background: url('images/1x/background/auto_color_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/auto_color_normal.png');
_background: none;
}
.auto-color-normal-disabled-background.hack {
background: url('images/1x/background/auto_color_normal_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/auto_color_normal_disable.png');
_background: none;
}
.trans-color-background.hack {
background: url('images/1x/background/trans_normal.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/trans_normal.png');
_background: none;
}
.trans-color-disabled-background.hack {
background: url('images/1x/background/trans_disable.png') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/background/trans_disable.png');
_background: none;
}
.bi-pane {
min-height: 25px;
}
.bi-pane.loading-status {
min-height: 55px;
}
.bi-pane .loading-container {
background-color: rgba(247, 248, 250, 0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00f7f8fa,endColorstr=#00f7f8fa);
}
.bi-loading-widget div {
.bi-loading-widget {
font-size: 0;
}
.bi-loading-widget .animate-rect {
background-color: rgba(54, 133, 242, 0.9);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#e63685f2,endColorstr=#e63685f2);
-webkit-border-radius: 2.5px;
-moz-border-radius: 2.5px;
border-radius: 2.5px;
-webkit-border-radius: 1.5px;
-moz-border-radius: 1.5px;
border-radius: 1.5px;
-webkit-animation: loading-widget 0.8s infinite linear;
-moz-animation: loading-widget 0.8s infinite linear;
-ms-animation: loading-widget 0.8s infinite linear;
@ -3070,12 +2759,11 @@ textarea {
}
}
.bi-loading-widget.hack {
background: url('images/2x/icon/loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/2x/icon/loading.gif');
background-size: contain;
background: url('images/1x/icon/wave_loading.gif') no-repeat center center;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/1x/icon/wave_loading.gif');
_background: none;
}
.bi-loading-widget.hack div {
.bi-loading-widget.hack .animate-rect {
background-color: rgba(54, 133, 242, 0);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#003685f2,endColorstr=#003685f2);
}
@ -3125,6 +2813,14 @@ body .bi-button,
border-radius: 2px;
border: 1px solid #3685f2;
background-color: #3685f2;
-webkit-box-sizing: border-box;
/*Safari3.2+*/
-moz-box-sizing: border-box;
/*Firefox3.5+*/
-ms-box-sizing: border-box;
/*IE8*/
box-sizing: border-box;
/*W3C标准(IE9+,Safari5.1+,Chrome10.0+,Opera10.6+都符合box-sizing的w3c标准语法)*/
text-align: center;
vertical-align: middle;
cursor: pointer;
@ -3248,7 +2944,7 @@ body .bi-button.button-warning.clear .b-font:before,
body .bi-button.button-error,
#body .bi-button.button-error {
background-color: #ff4949;
border-color: #e85050;
border-color: #FF4949;
}
body .bi-button.button-error,
#body .bi-button.button-error,
@ -3499,7 +3195,7 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
-webkit-border-radius: 40px 40px 40px 40px;
-moz-border-radius: 40px 40px 40px 40px;
border-radius: 40px 40px 40px 40px;
background-color: #d4dadd;
background-color: #d0d4da;
}
.bi-switch:active,
.bi-switch.active {
@ -3510,6 +3206,25 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
-moz-border-radius: 9px 9px 9px 9px;
border-radius: 9px 9px 9px 9px;
}
.bi-switch.disabled {
background-color: #F2F4F7;
}
.bi-switch.disabled:active {
background-color: #F2F4F7;
}
.bi-theme-dark .bi-switch {
background-color: #606479;
}
.bi-theme-dark .bi-switch:active,
.bi-theme-dark .bi-switch.active {
background-color: #3685f2;
}
.bi-theme-dark .bi-switch.disabled {
background-color: #2F3149;
}
.bi-theme-dark .bi-switch.disabled:active {
background-color: #2F3149;
}
.bi-multifile-editor .multifile-editor {
text-align: right;
@ -3648,7 +3363,7 @@ body .bi-button.button-ignore.disabled.ghost .b-font:before,
}
.bi-tooltip.tooltip-warning {
background: #ff4949;
border: 1px solid #e85050;
border: 1px solid #FF4949;
}
.bi-branch-tree .bi-branch-tree-view {
min-width: 300px;
@ -3911,18 +3626,6 @@ ul.ztree.zTreeDragUL {
.bi-trigger .bi-trigger-icon-button {
font-size: 16px;
}
.bi-trigger .trigger-up {
display: none;
}
.bi-trigger .trigger-down {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-up {
display: block;
}
.bi-combo-popup > .bi-trigger .trigger-down {
display: none;
}
.bi-select-text-trigger {
-webkit-border-radius: 2px;
@ -4310,7 +4013,7 @@ body {
-o-user-select: none;
user-select: none;
color: #3d4d66;
font: normal 12px "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti;
font: normal 12px "Microsoft YaHei", "PingFangSC-Light", SimHei, SimSun, FangSong, KaiTi, Arial, Tahoma, Verdana, "Times New Roman";
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none;

82917
dist/fineui.ie.js vendored

File diff suppressed because one or more lines are too long

39
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

3152
dist/fineui.js vendored

File diff suppressed because it is too large Load Diff

2
dist/fineui.min.css vendored

File diff suppressed because one or more lines are too long

76
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2476
dist/fineui_without_jquery_polyfill.js vendored

File diff suppressed because it is too large Load Diff

325
dist/fix/fix.compact.ie.js vendored

@ -0,0 +1,325 @@
;(function () {
function initWatch(vm, watch) {
vm._watchers || (vm._watchers = []);
for (var key in watch) {
var handler = watch[key];
if (BI.isArray(handler)) {
for (var i = 0; i < handler.length; i++) {
vm._watchers.push(createWatcher(vm, key, handler[i]));
}
} else {
vm._watchers.push(createWatcher(vm, key, handler));
}
}
}
function createWatcher(vm, keyOrFn, handler) {
return Fix.watch(vm.store, keyOrFn, _.bind(handler, vm), {
store: vm.store
});
}
var target = null;
var targetStack = [];
function pushTarget(_target) {
if (target) targetStack.push(target);
Fix.Model.target = target = _target;
}
function popTarget() {
Fix.Model.target = target = targetStack.pop();
}
var context = null;
var contextStack = [];
function pushContext(_context) {
if (context) contextStack.push(context);
Fix.Model.context = context = _context;
}
function popContext() {
Fix.Model.context = context = contextStack.pop();
}
var oldWatch = Fix.watch;
Fix.watch = function (model, expOrFn, cb, options) {
if (BI.isPlainObject(cb)) {
options = cb;
cb = cb.handler;
}
if (typeof cb === "string") {
cb = model[cb];
}
return oldWatch.call(this, model, expOrFn, function () {
options && options.store && pushTarget(options.store);
var res = cb.apply(this, arguments);
options && options.store && popTarget();
return res;
}, options);
};
function findStore(widget) {
if (target != null) {
return target;
}
widget = widget || context;
var p = widget;
while (p) {
if (p instanceof Fix.Model || p.store || p.__cacheStore) {
break;
}
p = p._parent || (p.options && p.options.element);
}
if (p) {
if (p instanceof Fix.Model) {
return widget.__cacheStore = p;
}
widget.__cacheStore = p.store || p.__cacheStore;
return p.__cacheStore || p.store;
}
}
var _create = BI.createWidget;
BI.createWidget = function (item, options, context) {
var pushed = false;
if (BI.isWidget(options)) {
pushContext(options);
pushed = true;
} else if (context != null) {
pushContext(context);
pushed = true;
}
var result = _create.apply(this, arguments);
pushed && popContext();
return result;
};
_.each(["populate", "addItems", "prependItems"], function (name) {
var old = BI.Loader.prototype[name];
BI.Loader.prototype[name] = function () {
pushContext(this);
var result = old.apply(this, arguments);
popContext();
return result;
};
});
function createStore() {
var needPop = false;
if (_global.Fix && this._store) {
var store = findStore(this.options.context || this.options.element);
if (store) {
pushTarget(store);
needPop = true;
}
this.store = this._store();
this.store && (this.store._widget = this);
needPop && popTarget();
needPop = false;
pushTarget(this.store);
if (this.store instanceof Fix.Model) {
this.model = this.store.model;
} else {
this.model = this.store;
}
needPop = true;
}
return needPop;
}
BI.Widget.prototype._init = function () {
BI.Widget.superclass._init.apply(this, arguments);
this._initRoot();
this._initElementWidth();
this._initElementHeight();
this._initVisual();
this._initState();
if (this.beforeInit) {
this.__asking = true;
this.beforeInit(BI.bind(function () {
if (this.model && this.model.$vm) {
this.model.$vm.$digest()
}
this._render();
}, this));
if (this.__asking === true) {
this.__async = true;
}
} else {
this._render();
}
}
var _init = BI.Widget.prototype._init;
BI.Widget.prototype._init = function () {
var self = this;
var needPop = createStore.call(this);
_init.apply(this, arguments);
needPop && popTarget();
};
var _render = BI.Widget.prototype._render;
BI.Widget.prototype._render = function () {
var needPop = false;
if (_global.Fix && this._store) {
needPop = true;
pushTarget(this.store);
initWatch(this, this.watch);
}
_render.apply(this, arguments);
needPop && popTarget();
};
var unMount = BI.Widget.prototype.__d;
BI.Widget.prototype.__d = function () {
unMount.apply(this, arguments);
this.store && BI.isFunction(this.store.destroy) && this.store.destroy();
BI.each(this._watchers, function (i, unwatches) {
unwatches = BI.isArray(unwatches) ? unwatches : [unwatches];
BI.each(unwatches, function (j, unwatch) {
unwatch();
});
});
this._watchers && (this._watchers = []);
if (this.store) {
this.store._parent && (this.store._parent = null);
this.store._widget && (this.store._widget = null);
this.store = null;
}
delete this.__cacheStore;
};
_.each(["_mount"], function (name) {
var old = BI.Widget.prototype[name];
old && (BI.Widget.prototype[name] = function () {
this.store && pushTarget(this.store);
var res = old.apply(this, arguments);
this.store && popTarget();
return res;
});
});
var additionFunc = function () {
BI.nextTick(function () {
Fix && Fix.refreshAll && Fix.refreshAll();
});
};
$(document).ajaxComplete(additionFunc);
if (BI.history) {
var navigate = BI.history.navigate;
// navigate之后不会立即变化有一段延迟
BI.history.navigate = function () {
navigate.apply(this, arguments);
BI.defer(function () {
additionFunc();
}, 200);
}
var back = window.history.back;
window.history.back = function () {
back.apply(this, arguments);
BI.defer(function () {
additionFunc();
}, 200);
}
}
if (BI.Router) {
var execute = BI.Router.prototype.execute;
BI.Router.prototype.execute = function () {
execute.apply(this, arguments);
additionFunc();
}
}
_.each(["each", "map", "reduce", "reduceRight", "find", "filter", "reject", "every", "all", "some", "any", "max", "min",
"sortBy", "groupBy", "indexBy", "countBy", "partition",
"keys", "allKeys", "values", "pairs", "invert",
"mapObject", "findKey", "pick", "omit", "tap"], function (name) {
var old = BI[name];
BI[name] = function (obj, fn, context) {
return typeof fn === "function" ? old(obj, function (key, value) {
if (!(key in Fix.$$skipArray)) {
return fn.apply(this, arguments);
}
}, context) : old.apply(this, arguments);
};
});
BI.isEmpty = function (ob) {
if (BI.isPlainObject(ob) && ob.__ob__) {
return BI.keys(ob).length === 0;
}
return _.isEmpty(ob);
};
BI.keys = function (ob) {
var keys = _.keys(ob);
var nKeys = [];
for (var i = 0; i < keys.length; i++) {
if (!(keys[i] in Fix.$$skipArray)) {
nKeys.push(keys[i]);
}
}
return nKeys;
};
BI.values = function (ob) {
var keys = BI.keys(obj);
var length = keys.length;
var values = [];
for (var i = 0; i < length; i++) {
values[i] = obj[keys[i]];
}
return values;
};
BI.extend = function () {
var args = Array.prototype.slice.call(arguments);
if (args.length < 1) {
return {};
}
var object = args[0];
var i = 1;
while (i < args.length) {
BI.each(args[i], function (key, v) {
object[key] = v;
});
i++;
}
return object;
};
BI.size = function (ob) {
if (BI.isPlainObject(ob) && ob.__ob__) {
return BI.keys(ob).length;
}
return _.size(ob);
};
BI.isEmptyObject = function (ob) {
return BI.size(ob) === 0;
};
BI.deepClone = function (ob) {
return Fix.toJSON(ob);
};
Fix.set = function (obj, k, v) {
try {
if(obj) {
obj[k] = v;
}
} catch (e) {
} finally {
return _.cloneDeep(obj);
}
}
Fix.del = function (obj, k) {
try {
delete obj[k];
} catch (e) {
} finally {
return _.cloneDeep(obj);
}
}
BI.watch = Fix.watch;
}());

1033
dist/fix/fix.ie.js vendored

File diff suppressed because it is too large Load Diff

32
dist/fix/fix.js vendored

@ -58,6 +58,29 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return _toString.call(obj) === '[object Object]';
}
function isConfigurable(obj, key) {
var configurable = true;
var property = Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(obj, key);
if (property && property.configurable === false) {
configurable = false;
}
return configurable;
}
function isExtensible(obj) {
if (Object.isExtensible) {
return Object.isExtensible(obj);
}
var name = '';
while (obj.hasOwnProperty(name)) {
name += '?';
}
obj[name] = true;
var returnValue = obj.hasOwnProperty(name);
delete obj[name];
return returnValue;
}
function remove(arr, item) {
if (arr && arr.length) {
var _index = arr.indexOf(item);
@ -456,11 +479,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var ob = void 0;
if (value.__ob__ instanceof Observer) {
ob = value.__ob__;
} else if (observerState.shouldConvert && (_.isArray(value) || isPlainObject(value))) {
} else if (observerState.shouldConvert && isExtensible(value) && (_.isArray(value) || isPlainObject(value))) {
ob = new Observer(value);
}
if (ob) {
ob.parent = parentObserver || ob.parent;
ob.parentKey = parentKey;
}
return ob;
}
@ -548,9 +573,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
if (key in $$skipArray) {
return;
}
var configurable = isConfigurable(obj, key);
var dep = observer && observer['__dep' + key] || new Dep();
observer && (observer['__dep' + key] = dep);
var childOb = !shallow && observe(val, observer, key);
var childOb = configurable && !shallow && observe(val, observer, key);
props[key] = {
enumerable: true,
configurable: true,
@ -573,7 +599,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
return;
}
val = newVal;
childOb = !shallow && observe(newVal, observer, key);
childOb = configurable && !shallow && observe(newVal, observer, key);
if (childOb && value && value.__ob__) {
childOb._scopeDeps = value.__ob__._scopeDeps;
childOb._deps = value.__ob__._deps;

BIN
dist/font/iconfont.eot vendored

Binary file not shown.

479
dist/font/iconfont.svg vendored

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 253 KiB

BIN
dist/font/iconfont.ttf vendored

Binary file not shown.

BIN
dist/font/iconfont.woff vendored

Binary file not shown.

BIN
dist/images/1x/icon/wave_loading.gif vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
dist/images/2x/icon/wave_loading.gif vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

2
dist/resource.css vendored

@ -18,7 +18,7 @@ body {
-o-user-select: none;
user-select: none;
color: #3d4d66;
font: normal 12px "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti;
font: normal 12px "Microsoft YaHei", "PingFangSC-Light", SimHei, SimSun, FangSong, KaiTi, Arial, Tahoma, Verdana, "Times New Roman";
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none;

857
dist/utils.js vendored

File diff suppressed because it is too large Load Diff

8
dist/utils.min.js vendored

File diff suppressed because one or more lines are too long

710
dist/widget.js vendored

File diff suppressed because it is too large Load Diff

2
lodash.md

@ -1 +1 @@
lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim"
lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge"

2
public/css/app.css

@ -18,7 +18,7 @@ body {
-o-user-select: none;
user-select: none;
color: #3d4d66;
font: normal 12px "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Heiti;
font: normal 12px "Microsoft YaHei", "PingFangSC-Light", SimHei, SimSun, FangSong, KaiTi, Arial, Tahoma, Verdana, "Times New Roman";
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-decoration: none;

3
public/js/fineui.i18n.js

@ -183,5 +183,6 @@ BI.i18n = {
"BI-Basic_Minute": "分",
"BI-Basic_Wan": "万",
"BI-Basic_Million": "百万",
"BI-Basic_Billion": "亿"
"BI-Basic_Billion": "亿",
"BI-Basic_Quarter": "季度"
};

65
src/base/combination/combo.js

@ -96,7 +96,7 @@ BI.Combo = BI.inherit(BI.Widget, {
_initPullDownAction: function () {
var self = this, o = this.options;
var evs = this.options.trigger.split(",");
var evs = (this.options.trigger || "").split(",");
var st = function (e) {
if (o.stopEvent) {
e.stopEvent();
@ -288,13 +288,13 @@ BI.Combo = BI.inherit(BI.Widget, {
this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW);
},
_popupView: function () {
_popupView: function (e) {
this._assertPopupViewRender();
this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW);
this.popupView.visible();
this.adjustWidth();
this.adjustHeight();
this.adjustWidth(e);
this.adjustHeight(e);
this.element.addClass(this.options.comboClass);
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName());
@ -302,7 +302,7 @@ BI.Combo = BI.inherit(BI.Widget, {
this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW);
},
adjustWidth: function () {
adjustWidth: function (e) {
var o = this.options;
if (!this.popupView) {
return;
@ -320,59 +320,84 @@ BI.Combo = BI.inherit(BI.Widget, {
}
},
adjustHeight: function () {
adjustHeight: function (e) {
var o = this.options, p = {};
if (!this.popupView) {
return;
}
var isVisible = this.popupView.isVisible();
this.popupView.visible();
var combo = BI.isNotNull(e) ? {
element: {
offset: function () {
return {
left: e.pageX,
top: e.pageY
};
},
bounds: function () {
// offset为其相对于父定位元素的偏移
return {
x: e.offsetX,
y: e.offsetY,
width: 0,
height: 24
};
},
outerWidth: function () {
return 0;
},
outerHeight: function () {
return 24;
}
}
} : this.combo;
switch (o.direction) {
case "bottom":
case "bottom,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "right", "left"], o.offsetStyle);
break;
case "top":
case "top,right":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "right", "left"], o.offsetStyle);
break;
case "left":
case "left,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "bottom", "top"], o.offsetStyle);
break;
case "right":
case "right,bottom":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "bottom", "top"], o.offsetStyle);
break;
case "top,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["top", "bottom", "left", "right"], o.offsetStyle);
break;
case "bottom,left":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, ["bottom", "top", "left", "right"], o.offsetStyle);
break;
case "left,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["left", "right", "top", "bottom"], o.offsetStyle);
break;
case "right,top":
p = $.getComboPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
p = $.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, ["right", "left", "top", "bottom"], o.offsetStyle);
break;
case "top,custom":
case "custom,top":
p = $.getTopAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
p = $.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
break;
case "custom,bottom":
case "bottom,custom":
p = $.getBottomAdaptPosition(this.combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
p = $.getBottomAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);
break;
case "left,custom":
case "custom,left":
p = $.getLeftAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength);
p = $.getLeftAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);
delete p.top;
delete p.adaptHeight;
break;
case "custom,right":
case "right,custom":
p = $.getRightAdaptPosition(this.combo, this.popupView, o.adjustXOffset || o.adjustLength);
p = $.getRightAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);
delete p.top;
delete p.adaptHeight;
break;
@ -443,9 +468,9 @@ BI.Combo = BI.inherit(BI.Widget, {
return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible();
},
showView: function () {
showView: function (e) {
if (this.isEnabled() && this.combo.isEnabled()) {
this._popupView();
this._popupView(e);
}
},

106
src/base/foundation/message.js

@ -70,10 +70,24 @@ BI.Msg = function () {
messageShow.destroy();
$mask.remove();
};
var controlItems = [];
if (hasCancel === true) {
controlItems.push({
el: {
var conf = {
element: $pop,
type: "bi.center_adapt",
items: [
{
type: "bi.bar_popover",
header: title,
body: {
type: "bi.center_adapt",
items: [{
type: "bi.label",
text: message
}]
},
footer: hasCancel ? {
type: "bi.right_vertical_adapt",
lgap: 10,
items: [{
type: "bi.button",
text: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
@ -83,93 +97,31 @@ BI.Msg = function () {
callback.apply(null, [false]);
}
}
}
});
}
controlItems.push({
el: {
}, {
type: "bi.button",
text: BI.i18nText("BI-Basic_OK"),
text: BI.i18nText("BI-Basic_Sure"),
handler: function () {
close();
if (BI.isFunction(callback)) {
callback.apply(null, [true]);
}
}
}
});
var conf = {
element: $pop,
type: "bi.center_adapt",
items: [
{
type: "bi.border",
cls: "bi-message-content bi-card",
items: {
north: {
el: {
type: "bi.border",
cls: "bi-message-title bi-background",
items: {
center: {
el: {
type: "bi.label",
text: title || BI.i18nText("BI-Basic_Prompt"),
textAlign: "left",
hgap: 20,
height: 50
}
},
east: {
el: {
type: "bi.icon_button",
cls: "bi-message-close close-font",
// height: 50,
}]
} : {
type: "bi.right_vertical_adapt",
lgap: 10,
items: [{
type: "bi.button",
text: BI.i18nText("BI-Basic_OK"),
handler: function () {
close();
if (BI.isFunction(callback)) {
callback.apply(null, [false]);
}
}
},
width: 60
callback.apply(null, [true]);
}
}
},
height: 50
},
center: {
el: {
type: "bi.text",
cls: "bi-message-text",
tgap: 60,
hgap: 20,
lineHeight: 30,
whiteSpace: "normal",
text: message
}
},
south: {
el: {
type: "bi.absolute",
items: [{
el: {
type: "bi.right_vertical_adapt",
hgap: 5,
items: controlItems
},
top: 0,
left: 20,
right: 20,
bottom: 0
}]
},
height: 60
}
},
width: 400,
height: 300
size: "small"
}
]
};

63
src/base/layer/layer.popover.js

@ -19,6 +19,9 @@ BI.Popover = BI.inherit(BI.Widget, {
// width: 600,
// height: 500,
size: "normal", // small, normal, big
logic: {
dynamic: false
},
header: null,
body: null,
footer: null
@ -34,16 +37,15 @@ BI.Popover = BI.inherit(BI.Widget, {
self.startX += deltaX;
self.startY += deltaY;
self.element.css({
left: BI.clamp(self.startX, 0, W - size.width) + "px",
top: BI.clamp(self.startY, 0, H - size.height) + "px"
left: BI.clamp(self.startX, 0, W - self.element.width()) + "px",
top: BI.clamp(self.startY, 0, H - self.element.height()) + "px"
});
// BI-12134 没有什么特别好的方法
BI.Resizers._resize();
}, function () {
self.tracker.releaseMouseMoves();
}, _global);
var items = {
north: {
var items = [{
el: {
type: "bi.htape",
cls: "bi-message-title bi-header-background",
@ -77,12 +79,24 @@ BI.Popover = BI.inherit(BI.Widget, {
}
},
width: 56
}]
},
}],
height: this._constant.HEADER_HEIGHT
},
center: {
el: {
height: this._constant.HEADER_HEIGHT
}, {
el: o.logic.dynamic ? {
type: "bi.vertical",
scrolly: false,
cls: "popover-body",
ref: function () {
self.body = this;
},
hgap: 20,
tgap: 10,
items: [{
el: BI.createWidget(o.body)
}]
} : {
type: "bi.absolute",
items: [{
el: BI.createWidget(o.body),
@ -92,10 +106,9 @@ BI.Popover = BI.inherit(BI.Widget, {
bottom: 0
}]
}
}
};
}];
if (o.footer) {
items.south = {
items.push({
el: {
type: "bi.absolute",
items: [{
@ -104,30 +117,42 @@ BI.Popover = BI.inherit(BI.Widget, {
top: 0,
right: 20,
bottom: 0
}]
}],
height: 44
},
height: 44
};
});
}
var size = this._calculateSize();
return {
type: "bi.border",
return BI.extend({
type: o.logic.dynamic ? "bi.vertical" : "bi.vtape",
items: items,
width: size.width,
width: size.width
}, o.logic.dynamic ? {
type: "bi.vertical",
scrolly: false
} : {
type: "bi.vtape",
height: size.height
};
});
},
mounted: function () {
var self = this;
var self = this, o = this.options;
this.dragger.element.mousedown(function (e) {
var pos = self.element.offset();
self.startX = pos.left;
self.startY = pos.top;
self.tracker.captureMouseMoves(e);
});
if (o.logic.dynamic) {
var size = this._calculateSize();
var height = this.element.height();
var compareHeight = BI.clamp(height, size.height, 600) - (o.footer ? 84 : 44);
this.body.element.height(compareHeight);
}
},
_calculateSize: function () {
@ -137,7 +162,7 @@ BI.Popover = BI.inherit(BI.Widget, {
switch (o.size) {
case this._constant.SIZE.SMALL:
size.width = 450;
size.height = 220;
size.height = 200;
break;
case this._constant.SIZE.BIG:
size.width = 900;

12
src/base/layer/layer.popup.js

@ -6,7 +6,7 @@
BI.PopupView = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-popup-view",
_baseCls: "bi-popup-view",
maxWidth: "auto",
minWidth: 100,
// maxHeight: 200,
@ -65,7 +65,7 @@ BI.PopupView = BI.inherit(BI.Widget, {
this.view = this._createView();
this.toolbar = this._createToolBar();
this.button_group.on(BI.Controller.EVENT_CHANGE, function (type) {
this.view.on(BI.Controller.EVENT_CHANGE, function (type) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.fireEvent(BI.PopupView.EVENT_CHANGE);
@ -140,11 +140,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
},
getView: function () {
return this.button_group;
return this.view;
},
populate: function (items) {
this.button_group.populate.apply(this.button_group, arguments);
this.view.populate.apply(this.view, arguments);
},
resetWidth: function (w) {
@ -163,11 +163,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
setValue: function (selectedValues) {
this.tab && this.tab.setValue(selectedValues);
this.button_group.setValue(selectedValues);
this.view.setValue(selectedValues);
},
getValue: function () {
return this.button_group.getValue();
return this.view.getValue();
}
});
BI.PopupView.EVENT_CHANGE = "EVENT_CHANGE";

30
src/base/pane.js

@ -10,7 +10,7 @@ BI.Pane = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.Pane.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-pane",
_baseCls: "bi-pane",
tipText: BI.i18nText("BI-No_Selected_Item"),
overlap: true,
onLoaded: BI.emptyFn
@ -53,25 +53,25 @@ BI.Pane = BI.inherit(BI.Widget, {
var loadingAnimation = BI.createWidget({
type: "bi.horizontal",
cls: "bi-loading-widget" + ((BI.isIE() && BI.getIEVersion() < 10) ? " hack" : ""),
height: 60,
width: 60,
hgap: 10,
vgap: 5,
height: 30,
width: 30,
hgap: 5,
vgap: 2.5,
items: [{
type: "bi.layout",
cls: "rect1",
height: 50,
width: 5
cls: "animate-rect rect1",
height: 25,
width: 3
}, {
type: "bi.layout",
cls: "rect2",
height: 50,
width: 5
cls: "animate-rect rect2",
height: 25,
width: 3
}, {
type: "bi.layout",
cls: "rect3",
height: 50,
width: 5
cls: "animate-rect rect3",
height: 25,
width: 3
}]
});
// pane在同步方式下由items决定tipText的显示与否
@ -104,6 +104,7 @@ BI.Pane = BI.inherit(BI.Widget, {
}]
});
}
this.element.addClass("loading-status");
},
loaded: function () {
@ -113,6 +114,7 @@ BI.Pane = BI.inherit(BI.Widget, {
this._loading && (this._loading = null);
o.onLoaded();
self.fireEvent(BI.Pane.EVENT_LOADED);
this.element.removeClass("loading-status");
},
check: function () {

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

@ -9,7 +9,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"),
_baseCls: (conf._baseCls || "") + " bi-basic-button" + (conf.invalid ? "" : " cursor-pointer"),
value: "",
text: "",
stopEvent: false,
@ -229,6 +229,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
el: {
type: "bi.bubble_combo",
trigger: "",
direction: "top,left",
ref: function () {
self.combo = this;
},
@ -285,7 +286,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
}
},
_trigger: function () {
_trigger: function (e) {
var o = this.options;
if (!this.isEnabled()) {
return;
@ -296,14 +297,14 @@ BI.BasicButton = BI.inherit(BI.Single, {
this.setSelected(!this.isSelected()));
}
if (this.isValid()) {
o.handler.call(this, this.getValue(), this);
o.handler.call(this, this.getValue(), this, e);
var v = this.getValue();
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this);
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this, e);
this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);
if (o.action) {
BI.Actions.runAction(o.action, "click", o);
BI.Actions.runAction(o.action, "click", o, this);
}
BI.Actions.runGlobalAction("click", o);
BI.Actions.runGlobalAction("click", o, this);
}
},
@ -311,7 +312,7 @@ BI.BasicButton = BI.inherit(BI.Single, {
if (this.isValid()) {
this.beforeClick(e);
}
this._trigger();
this._trigger(e);
if (this.isValid()) {
this.doClick(e);
}

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

@ -10,7 +10,7 @@ BI.NodeButton = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend( conf, {
baseCls: (conf.baseCls || "") + " bi-node",
_baseCls: (conf._baseCls || "") + " bi-node",
open: false
});
},

2
src/base/single/button/buttons/button.icon.js

@ -7,7 +7,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
var conf = BI.IconButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-icon-button horizon-center",
_baseCls: (conf._baseCls || "") + " bi-icon-button horizon-center",
iconWidth: null,
iconHeight: null
});

35
src/base/single/editor/editor.js

@ -74,18 +74,30 @@ BI.Editor = BI.inherit(BI.Single, {
}
e.stopEvent();
});
this.watermark.element.css({
position: "absolute",
left: "3px",
right: "3px",
top: "0px",
bottom: "0px"
}
var _items = [];
if (this.watermark) {
_items.push({
el: this.watermark,
left: 3,
right: 3,
top: 0,
bottom: 0
});
}
_items.push({
el: this.editor,
left: 0,
right: 0,
top: 0,
bottom: 0
});
var items = [{
el: {
type: "bi.default",
items: this.watermark ? [this.editor, this.watermark] : [this.editor]
type: "bi.absolute",
items: _items
},
left: o.hgap + o.lgap,
right: o.hgap + o.rgap,
@ -120,8 +132,11 @@ BI.Editor = BI.inherit(BI.Single, {
this.editor.on(BI.Input.EVENT_KEY_DOWN, function (v) {
self.fireEvent(BI.Editor.EVENT_KEY_DOWN, arguments);
});
this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (v) {
self.watermark && self.watermark.invisible();
this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (e) {
// tab键就不要隐藏了
if (e.keyCode !== BI.KeyCode.TAB && self.watermark) {
self.watermark.invisible();
}
});
this.editor.on(BI.Input.EVENT_VALID, function () {

8
src/base/single/editor/editor.textarea.js

@ -30,10 +30,10 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
type: "bi.adaptive",
items: [this.content]
},
left: 0,
right: 3,
left: 6,
right: 6,
top: 6,
bottom: 5
bottom: 6
}]
});
@ -96,7 +96,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, {
element: this,
items: [{
el: this.watermark,
left: 0,
left: 6,
top: 0,
right: 0
}]

5
src/base/single/iframe/iframe.js

@ -8,8 +8,10 @@ BI.Iframe = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.Iframe.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
tagName: "iframe",
baseCls: (conf.baseCls || "") + " bi-iframe",
src: "",
attributes: {},
width: "100%",
height: "100%"
});
@ -17,7 +19,8 @@ BI.Iframe = BI.inherit(BI.Single, {
_init: function () {
var o = this.options;
this.options.element = BI.Widget._renderEngine.createElement("<iframe frameborder='0' src='" + o.src + "'>");
o.attributes.frameborder = "0";
o.attributes.src = o.src;
BI.Iframe.superclass._init.apply(this, arguments);
},

4
src/base/single/img/img.js

@ -10,8 +10,10 @@ BI.Img = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.Img.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
tagName: "img",
baseCls: (conf.baseCls || "") + " bi-img display-block",
src: "",
attributes: {},
width: "100%",
height: "100%"
});
@ -19,7 +21,7 @@ BI.Img = BI.inherit(BI.Single, {
_init: function () {
var o = this.options;
this.options.element = BI.Widget._renderEngine.createElement("<img src='" + o.src + "'>");
o.attributes.src = o.src;
BI.Img.superclass._init.apply(this, arguments);
},

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

@ -391,7 +391,10 @@
var conf = BI.File.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-file display-block",
element: "<input type='file'>",
tagName: "input",
attributes: {
type: "file"
},
name: "",
url: "",
multiple: true,
@ -410,7 +413,7 @@
this.element.attr("title", o.title || "");
},
mounted: function () {
created: function () {
var self = this, o = this.options;
// create the noswfupload.wrap Object
// wrap.maxSize 文件大小限制
@ -508,11 +511,11 @@
} else {
wrap.files.unshift(item);
// BI.Msg.toast(value);
self.fireEvent(BI.File.EVENT_CHANGE, {
file: item
});
}
}
wrap.files.length > 0 && self.fireEvent(BI.File.EVENT_CHANGE, {
files: wrap.files
});
input.value = "";
wrap.dom.input.parentNode.replaceChild(input, wrap.dom.input);
wrap.dom.input = input;
@ -582,21 +585,23 @@
},
select: function () {
BI.Widget._renderEngine.createElement(this.wrap.dom.input).click();
this.wrap && BI.Widget._renderEngine.createElement(this.wrap.dom.input).click();
},
upload: function (handler) {
this.wrap.upload(handler);
this.wrap && this.wrap.upload(handler);
},
getValue: function () {
return this.wrap.attach_array;
return this.wrap ? this.wrap.attach_array : [];
},
reset: function () {
if (this.wrap) {
this.wrap.attach_array = [];
this.wrap.attach_names = [];
this.wrap.attachNum = 0;
}
},
_setEnable: function (enable) {

22
src/base/single/input/input.js

@ -9,7 +9,7 @@ BI.Input = BI.inherit(BI.Single, {
var conf = BI.Input.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-input display-block",
element: "<input/>",
tagName: "input",
validationChecker: BI.emptyFn,
quitChecker: BI.emptyFn, // 按确定键能否退出编辑
allowBlank: false
@ -20,6 +20,7 @@ BI.Input = BI.inherit(BI.Single, {
BI.Input.superclass._init.apply(this, arguments);
var self = this;
var ctrlKey = false;
var keyCode = null;
var inputEventValid = false;
var _keydown = BI.debounce(function (keyCode) {
self.onKeyDown(keyCode, ctrlKey);
@ -29,6 +30,10 @@ BI.Input = BI.inherit(BI.Single, {
"leading": true,
"trailing": false
});
this._focusDebounce = BI.debounce(BI.bind(this._focus, this), BI.EVENT_RESPONSE_TIME, {
"leading": true,
"trailing": false
});
this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME, {
"leading": true,
"trailing": false
@ -37,20 +42,24 @@ BI.Input = BI.inherit(BI.Single, {
.keydown(function (e) {
inputEventValid = false;
ctrlKey = e.ctrlKey;
self.fireEvent(BI.Input.EVENT_QUICK_DOWN);
keyCode = e.keyCode;
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);
})
.keyup(function (e) {
keyCode = null;
if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) {
self._keydown_ = true;
_keydown(e.keyCode);
}
})
.on("input propertychange", function (e) {
// 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了
// 这个事件在input的属性发生改变的时候就会触发(class的变化也算)
if (BI.isNotNull(e.keyCode)) {
if (BI.isNotNull(keyCode)) {
keyCode = null;
inputEventValid = true;
self._keydown_ = true;
_keydown(e.keyCode);
_keydown(keyCode);
}
})
.click(function (e) {
@ -60,6 +69,9 @@ BI.Input = BI.inherit(BI.Single, {
.mousedown(function (e) {
self.element.val(self.element.val());
})
.focus(function (e) { // 可以不用冒泡
self._focusDebounce();
})
.focusout(function (e) {
self._blurDebounce();
});
@ -107,7 +119,6 @@ BI.Input = BI.inherit(BI.Single, {
_click: function () {
if (this._isEditing !== true) {
this._focus();
this.selectAll();
this.fireEvent(BI.Input.EVENT_CLICK);
}
@ -208,7 +219,6 @@ BI.Input = BI.inherit(BI.Single, {
}
if (!this._isEditing === true) {
this.element.focus();
this._focus();
this.selectAll();
}
},

7
src/base/single/label/label.js

@ -270,6 +270,7 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
@ -286,6 +287,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
@ -321,6 +323,7 @@ BI.Label = BI.inherit(BI.Single, {
el: (this.text = BI.createWidget(json))
}]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.textWidth) && o.textWidth > 0) {
@ -341,6 +344,7 @@ BI.Label = BI.inherit(BI.Single, {
}
]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (o.whiteSpace == "normal") {
@ -357,6 +361,8 @@ BI.Label = BI.inherit(BI.Single, {
element: this,
items: [this.text]
});
// 父亲有line-height,而当前label是inline-block,那么他的行高一定是父亲的lineHeight,就算text上设置了line-height
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
if (BI.isNumber(o.height) && o.height > 0) {
@ -415,6 +421,7 @@ BI.Label = BI.inherit(BI.Single, {
element: this,
items: [this.text]
});
o.textHeight && this.element.css({"line-height": o.textHeight + "px"});
return;
}
this.text = BI.createWidget(BI.extend(json, {

46
src/base/single/single.js

@ -13,7 +13,7 @@ BI.Single = BI.inherit(BI.Widget, {
_defaultConfig: function () {
var conf = BI.Single.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-single",
_baseCls: (conf._baseCls || "") + " bi-single",
readonly: false,
title: null,
warningTitle: null,
@ -59,6 +59,17 @@ BI.Single = BI.inherit(BI.Widget, {
}
},
_clearTimeOut: function() {
if (BI.isNotNull(this.showTimeout)) {
clearTimeout(this.showTimeout);
this.showTimeout = null;
}
if (BI.isNotNull(this.hideTimeout)) {
clearTimeout(this.hideTimeout);
this.showTimeout = null;
}
},
enableHover: function (opt) {
opt || (opt = {});
var self = this;
@ -66,29 +77,40 @@ BI.Single = BI.inherit(BI.Widget, {
this.element.on("mouseenter.title" + this.getName(), function (e) {
self._e = e;
if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) {
self.timeout = BI.delay(function () {
self.showTimeout = BI.delay(function () {
self._showToolTip(self._e || e, opt);
}, 200);
} else if (self.getTipType() === "success" || self.isEnabled()) {
self.timeout = BI.delay(function () {
self.showTimeout = BI.delay(function () {
self._showToolTip(self._e || e, opt);
}, 500);
}
});
this.element.on("mousemove.title" + this.getName(), function (e) {
self._e = e;
if (!self.element.__isMouseInBounds__(e)) {
if (BI.isNotNull(self.timeout)) {
clearTimeout(self.timeout);
if (BI.isNotNull(self.showTimeout)) {
clearTimeout(self.showTimeout);
self.showTimeout = null;
}
if(BI.isNull(self.hideTimeout)) {
self.hideTimeout = BI.delay(function () {
self._hideTooltip();
}, 500);
}
self.showTimeout = BI.delay(function () {
if (BI.isNotNull(self.hideTimeout)) {
clearTimeout(self.hideTimeout);
self.hideTimeout = null;
}
self._showToolTip(self._e || e, opt);
}, 500);
});
this.element.on("mouseleave.title" + this.getName(), function () {
this.element.on("mouseleave.title" + this.getName(), function (e) {
self._e = null;
if (BI.isNotNull(self.timeout)) {
clearTimeout(self.timeout);
}
self._clearTimeOut();
self._hideTooltip();
});
this._hoverBinded = true;
@ -97,9 +119,7 @@ BI.Single = BI.inherit(BI.Widget, {
disabledHover: function () {
// 取消hover事件
if (BI.isNotNull(this.timeout)) {
clearTimeout(this.timeout);
}
this._clearTimeOut();
this._hideTooltip();
this.element.unbind("mouseenter.title" + this.getName())
.unbind("mousemove.title" + this.getName())

8
src/base/single/text.js

@ -23,8 +23,7 @@ BI.Text = BI.inherit(BI.Single, {
});
},
_init: function () {
BI.Text.superclass._init.apply(this, arguments);
render: function () {
var self = this, o = this.options;
if (o.hgap + o.lgap > 0) {
this.element.css({
@ -72,6 +71,11 @@ BI.Text = BI.inherit(BI.Single, {
} else {
this.text = this;
}
},
mounted: function () {
var o = this.options;
if (BI.isKey(o.text)) {
this.setText(o.text);
} else if (BI.isKey(o.value)) {

2
src/base/single/tip/tip.js

@ -10,7 +10,7 @@ BI.Tip = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.Link.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-tip",
_baseCls: (conf._baseCls || "") + " bi-tip",
zIndex: BI.zIndex_tip
});
},

3
src/base/single/tip/tip.toast.js

@ -49,8 +49,7 @@ BI.Toast = BI.inherit(BI.Tip, {
}
var items = [{
type: "bi.icon_button",
disableSelected: true,
type: "bi.icon_label",
cls: cls + " toast-icon",
width: 36
}, {

2
src/base/single/trigger/trigger.js

@ -8,7 +8,7 @@ BI.Trigger = BI.inherit(BI.Single, {
_defaultConfig: function () {
var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer",
_baseCls: (conf._baseCls || "") + " bi-trigger cursor-pointer",
height: 24
});
},

0
src/base/tree/asynctree.js → src/base/tree/ztree/asynctree.js

0
src/base/tree/parttree.js → src/base/tree/ztree/parttree.js

3
src/base/tree/treeview.js → src/base/tree/ztree/treeview.js

@ -7,7 +7,7 @@
BI.TreeView = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-tree",
_baseCls: "bi-tree",
paras: {},
itemsCreator: BI.emptyFn
});
@ -318,6 +318,7 @@ BI.TreeView = BI.inherit(BI.Pane, {
var ns = BI.Tree.arrayFormat(nodes);
BI.each(ns, function (i, n) {
n.title = n.title || n.text || n.value;
n.isParent = n.isParent || n.parent;
// 处理标红
if (BI.isKey(o.paras.keyword)) {
n.text = $("<div>").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();

4
src/case/button/treeitem/item.first.treeleaf.js

@ -45,7 +45,7 @@ BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
width: 12,
el: {
type: "bi.layout",
cls: "base-line-conn-background",
cls: (o.pNode && o.pNode.isLastNode) ? "" : "base-line-conn-background",
width: 12,
height: o.height
}
@ -53,7 +53,7 @@ BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {
width: 24,
el: {
type: "bi.layout",
cls: "mid-line-conn-background",
cls: "first-line-conn-background",
width: 24,
height: o.height
}

4
src/case/button/treeitem/item.last.treeleaf.js

@ -45,7 +45,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
width: 12,
el: {
type: "bi.layout",
cls: "base-line-conn-background",
cls: (o.pNode && o.pNode.isLastNode) ? "" : "base-line-conn-background",
width: 12,
height: o.height
}
@ -53,7 +53,7 @@ BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {
width: 24,
el: {
type: "bi.layout",
cls: "mid-line-conn-background",
cls: "last-line-conn-background",
width: 24,
height: o.height
}

2
src/case/button/treeitem/item.mid.treeleaf.js

@ -45,7 +45,7 @@ BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
width: 12,
el: {
type: "bi.layout",
cls: "base-line-conn-background",
cls: (o.pNode && o.pNode.isLastNode) ? "" : "base-line-conn-background",
width: 12,
height: o.height
}

21
src/case/calendar/calendar.js

@ -37,23 +37,26 @@ BI.Calendar = BI.inherit(BI.Widget, {
// 是周几
log.FDay = De.getDay();
// 当前BI.StartOfWeek与周日对齐后的FDay是周几
var offSetFDay = (7 - BI.StartOfWeek + log.FDay) % 7;
// 当前月页第一天是几号
log.PDay = MD[M === 0 ? 11 : M - 1] - log.FDay + 1;
log.PDay = MD[M === 0 ? 11 : M - 1] - offSetFDay + 1;
log.NDay = 1;
var items = [];
BI.each(BI.range(42), function (i) {
var td = {}, YY = log.ymd[0], MM = log.ymd[1] + 1, DD;
// 上个月的日期
if (i < log.FDay) {
if (i < offSetFDay) {
td.lastMonth = true;
DD = i + log.PDay;
// 上一年
MM === 1 && (YY -= 1);
MM = MM === 1 ? 12 : MM - 1;
} else if (i >= log.FDay && i < log.FDay + MD[log.ymd[1]]) {
DD = i - log.FDay + 1;
if (i - log.FDay + 1 === log.ymd[2]) {
} else if (i >= offSetFDay && i < offSetFDay + MD[log.ymd[1]]) {
DD = i - offSetFDay + 1;
if (i - offSetFDay + 1 === log.ymd[2]) {
td.currentDay = true;
}
} else {
@ -74,7 +77,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
_init: function () {
BI.Calendar.superclass._init.apply(this, arguments);
var self = this, o = this.options;
var items = BI.map(BI.Date._SDN.slice(0, 7), function (i, value) {
var items = BI.map(this._getWeekLabel(), function (i, value) {
return {
type: "bi.label",
height: 24,
@ -141,6 +144,12 @@ BI.Calendar = BI.inherit(BI.Widget, {
}))));
},
_getWeekLabel: function () {
return BI.map(BI.range(0, 7), function (idx, v) {
return BI.Date._SDN[(v + BI.StartOfWeek) % 7];
});
},
isFrontDate: function () {
var o = this.options, c = this._const;
var Y = o.year, M = o.month, De = BI.getDate(), day = De.getDay();

8
src/case/checkbox/check.last.treenode.js

@ -5,7 +5,7 @@
*/
BI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend( BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "tree-collapse-icon-type4",
iconWidth: 24,
iconHeight: 24
@ -17,10 +17,10 @@ BI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, {
},
setSelected: function (v) {
BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v === true) {
this.element.addClass("tree-expand-icon-type3");
if (v === true) {
this.element.addClass("tree-expand-icon-type4");
} else {
this.element.removeClass("tree-expand-icon-type3");
this.element.removeClass("tree-expand-icon-type4");
}
}
});

7
src/case/combo/bubblecombo/combo.bubble.js

@ -13,7 +13,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
baseCls: "bi-bubble-combo",
trigger: "click",
toggle: true,
direction: "bottom", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
direction: "bottom,left", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right
isDefaultInit: false,
destroyWhenHide: false,
isNeedAdjustHeight: true, // 是否需要高度调整
@ -169,22 +169,18 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
case "left,top":
case "left,bottom":
this._createLeftTriangle();
//this.combo.getView().showLine("right");
break;
case "right,top":
case "right,bottom":
this._createRightTriangle();
//this.combo.getView().showLine("left");
break;
case "top,left":
case "top,right":
this._createTopTriangle();
//this.combo.getView().showLine("bottom");
break;
case "bottom,left":
case "bottom,right":
this._createBottomTriangle();
//this.combo.getView().showLine("top");
break;
}
},
@ -192,7 +188,6 @@ BI.BubbleCombo = BI.inherit(BI.Widget, {
_hideTriangle: function () {
this.triangle && this.triangle.destroy();
this.triangle = null;
//this.combo.getView() && this.combo.getView().hideLine();
},
hideView: function () {

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

@ -8,65 +8,14 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
_defaultConfig: function () {
var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);
return BI.extend(config, {
baseCls: config.baseCls + " bi-bubble-popup-view"
baseCls: config.baseCls + " bi-bubble-popup-view",
minWidth: 220,
maxWidth: 300,
minHeight: 90
});
},
_init: function () {
BI.BubblePopupView.superclass._init.apply(this, arguments);
},
showLine: function (direction) {
var pos = {}, op = {};
switch (direction) {
case "left":
pos = {
top: 0,
bottom: 0,
left: -1
};
op = {width: 3};
break;
case "right":
pos = {
top: 0,
bottom: 0,
right: -1
};
op = {width: 3};
break;
case "top":
pos = {
left: 0,
right: 0,
top: -1
};
op = {height: 3};
break;
case "bottom":
pos = {
left: 0,
right: 0,
bottom: -1
};
op = {height: 3};
break;
default:
break;
}
this.line = BI.createWidget(op, {
type: "bi.layout",
cls: "bubble-popup-line bi-high-light-background"
});
pos.el = this.line;
BI.createWidget({
type: "bi.absolute",
element: this,
items: [pos]
});
},
hideLine: function () {
this.line && this.line.destroy();
}
});
@ -82,7 +31,10 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
_defaultConfig: function () {
return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-bubble-bar-popup-view",
buttons: [{value: BI.i18nText("BI-Basic_Cancel"), ghost: true}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
buttons: [{
value: BI.i18nText("BI-Basic_Cancel"),
ghost: true
}, {value: BI.i18nText(BI.i18nText("BI-Basic_Sure"))}]
});
},
_init: function () {
@ -93,12 +45,12 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = [];
BI.each(o.buttons, function (i, buttonOpt) {
if(BI.isWidget(buttonOpt)) {
if (BI.isWidget(buttonOpt)) {
items.push(buttonOpt);
}else{
} else {
items.push(BI.extend({
type: "bi.button",
height: 30,
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
@ -106,12 +58,34 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
}
});
return BI.createWidget({
type: "bi.right_vertical_adapt",
type: "bi.center",
height: 44,
hgap: 10,
bgap: 10,
rgap: 15,
items: [{
type: "bi.right_vertical_adapt",
lgap: 10,
items: items
}]
});
},
_createView: function () {
var o = this.options;
var button = BI.createWidget({
type: "bi.button_group",
items: [o.el],
layouts: [{
type: "bi.vertical",
cls: "bar-popup-container",
hgap: 15,
tgap: 10
}]
});
button.element.css("min-height", o.minHeight - 44);
return button;
}
});
BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = "EVENT_CLICK_TOOLBAR_BUTTON";
@ -125,22 +99,42 @@ BI.shortcut("bi.bubble_bar_popup_view", BI.BubblePopupBarView);
*/
BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
props: {
props: function () {
return {
baseCls: "bi-text-bubble-bar-popup-view",
text: "",
width: 250
buttons: [{
level: "ignore",
value: false,
text: BI.i18nText("BI-Basic_Cancel")
}, {
value: true,
text: BI.i18nText("BI-Basic_Sure")
}]
};
},
render: function(){
render: function () {
var self = this, o = this.options;
var buttons = BI.map(o.buttons, function (index, buttonOpt) {
if (BI.isWidget(buttonOpt)) {
return buttonOpt;
}
return BI.extend({
type: "bi.button",
height: 24,
handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
}
}, buttonOpt);
});
return {
type: "bi.bubble_bar_popup_view",
ref: function () {
self.popup = this;
},
el: {
type: "bi.vertical",
items: [{
type: "bi.label",
text: o.text,
whiteSpace: "normal",
@ -148,40 +142,13 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
ref: function () {
self.text = this;
}
}],
hgap: 10,
tgap: 25,
bgap: 10
},
buttons: [{
type: "bi.button",
value: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, false);
}
}, {
type: "bi.button",
value: BI.i18nText("BI-Basic_Sure"),
height: 24,
handler: function () {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, true);
}
}]
buttons: buttons
};
},
populate: function (v) {
this.text.setText(v || this.options.text);
},
showLine: function (direction) {
this.popup.showLine(direction);
},
hideLine: function () {
this.popup.hideLine();
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CHANGE";

6
src/case/combo/icontextvaluecombo/combo.icontextvalue.js

@ -29,7 +29,9 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
value: o.value,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth
iconWrapperWidth: o.iconWrapperWidth,
title: o.title,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.icon_text_value_combo_popup",
@ -70,8 +72,10 @@ BI.IconTextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.options.tipType = "warning";
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.options.tipType = "success";
this.element.removeClass("combo-error");
}
}

3
src/case/combo/searchtextvaluecombo/combo.searchtextvalue.js

@ -74,7 +74,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
listeners: [{
eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,
action: function () {
// self.trigger.stopEditing();
self.trigger.stopEditing();
}
}, {
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
@ -138,6 +138,7 @@ BI.SearchTextValueCombo = BI.inherit(BI.Widget, {
},
populate: function (items) {
this.options.items = items;
this.combo.populate(items);
},

5
src/case/combo/textvaluecombo/combo.textvalue.js

@ -27,7 +27,8 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
items: o.items,
height: o.height,
text: o.text,
value: o.value
value: o.value,
warningTitle: o.warningTitle
});
this.popup = BI.createWidget({
type: "bi.text_value_combo_popup",
@ -66,8 +67,10 @@ BI.TextValueCombo = BI.inherit(BI.Widget, {
return BI.contains(v, item.value);
});
if (BI.isNull(result)) {
this.trigger.setTipType("warning");
this.element.removeClass("combo-error").addClass("combo-error");
} else {
this.trigger.setTipType("success");
this.element.removeClass("combo-error");
}
}

13
src/case/combo/textvaluedownlistcombo/combo.textvaluedownlist.js

@ -20,7 +20,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
this._createValueMap();
var value;
if(BI.isNotNull(o.value)){
if(BI.isNotNull(o.value)) {
value = this._digest(o.value);
}
this.trigger = BI.createWidget({
@ -44,13 +44,19 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
});
this.combo.on(BI.DownListCombo.EVENT_CHANGE, function () {
self.setValue(self.combo.getValue()[0].value);
var currentVal = self.combo.getValue()[0].value;
if (currentVal !== self.value) {
self.setValue(currentVal);
self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);
}
});
this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, function () {
self.setValue(self.combo.getValue()[0].childValue);
var currentVal = self.combo.getValue()[0].childValue;
if (currentVal !== self.value) {
self.setValue(currentVal);
self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);
}
});
},
@ -69,6 +75,7 @@ BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
},
_digest: function (v) {
this.value = v;
return this.valueMap[v];
},

8
src/case/editor/editor.state.js

@ -65,7 +65,9 @@ BI.StateEditor = BI.inherit(BI.Widget, {
title = self.stateValue[0];
}
return title;
}
},
warningTitle: o.warningTitle,
tipType: o.tipType
});
this.text.on(BI.TextButton.EVENT_CHANGE, function () {
BI.nextTick(function () {
@ -255,6 +257,10 @@ BI.StateEditor = BI.inherit(BI.Widget, {
this.text.element.removeClass("state-editor-infinite-text");
}
}
},
setTipType: function (v) {
this.text.options.tipType = v;
}
});
BI.StateEditor.EVENT_CHANGE = "EVENT_CHANGE";

2
src/case/layer/layer.multipopup.js

@ -9,7 +9,7 @@ BI.MultiPopupView = BI.inherit(BI.PopupView, {
_defaultConfig: function () {
var conf = BI.MultiPopupView.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-multi-list-view",
_baseCls: (conf._baseCls || "") + " bi-multi-list-view",
buttons: [BI.i18nText("BI-Basic_Sure")]
});
},

4
src/case/pager/pager.all.count.js

@ -7,7 +7,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-all-count-pager",
height: 30,
height: 20,
pages: 1, // 必选项
curr: 1, // 初始化当前页, pages为数字时可用,
count: 1 // 总行数
@ -27,7 +27,7 @@ BI.AllCountPager = BI.inherit(BI.Widget, {
value: o.curr,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
width: 35,
height: 20
height: 16
});
this.pager = BI.createWidget({

10
src/case/pager/pager.direction.js

@ -10,7 +10,7 @@ BI.DirectionPager = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-direction-pager",
height: 30,
height: 20,
horizontal: {
pages: false, // 总页数
curr: 1, // 初始化当前页, pages为数字时可用
@ -43,19 +43,19 @@ BI.DirectionPager = BI.inherit(BI.Widget, {
element: this,
items: [{
el: this.vpager,
top: 5,
top: 0,
right: 74
}, {
el: this.vlabel,
top: 5,
top: 0,
right: 111
}, {
el: this.hpager,
top: 5,
top: 0,
right: -9
}, {
el: this.hlabel,
top: 5,
top: 0,
right: 28
}]
});

35
src/case/tree/tree.level.js

@ -23,34 +23,35 @@ BI.LevelTree = BI.inherit(BI.Widget, {
this.initTree(this.options.items);
},
_formatItems: function (nodes, layer) {
_formatItems: function (nodes, layer, pNode) {
var self = this;
BI.each(nodes, function (i, node) {
var extend = {layer: layer};
if (!BI.isKey(node.id)) {
node.id = BI.UUID();
}
if (node.isParent === true || BI.isNotEmptyArray(node.children)) {
switch (i) {
case 0 :
extend.type = "bi.first_plus_group_node";
break;
case nodes.length - 1 :
extend.type = "bi.last_plus_group_node";
break;
default :
extend.pNode = pNode;
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.mid_plus_group_node";
break;
if (i === nodes.length - 1) {
extend.type = "bi.last_plus_group_node";
extend.isLastNode = true;
}
if (i === 0 && !pNode) {
extend.type = "bi.first_plus_group_node"
}
if (i === 0 && i === nodes.length - 1) { // 根
extend.type = "bi.plus_group_node";
}
BI.defaults(node, extend);
self._formatItems(node.children, layer + 1);
self._formatItems(node.children, layer + 1, node);
} else {
switch (i) {
case nodes.length - 1:
extend.type = "bi.last_tree_leaf_item";
break;
default :
extend.type = "bi.mid_tree_leaf_item";
if (i === 0 && !pNode) {
extend.type = "bi.first_tree_leaf_item"
}
if (i === nodes.length - 1) {
extend.type = "bi.last_tree_leaf_item";
}
BI.defaults(node, extend);
}

3
src/case/tree/tree.display.js → src/case/tree/ztree/tree.display.js

@ -38,7 +38,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
}
};
function beforeCollapse (treeId, treeNode) {
function beforeCollapse(treeId, treeNode) {
return false;
}
@ -49,6 +49,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options;
BI.each(nodes, function (i, node) {
node.isParent = node.isParent || node.parent;
if (node.text == null) {
if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";

0
src/case/tree/tree.simple.js → src/case/tree/ztree/tree.simple.js

6
src/case/trigger/trigger.text.js

@ -30,6 +30,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
title: function () {
return self.text.getText();
},
tipType: o.tipType,
warningTitle: o.warningTitle,
hgap: c.hgap,
readonly: o.readonly
});
@ -54,6 +56,10 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
setText: function (text) {
this.text.setText(text);
},
setTipType: function (v) {
this.text.options.tipType = v;
}
});
BI.shortcut("bi.text_trigger", BI.TextTrigger);

8
src/case/trigger/trigger.text.select.js

@ -23,7 +23,9 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
element: this,
height: o.height,
readonly: o.readonly,
text: this._digest(o.value, o.items)
text: this._digest(o.value, o.items),
tipType: o.tipType,
warningTitle: o.warningTitle
});
},
@ -49,6 +51,10 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, {
this.trigger.setText(this._digest(vals, this.options.items));
},
setTipType: function (v) {
this.trigger.setTipType(v);
},
populate: function (items) {
this.options.items = items;
}

1
src/component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo.js

@ -18,6 +18,7 @@ BI.AllValueMultiTextValueCombo = BI.inherit(BI.Widget, {
value: value,
numOfPage: 100,
valueFormatter: o.valueFormatter,
warningTitle: o.warningTitle,
listeners: [{
eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,
action: function () {

45
src/core/base.js

@ -45,10 +45,18 @@ if (!_global.BI) {
}
var len = arguments.length;
if (len > 1) {
if (localeText.indexOf("{R1}") > -1) {
for (var i = 1; i < len; i++) {
var key = "{R" + i + "}";
localeText = BI.replaceAll(localeText, key, arguments[i] + "");
}
} else {
var args = Array.prototype.slice.call(arguments);
var count = 1;
return BI.replaceAll(localeText, "\\{\\s*\\}", function () {
return args[count++] + "";
});
}
}
return localeText;
},
@ -466,6 +474,13 @@ if (!_global.BI) {
return sb;
},
init: function () {
// 先把准备环境准备好
while (BI.prepares && BI.prepares.length > 0) {
BI.prepares.shift()();
}
},
has: function (obj, keys) {
if (BI.isArray(keys)) {
if (keys.length === 0) {
@ -478,6 +493,17 @@ if (!_global.BI) {
return _.has.apply(_, arguments);
},
freeze: function (value) {
if (Object.freeze) {
return Object.freeze(value);
} else {
if (!BI.isObject(value)) {
throw new TypeError('Object.freeze can only be called on Objects.');
}
return value;
}
},
// 数字和字符串可以作为key
isKey: function (key) {
return BI.isNumber(key) || (BI.isString(key) && key.length > 0);
@ -538,6 +564,7 @@ if (!_global.BI) {
// deep方法
_.extend(BI, {
deepClone: _.cloneDeep,
deepExtend: _.merge,
isDeepMatch: function (object, attrs) {
var keys = BI.keys(attrs), length = keys.length;
@ -650,12 +677,6 @@ if (!_global.BI) {
}
}
return result;
},
deepExtend: function () {
var args = [].slice.call(arguments);
args.unshift(true);
return $.extend.apply($, args);
}
});
@ -679,7 +700,7 @@ if (!_global.BI) {
var pending = false;
var timerFunc;
function nextTickHandler () {
function nextTickHandler() {
pending = false;
var copies = callbacks.slice(0);
callbacks = [];
@ -712,7 +733,7 @@ if (!_global.BI) {
setTimeout(nextTickHandler, 0);
};
}
return function queueNextTick (cb) {
return function queueNextTick(cb) {
var _resolve;
var args = [].slice.call(arguments, 1);
callbacks.push(function () {
@ -814,7 +835,7 @@ if (!_global.BI) {
},
isNumeric: function (number) {
return !isNaN( parseFloat(number) ) && isFinite( number );
return !isNaN(parseFloat(number)) && isFinite(number);
},
isFloat: function (number) {
@ -1311,7 +1332,8 @@ if (!_global.BI) {
}
if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {
var localTime = dt.getTime();
var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
var localOffset = new Date().getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数
var utc = localTime + localOffset; // utc即GMT时间标准时区
return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);
}
@ -1361,7 +1383,8 @@ if (!_global.BI) {
break;
}
if (BI.isNotNull(BI.timeZone)) {
return dt.getTime() - BI.timeZone - dt.getTimezoneOffset() * 60000;
// BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准
return dt.getTime() - BI.timeZone - new Date().getTimezoneOffset() * 60000;
}
return dt.getTime();

4
src/core/func/array.js

@ -10,13 +10,13 @@ _.extend(BI, {
}
},
pushDistinct: function (sArray, obj) {
if (!BI.contains(obj)) {
if (!BI.contains(sArray, obj)) {
sArray.push(obj);
}
},
pushDistinctArray: function (sArray, array) {
for (var i = 0, len = array.length; i < len; i++) {
sArray.pushDistinct(array[i]);
BI.pushDistinct(sArray, array[i]);
}
}
});

46
src/core/func/date.js

@ -49,18 +49,16 @@ _.extend(BI, {
var d = BI.getDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
var week = d.getDay();
var startOfWeek = BI.StartOfWeek % 7;
if (date.getMonth() === 0 && date.getDate() <= week) {
return 1;
}
d.setDate(date.getDate() - (week < startOfWeek ? (7 + week - startOfWeek) : (week - startOfWeek)));
var ms = d.valueOf(); // GMT
var middleDay = (startOfWeek + 3) % 7;
middleDay = middleDay || 7;
// 偏移到周周首之前需要多少天
var offsetWeekStartCount = week < startOfWeek ? (7 + week - startOfWeek) : (week - startOfWeek);
var offsetWeekMiddleCount = middleDay < startOfWeek ? (7 + middleDay - startOfWeek) : (middleDay - startOfWeek);
d.setDate(d.getDate() - offsetWeekStartCount + offsetWeekMiddleCount);
var ms = d.valueOf();
d.setMonth(0);
d.setDate(1);
var offset = Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1;
if (d.getDay() !== startOfWeek) {
offset++;
}
return offset;
return Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1;
},
getQuarter: function (date) {
@ -198,12 +196,38 @@ _.extend(BI, {
s["%Q"] = qr;
var re = /%./g;
BI.isKhtml = BI.isKhtml || function () {
if(!_global.navigator) {
return false;
}
return /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
};
if (!BI.isKhtml()) {
return str.replace(re, function (par) {
return s[par] || par;
});
}
// 包含年周的格式化,ISO8601标准周的计数会影响年
if ((str.indexOf("%Y") !== -1 || str.indexOf("%y") !== -1) && (str.indexOf("%W") !== -1 || str.indexOf("%U") !== -1 || str.indexOf("%V") !== -1)) {
switch (wn) {
// 如果周数是1,但是当前却在12月,表示此周数为下一年的
case 1:
if (m === 11) {
s["%y"] = parseInt(s["%y"]) + 1;
s["%Y"] = parseInt(s["%Y"]) + 1;
}
break;
// 如果周数是53,但是当前却在1月,表示此周数为上一年的
case 53:
if (m === 0) {
s["%y"] = parseInt(s["%y"]) - 1;
s["%Y"] = parseInt(s["%Y"]) - 1;
}
break;
default:
break;
}
}
var a = str.match(re);
for (var i = 0; i < a.length; i++) {
var tmp = s[a[i]];

2
src/core/func/function.js

@ -3,7 +3,7 @@
* Created by GUY on 2015/6/24.
*/
BI.Func = {};
BI.extend(BI.Func, {
_.extend(BI.Func, {
/**
* 创建唯一的名字
* @param array

18
src/core/inject.js

@ -1,4 +1,12 @@
(function () {
var moduleInjection = {};
BI.module = function (xtype, cls) {
if (moduleInjection[xtype] != null) {
_global.console && console.error("module:[" + xtype + "] has been registed");
}
moduleInjection[xtype] = cls;
};
var constantInjection = {};
BI.constant = function (xtype, cls) {
if (constantInjection[xtype] != null) {
@ -91,6 +99,16 @@
points[type][action][after ? "after" : "before"].push(pointFn);
};
BI.Modules = {
getModule: function (type) {
if(!moduleInjection[type]){
_global.console && console.error("module:[" + type + "] does not exists");
return false;
}
return moduleInjection[type];
}
};
BI.Constants = {
getConstant: function (type) {
return constantInjection[type];

2
src/core/listener/listener.show.js

@ -22,6 +22,7 @@ BI.ShowListener = BI.inherit(BI.OB, {
_init: function () {
BI.ShowListener.superclass._init.apply(this, arguments);
var self = this, o = this.options;
if (o.eventObj) {
o.eventObj.on(BI.Controller.EVENT_CHANGE, function (type, v, ob) {
if (type === BI.Events.CLICK) {
v = v || o.eventObj.getValue();
@ -43,5 +44,6 @@ BI.ShowListener = BI.inherit(BI.OB, {
}
});
}
}
});
BI.ShowListener.EVENT_CHANGE = "ShowListener.EVENT_CHANGE";

38
src/core/lodash.js

@ -1,7 +1,7 @@
/**
* @license
* Lodash (Custom Build) <https://lodash.com/>
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim"`
* Build: `lodash core plus="debounce,throttle,get,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge"`
* Copyright JS Foundation and other contributors <https://js.foundation/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
@ -8894,6 +8894,41 @@
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/**
* This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source
@ -9752,6 +9787,7 @@
lodash.keys = keys;
lodash.map = map;
lodash.matches = matches;
lodash.merge = merge;
lodash.mixin = mixin;
lodash.negate = negate;
lodash.omit = omit;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save