this.callback = cb;
this.data = data;
- this.dialog.show(this.data._el);
+ this.dialog.show.apply(this.dialog, Array.prototype.slice.call(arguments).slice(2));
if (this.form) {
this.form.reset();
this.form.setValues(data);
_this.dialog.setTitle("Delete selected " + title + " and merge data with");
- if(_this.data._ids == ""){
- console.log("fuk");
+ if(typeof(_this.data._ids) == "undefined"){
this.load({ method: 'GET', params: { '_id' : _this.data.id }});
- _this.form.findField('id').setValue(_this.data.id);
return;
}
- console.log("fuk2");
_this.form.findField('_names').setValue(_this.data._names);
_this.form.findField('_ids').setValue(_this.data._ids);
return;
o.params['etype'] = _this.data.etype;
- o.params['!id'] = _this.form.findField('id').getValue();
+ var ids = _this.form.findField('_ids').getValue();
+ if (ids.length) {
+ var xids = ids.split(',');
+ for(var i =0;i < xids.length; i++) {
+ o.params['!id[' + i + ']'] = xids[i];
+ }
+ } else {
+ o.params['!id'] = _this.form.findField('id').getValue();
+ }
// set more here
}
},