aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2021-10-01 21:52:30 +0200
committerMario Vavti <mario@mariovavti.com>2021-10-01 21:52:30 +0200
commit47e83a15c1168cfd8ebc7905db853f3db6b3b31b (patch)
tree2cd700af6107995b2a35058ea7256bc30bf4266d /view/js
parent597e847a3b245140042f18fa34c0b25ef8445256 (diff)
downloadvolse-hubzilla-47e83a15c1168cfd8ebc7905db853f3db6b3b31b.tar.gz
volse-hubzilla-47e83a15c1168cfd8ebc7905db853f3db6b3b31b.tar.bz2
volse-hubzilla-47e83a15c1168cfd8ebc7905db853f3db6b3b31b.zip
import_progress: deal with the situation where items/files are being imported but there are none to import
Diffstat (limited to 'view/js')
-rw-r--r--view/js/mod_import_progress.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/view/js/mod_import_progress.js b/view/js/mod_import_progress.js
index acfb78de8..7aed56365 100644
--- a/view/js/mod_import_progress.js
+++ b/view/js/mod_import_progress.js
@@ -8,39 +8,41 @@ $(document).ready(function() {
}
function update_progress(data){
+
+ // items
if (typeof data.cprogress == 'number') {
$('#cprogress-label').html(data.cprogress + '%');
$('#cprogress-bar').css('width', data.cprogress + '%');
if (data.cprogress == 100) {
$('#cprogress-resume').addClass('d-none');
- $('#cprogress-complete').removeClass('d-none');
+ $('#cprogress-completed').removeClass('d-none');
$('#cprogress-bar').removeClass('progress-bar-animated');
}
else if (data.cprogress < 100) {
$('#cprogress-resume').removeClass('d-none');
- $('#cprogress-complete').addClass('d-none');
+ $('#cprogress-completed').addClass('d-none');
$('#cprogress-bar').addClass('progress-bar-animated');
}
}
else {
$('#cprogress-label').html(data.cprogress);
$('#cprogress-bar').css('width', '0%');
-
}
+ // files
if (typeof data.fprogress == 'number') {
$('#fprogress-label').html(data.fprogress + '%');
$('#fprogress-bar').css('width', data.fprogress + '%');
if (data.fprogress == 100) {
$('#fprogress-resume').addClass('d-none');
- $('#fprogress-complete').removeClass('d-none');
+ $('#fprogress-completed').removeClass('d-none');
$('#fprogress-bar').removeClass('progress-bar-animated');
}
else if (data.fprogress < 100) {
$('#fprogress-resume').removeClass('d-none');
- $('#fprogress-complete').addClass('d-none');
+ $('#fprogress-completed').addClass('d-none');
$('#fprogress-bar').addClass('progress-bar-animated');
}
}