mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-09 05:37:36 +08:00
Fix visibility of archived by and on column in repository [SCI-7674][7924] (#4973)
This commit is contained in:
parent
20339a6723
commit
aa3ea584a9
2 changed files with 6 additions and 5 deletions
|
|
@ -567,6 +567,9 @@ var RepositoryDatatable = (function(global) {
|
|||
return columns;
|
||||
}()),
|
||||
drawCallback: function() {
|
||||
var archived = $('.repository-show').hasClass('archived');
|
||||
var archivedOnIndex = TABLE.column('#archived-on').index();
|
||||
var archivedByIndex = TABLE.column('#archived-by').index();
|
||||
animateSpinner(this, false);
|
||||
changeToViewMode();
|
||||
updateDataTableSelectAllCtrl();
|
||||
|
|
@ -581,9 +584,7 @@ var RepositoryDatatable = (function(global) {
|
|||
// Hide edit button if not all selected rows are on the current page
|
||||
$('#editRepositoryRecord').prop('disabled', !allSelectedRowsAreOnPage());
|
||||
|
||||
if ($('.repository-show').hasClass('archived')) {
|
||||
TABLE.columns([6, 7]).visible(true);
|
||||
}
|
||||
TABLE.columns([archivedOnIndex, archivedByIndex]).visible(archived);
|
||||
},
|
||||
preDrawCallback: function() {
|
||||
var archived = $('.repository-show').hasClass('archived');
|
||||
|
|
|
|||
|
|
@ -152,12 +152,12 @@
|
|||
viewSwitch.on('click', '.view-switch-archived', function() {
|
||||
$('.repository-show').removeClass('active').addClass('archived');
|
||||
$('#manage-repository-column').removeClass('active').addClass('archived');
|
||||
initTable();
|
||||
RepositoryDatatable.reload();
|
||||
});
|
||||
viewSwitch.on('click', '.view-switch-active', function() {
|
||||
$('.repository-show').removeClass('archived').addClass('active');
|
||||
$('#manage-repository-column').removeClass('archived').addClass('active');
|
||||
initTable();
|
||||
RepositoryDatatable.reload();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue