Roo/View.js
authorEdward <edward@roojs.com>
Mon, 19 May 2014 09:53:54 +0000 (17:53 +0800)
committerEdward <edward@roojs.com>
Mon, 19 May 2014 09:53:54 +0000 (17:53 +0800)
Roo/View.js

index 5e17c72..f314e7d 100644 (file)
@@ -240,8 +240,6 @@ Roo.extend(Roo.View, Roo.util.Observable, {
      * Refreshes the view. - called by datachanged on the store. - do not call directly.
      */
     refresh : function(){
-        this.append();
-        return;
         Roo.log('refresh');
         var t = this.tpl;
         
@@ -290,42 +288,6 @@ Roo.extend(Roo.View, Roo.util.Observable, {
         this.updateIndexes(0);
     },
     
-    append : function(){
-        Roo.log('append');
-        Roo.log(this.tpl);
-        var t = this.tpl;
-        Roo.log(this.el.dom.innerHTML);
-        var html = [];
-        var records = this.store.getRange();
-        if(records.length < 1) {
-            
-            // is this valid??  = should it render a template??
-            
-            this.el.update(this.emptyText);
-            return;
-        }
-        var el = this.el;
-        if (this.dataName) {
-            this.el.update(t.apply(this.store.meta)); //????
-            el = this.el.child('.roo-tpl-' + this.dataName);
-        }
-        
-        for(var i = 0, len = records.length; i < len; i++){
-            var data = this.prepareData(records[i].data, i, records[i]);
-            this.fireEvent("preparedata", this, data, i, records[i]);
-            html[html.length] = Roo.util.Format.trim(
-                this.dataName ?
-                    t.applySubtemplate(this.dataName, data, this.store.meta) :
-                    t.apply(data)
-            );
-        }
-        
-        
-        Roo.log(html);
-        el.update(html.join(""));
-        this.nodes = el.dom.childNodes;
-        this.updateIndexes(0);
-    },
 
     /**
      * Function to override to reformat the data that is sent to