From 1e9e266bcca24e34a57b964707326096c7e2ec08 Mon Sep 17 00:00:00 2001 From: edward Date: Tue, 5 Jan 2016 13:32:15 +0800 Subject: [PATCH] roojs-core.js roojs-core-debug.js roojs-ui.js roojs-ui-debug.js roojs-all.js roojs-debug.js --- roojs-all.js | 2 +- roojs-core-debug.js | 2 +- roojs-core.js | 2 +- roojs-debug.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roojs-all.js b/roojs-all.js index 6f670ed9ce..97978deb6f 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -240,7 +240,7 @@ C=[];if(B.length<1){E();return;}}var J=new Date().getTime();for(var i=0,I=B.leng B=[];C=[];};};Roo.TaskMgr=new Roo.util.TaskRunner(); //Roo/util/MixedCollection.js Roo.util.MixedCollection=function(A,B){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents({"clear":true,"add":true,"replace":true,"remove":true,"sort":true});this.allowFunctions=A===true;if(B){this.getKey=B;} -Roo.util.MixedCollection.superclass.constructor.call(this);};Roo.extend(Roo.util.MixedCollection,Roo.util.Observable,{allowFunctions:false,add:function(A,o){if(arguments.length==1){o=A;A=this.getKey(o);}if(typeof A=="undefined"||A===null){this.length++;this.items.push(o);this.keys.push(null);}else {var B=this.map[A];if(B){return this.replace(A,o);} +Roo.util.MixedCollection.superclass.constructor.call(this);};Roo.extend(Roo.util.MixedCollection,Roo.util.Observable,{allowFunctions:false,add:function(A,o){if(arguments.length==1){o=arguments[0];A=this.getKey(o);}if(typeof A=="undefined"||A===null){this.length++;this.items.push(o);this.keys.push(null);}else {var B=this.map[A];if(B){return this.replace(A,o);} this.length++;this.items.push(o);this.map[A]=o;this.keys.push(A);} this.fireEvent("add",this.length-1,o,A);return o;},getKey:function(o){return o.id;},replace:function(A,o){if(arguments.length==1){o=arguments[0];A=this.getKey(o);}var B=this.item(A);if(typeof A=="undefined"||A===null||typeof B=="undefined"){return this.add(A,o);}var C=this.indexOfKey(A);this.items[C]=o;this.map[A]=o;this.fireEvent("replace",A,B,o);return o;},addAll:function(A){if(arguments.length>1||A instanceof Array){var B=arguments.length>1?arguments:A;for(var i=0,C=B.length;i=this.length){return this.add(B,o);} this.length++;this.items.splice(A,0,o);if(typeof B!="undefined"&&B!=null){this.map[B]=o;} diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 275b4daa48..6420c7a925 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -12864,7 +12864,7 @@ Roo.extend(Roo.util.MixedCollection, Roo.util.Observable, { */ add : function(key, o){ if(arguments.length == 1){ - o = key; //arguments[0]; + o = arguments[0]; key = this.getKey(o); } if(typeof key == "undefined" || key === null){ diff --git a/roojs-core.js b/roojs-core.js index 21646fe7a8..f1fb865534 100644 --- a/roojs-core.js +++ b/roojs-core.js @@ -240,7 +240,7 @@ C=[];if(B.length<1){E();return;}}var J=new Date().getTime();for(var i=0,I=B.leng B=[];C=[];};};Roo.TaskMgr=new Roo.util.TaskRunner(); //Roo/util/MixedCollection.js Roo.util.MixedCollection=function(A,B){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents({"clear":true,"add":true,"replace":true,"remove":true,"sort":true});this.allowFunctions=A===true;if(B){this.getKey=B;} -Roo.util.MixedCollection.superclass.constructor.call(this);};Roo.extend(Roo.util.MixedCollection,Roo.util.Observable,{allowFunctions:false,add:function(A,o){if(arguments.length==1){o=A;A=this.getKey(o);}if(typeof A=="undefined"||A===null){this.length++;this.items.push(o);this.keys.push(null);}else {var B=this.map[A];if(B){return this.replace(A,o);} +Roo.util.MixedCollection.superclass.constructor.call(this);};Roo.extend(Roo.util.MixedCollection,Roo.util.Observable,{allowFunctions:false,add:function(A,o){if(arguments.length==1){o=arguments[0];A=this.getKey(o);}if(typeof A=="undefined"||A===null){this.length++;this.items.push(o);this.keys.push(null);}else {var B=this.map[A];if(B){return this.replace(A,o);} this.length++;this.items.push(o);this.map[A]=o;this.keys.push(A);} this.fireEvent("add",this.length-1,o,A);return o;},getKey:function(o){return o.id;},replace:function(A,o){if(arguments.length==1){o=arguments[0];A=this.getKey(o);}var B=this.item(A);if(typeof A=="undefined"||A===null||typeof B=="undefined"){return this.add(A,o);}var C=this.indexOfKey(A);this.items[C]=o;this.map[A]=o;this.fireEvent("replace",A,B,o);return o;},addAll:function(A){if(arguments.length>1||A instanceof Array){var B=arguments.length>1?arguments:A;for(var i=0,C=B.length;i=this.length){return this.add(B,o);} this.length++;this.items.splice(A,0,o);if(typeof B!="undefined"&&B!=null){this.map[B]=o;} diff --git a/roojs-debug.js b/roojs-debug.js index a11c9be01e..af20359fd3 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -12864,7 +12864,7 @@ Roo.extend(Roo.util.MixedCollection, Roo.util.Observable, { */ add : function(key, o){ if(arguments.length == 1){ - o = key; //arguments[0]; + o = arguments[0]; key = this.getKey(o); } if(typeof key == "undefined" || key === null){ -- 2.39.2