|
@@ -68,22 +68,24 @@ export function init() {
|
|
|
*/
|
|
|
const _doAddListener = Ext.mixin.Observable.prototype.doAddListener
|
|
|
Ext.mixin.Observable.prototype.doAddListener = function (ename, fn, scope, options, order, caller, manager) {
|
|
|
- if (window["IS_DESIGN_MODE"]) {
|
|
|
- fn = Ext.emptyFn
|
|
|
-
|
|
|
- } else if (typeof fn === 'string' &&
|
|
|
+ if (typeof fn === 'string' &&
|
|
|
(_.startsWith(fn, 'scope.') ||
|
|
|
_.startsWith(fn, 'system.') ||
|
|
|
_.startsWith(fn, 'format.')
|
|
|
)) {
|
|
|
- // console.log('doAddListener', ename, fn, scope, options, order, caller, manager)
|
|
|
- // const vm = this.lookupViewModel()
|
|
|
- // if (vm && vm.yvanScope) {
|
|
|
- // scope = vm.yvanScope
|
|
|
- // fn = scope[fn.substr('scope.'.length)]
|
|
|
- // }
|
|
|
- scope = lookupScope(this)
|
|
|
- fn = lookupFn(scope, fn)
|
|
|
+
|
|
|
+ if (window["IS_DESIGN_MODE"]) {
|
|
|
+ fn = Ext.emptyFn
|
|
|
+ } else {
|
|
|
+ // console.log('doAddListener', ename, fn, scope, options, order, caller, manager)
|
|
|
+ // const vm = this.lookupViewModel()
|
|
|
+ // if (vm && vm.yvanScope) {
|
|
|
+ // scope = vm.yvanScope
|
|
|
+ // fn = scope[fn.substr('scope.'.length)]
|
|
|
+ // }
|
|
|
+ scope = lookupScope(this)
|
|
|
+ fn = lookupFn(scope, fn)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
_doAddListener.call(this, ename, fn, scope, options, order, caller, manager)
|