php7 fixes
[Pman.Builder] / Pman.Dialog.BuilderAppEdit.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.BuilderAppEdit = {
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                    _this.dialog = _self;
37                 }
38             },
39             background : true,
40             closable : false,
41             collapsible : false,
42             height : 200,
43             modal : true,
44             resizable : false,
45             title : "Edit / Create Module",
46             width : 500,
47             items : [
48                 {
49                     xtype: 'ContentPanel',
50                     xns: Roo,
51                     background : true,
52                     fitToFrame : true,
53                     region : 'center',
54                     items : [
55                         {
56                             xtype: 'Form',
57                             xns: Roo.form,
58                             listeners : {
59                                 actionfailed : function (_self, action)
60                                 {
61                                     _this.dialog.el.unmask();
62                                     Pman.standardActionFailed(_self, action);
63                                 },
64                                 actioncomplete : function (_self, action)
65                                 {
66                                    if (action.type == 'submit') {
67                                       _this.dialog.el.unmask();
68                                      _this.dialog.hide();
69                                    
70                                     if (_this.callback) {
71                                        _this.callback.call(_this, _this.form.getValues());
72                                     }
73                                     _this.form.reset();
74                                      }
75                                 },
76                                 rendered : function (_self)
77                                 {
78                                     _this.form = _self;
79                                 }
80                             },
81                             method : 'POST',
82                             style : 'margin: 5px',
83                             url : baseURL + '/Roo/Builder_app.php',
84                             items : [
85                                 {
86                                     xtype: 'Hidden',
87                                     xns: Roo.form,
88                                     name : 'id'
89                                 },
90                                 {
91                                     xtype: 'TextField',
92                                     xns: Roo.form,
93                                     name : 'app',
94                                     fieldLabel : 'Module',
95                                     width : 200
96                                 },
97                                 {
98                                     xtype: 'TextField',
99                                     xns: Roo.form,
100                                     name : 'davurl',
101                                     fieldLabel : 'Webdav URL',
102                                     width : 350,
103                                     vtype : 'url'
104                                 },
105                                 {
106                                     xtype: 'Checkbox',
107                                     xns: Roo.form,
108                                     name : 'davwrite',
109                                     fieldLabel : 'Write to WebDav',
110                                     allowDecimals : false,
111                                     boxLabel : 'Check to enable PUT to Dav after save',
112                                     inputValue : '1'
113                                 },
114                                 {
115                                     xtype: 'TextField',
116                                     xns: Roo.form,
117                                     name : 'gitpath',
118                                     fieldLabel : 'Git Path',
119                                     width : 350
120                                 }
121                             ]
122                         }
123                     ]
124                 }
125             ],
126             center : {
127                 xtype: 'LayoutRegion',
128                 xns: Roo,
129                 titlebar : false
130             },
131             buttons : [
132                 {
133                     xtype: 'Button',
134                     xns: Roo,
135                     text : "Cancel",
136                     listeners : {
137                         click : function (_self, e)
138                         {
139                              _this.form.reset();
140                              _this.dialog.hide();
141                         }
142                     }
143                 },
144                 {
145                     xtype: 'Button',
146                     xns: Roo,
147                     text : "OK",
148                     listeners : {
149                         click : function (_self, e)
150                         {
151                             _this.dialog.el.mask("Saving");
152                              _this.form.doAction('submit');
153                             
154                         }
155                     }
156                 }
157             ]
158         });
159     }
160 };