mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-14 10:53:01 +08:00
Merge pull request #680 from okriuchykhin/ok_SCI_1365
Remove row selection after assign/unassign in repositories [SCI-1365]
This commit is contained in:
commit
da87a41c86
1 changed files with 11 additions and 0 deletions
|
@ -453,10 +453,12 @@ function onClickAssignRecords() {
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
HelperModule.flashAlertMsg(data.flash, 'success');
|
HelperModule.flashAlertMsg(data.flash, 'success');
|
||||||
onClickCancel();
|
onClickCancel();
|
||||||
|
clearRowSelection();
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
HelperModule.flashAlertMsg(data.responseJSON.flash, 'danger');
|
HelperModule.flashAlertMsg(data.responseJSON.flash, 'danger');
|
||||||
onClickCancel();
|
onClickCancel();
|
||||||
|
clearRowSelection();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -471,10 +473,12 @@ function onClickUnassignRecords() {
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
HelperModule.flashAlertMsg(data.flash, 'success');
|
HelperModule.flashAlertMsg(data.flash, 'success');
|
||||||
onClickCancel();
|
onClickCancel();
|
||||||
|
clearRowSelection();
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
HelperModule.flashAlertMsg(data.responseJSON.flash, 'danger');
|
HelperModule.flashAlertMsg(data.responseJSON.flash, 'danger');
|
||||||
onClickCancel();
|
onClickCancel();
|
||||||
|
clearRowSelection();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -764,6 +768,13 @@ function clearAllErrors() {
|
||||||
$('#alert-container').find('div').remove();
|
$('#alert-container').find('div').remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearRowSelection() {
|
||||||
|
$('.dt-body-center .repository-row-selector').prop('checked', false);
|
||||||
|
$('.dt-body-center .repository-row-selector').closest('tr')
|
||||||
|
.removeClass('selected');
|
||||||
|
rowsSelected = [];
|
||||||
|
}
|
||||||
|
|
||||||
// Restore previous table
|
// Restore previous table
|
||||||
function onClickCancel() {
|
function onClickCancel() {
|
||||||
if ($('#assigned').text().length === 0) {
|
if ($('#assigned').text().length === 0) {
|
||||||
|
|
Loading…
Reference in a new issue