diff --git a/Gruntfile.js b/Gruntfile.js index 90ec6685c..77e6a6c13 100644 --- a/Gruntfile.js +++ b/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 %>"] } } }, diff --git a/demo/config.js b/demo/config.js index cc3e5dfe7..d82b30363 100644 --- a/demo/config.js +++ b/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"}, diff --git a/demo/js/base/demo.label.js b/demo/js/base/demo.label.js index fee0da80f..0f5158f13 100644 --- a/demo/js/base/demo.label.js +++ b/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", diff --git a/demo/js/base/editor/demo.textarea_editor.js b/demo/js/base/editor/demo.textarea_editor.js index 3797218d4..11a9ace06 100644 --- a/demo/js/base/editor/demo.textarea_editor.js +++ b/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"); diff --git a/demo/js/case/combo/demo.text_value_down_list_combo.js b/demo/js/case/combo/demo.text_value_down_list_combo.js index d38b184db..3f0a7af54 100644 --- a/demo/js/case/combo/demo.text_value_down_list_combo.js +++ b/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" }] diff --git a/demo/js/category/customATree/demo.multilayerselecttree.leveltree.js b/demo/js/category/customATree/demo.multilayerselecttree.leveltree.js deleted file mode 100644 index 77eea261c..000000000 --- a/demo/js/category/customATree/demo.multilayerselecttree.leveltree.js +++ /dev/null @@ -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); \ No newline at end of file diff --git a/demo/js/config/base.js b/demo/js/config/base.js index 342610f06..234eaa3fa 100644 --- a/demo/js/config/base.js +++ b/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, diff --git a/demo/js/config/category.js b/demo/js/config/category.js index af917b648..1902196ff 100644 --- a/demo/js/config/category.js +++ b/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: "可以排序的树", diff --git a/demo/js/core/layout/demo.horizontal.js b/demo/js/core/layout/demo.horizontal.js index 4a6f65b09..377fd79c4 100644 --- a/demo/js/core/layout/demo.horizontal.js +++ b/demo/js/core/layout/demo.horizontal.js @@ -7,33 +7,118 @@ Demo.Horizontal = BI.inherit(BI.Widget, { }, render: function () { return { - type: "bi.horizontal", - hgap: 10, + type: "bi.vertical", + vgap: 10, items: [{ - type: "bi.label", - whiteSpace: "normal", - text: "因为大多数场景下都需要垂直居中,所以这个布局一般会被vertical_adapt布局设置scrollx=true取代", - cls: "layout-bg3", - width: 500, - height: 50 - }, { - type: "bi.label", - text: "水平布局", - cls: "layout-bg4", - width: 300, - height: 30 - }, { - type: "bi.label", - text: "水平布局", - cls: "layout-bg5", - width: 300, - height: 30 - }, { - type: "bi.label", - text: "水平布局", - cls: "layout-bg6", - width: 300, - height: 30 + type: "bi.horizontal", + height: 150, + hgap: 10, + items: [{ + type: "bi.label", + whiteSpace: "normal", + text: "因为大多数场景下都需要垂直居中,所以这个布局一般会被vertical_adapt布局设置scrollx=true取代", + cls: "layout-bg3", + width: 500, + height: 50 + }, { + type: "bi.label", + text: "水平布局", + cls: "layout-bg4", + width: 300, + height: 30 + }, { + type: "bi.label", + text: "水平布局", + cls: "layout-bg5", + width: 300, + height: 30 + }, { + type: "bi.label", + text: "水平布局", + cls: "layout-bg6", + 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" }] }; } diff --git a/demo/js/core/popup/demo.popover.js b/demo/js/core/popup/demo.popover.js index f6b18435c..bb696ea78 100644 --- a/demo/js/core/popup/demo.popover.js +++ b/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)", diff --git a/demo/js/widget/multiselect/demo.multi_select_combo.js b/demo/js/widget/multiselect/demo.multi_select_combo.js index d051d8236..4875747b1 100644 --- a/demo/js/widget/multiselect/demo.multi_select_combo.js +++ b/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); diff --git a/demo/js/widget/multiselect/demo.multi_select_tree.js b/demo/js/widget/multiselect/demo.multi_select_list.js similarity index 88% rename from demo/js/widget/multiselect/demo.multi_select_tree.js rename to demo/js/widget/multiselect/demo.multi_select_list.js index 60e349aaa..acfbebfe5 100644 --- a/demo/js/widget/multiselect/demo.multi_select_tree.js +++ b/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: ["柳州市城贸金属材料有限责任公司", "柳州市建福房屋租赁有限公司", "柳州市迅昌数码办公设备有限责任公司"] + 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); diff --git a/demo/js/widget/tree/demo.multilayer_single_level_tree.js b/demo/js/widget/tree/demo.multilayer_single_level_tree.js index 49f4f9a39..967c8d5f4 100644 --- a/demo/js/widget/tree/demo.multilayer_single_level_tree.js +++ b/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); } }); diff --git a/dist/base.css b/dist/base.css index 28a218f98..505fce153 100644 --- a/dist/base.css +++ b/dist/base.css @@ -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; diff --git a/dist/base.js b/dist/base.js index 5bc00e24e..604a33cdc 100644 --- a/dist/base.js +++ b/dist/base.js @@ -211,7 +211,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 @@ -254,25 +254,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的显示与否 @@ -305,6 +305,7 @@ BI.Pane = BI.inherit(BI.Widget, { }] }); } + this.element.addClass("loading-status"); }, loaded: function () { @@ -314,6 +315,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 () { @@ -353,7 +355,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, @@ -399,6 +401,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; @@ -406,29 +419,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); - } - self._hideTooltip(); + 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; @@ -437,9 +461,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()) @@ -533,8 +555,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({ @@ -582,6 +603,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)) { @@ -639,7 +665,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, @@ -859,6 +885,7 @@ BI.BasicButton = BI.inherit(BI.Single, { el: { type: "bi.bubble_combo", trigger: "", + direction: "top,left", ref: function () { self.combo = this; }, @@ -915,7 +942,7 @@ BI.BasicButton = BI.inherit(BI.Single, { } }, - _trigger: function () { + _trigger: function (e) { var o = this.options; if (!this.isEnabled()) { return; @@ -926,14 +953,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); } }, @@ -941,7 +968,7 @@ BI.BasicButton = BI.inherit(BI.Single, { if (this.isValid()) { this.beforeClick(e); } - this._trigger(); + this._trigger(e); if (this.isValid()) { this.doClick(e); } @@ -1051,7 +1078,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 }); }, @@ -1106,7 +1133,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 }); }, @@ -1634,7 +1661,7 @@ BI.shortcut("bi.button_tree", BI.ButtonTree);/** 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 }); @@ -1945,6 +1972,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 = $("