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.AdminCompanyMerge = {
10 'bf8691517ce00a09186a05cd65863091' :"Select Item to Merge With",
11 'd928853fb4dfe148595cef31a72d52f5' :"Merge Company",
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({
42 xtype : 'LayoutDialog',
48 title : _this._strings['d928853fb4dfe148595cef31a72d52f5'] /* Merge Company */,
51 show : function (_self)
53 if (_this.isBuilder) {
54 _this.data = { id : 2, comptype : 'SUPPLIER' }
61 xtype : 'LayoutRegion',
68 text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
70 click : function (_self, e)
80 text : _this._strings['68be4837f6c739877233e527a996dd00'] /* Merge */,
82 click : function (_self, e)
85 _this.form.doAction("submit");
95 xtype : 'ContentPanel',
103 style : 'margin: 10px;',
104 url : baseURL + '/Roo/Core_enum.php',
106 actioncomplete : function (_self, action)
109 if (action.type =='submit') {
113 if (_this.callback) {
114 _this.callback.call(_this, _this.form.getValues());
119 if (action.type == 'setdata') {
121 var title = _this.data.title || _this.data.etype;
122 _this.dialog.setTitle("Delete selected " + title + " and merge data with");
128 actionfailed : function (_self, action)
131 Pman.standardActionFailed(_self, action);
133 rendered : function (form)
145 displayField : 'name',
146 emptyText : _this._strings['bf8691517ce00a09186a05cd65863091'] /* Select Item to Merge With */,
147 fieldLabel : _this._strings['03e956f1dca2b4d525df03cb1899cb6f'] /* Merge with */,
148 forceSelection : true,
149 hiddenName : '_merge_id',
151 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
153 name : '_merge_id_name',
155 qtip : _this._strings['bf8691517ce00a09186a05cd65863091'] /* Select Item to Merge With */,
156 queryParam : 'query[search_begins]',
157 selectOnFocus : true,
158 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> {name}</div>',
159 triggerAction : 'all',
168 sortInfo : { direction : 'ASC', field: 'name' },
170 beforeload : function (_self, o){
171 o.params = o.params || {};
173 o.params['etype'] = _this.data.etype;
175 o.params['!id'] = _this.form.findField('id').getValue();
184 url : baseURL + '/Roo/Core_enum',
189 xtype : 'JsonReader',
190 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
193 totalProperty : 'total',