guy 7 years ago
parent
commit
61d380d6bb
  1. 518
      bi/base.js
  2. 0
      demo/js/case/editor/demo.shelter_editor.js
  3. 0
      demo/js/case/editor/demo.sign_editor.js
  4. 17
      demo/js/case/editor/demo.sign_initial_editor.js
  5. 7
      demo/js/case/editor/demo.state_editor.js
  6. 8
      demo/js/config/case.js
  7. 549
      demo/js/config/widget.js
  8. 22
      demo/js/widget/editor/demo.record_editor.js
  9. 22
      demo/js/widget/editor/demo.sign_style_editor.js
  10. BIN
      docs/background/auto-color.png
  11. BIN
      docs/background/trans-color.png
  12. 518
      docs/base.js
  13. 827
      docs/demo.js
  14. 46
      docs/resource.css
  15. 46
      src/css/resource/font.css
  16. 6
      src/less/resource/font.less

518
bi/base.js

@ -308,163 +308,163 @@ BI.Pane = BI.inherit(BI.Widget, {
} }
}); });
BI.Pane.EVENT_LOADED = "EVENT_LOADED";/** BI.Pane.EVENT_LOADED = "EVENT_LOADED";/**
* guy * guy
* 这仅仅只是一个超类, 所有简单控件的基类 * 这仅仅只是一个超类, 所有简单控件的基类
* 1类的控制 * 1类的控制
* 2title的控制 * 2title的控制
* 3文字超过边界显示3个点 * 3文字超过边界显示3个点
* 4cursor默认pointor * 4cursor默认pointor
* @class BI.Single * @class BI.Single
* @extends BI.Widget * @extends BI.Widget
* @abstract * @abstract
*/ */
BI.Single = BI.inherit(BI.Widget, { BI.Single = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.Single.superclass._defaultConfig.apply(this, arguments); var conf = BI.Single.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-single", baseCls: (conf.baseCls || "") + " bi-single",
readonly: false, readonly: false,
title: null, title: null,
warningTitle: null, warningTitle: null,
tipType: null, // success或warning tipType: null, // success或warning
value: null value: null
}) })
}, },
_showToolTip: function (e, opt) { _showToolTip: function (e, opt) {
opt || (opt = {}); opt || (opt = {});
var self = this; var self = this;
var type = this.getTipType() || (this.isEnabled() ? "success" : "warning"); var type = this.getTipType() || (this.isEnabled() ? "success" : "warning");
var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle()); var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle());
if (BI.isKey(title)) { if (BI.isKey(title)) {
BI.Tooltips.show(e, this.getName(), title, type, this, opt); BI.Tooltips.show(e, this.getName(), title, type, this, opt);
} }
}, },
_hideTooltip: function () { _hideTooltip: function () {
var self = this; var self = this;
var tooltip = BI.Tooltips.get(this.getName()); var tooltip = BI.Tooltips.get(this.getName());
if (BI.isNotNull(tooltip)) { if (BI.isNotNull(tooltip)) {
tooltip.element.fadeOut(200, function () { tooltip.element.fadeOut(200, function () {
BI.Tooltips.remove(self.getName()); BI.Tooltips.remove(self.getName());
}); });
} }
}, },
_init: function () { _init: function () {
BI.Single.superclass._init.apply(this, arguments); BI.Single.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
if (BI.isKey(o.title) || BI.isKey(o.warningTitle) if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover(); this.enableHover();
} }
}, },
enableHover: function (opt) { enableHover: function (opt) {
opt || (opt = {}); opt || (opt = {});
var self = this; var self = this;
if (!this._hoverBinded) { if (!this._hoverBinded) {
this.element.on("mouseenter.title" + this.getName(), function (e) { this.element.on("mouseenter.title" + this.getName(), function (e) {
self._e = e; self._e = e;
if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) { if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) {
self.timeout = BI.delay(function () { self.timeout = BI.delay(function () {
self._showToolTip(self._e || e, opt); self._showToolTip(self._e || e, opt);
}, 200); }, 200);
} else if (self.getTipType() === "success" || self.isEnabled()) { } else if (self.getTipType() === "success" || self.isEnabled()) {
self.timeout = BI.delay(function () { self.timeout = BI.delay(function () {
self._showToolTip(self._e || e, opt); self._showToolTip(self._e || e, opt);
}, 500); }, 500);
} }
}); });
this.element.on("mousemove.title" + this.getName(), function (e) { this.element.on("mousemove.title" + this.getName(), function (e) {
self._e = e; self._e = e;
if (!self.element.__isMouseInBounds__(e)) { if (!self.element.__isMouseInBounds__(e)) {
if (BI.isNotNull(self.timeout)) { if (BI.isNotNull(self.timeout)) {
clearTimeout(self.timeout); clearTimeout(self.timeout);
} }
self._hideTooltip(); self._hideTooltip();
} }
}); });
this.element.on("mouseleave.title" + this.getName(), function () { this.element.on("mouseleave.title" + this.getName(), function () {
self._e = null; self._e = null;
if (BI.isNotNull(self.timeout)) { if (BI.isNotNull(self.timeout)) {
clearTimeout(self.timeout); clearTimeout(self.timeout);
} }
self._hideTooltip(); self._hideTooltip();
}); });
this._hoverBinded = true; this._hoverBinded = true;
} }
}, },
disabledHover: function () { disabledHover: function () {
//取消hover事件 //取消hover事件
if (BI.isNotNull(this.timeout)) { if (BI.isNotNull(this.timeout)) {
clearTimeout(this.timeout); clearTimeout(this.timeout);
} }
this._hideTooltip(); this._hideTooltip();
$(this.element).unbind("mouseenter.title" + this.getName()) $(this.element).unbind("mouseenter.title" + this.getName())
.unbind("mousemove.title" + this.getName()) .unbind("mousemove.title" + this.getName())
.unbind("mouseleave.title" + this.getName()); .unbind("mouseleave.title" + this.getName());
this._hoverBinded = false; this._hoverBinded = false;
}, },
populate: function (items) { populate: function (items) {
this.items = items || []; this.items = items || [];
}, },
//opt: {container: '', belowMouse: false} //opt: {container: '', belowMouse: false}
setTitle: function (title, opt) { setTitle: function (title, opt) {
this.options.title = title; this.options.title = title;
if (BI.isKey(title)) { if (BI.isKey(title)) {
this.enableHover(opt); this.enableHover(opt);
} else { } else {
this.disabledHover(); this.disabledHover();
} }
}, },
setWarningTitle: function (title, opt) { setWarningTitle: function (title, opt) {
this.options.warningTitle = title; this.options.warningTitle = title;
if (BI.isKey(title)) { if (BI.isKey(title)) {
this.enableHover(opt); this.enableHover(opt);
} else { } else {
this.disabledHover(); this.disabledHover();
} }
}, },
getTipType: function () { getTipType: function () {
return this.options.tipType; return this.options.tipType;
}, },
isReadOnly: function () { isReadOnly: function () {
return !!this.options.readonly; return !!this.options.readonly;
}, },
getTitle: function () { getTitle: function () {
var title = this.options.title; var title = this.options.title;
if(BI.isFunction(title)) { if(BI.isFunction(title)) {
return title(); return title();
} }
return title; return title;
}, },
getWarningTitle: function () { getWarningTitle: function () {
var title = this.options.warningTitle; var title = this.options.warningTitle;
if(BI.isFunction(title)) { if(BI.isFunction(title)) {
return title(); return title();
} }
return title; return title;
}, },
setValue: function (val) { setValue: function (val) {
if (!this.options.readonly) { if (!this.options.readonly) {
this.options.value = val; this.options.value = val;
} }
}, },
getValue: function () { getValue: function () {
return this.options.value; return this.options.value;
} }
});/** });/**
* guy 表示一行数据通过position来定位位置的数据 * guy 表示一行数据通过position来定位位置的数据
* @class BI.Text * @class BI.Text
@ -918,82 +918,82 @@ BI.BasicButton = BI.inherit(BI.Single, {
BI.BasicButton.superclass.destroy.apply(this, arguments); BI.BasicButton.superclass.destroy.apply(this, arguments);
} }
}); });
BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/** BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/**
* 表示一个可以展开的节点, 不仅有选中状态而且有展开状态 * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态
* *
* Created by GUY on 2015/9/9. * Created by GUY on 2015/9/9.
* @class BI.NodeButton * @class BI.NodeButton
* @extends BI.BasicButton * @extends BI.BasicButton
* @abstract * @abstract
*/ */
BI.NodeButton = BI.inherit(BI.BasicButton, { BI.NodeButton = BI.inherit(BI.BasicButton, {
_defaultConfig: function() { _defaultConfig: function() {
var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend( conf, { return BI.extend( conf, {
baseCls: (conf.baseCls || "") + " bi-node", baseCls: (conf.baseCls || "") + " bi-node",
open: false open: false
}) })
}, },
_init:function() { _init:function() {
BI.NodeButton.superclass._init.apply(this, arguments); BI.NodeButton.superclass._init.apply(this, arguments);
var self = this; var self = this;
BI.nextTick(function(){ BI.nextTick(function(){
self.setOpened(self.isOpened()); self.setOpened(self.isOpened());
}) })
}, },
doClick: function(){ doClick: function(){
BI.NodeButton.superclass.doClick.apply(this, arguments); BI.NodeButton.superclass.doClick.apply(this, arguments);
this.setOpened(!this.isOpened()); this.setOpened(!this.isOpened());
}, },
isOnce: function(){ isOnce: function(){
return false; return false;
}, },
isOpened: function(){ isOpened: function(){
return !!this.options.open; return !!this.options.open;
}, },
setOpened: function(b){ setOpened: function(b){
this.options.open = !!b; this.options.open = !!b;
}, },
triggerCollapse: function(){ triggerCollapse: function(){
if(this.isOpened()) { if(this.isOpened()) {
this.setOpened(false); this.setOpened(false);
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this);
} }
}, },
triggerExpand: function(){ triggerExpand: function(){
if(!this.isOpened()) { if(!this.isOpened()) {
this.setOpened(true); this.setOpened(true);
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this);
} }
} }
});/** });/**
* guy * guy
* tip提示 * tip提示
* zIndex在10亿级别 * zIndex在10亿级别
* @class BI.Tip * @class BI.Tip
* @extends BI.Single * @extends BI.Single
* @abstract * @abstract
*/ */
BI.Tip = BI.inherit(BI.Single, { BI.Tip = BI.inherit(BI.Single, {
_defaultConfig: function() { _defaultConfig: function() {
var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); var conf = BI.Link.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-tip", baseCls: (conf.baseCls || "") + " bi-tip",
zIndex: BI.zIndex_tip zIndex: BI.zIndex_tip
}) })
}, },
_init : function() { _init : function() {
BI.Tip.superclass._init.apply(this, arguments); BI.Tip.superclass._init.apply(this, arguments);
this.element.css({"zIndex": this.options.zIndex}); this.element.css({"zIndex": this.options.zIndex});
} }
});/** });/**
* Created by GUY on 2015/6/26. * Created by GUY on 2015/6/26.
* @class BI.ButtonGroup * @class BI.ButtonGroup
@ -20293,32 +20293,32 @@ BI.Tooltip = BI.inherit(BI.Tip, {
} }
}); });
BI.shortcut("bi.tooltip", BI.Tooltip);/** BI.shortcut("bi.tooltip", BI.Tooltip);/**
* 下拉 * 下拉
* @class BI.Trigger * @class BI.Trigger
* @extends BI.Single * @extends BI.Single
* @abstract * @abstract
*/ */
BI.Trigger = BI.inherit(BI.Single, { BI.Trigger = BI.inherit(BI.Single, {
_defaultConfig: function() { _defaultConfig: function() {
var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments); var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer", baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer",
height: 30 height: 30
}) })
}, },
_init : function() { _init : function() {
BI.Trigger.superclass._init.apply(this, arguments); BI.Trigger.superclass._init.apply(this, arguments);
}, },
setKey: function(){ setKey: function(){
}, },
getKey: function(){ getKey: function(){
} }
});// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. });// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");

0
demo/js/widget/editor/demo.shelter_editor.js → demo/js/case/editor/demo.shelter_editor.js

0
demo/js/widget/editor/demo.sign_editor.js → demo/js/case/editor/demo.sign_editor.js

17
demo/js/widget/editor/demo.sign_initial_editor.js → demo/js/case/editor/demo.sign_initial_editor.js

@ -5,17 +5,26 @@ Demo.SignInitialEditor = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "" baseCls: ""
}, },
mounted: function () {
this.editor.setValue({
value: "123",
text: "sdga"
})
},
render: function () { render: function () {
var self = this;
return { return {
type: "bi.horizontal_adapt", type: "bi.horizontal_adapt",
items: [{ items: [{
type: "bi.sign_initial_editor", type: "bi.sign_initial_editor",
cls:"layout-bg5", ref: function () {
value:"123", self.editor = this;
text:"456", },
cls: "layout-bg5",
text: "原始值",
width: 300 width: 300
}], }],
vgap:20 vgap: 20
} }
} }

7
demo/js/widget/editor/demo.state_editor.js → demo/js/case/editor/demo.state_editor.js

@ -10,12 +10,11 @@ Demo.StateEditor = BI.inherit(BI.Widget, {
type: "bi.horizontal_adapt", type: "bi.horizontal_adapt",
items: [{ items: [{
type: "bi.state_editor", type: "bi.state_editor",
cls:"bi-border", value: "123",
value:"123", text: "456",
text:"456",
width: 300 width: 300
}], }],
vgap:20 vgap: 20
} }
} }

8
demo/js/config/case.js

@ -6,10 +6,6 @@ Demo.CASE_CONFIG = [{
pId: 3, pId: 3,
id: 301, id: 301,
text: "editors" text: "editors"
}, {
pId: 301,
text: "bi.record_editor",
value: "demo.record_editor"
}, { }, {
pId: 301, pId: 301,
text: "bi.shelter_editor", text: "bi.shelter_editor",
@ -18,6 +14,10 @@ Demo.CASE_CONFIG = [{
pId: 301, pId: 301,
text: "bi.sign_editor", text: "bi.sign_editor",
value: "demo.sign_editor" value: "demo.sign_editor"
}, {
pId: 301,
text: "bi.sign_initial_editor",
value: "demo.sign_initial_editor"
}, { }, {
pId: 301, pId: 301,
text: "bi.state_editor", text: "bi.state_editor",

549
demo/js/config/widget.js

@ -1,297 +1,256 @@
Demo.WIDGET_CONFIG = [{ Demo.WIDGET_CONFIG = [{
id: 4, id: 4,
text: "详细控件", text: "详细控件",
open: true open: true
}, { }, {
pId: 4, pId: 4,
id: 420, id: 420,
text: '各种小控件', text: '各种小控件',
}, { }, {
pId: 420, pId: 420,
text: "各种通用按钮", text: "各种通用按钮",
value: "demo.buttons" value: "demo.buttons"
}, { }, {
pId: 420, pId: 420,
text: "各种提示性信息", text: "各种提示性信息",
value: "demo.tips" value: "demo.tips"
}, { }, {
pId: 420, pId: 420,
text: "各种items", text: "各种items",
value: "demo.items" value: "demo.items"
}, { }, {
pId: 420, pId: 420,
text: "各种节点node", text: "各种节点node",
value: "demo.nodes" value: "demo.nodes"
}, { }, {
pId: 420, pId: 420,
text: "各种segment", text: "各种segment",
value: "demo.segments" value: "demo.segments"
}, { }, {
pId: 420, pId: 420,
text: "可以切换的树", text: "可以切换的树",
value: "demo.switch_tree" value: "demo.switch_tree"
}, { }, {
id: 400, id: 400,
pId: 4, pId: 4,
text: "tree" text: "tree"
}, { }, {
pId: 400, pId: 400,
text: "bi.multi_tree_combo", text: "bi.multi_tree_combo",
value: "demo.multi_tree_combo" value: "demo.multi_tree_combo"
}, { }, {
pId: 400, pId: 400,
text: "bi.switch_tree", text: "bi.switch_tree",
value: "demo.switch_tree" value: "demo.switch_tree"
}, { }, {
id: 401, id: 401,
pId: 4, pId: 4,
text: "table" text: "table"
}, { }, {
pId: 401, pId: 401,
text: "bi.preview_table", text: "bi.preview_table",
value: "demo.preview_table" value: "demo.preview_table"
}, { }, {
pId: 401, pId: 401,
text: "bi.responsive_table", text: "bi.responsive_table",
value: "demo.responsive_table" value: "demo.responsive_table"
}, { }, {
pId: 401, pId: 401,
text: "bi.excel_table", text: "bi.excel_table",
value: "demo.excel_table" value: "demo.excel_table"
}, { }, {
pId: 4, pId: 4,
id: 402, id: 402,
text: "年份控件", text: "年份控件",
open: false open: false
}, { }, {
pId: 402, pId: 402,
text: "bi.year_combo", text: "bi.year_combo",
value: "demo.year" value: "demo.year"
}, { }, {
pId: 4, pId: 4,
id: 403, id: 403,
text: "月份控件", text: "月份控件",
open: false open: false
}, { }, {
pId: 403, pId: 403,
text: "bi.month_combo", text: "bi.month_combo",
value: "demo.month" value: "demo.month"
}, { }, {
pId: 4, pId: 4,
id: 404, id: 404,
text: "季度控件", text: "季度控件",
open: false open: false
}, { }, {
pId: 404, pId: 404,
text: "bi.quarter_combo", text: "bi.quarter_combo",
value: "demo.quarter" value: "demo.quarter"
}, { }, {
pId: 4, pId: 4,
id: 405, id: 405,
text: "下拉列表", text: "下拉列表",
open: false open: false
}, { }, {
pId: 405, pId: 405,
text: "bi.down_list_combo", text: "bi.down_list_combo",
value: "demo.down_list" value: "demo.down_list"
}, { }, {
pId: 4, pId: 4,
id: 406, id: 406,
text: "文本框控件", text: "文本框控件",
open: false open: false
}, { }, {
pId: 406, pId: 406,
text: "bi.text_editor", text: "bi.text_editor",
value: "demo.text_editor" value: "demo.text_editor"
}, { }, {
pId: 406, pId: 406,
text: "bi.search_editor", text: "bi.search_editor",
value: "demo.search_editor" value: "demo.search_editor"
}, { }, {
pId: 406, pId: 406,
text: "bi.sign_editor", text: "bi.clear_editor",
value: "demo.sign_editor" value: "demo.clear_editor"
}, { }, {
pId: 406, pId: 4,
text: "bi.sign_initial_editor", id: 407,
value: "demo.sign_initial_editor" text: "下拉框控件",
}, { open: false
pId: 406, }, {
text: "bi.sign_style_editor", pId: 407,
value: "demo.sign_style_editor" text: "bi.text_value_combo",
}, { value: "demo.text_value_combo"
pId: 406, }, {
text: "bi.state_editor", pId: 407,
value: "demo.state_editor" text: "bi.text_value_check_combo",
}, { value: "demo.text_value_check_combo"
pId: 406, }, {
text: "bi.clear_editor", pId: 407,
value: "demo.clear_editor" text: "bi.text_value_down_list_combo",
}, { value: "demo.text_value_down_list_combo"
pId: 406, }, {
text: "bi.record_editor", pId: 407,
value: "demo.record_editor" text: "bi.static_combo",
}, { value: "demo.static_combo"
pId: 406, }, {
text: "bi.shelter_editor", pId: 407,
value: "demo.shelter_editor" text: "bi.icon_combo",
}, value: "demo.icon_combo"
{ }, {
pId: 4, pId: 407,
id: 407, text: "bi.formula_combo",
text: "下拉框控件", value: "demo.formula_combo"
open: false }, {
}, { pId: 4,
pId: 407, id: 410,
text: "bi.text_value_combo", text: "数值区间控件"
value: "demo.text_value_combo" }, {
}, { pId: 410,
pId: 407, text: "bi.numerical_interval",
text: "bi.text_value_check_combo", value: "demo.numberical_interval"
value: "demo.text_value_check_combo" }, {
}, { pId: 4,
pId: 407, id: 411,
text: "bi.text_value_down_list_combo", text: "下拉复选框有确定按钮"
value: "demo.text_value_down_list_combo" }, {
}, { pId: 411,
pId: 407, text: "bi.multi_select_combo",
text: "bi.static_combo", value: "demo.multi_select_combo"
value: "demo.static_combo" }, {
}, { pId: 4,
pId: 407, id: 412,
text: "bi.icon_combo", text: "简单日期控件"
value: "demo.icon_combo" }, {
}, { pId: 412,
pId: 407, text: "bi.date_combo",
text: "bi.formula_combo", value: "demo.date"
value: "demo.formula_combo" }, {
}, { pId: 412,
pId: 4, text: "bi.date_pane_widget",
id: 408, value: "demo.date_pane_widget"
text: "选择字段列表", }, {
open: false pId: 412,
}, { text: "bi.year_month_combo",
pId: 408, value: "demo.year_month_combo"
text: "bi.placeholder" }, {
}, { pId: 412,
pId: 4, text: "bi.year_quarter_combo",
id: 409, value: "demo.year_quarter_combo"
text: "公式编辑器", }, {
open: false pId: 412,
}, { text: "bi.custom_date_time",
pId: 409, value: "demo.custom_date_time"
text: "bi.placeholder" }, {
}, { pId: 4,
pId: 4, id: 413,
id: 410, text: "简单下拉树"
text: "数值区间控件" }, {
}, { pId: 413,
pId: 410, text: "bi.single_tree_combo",
text: "bi.numerical_interval", value: "demo.single_tree_combo"
value: "demo.numberical_interval" }, {
}, { pId: 413,
pId: 4, text: "bi.multilayer_single_tree_combo",
id: 411, value: "demo.multilayer_single_tree_combo"
text: "下拉复选框有确定按钮" }, {
}, { pId: 4,
pId: 411, id: 414,
text: "bi.multi_select_combo", text: "可选下拉树"
value: "demo.multi_select_combo" }, {
}, { pId: 414,
pId: 4, text: "bi.select_tree_combo",
id: 412, value: "demo.select_tree_combo"
text: "简单日期控件" }, {
}, { pId: 414,
pId: 412, text: "bi.multilayer_select_tree_combo",
text: "bi.date_combo", value: "demo.multilayer_select_tree_combo"
value: "demo.date" }, {
}, { pId: 4,
pId: 412, id: 415,
text: "bi.date_pane_widget", text: "路径选择"
value: "demo.date_pane_widget" }, {
}, { pId: 415,
pId: 412, text: "bi.path_chooser",
text: "bi.year_month_combo", value: "demo.path_chooser"
value: "demo.year_month_combo" }, {
}, { pId: 415,
pId: 412, text: "bi.direction_path_chooser",
text: "bi.year_quarter_combo", value: "demo.direction_path_chooser"
value: "demo.year_quarter_combo" }, {
}, { pId: 4,
pId: 412, id: 416,
text: "bi.custom_date_time", text: "关联视图"
value: "demo.custom_date_time" }, {
}, { pId: 416,
pId: 4, text: "bi.relation_view",
id: 413, value: "demo.relation_view"
text: "简单下拉树" }, {
}, { pId: 4,
pId: 413, id: 417,
text: "bi.single_tree_combo", text: "布局"
value: "demo.single_tree_combo" }, {
}, { pId: 417,
pId: 413, text: "bi.adaptive_arrangement",
text: "bi.multilayer_single_tree_combo", value: "demo.adaptive_arrangement"
value: "demo.multilayer_single_tree_combo" }, {
}, { pId: 417,
pId: 4, text: "bi.interactive_arrangement",
id: 414, value: "demo.interactive_arrangement"
text: "可选下拉树" }, {
}, { pId: 4,
pId: 414, id: 418,
text: "bi.select_tree_combo", text: "提示对话框"
value: "demo.select_tree_combo" }, {
}, { pId: 418,
pId: 414, text: "bi.dialog",
text: "bi.multilayer_select_tree_combo", value: "demo.dialog"
value: "demo.multilayer_select_tree_combo" }, {
}, { pId: 4,
pId: 4, id: 419,
id: 415, text: "文件管理"
text: "路径选择" }, {
}, { pId: 419,
pId: 415, text: "bi.file_manager",
text: "bi.path_chooser", value: "demo.file_manager"
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"
}
]; ];

22
demo/js/widget/editor/demo.record_editor.js

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

22
demo/js/widget/editor/demo.sign_style_editor.js

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

BIN
docs/background/auto-color.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

BIN
docs/background/trans-color.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

518
docs/base.js

@ -308,163 +308,163 @@ BI.Pane = BI.inherit(BI.Widget, {
} }
}); });
BI.Pane.EVENT_LOADED = "EVENT_LOADED";/** BI.Pane.EVENT_LOADED = "EVENT_LOADED";/**
* guy * guy
* 这仅仅只是一个超类, 所有简单控件的基类 * 这仅仅只是一个超类, 所有简单控件的基类
* 1类的控制 * 1类的控制
* 2title的控制 * 2title的控制
* 3文字超过边界显示3个点 * 3文字超过边界显示3个点
* 4cursor默认pointor * 4cursor默认pointor
* @class BI.Single * @class BI.Single
* @extends BI.Widget * @extends BI.Widget
* @abstract * @abstract
*/ */
BI.Single = BI.inherit(BI.Widget, { BI.Single = BI.inherit(BI.Widget, {
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.Single.superclass._defaultConfig.apply(this, arguments); var conf = BI.Single.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-single", baseCls: (conf.baseCls || "") + " bi-single",
readonly: false, readonly: false,
title: null, title: null,
warningTitle: null, warningTitle: null,
tipType: null, // success或warning tipType: null, // success或warning
value: null value: null
}) })
}, },
_showToolTip: function (e, opt) { _showToolTip: function (e, opt) {
opt || (opt = {}); opt || (opt = {});
var self = this; var self = this;
var type = this.getTipType() || (this.isEnabled() ? "success" : "warning"); var type = this.getTipType() || (this.isEnabled() ? "success" : "warning");
var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle()); var title = type === "success" ? this.getTitle() : (this.getWarningTitle() || this.getTitle());
if (BI.isKey(title)) { if (BI.isKey(title)) {
BI.Tooltips.show(e, this.getName(), title, type, this, opt); BI.Tooltips.show(e, this.getName(), title, type, this, opt);
} }
}, },
_hideTooltip: function () { _hideTooltip: function () {
var self = this; var self = this;
var tooltip = BI.Tooltips.get(this.getName()); var tooltip = BI.Tooltips.get(this.getName());
if (BI.isNotNull(tooltip)) { if (BI.isNotNull(tooltip)) {
tooltip.element.fadeOut(200, function () { tooltip.element.fadeOut(200, function () {
BI.Tooltips.remove(self.getName()); BI.Tooltips.remove(self.getName());
}); });
} }
}, },
_init: function () { _init: function () {
BI.Single.superclass._init.apply(this, arguments); BI.Single.superclass._init.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
if (BI.isKey(o.title) || BI.isKey(o.warningTitle) if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover(); this.enableHover();
} }
}, },
enableHover: function (opt) { enableHover: function (opt) {
opt || (opt = {}); opt || (opt = {});
var self = this; var self = this;
if (!this._hoverBinded) { if (!this._hoverBinded) {
this.element.on("mouseenter.title" + this.getName(), function (e) { this.element.on("mouseenter.title" + this.getName(), function (e) {
self._e = e; self._e = e;
if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) { if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) {
self.timeout = BI.delay(function () { self.timeout = BI.delay(function () {
self._showToolTip(self._e || e, opt); self._showToolTip(self._e || e, opt);
}, 200); }, 200);
} else if (self.getTipType() === "success" || self.isEnabled()) { } else if (self.getTipType() === "success" || self.isEnabled()) {
self.timeout = BI.delay(function () { self.timeout = BI.delay(function () {
self._showToolTip(self._e || e, opt); self._showToolTip(self._e || e, opt);
}, 500); }, 500);
} }
}); });
this.element.on("mousemove.title" + this.getName(), function (e) { this.element.on("mousemove.title" + this.getName(), function (e) {
self._e = e; self._e = e;
if (!self.element.__isMouseInBounds__(e)) { if (!self.element.__isMouseInBounds__(e)) {
if (BI.isNotNull(self.timeout)) { if (BI.isNotNull(self.timeout)) {
clearTimeout(self.timeout); clearTimeout(self.timeout);
} }
self._hideTooltip(); self._hideTooltip();
} }
}); });
this.element.on("mouseleave.title" + this.getName(), function () { this.element.on("mouseleave.title" + this.getName(), function () {
self._e = null; self._e = null;
if (BI.isNotNull(self.timeout)) { if (BI.isNotNull(self.timeout)) {
clearTimeout(self.timeout); clearTimeout(self.timeout);
} }
self._hideTooltip(); self._hideTooltip();
}); });
this._hoverBinded = true; this._hoverBinded = true;
} }
}, },
disabledHover: function () { disabledHover: function () {
//取消hover事件 //取消hover事件
if (BI.isNotNull(this.timeout)) { if (BI.isNotNull(this.timeout)) {
clearTimeout(this.timeout); clearTimeout(this.timeout);
} }
this._hideTooltip(); this._hideTooltip();
$(this.element).unbind("mouseenter.title" + this.getName()) $(this.element).unbind("mouseenter.title" + this.getName())
.unbind("mousemove.title" + this.getName()) .unbind("mousemove.title" + this.getName())
.unbind("mouseleave.title" + this.getName()); .unbind("mouseleave.title" + this.getName());
this._hoverBinded = false; this._hoverBinded = false;
}, },
populate: function (items) { populate: function (items) {
this.items = items || []; this.items = items || [];
}, },
//opt: {container: '', belowMouse: false} //opt: {container: '', belowMouse: false}
setTitle: function (title, opt) { setTitle: function (title, opt) {
this.options.title = title; this.options.title = title;
if (BI.isKey(title)) { if (BI.isKey(title)) {
this.enableHover(opt); this.enableHover(opt);
} else { } else {
this.disabledHover(); this.disabledHover();
} }
}, },
setWarningTitle: function (title, opt) { setWarningTitle: function (title, opt) {
this.options.warningTitle = title; this.options.warningTitle = title;
if (BI.isKey(title)) { if (BI.isKey(title)) {
this.enableHover(opt); this.enableHover(opt);
} else { } else {
this.disabledHover(); this.disabledHover();
} }
}, },
getTipType: function () { getTipType: function () {
return this.options.tipType; return this.options.tipType;
}, },
isReadOnly: function () { isReadOnly: function () {
return !!this.options.readonly; return !!this.options.readonly;
}, },
getTitle: function () { getTitle: function () {
var title = this.options.title; var title = this.options.title;
if(BI.isFunction(title)) { if(BI.isFunction(title)) {
return title(); return title();
} }
return title; return title;
}, },
getWarningTitle: function () { getWarningTitle: function () {
var title = this.options.warningTitle; var title = this.options.warningTitle;
if(BI.isFunction(title)) { if(BI.isFunction(title)) {
return title(); return title();
} }
return title; return title;
}, },
setValue: function (val) { setValue: function (val) {
if (!this.options.readonly) { if (!this.options.readonly) {
this.options.value = val; this.options.value = val;
} }
}, },
getValue: function () { getValue: function () {
return this.options.value; return this.options.value;
} }
});/** });/**
* guy 表示一行数据通过position来定位位置的数据 * guy 表示一行数据通过position来定位位置的数据
* @class BI.Text * @class BI.Text
@ -918,82 +918,82 @@ BI.BasicButton = BI.inherit(BI.Single, {
BI.BasicButton.superclass.destroy.apply(this, arguments); BI.BasicButton.superclass.destroy.apply(this, arguments);
} }
}); });
BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/** BI.BasicButton.EVENT_CHANGE = "BasicButton.EVENT_CHANGE";/**
* 表示一个可以展开的节点, 不仅有选中状态而且有展开状态 * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态
* *
* Created by GUY on 2015/9/9. * Created by GUY on 2015/9/9.
* @class BI.NodeButton * @class BI.NodeButton
* @extends BI.BasicButton * @extends BI.BasicButton
* @abstract * @abstract
*/ */
BI.NodeButton = BI.inherit(BI.BasicButton, { BI.NodeButton = BI.inherit(BI.BasicButton, {
_defaultConfig: function() { _defaultConfig: function() {
var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments); var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments);
return BI.extend( conf, { return BI.extend( conf, {
baseCls: (conf.baseCls || "") + " bi-node", baseCls: (conf.baseCls || "") + " bi-node",
open: false open: false
}) })
}, },
_init:function() { _init:function() {
BI.NodeButton.superclass._init.apply(this, arguments); BI.NodeButton.superclass._init.apply(this, arguments);
var self = this; var self = this;
BI.nextTick(function(){ BI.nextTick(function(){
self.setOpened(self.isOpened()); self.setOpened(self.isOpened());
}) })
}, },
doClick: function(){ doClick: function(){
BI.NodeButton.superclass.doClick.apply(this, arguments); BI.NodeButton.superclass.doClick.apply(this, arguments);
this.setOpened(!this.isOpened()); this.setOpened(!this.isOpened());
}, },
isOnce: function(){ isOnce: function(){
return false; return false;
}, },
isOpened: function(){ isOpened: function(){
return !!this.options.open; return !!this.options.open;
}, },
setOpened: function(b){ setOpened: function(b){
this.options.open = !!b; this.options.open = !!b;
}, },
triggerCollapse: function(){ triggerCollapse: function(){
if(this.isOpened()) { if(this.isOpened()) {
this.setOpened(false); this.setOpened(false);
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this);
} }
}, },
triggerExpand: function(){ triggerExpand: function(){
if(!this.isOpened()) { if(!this.isOpened()) {
this.setOpened(true); this.setOpened(true);
this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this); this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this);
} }
} }
});/** });/**
* guy * guy
* tip提示 * tip提示
* zIndex在10亿级别 * zIndex在10亿级别
* @class BI.Tip * @class BI.Tip
* @extends BI.Single * @extends BI.Single
* @abstract * @abstract
*/ */
BI.Tip = BI.inherit(BI.Single, { BI.Tip = BI.inherit(BI.Single, {
_defaultConfig: function() { _defaultConfig: function() {
var conf = BI.Link.superclass._defaultConfig.apply(this, arguments); var conf = BI.Link.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-tip", baseCls: (conf.baseCls || "") + " bi-tip",
zIndex: BI.zIndex_tip zIndex: BI.zIndex_tip
}) })
}, },
_init : function() { _init : function() {
BI.Tip.superclass._init.apply(this, arguments); BI.Tip.superclass._init.apply(this, arguments);
this.element.css({"zIndex": this.options.zIndex}); this.element.css({"zIndex": this.options.zIndex});
} }
});/** });/**
* Created by GUY on 2015/6/26. * Created by GUY on 2015/6/26.
* @class BI.ButtonGroup * @class BI.ButtonGroup
@ -20293,32 +20293,32 @@ BI.Tooltip = BI.inherit(BI.Tip, {
} }
}); });
BI.shortcut("bi.tooltip", BI.Tooltip);/** BI.shortcut("bi.tooltip", BI.Tooltip);/**
* 下拉 * 下拉
* @class BI.Trigger * @class BI.Trigger
* @extends BI.Single * @extends BI.Single
* @abstract * @abstract
*/ */
BI.Trigger = BI.inherit(BI.Single, { BI.Trigger = BI.inherit(BI.Single, {
_defaultConfig: function() { _defaultConfig: function() {
var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments); var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, { return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer", baseCls: (conf.baseCls || "") + " bi-trigger cursor-pointer",
height: 30 height: 30
}) })
}, },
_init : function() { _init : function() {
BI.Trigger.superclass._init.apply(this, arguments); BI.Trigger.superclass._init.apply(this, arguments);
}, },
setKey: function(){ setKey: function(){
}, },
getKey: function(){ getKey: function(){
} }
});// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. });// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");

827
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: { props: {
baseCls: "demo-func" baseCls: "demo-func"
}, },
@ -3038,10 +3155,6 @@ BI.shortcut("demo.value_chooser_pane", Demo.ValueChooserPane);Demo.BASE_CONFIG =
pId: 3, pId: 3,
id: 301, id: 301,
text: "editors" text: "editors"
}, {
pId: 301,
text: "bi.record_editor",
value: "demo.record_editor"
}, { }, {
pId: 301, pId: 301,
text: "bi.shelter_editor", text: "bi.shelter_editor",
@ -3050,6 +3163,10 @@ BI.shortcut("demo.value_chooser_pane", Demo.ValueChooserPane);Demo.BASE_CONFIG =
pId: 301, pId: 301,
text: "bi.sign_editor", text: "bi.sign_editor",
value: "demo.sign_editor" value: "demo.sign_editor"
}, {
pId: 301,
text: "bi.sign_initial_editor",
value: "demo.sign_initial_editor"
}, { }, {
pId: 301, pId: 301,
text: "bi.state_editor", text: "bi.state_editor",
@ -3347,301 +3464,260 @@ Demo.COMPONENT_CONFIG = [{
text: "pane", text: "pane",
value: "demo.pane" value: "demo.pane"
}];Demo.WIDGET_CONFIG = [{ }];Demo.WIDGET_CONFIG = [{
id: 4, id: 4,
text: "详细控件", text: "详细控件",
open: true open: true
}, { }, {
pId: 4, pId: 4,
id: 420, id: 420,
text: '各种小控件', text: '各种小控件',
}, { }, {
pId: 420, pId: 420,
text: "各种通用按钮", text: "各种通用按钮",
value: "demo.buttons" value: "demo.buttons"
}, { }, {
pId: 420, pId: 420,
text: "各种提示性信息", text: "各种提示性信息",
value: "demo.tips" value: "demo.tips"
}, { }, {
pId: 420, pId: 420,
text: "各种items", text: "各种items",
value: "demo.items" value: "demo.items"
}, { }, {
pId: 420, pId: 420,
text: "各种节点node", text: "各种节点node",
value: "demo.nodes" value: "demo.nodes"
}, { }, {
pId: 420, pId: 420,
text: "各种segment", text: "各种segment",
value: "demo.segments" value: "demo.segments"
}, { }, {
pId: 420, pId: 420,
text: "可以切换的树", text: "可以切换的树",
value: "demo.switch_tree" value: "demo.switch_tree"
}, { }, {
id: 400, id: 400,
pId: 4, pId: 4,
text: "tree" text: "tree"
}, { }, {
pId: 400, pId: 400,
text: "bi.multi_tree_combo", text: "bi.multi_tree_combo",
value: "demo.multi_tree_combo" value: "demo.multi_tree_combo"
}, { }, {
pId: 400, pId: 400,
text: "bi.switch_tree", text: "bi.switch_tree",
value: "demo.switch_tree" value: "demo.switch_tree"
}, { }, {
id: 401, id: 401,
pId: 4, pId: 4,
text: "table" text: "table"
}, { }, {
pId: 401, pId: 401,
text: "bi.preview_table", text: "bi.preview_table",
value: "demo.preview_table" value: "demo.preview_table"
}, { }, {
pId: 401, pId: 401,
text: "bi.responsive_table", text: "bi.responsive_table",
value: "demo.responsive_table" value: "demo.responsive_table"
}, { }, {
pId: 401, pId: 401,
text: "bi.excel_table", text: "bi.excel_table",
value: "demo.excel_table" value: "demo.excel_table"
}, { }, {
pId: 4, pId: 4,
id: 402, id: 402,
text: "年份控件", text: "年份控件",
open: false open: false
}, { }, {
pId: 402, pId: 402,
text: "bi.year_combo", text: "bi.year_combo",
value: "demo.year" value: "demo.year"
}, { }, {
pId: 4, pId: 4,
id: 403, id: 403,
text: "月份控件", text: "月份控件",
open: false open: false
}, { }, {
pId: 403, pId: 403,
text: "bi.month_combo", text: "bi.month_combo",
value: "demo.month" value: "demo.month"
}, { }, {
pId: 4, pId: 4,
id: 404, id: 404,
text: "季度控件", text: "季度控件",
open: false open: false
}, { }, {
pId: 404, pId: 404,
text: "bi.quarter_combo", text: "bi.quarter_combo",
value: "demo.quarter" value: "demo.quarter"
}, { }, {
pId: 4, pId: 4,
id: 405, id: 405,
text: "下拉列表", text: "下拉列表",
open: false open: false
}, { }, {
pId: 405, pId: 405,
text: "bi.down_list_combo", text: "bi.down_list_combo",
value: "demo.down_list" value: "demo.down_list"
}, { }, {
pId: 4, pId: 4,
id: 406, id: 406,
text: "文本框控件", text: "文本框控件",
open: false open: false
}, { }, {
pId: 406, pId: 406,
text: "bi.text_editor", text: "bi.text_editor",
value: "demo.text_editor" value: "demo.text_editor"
}, { }, {
pId: 406, pId: 406,
text: "bi.search_editor", text: "bi.search_editor",
value: "demo.search_editor" value: "demo.search_editor"
}, { }, {
pId: 406, pId: 406,
text: "bi.sign_editor", text: "bi.clear_editor",
value: "demo.sign_editor" value: "demo.clear_editor"
}, { }, {
pId: 406, pId: 4,
text: "bi.sign_initial_editor", id: 407,
value: "demo.sign_initial_editor" text: "下拉框控件",
}, { open: false
pId: 406, }, {
text: "bi.sign_style_editor", pId: 407,
value: "demo.sign_style_editor" text: "bi.text_value_combo",
}, { value: "demo.text_value_combo"
pId: 406, }, {
text: "bi.state_editor", pId: 407,
value: "demo.state_editor" text: "bi.text_value_check_combo",
}, { value: "demo.text_value_check_combo"
pId: 406, }, {
text: "bi.clear_editor", pId: 407,
value: "demo.clear_editor" text: "bi.text_value_down_list_combo",
}, { value: "demo.text_value_down_list_combo"
pId: 406, }, {
text: "bi.record_editor", pId: 407,
value: "demo.record_editor" text: "bi.static_combo",
}, { value: "demo.static_combo"
pId: 406, }, {
text: "bi.shelter_editor", pId: 407,
value: "demo.shelter_editor" text: "bi.icon_combo",
}, value: "demo.icon_combo"
{ }, {
pId: 4, pId: 407,
id: 407, text: "bi.formula_combo",
text: "下拉框控件", value: "demo.formula_combo"
open: false }, {
}, { pId: 4,
pId: 407, id: 410,
text: "bi.text_value_combo", text: "数值区间控件"
value: "demo.text_value_combo" }, {
}, { pId: 410,
pId: 407, text: "bi.numerical_interval",
text: "bi.text_value_check_combo", value: "demo.numberical_interval"
value: "demo.text_value_check_combo" }, {
}, { pId: 4,
pId: 407, id: 411,
text: "bi.text_value_down_list_combo", text: "下拉复选框有确定按钮"
value: "demo.text_value_down_list_combo" }, {
}, { pId: 411,
pId: 407, text: "bi.multi_select_combo",
text: "bi.static_combo", value: "demo.multi_select_combo"
value: "demo.static_combo" }, {
}, { pId: 4,
pId: 407, id: 412,
text: "bi.icon_combo", text: "简单日期控件"
value: "demo.icon_combo" }, {
}, { pId: 412,
pId: 407, text: "bi.date_combo",
text: "bi.formula_combo", value: "demo.date"
value: "demo.formula_combo" }, {
}, { pId: 412,
pId: 4, text: "bi.date_pane_widget",
id: 408, value: "demo.date_pane_widget"
text: "选择字段列表", }, {
open: false pId: 412,
}, { text: "bi.year_month_combo",
pId: 408, value: "demo.year_month_combo"
text: "bi.placeholder" }, {
}, { pId: 412,
pId: 4, text: "bi.year_quarter_combo",
id: 409, value: "demo.year_quarter_combo"
text: "公式编辑器", }, {
open: false pId: 412,
}, { text: "bi.custom_date_time",
pId: 409, value: "demo.custom_date_time"
text: "bi.placeholder" }, {
}, { pId: 4,
pId: 4, id: 413,
id: 410, text: "简单下拉树"
text: "数值区间控件" }, {
}, { pId: 413,
pId: 410, text: "bi.single_tree_combo",
text: "bi.numerical_interval", value: "demo.single_tree_combo"
value: "demo.numberical_interval" }, {
}, { pId: 413,
pId: 4, text: "bi.multilayer_single_tree_combo",
id: 411, value: "demo.multilayer_single_tree_combo"
text: "下拉复选框有确定按钮" }, {
}, { pId: 4,
pId: 411, id: 414,
text: "bi.multi_select_combo", text: "可选下拉树"
value: "demo.multi_select_combo" }, {
}, { pId: 414,
pId: 4, text: "bi.select_tree_combo",
id: 412, value: "demo.select_tree_combo"
text: "简单日期控件" }, {
}, { pId: 414,
pId: 412, text: "bi.multilayer_select_tree_combo",
text: "bi.date_combo", value: "demo.multilayer_select_tree_combo"
value: "demo.date" }, {
}, { pId: 4,
pId: 412, id: 415,
text: "bi.date_pane_widget", text: "路径选择"
value: "demo.date_pane_widget" }, {
}, { pId: 415,
pId: 412, text: "bi.path_chooser",
text: "bi.year_month_combo", value: "demo.path_chooser"
value: "demo.year_month_combo" }, {
}, { pId: 415,
pId: 412, text: "bi.direction_path_chooser",
text: "bi.year_quarter_combo", value: "demo.direction_path_chooser"
value: "demo.year_quarter_combo" }, {
}, { pId: 4,
pId: 412, id: 416,
text: "bi.custom_date_time", text: "关联视图"
value: "demo.custom_date_time" }, {
}, { pId: 416,
pId: 4, text: "bi.relation_view",
id: 413, value: "demo.relation_view"
text: "简单下拉树" }, {
}, { pId: 4,
pId: 413, id: 417,
text: "bi.single_tree_combo", text: "布局"
value: "demo.single_tree_combo" }, {
}, { pId: 417,
pId: 413, text: "bi.adaptive_arrangement",
text: "bi.multilayer_single_tree_combo", value: "demo.adaptive_arrangement"
value: "demo.multilayer_single_tree_combo" }, {
}, { pId: 417,
pId: 4, text: "bi.interactive_arrangement",
id: 414, value: "demo.interactive_arrangement"
text: "可选下拉树" }, {
}, { pId: 4,
pId: 414, id: 418,
text: "bi.select_tree_combo", text: "提示对话框"
value: "demo.select_tree_combo" }, {
}, { pId: 418,
pId: 414, text: "bi.dialog",
text: "bi.multilayer_select_tree_combo", value: "demo.dialog"
value: "demo.multilayer_select_tree_combo" }, {
}, { pId: 4,
pId: 4, id: 419,
id: 415, text: "文件管理"
text: "路径选择" }, {
}, { pId: 419,
pId: 415, text: "bi.file_manager",
text: "bi.path_chooser", value: "demo.file_manager"
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"
}
];Demo.Func = BI.inherit(BI.Widget, { ];Demo.Func = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "demo-func" baseCls: "demo-func"
@ -7453,27 +7529,6 @@ Demo.ClearEditor = BI.inherit(BI.Widget, {
BI.shortcut("demo.clear_editor", Demo.ClearEditor);/** BI.shortcut("demo.clear_editor", Demo.ClearEditor);/**
* Created by Dailer on 2017/7/11. * 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, { Demo.SearchEditor = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "demo-exceltable" baseCls: "demo-exceltable"
@ -7502,136 +7557,6 @@ Demo.SearchEditor = BI.inherit(BI.Widget, {
BI.shortcut("demo.search_editor", Demo.SearchEditor);/** BI.shortcut("demo.search_editor", Demo.SearchEditor);/**
* Created by Dailer on 2017/7/11. * 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, { Demo.TextEditor = BI.inherit(BI.Widget, {
props: { props: {
baseCls: "demo-exceltable" baseCls: "demo-exceltable"

46
docs/resource.css

@ -818,6 +818,52 @@ textarea::-webkit-scrollbar-thumb:hover {
content: "\e600"; content: "\e600";
color: #f07d0a; 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 .x-icon,
.tree-collapse-icon-type1:hover .x-icon, .tree-collapse-icon-type1:hover .x-icon,
.tree-collapse-icon-type1:active .x-icon { .tree-collapse-icon-type1:active .x-icon {

46
src/css/resource/font.css

@ -684,3 +684,49 @@
content: "\e600"; content: "\e600";
color: #f07d0a; 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;
}

6
src/less/resource/font.less

@ -79,4 +79,8 @@
.font-hover(primary-key-font, @font-key); .font-hover(primary-key-font, @font-key);
.font(drag-tag-font, @font-cross, @color-bi-text-redmark); .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);
Loading…
Cancel
Save