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 'bf8691517ce00a09186a05cd65863091' :"Select Item to Merge With",
11 '298a183cfe4fddedd4bd17abe8aeb685' :"Merge Pulldown Option",
12 '03e956f1dca2b4d525df03cb1899cb6f' :"Merge with",
13 '1243daf593fa297e07ab03bf06d925af' :"Searching...",
14 '68be4837f6c739877233e527a996dd00' :"Merge",
15 'ea4788705e6873b424c65e91c2846b19' :"Cancel"
21 show : function(data, cb)
29 this.dialog.show(this.data._el);
32 this.form.setValues(data);
33 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
41 this.dialog = Roo.factory({
47 title : _this._strings['298a183cfe4fddedd4bd17abe8aeb685'] /* Merge Pulldown Option */,
51 xtype : 'LayoutDialog',
53 show : function (_self)
55 if (_this.isBuilder) {
56 _this.data = { id : 2, comptype : 'SUPPLIER' }
63 xtype : 'LayoutRegion'
67 text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
72 click : function (_self, e)
79 text : _this._strings['68be4837f6c739877233e527a996dd00'] /* Merge */,
84 click : function (_self, e)
86 _this.dialog.el.mask("Merging");
87 _this.form.doAction("submit");
98 xtype : 'ContentPanel',
102 style : 'margin: 10px;',
103 url : baseURL + '/Roo/Core_enum.php',
108 actioncomplete : function (_self, action)
111 if (action.type =='submit') {
113 _this.dialog.el.unmask();
116 if (_this.callback) {
117 _this.callback.call(_this, _this.form.getValues());
122 if (action.type == 'setdata') {
123 _this.data.table = _this.data.table || 'Companies';
124 _this.form.findField('table').setValue(_this.data.table);
125 var title = _this.data.title || _this.data.comptype;
126 _this.dialog.setTitle("Delete selected " + title + " and merge data with");
127 _this.form.findField('merge_id').store.proxy.conn.url = baseURL + '/Roo/' + _this.data.table + '.php';
128 _this.form.findField('merge_id').emptyText = "Select " + title;
129 _this.form.findField('merge_id').reset();
134 actionfailed : function (_self, action)
136 _this.dialog.el.unmask();
137 Pman.standardActionFailed(_self, action);
139 rendered : function (form)
148 displayField : 'name',
149 emptyText : _this._strings['bf8691517ce00a09186a05cd65863091'] /* Select Item to Merge With */,
150 fieldLabel : _this._strings['03e956f1dca2b4d525df03cb1899cb6f'] /* Merge with */,
151 forceSelection : true,
152 hiddenName : '_merge_id',
154 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
156 name : '_merge_id_name',
158 qtip : _this._strings['bf8691517ce00a09186a05cd65863091'] /* Select Item to Merge With */,
159 queryParam : 'query[name]',
160 selectOnFocus : true,
161 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
162 triggerAction : 'all',
171 sortInfo : { direction : 'ASC', field: 'name' },
176 beforeload : function (_self, o){
177 o.params = o.params || {};
179 if (_this.data.params) {
180 Roo.apply(o.params, _this.data.params);
183 o.params.comptype = _this.data.comptype;
184 o.params['!id'] = _this.data.id;
185 o.params['table'] = _this.data.table || 'Companies';
186 if (_this.data.table && _this.data.table == 'Person') {
187 o.params.company_id = _this.data.company_id;
195 url : baseURL + '/Roo/Companies.php',
201 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
204 totalProperty : 'total',