Browse Source

Merge pull request #712 in VISUAL/fineui from ~DAILER/fineui:master to master

* commit 'ccc15e2744420a55dde812410d40647d126ad9c4':
  build
  无JIRA任务,isParent 用 parent
es6
Dailer 6 years ago
parent
commit
fa9cccba85
  1. 10
      demo/config.js
  2. 103
      dist/bundle.ie.js
  3. 60
      dist/bundle.ie.min.js
  4. 103
      dist/bundle.js
  5. 60
      dist/bundle.min.js
  6. 5
      dist/case.js
  7. 92
      dist/core.js
  8. 10
      dist/demo.js
  9. 103
      dist/fineui.ie.js
  10. 60
      dist/fineui.ie.min.js
  11. 103
      dist/fineui.js
  12. 60
      dist/fineui.min.js
  13. 6
      dist/widget.js
  14. 2
      src/case/tree/tree.level.js
  15. 3
      src/case/tree/ztree/tree.display.js
  16. 2
      src/widget/multilayerselecttree/multilayerselecttree.leveltree.js
  17. 2
      src/widget/multilayersingletree/multilayersingletree.leveltree.js
  18. 2
      src/widget/selecttree/selecttree.popup.js

10
demo/config.js

@ -1524,13 +1524,19 @@ Demo.CONSTANTS = {
{id: 121, pId: 12, value: "第三级目录1", text: "第三级目录1"}, {id: 121, pId: 12, value: "第三级目录1", text: "第三级目录1"},
{id: 122, pId: 12, value: "第三级文件1", text: "第三级文件1"}, {id: 122, pId: 12, value: "第三级文件1", text: "第三级文件1"},
{id: 1211, pId: 121, value: "第四级目录1", text: "第四级目录1"}, {id: 1211, pId: 121, value: "第四级目录1", text: "第四级目录1"},
{id: 12111, pId: 1211, value: "第五级文件1", text: "第五级文件111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"}, {
id: 12111,
pId: 1211,
value: "第五级文件1",
text: "第五级文件111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
},
{id: 2, pId: -1, value: "第一级目录2", text: "第一级目录2"}, {id: 2, pId: -1, value: "第一级目录2", text: "第一级目录2"},
{id: 21, pId: 2, value: "第二级目录3", text: "第二级目录3"}, {id: 21, pId: 2, value: "第二级目录3", text: "第二级目录3"},
{id: 22, pId: 2, value: "第二级文件2", text: "第二级文件2"}, {id: 22, pId: 2, value: "第二级文件2", text: "第二级文件2"},
{id: 211, pId: 21, value: "第三级目录2", text: "第三级目录2"}, {id: 211, pId: 21, value: "第三级目录2", text: "第三级目录2"},
{id: 212, pId: 21, value: "第三级文件2", text: "第三级文件2"}, {id: 212, pId: 21, value: "第三级文件2", text: "第三级文件2"},
{id: 2111, pId: 211, value: "第四级文件1", text: "第四级文件1"}], {id: 2111, pId: 211, value: "第四级文件1", text: "第四级文件1"},
{id: 3, pId: -1, value: "第一级目录3", text: "第一级目录3", isParent: true}],
LEVELTREE: [{ LEVELTREE: [{
id: 1, id: 1,
text: "第一项", text: "第一项",

103
dist/bundle.ie.js vendored

@ -30382,6 +30382,98 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
} }
}); });
BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout);/** BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout);/**
* 内联布局
* @class BI.InlineCenterAdaptLayout
* @extends BI.Layout
*
* @cfg {JSON} options 配置属性
* @cfg {Number} [hgap=0] 水平间隙
* @cfg {Number} [vgap=0] 垂直间隙
*/
BI.InlineVaerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-inline-center-adapt-layout",
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
BI.InlineVaerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({
whiteSpace: "nowrap",
"text-align": "left"
});
this.populate(this.options.items);
},
_addElement: function (i, item, length) {
var o = this.options;
if (!this.hasWidget(this.getName() + i)) {
var t = BI.createWidget(item);
this.addWidget(this.getName() + i, t);
} else {
var t = this.getWidgetByName(this.getName() + i);
}
t.element.css({
position: "relative",
display: "inline-block",
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
});
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
t.element.css({
"margin-top": (o.vgap || 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
t.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
t.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
t.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return t;
},
resize: function () {
this.stroke(this.options.items);
},
addItem: function (item) {
throw new Error("不能添加元素");
},
stroke: function (items) {
var self = this;
BI.each(items, function (i, item) {
if (item) {
self._addElement(i, item, items.length);
}
});
},
populate: function (items) {
BI.InlineVaerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.vertical_inline_adapt", BI.InlineVaerticalAdaptLayout);/**
* 自适应水平和垂直方向都居中容器 * 自适应水平和垂直方向都居中容器
* @class BI.CenterAdaptLayout * @class BI.CenterAdaptLayout
* @extends BI.Layout * @extends BI.Layout
@ -57327,7 +57419,7 @@ BI.LevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.mid_plus_group_node"; extend.type = "bi.mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.last_plus_group_node"; extend.type = "bi.last_plus_group_node";
@ -57469,7 +57561,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
} }
}; };
function beforeCollapse (treeId, treeNode) { function beforeCollapse(treeId, treeNode) {
return false; return false;
} }
@ -57480,6 +57572,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments); nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
BI.each(nodes, function (i, node) { BI.each(nodes, function (i, node) {
node.isParent = node.isParent || node.parent;
if (node.text == null) { if (node.text == null) {
if (node.count > 0) { if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")"; node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";
@ -64857,7 +64950,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node"; extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_select_tree_last_plus_group_node"; extend.type = "bi.multilayer_select_tree_last_plus_group_node";
@ -65548,7 +65641,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node"; extend.type = "bi.multilayer_single_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_single_tree_last_plus_group_node"; extend.type = "bi.multilayer_single_tree_last_plus_group_node";
@ -74163,7 +74256,7 @@ BI.SelectTreePopup = BI.inherit(BI.Pane, {
var extend = {layer: layer}; var extend = {layer: layer};
node.id = node.id || BI.UUID(); node.id = node.id || BI.UUID();
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.select_tree_mid_plus_group_node"; extend.type = "bi.select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.select_tree_last_plus_group_node"; extend.type = "bi.select_tree_last_plus_group_node";

60
dist/bundle.ie.min.js vendored

File diff suppressed because one or more lines are too long

103
dist/bundle.js vendored

@ -30382,6 +30382,98 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
} }
}); });
BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout);/** BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout);/**
* 内联布局
* @class BI.InlineCenterAdaptLayout
* @extends BI.Layout
*
* @cfg {JSON} options 配置属性
* @cfg {Number} [hgap=0] 水平间隙
* @cfg {Number} [vgap=0] 垂直间隙
*/
BI.InlineVaerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-inline-center-adapt-layout",
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
BI.InlineVaerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({
whiteSpace: "nowrap",
"text-align": "left"
});
this.populate(this.options.items);
},
_addElement: function (i, item, length) {
var o = this.options;
if (!this.hasWidget(this.getName() + i)) {
var t = BI.createWidget(item);
this.addWidget(this.getName() + i, t);
} else {
var t = this.getWidgetByName(this.getName() + i);
}
t.element.css({
position: "relative",
display: "inline-block",
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
});
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
t.element.css({
"margin-top": (o.vgap || 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
t.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
t.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
t.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return t;
},
resize: function () {
this.stroke(this.options.items);
},
addItem: function (item) {
throw new Error("不能添加元素");
},
stroke: function (items) {
var self = this;
BI.each(items, function (i, item) {
if (item) {
self._addElement(i, item, items.length);
}
});
},
populate: function (items) {
BI.InlineVaerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.vertical_inline_adapt", BI.InlineVaerticalAdaptLayout);/**
* 自适应水平和垂直方向都居中容器 * 自适应水平和垂直方向都居中容器
* @class BI.CenterAdaptLayout * @class BI.CenterAdaptLayout
* @extends BI.Layout * @extends BI.Layout
@ -57866,7 +57958,7 @@ BI.LevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.mid_plus_group_node"; extend.type = "bi.mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.last_plus_group_node"; extend.type = "bi.last_plus_group_node";
@ -58008,7 +58100,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
} }
}; };
function beforeCollapse (treeId, treeNode) { function beforeCollapse(treeId, treeNode) {
return false; return false;
} }
@ -58019,6 +58111,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments); nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
BI.each(nodes, function (i, node) { BI.each(nodes, function (i, node) {
node.isParent = node.isParent || node.parent;
if (node.text == null) { if (node.text == null) {
if (node.count > 0) { if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")"; node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";
@ -65396,7 +65489,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node"; extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_select_tree_last_plus_group_node"; extend.type = "bi.multilayer_select_tree_last_plus_group_node";
@ -66087,7 +66180,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node"; extend.type = "bi.multilayer_single_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_single_tree_last_plus_group_node"; extend.type = "bi.multilayer_single_tree_last_plus_group_node";
@ -74702,7 +74795,7 @@ BI.SelectTreePopup = BI.inherit(BI.Pane, {
var extend = {layer: layer}; var extend = {layer: layer};
node.id = node.id || BI.UUID(); node.id = node.id || BI.UUID();
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.select_tree_mid_plus_group_node"; extend.type = "bi.select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.select_tree_last_plus_group_node"; extend.type = "bi.select_tree_last_plus_group_node";

60
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

5
dist/case.js vendored

@ -9004,7 +9004,7 @@ BI.LevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.mid_plus_group_node"; extend.type = "bi.mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.last_plus_group_node"; extend.type = "bi.last_plus_group_node";
@ -9146,7 +9146,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
} }
}; };
function beforeCollapse (treeId, treeNode) { function beforeCollapse(treeId, treeNode) {
return false; return false;
} }
@ -9157,6 +9157,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments); nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
BI.each(nodes, function (i, node) { BI.each(nodes, function (i, node) {
node.isParent = node.isParent || node.parent;
if (node.text == null) { if (node.text == null) {
if (node.count > 0) { if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")"; node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";

92
dist/core.js vendored

@ -30382,6 +30382,98 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
} }
}); });
BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout);/** BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout);/**
* 内联布局
* @class BI.InlineCenterAdaptLayout
* @extends BI.Layout
*
* @cfg {JSON} options 配置属性
* @cfg {Number} [hgap=0] 水平间隙
* @cfg {Number} [vgap=0] 垂直间隙
*/
BI.InlineVaerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-inline-center-adapt-layout",
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
BI.InlineVaerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({
whiteSpace: "nowrap",
"text-align": "left"
});
this.populate(this.options.items);
},
_addElement: function (i, item, length) {
var o = this.options;
if (!this.hasWidget(this.getName() + i)) {
var t = BI.createWidget(item);
this.addWidget(this.getName() + i, t);
} else {
var t = this.getWidgetByName(this.getName() + i);
}
t.element.css({
position: "relative",
display: "inline-block",
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
});
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
t.element.css({
"margin-top": (o.vgap || 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
t.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
t.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
t.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return t;
},
resize: function () {
this.stroke(this.options.items);
},
addItem: function (item) {
throw new Error("不能添加元素");
},
stroke: function (items) {
var self = this;
BI.each(items, function (i, item) {
if (item) {
self._addElement(i, item, items.length);
}
});
},
populate: function (items) {
BI.InlineVaerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.vertical_inline_adapt", BI.InlineVaerticalAdaptLayout);/**
* 自适应水平和垂直方向都居中容器 * 自适应水平和垂直方向都居中容器
* @class BI.CenterAdaptLayout * @class BI.CenterAdaptLayout
* @extends BI.Layout * @extends BI.Layout

10
dist/demo.js vendored

@ -13263,13 +13263,19 @@ Demo.CONSTANTS = {
{id: 121, pId: 12, value: "第三级目录1", text: "第三级目录1"}, {id: 121, pId: 12, value: "第三级目录1", text: "第三级目录1"},
{id: 122, pId: 12, value: "第三级文件1", text: "第三级文件1"}, {id: 122, pId: 12, value: "第三级文件1", text: "第三级文件1"},
{id: 1211, pId: 121, value: "第四级目录1", text: "第四级目录1"}, {id: 1211, pId: 121, value: "第四级目录1", text: "第四级目录1"},
{id: 12111, pId: 1211, value: "第五级文件1", text: "第五级文件111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"}, {
id: 12111,
pId: 1211,
value: "第五级文件1",
text: "第五级文件111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
},
{id: 2, pId: -1, value: "第一级目录2", text: "第一级目录2"}, {id: 2, pId: -1, value: "第一级目录2", text: "第一级目录2"},
{id: 21, pId: 2, value: "第二级目录3", text: "第二级目录3"}, {id: 21, pId: 2, value: "第二级目录3", text: "第二级目录3"},
{id: 22, pId: 2, value: "第二级文件2", text: "第二级文件2"}, {id: 22, pId: 2, value: "第二级文件2", text: "第二级文件2"},
{id: 211, pId: 21, value: "第三级目录2", text: "第三级目录2"}, {id: 211, pId: 21, value: "第三级目录2", text: "第三级目录2"},
{id: 212, pId: 21, value: "第三级文件2", text: "第三级文件2"}, {id: 212, pId: 21, value: "第三级文件2", text: "第三级文件2"},
{id: 2111, pId: 211, value: "第四级文件1", text: "第四级文件1"}], {id: 2111, pId: 211, value: "第四级文件1", text: "第四级文件1"},
{id: 3, pId: -1, value: "第一级目录3", text: "第一级目录3", isParent: true}],
LEVELTREE: [{ LEVELTREE: [{
id: 1, id: 1,
text: "第一项", text: "第一项",

103
dist/fineui.ie.js vendored

@ -30624,6 +30624,98 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
} }
}); });
BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout);/** BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout);/**
* 内联布局
* @class BI.InlineCenterAdaptLayout
* @extends BI.Layout
*
* @cfg {JSON} options 配置属性
* @cfg {Number} [hgap=0] 水平间隙
* @cfg {Number} [vgap=0] 垂直间隙
*/
BI.InlineVaerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-inline-center-adapt-layout",
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
BI.InlineVaerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({
whiteSpace: "nowrap",
"text-align": "left"
});
this.populate(this.options.items);
},
_addElement: function (i, item, length) {
var o = this.options;
if (!this.hasWidget(this.getName() + i)) {
var t = BI.createWidget(item);
this.addWidget(this.getName() + i, t);
} else {
var t = this.getWidgetByName(this.getName() + i);
}
t.element.css({
position: "relative",
display: "inline-block",
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
});
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
t.element.css({
"margin-top": (o.vgap || 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
t.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
t.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
t.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return t;
},
resize: function () {
this.stroke(this.options.items);
},
addItem: function (item) {
throw new Error("不能添加元素");
},
stroke: function (items) {
var self = this;
BI.each(items, function (i, item) {
if (item) {
self._addElement(i, item, items.length);
}
});
},
populate: function (items) {
BI.InlineVaerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.vertical_inline_adapt", BI.InlineVaerticalAdaptLayout);/**
* 自适应水平和垂直方向都居中容器 * 自适应水平和垂直方向都居中容器
* @class BI.CenterAdaptLayout * @class BI.CenterAdaptLayout
* @extends BI.Layout * @extends BI.Layout
@ -57569,7 +57661,7 @@ BI.LevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.mid_plus_group_node"; extend.type = "bi.mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.last_plus_group_node"; extend.type = "bi.last_plus_group_node";
@ -57711,7 +57803,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
} }
}; };
function beforeCollapse (treeId, treeNode) { function beforeCollapse(treeId, treeNode) {
return false; return false;
} }
@ -57722,6 +57814,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments); nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
BI.each(nodes, function (i, node) { BI.each(nodes, function (i, node) {
node.isParent = node.isParent || node.parent;
if (node.text == null) { if (node.text == null) {
if (node.count > 0) { if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")"; node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";
@ -65099,7 +65192,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node"; extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_select_tree_last_plus_group_node"; extend.type = "bi.multilayer_select_tree_last_plus_group_node";
@ -65790,7 +65883,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node"; extend.type = "bi.multilayer_single_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_single_tree_last_plus_group_node"; extend.type = "bi.multilayer_single_tree_last_plus_group_node";
@ -74405,7 +74498,7 @@ BI.SelectTreePopup = BI.inherit(BI.Pane, {
var extend = {layer: layer}; var extend = {layer: layer};
node.id = node.id || BI.UUID(); node.id = node.id || BI.UUID();
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.select_tree_mid_plus_group_node"; extend.type = "bi.select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.select_tree_last_plus_group_node"; extend.type = "bi.select_tree_last_plus_group_node";

60
dist/fineui.ie.min.js vendored

File diff suppressed because one or more lines are too long

103
dist/fineui.js vendored

@ -30624,6 +30624,98 @@ BI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {
} }
}); });
BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout);/** BI.shortcut("bi.absolute_vertical_adapt", BI.AbsoluteVerticalLayout);/**
* 内联布局
* @class BI.InlineCenterAdaptLayout
* @extends BI.Layout
*
* @cfg {JSON} options 配置属性
* @cfg {Number} [hgap=0] 水平间隙
* @cfg {Number} [vgap=0] 垂直间隙
*/
BI.InlineVaerticalAdaptLayout = BI.inherit(BI.Layout, {
props: function () {
return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-inline-center-adapt-layout",
hgap: 0,
vgap: 0,
lgap: 0,
rgap: 0,
tgap: 0,
bgap: 0
});
},
render: function () {
BI.InlineVaerticalAdaptLayout.superclass.render.apply(this, arguments);
this.element.css({
whiteSpace: "nowrap",
"text-align": "left"
});
this.populate(this.options.items);
},
_addElement: function (i, item, length) {
var o = this.options;
if (!this.hasWidget(this.getName() + i)) {
var t = BI.createWidget(item);
this.addWidget(this.getName() + i, t);
} else {
var t = this.getWidgetByName(this.getName() + i);
}
t.element.css({
position: "relative",
display: "inline-block",
"vertical-align": "middle",
"*display": "inline",
"*zoom": 1
});
if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {
t.element.css({
"margin-top": (o.vgap || 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + "px"
});
}
if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {
t.element.css({
"margin-left": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {
t.element.css({
"margin-right": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + "px"
});
}
if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {
t.element.css({
"margin-bottom": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + "px"
});
}
return t;
},
resize: function () {
this.stroke(this.options.items);
},
addItem: function (item) {
throw new Error("不能添加元素");
},
stroke: function (items) {
var self = this;
BI.each(items, function (i, item) {
if (item) {
self._addElement(i, item, items.length);
}
});
},
populate: function (items) {
BI.InlineVaerticalAdaptLayout.superclass.populate.apply(this, arguments);
this._mount();
}
});
BI.shortcut("bi.vertical_inline_adapt", BI.InlineVaerticalAdaptLayout);/**
* 自适应水平和垂直方向都居中容器 * 自适应水平和垂直方向都居中容器
* @class BI.CenterAdaptLayout * @class BI.CenterAdaptLayout
* @extends BI.Layout * @extends BI.Layout
@ -58108,7 +58200,7 @@ BI.LevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.mid_plus_group_node"; extend.type = "bi.mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.last_plus_group_node"; extend.type = "bi.last_plus_group_node";
@ -58250,7 +58342,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
} }
}; };
function beforeCollapse (treeId, treeNode) { function beforeCollapse(treeId, treeNode) {
return false; return false;
} }
@ -58261,6 +58353,7 @@ BI.DisplayTree = BI.inherit(BI.TreeView, {
nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments); nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);
var self = this, o = this.options; var self = this, o = this.options;
BI.each(nodes, function (i, node) { BI.each(nodes, function (i, node) {
node.isParent = node.isParent || node.parent;
if (node.text == null) { if (node.text == null) {
if (node.count > 0) { if (node.count > 0) {
node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")"; node.text = node.value + "(" + BI.i18nText("BI-Basic_Altogether") + node.count + BI.i18nText("BI-Basic_Count") + ")";
@ -65638,7 +65731,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node"; extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_select_tree_last_plus_group_node"; extend.type = "bi.multilayer_select_tree_last_plus_group_node";
@ -66329,7 +66422,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node"; extend.type = "bi.multilayer_single_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_single_tree_last_plus_group_node"; extend.type = "bi.multilayer_single_tree_last_plus_group_node";
@ -74944,7 +75037,7 @@ BI.SelectTreePopup = BI.inherit(BI.Pane, {
var extend = {layer: layer}; var extend = {layer: layer};
node.id = node.id || BI.UUID(); node.id = node.id || BI.UUID();
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.select_tree_mid_plus_group_node"; extend.type = "bi.select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.select_tree_last_plus_group_node"; extend.type = "bi.select_tree_last_plus_group_node";

60
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

6
dist/widget.js vendored

@ -6713,7 +6713,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node"; extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_select_tree_last_plus_group_node"; extend.type = "bi.multilayer_select_tree_last_plus_group_node";
@ -7404,7 +7404,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node"; extend.type = "bi.multilayer_single_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_single_tree_last_plus_group_node"; extend.type = "bi.multilayer_single_tree_last_plus_group_node";
@ -16019,7 +16019,7 @@ BI.SelectTreePopup = BI.inherit(BI.Pane, {
var extend = {layer: layer}; var extend = {layer: layer};
node.id = node.id || BI.UUID(); node.id = node.id || BI.UUID();
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.select_tree_mid_plus_group_node"; extend.type = "bi.select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.select_tree_last_plus_group_node"; extend.type = "bi.select_tree_last_plus_group_node";

2
src/case/tree/tree.level.js

@ -31,7 +31,7 @@ BI.LevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.mid_plus_group_node"; extend.type = "bi.mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.last_plus_group_node"; extend.type = "bi.last_plus_group_node";

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

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

2
src/widget/multilayerselecttree/multilayerselecttree.leveltree.js

@ -30,7 +30,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_select_tree_mid_plus_group_node"; extend.type = "bi.multilayer_select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_select_tree_last_plus_group_node"; extend.type = "bi.multilayer_select_tree_last_plus_group_node";

2
src/widget/multilayersingletree/multilayersingletree.leveltree.js

@ -30,7 +30,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
node.id = BI.UUID(); node.id = BI.UUID();
} }
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.multilayer_single_tree_mid_plus_group_node"; extend.type = "bi.multilayer_single_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.multilayer_single_tree_last_plus_group_node"; extend.type = "bi.multilayer_single_tree_last_plus_group_node";

2
src/widget/selecttree/selecttree.popup.js

@ -20,7 +20,7 @@ BI.SelectTreePopup = BI.inherit(BI.Pane, {
var extend = {layer: layer}; var extend = {layer: layer};
node.id = node.id || BI.UUID(); node.id = node.id || BI.UUID();
extend.pNode = pNode; extend.pNode = pNode;
if (node.isParent === true || BI.isNotEmptyArray(node.children)) { if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {
extend.type = "bi.select_tree_mid_plus_group_node"; extend.type = "bi.select_tree_mid_plus_group_node";
if (i === nodes.length - 1) { if (i === nodes.length - 1) {
extend.type = "bi.select_tree_last_plus_group_node"; extend.type = "bi.select_tree_last_plus_group_node";

Loading…
Cancel
Save