diff --git a/src/UI/.idea/inspectionProfiles/Project_Default.xml b/src/UI/.idea/inspectionProfiles/Project_Default.xml
index 195e8ea0b..623a988ad 100644
--- a/src/UI/.idea/inspectionProfiles/Project_Default.xml
+++ b/src/UI/.idea/inspectionProfiles/Project_Default.xml
@@ -75,7 +75,10 @@
-
+
+
+
+
diff --git a/src/UI/.idea/jsLinters/jshint.xml b/src/UI/.idea/jsLinters/jshint.xml
index 1858f1342..96fa6c67a 100644
--- a/src/UI/.idea/jsLinters/jshint.xml
+++ b/src/UI/.idea/jsLinters/jshint.xml
@@ -5,6 +5,7 @@
+
@@ -15,7 +16,7 @@
-
+
@@ -49,7 +50,7 @@
-
+
@@ -63,7 +64,7 @@
-
+
diff --git a/src/UI/AddSeries/AddSeriesCollection.js b/src/UI/AddSeries/AddSeriesCollection.js
index c44acf9a2..88cfc03df 100644
--- a/src/UI/AddSeries/AddSeriesCollection.js
+++ b/src/UI/AddSeries/AddSeriesCollection.js
@@ -2,8 +2,9 @@
define(
[
'backbone',
- 'Series/SeriesModel'
- ], function (Backbone, SeriesModel) {
+ 'Series/SeriesModel',
+ 'underscore'
+ ], function (Backbone, SeriesModel, _) {
return Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/series/lookup',
model: SeriesModel,
diff --git a/src/UI/Cells/Edit/QualityCellEditor.js b/src/UI/Cells/Edit/QualityCellEditor.js
index dee096929..2f238da38 100644
--- a/src/UI/Cells/Edit/QualityCellEditor.js
+++ b/src/UI/Cells/Edit/QualityCellEditor.js
@@ -2,9 +2,10 @@
define(
[
'backgrid',
+ 'marionette',
+ 'underscore',
'Settings/Quality/Profile/QualityProfileSchemaCollection',
- 'Series/EpisodeFileModel'
- ], function (Backgrid, QualityProfileSchemaCollection, EpisodeFileModel) {
+ ], function (Backgrid, Marionette, _, QualityProfileSchemaCollection) {
return Backgrid.CellEditor.extend({
className: 'quality-cell-editor',
@@ -27,7 +28,7 @@ define(
var templateName = self.template;
self.schema = qualityProfileSchemaCollection.first();
- var selected = _.find(self.schema.get('available'), { 'id': self.model.get(self.column.get("name")).quality.id });
+ var selected = _.find(self.schema.get('available'), { 'id': self.model.get(self.column.get('name')).quality.id });
if (selected) {
selected.selected = true;
@@ -54,9 +55,9 @@ define(
quality: quality
};
- model.set(column.get("name"), newQuality);
+ model.set(column.get('name'), newQuality);
model.save();
- model.trigger("backgrid:edited", model, column, new Backgrid.Command(e));
+ model.trigger('backgrid:edited', model, column, new Backgrid.Command(e));
},
close: function (e) {
@@ -64,7 +65,7 @@ define(
var column = this.column;
var command = new Backgrid.Command(e);
- model.trigger("backgrid:edited", model, column, command);
+ model.trigger('backgrid:edited', model, column, command);
}
});
});
diff --git a/src/UI/Episode/EpisodeDetailsLayout.js b/src/UI/Episode/EpisodeDetailsLayout.js
index bc17cd0c1..e52334e0f 100644
--- a/src/UI/Episode/EpisodeDetailsLayout.js
+++ b/src/UI/Episode/EpisodeDetailsLayout.js
@@ -95,8 +95,6 @@ define(
},
_setMonitoredState: function () {
- var monitored = this.model.get('monitored');
-
this.ui.monitored.removeClass('icon-spin icon-spinner');
if (this.model.get('monitored')) {
diff --git a/src/UI/Missing/Collection.js b/src/UI/Missing/Collection.js
index 4461dad06..4b7a4fa96 100644
--- a/src/UI/Missing/Collection.js
+++ b/src/UI/Missing/Collection.js
@@ -1,4 +1,4 @@
-'use strict';
+'use strict';
define(
[
'Series/EpisodeModel',
diff --git a/src/UI/Navbar/Search.js b/src/UI/Navbar/Search.js
index d880af439..b57d04522 100644
--- a/src/UI/Navbar/Search.js
+++ b/src/UI/Navbar/Search.js
@@ -2,9 +2,10 @@
define(
[
'backbone',
+ 'jquery',
'Series/SeriesCollection'
- ], function (Backbone, SeriesCollection) {
- $(document).on('keydown', function (e){
+ ], function (Backbone, $, SeriesCollection) {
+ $(document).on('keydown', function (e) {
if ($(e.target).is('input')) {
return;
}
@@ -17,7 +18,7 @@ define(
$.fn.bindSearch = function () {
$(this).typeahead({
- source : function () {
+ source: function () {
return SeriesCollection.pluck('title');
},
diff --git a/src/UI/Quality/QualitySizeModel.js b/src/UI/Quality/QualitySizeModel.js
index 4b0872ec2..d305969b3 100644
--- a/src/UI/Quality/QualitySizeModel.js
+++ b/src/UI/Quality/QualitySizeModel.js
@@ -1,4 +1,4 @@
-"use strict";
+'use strict';
define(
[
diff --git a/src/UI/Settings/Indexers/Collection.js b/src/UI/Settings/Indexers/Collection.js
index 234c97da7..6d83b92ec 100644
--- a/src/UI/Settings/Indexers/Collection.js
+++ b/src/UI/Settings/Indexers/Collection.js
@@ -1,9 +1,10 @@
-'use strict';
+
+'use strict';
define(
[
+ 'backbone',
'Settings/Indexers/Model',
- 'Form/FormBuilder'
- ], function (IndexerModel) {
+ ], function (Backbone, IndexerModel) {
return Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/indexer',
model: IndexerModel
diff --git a/src/UI/Settings/Indexers/IndexerLayout.js b/src/UI/Settings/Indexers/IndexerLayout.js
index a5b200ed2..eca151eb1 100644
--- a/src/UI/Settings/Indexers/IndexerLayout.js
+++ b/src/UI/Settings/Indexers/IndexerLayout.js
@@ -1,4 +1,4 @@
-"use strict";
+'use strict';
define(
[
diff --git a/src/UI/Settings/MediaManagement/MediaManagementLayout.js b/src/UI/Settings/MediaManagement/MediaManagementLayout.js
index eb31dcb77..56b34c814 100644
--- a/src/UI/Settings/MediaManagement/MediaManagementLayout.js
+++ b/src/UI/Settings/MediaManagement/MediaManagementLayout.js
@@ -1,4 +1,4 @@
-"use strict";
+'use strict';
define(
[
diff --git a/src/UI/Settings/Notifications/AddItemView.js b/src/UI/Settings/Notifications/AddItemView.js
index 0183404dc..d1e50f5a8 100644
--- a/src/UI/Settings/Notifications/AddItemView.js
+++ b/src/UI/Settings/Notifications/AddItemView.js
@@ -19,7 +19,7 @@ define([
},
addNotification: function (e) {
- if ($(e.target).hasClass('icon-info-sign')) {
+ if (this.$(e.target).hasClass('icon-info-sign')) {
return;
}
diff --git a/src/UI/Settings/Notifications/Collection.js b/src/UI/Settings/Notifications/Collection.js
index 00367ffdf..6022de53a 100644
--- a/src/UI/Settings/Notifications/Collection.js
+++ b/src/UI/Settings/Notifications/Collection.js
@@ -1,8 +1,9 @@
-'use strict';
+'use strict';
define(
[
+ 'Backbone',
'Settings/Notifications/Model'
- ], function (NotificationModel) {
+ ], function (Backbone, NotificationModel) {
return Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/notification',
model: NotificationModel
diff --git a/src/UI/Settings/Quality/Profile/QualityProfileSchemaCollection.js b/src/UI/Settings/Quality/Profile/QualityProfileSchemaCollection.js
index 47c3e232d..7632544cd 100644
--- a/src/UI/Settings/Quality/Profile/QualityProfileSchemaCollection.js
+++ b/src/UI/Settings/Quality/Profile/QualityProfileSchemaCollection.js
@@ -1,4 +1,4 @@
-"use strict";
+'use strict';
define(
[
diff --git a/src/UI/Settings/Quality/QualityLayout.js b/src/UI/Settings/Quality/QualityLayout.js
index e677036b4..09d4aca44 100644
--- a/src/UI/Settings/Quality/QualityLayout.js
+++ b/src/UI/Settings/Quality/QualityLayout.js
@@ -1,4 +1,4 @@
-"use strict";
+'use strict';
define(
[
diff --git a/src/UI/Settings/Quality/Size/QualitySizeView.js b/src/UI/Settings/Quality/Size/QualitySizeView.js
index 12c03bcd0..215304ba0 100644
--- a/src/UI/Settings/Quality/Size/QualitySizeView.js
+++ b/src/UI/Settings/Quality/Size/QualitySizeView.js
@@ -6,7 +6,7 @@ define(
'Mixins/AsModelBoundView',
'filesize',
'jquery.knob'
- ], function (Marionette, AsModelBoundView, Filesize) {
+ ], function (Marionette, AsModelBoundView, fileSize) {
var view = Marionette.ItemView.extend({
template: 'Settings/Quality/Size/QualitySizeTemplate',
@@ -24,7 +24,7 @@ define(
initialize: function (options) {
this.qualityProfileCollection = options.qualityProfiles;
- this.filesize = Filesize;
+ this.filesize = fileSize;
},
onRender: function () {
@@ -44,8 +44,8 @@ define(
_changeMaxSize: function () {
var maxSize = this.model.get('maxSize');
var bytes = maxSize * 1024 * 1024;
- var thirty = Filesize(bytes * 30, 1, false);
- var sixty = Filesize(bytes * 60, 1, false);
+ var thirty = fileSize(bytes * 30, 1, false);
+ var sixty = fileSize(bytes * 60, 1, false);
if (parseInt(maxSize, 10) === 0) {
thirty = 'No Limit';