listeners : {
click : function (_self, e)
{
- _this.dialog.el.mask("Merging");
+
_this.form.doAction("submit");
}
if (action.type =='submit') {
- _this.dialog.el.unmask();
- _this.dialog.hide();
+ _this.dialog.hide();
if (_this.callback) {
_this.callback.call(_this, _this.form.getValues());
return;
}
if (action.type == 'setdata') {
- _this.data.table = _this.data.table || 'Companies';
- _this.form.findField('table').setValue(_this.data.table);
- var title = _this.data.title || _this.data.comptype;
+
+ var title = _this.data.title || _this.data.etype;
_this.dialog.setTitle("Delete selected " + title + " and merge data with");
- _this.form.findField('merge_id').store.proxy.conn.url = baseURL + '/Roo/' + _this.data.table + '.php';
- _this.form.findField('merge_id').emptyText = "Select " + title;
- _this.form.findField('merge_id').reset();
+
return;
}
},
actionfailed : function (_self, action)
{
- _this.dialog.el.unmask();
+
Pman.standardActionFailed(_self, action);
},
rendered : function (form)
name : '_merge_id_name',
pageSize : 20,
qtip : _this._strings['bf8691517ce00a09186a05cd65863091'] /* Select Item to Merge With */,
- queryParam : 'query[name]',
+ queryParam : 'query[search_begins]',
selectOnFocus : true,
- tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
+ tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> {name}</div>',
triggerAction : 'all',
typeAhead : true,
valueField : 'id',
beforeload : function (_self, o){
o.params = o.params || {};
- if (_this.data.params) {
- Roo.apply(o.params, _this.data.params);
- }
-
- o.params.comptype = _this.data.comptype;
- o.params['!id'] = _this.data.id;
- o.params['table'] = _this.data.table || 'Companies';
- if (_this.data.table && _this.data.table == 'Person') {
- o.params.company_id = _this.data.company_id;
- }
+ o.params['etype'] = _this.data.etype;
+ o.params['!id'] = _this.form.findField('id').getValue();
// set more here
}
},
proxy : {
method : 'GET',
- url : baseURL + '/Roo/Companies.php',
+ url : baseURL + '/Roo/Core_enum',
xns : Roo.data,
'|xns' : 'Roo.data',
xtype : 'HttpProxy'
}
},
{
- name : 'table',
+ name : 'etype',
xns : Roo.form,
'|xns' : 'Roo.form',
xtype : 'Hidden'