summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2015-12-01 18:41:05 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2015-12-01 18:41:05 (GMT)
commit17c7d3a6f0f7c511dfc8c008e7be19d44c883396 (patch)
treeb4d26a32a04e7ecce0740480fb6ae15266fdd260 /www
parent68c56c028f3b4b35998f788906420d16533cf6bc (diff)
jingle: fix progress bar style
Diffstat (limited to 'www')
-rw-r--r--www/index.html13
-rw-r--r--www/js/jingles.js18
2 files changed, 15 insertions, 16 deletions
diff --git a/www/index.html b/www/index.html
index 4af12a1..071e96c 100644
--- a/www/index.html
+++ b/www/index.html
@@ -184,6 +184,19 @@
</thead>
<tbody>
</tbody>
+ <tfoot>
+ <tr class="progressBar hidden">
+ <td class="file-bytes">
+ -
+ </td>
+ <td>
+ <div class="progress"><div class="bar" style="width: 0%;"></div></div>
+ </td>
+ <td>
+ <button class="btn btn-danger btn-mini"><i class="icon-remove icon-white"></i> Abbrechen</button>
+ </td>
+ </tr>
+ </tfoot>
</table>
<button class="uploadButton btn btn-success btn"><i class="icon-upload icon-white"></i> Importieren</button>
</div>
diff --git a/www/js/jingles.js b/www/js/jingles.js
index 39b7471..13df2bf 100644
--- a/www/js/jingles.js
+++ b/www/js/jingles.js
@@ -198,31 +198,17 @@ JingleGroup.prototype.render = function() {
$('table > tbody', self.$el).append(cut.render());
});
}
- $('table > tbody', self.$el).append(this.renderProgressbar());
-};
-
-JingleGroup.prototype.renderProgressbar = function() {
- var progress_bar = '<div class="progress"><div class="bar" style="width: 0%;"></div></div>';
- var cancel_button = '<button class="btn btn-danger btn-mini">' +
- '<i class="icon-remove icon-white"></i> Abbrechen</button>';
-
- return $('<tr>').addClass('progressBar').hide()
- .append($('<td>').text(''))
- .append($('<td>').addClass('file-name').text('-'))
- .append($('<td>').addClass('file-bytes').text('??.? von ??.? MB'))
- .append($('<td colspan=3>').append(progress_bar))
- .append($('<td>').css('text-align', 'center').append(cancel_button));
};
JingleGroup.prototype.uploading = function() {
console.log('uploading!');
- $('table > tbody .progressBar', this.$el).show();
+ $('table > tfoot .progressBar', this.$el).removeClass('hidden');
};
JingleGroup.prototype.uploadProgress = function(file) {
console.log('uploadProgress!');
- var stats = $('table > tbody .progressBar', this.$el);
+ var stats = $('table > tfoot .progressBar', this.$el);
if(file.upload.progress < 99) {
var bytes_str = Number((file.upload.bytesSent/1024)/1024).toFixed(1) + " von " +