BUG 8260 Adjustment in Confirmation to drag and drop a user defined field.
This commit is contained in:
@@ -1231,6 +1231,8 @@ function unsetReportFields(records) {
|
||||
|
||||
var PMRow = availableGrid.getStore().recordType;
|
||||
var indexes = new Array();
|
||||
var recordsUsrDef = new Array();
|
||||
var fieldName = '';
|
||||
|
||||
for (i=0; i < records.length; i++) {
|
||||
if (records[i].data['field_dyn'] != '') {
|
||||
@@ -1248,11 +1250,27 @@ function unsetReportFields(records) {
|
||||
{
|
||||
records[i] = null;
|
||||
}
|
||||
else {
|
||||
if (records[i].data['field_dyn'] == '' || records[i].data['field_dyn'] == null) {
|
||||
if (fieldName.length > 0) {
|
||||
fieldName += ', '
|
||||
}
|
||||
fieldName += records[i].data['field_name'];
|
||||
recordsUsrDef.push(records[i]);
|
||||
records[i] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ext.each(records, assignedGrid.store.remove, assignedGrid.store);
|
||||
|
||||
if (recordsUsrDef.length > 0 ) {
|
||||
PMExt.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_REMOVE_FIELDS') + ' ' + fieldName + '?', function(){
|
||||
Ext.each(recordsUsrDef, assignedGrid.store.remove, assignedGrid.store);
|
||||
});
|
||||
}
|
||||
|
||||
if (indexes.length == 0) {
|
||||
mainMask.hide();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user