From 4b5b0ad751203bcf65d286e3e49e4f0f45ff07ed Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Wed, 22 May 2013 19:39:28 -0700 Subject: [PATCH] renamed remove methods in QualityProfile, Notification --- UI/Settings/Notifications/ItemView.js | 4 +-- .../Quality/Profile/QualityProfileView.js | 4 +-- UI/Shared/ModalRegion.js | 31 ------------------- 3 files changed, 4 insertions(+), 35 deletions(-) delete mode 100644 UI/Shared/ModalRegion.js diff --git a/UI/Settings/Notifications/ItemView.js b/UI/Settings/Notifications/ItemView.js index a7b0d014c..a6c4ca59a 100644 --- a/UI/Settings/Notifications/ItemView.js +++ b/UI/Settings/Notifications/ItemView.js @@ -13,7 +13,7 @@ define([ events: { 'click .x-edit' : 'edit', - 'click .x-remove': 'remove' + 'click .x-remove': 'removeNotification' }, edit: function () { @@ -21,7 +21,7 @@ define([ NzbDrone.modalRegion.show(view); }, - remove: function () { + removeNotification: function () { var view = new NzbDrone.Settings.Notifications.DeleteView({ model: this.model}); NzbDrone.modalRegion.show(view); } diff --git a/UI/Settings/Quality/Profile/QualityProfileView.js b/UI/Settings/Quality/Profile/QualityProfileView.js index fcb5faee2..35aa90677 100644 --- a/UI/Settings/Quality/Profile/QualityProfileView.js +++ b/UI/Settings/Quality/Profile/QualityProfileView.js @@ -17,7 +17,7 @@ define([ events: { 'click .x-edit' : 'edit', - 'click .x-remove': 'remove' + 'click .x-remove': 'removeQuality' }, edit: function () { @@ -25,7 +25,7 @@ define([ NzbDrone.modalRegion.show(view); }, - remove: function () { + removeQuality: function () { var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model }); NzbDrone.modalRegion.show(view); } diff --git a/UI/Shared/ModalRegion.js b/UI/Shared/ModalRegion.js deleted file mode 100644 index bf9ab9811..000000000 --- a/UI/Shared/ModalRegion.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -define('modal', function () { - var modal = Backbone.Marionette.Region.extend({ - el: "#modal-region", - - constructor: function () { - _.bindAll(this); - Backbone.Marionette.Region.prototype.constructor.apply(this, arguments); - this.on("show", this.showModal, this); - }, - - getEl: function (selector) { - var $el = $(selector); - $el.on("hidden", this.close); - return $el; - }, - - showModal: function (view) { - view.on("close", this.hideModal, this); - this.$el.modal('show'); - }, - - hideModal: function () { - this.$el.modal('hide'); - } - }); - - return modal; -}); - -