aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-07-28 16:35:27 +0200
committerMario Vavti <mario@mariovavti.com>2016-07-28 16:35:27 +0200
commit500ee4c1bf50efc5a9db419d9ad1c722851c29aa (patch)
tree11a6ae3ee3db89c91d0adb332645a3556c571a5a
parentfc105cf1415cf4124f69d40419b5c52307e993a2 (diff)
downloadvolse-hubzilla-500ee4c1bf50efc5a9db419d9ad1c722851c29aa.tar.gz
volse-hubzilla-500ee4c1bf50efc5a9db419d9ad1c722851c29aa.tar.bz2
volse-hubzilla-500ee4c1bf50efc5a9db419d9ad1c722851c29aa.zip
re-implement progress-bar to work with all browsers
-rw-r--r--view/css/mod_cloud.css7
-rw-r--r--view/js/mod_cloud.js13
2 files changed, 15 insertions, 5 deletions
diff --git a/view/css/mod_cloud.css b/view/css/mod_cloud.css
index 51c3709c1..eb5bec1f1 100644
--- a/view/css/mod_cloud.css
+++ b/view/css/mod_cloud.css
@@ -47,3 +47,10 @@
opacity: 0.5;
box-shadow: inset 0 0px 7px #5cb85c;
}
+
+.upload-progress-bar {
+ background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mOM2RFTDwAE2QHxFMHIIwAAAABJRU5ErkJggg==') repeat-y;
+ background-size: 3px;
+ padding: 0px !important;
+ height: 3px;
+}
diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js
index ea1ce35a7..72e6185d6 100644
--- a/view/js/mod_cloud.js
+++ b/view/js/mod_cloud.js
@@ -88,11 +88,14 @@ function UploadFileSelectHandler(e) {
function prepareHtml(f, i) {
$("#cloud-index tr:nth-child(2)").after(
- '<tr class=\"new-upload\">' +
- '<td><i class=\"fa ' + getIconFromType(f.type) + '\" title=\"' + f.type + '\"></i></td>' +
+ '<tr class="new-upload">' +
+ '<td><i class="fa ' + getIconFromType(f.type) + '" title="' + f.type + '"></i></td>' +
'<td>' + f.name + '</td>' +
- '<td id=\"upload-progress-' + i + '\"></td><td></td><td></td><td></td><td></td>' +
- '<td class=\"hidden-xs\">' + formatSizeUnits(f.size) + '</td><td class=\"hidden-xs\"></td>' +
+ '<td id="upload-progress-' + i + '"></td><td></td><td></td><td></td><td></td>' +
+ '<td class="hidden-xs">' + formatSizeUnits(f.size) + '</td><td class="hidden-xs"></td>' +
+ '</tr>' +
+ '<tr class="new-upload">' +
+ '<td id="upload-progress-bar-' + i + '" colspan="9" class="upload-progress-bar"></td>' +
'</tr>'
);
}
@@ -166,7 +169,7 @@ function UploadFile(file, idx) {
var total = e.totalSize || e.total;
// Dynamically update the percentage complete displayed in the file upload list
$('#upload-progress-' + idx).html(Math.round(done / total * 100) + '%');
- $('#new-upload-' + idx).css('background-size', Math.round(done / total * 100) + '%');
+ $('#upload-progress-bar-' + idx).css('background-size', Math.round(done / total * 100) + '%');
});
xhr.addEventListener('load', function (e) {