Roo/View.js
authorAlan Knowles <alan@akbkhome.com>
Thu, 12 Apr 2012 12:57:11 +0000 (20:57 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 12 Apr 2012 12:57:11 +0000 (20:57 +0800)
Roo/View.js

index 62c756c..4614155 100644 (file)
@@ -251,8 +251,9 @@ Roo.extend(Roo.View, Roo.util.Observable, {
      * @param {Array/Object} data The raw data (array of colData for a data model bound view or
      * a JSON object for an UpdateManager bound view).
      */
-    prepareData : function(data){
-        this.fireEvent("preparedata", this, data);
+    prepareData : function(data, index, record)
+    {
+        this.fireEvent("preparedata", this, data, index, record);
         return data;
     },
 
@@ -260,7 +261,7 @@ Roo.extend(Roo.View, Roo.util.Observable, {
         this.clearSelections();
         var index = this.store.indexOf(record);
         var n = this.nodes[index];
-        this.tpl.insertBefore(n, this.prepareData(record.data));
+        this.tpl.insertBefore(n, this.prepareData(record.data, index, record));
         n.parentNode.removeChild(n);
         this.updateIndexes(index, index);
     },