summaryrefslogtreecommitdiff
path: root/www/js/jingles.js
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-24 19:28:33 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-24 19:28:51 (GMT)
commitdd6aa62a59aa80e547785564bb04f0907fd8b0e7 (patch)
treebc85fec64b3facf32d3d32b6b0d675b12bcbccf2 /www/js/jingles.js
parent2af1536627036d0a329237b8ac61bfff16766aa2 (diff)
render filename as spinner until first progress with title is received
Diffstat (limited to 'www/js/jingles.js')
-rw-r--r--www/js/jingles.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/www/js/jingles.js b/www/js/jingles.js
index 8d9ed86..ffaafcd 100644
--- a/www/js/jingles.js
+++ b/www/js/jingles.js
@@ -132,7 +132,7 @@ Rdxport.JingleGroupView.prototype.uploadProgress = function(upload) {
$cut.addClass('uploading');
}
- if (upload.title) {
+ if (!upload.isNew && upload.title) {
$('.file-name', $cut).text(upload.title);
}
if (upload.cartNumber && upload.cutNumber) {
@@ -283,7 +283,12 @@ Rdxport.JingleCutView.prototype.render = function() {
Rdxport.JingleCutView.renderUploading = function(upload) {
var $progressBar = $('.progressBarTemplate.jingles').clone().removeClass('progressBarTemplate');
- $('.file-name', $progressBar).text(upload.title);
+ if (upload.isNew) {
+ var spinner = $('#hiddenTemplates .spinnerTemplate').clone().removeClass('spinnerTemplate');
+ $('.file-name', $progressBar).html(spinner);
+ } else {
+ $('.file-name', $progressBar).text(upload.title);
+ }
var $el = $('<tr>')
.html($progressBar.html())