1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.BAdminCompany= function() {}
8 Roo.apply(Pman.Dialog.BAdminCompany.prototype, {
11 '1c76cbfe21c6f44c1d1e59d54f3e4420' :"Company",
12 'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email",
13 '231bc72756b5e6de492aaaa1577f61b1' :"Remarks",
14 '1243daf593fa297e07ab03bf06d925af' :"Searching...",
15 'bcc254b55c4a1babdf1dcb82c207506b' :"Phone",
16 '66bc3ece76861852889e623217049d32' :"Edit Company Details",
17 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
18 'a1fa27779242b4902f7ae3bdd5c6d508' :"Type",
19 'dd7bf230fde8d4836917806aff6a6b27' :"Address",
20 'c9cc8cce247e49bae79f15173ce97354' :"Save",
21 'e6b391a8d2c4d45902a23a8b6585703d' :"URL"
24 'tel_fieldLabel' : 'bcc254b55c4a1babdf1dcb82c207506b' /* Phone */ ,
25 'comptype_display_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
26 'name_fieldLabel' : '1c76cbfe21c6f44c1d1e59d54f3e4420' /* Company */ ,
27 'remarks_fieldLabel' : '231bc72756b5e6de492aaaa1577f61b1' /* Remarks */ ,
28 'url_fieldLabel' : 'e6b391a8d2c4d45902a23a8b6585703d' /* URL */ ,
29 'email_fieldLabel' : 'ce8ae9da5b7cd6c3df2929543a9af92d' /* Email */ ,
30 'address_fieldLabel' : 'dd7bf230fde8d4836917806aff6a6b27' /* Address */ ,
31 'comptype_display_name_fieldLabel' : 'a1fa27779242b4902f7ae3bdd5c6d508' /* Type */
37 show : function(data, cb)
45 this.dialog.show(this.data._el);
48 this.form.setValues(data);
49 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
57 this.dialog = Roo.factory({
59 cls : 'padding-bottom-trim badmin-dialog-company enable-overflow ',
61 title : _this._strings['66bc3ece76861852889e623217049d32'] /* Edit Company Details */,
63 render : function (_self)
69 '|xns' : 'Roo.bootstrap',
73 html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
76 click : function (_self, e)
82 '|xns' : 'Roo.bootstrap'
86 html : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
89 click : function (_self, e)
91 if(!_this.form.isValid()){
92 Roo.bootstrap.MessageBox.alert('Error', 'Please Correct all the errors in red');
96 var myID = _this.form.findField('id').getValue();
97 var myName = _this.form.findField('name').getValue();
99 console.log(myID + ' ' + myName);
102 url : baseURL + '/Roo/Core_company.php',
105 id : _this.form.findField('id').getValue() * 1,
106 name : _this.form.findField('name').getValue(),
109 success : function(res) {
112 _this.form.doAction("submit");
114 failure : function(res) {
115 _this.form.doAction("submit");
122 render : function (_self)
128 '|xns' : 'Roo.bootstrap'
134 style : 'width: 100%;',
136 '|xns' : 'Roo.bootstrap',
140 url : baseURL + '/Roo/Core_company.php',
142 actioncomplete : function (_self, action)
144 if(action.type == 'setdata'){
147 if(_this.data.id * 1 > 0) {
148 this.doAction('load',{ method: 'GET', params: { '_id' : _this.data.id }});
149 _this.modal.setTitle('Edit Company Details');
152 _this.modal.setTitle('Create Company');
158 if (action.type == 'load') {
159 _this.data = action.result.data;
161 if(_this.data.comptype == 'OWNER'){
162 _this.form.findField('comptype').hide();
169 if (action.type == 'submit') { // only submitted here if we are
170 //_this.dialog.hide();
174 if (_this.callback) {
175 _this.callback.call(this, action.result.data);
180 actionfailed : function (_self, action)
182 //Pman.standardActionFailed(_self,action);
188 Roo.bootstrap.MessageBox.alert(action.result.errorMsg);
191 render : function (_self)
197 '|xns' : 'Roo.bootstrap',
202 '|xns' : 'Roo.bootstrap',
208 '|xns' : 'Roo.bootstrap',
214 displayField : 'display_name',
216 fieldLabel : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'] /* Type */,
217 hiddenName : 'comptype',
218 indicatorpos : 'left',
219 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
221 name : 'comptype_display_name',
222 queryParam : 'query[name]',
223 selectOnFocus : true,
224 triggerAction : 'all',
228 render : function (_self)
231 _self.store.load({});
235 '|xns' : 'Roo.bootstrap',
239 sortInfo : '{ direction : \'ASC\', field: \'id\' }',
241 beforeload : function (_self, options)
243 options.params = options.params || {};
245 //o.params['query[empty_etype]'] = 1;
246 options.params.etype = 'COMPTYPE';
254 url : baseURL + '/Roo/core_enum.php',
259 xtype : 'JsonReader',
262 totalProperty : 'total',
275 '|xns' : 'Roo.bootstrap',
281 '|xns' : 'Roo.bootstrap',
286 fieldLabel : _this._strings['1c76cbfe21c6f44c1d1e59d54f3e4420'] /* Company */,
287 indicatorpos : 'left',
290 render : function (_self)
292 _this.company = _self;
296 '|xns' : 'Roo.bootstrap'
305 '|xns' : 'Roo.bootstrap',
311 '|xns' : 'Roo.bootstrap',
315 fieldLabel : _this._strings['dd7bf230fde8d4836917806aff6a6b27'] /* Address */,
316 indicatorpos : 'left',
319 render : function (_self)
321 _this.address = _self;
325 '|xns' : 'Roo.bootstrap'
334 '|xns' : 'Roo.bootstrap',
340 '|xns' : 'Roo.bootstrap',
344 fieldLabel : _this._strings['bcc254b55c4a1babdf1dcb82c207506b'] /* Phone */,
345 indicatorpos : 'left',
348 render : function (_self)
354 '|xns' : 'Roo.bootstrap'
363 '|xns' : 'Roo.bootstrap',
369 '|xns' : 'Roo.bootstrap',
373 fieldLabel : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
374 indicatorpos : 'left',
377 render : function (_self)
383 '|xns' : 'Roo.bootstrap'
392 '|xns' : 'Roo.bootstrap',
398 '|xns' : 'Roo.bootstrap',
402 fieldLabel : _this._strings['e6b391a8d2c4d45902a23a8b6585703d'] /* URL */,
403 indicatorpos : 'left',
406 render : function (_self)
412 '|xns' : 'Roo.bootstrap'
420 cls : 'badmin-company-edit-remark',
422 '|xns' : 'Roo.bootstrap',
428 '|xns' : 'Roo.bootstrap',
432 fieldLabel : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
433 indicatorpos : 'left',
436 render : function (_self)
438 _this.remarks = _self;
442 '|xns' : 'Roo.bootstrap'
450 inputType : 'hidden',
453 render : function (_self)
455 _this.companyID = _self;
459 '|xns' : 'Roo.bootstrap'
469 Roo.apply(Pman.Dialog.BAdminCompany, Pman.Dialog.BAdminCompany.prototype);