IdSpace¶
-
class
webix.
IdSpace
()¶ Idspace mixin
Referenced by¶
- helpers
toPDF()
.- views
baselayout()
.
External references¶
Code¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | webix.IdSpace = {
$init:function(){
this._elements = {};
this._translate_ids = {};
this.getTopParentView = this._get_self = webix.bind(function(){ return this;}, this);
this._run_inner_init_logic();
this.$ready.push(this._run_after_inner_init_logic);
},
$$:function(id){
return this._elements[id];
},
innerId:function(id){
return this._translate_ids[id];
},
_run_inner_init_logic:function(callback){
this._prev_global_col = webix._global_collection;
webix._global_collection = this;
},
_run_after_inner_init_logic:function(temp){
for (var name in this._elements){
var input = this._elements[name];
if (this.callEvent && input.mapEvent && !input._evs_map.onitemclick)
input.mapEvent({
onitemclick:this
});
input.getTopParentView = this._get_self;
}
webix._global_collection = this._prev_global_col;
this._prev_global_col = 0;
},
_destroy_child:function(id){
delete this._elements[id];
},
ui:function(){
this._run_inner_init_logic();
var temp = webix.ui.apply(webix, arguments);
this._run_after_inner_init_logic();
return temp;
}
};
|