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 'ca0dbad92a874b2f69b549293387925e' :"Code",
19 'a1fa27779242b4902f7ae3bdd5c6d508' :"Type",
20 'dd7bf230fde8d4836917806aff6a6b27' :"Address",
21 'c9cc8cce247e49bae79f15173ce97354' :"Save",
22 'e6b391a8d2c4d45902a23a8b6585703d' :"URL"
25 'tel_fieldLabel' : 'bcc254b55c4a1babdf1dcb82c207506b' /* Phone */ ,
26 'comptype_display_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
27 'code_fieldLabel' : 'ca0dbad92a874b2f69b549293387925e' /* Code */ ,
28 'name_fieldLabel' : '1c76cbfe21c6f44c1d1e59d54f3e4420' /* Company */ ,
29 'remarks_fieldLabel' : '231bc72756b5e6de492aaaa1577f61b1' /* Remarks */ ,
30 'url_fieldLabel' : 'e6b391a8d2c4d45902a23a8b6585703d' /* URL */ ,
31 'email_fieldLabel' : 'ce8ae9da5b7cd6c3df2929543a9af92d' /* Email */ ,
32 'address_fieldLabel' : 'dd7bf230fde8d4836917806aff6a6b27' /* Address */ ,
33 'comptype_display_name_fieldLabel' : 'a1fa27779242b4902f7ae3bdd5c6d508' /* Type */
39 show : function(data, cb)
47 this.dialog.show(this.data._el);
50 this.form.setValues(data);
51 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
59 this.dialog = Roo.factory({
61 cls : 'padding-bottom-trim badmin-dialog-company enable-modal-body-overflow',
63 title : _this._strings['66bc3ece76861852889e623217049d32'] /* Edit Company Details */,
65 render : function (_self)
69 show : function (_self)
71 _this.form.findField('code').hide();
73 if(appDisabled.indexOf('Coba.SuperAdmin') * 1 == -1) {
74 _this.form.findField('code').show();
79 '|xns' : 'Roo.bootstrap',
83 html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
86 click : function (_self, e)
92 '|xns' : 'Roo.bootstrap'
96 html : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
99 click : function (_self, e)
101 if(!_this.form.isValid()){
102 Roo.bootstrap.MessageBox.alert('Error', 'Please Correct all the errors in red');
106 var myID = _this.form.findField('id').getValue();
107 var myName = _this.form.findField('name').getValue();
109 console.log(myID + ' ' + myName);
112 url : baseURL + '/Roo/Core_company.php',
115 id : _this.form.findField('id').getValue() * 1,
116 name : _this.form.findField('name').getValue(),
119 success : function(res) {
122 _this.form.doAction("submit");
124 failure : function(res) {
125 _this.form.doAction("submit");
132 render : function (_self)
138 '|xns' : 'Roo.bootstrap'
144 style : 'width: 100%;',
146 '|xns' : 'Roo.bootstrap',
150 url : baseURL + '/Roo/Core_company.php',
152 actioncomplete : function (_self, action)
154 if(action.type == 'setdata'){
157 if(_this.data.id * 1 > 0) {
158 this.doAction('load',{ method: 'GET', params: { '_id' : _this.data.id }});
159 _this.modal.setTitle('Edit Company Details');
162 _this.modal.setTitle('Create Company');
168 if (action.type == 'load') {
169 _this.data = action.result.data;
171 if(_this.data.comptype == 'OWNER'){
172 _this.form.findField('comptype').hide();
179 if (action.type == 'submit') { // only submitted here if we are
180 //_this.dialog.hide();
184 if (_this.callback) {
185 _this.callback.call(this, action.result.data);
190 actionfailed : function (_self, action)
192 //Pman.standardActionFailed(_self,action);
198 Roo.bootstrap.MessageBox.alert(action.result.errorMsg);
201 render : function (_self)
207 '|xns' : 'Roo.bootstrap',
212 '|xns' : 'Roo.bootstrap',
218 '|xns' : 'Roo.bootstrap',
222 fieldLabel : _this._strings['ca0dbad92a874b2f69b549293387925e'] /* Code */,
223 indicatorpos : 'left',
226 render : function (_self)
228 _this.company = _self;
232 '|xns' : 'Roo.bootstrap'
241 '|xns' : 'Roo.bootstrap',
247 '|xns' : 'Roo.bootstrap',
253 displayField : 'display_name',
255 fieldLabel : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'] /* Type */,
256 hiddenName : 'comptype',
257 indicatorpos : 'left',
258 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
260 name : 'comptype_display_name',
261 queryParam : 'query[name]',
262 selectOnFocus : true,
263 triggerAction : 'all',
267 render : function (_self)
270 _self.store.load({});
274 '|xns' : 'Roo.bootstrap',
278 sortInfo : '{ direction : \'ASC\', field: \'id\' }',
280 beforeload : function (_self, options)
282 options.params = options.params || {};
284 //o.params['query[empty_etype]'] = 1;
285 options.params.etype = 'COMPTYPE';
293 url : baseURL + '/Roo/core_enum.php',
298 xtype : 'JsonReader',
301 totalProperty : 'total',
314 '|xns' : 'Roo.bootstrap',
320 '|xns' : 'Roo.bootstrap',
324 fieldLabel : _this._strings['1c76cbfe21c6f44c1d1e59d54f3e4420'] /* Company */,
325 indicatorpos : 'left',
328 render : function (_self)
330 _this.company = _self;
334 '|xns' : 'Roo.bootstrap'
343 '|xns' : 'Roo.bootstrap',
349 '|xns' : 'Roo.bootstrap',
353 fieldLabel : _this._strings['dd7bf230fde8d4836917806aff6a6b27'] /* Address */,
354 indicatorpos : 'left',
357 render : function (_self)
359 _this.address = _self;
363 '|xns' : 'Roo.bootstrap'
372 '|xns' : 'Roo.bootstrap',
378 '|xns' : 'Roo.bootstrap',
382 fieldLabel : _this._strings['bcc254b55c4a1babdf1dcb82c207506b'] /* Phone */,
383 indicatorpos : 'left',
386 render : function (_self)
392 '|xns' : 'Roo.bootstrap'
401 '|xns' : 'Roo.bootstrap',
407 '|xns' : 'Roo.bootstrap',
411 fieldLabel : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
412 indicatorpos : 'left',
415 render : function (_self)
421 '|xns' : 'Roo.bootstrap'
430 '|xns' : 'Roo.bootstrap',
436 '|xns' : 'Roo.bootstrap',
440 fieldLabel : _this._strings['e6b391a8d2c4d45902a23a8b6585703d'] /* URL */,
441 indicatorpos : 'left',
444 render : function (_self)
450 '|xns' : 'Roo.bootstrap'
458 cls : 'badmin-company-edit-remark',
460 '|xns' : 'Roo.bootstrap',
466 '|xns' : 'Roo.bootstrap',
470 fieldLabel : _this._strings['231bc72756b5e6de492aaaa1577f61b1'] /* Remarks */,
471 indicatorpos : 'left',
474 render : function (_self)
476 _this.remarks = _self;
480 '|xns' : 'Roo.bootstrap'
488 inputType : 'hidden',
491 render : function (_self)
493 _this.companyID = _self;
497 '|xns' : 'Roo.bootstrap'
507 Roo.apply(Pman.Dialog.BAdminCompany, Pman.Dialog.BAdminCompany.prototype);