From 66a03b0ec6bd6fe993b5bdb4578cb95cb5308fd3 Mon Sep 17 00:00:00 2001 From: edward Date: Tue, 5 Jan 2016 13:35:10 +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 | 3 ++- roojs-core-debug.js | 3 +++ roojs-core.js | 3 ++- roojs-debug.js | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/roojs-all.js b/roojs-all.js index 97978deb6f..a97ede0340 100644 --- a/roojs-all.js +++ b/roojs-all.js @@ -240,7 +240,8 @@ 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=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);} +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);} +Roo.log(this);Roo.log(o);Roo.log(A);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 6420c7a925..14c977011b 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -12867,6 +12867,9 @@ Roo.extend(Roo.util.MixedCollection, Roo.util.Observable, { o = arguments[0]; key = this.getKey(o); } + Roo.log(this); + Roo.log(o); + Roo.log(key); if(typeof key == "undefined" || key === null){ this.length++; this.items.push(o); diff --git a/roojs-core.js b/roojs-core.js index f1fb865534..2defa5e834 100644 --- a/roojs-core.js +++ b/roojs-core.js @@ -240,7 +240,8 @@ 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=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);} +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);} +Roo.log(this);Roo.log(o);Roo.log(A);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 af20359fd3..a60e3e9af7 100644 --- a/roojs-debug.js +++ b/roojs-debug.js @@ -12867,6 +12867,9 @@ Roo.extend(Roo.util.MixedCollection, Roo.util.Observable, { o = arguments[0]; key = this.getKey(o); } + Roo.log(this); + Roo.log(o); + Roo.log(key); if(typeof key == "undefined" || key === null){ this.length++; this.items.push(o); -- 2.39.2