1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.CoreProject = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
37 title : "Edit / Create Projects",
41 xtype: 'ContentPanel',
49 actioncomplete : function(_self,action)
51 if (action.type == 'setdata') {
52 //_this.dialog.el.mask("Loading");
53 //this.load({ method: 'GET', params: { '_id' : _this.data.id }});
56 if (action.type == 'load') {
57 _this.dialog.el.unmask();
60 if (action.type =='submit') {
62 _this.dialog.el.unmask();
66 _this.callback.call(_this, _this.form.getValues());
72 rendered : function (form)
78 style : 'margin:10px;',
79 url : baseURL + '/Roo/Projects.php',
91 fieldLabel : 'Project Name',
93 qtip : "Enter Project Name",
100 displayField : 'desc',
102 emptyText : "Select Project Type",
103 fieldLabel : 'Project Type',
104 forceSelection : true,
107 loadingText : "Searching...",
111 qtip : "Select Project Type",
112 queryParam : 'query[name]',
113 selectOnFocus : true,
114 tpl : '<div class="x-grid-cell-text x-btn button"><b>{desc}</b> </div>',
115 triggerAction : 'all',
120 xtype: 'SimpleStore',
122 data : [ [ 'U' , "Project (Unconfirmed)" ],
124 [ 'C' , "Project (Closed)" ],
125 [ 'N' , "Non-Project" ],
126 [ 'X' , "Non-Project (Closed)" ]
128 fields : [ 'code', 'desc' ]
135 add : function (combo)
137 Pman.Dialog.Companies.show( { id: 0 }, function(data) {
138 _this.form.setValues({
140 client_id_name : data.name
145 allowBlank : 'false',
146 displayField : 'name',
148 emptyText : "Select Company",
149 fieldLabel : 'Client',
150 forceSelection : true,
151 hiddenName : 'client_id',
153 loadingText : "Searching...",
155 name : 'client_id_name',
157 qtip : "Select Companies",
158 queryParam : 'query[name]',
159 selectOnFocus : true,
160 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
161 triggerAction : 'all',
169 beforeload : function (_self, o){
170 o.params = o.params || {};
173 o.params['query[group_pulldown]'] = 1;
177 sortInfo : { direction : 'ASC', field: 'name' },
182 url : baseURL + '/Roo/Companies.php'
189 totalProperty : 'total',
190 fields : [{"name":"id","type":"int"},{"name":"code","type":"string"}]
197 allowBlank : 'false',
198 displayField : 'name',
200 emptyText : "Select Team",
202 forceSelection : true,
203 hiddenName : 'team_id',
205 loadingText : "Searching...",
207 name : 'team_id_name',
209 qtip : "Select Team",
210 queryParam : 'query[name]',
211 selectOnFocus : true,
212 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
213 triggerAction : 'all',
221 sortInfo : { direction : 'ASC', field: 'id' },
223 beforeload : function (_self, o){
224 o.params = o.params || {};
232 url : baseURL + '/Roo/Groups.php'
239 totalProperty : 'total',
240 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
247 fieldLabel : 'File location',
248 name : 'file_location',
254 fieldLabel : 'Remarks',
267 altFormats : 'Y-m-d|d/m/Y',
268 fieldLabel : 'Open date',
276 allowBlank : 'false',
278 emptyText : "Select Person",
279 forceSelection : true,
281 loadingText : "Searching...",
284 qtip : "Select Person",
285 selectOnFocus : true,
286 triggerAction : 'all',
289 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
290 queryParam : 'query[name]',
291 fieldLabel : 'Open by',
293 displayField : 'name',
294 hiddenName : 'open_by',
295 name : 'open_by_name',
300 sortInfo : { direction : 'ASC', field: 'id' },
302 beforeload : function (_self, o){
303 o.params = o.params || {};
311 url : baseURL + '/Roo/Person.php'
318 totalProperty : 'total',
319 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
336 xtype: 'LayoutRegion',
344 click : function (_self, e)
355 click : function (_self, e)
360 _this.dialog.el.mask("Saving");
361 _this.form.doAction("submit");