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.CoreEnumMerge = {
10 '99b344c8ae43e3e7213862b8f35c4e51' :"Select Company",
11 '298a183cfe4fddedd4bd17abe8aeb685' :"Merge Pulldown Option",
12 '03e956f1dca2b4d525df03cb1899cb6f' :"Merge with",
13 '1243daf593fa297e07ab03bf06d925af' :"Searching...",
14 '68be4837f6c739877233e527a996dd00' :"Merge",
15 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
16 '9675747b5ab12d05f18518761e68a533' :"Select Companies"
22 show : function(data, cb)
30 this.dialog.show(this.data._el);
33 this.form.setValues(data);
34 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
42 this.dialog = Roo.factory({
48 title : _this._strings['298a183cfe4fddedd4bd17abe8aeb685'] /* Merge Pulldown Option */,
52 xtype : 'LayoutDialog',
54 show : function (_self)
56 if (_this.isBuilder) {
57 _this.data = { id : 2, comptype : 'SUPPLIER' }
64 xtype : 'LayoutRegion'
68 text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
73 click : function (_self, e)
80 text : _this._strings['68be4837f6c739877233e527a996dd00'] /* Merge */,
85 click : function (_self, e)
87 _this.dialog.el.mask("Merging");
88 _this.form.doAction("submit");
99 xtype : 'ContentPanel',
103 style : 'margin: 10px;',
104 url : baseURL + '/Roo/Core_enum.php',
109 actioncomplete : function (_self, action)
112 if (action.type =='submit') {
114 _this.dialog.el.unmask();
117 if (_this.callback) {
118 _this.callback.call(_this, _this.form.getValues());
123 if (action.type == 'setdata') {
124 _this.data.table = _this.data.table || 'Companies';
125 _this.form.findField('table').setValue(_this.data.table);
126 var title = _this.data.title || _this.data.comptype;
127 _this.dialog.setTitle("Delete selected " + title + " and merge data with");
128 _this.form.findField('merge_id').store.proxy.conn.url = baseURL + '/Roo/' + _this.data.table + '.php';
129 _this.form.findField('merge_id').emptyText = "Select " + title;
130 _this.form.findField('merge_id').reset();
135 actionfailed : function (_self, action)
137 _this.dialog.el.unmask();
138 Pman.standardActionFailed(_self, action);
140 rendered : function (form)
149 displayField : 'name',
150 emptyText : _this._strings['99b344c8ae43e3e7213862b8f35c4e51'] /* Select Company */,
151 fieldLabel : _this._strings['03e956f1dca2b4d525df03cb1899cb6f'] /* Merge with */,
152 forceSelection : true,
153 hiddenName : 'merge_id',
155 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
157 name : 'merge_id_name',
159 qtip : _this._strings['9675747b5ab12d05f18518761e68a533'] /* Select Companies */,
160 queryParam : 'query[name]',
161 selectOnFocus : true,
162 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
163 triggerAction : 'all',
172 sortInfo : { direction : 'ASC', field: 'name' },
177 beforeload : function (_self, o){
178 o.params = o.params || {};
180 if (_this.data.params) {
181 Roo.apply(o.params, _this.data.params);
184 o.params.comptype = _this.data.comptype;
185 o.params['!id'] = _this.data.id;
186 o.params['table'] = _this.data.table || 'Companies';
187 if (_this.data.table && _this.data.table == 'Person') {
188 o.params.company_id = _this.data.company_id;
196 url : baseURL + '/Roo/Companies.php',
202 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
205 totalProperty : 'total',