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,
106 loadingText : "Searching...",
110 qtip : "Select Project Type",
111 queryParam : 'query[name]',
112 selectOnFocus : true,
113 tpl : '<div class="x-grid-cell-text x-btn button"><b>{desc}</b> </div>',
114 triggerAction : 'all',
119 xtype: 'SimpleStore',
121 data : [ [ 'U' , "Project (Unconfirmed)" ],
123 [ 'C' , "Project (Closed)" ],
124 [ 'N' , "Non-Project" ],
125 [ 'X' , "Non-Project (Closed)" ]
127 fields : [ 'code', 'desc' ]
134 add : function (combo)
136 Pman.Dialog.Companies.show( { id: 0 }, function(data) {
137 _this.form.setValues({
139 client_id_name : data.name
144 allowBlank : 'false',
145 displayField : 'code',
147 emptyText : "Select Company",
148 fieldLabel : 'Client',
149 forceSelection : true,
150 hiddenName : 'client_id',
152 loadingText : "Searching...",
154 name : 'client_id_name',
156 qtip : "Select Companies",
157 queryParam : 'query[code]',
158 selectOnFocus : true,
159 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
160 triggerAction : 'all',
168 beforeload : function (_self, o){
169 o.params = o.params || {};
172 o.params['query[group_pulldown]'] = 1;
176 sortInfo : { direction : 'ASC', field: 'name' },
181 url : baseURL + '/Roo/Companies.php'
188 totalProperty : 'total',
189 fields : [{"name":"id","type":"int"},{"name":"code","type":"string"}]
196 allowBlank : 'false',
197 displayField : 'name',
199 emptyText : "Select Team",
201 forceSelection : true,
202 hiddenName : 'team_id',
204 loadingText : "Searching...",
206 name : 'team_id_name',
208 qtip : "Select Team",
209 queryParam : 'query[name]',
210 selectOnFocus : true,
211 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
212 triggerAction : 'all',
220 sortInfo : { direction : 'ASC', field: 'id' },
222 beforeload : function (_self, o){
223 o.params = o.params || {};
231 url : baseURL + '/Roo/Groups.php'
238 totalProperty : 'total',
239 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
246 fieldLabel : 'File location',
247 name : 'file_location',
253 fieldLabel : 'Remarks',
266 altFormats : 'Y-m-d|d/m/Y',
267 fieldLabel : 'Open date',
275 allowBlank : 'false',
277 emptyText : "Select Person",
278 forceSelection : true,
280 loadingText : "Searching...",
283 qtip : "Select Person",
284 selectOnFocus : true,
285 triggerAction : 'all',
288 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
289 queryParam : 'query[name]',
290 fieldLabel : 'Open by',
292 displayField : 'name',
293 hiddenName : 'open_by',
294 name : 'open_by_name',
299 sortInfo : { direction : 'ASC', field: 'id' },
301 beforeload : function (_self, o){
302 o.params = o.params || {};
310 url : baseURL + '/Roo/Person.php'
317 totalProperty : 'total',
318 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}]
335 xtype: 'LayoutRegion',
343 click : function (_self, e)
354 click : function (_self, e)
359 _this.dialog.el.mask("Saving");
360 _this.form.doAction("submit");