Changeset 3386 for lang/javascript/jsdeferred
- Timestamp:
- 12/21/07 07:21:32 (13 months ago)
- Location:
- lang/javascript/jsdeferred/trunk
- Files:
-
- 5 modified
-
jsdeferred.jquery.js (modified) (2 diffs)
-
jsdeferred.js (modified) (2 diffs)
-
jsdeferred.mini.js (modified) (2 diffs)
-
jsdeferred.nodoc.js (modified) (2 diffs)
-
jsdeferred.userscript.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/jsdeferred/trunk/jsdeferred.jquery.js
r3224 r3386 13 13 fail:function(err){return this._fire("ng",err)}, 14 14 cancel:function(){ 15 (this.canceller || function(){})(); return this.init();},15 (this.canceller || function(){})();if(this._next)this._next.cancel();return this.init();}, 16 16 _post:function(okng,fun){ 17 17 this._next=new Deferred();this._next.callback[okng]=fun;return this._next;}, … … 34 34 }).error(function(e){ 35 35 ret.fail(e);});num++;})(dl[i],i);} 36 if(!num)Deferred.next(function(){ret.call()});return ret;};Deferred.wait=function(n){ 36 if(!num)Deferred.next(function(){ret.call()});ret.canceller=function(){ 37 for(var i in dl){ 38 if(!dl.hasOwnProperty(i))continue;dl[i].cancel();} 39 };return ret;};Deferred.wait=function(n){ 37 40 var d=new Deferred(),t=new Date();var id=setTimeout(function(){ 38 41 clearTimeout(id);d.call((new Date).getTime()-t.getTime());},n*1000) -
lang/javascript/jsdeferred/trunk/jsdeferred.js
r3224 r3386 99 99 cancel : function () { 100 100 (this.canceller || function () {})(); 101 if (this._next) this._next.cancel(); 101 102 return this.init(); 102 103 }, … … 170 171 } 171 172 if (!num) Deferred.next(function () { ret.call() }); 173 ret.canceller = function () { 174 for (var i in dl) { 175 if (!dl.hasOwnProperty(i)) continue; 176 dl[i].cancel(); 177 } 178 }; 172 179 return ret; 173 180 }; -
lang/javascript/jsdeferred/trunk/jsdeferred.mini.js
r3224 r3386 13 13 fail:function(err){return this._fire("ng",err)}, 14 14 cancel:function(){ 15 (this.canceller || function(){})(); return this.init();},15 (this.canceller || function(){})();if(this._next)this._next.cancel();return this.init();}, 16 16 _post:function(okng,fun){ 17 17 this._next=new Deferred();this._next.callback[okng]=fun;return this._next;}, … … 34 34 }).error(function(e){ 35 35 ret.fail(e);});num++;})(dl[i],i);} 36 if(!num)Deferred.next(function(){ret.call()});return ret;};Deferred.wait=function(n){ 36 if(!num)Deferred.next(function(){ret.call()});ret.canceller=function(){ 37 for(var i in dl){ 38 if(!dl.hasOwnProperty(i))continue;dl[i].cancel();} 39 };return ret;};Deferred.wait=function(n){ 37 40 var d=new Deferred(),t=new Date();var id=setTimeout(function(){ 38 41 clearTimeout(id);d.call((new Date).getTime()-t.getTime());},n*1000) -
lang/javascript/jsdeferred/trunk/jsdeferred.nodoc.js
r3224 r3386 19 19 cancel : function () { 20 20 (this.canceller || function () {})(); 21 if (this._next) this._next.cancel(); 21 22 return this.init(); 22 23 }, … … 66 67 } 67 68 if (!num) Deferred.next(function () { ret.call() }); 69 ret.canceller = function () { 70 for (var i in dl) { 71 if (!dl.hasOwnProperty(i)) continue; 72 dl[i].cancel(); 73 } 74 }; 68 75 return ret; 69 76 }; -
lang/javascript/jsdeferred/trunk/jsdeferred.userscript.js
r3224 r3386 23 23 cancel : function () { 24 24 (this.canceller || function () {})(); 25 if (this._next) this._next.cancel(); 25 26 return this.init(); 26 27 }, … … 70 71 } 71 72 if (!num) Deferred.next(function () { ret.call() }); 73 ret.canceller = function () { 74 for (var i in dl) { 75 if (!dl.hasOwnProperty(i)) continue; 76 dl[i].cancel(); 77 } 78 }; 72 79 return ret; 73 80 };
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)