diff options
-rw-r--r-- | www/index.html | 13 | ||||
-rw-r--r-- | www/js/jingles.js | 18 |
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 " + |