From 0e6faedffc73e278b8c861afc09caccfed093f30 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Thu, 11 Apr 2013 22:00:48 -0700 Subject: [PATCH] fixed auto modelbinder. --- UI/Mixins/backbone.modelbinder.mixin.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/UI/Mixins/backbone.modelbinder.mixin.js b/UI/Mixins/backbone.modelbinder.mixin.js index fc9bcbf02..a43aeec04 100644 --- a/UI/Mixins/backbone.modelbinder.mixin.js +++ b/UI/Mixins/backbone.modelbinder.mixin.js @@ -19,13 +19,15 @@ Marionette.View.prototype.viewName = function () { Marionette.ItemView.prototype.render = function () { + var result = oldItemViewRender.apply(this, arguments); + + this.$el.addClass('iv-' + this.viewName()); + if (this.model) { NzbDrone.ModelBinder.bind(this.model, this.el); } - this.$el.addClass('iv-' + this.viewName()); - - return oldItemViewRender.apply(this, arguments); + return result; }; Marionette.CollectionView.prototype.render = function () {