Browse Source

update

master
guy 7 years ago
parent
commit
0bc6de1e67
  1. 53
      demo/js/base/button/demo.button.js
  2. 233
      demo/js/widget/basewidget/demo.buttons.js
  3. 7
      demo/js/widget/basewidget/demo.nodes.js
  4. 113
      dist/bundle.js
  5. 42
      dist/bundle.min.js
  6. 113
      dist/case.js
  7. 293
      dist/demo.js
  8. 113
      dist/fineui.js
  9. 40
      dist/fineui.min.js
  10. 2
      src/case/button/node/node.arrow.js
  11. 83
      src/case/button/node/node.triangle.js
  12. 4
      src/case/checkbox/check.arrownode.js
  13. 26
      src/case/checkbox/check.treegroupnode.js

53
demo/js/base/button/demo.button.js

@ -3,22 +3,21 @@ Demo.Button = BI.inherit(BI.Widget, {
baseCls: "demo-button"
},
render: function () {
var items = [
{
el: {
type: "bi.button",
text: "一般按钮",
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示成功状态按钮",
level: "success",
height: 30
}
},
var items = [{
el: {
type: "bi.button",
text: "一般按钮",
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示成功状态按钮",
level: "success",
height: 30
}
},
{
el: {
type: "bi.button",
@ -179,25 +178,9 @@ Demo.Button = BI.inherit(BI.Widget, {
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: false
}
}, {
el: {
type: "bi.multi_select_bar",
selected: false,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar"
type: "bi.text_button",
text: "文字按钮",
height: 30
}
}
];

233
demo/js/widget/basewidget/demo.buttons.js

@ -8,186 +8,61 @@ Demo.Buttons = BI.inherit(BI.Widget, {
baseCls: "demo-button"
},
render: function () {
var items = [{
el: {
type: "bi.button",
text: "一般按钮",
level: "common",
height: 30
var items = [
{
el: {
type: "bi.button",
text: "一般按钮",
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconCls: "close-font",
height: 30
}
}, {
el: {
type: "bi.button",
text: "一般按钮",
block: true,
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "一般按钮",
clear: true,
level: "common",
height: 30
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: false
}
}, {
el: {
type: "bi.multi_select_bar",
selected: false,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar"
}
}
}, {
el: {
type: "bi.button",
text: "表示成功状态按钮",
level: "success",
height: 30
}
},
{
el: {
type: "bi.button",
text: "表示警告状态的按钮",
level: "warning",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示忽略状态的按钮",
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "普通灰化按钮",
disabled: true,
level: "success",
height: 30
}
}, {
el: {
type: "bi.button",
text: "忽略状态灰化按钮",
disabled: true,
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconCls: "close-font",
height: 30
}
}, {
el: {
type: "bi.button",
text: "一般按钮",
block: true,
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示成功状态按钮",
block: true,
level: "success",
height: 30
}
},
{
el: {
type: "bi.button",
text: "表示警告状态的按钮",
block: true,
level: "warning",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示忽略状态的按钮",
block: true,
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "普通灰化按钮",
block: true,
disabled: true,
level: "success",
height: 30
}
}, {
el: {
type: "bi.button",
text: "忽略状态灰化按钮",
block: true,
disabled: true,
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "带图标的按钮",
block: true,
// level: 'ignore',
iconCls: "close-font",
height: 30
}
}, {
el: {
type: "bi.button",
text: "一般按钮",
clear: true,
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示成功状态按钮",
clear: true,
level: "success",
height: 30
}
},
{
el: {
type: "bi.button",
text: "表示警告状态的按钮",
clear: true,
level: "warning",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示忽略状态的按钮",
clear: true,
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "普通灰化按钮",
clear: true,
disabled: true,
level: "success",
height: 30
}
}, {
el: {
type: "bi.button",
text: "忽略状态灰化按钮",
clear: true,
disabled: true,
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "带图标的按钮",
clear: true,
// level: 'ignore',
iconCls: "close-font",
height: 30
}
}, {
el: {
type: "bi.text_button",
text: "文字按钮",
height: 30
}
}
];
BI.each(items, function (i, item) {
item.el.handler = function () {

7
demo/js/widget/basewidget/demo.nodes.js

@ -14,13 +14,6 @@ Demo.Nodes = BI.inherit(BI.Widget, {
}, {
type: "bi.plus_group_node",
text: "十字形的节点"
}, {
type: "bi.label",
height: 30,
text: "三角形的节点"
}, {
type: "bi.triangle_group_node",
text: "三角形的节点"
}, {
type: "bi.label",
height: 30,

113
dist/bundle.js vendored

@ -62926,7 +62926,7 @@ BI.ArrowNode = BI.inherit(BI.NodeButton, {
var self = this, o = this.options;
BI.ArrowNode.superclass._init.apply(this, arguments);
this.checkbox = BI.createWidget({
type: "bi.arrow_tree_group_node_checkbox",
type: "bi.arrow_group_node_checkbox",
iconWidth: 13,
iconHeight: 13
});
@ -63491,88 +63491,6 @@ BI.PlusGroupNode = BI.inherit(BI.NodeButton, {
});
BI.shortcut("bi.plus_group_node", BI.PlusGroupNode);/**
* 三角号表示的组节点
* Created by GUY on 2015/9/6.
* @class BI.TriangleGroupNode
* @extends BI.NodeButton
*/
BI.TriangleGroupNode = BI.inherit(BI.NodeButton, {
_defaultConfig: function () {
var conf = BI.TriangleGroupNode.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-triangle-group-node bi-list-item",
logic: {
dynamic: false
},
id: "",
pId: "",
open: false,
height: 25
});
},
_init: function () {
BI.TriangleGroupNode.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.checkbox = BI.createWidget({
iconWidth: 13,
iconHeight: 13,
type: "bi.tree_group_node_checkbox"
});
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
value: o.value,
py: o.py,
keyword: o.keyword
});
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {
self.setSelected(self.isSelected());
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);
var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {
width: 25,
el: this.checkbox
}, this.text);
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {
items: items
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.TriangleGroupNode.superclass.doClick.apply(this, arguments);
this.checkbox.setSelected(this.isOpened());
},
setOpened: function (v) {
BI.TriangleGroupNode.superclass.setOpened.apply(this, arguments);
this.checkbox.setSelected(v);
},
setText: function (text) {
BI.TriangleGroupNode.superclass.setText.apply(this, arguments);
this.text.setText(text);
}
});
BI.shortcut("bi.triangle_group_node", BI.TriangleGroupNode);/**
* guy
* 复选框item
* @type {*|void|Object}
@ -64561,7 +64479,7 @@ BI.shortcut("bi.complex_canvas", BI.ComplexCanvas);/**
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-arrow-tree-group-node"
extraCls: "bi-arrow-group-node-checkbox"
});
},
_init: function () {
@ -64576,7 +64494,7 @@ BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
}
}
});
BI.shortcut("bi.arrow_tree_group_node_checkbox", BI.ArrowTreeGroupNodeCheckbox);/**
BI.shortcut("bi.arrow_group_node_checkbox", BI.ArrowTreeGroupNodeCheckbox);/**
* 十字型的树节点
* @class BI.CheckingMarkNode
* @extends BI.IconButton
@ -64680,31 +64598,6 @@ BI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, {
}
});
BI.shortcut("bi.mid_tree_node_checkbox", BI.MidTreeNodeCheckbox);/**
* 三角形的树节点
* Created by GUY on 2015/9/6.
* @class BI.TreeGroupNodeCheckbox
* @extends BI.IconButton
*/
BI.TreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend( BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "tree-node-triangle-collapse-font"
});
},
_init: function () {
BI.TreeGroupNodeCheckbox.superclass._init.apply(this, arguments);
},
setSelected: function (v) {
BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v) {
this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font");
} else {
this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font");
}
}
});
BI.shortcut("bi.tree_group_node_checkbox", BI.TreeGroupNodeCheckbox);/**
* 十字型的树节点
* @class BI.TreeNodeCheckbox
* @extends BI.IconButton

42
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

113
dist/case.js vendored

@ -411,7 +411,7 @@ BI.ArrowNode = BI.inherit(BI.NodeButton, {
var self = this, o = this.options;
BI.ArrowNode.superclass._init.apply(this, arguments);
this.checkbox = BI.createWidget({
type: "bi.arrow_tree_group_node_checkbox",
type: "bi.arrow_group_node_checkbox",
iconWidth: 13,
iconHeight: 13
});
@ -976,88 +976,6 @@ BI.PlusGroupNode = BI.inherit(BI.NodeButton, {
});
BI.shortcut("bi.plus_group_node", BI.PlusGroupNode);/**
* 三角号表示的组节点
* Created by GUY on 2015/9/6.
* @class BI.TriangleGroupNode
* @extends BI.NodeButton
*/
BI.TriangleGroupNode = BI.inherit(BI.NodeButton, {
_defaultConfig: function () {
var conf = BI.TriangleGroupNode.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-triangle-group-node bi-list-item",
logic: {
dynamic: false
},
id: "",
pId: "",
open: false,
height: 25
});
},
_init: function () {
BI.TriangleGroupNode.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.checkbox = BI.createWidget({
iconWidth: 13,
iconHeight: 13,
type: "bi.tree_group_node_checkbox"
});
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
value: o.value,
py: o.py,
keyword: o.keyword
});
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {
self.setSelected(self.isSelected());
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);
var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {
width: 25,
el: this.checkbox
}, this.text);
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {
items: items
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.TriangleGroupNode.superclass.doClick.apply(this, arguments);
this.checkbox.setSelected(this.isOpened());
},
setOpened: function (v) {
BI.TriangleGroupNode.superclass.setOpened.apply(this, arguments);
this.checkbox.setSelected(v);
},
setText: function (text) {
BI.TriangleGroupNode.superclass.setText.apply(this, arguments);
this.text.setText(text);
}
});
BI.shortcut("bi.triangle_group_node", BI.TriangleGroupNode);/**
* guy
* 复选框item
* @type {*|void|Object}
@ -2046,7 +1964,7 @@ BI.shortcut("bi.complex_canvas", BI.ComplexCanvas);/**
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-arrow-tree-group-node"
extraCls: "bi-arrow-group-node-checkbox"
});
},
_init: function () {
@ -2061,7 +1979,7 @@ BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
}
}
});
BI.shortcut("bi.arrow_tree_group_node_checkbox", BI.ArrowTreeGroupNodeCheckbox);/**
BI.shortcut("bi.arrow_group_node_checkbox", BI.ArrowTreeGroupNodeCheckbox);/**
* 十字型的树节点
* @class BI.CheckingMarkNode
* @extends BI.IconButton
@ -2165,31 +2083,6 @@ BI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, {
}
});
BI.shortcut("bi.mid_tree_node_checkbox", BI.MidTreeNodeCheckbox);/**
* 三角形的树节点
* Created by GUY on 2015/9/6.
* @class BI.TreeGroupNodeCheckbox
* @extends BI.IconButton
*/
BI.TreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend( BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "tree-node-triangle-collapse-font"
});
},
_init: function () {
BI.TreeGroupNodeCheckbox.superclass._init.apply(this, arguments);
},
setSelected: function (v) {
BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v) {
this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font");
} else {
this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font");
}
}
});
BI.shortcut("bi.tree_group_node_checkbox", BI.TreeGroupNodeCheckbox);/**
* 十字型的树节点
* @class BI.TreeNodeCheckbox
* @extends BI.IconButton

293
dist/demo.js vendored

@ -22,22 +22,21 @@ $(function () {
baseCls: "demo-button"
},
render: function () {
var items = [
{
el: {
type: "bi.button",
text: "一般按钮",
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示成功状态按钮",
level: "success",
height: 30
}
},
var items = [{
el: {
type: "bi.button",
text: "一般按钮",
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示成功状态按钮",
level: "success",
height: 30
}
},
{
el: {
type: "bi.button",
@ -198,25 +197,9 @@ $(function () {
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: false
}
}, {
el: {
type: "bi.multi_select_bar",
selected: false,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar"
type: "bi.text_button",
text: "文字按钮",
height: 30
}
}
];
@ -11769,186 +11752,61 @@ Demo.Buttons = BI.inherit(BI.Widget, {
baseCls: "demo-button"
},
render: function () {
var items = [{
el: {
type: "bi.button",
text: "一般按钮",
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示成功状态按钮",
level: "success",
height: 30
}
},
{
el: {
type: "bi.button",
text: "表示警告状态的按钮",
level: "warning",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示忽略状态的按钮",
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "普通灰化按钮",
disabled: true,
level: "success",
height: 30
}
}, {
el: {
type: "bi.button",
text: "忽略状态灰化按钮",
disabled: true,
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconCls: "close-font",
height: 30
}
}, {
el: {
type: "bi.button",
text: "一般按钮",
block: true,
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示成功状态按钮",
block: true,
level: "success",
height: 30
}
},
{
el: {
type: "bi.button",
text: "表示警告状态的按钮",
block: true,
level: "warning",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示忽略状态的按钮",
block: true,
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "普通灰化按钮",
block: true,
disabled: true,
level: "success",
height: 30
}
}, {
el: {
type: "bi.button",
text: "忽略状态灰化按钮",
block: true,
disabled: true,
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "带图标的按钮",
block: true,
// level: 'ignore',
iconCls: "close-font",
height: 30
}
}, {
el: {
type: "bi.button",
text: "一般按钮",
clear: true,
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示成功状态按钮",
clear: true,
level: "success",
height: 30
}
},
{
el: {
type: "bi.button",
text: "表示警告状态的按钮",
clear: true,
level: "warning",
height: 30
}
}, {
el: {
type: "bi.button",
text: "表示忽略状态的按钮",
clear: true,
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "普通灰化按钮",
clear: true,
disabled: true,
level: "success",
height: 30
}
}, {
el: {
type: "bi.button",
text: "忽略状态灰化按钮",
clear: true,
disabled: true,
level: "ignore",
height: 30
}
}, {
el: {
type: "bi.button",
text: "带图标的按钮",
clear: true,
// level: 'ignore',
iconCls: "close-font",
height: 30
}
}, {
el: {
type: "bi.text_button",
text: "文字按钮",
height: 30
var items = [
{
el: {
type: "bi.button",
text: "一般按钮",
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "带图标的按钮",
// level: 'ignore',
iconCls: "close-font",
height: 30
}
}, {
el: {
type: "bi.button",
text: "一般按钮",
block: true,
level: "common",
height: 30
}
}, {
el: {
type: "bi.button",
text: "一般按钮",
clear: true,
level: "common",
height: 30
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar",
selected: true,
halfSelected: false
}
}, {
el: {
type: "bi.multi_select_bar",
selected: false,
halfSelected: true
}
}, {
el: {
type: "bi.multi_select_bar"
}
}
}
];
BI.each(items, function (i, item) {
item.el.handler = function () {
@ -12015,13 +11873,6 @@ Demo.Nodes = BI.inherit(BI.Widget, {
}, {
type: "bi.plus_group_node",
text: "十字形的节点"
}, {
type: "bi.label",
height: 30,
text: "三角形的节点"
}, {
type: "bi.triangle_group_node",
text: "三角形的节点"
}, {
type: "bi.label",
height: 30,

113
dist/fineui.js vendored

@ -64680,7 +64680,7 @@ BI.ArrowNode = BI.inherit(BI.NodeButton, {
var self = this, o = this.options;
BI.ArrowNode.superclass._init.apply(this, arguments);
this.checkbox = BI.createWidget({
type: "bi.arrow_tree_group_node_checkbox",
type: "bi.arrow_group_node_checkbox",
iconWidth: 13,
iconHeight: 13
});
@ -65245,88 +65245,6 @@ BI.PlusGroupNode = BI.inherit(BI.NodeButton, {
});
BI.shortcut("bi.plus_group_node", BI.PlusGroupNode);/**
* 三角号表示的组节点
* Created by GUY on 2015/9/6.
* @class BI.TriangleGroupNode
* @extends BI.NodeButton
*/
BI.TriangleGroupNode = BI.inherit(BI.NodeButton, {
_defaultConfig: function () {
var conf = BI.TriangleGroupNode.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-triangle-group-node bi-list-item",
logic: {
dynamic: false
},
id: "",
pId: "",
open: false,
height: 25
});
},
_init: function () {
BI.TriangleGroupNode.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.checkbox = BI.createWidget({
iconWidth: 13,
iconHeight: 13,
type: "bi.tree_group_node_checkbox"
});
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
value: o.value,
py: o.py,
keyword: o.keyword
});
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {
self.setSelected(self.isSelected());
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);
var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {
width: 25,
el: this.checkbox
}, this.text);
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {
items: items
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.TriangleGroupNode.superclass.doClick.apply(this, arguments);
this.checkbox.setSelected(this.isOpened());
},
setOpened: function (v) {
BI.TriangleGroupNode.superclass.setOpened.apply(this, arguments);
this.checkbox.setSelected(v);
},
setText: function (text) {
BI.TriangleGroupNode.superclass.setText.apply(this, arguments);
this.text.setText(text);
}
});
BI.shortcut("bi.triangle_group_node", BI.TriangleGroupNode);/**
* guy
* 复选框item
* @type {*|void|Object}
@ -66315,7 +66233,7 @@ BI.shortcut("bi.complex_canvas", BI.ComplexCanvas);/**
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-arrow-tree-group-node"
extraCls: "bi-arrow-group-node-checkbox"
});
},
_init: function () {
@ -66330,7 +66248,7 @@ BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
}
}
});
BI.shortcut("bi.arrow_tree_group_node_checkbox", BI.ArrowTreeGroupNodeCheckbox);/**
BI.shortcut("bi.arrow_group_node_checkbox", BI.ArrowTreeGroupNodeCheckbox);/**
* 十字型的树节点
* @class BI.CheckingMarkNode
* @extends BI.IconButton
@ -66434,31 +66352,6 @@ BI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, {
}
});
BI.shortcut("bi.mid_tree_node_checkbox", BI.MidTreeNodeCheckbox);/**
* 三角形的树节点
* Created by GUY on 2015/9/6.
* @class BI.TreeGroupNodeCheckbox
* @extends BI.IconButton
*/
BI.TreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend( BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "tree-node-triangle-collapse-font"
});
},
_init: function () {
BI.TreeGroupNodeCheckbox.superclass._init.apply(this, arguments);
},
setSelected: function (v) {
BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v) {
this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font");
} else {
this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font");
}
}
});
BI.shortcut("bi.tree_group_node_checkbox", BI.TreeGroupNodeCheckbox);/**
* 十字型的树节点
* @class BI.TreeNodeCheckbox
* @extends BI.IconButton

40
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

2
src/case/button/node/node.arrow.js

@ -19,7 +19,7 @@ BI.ArrowNode = BI.inherit(BI.NodeButton, {
var self = this, o = this.options;
BI.ArrowNode.superclass._init.apply(this, arguments);
this.checkbox = BI.createWidget({
type: "bi.arrow_tree_group_node_checkbox",
type: "bi.arrow_group_node_checkbox",
iconWidth: 13,
iconHeight: 13
});

83
src/case/button/node/node.triangle.js

@ -1,83 +0,0 @@
/**
* 三角号表示的组节点
* Created by GUY on 2015/9/6.
* @class BI.TriangleGroupNode
* @extends BI.NodeButton
*/
BI.TriangleGroupNode = BI.inherit(BI.NodeButton, {
_defaultConfig: function () {
var conf = BI.TriangleGroupNode.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-triangle-group-node bi-list-item",
logic: {
dynamic: false
},
id: "",
pId: "",
open: false,
height: 25
});
},
_init: function () {
BI.TriangleGroupNode.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.checkbox = BI.createWidget({
iconWidth: 13,
iconHeight: 13,
type: "bi.tree_group_node_checkbox"
});
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
value: o.value,
py: o.py,
keyword: o.keyword
});
this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {
if (type === BI.Events.CLICK) {
self.setSelected(self.isSelected());
}
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);
var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {
width: 25,
el: this.checkbox
}, this.text);
BI.createWidget(BI.extend({
element: this
}, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {
items: items
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.TriangleGroupNode.superclass.doClick.apply(this, arguments);
this.checkbox.setSelected(this.isOpened());
},
setOpened: function (v) {
BI.TriangleGroupNode.superclass.setOpened.apply(this, arguments);
this.checkbox.setSelected(v);
},
setText: function (text) {
BI.TriangleGroupNode.superclass.setText.apply(this, arguments);
this.text.setText(text);
}
});
BI.shortcut("bi.triangle_group_node", BI.TriangleGroupNode);

4
src/case/checkbox/check.arrowtreegroupnode.js → src/case/checkbox/check.arrownode.js

@ -5,7 +5,7 @@
BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-arrow-tree-group-node"
extraCls: "bi-arrow-group-node-checkbox"
});
},
_init: function () {
@ -20,4 +20,4 @@ BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
}
}
});
BI.shortcut("bi.arrow_tree_group_node_checkbox", BI.ArrowTreeGroupNodeCheckbox);
BI.shortcut("bi.arrow_group_node_checkbox", BI.ArrowTreeGroupNodeCheckbox);

26
src/case/checkbox/check.treegroupnode.js

@ -1,26 +0,0 @@
/**
* 三角形的树节点
* Created by GUY on 2015/9/6.
* @class BI.TreeGroupNodeCheckbox
* @extends BI.IconButton
*/
BI.TreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {
_defaultConfig: function () {
return BI.extend( BI.TreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {
extraCls: "tree-node-triangle-collapse-font"
});
},
_init: function () {
BI.TreeGroupNodeCheckbox.superclass._init.apply(this, arguments);
},
setSelected: function (v) {
BI.TreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);
if(v) {
this.element.removeClass("tree-node-triangle-collapse-font").addClass("tree-node-triangle-expand-font");
} else {
this.element.removeClass("tree-node-triangle-expand-font").addClass("tree-node-triangle-collapse-font");
}
}
});
BI.shortcut("bi.tree_group_node_checkbox", BI.TreeGroupNodeCheckbox);
Loading…
Cancel
Save