dialogOf: deal with both raw DOM elements and widgets
This commit is contained in:
parent
20fb056323
commit
a72171f8ef
|
@ -54,8 +54,12 @@ const App = {
|
|||
elem.offsetTop >= ctr.scrollTop;
|
||||
}
|
||||
},
|
||||
dialogOf: function (widget) {
|
||||
return dijit.getEnclosingWidget(widget.domNode.closest('.dijitDialog'));
|
||||
dialogOf: function (elem) {
|
||||
|
||||
// elem could be a Dijit widget
|
||||
elem = elem.domNode ? elem.domNode : elem;
|
||||
|
||||
return dijit.getEnclosingWidget(elem.closest('.dijitDialog'));
|
||||
},
|
||||
label_to_feed_id: function(label) {
|
||||
return this.LABEL_BASE_INDEX - 1 - Math.abs(label);
|
||||
|
|
Loading…
Reference in New Issue