property inheritance: allow referring to a parent using its and fix infinite loop when editing (issue #122)
This commit is contained in:
parent
b0d5a8e06b
commit
6cd29dbdd8
2 changed files with 13 additions and 1 deletions
|
|
@ -36,6 +36,8 @@ var updateDom = function(container,data, remote) {
|
|||
}
|
||||
}
|
||||
|
||||
purgeStores(oldWidgets)
|
||||
|
||||
// widget
|
||||
var newContainer = parser.parse([data], container[0].abstract.parentNode, container[0].abstract.parent)
|
||||
container.replaceWith(newContainer)
|
||||
|
|
@ -50,7 +52,6 @@ var updateDom = function(container,data, remote) {
|
|||
|
||||
newContainer.trigger('resize')
|
||||
|
||||
purgeStores(oldWidgets)
|
||||
|
||||
|
||||
// restore state
|
||||
|
|
|
|||
|
|
@ -159,6 +159,17 @@ module.exports = class _widgets_base {
|
|||
[this.parent] : id == 'this' ? [this] :
|
||||
widgetManager.getWidgetById(id)
|
||||
|
||||
if (!widgets.length) {
|
||||
var parent = this.parent
|
||||
while (parent) {
|
||||
if (parent.getProp('id') == id) {
|
||||
widgets.push(parent)
|
||||
storeLinks = false
|
||||
break
|
||||
}
|
||||
parent = parent.parent
|
||||
}
|
||||
}
|
||||
|
||||
for (var i in widgets) {
|
||||
if (widgets[i].props.hasOwnProperty(k) || k == '_value') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue