try and get ctrl-enter to add a clear all
[roojs1] / Roo / ViewPanel.js
index 6ad02c4..7ca1e2e 100644 (file)
  * @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);
     
@@ -38,17 +37,20 @@ Roo.ViewPanel = function(view, config){
         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){