diff --git a/spa/api/v1/GenreResource.py b/spa/api/v1/GenreResource.py index 0f851d5..d45fff0 100644 --- a/spa/api/v1/GenreResource.py +++ b/spa/api/v1/GenreResource.py @@ -11,6 +11,9 @@ class GenreResource(BackboneCompatibleResource): resource_name = 'genres' excludes = ['resource_uri'] + filtering = { + 'slug': ('exact',), + } authorization = Authorization() authentication = Authentication() always_return_data = True diff --git a/static/js/app/lib/controller.coffee b/static/js/app/lib/controller.coffee index 477dc81..24876fe 100755 --- a/static/js/app/lib/controller.coffee +++ b/static/js/app/lib/controller.coffee @@ -27,7 +27,7 @@ define ['app', 'marionette', 'vent', 'utils' @showMixList({stream: true}) showMixListType: (type) -> - @showMixList({order_by: type}) + @showMixList({genres__slug: type, order_by: 'latest'}) showMix: (slug)-> console.log "Controller: showMix" diff --git a/static/js/app/lib/controller.js b/static/js/app/lib/controller.js index bee763e..604c461 100755 --- a/static/js/app/lib/controller.js +++ b/static/js/app/lib/controller.js @@ -1,219 +1,217 @@ // Generated by CoffeeScript 1.4.0 -(function() { - var __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; +var __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - define(['app', 'marionette', 'vent', 'utils', 'views/mix/mixListLayout', 'views/mix/mixListView', 'views/mix/mixDetailView', 'views/mix/mixEditView', 'views/user/userProfileView', 'views/user/userListView', 'views/user/userEditView', 'models/mix/mixCollection', 'models/mix/mixItem', 'models/user/userItem'], function(App, Marionette, vent, utils, MixListLayout, MixListView, MixDetailView, MixEditView, UserProfileView, UserListView, UserEditView, MixCollection, MixItem, UserItem) { - var DssController; - DssController = (function(_super) { +define(['app', 'marionette', 'vent', 'utils', 'views/mix/mixListLayout', 'views/mix/mixListView', 'views/mix/mixDetailView', 'views/mix/mixEditView', 'views/user/userProfileView', 'views/user/userListView', 'views/user/userEditView', 'models/mix/mixCollection', 'models/mix/mixItem', 'models/user/userItem'], function(App, Marionette, vent, utils, MixListLayout, MixListView, MixDetailView, MixEditView, UserProfileView, UserListView, UserEditView, MixCollection, MixItem, UserItem) { + var DssController; + DssController = (function(_super) { - __extends(DssController, _super); + __extends(DssController, _super); - function DssController() { - return DssController.__super__.constructor.apply(this, arguments); - } + function DssController() { + return DssController.__super__.constructor.apply(this, arguments); + } - DssController.prototype.initialize = function() { - return this.listenTo(vent, "mix:random", this.showRandomMix); - }; + DssController.prototype.initialize = function() { + return this.listenTo(vent, "mix:random", this.showRandomMix); + }; - DssController.prototype.home = function() { - console.log("Controller: home"); - return this.showMixList(); - }; + DssController.prototype.home = function() { + console.log("Controller: home"); + return this.showMixList(); + }; - DssController.prototype.doLogin = function() { - return vent.trigger('app:login'); - }; + DssController.prototype.doLogin = function() { + return vent.trigger('app:login'); + }; - DssController.prototype.showMixList = function(options) { - var app; - app = require('app'); - app.contentRegion.show(new MixListLayout(options || { - order_by: 'latest' - })); - return vent.trigger('mix:showlist', options || { - order_by: 'latest' - }); - }; + DssController.prototype.showMixList = function(options) { + var app; + app = require('app'); + app.contentRegion.show(new MixListLayout(options || { + order_by: 'latest' + })); + return vent.trigger('mix:showlist', options || { + order_by: 'latest' + }); + }; - DssController.prototype.showStreamList = function() { - return this.showMixList({ - stream: true - }); - }; + DssController.prototype.showStreamList = function() { + return this.showMixList({ + stream: true + }); + }; - DssController.prototype.showMixListType = function(type) { - return this.showMixList({ - order_by: type - }); - }; + DssController.prototype.showMixListType = function(type) { + return this.showMixList({ + genres__slug: type, + order_by: 'latest' + }); + }; - DssController.prototype.showMix = function(slug) { - var app, mix; - console.log("Controller: showMix"); - app = require('app'); - mix = new MixItem({ - id: slug - }); - return mix.fetch({ - success: function() { - return app.contentRegion.show(new MixDetailView({ - model: mix - })); - } - }); - }; + DssController.prototype.showMix = function(slug) { + var app, mix; + console.log("Controller: showMix"); + app = require('app'); + mix = new MixItem({ + id: slug + }); + return mix.fetch({ + success: function() { + return app.contentRegion.show(new MixDetailView({ + model: mix + })); + } + }); + }; - DssController.prototype.showRandomMix = function() { - var app, mix; - console.log("Controller: showRandomMix"); - app = require('app'); - mix = new MixItem({ - id: 'random' - }); - mix.fetch({ - success: function() { - return app.contentRegion.show(new MixDetailView({ - model: mix - })); - } - }); - return Backbone.history.navigate("/random", { - trigger: false - }); - }; + DssController.prototype.showRandomMix = function() { + var app, mix; + console.log("Controller: showRandomMix"); + app = require('app'); + mix = new MixItem({ + id: 'random' + }); + mix.fetch({ + success: function() { + return app.contentRegion.show(new MixDetailView({ + model: mix + })); + } + }); + return Backbone.history.navigate("/random", { + trigger: false + }); + }; - DssController.prototype.uploadMix = function() { - var app, mix; - console.log("Controller: mixUpload"); - app = require('app'); - mix = new MixItem({ - title: '', - description: '', - mix_image: com.podnoms.settings.staticUrl + 'img/default-track.png', - download_allowed: true, - is_featured: false - }); - app.contentRegion.show(new MixEditView({ - model: mix - })); - return true; - }; + DssController.prototype.uploadMix = function() { + var app, mix; + console.log("Controller: mixUpload"); + app = require('app'); + mix = new MixItem({ + title: '', + description: '', + mix_image: com.podnoms.settings.staticUrl + 'img/default-track.png', + download_allowed: true, + is_featured: false + }); + app.contentRegion.show(new MixEditView({ + model: mix + })); + return true; + }; - DssController.prototype.editMix = function(slug) { - var app, mix; - console.log("Controller: mixEdit"); - app = require('app'); - mix = new MixItem({ - id: slug - }); - mix.fetch({ - success: function() { - return app.contentRegion.show(new MixEditView({ - model: mix - })); - } - }); - return true; - }; + DssController.prototype.editMix = function(slug) { + var app, mix; + console.log("Controller: mixEdit"); + app = require('app'); + mix = new MixItem({ + id: slug + }); + mix.fetch({ + success: function() { + return app.contentRegion.show(new MixEditView({ + model: mix + })); + } + }); + return true; + }; - DssController.prototype.showChat = function() { - var app; - console.log("Controller: showChat"); - app = require('app'); - return app.contentRegion.show(new ChatView()); - }; + DssController.prototype.showChat = function() { + var app; + console.log("Controller: showChat"); + app = require('app'); + return app.contentRegion.show(new ChatView()); + }; - DssController.prototype.showUserList = function() { - var app; - console.log("Controller: showUserList"); - app = require('app'); - return app.contentRegion.show(new UserListView()); - }; + DssController.prototype.showUserList = function() { + var app; + console.log("Controller: showUserList"); + app = require('app'); + return app.contentRegion.show(new UserListView()); + }; - DssController.prototype.showUserProfile = function(slug) { - var app, user; - console.log("Controller: showUserProfile"); - app = require('app'); - user = new UserItem({ - id: slug - }); - return user.fetch({ - success: function() { - return app.contentRegion.show(new UserProfileView({ - model: user - })); - }, - error: function(a, b, c) { - return console.log("Error fetching user"); - } - }); - }; + DssController.prototype.showUserProfile = function(slug) { + var app, user; + console.log("Controller: showUserProfile"); + app = require('app'); + user = new UserItem({ + id: slug + }); + return user.fetch({ + success: function() { + return app.contentRegion.show(new UserProfileView({ + model: user + })); + }, + error: function(a, b, c) { + return console.log("Error fetching user"); + } + }); + }; - DssController.prototype.showUserFavourites = function(slug) { - console.log("Controller: showUserFavourites"); - return this.showMixList({ - order_by: 'latest', - favourites__slug: slug - }); - }; + DssController.prototype.showUserFavourites = function(slug) { + console.log("Controller: showUserFavourites"); + return this.showMixList({ + order_by: 'latest', + favourites__slug: slug + }); + }; - DssController.prototype.showUserLikes = function(slug) { - console.log("Controller: showUserLikes"); - return this.showMixList({ - order_by: 'latest', - likes__slug: slug - }); - }; + DssController.prototype.showUserLikes = function(slug) { + console.log("Controller: showUserLikes"); + return this.showMixList({ + order_by: 'latest', + likes__slug: slug + }); + }; - DssController.prototype.showUserMixes = function(slug) { - console.log("Controller: showUserMixes"); - return this.showMixList({ - order_by: 'latest', - user: slug - }); - }; + DssController.prototype.showUserMixes = function(slug) { + console.log("Controller: showUserMixes"); + return this.showMixList({ + order_by: 'latest', + user: slug + }); + }; - DssController.prototype.showUserFollowing = function(slug) { - var app; - console.log("Controller: showUserFollowing"); - app = require('app'); - return app.contentRegion.show(new UserListView({ - followers__slug: slug - })); - }; + DssController.prototype.showUserFollowing = function(slug) { + var app; + console.log("Controller: showUserFollowing"); + app = require('app'); + return app.contentRegion.show(new UserListView({ + followers__slug: slug + })); + }; - DssController.prototype.showUserFollowers = function(slug) { - var app; - console.log("Controller: showUserFollowers"); - app = require('app'); - return app.contentRegion.show(new UserListView({ - following__slug: slug - })); - }; + DssController.prototype.showUserFollowers = function(slug) { + var app; + console.log("Controller: showUserFollowers"); + app = require('app'); + return app.contentRegion.show(new UserListView({ + following__slug: slug + })); + }; - DssController.prototype.editUser = function() { - var app, user; - console.log("Controller: editUser"); - app = require('app'); - user = new UserItem({ - id: com.podnoms.settings.currentUser - }); - user.fetch({ - success: function() { - return app.contentRegion.show(new UserEditView({ - model: user - })); - } - }); - return true; - }; + DssController.prototype.editUser = function() { + var app, user; + console.log("Controller: editUser"); + app = require('app'); + user = new UserItem({ + id: com.podnoms.settings.currentUser + }); + user.fetch({ + success: function() { + return app.contentRegion.show(new UserEditView({ + model: user + })); + } + }); + return true; + }; - return DssController; - - })(Marionette.Controller); return DssController; - }); -}).call(this); + })(Marionette.Controller); + return DssController; +}); diff --git a/static/js/app/lib/router.js b/static/js/app/lib/router.js index 18c488f..11a37fd 100755 --- a/static/js/app/lib/router.js +++ b/static/js/app/lib/router.js @@ -1,52 +1,49 @@ // Generated by CoffeeScript 1.4.0 -(function() { - var __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; +var __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - define(['marionette', 'vent', 'app.lib/controller'], function(Marionette, vent, Controller) { - var DssRouter; - return DssRouter = (function(_super) { +define(['marionette', 'vent', 'app.lib/controller'], function(Marionette, vent, Controller) { + var DssRouter; + return DssRouter = (function(_super) { - __extends(DssRouter, _super); + __extends(DssRouter, _super); - function DssRouter() { - return DssRouter.__super__.constructor.apply(this, arguments); - } + function DssRouter() { + return DssRouter.__super__.constructor.apply(this, arguments); + } - DssRouter.prototype.controller = new Controller; + DssRouter.prototype.controller = new Controller; - DssRouter.prototype.appRoutes = { - "": "home", - "/": "home", - "mix/upload": "uploadMix", - "mixes": "showMixList", - "mixes/:type": "showMixListType", - "mix/:slug": "showMix", - "mix/edit/:slug": "editMix", - "chat": "showChat", - "random": "showRandomMix", - "stream": "showStreamList", - "login": "doLogin", - "users": "showUserList", - "user/:slug/favourites": "showUserFavourites", - "user/:slug/likes": "showUserLikes", - "user/:slug/followers": "showUserFollowers", - "user/:slug/following": "showUserFollowing", - "user/:slug/mixes": "showUserMixes", - "user/:slug": "showUserProfile", - "me": "editUser" - }; + DssRouter.prototype.appRoutes = { + "": "home", + "/": "home", + "mix/upload": "uploadMix", + "mixes": "showMixList", + "mixes/:type": "showMixListType", + "mix/:slug": "showMix", + "mix/edit/:slug": "editMix", + "chat": "showChat", + "random": "showRandomMix", + "stream": "showStreamList", + "login": "doLogin", + "users": "showUserList", + "user/:slug/favourites": "showUserFavourites", + "user/:slug/likes": "showUserLikes", + "user/:slug/followers": "showUserFollowers", + "user/:slug/following": "showUserFollowing", + "user/:slug/mixes": "showUserMixes", + "user/:slug": "showUserProfile", + "me": "editUser" + }; - DssRouter.prototype.initialize = function() { - console.log("Router: initialize"); - return this.listenTo(vent, "navigate:mix", function(slug) { - return this.navigate('mix/' + slug, true); - }); - }; + DssRouter.prototype.initialize = function() { + console.log("Router: initialize"); + return this.listenTo(vent, "navigate:mix", function(slug) { + return this.navigate('mix/' + slug, true); + }); + }; - return DssRouter; + return DssRouter; - })(Marionette.AppRouter); - }); - -}).call(this); + })(Marionette.AppRouter); +}); diff --git a/static/js/app/models/mix/mixItem.coffee b/static/js/app/models/mix/mixItem.coffee index fcdc86b..a34f565 100755 --- a/static/js/app/models/mix/mixItem.coffee +++ b/static/js/app/models/mix/mixItem.coffee @@ -35,4 +35,4 @@ define [ else error "Comment cannot be empty" - MixItem \ No newline at end of file + MixItem diff --git a/static/js/app/models/mix/mixItem.js b/static/js/app/models/mix/mixItem.js index 349ef76..dc7dbca 100755 --- a/static/js/app/models/mix/mixItem.js +++ b/static/js/app/models/mix/mixItem.js @@ -1,60 +1,57 @@ // Generated by CoffeeScript 1.4.0 -(function() { - var __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; +var __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - define(['utils', 'vent', 'models/comment/commentCollection', 'models/comment/commentItem', 'models/genre/genreCollection', 'models/genre/genreItem', 'app.lib/backbone.dss.model'], function(utils, vent, CommentCollection, CommentItem, GenreCollection, GenreItem, DssModel) { - var MixItem; - return MixItem = (function(_super) { +define(['utils', 'vent', 'models/comment/commentCollection', 'models/comment/commentItem', 'models/genre/genreCollection', 'models/genre/genreItem', 'app.lib/backbone.dss.model'], function(utils, vent, CommentCollection, CommentItem, GenreCollection, GenreItem, DssModel) { + var MixItem; + return MixItem = (function(_super) { - __extends(MixItem, _super); + __extends(MixItem, _super); - function MixItem() { - return MixItem.__super__.constructor.apply(this, arguments); + function MixItem() { + return MixItem.__super__.constructor.apply(this, arguments); + } + + MixItem.prototype.urlRoot = com.podnoms.settings.urlRoot + "mix/"; + + MixItem.prototype.relations = [ + { + type: Backbone.Many, + key: "comments", + relatedModel: CommentItem, + collectionType: CommentCollection + }, { + type: Backbone.Many, + key: "genres", + relatedModel: GenreItem, + collectionType: GenreCollection } + ]; - MixItem.prototype.urlRoot = com.podnoms.settings.urlRoot + "mix/"; - - MixItem.prototype.relations = [ - { - type: Backbone.Many, - key: "comments", - relatedModel: CommentItem, - collectionType: CommentCollection + MixItem.prototype.addComment = function(comment, success, error) { + var c; + c = void 0; + if (comment) { + return c = this.get("comments").create({ + comment: comment, + mix_id: this.get("slug") }, { - type: Backbone.Many, - key: "genres", - relatedModel: GenreItem, - collectionType: GenreCollection - } - ]; + success: function() { + return success(); + }, + error: function() { + return error(); + } + }); + } else { + return error("Comment cannot be empty"); + } + }; - MixItem.prototype.addComment = function(comment, success, error) { - var c; - c = void 0; - if (comment) { - return c = this.get("comments").create({ - comment: comment, - mix_id: this.get("slug") - }, { - success: function() { - return success(); - }, - error: function() { - return error(); - } - }); - } else { - return error("Comment cannot be empty"); - } - }; - - MixItem; + MixItem; - return MixItem; + return MixItem; - })(DssModel); - }); - -}).call(this); + })(DssModel); +}); diff --git a/static/js/app/views/mix/mixEditView.coffee b/static/js/app/views/mix/mixEditView.coffee index b55cc50..3d82be0 100755 --- a/static/js/app/views/mix/mixEditView.coffee +++ b/static/js/app/views/mix/mixEditView.coffee @@ -19,18 +19,9 @@ define ['app.lib/editableView', @detailsEntered = false @patch = false - onDomRefresh: -> - """ - @setupImageEditable - el: $("#mix-image", @el) - chooseMessage: "Choose mix image" - """ - - true - onRender: -> console.log("MixEditView: onRender js") - @ui.progress.hide() + $('.progress', @el).hide() @sendImage = false if not @model.id @@ -80,7 +71,7 @@ define ['app.lib/editableView', ' uploadprogress: (e, progress, bytesSent) => - @ui.progress.show() + $('.progress', @el).hide() @uploadState = 1 percentage = Math.round(progress) console.log("Progressing") diff --git a/static/js/app/views/mix/mixEditView.js b/static/js/app/views/mix/mixEditView.js index 6ed1347..9e55663 100644 --- a/static/js/app/views/mix/mixEditView.js +++ b/static/js/app/views/mix/mixEditView.js @@ -1,77 +1,71 @@ // Generated by CoffeeScript 1.4.0 -(function() { - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; +var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - define(['app.lib/editableView', 'vent', 'moment', 'utils', 'backbone.syphon', 'text!/tpl/MixEditView', 'models/genre/genreCollection', 'lib/jdataview', 'ace', 'dropzone', 'wizard', 'ajaxfileupload', 'jquery.fileupload', 'lib/ace/uncompressed/select2'], function(EditableView, vent, moment, utils, Syphon, Template, GenreCollection, jDataView) { - var MixEditView; - return MixEditView = (function(_super) { +define(['app.lib/editableView', 'vent', 'moment', 'utils', 'backbone.syphon', 'text!/tpl/MixEditView', 'models/genre/genreCollection', 'lib/jdataview', 'ace', 'dropzone', 'wizard', 'ajaxfileupload', 'jquery.fileupload', 'lib/ace/uncompressed/select2'], function(EditableView, vent, moment, utils, Syphon, Template, GenreCollection, jDataView) { + var MixEditView; + return MixEditView = (function(_super) { - __extends(MixEditView, _super); + __extends(MixEditView, _super); - function MixEditView() { - this.saveChanges = __bind(this.saveChanges, this); - return MixEditView.__super__.constructor.apply(this, arguments); + function MixEditView() { + this.saveChanges = __bind(this.saveChanges, this); + return MixEditView.__super__.constructor.apply(this, arguments); + } + + MixEditView.prototype.template = _.template(Template); + + MixEditView.prototype.events = { + "click #login": "login", + "change input[name='...']": "imageChanged" + }; + + MixEditView.prototype.ui = { + image: "#mix-image", + progress: "#mix-upload-progress", + uploadError: '#mix-upload-error' + }; + + MixEditView.prototype.initialize = function() { + this.guid = utils.generateGuid(); + this.uploadState = 0; + this.detailsEntered = false; + return this.patch = false; + }; + + MixEditView.prototype.onRender = function() { + var wizard, + _this = this; + console.log("MixEditView: onRender js"); + $('.progress', this.el).hide(); + this.sendImage = false; + if (!this.model.id) { + $('input[name="upload-hash"]', this.el).val(this.guid); + } else { + $('#header-step1', this.el).remove(); + $('#step1', this.el).remove(); + $('#header-step2', this.el).addClass("active"); + $('#step2', this.el).addClass("active"); + $('.progress', this.el).hide(); + this.patch = true; + this.uploadState = 2; } - - MixEditView.prototype.template = _.template(Template); - - MixEditView.prototype.events = { - "click #login": "login", - "change input[name='...']": "imageChanged" - }; - - MixEditView.prototype.ui = { - image: "#mix-image", - progress: "#mix-upload-progress", - uploadError: '#mix-upload-error' - }; - - MixEditView.prototype.initialize = function() { - this.guid = utils.generateGuid(); - this.uploadState = 0; - this.detailsEntered = false; - return this.patch = false; - }; - - MixEditView.prototype.onDomRefresh = function() { - "@setupImageEditable\n el: $(\"#mix-image\", @el)\n chooseMessage: \"Choose mix image\""; - return true; - }; - - MixEditView.prototype.onRender = function() { - var wizard, - _this = this; - console.log("MixEditView: onRender js"); - this.ui.progress.hide(); - this.sendImage = false; - if (!this.model.id) { - $('input[name="upload-hash"]', this.el).val(this.guid); + wizard = $("#fuelux-wizard", this.el).ace_wizard().on("change", function(e, info) { + if (info.step === 1 && _this.uploadState === 0) { + console.log("MixEditView: No mix uploaded"); + _this.ui.uploadError.fadeIn(); + $('#step1').addClass("alert-danger"); + return false; } else { - $('#header-step1', this.el).remove(); - $('#step1', this.el).remove(); - $('#header-step2', this.el).addClass("active"); - $('#step2', this.el).addClass("active"); - $('.progress', this.el).hide(); - this.patch = true; - this.uploadState = 2; + return true; } - wizard = $("#fuelux-wizard", this.el).ace_wizard().on("change", function(e, info) { - if (info.step === 1 && _this.uploadState === 0) { - console.log("MixEditView: No mix uploaded"); - _this.ui.uploadError.fadeIn(); - $('#step1').addClass("alert-danger"); - return false; - } else { - return true; - } - }).on("finished", function(e) { - console.log("Finished"); - return _this.saveChanges(); - }); - $("#mix-upload-form", this.el).dropzone({ - previewTemplate: '