php7 fixes
[Pman.Builder] / Pman.Dialog.BuilderViewCode.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Pman.Dialog.BuilderViewCode = {
6
7     dialog : false,
8     callback:  false,
9
10     show : function(data, cb)
11     {
12         if (!this.dialog) {
13             this.create();
14         }
15
16         this.callback = cb;
17         this.data = data;
18         this.dialog.show(this.data._el);
19         if (this.form) {
20            this.form.reset();
21            this.form.setValues(data);
22            this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
23         }
24
25     },
26
27     create : function()
28     {
29         var _this = this;
30         this.dialog = Roo.factory({
31             xtype: 'LayoutDialog',
32             xns: Roo,
33             listeners : {
34                 show : function (_self)
35                 {
36                     if (_this.isBuilder) {
37                        return;
38                     }
39                     _this.dialog = _self;        
40                     this.getLayout().beginUpdate();
41                      
42                     this.resizeTo( Roo.lib.Dom.getViewWidth() - 70, Roo.lib.Dom.getViewHeight() - 70);
43                     this.getLayout().getRegion('center').resizeTo(Roo.lib.Dom.getViewWidth() - ( 70 + 50 ));
44                  
45                     
46                     this.moveTo(35,35);
47                     
48                     this.getLayout().endUpdate();
49                     
50                     _this.previewContentPanel.setContent(
51                         '<PRE>' + Roo.util.Format.htmlEncode(_this.data.jsource) + '</PRE>'
52                     );
53                          
54                     _this.jsonContentPanel.setContent(
55                         '<PRE>' + Roo.util.Format.htmlEncode(_this.data.json) + '</PRE>'
56                     );
57                     
58                      _this.htmlContentPanel.setContent(
59                         '<PRE>' + Roo.util.Format.htmlEncode(_this.data.html) + '</PRE>'
60                     );
61                        
62                      this.layout.showPanel(0)     
63                 }
64             },
65             background : true,
66             closable : false,
67             collapsible : false,
68             height : 400,
69             modal : true,
70             resizable : true,
71             title : "View Generated Code",
72             width : 400,
73             items : [
74                 {
75                     xtype: 'ContentPanel',
76                     xns: Roo,
77                     listeners : {
78                         activate : function (_self)
79                         {
80                         _this.previewContentPanel = _self;
81                         }
82                     },
83                     autoScroll : true,
84                     background : false,
85                     fitToFrame : true,
86                     region : 'center',
87                     title : "Javascript"
88                 },
89                 {
90                     xtype: 'ContentPanel',
91                     xns: Roo,
92                     listeners : {
93                         activate : function (_self)
94                         {
95                         _this.jsonContentPanel = _self;
96                         }
97                     },
98                     autoScroll : true,
99                     background : false,
100                     fitToFrame : true,
101                     region : 'center',
102                     title : "JSON"
103                 },
104                 {
105                     xtype: 'ContentPanel',
106                     xns: Roo,
107                     listeners : {
108                         activate : function (_self)
109                         {
110                         _this.htmlContentPanel = _self;
111                         }
112                     },
113                     autoScroll : true,
114                     background : false,
115                     fitToFrame : true,
116                     region : 'center',
117                     title : "HTML"
118                 }
119             ],
120             center : {
121                 xtype: 'LayoutRegion',
122                 xns: Roo,
123                 tabPosition : 'top',
124                 titlebar : false
125             },
126             buttons : [
127                 {
128                     xtype: 'Button',
129                     xns: Roo,
130                     text : "OK",
131                     listeners : {
132                         click : function() {
133                             _this.dialog.hide();
134                         
135                         }
136                     }
137                 }
138             ]
139         });
140     }
141 };