Roo/data/Store.js
authorjohn <john@roojs.com>
Mon, 26 Mar 2018 05:08:00 +0000 (13:08 +0800)
committerjohn <john@roojs.com>
Mon, 26 Mar 2018 05:08:00 +0000 (13:08 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/data/Store.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 7455fec..35ed11f 100644 (file)
@@ -431,7 +431,7 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, {
             this.insert(0, e);
         }
         
-        Roo.log(options);
+        Roo.log(options.callback);
         
         this.fireEvent("load", this, r, options, o);
         if(options.callback){
index 126248e..d7c1dd1 100644 (file)
@@ -11106,7 +11106,7 @@ Roo.extend(Roo.data.Store, Roo.util.Observable, {
             this.insert(0, e);
         }
         
-        Roo.log(options);
+        Roo.log(options.callback);
         
         this.fireEvent("load", this, r, options, o);
         if(options.callback){
index ddd353d..09f456f 100644 (file)
@@ -440,7 +440,7 @@ for(var i=0,B=A.length;i<B;i++){A[i].join(this);}var C=this.data.length;this.dat
 }},reload:function(A){this.load(Roo.applyIf(A||{},this.lastOptions));},loadRecords:function(o,A,B){if(!o||B===false){if(B!==false){this.fireEvent("load",this,[],A,o);}if(A.callback){A.callback.call(A.scope||this,[],A,false);}return;}if(o.success===false){if(!this.hasListener('loadexception')&&typeof(o.raw.errorMsg)!='undefined'){Roo.MessageBox.alert("Error loading",o.raw.errorMsg);
 }this.fireEvent("loadexception",this,o,A,o.raw.errorMsg);return;}var r=o.records,t=o.totalRecords||r.length;this.fireEvent("beforeloadadd",this,r,A,o);if(!A||A.add!==true){if(this.pruneModifiedRecords){this.modified=[];}for(var i=0,C=r.length;i<C;i++){r[i].join(this);
 }if(this.snapshot){this.data=this.snapshot;delete this.snapshot;}this.data.clear();this.data.addAll(r);this.totalLength=t;this.applySort();this.fireEvent("datachanged",this);}else{this.totalLength=Math.max(t,this.data.length+r.length);this.add(r);}if(this.parent&&!Roo.isIOS&&!this.useNativeIOS&&this.parent.emptyTitle.length){var e=new Roo.data.Record({}
-);e.set(this.parent.displayField,this.parent.emptyTitle);e.set(this.parent.valueField,'');this.insert(0,e);}Roo.log(A);this.fireEvent("load",this,r,A,o);if(A.callback){A.callback.call(A.scope||this,r,A,true);}},loadData:function(o,A){var r=this.reader.readRecords(o);
+);e.set(this.parent.displayField,this.parent.emptyTitle);e.set(this.parent.valueField,'');this.insert(0,e);}Roo.log(A.callback);this.fireEvent("load",this,r,A,o);if(A.callback){A.callback.call(A.scope||this,r,A,true);}},loadData:function(o,A){var r=this.reader.readRecords(o);
 this.loadRecords(r,{add:A},true);},getCount:function(){return this.data.length||0;},getTotalCount:function(){return this.totalLength||0;},getSortState:function(){return this.sortInfo;},applySort:function(){if(this.sortInfo&&!this.remoteSort){var s=this.sortInfo,f=s.field;
 var st=this.fields.get(f).sortType;var fn=function(r1,r2){var v1=st(r1.data[f]),v2=st(r2.data[f]);return v1>v2?1:(v1<v2?-1:0);};this.data.sort(s.direction,fn);if(this.snapshot&&this.snapshot!=this.data){this.snapshot.sort(s.direction,fn);}}},setDefaultSort:function(A,B){this.sortInfo={field:A,direction:B?B.toUpperCase():"ASC"}
 ;},sort:function(A,B){var f=this.fields.get(A);if(!B){this.sortToggle[f.name]=this.sortToggle[f.name]||f.sortDir;if(this.multiSort||(this.sortInfo&&this.sortInfo.field==f.name)){B=(this.sortToggle[f.name]||"ASC").toggle("ASC","DESC");}else{B=f.sortDir;}}this.sortToggle[f.name]=B;