From 3e2e085b6b1debd934e03b5a96f45f2d7b412d7b Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Tue, 30 Jan 2018 13:11:16 +0100 Subject: [PATCH] Fixed: Allowing in use Profiles to be Deleted. Fixes #2030 --- src/UI/Settings/Profile/Edit/EditProfileLayout.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/UI/Settings/Profile/Edit/EditProfileLayout.js b/src/UI/Settings/Profile/Edit/EditProfileLayout.js index 0eb0789d5..14770eafb 100644 --- a/src/UI/Settings/Profile/Edit/EditProfileLayout.js +++ b/src/UI/Settings/Profile/Edit/EditProfileLayout.js @@ -7,7 +7,7 @@ var EditProfileItemView = require('./EditProfileItemView'); var QualitySortableCollectionView = require('./QualitySortableCollectionView'); var EditProfileView = require('./EditProfileView'); var DeleteView = require('../DeleteProfileView'); -var SeriesCollection = require('../../../Series/SeriesCollection'); +var FullMovieCollection = require('../../../Movies/FullMovieCollection'); var Config = require('../../../Config'); var AsEditModalView = require('../../../Mixins/AsEditModalView'); @@ -28,7 +28,7 @@ var view = Marionette.Layout.extend({ initialize : function(options) { this.profileCollection = options.profileCollection; this.itemsCollection = new Backbone.Collection(_.toArray(this.model.get('items')).reverse()); - this.listenTo(SeriesCollection, 'all', this._updateDisableStatus); + this.listenTo(FullMovieCollection, 'all', this._updateDisableStatus); }, onRender : function() { @@ -104,14 +104,14 @@ var view = Marionette.Layout.extend({ _updateDisableStatus : function() { if (this._isQualityInUse()) { this.ui.deleteButton.addClass('disabled'); - this.ui.deleteButton.attr('title', 'Can\'t delete a profile that is attached to a series.'); + this.ui.deleteButton.attr('title', 'Can\'t delete a profile that is attached to a movie.'); } else { this.ui.deleteButton.removeClass('disabled'); } }, _isQualityInUse : function() { - return SeriesCollection.where({ 'profileId' : this.model.id }).length !== 0; + return FullMovieCollection.where({ 'profileId' : this.model.id }).length !== 0; } }); module.exports = AsEditModalView.call(view);