diff --git a/bi/base.js b/bi/base.js index 66c39e96ac..5c099604d9 100644 --- a/bi/base.js +++ b/bi/base.js @@ -308,163 +308,163 @@ BI.Pane = BI.inherit(BI.Widget, { } }); -BI.Pane.EVENT_LOADED = "EVENT_LOADED";/** - * guy - * 这仅仅只是一个超类, 所有简单控件的基类 - * 1、类的控制, - * 2、title的控制 - * 3、文字超过边界显示3个点 - * 4、cursor默认pointor - * @class BI.Single - * @extends BI.Widget - * @abstract - */ -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", - readonly: false, - title: null, - warningTitle: null, - tipType: null, // success或warning - value: null - }) - }, - - _showToolTip: function (e, opt) { - opt || (opt = {}); - var self = this; - var type = this.getTipType() || (this.isEnabled() ? "success" : "warning"); - var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle()); - if (BI.isKey(title)) { - BI.Tooltips.show(e, this.getName(), title, type, this, opt); - } - }, - - _hideTooltip: function () { - var self = this; - var tooltip = BI.Tooltips.get(this.getName()); - if (BI.isNotNull(tooltip)) { - tooltip.element.fadeOut(200, function () { - BI.Tooltips.remove(self.getName()); - }); - } - }, - - _init: function () { - BI.Single.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (BI.isKey(o.title) || BI.isKey(o.warningTitle) - || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { - this.enableHover(); - } - }, - - enableHover: function (opt) { - opt || (opt = {}); - var self = this; - if (!this._hoverBinded) { - 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._showToolTip(self._e || e, opt); - }, 200); - } else if (self.getTipType() === "success" || self.isEnabled()) { - self.timeout = 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(); - } - }); - this.element.on("mouseleave.title" + this.getName(), function () { - self._e = null; - if (BI.isNotNull(self.timeout)) { - clearTimeout(self.timeout); - } - self._hideTooltip(); - }); - this._hoverBinded = true; - } - }, - - disabledHover: function () { - //取消hover事件 - if (BI.isNotNull(this.timeout)) { - clearTimeout(this.timeout); - } - this._hideTooltip(); - $(this.element).unbind("mouseenter.title" + this.getName()) - .unbind("mousemove.title" + this.getName()) - .unbind("mouseleave.title" + this.getName()); - this._hoverBinded = false; - }, - - populate: function (items) { - this.items = items || []; - }, - - //opt: {container: '', belowMouse: false} - setTitle: function (title, opt) { - this.options.title = title; - if (BI.isKey(title)) { - this.enableHover(opt); - } else { - this.disabledHover(); - } - }, - - setWarningTitle: function (title, opt) { - this.options.warningTitle = title; - if (BI.isKey(title)) { - this.enableHover(opt); - } else { - this.disabledHover(); - } - }, - - getTipType: function () { - return this.options.tipType; - }, - - isReadOnly: function () { - return !!this.options.readonly; - }, - - getTitle: function () { - var title = this.options.title; - if(BI.isFunction(title)) { - return title(); - } - return title; - }, - - getWarningTitle: function () { - var title = this.options.warningTitle; - if(BI.isFunction(title)) { - return title(); - } - return title; - }, - - setValue: function (val) { - if (!this.options.readonly) { - this.options.value = val; - } - }, - - getValue: function () { - return this.options.value; - } +BI.Pane.EVENT_LOADED = "EVENT_LOADED";/** + * guy + * 这仅仅只是一个超类, 所有简单控件的基类 + * 1、类的控制, + * 2、title的控制 + * 3、文字超过边界显示3个点 + * 4、cursor默认pointor + * @class BI.Single + * @extends BI.Widget + * @abstract + */ +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", + readonly: false, + title: null, + warningTitle: null, + tipType: null, // success或warning + value: null + }) + }, + + _showToolTip: function (e, opt) { + opt || (opt = {}); + var self = this; + var type = this.getTipType() || (this.isEnabled() ? "success" : "warning"); + var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle()); + if (BI.isKey(title)) { + BI.Tooltips.show(e, this.getName(), title, type, this, opt); + } + }, + + _hideTooltip: function () { + var self = this; + var tooltip = BI.Tooltips.get(this.getName()); + if (BI.isNotNull(tooltip)) { + tooltip.element.fadeOut(200, function () { + BI.Tooltips.remove(self.getName()); + }); + } + }, + + _init: function () { + BI.Single.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (BI.isKey(o.title) || BI.isKey(o.warningTitle) + || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { + this.enableHover(); + } + }, + + enableHover: function (opt) { + opt || (opt = {}); + var self = this; + if (!this._hoverBinded) { + 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._showToolTip(self._e || e, opt); + }, 200); + } else if (self.getTipType() === "success" || self.isEnabled()) { + self.timeout = 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(); + } + }); + this.element.on("mouseleave.title" + this.getName(), function () { + self._e = null; + if (BI.isNotNull(self.timeout)) { + clearTimeout(self.timeout); + } + self._hideTooltip(); + }); + this._hoverBinded = true; + } + }, + + disabledHover: function () { + //取消hover事件 + if (BI.isNotNull(this.timeout)) { + clearTimeout(this.timeout); + } + this._hideTooltip(); + $(this.element).unbind("mouseenter.title" + this.getName()) + .unbind("mousemove.title" + this.getName()) + .unbind("mouseleave.title" + this.getName()); + this._hoverBinded = false; + }, + + populate: function (items) { + this.items = items || []; + }, + + //opt: {container: '', belowMouse: false} + setTitle: function (title, opt) { + this.options.title = title; + if (BI.isKey(title)) { + this.enableHover(opt); + } else { + this.disabledHover(); + } + }, + + setWarningTitle: function (title, opt) { + this.options.warningTitle = title; + if (BI.isKey(title)) { + this.enableHover(opt); + } else { + this.disabledHover(); + } + }, + + getTipType: function () { + return this.options.tipType; + }, + + isReadOnly: function () { + return !!this.options.readonly; + }, + + getTitle: function () { + var title = this.options.title; + if(BI.isFunction(title)) { + return title(); + } + return title; + }, + + getWarningTitle: function () { + var title = this.options.warningTitle; + if(BI.isFunction(title)) { + return title(); + } + return title; + }, + + setValue: function (val) { + if (!this.options.readonly) { + this.options.value = val; + } + }, + + getValue: function () { + return this.options.value; + } });/** * guy 表示一行数据,通过position来定位位置的数据 * @class BI.Text @@ -918,82 +918,82 @@ BI.BasicButton = BI.inherit(BI.Single, { BI.BasicButton.superclass.destroy.apply(this, arguments); } }); -BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/** - * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态 - * - * Created by GUY on 2015/9/9. - * @class BI.NodeButton - * @extends BI.BasicButton - * @abstract - */ -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", - open: false - }) - }, - - _init:function() { - BI.NodeButton.superclass._init.apply(this, arguments); - var self = this; - BI.nextTick(function(){ - self.setOpened(self.isOpened()); - }) - }, - - doClick: function(){ - BI.NodeButton.superclass.doClick.apply(this, arguments); - this.setOpened(!this.isOpened()); - }, - - isOnce: function(){ - return false; - }, - - isOpened: function(){ - return !!this.options.open; - }, - - setOpened: function(b){ - this.options.open = !!b; - }, - - triggerCollapse: function(){ - if(this.isOpened()) { - this.setOpened(false); - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this); - } - }, - - triggerExpand: function(){ - if(!this.isOpened()) { - this.setOpened(true); - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this); - } - } -});/** - * guy - * tip提示 - * zIndex在10亿级别 - * @class BI.Tip - * @extends BI.Single - * @abstract - */ -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", - zIndex: BI.zIndex_tip - }) - }, - - _init : function() { - BI.Tip.superclass._init.apply(this, arguments); - this.element.css({"zIndex": this.options.zIndex}); - } +BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/** + * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态 + * + * Created by GUY on 2015/9/9. + * @class BI.NodeButton + * @extends BI.BasicButton + * @abstract + */ +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", + open: false + }) + }, + + _init:function() { + BI.NodeButton.superclass._init.apply(this, arguments); + var self = this; + BI.nextTick(function(){ + self.setOpened(self.isOpened()); + }) + }, + + doClick: function(){ + BI.NodeButton.superclass.doClick.apply(this, arguments); + this.setOpened(!this.isOpened()); + }, + + isOnce: function(){ + return false; + }, + + isOpened: function(){ + return !!this.options.open; + }, + + setOpened: function(b){ + this.options.open = !!b; + }, + + triggerCollapse: function(){ + if(this.isOpened()) { + this.setOpened(false); + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this); + } + }, + + triggerExpand: function(){ + if(!this.isOpened()) { + this.setOpened(true); + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this); + } + } +});/** + * guy + * tip提示 + * zIndex在10亿级别 + * @class BI.Tip + * @extends BI.Single + * @abstract + */ +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", + zIndex: BI.zIndex_tip + }) + }, + + _init : function() { + BI.Tip.superclass._init.apply(this, arguments); + this.element.css({"zIndex": this.options.zIndex}); + } });/** * Created by GUY on 2015/6/26. * @class BI.ButtonGroup @@ -20293,32 +20293,32 @@ BI.Tooltip = BI.inherit(BI.Tip, { } }); -BI.shortcut("bi.tooltip", BI.Tooltip);/** - * 下拉 - * @class BI.Trigger - * @extends BI.Single - * @abstract - */ -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", - height: 30 - }) - }, - - _init : function() { - BI.Trigger.superclass._init.apply(this, arguments); - }, - - setKey: function(){ - - }, - - getKey: function(){ - - } +BI.shortcut("bi.tooltip", BI.Tooltip);/** + * 下拉 + * @class BI.Trigger + * @extends BI.Single + * @abstract + */ +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", + height: 30 + }) + }, + + _init : function() { + BI.Trigger.superclass._init.apply(this, arguments); + }, + + setKey: function(){ + + }, + + getKey: function(){ + + } });// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/demo/js/widget/editor/demo.shelter_editor.js b/demo/js/case/editor/demo.shelter_editor.js similarity index 100% rename from demo/js/widget/editor/demo.shelter_editor.js rename to demo/js/case/editor/demo.shelter_editor.js diff --git a/demo/js/widget/editor/demo.sign_editor.js b/demo/js/case/editor/demo.sign_editor.js similarity index 100% rename from demo/js/widget/editor/demo.sign_editor.js rename to demo/js/case/editor/demo.sign_editor.js diff --git a/demo/js/widget/editor/demo.sign_initial_editor.js b/demo/js/case/editor/demo.sign_initial_editor.js similarity index 55% rename from demo/js/widget/editor/demo.sign_initial_editor.js rename to demo/js/case/editor/demo.sign_initial_editor.js index 480d4d498b..49bc5a5d0e 100644 --- a/demo/js/widget/editor/demo.sign_initial_editor.js +++ b/demo/js/case/editor/demo.sign_initial_editor.js @@ -5,17 +5,26 @@ Demo.SignInitialEditor = BI.inherit(BI.Widget, { props: { baseCls: "" }, + mounted: function () { + this.editor.setValue({ + value: "123", + text: "sdga" + }) + }, render: function () { + var self = this; return { type: "bi.horizontal_adapt", items: [{ type: "bi.sign_initial_editor", - cls:"layout-bg5", - value:"123", - text:"456", + ref: function () { + self.editor = this; + }, + cls: "layout-bg5", + text: "原始值", width: 300 }], - vgap:20 + vgap: 20 } } diff --git a/demo/js/widget/editor/demo.state_editor.js b/demo/js/case/editor/demo.state_editor.js similarity index 67% rename from demo/js/widget/editor/demo.state_editor.js rename to demo/js/case/editor/demo.state_editor.js index dedc7d0242..c4dbb83f36 100644 --- a/demo/js/widget/editor/demo.state_editor.js +++ b/demo/js/case/editor/demo.state_editor.js @@ -10,12 +10,11 @@ Demo.StateEditor = BI.inherit(BI.Widget, { type: "bi.horizontal_adapt", items: [{ type: "bi.state_editor", - cls:"bi-border", - value:"123", - text:"456", + value: "123", + text: "456", width: 300 }], - vgap:20 + vgap: 20 } } diff --git a/demo/js/config/case.js b/demo/js/config/case.js index 3b477402bc..9988901a8e 100644 --- a/demo/js/config/case.js +++ b/demo/js/config/case.js @@ -6,10 +6,6 @@ Demo.CASE_CONFIG = [{ pId: 3, id: 301, text: "editors" -}, { - pId: 301, - text: "bi.record_editor", - value: "demo.record_editor" }, { pId: 301, text: "bi.shelter_editor", @@ -18,6 +14,10 @@ Demo.CASE_CONFIG = [{ pId: 301, text: "bi.sign_editor", value: "demo.sign_editor" +}, { + pId: 301, + text: "bi.sign_initial_editor", + value: "demo.sign_initial_editor" }, { pId: 301, text: "bi.state_editor", diff --git a/demo/js/config/widget.js b/demo/js/config/widget.js index 8be5d2cf95..9c15337406 100644 --- a/demo/js/config/widget.js +++ b/demo/js/config/widget.js @@ -1,297 +1,256 @@ Demo.WIDGET_CONFIG = [{ - id: 4, - text: "详细控件", - open: true - }, { - pId: 4, - id: 420, - text: '各种小控件', - }, { - pId: 420, - text: "各种通用按钮", - value: "demo.buttons" - }, { - pId: 420, - text: "各种提示性信息", - value: "demo.tips" - }, { - pId: 420, - text: "各种items", - value: "demo.items" - }, { - pId: 420, - text: "各种节点node", - value: "demo.nodes" - }, { - pId: 420, - text: "各种segment", - value: "demo.segments" - }, { - pId: 420, - text: "可以切换的树", - value: "demo.switch_tree" - }, { - id: 400, - pId: 4, - text: "tree" - }, { - pId: 400, - text: "bi.multi_tree_combo", - value: "demo.multi_tree_combo" - }, { - pId: 400, - text: "bi.switch_tree", - value: "demo.switch_tree" - }, { - id: 401, - pId: 4, - text: "table" - }, { - pId: 401, - text: "bi.preview_table", - value: "demo.preview_table" - }, { - pId: 401, - text: "bi.responsive_table", - value: "demo.responsive_table" - }, { - pId: 401, - text: "bi.excel_table", - value: "demo.excel_table" - }, { - pId: 4, - id: 402, - text: "年份控件", - open: false - }, { - pId: 402, - text: "bi.year_combo", - value: "demo.year" - }, { - pId: 4, - id: 403, - text: "月份控件", - open: false - }, { - pId: 403, - text: "bi.month_combo", - value: "demo.month" - }, { - pId: 4, - id: 404, - text: "季度控件", - open: false - }, { - pId: 404, - text: "bi.quarter_combo", - value: "demo.quarter" - }, { - pId: 4, - id: 405, - text: "下拉列表", - open: false - }, { - pId: 405, - text: "bi.down_list_combo", - value: "demo.down_list" - }, { - pId: 4, - id: 406, - text: "文本框控件", - open: false - }, { - pId: 406, - text: "bi.text_editor", - value: "demo.text_editor" - }, { - pId: 406, - text: "bi.search_editor", - value: "demo.search_editor" - }, { - pId: 406, - text: "bi.sign_editor", - value: "demo.sign_editor" - }, { - pId: 406, - text: "bi.sign_initial_editor", - value: "demo.sign_initial_editor" - }, { - pId: 406, - text: "bi.sign_style_editor", - value: "demo.sign_style_editor" - }, { - pId: 406, - text: "bi.state_editor", - value: "demo.state_editor" - }, { - pId: 406, - text: "bi.clear_editor", - value: "demo.clear_editor" - }, { - pId: 406, - text: "bi.record_editor", - value: "demo.record_editor" - }, { - pId: 406, - text: "bi.shelter_editor", - value: "demo.shelter_editor" - }, - { - pId: 4, - id: 407, - text: "下拉框控件", - open: false - }, { - pId: 407, - text: "bi.text_value_combo", - value: "demo.text_value_combo" - }, { - pId: 407, - text: "bi.text_value_check_combo", - value: "demo.text_value_check_combo" - }, { - pId: 407, - text: "bi.text_value_down_list_combo", - value: "demo.text_value_down_list_combo" - }, { - pId: 407, - text: "bi.static_combo", - value: "demo.static_combo" - }, { - pId: 407, - text: "bi.icon_combo", - value: "demo.icon_combo" - }, { - pId: 407, - text: "bi.formula_combo", - value: "demo.formula_combo" - }, { - pId: 4, - id: 408, - text: "选择字段列表", - open: false - }, { - pId: 408, - text: "bi.placeholder" - }, { - pId: 4, - id: 409, - text: "公式编辑器", - open: false - }, { - pId: 409, - text: "bi.placeholder" - }, { - pId: 4, - id: 410, - text: "数值区间控件" - }, { - pId: 410, - text: "bi.numerical_interval", - value: "demo.numberical_interval" - }, { - pId: 4, - id: 411, - text: "下拉复选框有确定按钮" - }, { - pId: 411, - text: "bi.multi_select_combo", - value: "demo.multi_select_combo" - }, { - pId: 4, - id: 412, - text: "简单日期控件" - }, { - pId: 412, - text: "bi.date_combo", - value: "demo.date" - }, { - pId: 412, - text: "bi.date_pane_widget", - value: "demo.date_pane_widget" - }, { - pId: 412, - text: "bi.year_month_combo", - value: "demo.year_month_combo" - }, { - pId: 412, - text: "bi.year_quarter_combo", - value: "demo.year_quarter_combo" - }, { - pId: 412, - text: "bi.custom_date_time", - value: "demo.custom_date_time" - }, { - pId: 4, - id: 413, - text: "简单下拉树" - }, { - pId: 413, - text: "bi.single_tree_combo", - value: "demo.single_tree_combo" - }, { - pId: 413, - text: "bi.multilayer_single_tree_combo", - value: "demo.multilayer_single_tree_combo" - }, { - pId: 4, - id: 414, - text: "可选下拉树" - }, { - pId: 414, - text: "bi.select_tree_combo", - value: "demo.select_tree_combo" - }, { - pId: 414, - text: "bi.multilayer_select_tree_combo", - value: "demo.multilayer_select_tree_combo" - }, { - pId: 4, - id: 415, - text: "路径选择" - }, { - pId: 415, - text: "bi.path_chooser", - value: "demo.path_chooser" - }, { - pId: 415, - text: "bi.direction_path_chooser", - value: "demo.direction_path_chooser" - }, { - pId: 4, - id: 416, - text: "关联视图" - }, { - pId: 416, - text: "bi.relation_view", - value: "demo.relation_view" - }, { - pId: 4, - id: 417, - text: "布局" - }, { - pId: 417, - text: "bi.adaptive_arrangement", - value: "demo.adaptive_arrangement" - }, { - pId: 417, - text: "bi.interactive_arrangement", - value: "demo.interactive_arrangement" - }, { - pId: 4, - id: 418, - text: "提示对话框" - }, { - pId: 418, - text: "bi.dialog", - value: "demo.dialog" - }, { - pId: 4, - id: 419, - text: "文件管理" - }, { - pId: 419, - text: "demo.file_manager", - value: "demo.file_manager" - } + id: 4, + text: "详细控件", + open: true +}, { + pId: 4, + id: 420, + text: '各种小控件', +}, { + pId: 420, + text: "各种通用按钮", + value: "demo.buttons" +}, { + pId: 420, + text: "各种提示性信息", + value: "demo.tips" +}, { + pId: 420, + text: "各种items", + value: "demo.items" +}, { + pId: 420, + text: "各种节点node", + value: "demo.nodes" +}, { + pId: 420, + text: "各种segment", + value: "demo.segments" +}, { + pId: 420, + text: "可以切换的树", + value: "demo.switch_tree" +}, { + id: 400, + pId: 4, + text: "tree" +}, { + pId: 400, + text: "bi.multi_tree_combo", + value: "demo.multi_tree_combo" +}, { + pId: 400, + text: "bi.switch_tree", + value: "demo.switch_tree" +}, { + id: 401, + pId: 4, + text: "table" +}, { + pId: 401, + text: "bi.preview_table", + value: "demo.preview_table" +}, { + pId: 401, + text: "bi.responsive_table", + value: "demo.responsive_table" +}, { + pId: 401, + text: "bi.excel_table", + value: "demo.excel_table" +}, { + pId: 4, + id: 402, + text: "年份控件", + open: false +}, { + pId: 402, + text: "bi.year_combo", + value: "demo.year" +}, { + pId: 4, + id: 403, + text: "月份控件", + open: false +}, { + pId: 403, + text: "bi.month_combo", + value: "demo.month" +}, { + pId: 4, + id: 404, + text: "季度控件", + open: false +}, { + pId: 404, + text: "bi.quarter_combo", + value: "demo.quarter" +}, { + pId: 4, + id: 405, + text: "下拉列表", + open: false +}, { + pId: 405, + text: "bi.down_list_combo", + value: "demo.down_list" +}, { + pId: 4, + id: 406, + text: "文本框控件", + open: false +}, { + pId: 406, + text: "bi.text_editor", + value: "demo.text_editor" +}, { + pId: 406, + text: "bi.search_editor", + value: "demo.search_editor" +}, { + pId: 406, + text: "bi.clear_editor", + value: "demo.clear_editor" +}, { + pId: 4, + id: 407, + text: "下拉框控件", + open: false +}, { + pId: 407, + text: "bi.text_value_combo", + value: "demo.text_value_combo" +}, { + pId: 407, + text: "bi.text_value_check_combo", + value: "demo.text_value_check_combo" +}, { + pId: 407, + text: "bi.text_value_down_list_combo", + value: "demo.text_value_down_list_combo" +}, { + pId: 407, + text: "bi.static_combo", + value: "demo.static_combo" +}, { + pId: 407, + text: "bi.icon_combo", + value: "demo.icon_combo" +}, { + pId: 407, + text: "bi.formula_combo", + value: "demo.formula_combo" +}, { + pId: 4, + id: 410, + text: "数值区间控件" +}, { + pId: 410, + text: "bi.numerical_interval", + value: "demo.numberical_interval" +}, { + pId: 4, + id: 411, + text: "下拉复选框有确定按钮" +}, { + pId: 411, + text: "bi.multi_select_combo", + value: "demo.multi_select_combo" +}, { + pId: 4, + id: 412, + text: "简单日期控件" +}, { + pId: 412, + text: "bi.date_combo", + value: "demo.date" +}, { + pId: 412, + text: "bi.date_pane_widget", + value: "demo.date_pane_widget" +}, { + pId: 412, + text: "bi.year_month_combo", + value: "demo.year_month_combo" +}, { + pId: 412, + text: "bi.year_quarter_combo", + value: "demo.year_quarter_combo" +}, { + pId: 412, + text: "bi.custom_date_time", + value: "demo.custom_date_time" +}, { + pId: 4, + id: 413, + text: "简单下拉树" +}, { + pId: 413, + text: "bi.single_tree_combo", + value: "demo.single_tree_combo" +}, { + pId: 413, + text: "bi.multilayer_single_tree_combo", + value: "demo.multilayer_single_tree_combo" +}, { + pId: 4, + id: 414, + text: "可选下拉树" +}, { + pId: 414, + text: "bi.select_tree_combo", + value: "demo.select_tree_combo" +}, { + pId: 414, + text: "bi.multilayer_select_tree_combo", + value: "demo.multilayer_select_tree_combo" +}, { + pId: 4, + id: 415, + text: "路径选择" +}, { + pId: 415, + text: "bi.path_chooser", + value: "demo.path_chooser" +}, { + pId: 415, + text: "bi.direction_path_chooser", + value: "demo.direction_path_chooser" +}, { + pId: 4, + id: 416, + text: "关联视图" +}, { + pId: 416, + text: "bi.relation_view", + value: "demo.relation_view" +}, { + pId: 4, + id: 417, + text: "布局" +}, { + pId: 417, + text: "bi.adaptive_arrangement", + value: "demo.adaptive_arrangement" +}, { + pId: 417, + text: "bi.interactive_arrangement", + value: "demo.interactive_arrangement" +}, { + pId: 4, + id: 418, + text: "提示对话框" +}, { + pId: 418, + text: "bi.dialog", + value: "demo.dialog" +}, { + pId: 4, + id: 419, + text: "文件管理" +}, { + pId: 419, + text: "bi.file_manager", + value: "demo.file_manager" +} ]; \ No newline at end of file diff --git a/demo/js/widget/editor/demo.record_editor.js b/demo/js/widget/editor/demo.record_editor.js deleted file mode 100644 index bb7de69236..0000000000 --- a/demo/js/widget/editor/demo.record_editor.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Created by Dailer on 2017/7/11. - */ -Demo.RecordEditor = BI.inherit(BI.Widget, { - props: { - baseCls: "" - }, - render: function () { - return { - type: "bi.horizontal_auto", - items: [{ - type: "bi.record_editor", - cls: "bi-border", - width: 300, - watermark: "这个是可以记录输入的" - }], - vgap: 20 - } - } -}) - -BI.shortcut("demo.record_editor", Demo.RecordEditor); \ No newline at end of file diff --git a/demo/js/widget/editor/demo.sign_style_editor.js b/demo/js/widget/editor/demo.sign_style_editor.js deleted file mode 100644 index 81f66c0e29..0000000000 --- a/demo/js/widget/editor/demo.sign_style_editor.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Created by Dailer on 2017/7/11. - */ -Demo.SignStyleEditor = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-exceltable" - }, - render: function () { - return { - type: "bi.horizontal_adapt", - items: [{ - type: "bi.sign_style_editor", - cls:"layout-bg5", - value:"12313", - width: 300 - }], - vgap:20 - } - } -}) - -BI.shortcut("demo.sign_style_editor", Demo.SignStyleEditor); \ No newline at end of file diff --git a/docs/background/auto-color.png b/docs/background/auto-color.png new file mode 100644 index 0000000000..63b3edf952 Binary files /dev/null and b/docs/background/auto-color.png differ diff --git a/docs/background/trans-color.png b/docs/background/trans-color.png new file mode 100644 index 0000000000..8fa44929c6 Binary files /dev/null and b/docs/background/trans-color.png differ diff --git a/docs/base.js b/docs/base.js index 66c39e96ac..5c099604d9 100644 --- a/docs/base.js +++ b/docs/base.js @@ -308,163 +308,163 @@ BI.Pane = BI.inherit(BI.Widget, { } }); -BI.Pane.EVENT_LOADED = "EVENT_LOADED";/** - * guy - * 这仅仅只是一个超类, 所有简单控件的基类 - * 1、类的控制, - * 2、title的控制 - * 3、文字超过边界显示3个点 - * 4、cursor默认pointor - * @class BI.Single - * @extends BI.Widget - * @abstract - */ -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", - readonly: false, - title: null, - warningTitle: null, - tipType: null, // success或warning - value: null - }) - }, - - _showToolTip: function (e, opt) { - opt || (opt = {}); - var self = this; - var type = this.getTipType() || (this.isEnabled() ? "success" : "warning"); - var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle()); - if (BI.isKey(title)) { - BI.Tooltips.show(e, this.getName(), title, type, this, opt); - } - }, - - _hideTooltip: function () { - var self = this; - var tooltip = BI.Tooltips.get(this.getName()); - if (BI.isNotNull(tooltip)) { - tooltip.element.fadeOut(200, function () { - BI.Tooltips.remove(self.getName()); - }); - } - }, - - _init: function () { - BI.Single.superclass._init.apply(this, arguments); - var self = this, o = this.options; - if (BI.isKey(o.title) || BI.isKey(o.warningTitle) - || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { - this.enableHover(); - } - }, - - enableHover: function (opt) { - opt || (opt = {}); - var self = this; - if (!this._hoverBinded) { - 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._showToolTip(self._e || e, opt); - }, 200); - } else if (self.getTipType() === "success" || self.isEnabled()) { - self.timeout = 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(); - } - }); - this.element.on("mouseleave.title" + this.getName(), function () { - self._e = null; - if (BI.isNotNull(self.timeout)) { - clearTimeout(self.timeout); - } - self._hideTooltip(); - }); - this._hoverBinded = true; - } - }, - - disabledHover: function () { - //取消hover事件 - if (BI.isNotNull(this.timeout)) { - clearTimeout(this.timeout); - } - this._hideTooltip(); - $(this.element).unbind("mouseenter.title" + this.getName()) - .unbind("mousemove.title" + this.getName()) - .unbind("mouseleave.title" + this.getName()); - this._hoverBinded = false; - }, - - populate: function (items) { - this.items = items || []; - }, - - //opt: {container: '', belowMouse: false} - setTitle: function (title, opt) { - this.options.title = title; - if (BI.isKey(title)) { - this.enableHover(opt); - } else { - this.disabledHover(); - } - }, - - setWarningTitle: function (title, opt) { - this.options.warningTitle = title; - if (BI.isKey(title)) { - this.enableHover(opt); - } else { - this.disabledHover(); - } - }, - - getTipType: function () { - return this.options.tipType; - }, - - isReadOnly: function () { - return !!this.options.readonly; - }, - - getTitle: function () { - var title = this.options.title; - if(BI.isFunction(title)) { - return title(); - } - return title; - }, - - getWarningTitle: function () { - var title = this.options.warningTitle; - if(BI.isFunction(title)) { - return title(); - } - return title; - }, - - setValue: function (val) { - if (!this.options.readonly) { - this.options.value = val; - } - }, - - getValue: function () { - return this.options.value; - } +BI.Pane.EVENT_LOADED = "EVENT_LOADED";/** + * guy + * 这仅仅只是一个超类, 所有简单控件的基类 + * 1、类的控制, + * 2、title的控制 + * 3、文字超过边界显示3个点 + * 4、cursor默认pointor + * @class BI.Single + * @extends BI.Widget + * @abstract + */ +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", + readonly: false, + title: null, + warningTitle: null, + tipType: null, // success或warning + value: null + }) + }, + + _showToolTip: function (e, opt) { + opt || (opt = {}); + var self = this; + var type = this.getTipType() || (this.isEnabled() ? "success" : "warning"); + var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle()); + if (BI.isKey(title)) { + BI.Tooltips.show(e, this.getName(), title, type, this, opt); + } + }, + + _hideTooltip: function () { + var self = this; + var tooltip = BI.Tooltips.get(this.getName()); + if (BI.isNotNull(tooltip)) { + tooltip.element.fadeOut(200, function () { + BI.Tooltips.remove(self.getName()); + }); + } + }, + + _init: function () { + BI.Single.superclass._init.apply(this, arguments); + var self = this, o = this.options; + if (BI.isKey(o.title) || BI.isKey(o.warningTitle) + || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { + this.enableHover(); + } + }, + + enableHover: function (opt) { + opt || (opt = {}); + var self = this; + if (!this._hoverBinded) { + 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._showToolTip(self._e || e, opt); + }, 200); + } else if (self.getTipType() === "success" || self.isEnabled()) { + self.timeout = 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(); + } + }); + this.element.on("mouseleave.title" + this.getName(), function () { + self._e = null; + if (BI.isNotNull(self.timeout)) { + clearTimeout(self.timeout); + } + self._hideTooltip(); + }); + this._hoverBinded = true; + } + }, + + disabledHover: function () { + //取消hover事件 + if (BI.isNotNull(this.timeout)) { + clearTimeout(this.timeout); + } + this._hideTooltip(); + $(this.element).unbind("mouseenter.title" + this.getName()) + .unbind("mousemove.title" + this.getName()) + .unbind("mouseleave.title" + this.getName()); + this._hoverBinded = false; + }, + + populate: function (items) { + this.items = items || []; + }, + + //opt: {container: '', belowMouse: false} + setTitle: function (title, opt) { + this.options.title = title; + if (BI.isKey(title)) { + this.enableHover(opt); + } else { + this.disabledHover(); + } + }, + + setWarningTitle: function (title, opt) { + this.options.warningTitle = title; + if (BI.isKey(title)) { + this.enableHover(opt); + } else { + this.disabledHover(); + } + }, + + getTipType: function () { + return this.options.tipType; + }, + + isReadOnly: function () { + return !!this.options.readonly; + }, + + getTitle: function () { + var title = this.options.title; + if(BI.isFunction(title)) { + return title(); + } + return title; + }, + + getWarningTitle: function () { + var title = this.options.warningTitle; + if(BI.isFunction(title)) { + return title(); + } + return title; + }, + + setValue: function (val) { + if (!this.options.readonly) { + this.options.value = val; + } + }, + + getValue: function () { + return this.options.value; + } });/** * guy 表示一行数据,通过position来定位位置的数据 * @class BI.Text @@ -918,82 +918,82 @@ BI.BasicButton = BI.inherit(BI.Single, { BI.BasicButton.superclass.destroy.apply(this, arguments); } }); -BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/** - * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态 - * - * Created by GUY on 2015/9/9. - * @class BI.NodeButton - * @extends BI.BasicButton - * @abstract - */ -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", - open: false - }) - }, - - _init:function() { - BI.NodeButton.superclass._init.apply(this, arguments); - var self = this; - BI.nextTick(function(){ - self.setOpened(self.isOpened()); - }) - }, - - doClick: function(){ - BI.NodeButton.superclass.doClick.apply(this, arguments); - this.setOpened(!this.isOpened()); - }, - - isOnce: function(){ - return false; - }, - - isOpened: function(){ - return !!this.options.open; - }, - - setOpened: function(b){ - this.options.open = !!b; - }, - - triggerCollapse: function(){ - if(this.isOpened()) { - this.setOpened(false); - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this); - } - }, - - triggerExpand: function(){ - if(!this.isOpened()) { - this.setOpened(true); - this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this); - } - } -});/** - * guy - * tip提示 - * zIndex在10亿级别 - * @class BI.Tip - * @extends BI.Single - * @abstract - */ -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", - zIndex: BI.zIndex_tip - }) - }, - - _init : function() { - BI.Tip.superclass._init.apply(this, arguments); - this.element.css({"zIndex": this.options.zIndex}); - } +BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/** + * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态 + * + * Created by GUY on 2015/9/9. + * @class BI.NodeButton + * @extends BI.BasicButton + * @abstract + */ +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", + open: false + }) + }, + + _init:function() { + BI.NodeButton.superclass._init.apply(this, arguments); + var self = this; + BI.nextTick(function(){ + self.setOpened(self.isOpened()); + }) + }, + + doClick: function(){ + BI.NodeButton.superclass.doClick.apply(this, arguments); + this.setOpened(!this.isOpened()); + }, + + isOnce: function(){ + return false; + }, + + isOpened: function(){ + return !!this.options.open; + }, + + setOpened: function(b){ + this.options.open = !!b; + }, + + triggerCollapse: function(){ + if(this.isOpened()) { + this.setOpened(false); + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this); + } + }, + + triggerExpand: function(){ + if(!this.isOpened()) { + this.setOpened(true); + this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this); + } + } +});/** + * guy + * tip提示 + * zIndex在10亿级别 + * @class BI.Tip + * @extends BI.Single + * @abstract + */ +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", + zIndex: BI.zIndex_tip + }) + }, + + _init : function() { + BI.Tip.superclass._init.apply(this, arguments); + this.element.css({"zIndex": this.options.zIndex}); + } });/** * Created by GUY on 2015/6/26. * @class BI.ButtonGroup @@ -20293,32 +20293,32 @@ BI.Tooltip = BI.inherit(BI.Tip, { } }); -BI.shortcut("bi.tooltip", BI.Tooltip);/** - * 下拉 - * @class BI.Trigger - * @extends BI.Single - * @abstract - */ -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", - height: 30 - }) - }, - - _init : function() { - BI.Trigger.superclass._init.apply(this, arguments); - }, - - setKey: function(){ - - }, - - getKey: function(){ - - } +BI.shortcut("bi.tooltip", BI.Tooltip);/** + * 下拉 + * @class BI.Trigger + * @extends BI.Single + * @abstract + */ +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", + height: 30 + }) + }, + + _init : function() { + BI.Trigger.superclass._init.apply(this, arguments); + }, + + setKey: function(){ + + }, + + getKey: function(){ + + } });// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/docs/demo.js b/docs/demo.js index 56b5115847..36fd0946ba 100644 --- a/docs/demo.js +++ b/docs/demo.js @@ -1838,7 +1838,124 @@ BI.shortcut("demo.color_chooser", Demo.Func);Demo.Func = BI.inherit(BI.Widget, { }) } }); -BI.shortcut("demo.complex_canvas", Demo.Func);Demo.Func = BI.inherit(BI.Widget, { +BI.shortcut("demo.complex_canvas", Demo.Func);/** + * Created by Dailer on 2017/7/11. + */ +Demo.ClearEditor = BI.inherit(BI.Widget, { + props: { + baseCls: "" + }, + render: function () { + var editor; + return { + type: "bi.horizontal_auto", + items: [{ + type: "bi.shelter_editor", + cls: "bi-border", + ref:function(_ref){ + editor=_ref; + }, + width: 300, + watermark: "这个是带标记的" + },{ + type:"bi.button", + text:"setValue", + width:300, + handler:function(){ + editor.setValue("凛冬将至"); + } + },{ + type:"bi.button", + text:"doHighLight", + width:300, + handler:function(){ + editor.doHighLight(); + console.log(editor.getState()); + } + }], + vgap: 20 + } + } +}) + +BI.shortcut("demo.shelter_editor", Demo.ClearEditor);/** + * Created by Dailer on 2017/7/14. + */ +Demo.SignEditor = BI.inherit(BI.Widget, { + props: { + baseCls: "" + }, + render: function () { + return { + type: "bi.horizontal_adapt", + items: [{ + type: "bi.sign_editor", + // cls:"layout-bg5", + value: "123", + text: "456", + width: 300 + }], + vgap: 20 + + } + } +}) + +BI.shortcut("demo.sign_editor", Demo.SignEditor);/** + * Created by Dailer on 2017/7/11. + */ +Demo.SignInitialEditor = BI.inherit(BI.Widget, { + props: { + baseCls: "" + }, + mounted: function () { + this.editor.setValue({ + value: "123", + text: "sdga" + }) + }, + render: function () { + var self = this; + return { + type: "bi.horizontal_adapt", + items: [{ + type: "bi.sign_initial_editor", + ref: function () { + self.editor = this; + }, + cls: "layout-bg5", + text: "原始值", + width: 300 + }], + vgap: 20 + + } + } +}) + +BI.shortcut("demo.sign_initial_editor", Demo.SignInitialEditor);/** + * Created by Dailer on 2017/7/11. + */ +Demo.StateEditor = BI.inherit(BI.Widget, { + props: { + baseCls: "" + }, + render: function () { + return { + type: "bi.horizontal_adapt", + items: [{ + type: "bi.state_editor", + value: "123", + text: "456", + width: 300 + }], + vgap: 20 + + } + } +}) + +BI.shortcut("demo.state_editor", Demo.StateEditor);Demo.Func = BI.inherit(BI.Widget, { props: { baseCls: "demo-func" }, @@ -3038,10 +3155,6 @@ BI.shortcut("demo.value_chooser_pane", Demo.ValueChooserPane);Demo.BASE_CONFIG = pId: 3, id: 301, text: "editors" -}, { - pId: 301, - text: "bi.record_editor", - value: "demo.record_editor" }, { pId: 301, text: "bi.shelter_editor", @@ -3050,6 +3163,10 @@ BI.shortcut("demo.value_chooser_pane", Demo.ValueChooserPane);Demo.BASE_CONFIG = pId: 301, text: "bi.sign_editor", value: "demo.sign_editor" +}, { + pId: 301, + text: "bi.sign_initial_editor", + value: "demo.sign_initial_editor" }, { pId: 301, text: "bi.state_editor", @@ -3347,301 +3464,260 @@ Demo.COMPONENT_CONFIG = [{ text: "pane", value: "demo.pane" }];Demo.WIDGET_CONFIG = [{ - id: 4, - text: "详细控件", - open: true - }, { - pId: 4, - id: 420, - text: '各种小控件', - }, { - pId: 420, - text: "各种通用按钮", - value: "demo.buttons" - }, { - pId: 420, - text: "各种提示性信息", - value: "demo.tips" - }, { - pId: 420, - text: "各种items", - value: "demo.items" - }, { - pId: 420, - text: "各种节点node", - value: "demo.nodes" - }, { - pId: 420, - text: "各种segment", - value: "demo.segments" - }, { - pId: 420, - text: "可以切换的树", - value: "demo.switch_tree" - }, { - id: 400, - pId: 4, - text: "tree" - }, { - pId: 400, - text: "bi.multi_tree_combo", - value: "demo.multi_tree_combo" - }, { - pId: 400, - text: "bi.switch_tree", - value: "demo.switch_tree" - }, { - id: 401, - pId: 4, - text: "table" - }, { - pId: 401, - text: "bi.preview_table", - value: "demo.preview_table" - }, { - pId: 401, - text: "bi.responsive_table", - value: "demo.responsive_table" - }, { - pId: 401, - text: "bi.excel_table", - value: "demo.excel_table" - }, { - pId: 4, - id: 402, - text: "年份控件", - open: false - }, { - pId: 402, - text: "bi.year_combo", - value: "demo.year" - }, { - pId: 4, - id: 403, - text: "月份控件", - open: false - }, { - pId: 403, - text: "bi.month_combo", - value: "demo.month" - }, { - pId: 4, - id: 404, - text: "季度控件", - open: false - }, { - pId: 404, - text: "bi.quarter_combo", - value: "demo.quarter" - }, { - pId: 4, - id: 405, - text: "下拉列表", - open: false - }, { - pId: 405, - text: "bi.down_list_combo", - value: "demo.down_list" - }, { - pId: 4, - id: 406, - text: "文本框控件", - open: false - }, { - pId: 406, - text: "bi.text_editor", - value: "demo.text_editor" - }, { - pId: 406, - text: "bi.search_editor", - value: "demo.search_editor" - }, { - pId: 406, - text: "bi.sign_editor", - value: "demo.sign_editor" - }, { - pId: 406, - text: "bi.sign_initial_editor", - value: "demo.sign_initial_editor" - }, { - pId: 406, - text: "bi.sign_style_editor", - value: "demo.sign_style_editor" - }, { - pId: 406, - text: "bi.state_editor", - value: "demo.state_editor" - }, { - pId: 406, - text: "bi.clear_editor", - value: "demo.clear_editor" - }, { - pId: 406, - text: "bi.record_editor", - value: "demo.record_editor" - }, { - pId: 406, - text: "bi.shelter_editor", - value: "demo.shelter_editor" - }, - { - pId: 4, - id: 407, - text: "下拉框控件", - open: false - }, { - pId: 407, - text: "bi.text_value_combo", - value: "demo.text_value_combo" - }, { - pId: 407, - text: "bi.text_value_check_combo", - value: "demo.text_value_check_combo" - }, { - pId: 407, - text: "bi.text_value_down_list_combo", - value: "demo.text_value_down_list_combo" - }, { - pId: 407, - text: "bi.static_combo", - value: "demo.static_combo" - }, { - pId: 407, - text: "bi.icon_combo", - value: "demo.icon_combo" - }, { - pId: 407, - text: "bi.formula_combo", - value: "demo.formula_combo" - }, { - pId: 4, - id: 408, - text: "选择字段列表", - open: false - }, { - pId: 408, - text: "bi.placeholder" - }, { - pId: 4, - id: 409, - text: "公式编辑器", - open: false - }, { - pId: 409, - text: "bi.placeholder" - }, { - pId: 4, - id: 410, - text: "数值区间控件" - }, { - pId: 410, - text: "bi.numerical_interval", - value: "demo.numberical_interval" - }, { - pId: 4, - id: 411, - text: "下拉复选框有确定按钮" - }, { - pId: 411, - text: "bi.multi_select_combo", - value: "demo.multi_select_combo" - }, { - pId: 4, - id: 412, - text: "简单日期控件" - }, { - pId: 412, - text: "bi.date_combo", - value: "demo.date" - }, { - pId: 412, - text: "bi.date_pane_widget", - value: "demo.date_pane_widget" - }, { - pId: 412, - text: "bi.year_month_combo", - value: "demo.year_month_combo" - }, { - pId: 412, - text: "bi.year_quarter_combo", - value: "demo.year_quarter_combo" - }, { - pId: 412, - text: "bi.custom_date_time", - value: "demo.custom_date_time" - }, { - pId: 4, - id: 413, - text: "简单下拉树" - }, { - pId: 413, - text: "bi.single_tree_combo", - value: "demo.single_tree_combo" - }, { - pId: 413, - text: "bi.multilayer_single_tree_combo", - value: "demo.multilayer_single_tree_combo" - }, { - pId: 4, - id: 414, - text: "可选下拉树" - }, { - pId: 414, - text: "bi.select_tree_combo", - value: "demo.select_tree_combo" - }, { - pId: 414, - text: "bi.multilayer_select_tree_combo", - value: "demo.multilayer_select_tree_combo" - }, { - pId: 4, - id: 415, - text: "路径选择" - }, { - pId: 415, - text: "bi.path_chooser", - value: "demo.path_chooser" - }, { - pId: 415, - text: "bi.direction_path_chooser", - value: "demo.direction_path_chooser" - }, { - pId: 4, - id: 416, - text: "关联视图" - }, { - pId: 416, - text: "bi.relation_view", - value: "demo.relation_view" - }, { - pId: 4, - id: 417, - text: "布局" - }, { - pId: 417, - text: "bi.adaptive_arrangement", - value: "demo.adaptive_arrangement" - }, { - pId: 417, - text: "bi.interactive_arrangement", - value: "demo.interactive_arrangement" - }, { - pId: 4, - id: 418, - text: "提示对话框" - }, { - pId: 418, - text: "bi.dialog", - value: "demo.dialog" - }, { - pId: 4, - id: 419, - text: "文件管理" - }, { - pId: 419, - text: "demo.file_manager", - value: "demo.file_manager" - } + id: 4, + text: "详细控件", + open: true +}, { + pId: 4, + id: 420, + text: '各种小控件', +}, { + pId: 420, + text: "各种通用按钮", + value: "demo.buttons" +}, { + pId: 420, + text: "各种提示性信息", + value: "demo.tips" +}, { + pId: 420, + text: "各种items", + value: "demo.items" +}, { + pId: 420, + text: "各种节点node", + value: "demo.nodes" +}, { + pId: 420, + text: "各种segment", + value: "demo.segments" +}, { + pId: 420, + text: "可以切换的树", + value: "demo.switch_tree" +}, { + id: 400, + pId: 4, + text: "tree" +}, { + pId: 400, + text: "bi.multi_tree_combo", + value: "demo.multi_tree_combo" +}, { + pId: 400, + text: "bi.switch_tree", + value: "demo.switch_tree" +}, { + id: 401, + pId: 4, + text: "table" +}, { + pId: 401, + text: "bi.preview_table", + value: "demo.preview_table" +}, { + pId: 401, + text: "bi.responsive_table", + value: "demo.responsive_table" +}, { + pId: 401, + text: "bi.excel_table", + value: "demo.excel_table" +}, { + pId: 4, + id: 402, + text: "年份控件", + open: false +}, { + pId: 402, + text: "bi.year_combo", + value: "demo.year" +}, { + pId: 4, + id: 403, + text: "月份控件", + open: false +}, { + pId: 403, + text: "bi.month_combo", + value: "demo.month" +}, { + pId: 4, + id: 404, + text: "季度控件", + open: false +}, { + pId: 404, + text: "bi.quarter_combo", + value: "demo.quarter" +}, { + pId: 4, + id: 405, + text: "下拉列表", + open: false +}, { + pId: 405, + text: "bi.down_list_combo", + value: "demo.down_list" +}, { + pId: 4, + id: 406, + text: "文本框控件", + open: false +}, { + pId: 406, + text: "bi.text_editor", + value: "demo.text_editor" +}, { + pId: 406, + text: "bi.search_editor", + value: "demo.search_editor" +}, { + pId: 406, + text: "bi.clear_editor", + value: "demo.clear_editor" +}, { + pId: 4, + id: 407, + text: "下拉框控件", + open: false +}, { + pId: 407, + text: "bi.text_value_combo", + value: "demo.text_value_combo" +}, { + pId: 407, + text: "bi.text_value_check_combo", + value: "demo.text_value_check_combo" +}, { + pId: 407, + text: "bi.text_value_down_list_combo", + value: "demo.text_value_down_list_combo" +}, { + pId: 407, + text: "bi.static_combo", + value: "demo.static_combo" +}, { + pId: 407, + text: "bi.icon_combo", + value: "demo.icon_combo" +}, { + pId: 407, + text: "bi.formula_combo", + value: "demo.formula_combo" +}, { + pId: 4, + id: 410, + text: "数值区间控件" +}, { + pId: 410, + text: "bi.numerical_interval", + value: "demo.numberical_interval" +}, { + pId: 4, + id: 411, + text: "下拉复选框有确定按钮" +}, { + pId: 411, + text: "bi.multi_select_combo", + value: "demo.multi_select_combo" +}, { + pId: 4, + id: 412, + text: "简单日期控件" +}, { + pId: 412, + text: "bi.date_combo", + value: "demo.date" +}, { + pId: 412, + text: "bi.date_pane_widget", + value: "demo.date_pane_widget" +}, { + pId: 412, + text: "bi.year_month_combo", + value: "demo.year_month_combo" +}, { + pId: 412, + text: "bi.year_quarter_combo", + value: "demo.year_quarter_combo" +}, { + pId: 412, + text: "bi.custom_date_time", + value: "demo.custom_date_time" +}, { + pId: 4, + id: 413, + text: "简单下拉树" +}, { + pId: 413, + text: "bi.single_tree_combo", + value: "demo.single_tree_combo" +}, { + pId: 413, + text: "bi.multilayer_single_tree_combo", + value: "demo.multilayer_single_tree_combo" +}, { + pId: 4, + id: 414, + text: "可选下拉树" +}, { + pId: 414, + text: "bi.select_tree_combo", + value: "demo.select_tree_combo" +}, { + pId: 414, + text: "bi.multilayer_select_tree_combo", + value: "demo.multilayer_select_tree_combo" +}, { + pId: 4, + id: 415, + text: "路径选择" +}, { + pId: 415, + text: "bi.path_chooser", + value: "demo.path_chooser" +}, { + pId: 415, + text: "bi.direction_path_chooser", + value: "demo.direction_path_chooser" +}, { + pId: 4, + id: 416, + text: "关联视图" +}, { + pId: 416, + text: "bi.relation_view", + value: "demo.relation_view" +}, { + pId: 4, + id: 417, + text: "布局" +}, { + pId: 417, + text: "bi.adaptive_arrangement", + value: "demo.adaptive_arrangement" +}, { + pId: 417, + text: "bi.interactive_arrangement", + value: "demo.interactive_arrangement" +}, { + pId: 4, + id: 418, + text: "提示对话框" +}, { + pId: 418, + text: "bi.dialog", + value: "demo.dialog" +}, { + pId: 4, + id: 419, + text: "文件管理" +}, { + pId: 419, + text: "bi.file_manager", + value: "demo.file_manager" +} ];Demo.Func = BI.inherit(BI.Widget, { props: { baseCls: "demo-func" @@ -7453,27 +7529,6 @@ Demo.ClearEditor = BI.inherit(BI.Widget, { BI.shortcut("demo.clear_editor", Demo.ClearEditor);/** * Created by Dailer on 2017/7/11. */ -Demo.RecordEditor = BI.inherit(BI.Widget, { - props: { - baseCls: "" - }, - render: function () { - return { - type: "bi.horizontal_auto", - items: [{ - type: "bi.record_editor", - cls: "bi-border", - width: 300, - watermark: "这个是可以记录输入的" - }], - vgap: 20 - } - } -}) - -BI.shortcut("demo.record_editor", Demo.RecordEditor);/** - * Created by Dailer on 2017/7/11. - */ Demo.SearchEditor = BI.inherit(BI.Widget, { props: { baseCls: "demo-exceltable" @@ -7502,136 +7557,6 @@ Demo.SearchEditor = BI.inherit(BI.Widget, { BI.shortcut("demo.search_editor", Demo.SearchEditor);/** * Created by Dailer on 2017/7/11. */ -Demo.ClearEditor = BI.inherit(BI.Widget, { - props: { - baseCls: "" - }, - render: function () { - var editor; - return { - type: "bi.horizontal_auto", - items: [{ - type: "bi.shelter_editor", - cls: "bi-border", - ref:function(_ref){ - editor=_ref; - }, - width: 300, - watermark: "这个是带标记的" - },{ - type:"bi.button", - text:"setValue", - width:300, - handler:function(){ - editor.setValue("凛冬将至"); - } - },{ - type:"bi.button", - text:"doHighLight", - width:300, - handler:function(){ - editor.doHighLight(); - console.log(editor.getState()); - } - }], - vgap: 20 - } - } -}) - -BI.shortcut("demo.shelter_editor", Demo.ClearEditor);/** - * Created by Dailer on 2017/7/14. - */ -Demo.SignEditor = BI.inherit(BI.Widget, { - props: { - baseCls: "" - }, - render: function () { - return { - type: "bi.horizontal_adapt", - items: [{ - type: "bi.sign_editor", - // cls:"layout-bg5", - value: "123", - text: "456", - width: 300 - }], - vgap: 20 - - } - } -}) - -BI.shortcut("demo.sign_editor", Demo.SignEditor);/** - * Created by Dailer on 2017/7/11. - */ -Demo.SignInitialEditor = BI.inherit(BI.Widget, { - props: { - baseCls: "" - }, - render: function () { - return { - type: "bi.horizontal_adapt", - items: [{ - type: "bi.sign_initial_editor", - cls:"layout-bg5", - value:"123", - text:"456", - width: 300 - }], - vgap:20 - - } - } -}) - -BI.shortcut("demo.sign_initial_editor", Demo.SignInitialEditor);/** - * Created by Dailer on 2017/7/11. - */ -Demo.SignStyleEditor = BI.inherit(BI.Widget, { - props: { - baseCls: "demo-exceltable" - }, - render: function () { - return { - type: "bi.horizontal_adapt", - items: [{ - type: "bi.sign_style_editor", - cls:"layout-bg5", - value:"12313", - width: 300 - }], - vgap:20 - } - } -}) - -BI.shortcut("demo.sign_style_editor", Demo.SignStyleEditor);/** - * Created by Dailer on 2017/7/11. - */ -Demo.StateEditor = BI.inherit(BI.Widget, { - props: { - baseCls: "" - }, - render: function () { - return { - type: "bi.horizontal_adapt", - items: [{ - type: "bi.state_editor", - cls:"bi-border", - value:"123", - text:"456", - width: 300 - }], - vgap:20 - - } - } -}) - -BI.shortcut("demo.state_editor", Demo.StateEditor);/** - * Created by Dailer on 2017/7/11. - */ Demo.TextEditor = BI.inherit(BI.Widget, { props: { baseCls: "demo-exceltable" diff --git a/docs/resource.css b/docs/resource.css index 2714b8af21..0823946418 100644 --- a/docs/resource.css +++ b/docs/resource.css @@ -818,6 +818,52 @@ textarea::-webkit-scrollbar-thumb:hover { content: "\e600"; color: #f07d0a; } +.less-font .b-font { + *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = ''); +} +.less-font .b-font:before { + content: "\e633"; + color: inherit; +} +.less-font:hover .b-font:before, +.less-font:focus .b-font:before, +.less-font.hover .b-font:before { + content: "\e633"; + color: inherit; +} +.less-font:active .b-font:before, +.less-font.active .b-font:before { + content: "\e633"; + color: #3f8ce8; +} +.less-font.native .b-font:before, +.less-font.disabled .b-font:before { + content: "\e633"; + color: inherit; +} +.less-equal-font .b-font { + *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = ''); +} +.less-equal-font .b-font:before { + content: "\e636"; + color: inherit; +} +.less-equal-font:hover .b-font:before, +.less-equal-font:focus .b-font:before, +.less-equal-font.hover .b-font:before { + content: "\e636"; + color: inherit; +} +.less-equal-font:active .b-font:before, +.less-equal-font.active .b-font:before { + content: "\e636"; + color: #3f8ce8; +} +.less-equal-font.native .b-font:before, +.less-equal-font.disabled .b-font:before { + content: "\e636"; + color: inherit; +} .tree-collapse-icon-type1 .x-icon, .tree-collapse-icon-type1:hover .x-icon, .tree-collapse-icon-type1:active .x-icon { diff --git a/src/css/resource/font.css b/src/css/resource/font.css index e8a99d5f11..2ea5300850 100644 --- a/src/css/resource/font.css +++ b/src/css/resource/font.css @@ -684,3 +684,49 @@ content: "\e600"; color: #f07d0a; } +.less-font .b-font { + *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = ''); +} +.less-font .b-font:before { + content: "\e633"; + color: inherit; +} +.less-font:hover .b-font:before, +.less-font:focus .b-font:before, +.less-font.hover .b-font:before { + content: "\e633"; + color: inherit; +} +.less-font:active .b-font:before, +.less-font.active .b-font:before { + content: "\e633"; + color: #3f8ce8; +} +.less-font.native .b-font:before, +.less-font.disabled .b-font:before { + content: "\e633"; + color: inherit; +} +.less-equal-font .b-font { + *zoom: expression( this.runtimeStyle['zoom'] = '1',this.innerHTML = ''); +} +.less-equal-font .b-font:before { + content: "\e636"; + color: inherit; +} +.less-equal-font:hover .b-font:before, +.less-equal-font:focus .b-font:before, +.less-equal-font.hover .b-font:before { + content: "\e636"; + color: inherit; +} +.less-equal-font:active .b-font:before, +.less-equal-font.active .b-font:before { + content: "\e636"; + color: #3f8ce8; +} +.less-equal-font.native .b-font:before, +.less-equal-font.disabled .b-font:before { + content: "\e636"; + color: inherit; +} diff --git a/src/less/resource/font.less b/src/less/resource/font.less index 603ef3fef4..6f35e8c35e 100644 --- a/src/less/resource/font.less +++ b/src/less/resource/font.less @@ -79,4 +79,8 @@ .font-hover(primary-key-font, @font-key); -.font(drag-tag-font, @font-cross, @color-bi-text-redmark); \ No newline at end of file +.font(drag-tag-font, @font-cross, @color-bi-text-redmark); + +//数值区间 +.font-hover-active(less-font, @font-less); +.font-hover-active(less-equal-font, @font-less-equal); \ No newline at end of file