FIX: Javascript error when uploading backup

This commit is contained in:
Robin Ward
2014-12-08 12:38:12 -05:00
parent f0dda91364
commit 7069ee16e2
2 changed files with 30 additions and 8 deletions

View File

@ -9,13 +9,8 @@
error="errorAction"
uploadText="UPLOAD"
}}
@class ResumableUploadComponent
@extends Ember.Component
@namespace Discourse
@module Discourse
**/
Discourse.ResumableUploadComponent = Ember.Component.extend({
Discourse.ResumableUploadComponent = Ember.Component.extend(Discourse.StringBuffer, {
tagName: "button",
classNames: ["btn", "ru"],
classNameBindings: ["isUploading"],
@ -25,7 +20,7 @@ Discourse.ResumableUploadComponent = Ember.Component.extend({
isUploading: false,
progress: 0,
shouldRerender: Discourse.View.renderIfChanged("isUploading", "progress"),
rerenderTriggers: ['isUploading', 'progress'],
text: function() {
if (this.get("isUploading")) {
@ -35,7 +30,7 @@ Discourse.ResumableUploadComponent = Ember.Component.extend({
}
}.property("isUploading", "progress"),
render: function(buffer) {
renderString: function(buffer) {
var icon = this.get("isUploading") ? "times" : "upload";
buffer.push("<i class='fa fa-" + icon + "'></i>");
buffer.push("<span class='ru-label'>" + this.get("text") + "</span>");