From 50fd2f77b1cf68eb871ab8a7c6e435dfa13b14d5 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Wed, 1 May 2013 15:42:30 -0700 Subject: [PATCH] cleaned up some jslint errors --- UI/.idea/dictionaries/Keivan_Beigi.xml | 9 +++++++++ UI/.idea/inspectionProfiles/Project_Default.xml | 17 ++++++++++++----- UI/Mixins/handlebars.mixin.js | 4 ++-- UI/Mixins/tablesorter.extensions.js | 8 ++++---- UI/Quality/QualitySizeCollection.js | 5 +++-- UI/Quality/QualitySizeModel.js | 5 +++-- UI/Quality/qualityProfileCollection.js | 3 ++- UI/Quality/qualityProfileModel.js | 3 ++- UI/Series/Index/EmptyView.js | 4 ++-- UI/Series/Index/Table/AirDateCell.js | 3 ++- UI/Series/Index/Table/SeriesStatusCell.js | 3 ++- UI/Series/SeasonModel.js | 3 ++- UI/Series/SeriesCollection.js | 5 +++-- UI/Series/SeriesModel.js | 6 +----- UI/Settings/Indexers/Collection.js | 5 +++-- UI/Settings/Indexers/ItemView.js | 2 +- UI/Settings/Notifications/NotificationsView.js | 2 +- .../Profile/QualityProfileCollectionView.js | 4 ++-- UI/Settings/Quality/QualityLayout.js | 3 ++- .../Quality/Size/QualitySizeCollectionView.js | 6 +++--- UI/Settings/SettingsModel.js | 5 +++-- UI/Settings/System/SystemView.js | 2 +- 22 files changed, 65 insertions(+), 42 deletions(-) create mode 100644 UI/.idea/dictionaries/Keivan_Beigi.xml diff --git a/UI/.idea/dictionaries/Keivan_Beigi.xml b/UI/.idea/dictionaries/Keivan_Beigi.xml new file mode 100644 index 000000000..3bf9e2f8f --- /dev/null +++ b/UI/.idea/dictionaries/Keivan_Beigi.xml @@ -0,0 +1,9 @@ + + + + bnzbd + mouseenter + mouseleave + + + \ No newline at end of file diff --git a/UI/.idea/inspectionProfiles/Project_Default.xml b/UI/.idea/inspectionProfiles/Project_Default.xml index 1a7a1b98f..4651fe2d4 100644 --- a/UI/.idea/inspectionProfiles/Project_Default.xml +++ b/UI/.idea/inspectionProfiles/Project_Default.xml @@ -5,17 +5,21 @@ + + + - + + @@ -41,7 +45,7 @@ - - + + + @@ -68,6 +74,7 @@ + @@ -80,7 +87,6 @@ - + diff --git a/UI/Mixins/handlebars.mixin.js b/UI/Mixins/handlebars.mixin.js index 322a8f8cc..dcbfd488a 100644 --- a/UI/Mixins/handlebars.mixin.js +++ b/UI/Mixins/handlebars.mixin.js @@ -1,6 +1,6 @@ 'use strict'; -Handlebars.registerHelper('partial', function(templateName, context){ +Handlebars.registerHelper('partial', function (templateName) { //TODO: We should be able to pass in the context, either an object or a property var templateFunction = Marionette.TemplateCache.get(templateName); @@ -17,4 +17,4 @@ Handlebars.registerHelper("debug", function(optionalValue) { console.log("===================="); console.log(optionalValue); } -}); \ No newline at end of file +}); diff --git a/UI/Mixins/tablesorter.extensions.js b/UI/Mixins/tablesorter.extensions.js index 44936c8aa..7ecbe5f9d 100644 --- a/UI/Mixins/tablesorter.extensions.js +++ b/UI/Mixins/tablesorter.extensions.js @@ -1,7 +1,7 @@ $.tablesorter.addParser({ // set a unique id id : 'title', - is : function (s) { + is : function () { // return false so this parser is not auto detected return false; }, @@ -16,7 +16,7 @@ $.tablesorter.addParser({ $.tablesorter.addParser({ // set a unique id id : 'date', - is : function (s) { + is : function () { // return false so this parser is not auto detected return false; }, @@ -37,7 +37,7 @@ $.tablesorter.addParser({ $.tablesorter.addParser({ // set a unique id id : 'innerHtml', - is : function (s) { + is : function () { // return false so this parser is not auto detected return false; }, @@ -47,4 +47,4 @@ $.tablesorter.addParser({ }, // set type, either numeric or text type : 'text' -}); \ No newline at end of file +}); diff --git a/UI/Quality/QualitySizeCollection.js b/UI/Quality/QualitySizeCollection.js index 17a990b70..da567d0ba 100644 --- a/UI/Quality/QualitySizeCollection.js +++ b/UI/Quality/QualitySizeCollection.js @@ -1,6 +1,7 @@ -define(['app', 'Quality/QualitySizeModel'], function () { +"use strict"; +define(['app', 'Quality/QualitySizeModel'], function () { NzbDrone.Quality.QualitySizeCollection = Backbone.Collection.extend({ model: NzbDrone.Quality.QualitySizeModel, url : NzbDrone.Constants.ApiRoot + '/qualitysizes' }); -}); \ No newline at end of file +}); diff --git a/UI/Quality/QualitySizeModel.js b/UI/Quality/QualitySizeModel.js index 86fa46e53..26a6bcbfe 100644 --- a/UI/Quality/QualitySizeModel.js +++ b/UI/Quality/QualitySizeModel.js @@ -1,4 +1,5 @@ -define(['app'], function () { +"use strict"; +define(['app'], function () { NzbDrone.Quality.QualitySizeModel = Backbone.Model.extend({ initialize: function () { @@ -14,4 +15,4 @@ } } }); -}); \ No newline at end of file +}); diff --git a/UI/Quality/qualityProfileCollection.js b/UI/Quality/qualityProfileCollection.js index ba0a3fa1c..2a15d5af5 100644 --- a/UI/Quality/qualityProfileCollection.js +++ b/UI/Quality/qualityProfileCollection.js @@ -1,4 +1,5 @@ -define(['app', 'Quality/QualityProfileModel'], function () { +"use strict"; +define(['app', 'Quality/QualityProfileModel'], function () { var qualityProfileCollection = Backbone.Collection.extend({ model: NzbDrone.Quality.QualityProfileModel, diff --git a/UI/Quality/qualityProfileModel.js b/UI/Quality/qualityProfileModel.js index 97774755e..7e1c5473a 100644 --- a/UI/Quality/qualityProfileModel.js +++ b/UI/Quality/qualityProfileModel.js @@ -1,4 +1,5 @@ -define(['app'], function () { +"use strict"; +define(['app'], function () { NzbDrone.Quality.QualityProfileModel = Backbone.Model.extend({ mutators: { diff --git a/UI/Series/Index/EmptyView.js b/UI/Series/Index/EmptyView.js index 64376a54b..f3d02eaf7 100644 --- a/UI/Series/Index/EmptyView.js +++ b/UI/Series/Index/EmptyView.js @@ -1,8 +1,8 @@ 'use strict'; -define(['app'], function (app) { +define(['app'], function () { NzbDrone.Series.Index.EmptyView = Backbone.Marionette.CompositeView.extend({ template: 'Series/Index/EmptyTemplate' }); -}); \ No newline at end of file +}); diff --git a/UI/Series/Index/Table/AirDateCell.js b/UI/Series/Index/Table/AirDateCell.js index 0b94cd5d8..35ef20379 100644 --- a/UI/Series/Index/Table/AirDateCell.js +++ b/UI/Series/Index/Table/AirDateCell.js @@ -1,3 +1,4 @@ +"use strict"; Backgrid.AirDateCell = Backgrid.Cell.extend({ className: "air-date-cell", @@ -9,4 +10,4 @@ Backgrid.AirDateCell = Backgrid.Cell.extend({ return this; } -}); \ No newline at end of file +}); diff --git a/UI/Series/Index/Table/SeriesStatusCell.js b/UI/Series/Index/Table/SeriesStatusCell.js index 4b5ebeaa7..16addb5fa 100644 --- a/UI/Series/Index/Table/SeriesStatusCell.js +++ b/UI/Series/Index/Table/SeriesStatusCell.js @@ -1,3 +1,4 @@ +"use strict"; Backgrid.SeriesStatusCell = Backgrid.Cell.extend({ className: "series-status-cell", @@ -19,4 +20,4 @@ Backgrid.SeriesStatusCell = Backgrid.Cell.extend({ return this; } -}); \ No newline at end of file +}); diff --git a/UI/Series/SeasonModel.js b/UI/Series/SeasonModel.js index f4c900240..7d0fe169d 100644 --- a/UI/Series/SeasonModel.js +++ b/UI/Series/SeasonModel.js @@ -1,4 +1,5 @@ -define(['app'], function () { +"use strict"; +define(['app'], function () { NzbDrone.Series.SeasonModel = Backbone.Model.extend({ mutators: { diff --git a/UI/Series/SeriesCollection.js b/UI/Series/SeriesCollection.js index 6d1eb1409..89e3528e0 100644 --- a/UI/Series/SeriesCollection.js +++ b/UI/Series/SeriesCollection.js @@ -1,4 +1,5 @@ -define(['app', 'Series/SeriesModel'], function () { +"use strict"; +define(['app', 'Series/SeriesModel'], function () { NzbDrone.Series.SeriesCollection = Backbone.Collection.extend({ url : NzbDrone.Constants.ApiRoot + '/series', model: NzbDrone.Series.SeriesModel, @@ -10,4 +11,4 @@ return model.get(this.defaultSortKey); } }); -}); \ No newline at end of file +}); diff --git a/UI/Series/SeriesModel.js b/UI/Series/SeriesModel.js index 7569500b5..3c36a1d1b 100644 --- a/UI/Series/SeriesModel.js +++ b/UI/Series/SeriesModel.js @@ -47,11 +47,7 @@ define(['app', 'Quality/QualityProfileCollection', 'AddSeries/RootFolders/RootFo return "http://trakt.tv/show/" + this.get('titleSlug'); }, isContinuing : function () { - if (this.get('status') === 0) { - return true; - } - - return false; + return this.get('status') === 0; }, statusText : function () { if (this.get('status') === 0) { diff --git a/UI/Settings/Indexers/Collection.js b/UI/Settings/Indexers/Collection.js index fec1cead2..730339bde 100644 --- a/UI/Settings/Indexers/Collection.js +++ b/UI/Settings/Indexers/Collection.js @@ -1,6 +1,7 @@ -define(['app', 'Settings/Indexers/Model'], function () { +"use strict"; +define(['app', 'Settings/Indexers/Model'], function () { NzbDrone.Settings.Indexers.Collection = Backbone.Collection.extend({ url : NzbDrone.Constants.ApiRoot + '/indexer', model: NzbDrone.Settings.Indexers.Model }); -}); \ No newline at end of file +}); diff --git a/UI/Settings/Indexers/ItemView.js b/UI/Settings/Indexers/ItemView.js index 24d9feae5..b8b9da223 100644 --- a/UI/Settings/Indexers/ItemView.js +++ b/UI/Settings/Indexers/ItemView.js @@ -18,7 +18,7 @@ define([ }, saveSettings: function () { - var test = 1; + //this.model.save(undefined, this.syncNotification("Naming Settings Saved", "Couldn't Save Naming Settings")); }, diff --git a/UI/Settings/Notifications/NotificationsView.js b/UI/Settings/Notifications/NotificationsView.js index 5c893edaa..e1aef27c3 100644 --- a/UI/Settings/Notifications/NotificationsView.js +++ b/UI/Settings/Notifications/NotificationsView.js @@ -6,6 +6,6 @@ define([ ], function () { NzbDrone.Settings.Notifications.NotificationsView = Backbone.Marionette.ItemView.extend({ - template: 'Settings/Notifications/NotificationsTemplate', + template: 'Settings/Notifications/NotificationsTemplate' }); }); diff --git a/UI/Settings/Quality/Profile/QualityProfileCollectionView.js b/UI/Settings/Quality/Profile/QualityProfileCollectionView.js index 21624af3f..bd83551af 100644 --- a/UI/Settings/Quality/Profile/QualityProfileCollectionView.js +++ b/UI/Settings/Quality/Profile/QualityProfileCollectionView.js @@ -1,6 +1,6 @@ 'use strict'; -define(['app', 'Settings/Quality/Profile/QualityProfileView'], function (app) { +define(['app', 'Settings/Quality/Profile/QualityProfileView'], function () { NzbDrone.Settings.Quality.Profile.QualityProfileCollectionView = Backbone.Marionette.CompositeView.extend({ itemView : NzbDrone.Settings.Quality.Profile.QualityProfileView, itemViewContainer: 'tbody', @@ -17,4 +17,4 @@ define(['app', 'Settings/Quality/Profile/QualityProfileView'], function (app) { } }); -}); \ No newline at end of file +}); diff --git a/UI/Settings/Quality/QualityLayout.js b/UI/Settings/Quality/QualityLayout.js index 52687591b..fe0270cf0 100644 --- a/UI/Settings/Quality/QualityLayout.js +++ b/UI/Settings/Quality/QualityLayout.js @@ -1,4 +1,5 @@ -define([ +"use strict"; +define([ 'app', 'Quality/QualityProfileCollection', 'Quality/QualitySizeCollection', diff --git a/UI/Settings/Quality/Size/QualitySizeCollectionView.js b/UI/Settings/Quality/Size/QualitySizeCollectionView.js index b49d01f4d..d7c4acc9d 100644 --- a/UI/Settings/Quality/Size/QualitySizeCollectionView.js +++ b/UI/Settings/Quality/Size/QualitySizeCollectionView.js @@ -1,13 +1,13 @@ 'use strict'; -define(['app', 'Settings/Quality/Size/QualitySizeView'], function (app) { +define(['app', 'Settings/Quality/Size/QualitySizeView'], function () { NzbDrone.Settings.Quality.Size.QualitySizeCollectionView = Backbone.Marionette.CompositeView.extend({ itemView : NzbDrone.Settings.Quality.Size.QualitySizeView, itemViewContainer: '#quality-sizes-container', template : 'Settings/Quality/Size/QualitySizeCollectionTemplate', initialize: function () { - var test = 1; + }, ui: { @@ -18,4 +18,4 @@ define(['app', 'Settings/Quality/Size/QualitySizeView'], function (app) { } }); -}); \ No newline at end of file +}); diff --git a/UI/Settings/SettingsModel.js b/UI/Settings/SettingsModel.js index 7c30696a8..bb76512e4 100644 --- a/UI/Settings/SettingsModel.js +++ b/UI/Settings/SettingsModel.js @@ -1,5 +1,6 @@ -define(['app'], function (app) { +"use strict"; +define(['app'], function () { NzbDrone.Settings.SettingsModel = Backbone.Model.extend({ url: NzbDrone.Constants.ApiRoot + '/settings' }); -}); \ No newline at end of file +}); diff --git a/UI/Settings/System/SystemView.js b/UI/Settings/System/SystemView.js index dd6ea6668..516cf25c8 100644 --- a/UI/Settings/System/SystemView.js +++ b/UI/Settings/System/SystemView.js @@ -6,6 +6,6 @@ define([ ], function () { NzbDrone.Settings.System.SystemView = Backbone.Marionette.ItemView.extend({ - template: 'Settings/System/SystemTemplate', + template: 'Settings/System/SystemTemplate' }); });