Altered mixedit

This commit is contained in:
Fergal Moran
2013-08-21 20:07:14 +01:00
parent d6af13995f
commit c79dec298d
2 changed files with 21 additions and 24 deletions

View File

@@ -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")

View File

@@ -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() {