Roo/bootstrap/panel/Grid.js
authorAlan Knowles <alan@roojs.com>
Mon, 10 Jul 2017 03:27:17 +0000 (11:27 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 10 Jul 2017 03:27:17 +0000 (11:27 +0800)
Roo/bootstrap/panel/Grid.js

index e8bc39b..b3978f8 100644 (file)
@@ -26,7 +26,20 @@ Roo.bootstrap.panel.Grid = function(config){
     if(config.toolbar){
         var tool_el = this.wrapper.createChild();    
         this.toolbar = Roo.factory(config.toolbar);
+        var ti = [];
+        if (config.toolbar.items) {
+            ti = config.toolbar.items ;
+            delete config.toolbar.items ;
+        }
+        
+        
         this.toolbar.render(tool_el);
+        for(var i =0;i < ti.length;i++) {
+          //  Roo.log(['add child', items[i]]);
+            nitems.push(this.toolbar.addxtype(Roo.apply({}, ti[i])));
+        }
+        ti.items = nitems;
+        
         delete config.toolbar;
     }
     this.wrapper.dom.appendChild(config.grid.getGridEl().dom);