php7 fixes
[Pman.Builder] / Pman.Dialog.BuilderForm.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.BuilderForm = {
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             closable : true,
34             height : 600,
35             title : "Edit Form Elements",
36             width : 800,
37             items : [
38                 {
39                     xtype: 'GridPanel',
40                     xns: Roo,
41                     region : 'center',
42                     grid : {
43                         xtype: 'EditorGrid',
44                         xns: Roo.grid,
45                         toolbar : {
46                             xtype: 'Toolbar',
47                             xns: Roo,
48                             items : [
49                                 {
50                                     xtype: 'Fill',
51                                     xns: Roo.Toolbar
52                                 },
53                                 {
54                                     xtype: 'Button',
55                                     xns: Roo.Toolbar,
56                                     text : "Add Field"
57                                 }
58                             ]
59                         },
60                         ds : {
61                             xtype: 'Store',
62                             xns: Roo.data
63                         },
64                         cm : [
65                             {
66                                 xtype: 'ColumnModel',
67                                 xns: Roo.grid,
68                                 header : 'Label',
69                                 editor : {
70                                     xtype: 'GridEditor',
71                                     xns: Roo.grid,
72                                     field : {
73                                         xtype: 'TextField',
74                                         xns: Roo.form
75                                     }
76                                 }
77                             },
78                             {
79                                 xtype: 'ColumnModel',
80                                 xns: Roo.grid,
81                                 header : 'Type'
82                             },
83                             {
84                                 xtype: 'ColumnModel',
85                                 xns: Roo.grid,
86                                 header : 'Width',
87                                 width : 50
88                             },
89                             {
90                                 xtype: 'ColumnModel',
91                                 xns: Roo.grid,
92                                 header : 'Data Field'
93                             },
94                             {
95                                 xtype: 'ColumnModel',
96                                 xns: Roo.grid,
97                                 header : 'Display Field'
98                             },
99                             {
100                                 xtype: 'ColumnModel',
101                                 xns: Roo.grid,
102                                 header : 'Source Data (hidden)'
103                             },
104                             {
105                                 xtype: 'ColumnModel',
106                                 xns: Roo.grid,
107                                 listeners : {
108                                     headerchange : function (_self, columnIndex, newText)
109                                     {
110                                     
111                                     }
112                                 },
113                                 header : 'Source Data (display)'
114                             },
115                             {
116                                 xtype: 'ColumnModel',
117                                 xns: Roo.grid,
118                                 header : 'Type'
119                             }
120                         ]
121                     }
122                 }
123             ],
124             center : {
125                 xtype: 'LayoutRegion',
126                 xns: Roo
127             },
128             buttons : [
129                 {
130                     xtype: 'Button',
131                     xns: Roo,
132                     text : "Cancel"
133                 },
134                 {
135                     xtype: 'Button',
136                     xns: Roo,
137                     text : "Save"
138                 }
139             ]
140         });
141     }
142 };