|
|
@ -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) { |
|
|
|
populate: function (items) { |
|
|
|
var self = this, o = this.options, c = this._const; |
|
|
|
var self = this, o = this.options, c = this._const; |
|
|
|
o.items = items || []; |
|
|
|
o.items = items || []; |
|
|
@ -91763,13 +91728,11 @@ BI.RelationView = BI.inherit(BI.Widget, { |
|
|
|
header: items[0].regionTitle, |
|
|
|
header: items[0].regionTitle, |
|
|
|
text: items.length > 0 ? items[0].regionText : "", |
|
|
|
text: items.length > 0 ? items[0].regionText : "", |
|
|
|
handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn, |
|
|
|
handler: items.length > 0 ? items[0].regionHandler : BI.emptyFn, |
|
|
|
|
|
|
|
isView: items[0].isView, |
|
|
|
|
|
|
|
keyword: items[0].keyword, |
|
|
|
items: items, |
|
|
|
items: items, |
|
|
|
disabled: items[0].disabled, |
|
|
|
disabled: items[0].disabled |
|
|
|
belongPackage: items.length > 0 ? items[0].belongPackage : true |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
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) { |
|
|
|
views[i][j].on(BI.RelationViewRegionContainer.EVENT_HOVER_IN, function (v) { |
|
|
|
self._hoverIn(v); |
|
|
|
self._hoverIn(v); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -91937,7 +91900,8 @@ BI.RelationViewRegionContainer = BI.inherit(BI.Widget, { |
|
|
|
handler: o.handler, |
|
|
|
handler: o.handler, |
|
|
|
disabled: o.disabled, |
|
|
|
disabled: o.disabled, |
|
|
|
items: o.items, |
|
|
|
items: o.items, |
|
|
|
belongPackage: o.belongPackage |
|
|
|
isView: o.isView, |
|
|
|
|
|
|
|
keyword: o.keyword |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.region.on(BI.RelationViewRegion.EVENT_PREVIEW, function (v) { |
|
|
|
this.region.on(BI.RelationViewRegion.EVENT_PREVIEW, function (v) { |
|
|
|
self.fireEvent(BI.RelationViewRegionContainer.EVENT_PREVIEW, 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 () { |
|
|
|
getWidth: function () { |
|
|
|
return this.region.getWidth(); |
|
|
|
return this.region.getWidth(); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -92025,8 +91981,7 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, { |
|
|
|
text: "", |
|
|
|
text: "", |
|
|
|
value: "", |
|
|
|
value: "", |
|
|
|
header: "", |
|
|
|
header: "", |
|
|
|
items: [], |
|
|
|
items: [] |
|
|
|
belongPackage: true |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -92039,7 +91994,8 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, { |
|
|
|
cls: "eye relation-table-preview-font", |
|
|
|
cls: "eye relation-table-preview-font", |
|
|
|
width: 36, |
|
|
|
width: 36, |
|
|
|
height: 24, |
|
|
|
height: 24, |
|
|
|
stopPropagation: true |
|
|
|
stopPropagation: true, |
|
|
|
|
|
|
|
selected: o.isView |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.preview.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
this.preview.on(BI.IconButton.EVENT_CHANGE, function () { |
|
|
|
self.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW, this.isSelected()); |
|
|
|
self.fireEvent(BI.RelationViewRegion.EVENT_PREVIEW, this.isSelected()); |
|
|
@ -92052,7 +92008,8 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, { |
|
|
|
text: o.text, |
|
|
|
text: o.text, |
|
|
|
value: o.value, |
|
|
|
value: o.value, |
|
|
|
textAlign: "left", |
|
|
|
textAlign: "left", |
|
|
|
disabled: o.disabled |
|
|
|
disabled: o.disabled, |
|
|
|
|
|
|
|
keyword: o.keyword |
|
|
|
}); |
|
|
|
}); |
|
|
|
// title放body上
|
|
|
|
// title放body上
|
|
|
|
if (BI.isKey(o.header)) { |
|
|
|
if (BI.isKey(o.header)) { |
|
|
@ -92074,7 +92031,7 @@ BI.RelationViewRegion = BI.inherit(BI.BasicButton, { |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
type: "bi.vertical", |
|
|
|
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: [{ |
|
|
|
items: [{ |
|
|
|
type: "bi.vertical_adapt", |
|
|
|
type: "bi.vertical_adapt", |
|
|
|
cls: "relation-view-region-title bi-border-bottom bi-background", |
|
|
|
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 () { |
|
|
|
getWidth: function () { |
|
|
|
return this.options.width; |
|
|
|
return this.options.width; |
|
|
|
}, |
|
|
|
}, |
|
|
|