mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 03:46:39 +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
|
sort: projectsViewSort
|
||||||
},
|
},
|
||||||
success: function(data) {
|
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-absent').hide();
|
||||||
$('#projects-present').show();
|
$('#projects-present').show();
|
||||||
viewContainer.html(data.html);
|
|
||||||
} else {
|
} else {
|
||||||
$('#projects-present').hide();
|
$('#projects-present').hide();
|
||||||
$('#projects-absent').show();
|
$('#projects-absent').show();
|
||||||
|
@ -664,7 +664,16 @@
|
||||||
{ data: 'tasks' },
|
{ data: 'tasks' },
|
||||||
{ data: 'actions' }
|
{ data: 'actions' }
|
||||||
],
|
],
|
||||||
|
fnPreDrawCallback: function() {
|
||||||
|
$('#projects-absent').hide();
|
||||||
|
$('#projects-present').show();
|
||||||
|
},
|
||||||
fnDrawCallback: function() {
|
fnDrawCallback: function() {
|
||||||
|
var $table = TABLE.table().node();
|
||||||
|
if ($('.dataTables_empty', $table).length) {
|
||||||
|
$('#projects-present').hide();
|
||||||
|
$('#projects-absent').show();
|
||||||
|
}
|
||||||
animateSpinner(this, false);
|
animateSpinner(this, false);
|
||||||
updateDataTableSelectAllCtrl();
|
updateDataTableSelectAllCtrl();
|
||||||
initRowSelection();
|
initRowSelection();
|
||||||
|
|
Loading…
Add table
Reference in a new issue