mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-09 22:23:28 +08:00
Fix showing projects in table view when all are archived [SCI-2787]
This commit is contained in:
parent
c89488e105
commit
6447750ff7
1 changed files with 11 additions and 2 deletions
|
@ -435,10 +435,10 @@
|
|||
sort: projectsViewSort
|
||||
},
|
||||
success: function(data) {
|
||||
if (data.html.search('id="edit-project-cards-form-') > 0) {
|
||||
if (data.html.search(/id="edit-project-cards-form-\d+"/)) {
|
||||
viewContainer.html(data.html);
|
||||
$('#projects-absent').hide();
|
||||
$('#projects-present').show();
|
||||
viewContainer.html(data.html);
|
||||
} else {
|
||||
$('#projects-present').hide();
|
||||
$('#projects-absent').show();
|
||||
|
@ -664,7 +664,16 @@
|
|||
{ data: 'tasks' },
|
||||
{ data: 'actions' }
|
||||
],
|
||||
fnPreDrawCallback: function() {
|
||||
$('#projects-absent').hide();
|
||||
$('#projects-present').show();
|
||||
},
|
||||
fnDrawCallback: function() {
|
||||
var $table = TABLE.table().node();
|
||||
if ($('.dataTables_empty', $table).length) {
|
||||
$('#projects-present').hide();
|
||||
$('#projects-absent').show();
|
||||
}
|
||||
animateSpinner(this, false);
|
||||
updateDataTableSelectAllCtrl();
|
||||
initRowSelection();
|
||||
|
|
Loading…
Reference in a new issue