From: Alan Date: Wed, 18 Jan 2023 04:49:25 +0000 (+0800) Subject: callback return value X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=55edcba85e3c5664f07c9d1962f3c5cd3129e282 callback return value --- diff --git a/Roo.js b/Roo.js index 612a227566..aa2de28039 100644 --- a/Roo.js +++ b/Roo.js @@ -505,15 +505,18 @@ Roo.factory(conf, Roo.data); return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1"); }, - // internal - callback : function(cb, scope, args, delay){ - if(typeof cb == "function"){ - if(delay){ - cb.defer(delay, scope, args || []); - }else{ - cb.apply(scope, args || []); - } + // internal (non-delayed, will get a return value..) + callback : function(cb, scope, args, delay) + { + if(typeof cb != "function"){ + return false; + } + if(delay){ + cb.defer(delay, scope, args || []); + return false } + return cb.apply(scope, args || []); + }, /** diff --git a/roojs-all.js b/roojs-all.js index 8d18e03a4d..f722969845 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -13,10 +13,10 @@ i0x10000){bs[0]=0xF }else if(c>0x80){bs[0]=0xC0|((c&0x7C0)>>>6);bs[1]=0x80|(c&0x3F);}else{bs[0]=c;}for(var j=0;j>>4)+nibble_to_hex(b&0x0F);T+='%'+U;}}return T;},urlDecode:function(S,T){if(!S||!S.length){return {};}var U={} ;var V=S.split('&');var W,X,Y;for(var i=0,Z=V.length;i1200:return 'xl';case w>992:return 'lg';case w>768:return 'md';case w>576:return 'sm';default:return 'xs'}}});})();Roo.namespace("Roo","Roo.util","Roo.grid","Roo.dd","Roo.tree","Roo.data","Roo.form","Roo.menu","Roo.state","Roo.lib","Roo.layout","Roo.app","Roo.ux"); diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 932c8c7437..c899eea556 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -505,15 +505,18 @@ Roo.factory(conf, Roo.data); return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1"); }, - // internal - callback : function(cb, scope, args, delay){ - if(typeof cb == "function"){ - if(delay){ - cb.defer(delay, scope, args || []); - }else{ - cb.apply(scope, args || []); - } + // internal (non-delayed, will get a return value..) + callback : function(cb, scope, args, delay) + { + if(typeof cb != "function"){ + return false; + } + if(delay){ + cb.defer(delay, scope, args || []); + return false } + return cb.apply(scope, args || []); + }, /** diff --git a/roojs-core.js b/roojs-core.js index a382ef5e20..611f18b995 100644 --- a/roojs-core.js +++ b/roojs-core.js @@ -13,10 +13,10 @@ i0x10000){bs[0]=0xF }else if(c>0x80){bs[0]=0xC0|((c&0x7C0)>>>6);bs[1]=0x80|(c&0x3F);}else{bs[0]=c;}for(var j=0;j>>4)+nibble_to_hex(b&0x0F);T+='%'+U;}}return T;},urlDecode:function(S,T){if(!S||!S.length){return {};}var U={} ;var V=S.split('&');var W,X,Y;for(var i=0,Z=V.length;i1200:return 'xl';case w>992:return 'lg';case w>768:return 'md';case w>576:return 'sm';default:return 'xs'}}});})();Roo.namespace("Roo","Roo.util","Roo.grid","Roo.dd","Roo.tree","Roo.data","Roo.form","Roo.menu","Roo.state","Roo.lib","Roo.layout","Roo.app","Roo.ux"); diff --git a/roojs-debug.js b/roojs-debug.js index 75b2070a88..7658466239 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -505,15 +505,18 @@ Roo.factory(conf, Roo.data); return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1"); }, - // internal - callback : function(cb, scope, args, delay){ - if(typeof cb == "function"){ - if(delay){ - cb.defer(delay, scope, args || []); - }else{ - cb.apply(scope, args || []); - } + // internal (non-delayed, will get a return value..) + callback : function(cb, scope, args, delay) + { + if(typeof cb != "function"){ + return false; + } + if(delay){ + cb.defer(delay, scope, args || []); + return false } + return cb.apply(scope, args || []); + }, /**