Roo/PagingToolbar.js
authorAlan Knowles <alan@akbkhome.com>
Fri, 14 Jan 2011 07:17:32 +0000 (15:17 +0800)
committerAlan Knowles <alan@akbkhome.com>
Fri, 14 Jan 2011 07:17:32 +0000 (15:17 +0800)
Roo/PagingToolbar.js

index c20721b..55b8cc3 100644 (file)
@@ -26,13 +26,22 @@ Roo.PagingToolbar = function(el, ds, config)
         ds = el.dataSource;
         el = config.container;
     }
-    
+    var items = [];
+    if (this.items) {
+        items = this.items;
+        this.items = [];
+    }
     
     Roo.PagingToolbar.superclass.constructor.call(this, el, null, config);
     this.ds = ds;
     this.cursor = 0;
     this.renderButtons(this.el);
     this.bind(ds);
+    var _this = this;
+    Roo.each(items, function(e) {
+        _this.add(Roo.factory(e));
+    });
+    
 };
 
 Roo.extend(Roo.PagingToolbar, Roo.Toolbar, {