Added multiple drop/delete functionality for the table constraints. Fixes #3900

This commit is contained in:
Khushboo Vashi
2020-04-22 15:45:48 +05:30
committed by Akshay Joshi
parent 553eeb034d
commit 6e5dbf7beb
9 changed files with 206 additions and 3 deletions

View File

@@ -354,7 +354,13 @@ define([
msg = undefined,
title = undefined;
_.each(sel_row_models, function(r){ sel_rows.push(r.id); });
if (node.type && node.type == 'coll-constraints') {
// In order to identify the constraint type, the type should be passed to the server
sel_rows = sel_row_models.map(row => ({id: row.get('oid'), _type: row.get('_type')}));
}
else {
sel_rows = sel_row_models.map(row => row.id);
}
if (sel_rows.length === 0) {
Alertify.alert(gettext('Drop Multiple'),