DataObjects/Builder_tables.php
[Pman.Builder] / Pman.Dialog.BuilderViewCode.js
index 0468149..ed66ba2 100644 (file)
@@ -37,30 +37,29 @@ Pman.Dialog.BuilderViewCode = {
                        return;
                     }
                     _this.dialog = _self;        
-                    _this.dialog.getLayout().beginUpdate();
+                    this.getLayout().beginUpdate();
                      
-                    _this.dialog.resizeTo( Roo.lib.Dom.getViewWidth() - 70, Roo.lib.Dom.getViewHeight() - 70);
-                    _this.dialog.getLayout().getRegion('center').resizeTo(Roo.lib.Dom.getViewWidth() - ( 70 + 50 ));
+                    this.resizeTo( Roo.lib.Dom.getViewWidth() - 70, Roo.lib.Dom.getViewHeight() - 70);
+                    this.getLayout().getRegion('center').resizeTo(Roo.lib.Dom.getViewWidth() - ( 70 + 50 ));
                  
                     
-                    _this.dialog.moveTo(35,35);
+                    this.moveTo(35,35);
                     
-                    _this.dialog.getLayout().endUpdate();
+                    this.getLayout().endUpdate();
                     
                     _this.previewContentPanel.setContent(
                         '<PRE>' + Roo.util.Format.htmlEncode(_this.data.jsource) + '</PRE>'
                     );
-                        
+                         
+                    _this.jsonContentPanel.setContent(
+                        '<PRE>' + Roo.util.Format.htmlEncode(_this.data.json) + '</PRE>'
+                    );
                     
-                    _this.previewContentPanel.load({
-                        url: baseURL + '/Roo/Code.php',
-                        method: 'GET',
-                        params: {
-                            id: _this.data.id
-                            
-                        }
-                    });
-                            
+                     _this.htmlContentPanel.setContent(
+                        '<PRE>' + Roo.util.Format.htmlEncode(_this.data.html) + '</PRE>'
+                    );
+                       
+                     this.layout.showPanel(0)     
                 }
             },
             background : true,
@@ -68,7 +67,7 @@ Pman.Dialog.BuilderViewCode = {
             collapsible : false,
             height : 400,
             modal : true,
-            resizable : false,
+            resizable : true,
             title : "View Generated Code",
             width : 400,
             items : [
@@ -93,14 +92,29 @@ Pman.Dialog.BuilderViewCode = {
                     listeners : {
                         activate : function (_self)
                         {
-                        _this.previewContentPanel = _self;
+                        _this.jsonContentPanel = _self;
                         }
                     },
                     autoScroll : true,
-                    background : true,
+                    background : false,
                     fitToFrame : true,
                     region : 'center',
                     title : "JSON"
+                },
+                {
+                    xtype: 'ContentPanel',
+                    xns: Roo,
+                    listeners : {
+                        activate : function (_self)
+                        {
+                        _this.htmlContentPanel = _self;
+                        }
+                    },
+                    autoScroll : true,
+                    background : false,
+                    fitToFrame : true,
+                    region : 'center',
+                    title : "HTML"
                 }
             ],
             center : {