Browse Source

Merge pull request #240 in FUI/fineui from ~GUY/fineui:master to master

* commit 'a01232dbf51e409d111a87de5e18094e480f5b16':
  去掉relationview中关于preview,doredmark的公共方法以及功能性的接口
es6
guy 7 years ago
parent
commit
d0447e9958
  1. 41
      demo/js/widget/relationview/demo.relationview.js
  2. 6
      dist/bundle.css
  3. 73
      dist/bundle.js
  4. 41
      dist/demo.js
  5. 6
      dist/fineui.css
  6. 73
      dist/fineui.js
  7. 6
      dist/widget.css
  8. 73
      dist/widget.js
  9. 3
      src/css/widget/relationview/relationview.css
  10. 3
      src/css/widget/relationview/relationview.region.css
  11. 3
      src/less/widget/relationview/relationview.region.less
  12. 43
      src/widget/relationview/relationview.js
  13. 11
      src/widget/relationview/relationview.region.container.js
  14. 19
      src/widget/relationview/relationview.region.js

41
demo/js/widget/relationview/demo.relationview.js

@ -21,39 +21,47 @@ Demo.RelationView = BI.inherit(BI.Widget, {
//disabled: true,
handler: function () {
alert("d");
}
},
keyword: "A",
isView: true
},
foreign: {region: "C", text: ["try", "try1"], value: "c1"}
foreign: {region: "C", text: ["try", "try1"], value: "c1", keyword: "A"}
},
{
primary: {region: "A", value: "a1", text: "a1字段"},
foreign: {region: "C", value: "c2", text: "c2字段"}
primary: {region: "A", value: "a1", text: "a1字段", keyword: "A"},
foreign: {region: "C", value: "c2", text: "c2字段", keyword: "A"}
},
{
primary: {region: "C", value: "c3", text: "c3字段"},
foreign: {region: "D", value: "d1", text: "d1字段"}
primary: {region: "C", value: "c3", text: "c3字段", keyword: "A"},
foreign: {region: "D", value: "d1", text: "d1字段", keyword: "A"}
},
{
primary: {region: "A", value: "a1", text: "a1字段"},
foreign: {region: "B", value: "b1", text: "b1字段"}
primary: {region: "A", value: "a1", text: "a1字段", keyword: "A"},
foreign: {region: "B", value: "b1", text: "b1字段", keyword: "A"}
},
{
primary: {region: "X", value: "x1", text: "x1字段"},
foreign: {region: "Y", value: "y1", text: "y1字段"}
primary: {region: "X", value: "x1", text: "x1字段", keyword: "A"},
foreign: {region: "Y", value: "y1", text: "y1字段", keyword: "A"}
},
{
primary: {region: "X", value: "x2", text: "x2字段"},
foreign: {region: "Z", value: "z1", text: "z1字段"}
primary: {region: "X", value: "x2", text: "x2字段", keyword: "A"},
foreign: {region: "Z", value: "z1", text: "z1字段", keyword: "A"}
},
{
primary: {region: "X", value: "x2", text: "x2字段"},
foreign: {region: "B", value: "b1", text: "b1字段"}
primary: {region: "X", value: "x2", text: "x2字段", keyword: "A"},
foreign: {region: "B", value: "b1", text: "b1字段", keyword: "A"}
},
{
primary: {region: "X33"}
primary: {region: "X33", keyword: "A"}
}
],
listeners: [{
eventName: "EVENT_PREVIEW",
action: function (tableName, show) {
console.log(tableName + ": " + show);
}
]
}]
});
return {
type: "bi.float_center_adapt",
@ -63,7 +71,6 @@ Demo.RelationView = BI.inherit(BI.Widget, {
};
},
mounted: function () {
this.relationview.doRedMark("A")
}
});
BI.shortcut("demo.relation_view", Demo.RelationView);

6
dist/bundle.css vendored

@ -4489,9 +4489,6 @@ ul.ztree.zTreeDragUL {
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye {
font-size: 16px;
}
@ -4507,9 +4504,6 @@ ul.ztree.zTreeDragUL {
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye {
font-size: 16px;
}

73
dist/bundle.js vendored

@ -91664,41 +91664,6 @@ BI.RelationView = BI.inherit(BI.Widget, {
});
},
previewRelationTables: function (relationTables, show) {
if (!show) {
BI.each(this.storeViews, function (i, view) {
view.toggleRegion(true);
view.setPreviewSelected(false);
});
BI.each(this.lines, function (i, lines) {
BI.each(lines, function (j, line) {
line.show();
});
});
return;
}
BI.each(this.storeViews, function (id, view) {
if (!relationTables.contains(id)) {
view.toggleRegion(false);
} else {
view.setPreviewSelected(true);
}
});
BI.each(this.lines, function (id, lines) {
BI.each(lines, function (cId, line) {
if (!relationTables.contains(id) || !relationTables.contains(cId)) {
line.hide();
}
});
});
},
doRedMark: function (keyword) {
BI.each(this.storeViews, function (idx, view) {
view.doRedMark(keyword);
});
},
populate: function (items) {
var self = this, o = this.options, c = this._const;
o.items = items || [];
@ -91763,13 +91728,11 @@ BI.RelationView = BI.inherit(BI.Widget, {
header: items[0].regionTitle,
text: items.length > 0 ? items[0].regionText : "",
handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn,
isView: items[0].isView,
keyword: items[0].keyword,
items: items,
disabled: items[0].disabled,
belongPackage: items.length > 0 ? items[0].belongPackage : true
disabled: items[0].disabled
});
if (BI.isNotNull(items[0]) && BI.isNotNull(items[0].keyword)) {
views[i][j].doRedMark(items[0].keyword);
}
views[i][j].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN, function (v) {
self._hoverIn(v);
});
@ -91937,7 +91900,8 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, {
handler: o.handler,
disabled: o.disabled,
items: o.items,
belongPackage: o.belongPackage
isView: o.isView,
keyword: o.keyword
});
this.region.on(BI.RelationViewRegion.EVENT_PREVIEW, function (v) {
self.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW, v);
@ -91957,14 +91921,6 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, {
});
},
doRedMark: function () {
this.region.doRedMark.apply(this.region, arguments);
},
unRedMark: function () {
this.region.unRedMark.apply(this.region, arguments);
},
getWidth: function () {
return this.region.getWidth();
},
@ -92025,8 +91981,7 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
text: "",
value: "",
header: "",
items: [],
belongPackage: true
items: []
});
},
@ -92039,7 +91994,8 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
cls: "eye relation-table-preview-font",
width: 36,
height: 24,
stopPropagation: true
stopPropagation: true,
selected: o.isView
});
this.preview.on(BI.IconButton.EVENT_CHANGE, function () {
self.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW, this.isSelected());
@ -92052,7 +92008,8 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
text: o.text,
value: o.value,
textAlign: "left",
disabled: o.disabled
disabled: o.disabled,
keyword: o.keyword
});
// title放body上
if (BI.isKey(o.header)) {
@ -92074,7 +92031,7 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
element: this,
items: [{
type: "bi.vertical",
cls: "relation-view-region-container bi-card bi-border " + (o.belongPackage ? "" : "other-package"),
cls: "relation-view-region-container bi-card bi-border",
items: [{
type: "bi.vertical_adapt",
cls: "relation-view-region-title bi-border-bottom bi-background",
@ -92106,14 +92063,6 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
});
},
doRedMark: function () {
this.title.doRedMark.apply(this.title, arguments);
},
unRedMark: function () {
this.title.unRedMark.apply(this.title, arguments);
},
getWidth: function () {
return this.options.width;
},

41
dist/demo.js vendored

@ -13202,39 +13202,47 @@ Demo.RelationView = BI.inherit(BI.Widget, {
//disabled: true,
handler: function () {
alert("d");
}
},
keyword: "A",
isView: true
},
foreign: {region: "C", text: ["try", "try1"], value: "c1"}
foreign: {region: "C", text: ["try", "try1"], value: "c1", keyword: "A"}
},
{
primary: {region: "A", value: "a1", text: "a1字段"},
foreign: {region: "C", value: "c2", text: "c2字段"}
primary: {region: "A", value: "a1", text: "a1字段", keyword: "A"},
foreign: {region: "C", value: "c2", text: "c2字段", keyword: "A"}
},
{
primary: {region: "C", value: "c3", text: "c3字段"},
foreign: {region: "D", value: "d1", text: "d1字段"}
primary: {region: "C", value: "c3", text: "c3字段", keyword: "A"},
foreign: {region: "D", value: "d1", text: "d1字段", keyword: "A"}
},
{
primary: {region: "A", value: "a1", text: "a1字段"},
foreign: {region: "B", value: "b1", text: "b1字段"}
primary: {region: "A", value: "a1", text: "a1字段", keyword: "A"},
foreign: {region: "B", value: "b1", text: "b1字段", keyword: "A"}
},
{
primary: {region: "X", value: "x1", text: "x1字段"},
foreign: {region: "Y", value: "y1", text: "y1字段"}
primary: {region: "X", value: "x1", text: "x1字段", keyword: "A"},
foreign: {region: "Y", value: "y1", text: "y1字段", keyword: "A"}
},
{
primary: {region: "X", value: "x2", text: "x2字段"},
foreign: {region: "Z", value: "z1", text: "z1字段"}
primary: {region: "X", value: "x2", text: "x2字段", keyword: "A"},
foreign: {region: "Z", value: "z1", text: "z1字段", keyword: "A"}
},
{
primary: {region: "X", value: "x2", text: "x2字段"},
foreign: {region: "B", value: "b1", text: "b1字段"}
primary: {region: "X", value: "x2", text: "x2字段", keyword: "A"},
foreign: {region: "B", value: "b1", text: "b1字段", keyword: "A"}
},
{
primary: {region: "X33"}
primary: {region: "X33", keyword: "A"}
}
]
],
listeners: [{
eventName: "EVENT_PREVIEW",
action: function (tableName, show) {
console.log(tableName + ": " + show);
}
}]
});
return {
type: "bi.float_center_adapt",
@ -13244,7 +13252,6 @@ Demo.RelationView = BI.inherit(BI.Widget, {
};
},
mounted: function () {
this.relationview.doRedMark("A")
}
});
BI.shortcut("demo.relation_view", Demo.RelationView);/**

6
dist/fineui.css vendored

@ -4489,9 +4489,6 @@ ul.ztree.zTreeDragUL {
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye {
font-size: 16px;
}
@ -4507,9 +4504,6 @@ ul.ztree.zTreeDragUL {
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye {
font-size: 16px;
}

73
dist/fineui.js vendored

@ -93418,41 +93418,6 @@ BI.RelationView = BI.inherit(BI.Widget, {
});
},
previewRelationTables: function (relationTables, show) {
if (!show) {
BI.each(this.storeViews, function (i, view) {
view.toggleRegion(true);
view.setPreviewSelected(false);
});
BI.each(this.lines, function (i, lines) {
BI.each(lines, function (j, line) {
line.show();
});
});
return;
}
BI.each(this.storeViews, function (id, view) {
if (!relationTables.contains(id)) {
view.toggleRegion(false);
} else {
view.setPreviewSelected(true);
}
});
BI.each(this.lines, function (id, lines) {
BI.each(lines, function (cId, line) {
if (!relationTables.contains(id) || !relationTables.contains(cId)) {
line.hide();
}
});
});
},
doRedMark: function (keyword) {
BI.each(this.storeViews, function (idx, view) {
view.doRedMark(keyword);
});
},
populate: function (items) {
var self = this, o = this.options, c = this._const;
o.items = items || [];
@ -93517,13 +93482,11 @@ BI.RelationView = BI.inherit(BI.Widget, {
header: items[0].regionTitle,
text: items.length > 0 ? items[0].regionText : "",
handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn,
isView: items[0].isView,
keyword: items[0].keyword,
items: items,
disabled: items[0].disabled,
belongPackage: items.length > 0 ? items[0].belongPackage : true
disabled: items[0].disabled
});
if (BI.isNotNull(items[0]) && BI.isNotNull(items[0].keyword)) {
views[i][j].doRedMark(items[0].keyword);
}
views[i][j].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN, function (v) {
self._hoverIn(v);
});
@ -93691,7 +93654,8 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, {
handler: o.handler,
disabled: o.disabled,
items: o.items,
belongPackage: o.belongPackage
isView: o.isView,
keyword: o.keyword
});
this.region.on(BI.RelationViewRegion.EVENT_PREVIEW, function (v) {
self.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW, v);
@ -93711,14 +93675,6 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, {
});
},
doRedMark: function () {
this.region.doRedMark.apply(this.region, arguments);
},
unRedMark: function () {
this.region.unRedMark.apply(this.region, arguments);
},
getWidth: function () {
return this.region.getWidth();
},
@ -93779,8 +93735,7 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
text: "",
value: "",
header: "",
items: [],
belongPackage: true
items: []
});
},
@ -93793,7 +93748,8 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
cls: "eye relation-table-preview-font",
width: 36,
height: 24,
stopPropagation: true
stopPropagation: true,
selected: o.isView
});
this.preview.on(BI.IconButton.EVENT_CHANGE, function () {
self.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW, this.isSelected());
@ -93806,7 +93762,8 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
text: o.text,
value: o.value,
textAlign: "left",
disabled: o.disabled
disabled: o.disabled,
keyword: o.keyword
});
// title放body上
if (BI.isKey(o.header)) {
@ -93828,7 +93785,7 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
element: this,
items: [{
type: "bi.vertical",
cls: "relation-view-region-container bi-card bi-border " + (o.belongPackage ? "" : "other-package"),
cls: "relation-view-region-container bi-card bi-border",
items: [{
type: "bi.vertical_adapt",
cls: "relation-view-region-title bi-border-bottom bi-background",
@ -93860,14 +93817,6 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
});
},
doRedMark: function () {
this.title.doRedMark.apply(this.title, arguments);
},
unRedMark: function () {
this.title.unRedMark.apply(this.title, arguments);
},
getWidth: function () {
return this.options.width;
},

6
dist/widget.css vendored

@ -389,9 +389,6 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye {
font-size: 16px;
}
@ -407,9 +404,6 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye {
font-size: 16px;
}

73
dist/widget.js vendored

@ -15061,41 +15061,6 @@ BI.RelationView = BI.inherit(BI.Widget, {
});
},
previewRelationTables: function (relationTables, show) {
if (!show) {
BI.each(this.storeViews, function (i, view) {
view.toggleRegion(true);
view.setPreviewSelected(false);
});
BI.each(this.lines, function (i, lines) {
BI.each(lines, function (j, line) {
line.show();
});
});
return;
}
BI.each(this.storeViews, function (id, view) {
if (!relationTables.contains(id)) {
view.toggleRegion(false);
} else {
view.setPreviewSelected(true);
}
});
BI.each(this.lines, function (id, lines) {
BI.each(lines, function (cId, line) {
if (!relationTables.contains(id) || !relationTables.contains(cId)) {
line.hide();
}
});
});
},
doRedMark: function (keyword) {
BI.each(this.storeViews, function (idx, view) {
view.doRedMark(keyword);
});
},
populate: function (items) {
var self = this, o = this.options, c = this._const;
o.items = items || [];
@ -15160,13 +15125,11 @@ BI.RelationView = BI.inherit(BI.Widget, {
header: items[0].regionTitle,
text: items.length > 0 ? items[0].regionText : "",
handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn,
isView: items[0].isView,
keyword: items[0].keyword,
items: items,
disabled: items[0].disabled,
belongPackage: items.length > 0 ? items[0].belongPackage : true
disabled: items[0].disabled
});
if (BI.isNotNull(items[0]) && BI.isNotNull(items[0].keyword)) {
views[i][j].doRedMark(items[0].keyword);
}
views[i][j].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN, function (v) {
self._hoverIn(v);
});
@ -15334,7 +15297,8 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, {
handler: o.handler,
disabled: o.disabled,
items: o.items,
belongPackage: o.belongPackage
isView: o.isView,
keyword: o.keyword
});
this.region.on(BI.RelationViewRegion.EVENT_PREVIEW, function (v) {
self.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW, v);
@ -15354,14 +15318,6 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, {
});
},
doRedMark: function () {
this.region.doRedMark.apply(this.region, arguments);
},
unRedMark: function () {
this.region.unRedMark.apply(this.region, arguments);
},
getWidth: function () {
return this.region.getWidth();
},
@ -15422,8 +15378,7 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
text: "",
value: "",
header: "",
items: [],
belongPackage: true
items: []
});
},
@ -15436,7 +15391,8 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
cls: "eye relation-table-preview-font",
width: 36,
height: 24,
stopPropagation: true
stopPropagation: true,
selected: o.isView
});
this.preview.on(BI.IconButton.EVENT_CHANGE, function () {
self.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW, this.isSelected());
@ -15449,7 +15405,8 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
text: o.text,
value: o.value,
textAlign: "left",
disabled: o.disabled
disabled: o.disabled,
keyword: o.keyword
});
// title放body上
if (BI.isKey(o.header)) {
@ -15471,7 +15428,7 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
element: this,
items: [{
type: "bi.vertical",
cls: "relation-view-region-container bi-card bi-border " + (o.belongPackage ? "" : "other-package"),
cls: "relation-view-region-container bi-card bi-border",
items: [{
type: "bi.vertical_adapt",
cls: "relation-view-region-title bi-border-bottom bi-background",
@ -15503,14 +15460,6 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
});
},
doRedMark: function () {
this.title.doRedMark.apply(this.title, arguments);
},
unRedMark: function () {
this.title.unRedMark.apply(this.title, arguments);
},
getWidth: function () {
return this.options.width;
},

3
src/css/widget/relationview/relationview.css

@ -8,9 +8,6 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye {
font-size: 16px;
}

3
src/css/widget/relationview/relationview.region.css

@ -4,9 +4,6 @@
-moz-border-radius: 2px;
border-radius: 2px;
}
.bi-relation-view-region .relation-view-region-container.other-package {
border-style: dashed;
}
.bi-relation-view-region .relation-view-region-container .relation-view-region-title .eye {
font-size: 16px;
}

3
src/less/widget/relationview/relationview.region.less

@ -2,9 +2,6 @@
.bi-relation-view-region {
& .relation-view-region-container {
&.other-package {
border-style: dashed;
}
z-index: 1;
.border-radius(2px);
& .relation-view-region-title {

43
src/widget/relationview/relationview.js

@ -73,41 +73,6 @@ BI.RelationView = BI.inherit(BI.Widget, {
});
},
previewRelationTables: function (relationTables, show) {
if (!show) {
BI.each(this.storeViews, function (i, view) {
view.toggleRegion(true);
view.setPreviewSelected(false);
});
BI.each(this.lines, function (i, lines) {
BI.each(lines, function (j, line) {
line.show();
});
});
return;
}
BI.each(this.storeViews, function (id, view) {
if (!relationTables.contains(id)) {
view.toggleRegion(false);
} else {
view.setPreviewSelected(true);
}
});
BI.each(this.lines, function (id, lines) {
BI.each(lines, function (cId, line) {
if (!relationTables.contains(id) || !relationTables.contains(cId)) {
line.hide();
}
});
});
},
doRedMark: function (keyword) {
BI.each(this.storeViews, function (idx, view) {
view.doRedMark(keyword);
});
},
populate: function (items) {
var self = this, o = this.options, c = this._const;
o.items = items || [];
@ -172,13 +137,11 @@ BI.RelationView = BI.inherit(BI.Widget, {
header: items[0].regionTitle,
text: items.length > 0 ? items[0].regionText : "",
handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn,
isView: items[0].isView,
keyword: items[0].keyword,
items: items,
disabled: items[0].disabled,
belongPackage: items.length > 0 ? items[0].belongPackage : true
disabled: items[0].disabled
});
if (BI.isNotNull(items[0]) && BI.isNotNull(items[0].keyword)) {
views[i][j].doRedMark(items[0].keyword);
}
views[i][j].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN, function (v) {
self._hoverIn(v);
});

11
src/widget/relationview/relationview.region.container.js

@ -21,7 +21,8 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, {
handler: o.handler,
disabled: o.disabled,
items: o.items,
belongPackage: o.belongPackage
isView: o.isView,
keyword: o.keyword
});
this.region.on(BI.RelationViewRegion.EVENT_PREVIEW, function (v) {
self.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW, v);
@ -41,14 +42,6 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, {
});
},
doRedMark: function () {
this.region.doRedMark.apply(this.region, arguments);
},
unRedMark: function () {
this.region.unRedMark.apply(this.region, arguments);
},
getWidth: function () {
return this.region.getWidth();
},

19
src/widget/relationview/relationview.region.js

@ -14,8 +14,7 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
text: "",
value: "",
header: "",
items: [],
belongPackage: true
items: []
});
},
@ -28,7 +27,8 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
cls: "eye relation-table-preview-font",
width: 36,
height: 24,
stopPropagation: true
stopPropagation: true,
selected: o.isView
});
this.preview.on(BI.IconButton.EVENT_CHANGE, function () {
self.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW, this.isSelected());
@ -41,7 +41,8 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
text: o.text,
value: o.value,
textAlign: "left",
disabled: o.disabled
disabled: o.disabled,
keyword: o.keyword
});
// title放body上
if (BI.isKey(o.header)) {
@ -63,7 +64,7 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
element: this,
items: [{
type: "bi.vertical",
cls: "relation-view-region-container bi-card bi-border " + (o.belongPackage ? "" : "other-package"),
cls: "relation-view-region-container bi-card bi-border",
items: [{
type: "bi.vertical_adapt",
cls: "relation-view-region-title bi-border-bottom bi-background",
@ -95,14 +96,6 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, {
});
},
doRedMark: function () {
this.title.doRedMark.apply(this.title, arguments);
},
unRedMark: function () {
this.title.unRedMark.apply(this.title, arguments);
},
getWidth: function () {
return this.options.width;
},

Loading…
Cancel
Save