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);
var title = _this.data.title || _this.data.etype;
_this.dialog.setTitle("Delete selected " + title + " and merge data with");
- console.log("_ids:>>>>>"+_this.data._ids);
- if(!_this.data._ids){
+
+ if(typeof(_this.data._ids) == "undefined"){
this.load({ method: 'GET', params: { '_id' : _this.data.id }});
- _this.form.findField('id').setValue(_this.data.id);
return;
}
- _this.form.findField('_names').setValue(_this.data.materialList);
+ _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
}
},