Skip to content

Commit

Permalink
WebClient: make directory loading message more evident
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola Murino <[email protected]>
  • Loading branch information
drakkan committed Feb 18, 2024
1 parent d92f85d commit 19d405f
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions templates/webclient/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ <h3 data-i18n="fs.upload.message_empty" class="fs-5 fw-bold text-gray-900 mb-1">
<button data-i18n="general.submit" type="button" id="upload_files_empty_button" class="btn btn-primary">Submit</button>
</div>
</div>
<div id="file_manager_list_container">
<div id="loader" class="align-items-center text-center my-10">
<span class="spinner-border w-15px h-15px text-muted align-middle me-2"></span>
<span data-i18n="general.loading" class="text-gray-700">Loading...</span>
</div>
<div id="file_manager_list_container" class="d-none">
<table id="file_manager_list" class="table align-middle table-row-dashed fs-6 gy-5">
<thead>
<tr class="text-start text-muted fw-bold fs-6 gs-0 text-gray-500">
Expand Down Expand Up @@ -735,10 +739,19 @@ <h3 data-i18n="fs.upload.message_empty" class="fs-5 fw-bold text-gray-900 mb-1">
emptyTable: $.t('fs.no_files_folders')
},
orderFixed: [1, 'asc'],
order: [2, 'asc']
order: [2, 'asc'],
initComplete: function(settings, json) {
$('#loader').addClass("d-none");
$('#file_manager_list_container').removeClass("d-none");
let api = $.fn.dataTable.Api(settings);
api.columns.adjust().draw("page");
drawAction();
}
});

dt.on('draw', function () {
dt.on('draw', drawAction);

function drawAction() {
//{{- if .CanAddFiles}}
if (dt.rows().count() === 0) {
$('#file_manager_list_container').addClass("d-none");
Expand Down Expand Up @@ -771,7 +784,7 @@ <h3 data-i18n="fs.upload.message_empty" class="fs-5 fw-bold text-gray-900 mb-1">
toggleToolbars();
handleRowActions();
$('#file_manager_list_body').localize();
});
}

dt.on('user-select', function(e, dt, type, cell, originalEvent){
let pageSelected = dt.rows({ selected: true, page: 'current' }).count();
Expand Down

0 comments on commit 19d405f

Please sign in to comment.