From c79dec298dc05e6849fb96c7e9ba66aae80f29f6 Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Wed, 21 Aug 2013 20:07:14 +0100 Subject: [PATCH] Altered mixedit --- static/js/app/views/mix/mixEditView.coffee | 19 ++++++++-------- static/js/app/views/mix/mixEditView.js | 26 ++++++++++------------ 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/static/js/app/views/mix/mixEditView.coffee b/static/js/app/views/mix/mixEditView.coffee index d9cefaf..63996dd 100755 --- a/static/js/app/views/mix/mixEditView.coffee +++ b/static/js/app/views/mix/mixEditView.coffee @@ -19,16 +19,15 @@ define ['app.lib/editableView', 'moment', 'utils', 'libs/backbone/backbone.sypho @state = 0 onDomRefresh: -> - if not @model.id - $("#fileupload", @el).fileupload - downloadTemplateId: undefined - url: "/_upload/" - start: -> - $("#mix-details", @el).show() - done: => - @state++; - $("#div-upload-mix", @el).hide() - @checkRedirect() + $("#fileupload", @el).fileupload + downloadTemplateId: undefined + url: "/_upload/" + start: -> + $("#mix-details", @el).show() + done: => + @state++; + $("#div-upload-mix", @el).hide() + @checkRedirect() onRender: -> console.log("MixEditView: onRender") diff --git a/static/js/app/views/mix/mixEditView.js b/static/js/app/views/mix/mixEditView.js index e67883d..ad702f0 100755 --- a/static/js/app/views/mix/mixEditView.js +++ b/static/js/app/views/mix/mixEditView.js @@ -37,20 +37,18 @@ MixEditView.prototype.onDomRefresh = function() { var _this = this; - if (!this.model.id) { - return $("#fileupload", this.el).fileupload({ - downloadTemplateId: void 0, - url: "/_upload/", - start: function() { - return $("#mix-details", this.el).show(); - }, - done: function() { - _this.state++; - $("#div-upload-mix", _this.el).hide(); - return _this.checkRedirect(); - } - }); - } + return $("#fileupload", this.el).fileupload({ + downloadTemplateId: void 0, + url: "/_upload/", + start: function() { + return $("#mix-details", this.el).show(); + }, + done: function() { + _this.state++; + $("#div-upload-mix", _this.el).hide(); + return _this.checkRedirect(); + } + }); }; MixEditView.prototype.onRender = function() {