X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2FViewPanel.js;h=7ca1e2ec45b37dc4b20c4b6f0825133b93974830;hb=61bc45258e16a779856dd2ad0862630b489e4583;hp=c77df2333925d5f4497419a0fb9c22ab32e9f62c;hpb=e044e8eff5955f4c47a71804f49364c2a75187a2;p=roojs1 diff --git a/Roo/ViewPanel.js b/Roo/ViewPanel.js index c77df23339..7ca1e2ec45 100644 --- a/Roo/ViewPanel.js +++ b/Roo/ViewPanel.js @@ -17,13 +17,12 @@ * @param {Roo.grid.Grid} grid The grid for this panel * @param {String/Object} config A string to set only the panel's title, or a config object */ -Roo.ViewPanel = function(view, config){ - - +Roo.ViewPanel = function(el, config){ + this.wrapper = Roo.DomHelper.append(document.body, // wrapper for IE7 strict & safari scroll issue {tag: "div", cls: "x-layout-grid-wrapper x-layout-inactive-content"}, true); - this.wrapper.dom.appendChild(view.el.dom); + this.wrapper.dom.appendChild(el.dom); Roo.ViewPanel.superclass.constructor.call(this, this.wrapper, config); @@ -34,21 +33,24 @@ Roo.ViewPanel = function(view, config){ if (this.footer && !this.footer.el && this.footer.xtype) { this.footer.container = this.wrapper.el; // this.getView().getFooterPanel(true); - this.footer.dataSource = this.view.dataSource; + this.footer.dataSource = this.view.store; this.footer = Roo.factory(this.footer, Roo); } + //??? create teh view??? - grid.monitorWindowResize = false; // turn off autosizing - grid.autoHeight = false; - grid.autoWidth = false; - this.grid = grid; - this.grid.getGridEl().replaceClass("x-layout-inactive-content", "x-layout-component-panel"); + //grid.monitorWindowResize = false; // turn off autosizing + //grid.autoHeight = false; + //grid.autoWidth = false; + //this.grid = grid; + //this.grid.getGridEl().replaceClass("x-layout-inactive-content", "x-layout-component-panel"); }; -Roo.extend(Roo.GridPanel, Roo.ContentPanel, { +Roo.extend(Roo.ViewPanel, Roo.ContentPanel, { + + autoCreate : true, getId : function(){ - return this.grid.id; + return this.view.id; }, /** @@ -56,7 +58,7 @@ Roo.extend(Roo.GridPanel, Roo.ContentPanel, { * @return {Roo.grid.Grid} */ getGrid : function(){ - return this.grid; + return this.view; }, setSize : function(width, height){