From 769331d45d8cfec952ec7137eba7f6c1d3b615d0 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Fri, 21 Jun 2013 23:24:24 -0700 Subject: [PATCH] updated jshint to 2.1.3 single quotes --- UI/.idea/jsLinters/jshint.xml | 18 +++++++++-------- UI/.idea/jsLinters/jslint.xml | 13 ++++++++++++ UI/AddSeries/AddSeriesLayout.js | 2 +- UI/AddSeries/AddSeriesView.js | 2 +- UI/AddSeries/Collection.js | 2 +- UI/AddSeries/Existing/CompositeView.js | 2 +- UI/AddSeries/RootFolders/Collection.js | 2 +- UI/AddSeries/RootFolders/CollectionView.js | 2 +- UI/AddSeries/RootFolders/ItemView.js | 2 +- UI/AddSeries/RootFolders/Layout.js | 2 +- UI/AddSeries/RootFolders/Model.js | 4 ++-- UI/AddSeries/SearchResultView.js | 2 +- UI/Calendar/CalendarLayout.js | 2 +- UI/Calendar/CalendarView.js | 4 ++-- UI/Calendar/Collection.js | 4 ++-- UI/Calendar/UpcomingCollection.js | 4 ++-- UI/Cells/AirDateCell.js | 6 +++--- UI/Cells/EpisodeNumberCell.js | 4 ++-- UI/Cells/EpisodeStatusCell.js | 4 ++-- UI/Cells/EpisodeTitleCell.js | 2 +- UI/Cells/FileSizeCell.js | 6 +++--- UI/Cells/IndexerCell.js | 2 +- UI/Cells/NzbDroneCell.js | 2 +- UI/Cells/QualityCell.js | 2 +- UI/Cells/RelativeDateCell.js | 2 +- UI/Cells/SeriesTitleCell.js | 2 +- UI/Cells/TemplatedCell.js | 2 +- UI/Cells/ToggleCell.js | 2 +- UI/Commands/CommandController.js | 4 ++-- UI/Config.js | 2 +- UI/Constants.js | 2 +- UI/Controller.js | 8 ++++---- UI/Episode/Layout.js | 2 +- UI/Episode/Search/Layout.js | 2 +- UI/Episode/Summary/View.js | 4 ++-- UI/Form/FormBuilder.js | 2 +- UI/Handlebars/Helpers/DateTime.js | 4 ++-- .../backbone.marionette.templates.js | 2 +- UI/History/Collection.js | 12 +++++------ UI/History/EventTypeCell.js | 4 ++-- UI/History/HistoryLayout.js | 2 +- UI/History/Model.js | 2 +- UI/Instrumentation/ErrorHandler.js | 8 ++++---- UI/Instrumentation/StringFormat.js | 2 +- UI/Logs/Collection.js | 12 +++++------ UI/Logs/Layout.js | 2 +- UI/Logs/Model.js | 2 +- UI/MainMenuView.js | 2 +- UI/Missing/Collection.js | 12 +++++------ UI/Missing/MissingLayout.js | 2 +- UI/Missing/Row.js | 2 +- UI/Mixins/AutoComplete.js | 6 +++--- UI/Mixins/backbone.ajax.js | 2 +- UI/Mixins/backbone.marionette.region.mixin.js | 2 +- UI/Mixins/backbone.signalr.mixin.js | 2 +- UI/Mixins/underscore.mixin.deepExtend.js | 2 +- UI/Quality/QualitySizeCollection.js | 2 +- UI/Quality/QualitySizeModel.js | 2 +- UI/Quality/qualityProfileCollection.js | 2 +- UI/Quality/qualityProfileModel.js | 2 +- UI/Release/ApprovalStatusCell.js | 6 +++--- UI/Release/Collection.js | 2 +- UI/Release/DownloadReportCell.js | 10 +++++----- UI/Release/Layout.js | 2 +- UI/Release/Model.js | 2 +- UI/Router.js | 2 +- UI/Series/Details/SeasonCollectionView.js | 2 +- UI/Series/Details/SeriesDetailsLayout.js | 2 +- UI/Series/EpisodeCollection.js | 4 ++-- UI/Series/EpisodeModel.js | 2 +- UI/Series/Index/SeriesIndexLayout.js | 2 +- UI/Series/Index/Table/Row.js | 2 +- UI/Series/Index/Table/SeriesStatusCell.js | 10 +++++----- UI/Series/SeasonCollection.js | 2 +- UI/Series/SeasonModel.js | 6 +++--- UI/Series/SeriesCollection.js | 4 ++-- UI/Series/SeriesModel.js | 6 +++--- UI/ServerStatus.js | 2 +- .../DownloadClient/DownloadClientView.js | 12 +++++------ UI/Settings/General/GeneralSettingsModel.js | 2 +- UI/Settings/Indexers/Collection.js | 2 +- UI/Settings/Indexers/EditView.js | 2 +- UI/Settings/Indexers/ItemView.js | 2 +- UI/Settings/Indexers/Model.js | 2 +- UI/Settings/Misc/MiscView.js | 2 +- UI/Settings/Naming/NamingModel.js | 2 +- UI/Settings/Notifications/AddItemView.js | 2 +- UI/Settings/Notifications/AddView.js | 2 +- UI/Settings/Notifications/Collection.js | 2 +- UI/Settings/Notifications/EditView.js | 2 +- UI/Settings/Notifications/ItemView.js | 2 +- UI/Settings/Notifications/Model.js | 2 +- UI/Settings/Quality/QualityLayout.js | 2 +- UI/Settings/SettingsLayout.js | 2 +- UI/Settings/SettingsModel.js | 4 ++-- UI/Settings/SettingsModelBase.js | 2 +- UI/Shared/Footer/View.js | 2 +- UI/Shared/FormatHelpers.js | 2 +- UI/Shared/Grid/HeaderCell.js | 16 +++++++-------- UI/Shared/Grid/Pager.js | 18 ++++++++--------- UI/Shared/LoadingView.js | 2 +- UI/Shared/Messenger.js | 2 +- UI/Shared/Modal/Region.js | 8 ++++---- UI/Shared/NotFoundView.js | 2 +- UI/Shared/NotificationCollection.js | 2 +- UI/Shared/NotificationModel.js | 14 ++++++------- UI/Shared/NotificationView.js | 2 +- UI/Shared/SpinnerView.js | 2 +- UI/Shared/TemplateHelpers.js | 20 +++++++++---------- .../Toolbar/Button/ButtonCollectionView.js | 2 +- UI/Shared/Toolbar/Button/ButtonView.js | 2 +- UI/Shared/Toolbar/ButtonCollection.js | 2 +- UI/Shared/Toolbar/ButtonModel.js | 2 +- .../Radio/RadioButtonCollectionView.js | 2 +- UI/Shared/Toolbar/Radio/RadioButtonView.js | 2 +- UI/Shared/Toolbar/ToolbarLayout.js | 2 +- UI/System/StatusModel.js | 2 +- UI/app.js | 2 +- UI/jQuery/RouteBinder.js | 2 +- UI/jQuery/TooltipBinder.js | 2 +- 120 files changed, 233 insertions(+), 218 deletions(-) create mode 100644 UI/.idea/jsLinters/jslint.xml diff --git a/UI/.idea/jsLinters/jshint.xml b/UI/.idea/jsLinters/jshint.xml index ccfdbdf62..77f11c0d4 100644 --- a/UI/.idea/jsLinters/jshint.xml +++ b/UI/.idea/jsLinters/jshint.xml @@ -1,16 +1,16 @@ - + diff --git a/UI/.idea/jsLinters/jslint.xml b/UI/.idea/jsLinters/jslint.xml new file mode 100644 index 000000000..822a7aa5e --- /dev/null +++ b/UI/.idea/jsLinters/jslint.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/UI/AddSeries/AddSeriesLayout.js b/UI/AddSeries/AddSeriesLayout.js index b81a54f42..9ca71b510 100644 --- a/UI/AddSeries/AddSeriesLayout.js +++ b/UI/AddSeries/AddSeriesLayout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'app', diff --git a/UI/AddSeries/AddSeriesView.js b/UI/AddSeries/AddSeriesView.js index 33e28da0c..c199e9fb2 100644 --- a/UI/AddSeries/AddSeriesView.js +++ b/UI/AddSeries/AddSeriesView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'marionette', diff --git a/UI/AddSeries/Collection.js b/UI/AddSeries/Collection.js index 97ee6ee6d..404807184 100644 --- a/UI/AddSeries/Collection.js +++ b/UI/AddSeries/Collection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'app', diff --git a/UI/AddSeries/Existing/CompositeView.js b/UI/AddSeries/Existing/CompositeView.js index 339a8bb2d..cd1a55ecb 100644 --- a/UI/AddSeries/Existing/CompositeView.js +++ b/UI/AddSeries/Existing/CompositeView.js @@ -28,7 +28,7 @@ define( initialize: function () { this.collection = new AddSeriesCollection(); - this.on("item:removed", function () { + this.on('item:removed', function () { this.close(); }, this); }, diff --git a/UI/AddSeries/RootFolders/Collection.js b/UI/AddSeries/RootFolders/Collection.js index 4b4822941..f0a9f9e71 100644 --- a/UI/AddSeries/RootFolders/Collection.js +++ b/UI/AddSeries/RootFolders/Collection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'backbone', diff --git a/UI/AddSeries/RootFolders/CollectionView.js b/UI/AddSeries/RootFolders/CollectionView.js index 06220c45a..689b16132 100644 --- a/UI/AddSeries/RootFolders/CollectionView.js +++ b/UI/AddSeries/RootFolders/CollectionView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ diff --git a/UI/AddSeries/RootFolders/ItemView.js b/UI/AddSeries/RootFolders/ItemView.js index 9eb49ac65..991c9b253 100644 --- a/UI/AddSeries/RootFolders/ItemView.js +++ b/UI/AddSeries/RootFolders/ItemView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ diff --git a/UI/AddSeries/RootFolders/Layout.js b/UI/AddSeries/RootFolders/Layout.js index af1877625..210fe5019 100644 --- a/UI/AddSeries/RootFolders/Layout.js +++ b/UI/AddSeries/RootFolders/Layout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ diff --git a/UI/AddSeries/RootFolders/Model.js b/UI/AddSeries/RootFolders/Model.js index 6854a717a..eaed76ff3 100644 --- a/UI/AddSeries/RootFolders/Model.js +++ b/UI/AddSeries/RootFolders/Model.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'backbone', @@ -7,7 +7,7 @@ define( return Backbone.Model.extend({ mutators: { freeSpaceString: function () { - return this.get('freeSpace').bytes(2) + " Free"; + return this.get('freeSpace').bytes(2) + ' Free'; } }, diff --git a/UI/AddSeries/SearchResultView.js b/UI/AddSeries/SearchResultView.js index 94bbf9d34..a5415f9de 100644 --- a/UI/AddSeries/SearchResultView.js +++ b/UI/AddSeries/SearchResultView.js @@ -12,7 +12,7 @@ define( return Marionette.ItemView.extend({ - template: "AddSeries/SearchResultTemplate", + template: 'AddSeries/SearchResultTemplate', ui: { qualityProfile: '.x-quality-profile', diff --git a/UI/Calendar/CalendarLayout.js b/UI/Calendar/CalendarLayout.js index 18796aecf..50894415e 100644 --- a/UI/Calendar/CalendarLayout.js +++ b/UI/Calendar/CalendarLayout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', 'Calendar/UpcomingCollectionView', diff --git a/UI/Calendar/CalendarView.js b/UI/Calendar/CalendarView.js index 03b517965..8ef8da33c 100644 --- a/UI/Calendar/CalendarView.js +++ b/UI/Calendar/CalendarView.js @@ -18,8 +18,8 @@ define(['app', 'Calendar/Collection','fullcalendar'], function () { right : 'month,basicWeek' }, buttonText : { - prev: '', - next: '' + prev: '', + next: '' }, events : this.getEvents, eventRender : function (event, element) { diff --git a/UI/Calendar/Collection.js b/UI/Calendar/Collection.js index ec977b3e6..0752c3b57 100644 --- a/UI/Calendar/Collection.js +++ b/UI/Calendar/Collection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Series/EpisodeModel'], function () { NzbDrone.Calendar.Collection = Backbone.Collection.extend({ url : NzbDrone.Constants.ApiRoot + '/calendar', @@ -10,4 +10,4 @@ define(['app', 'Series/EpisodeModel'], function () { return time; } }); -}); \ No newline at end of file +}); diff --git a/UI/Calendar/UpcomingCollection.js b/UI/Calendar/UpcomingCollection.js index de535c897..83294c0c3 100644 --- a/UI/Calendar/UpcomingCollection.js +++ b/UI/Calendar/UpcomingCollection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Series/EpisodeModel'], function () { NzbDrone.Calendar.UpcomingCollection = Backbone.Collection.extend({ url : NzbDrone.Constants.ApiRoot + '/calendar', @@ -10,4 +10,4 @@ define(['app', 'Series/EpisodeModel'], function () { return time; } }); -}); \ No newline at end of file +}); diff --git a/UI/Cells/AirDateCell.js b/UI/Cells/AirDateCell.js index c6a0b3ebe..08d31eff9 100644 --- a/UI/Cells/AirDateCell.js +++ b/UI/Cells/AirDateCell.js @@ -1,12 +1,12 @@ -"use strict"; +'use strict'; define(['app', 'Shared/FormatHelpers','backgrid'], function () { NzbDrone.Cells.AirDateCell = Backgrid.Cell.extend({ - className: "air-date-cell", + className: 'air-date-cell', render: function () { this.$el.empty(); - var airDate = this.model.get(this.column.get("name")); + var airDate = this.model.get(this.column.get('name')); this.$el.html(NzbDrone.Shared.FormatHelpers.DateHelper(airDate)); return this; diff --git a/UI/Cells/EpisodeNumberCell.js b/UI/Cells/EpisodeNumberCell.js index 907e9387f..28670c712 100644 --- a/UI/Cells/EpisodeNumberCell.js +++ b/UI/Cells/EpisodeNumberCell.js @@ -1,9 +1,9 @@ -"use strict"; +'use strict'; define(['app', 'Cells/NzbDroneCell'], function () { NzbDrone.Cells.EpisodeNumberCell = NzbDrone.Cells.NzbDroneCell.extend({ - className: "episode-number-cell", + className: 'episode-number-cell', render: function () { diff --git a/UI/Cells/EpisodeStatusCell.js b/UI/Cells/EpisodeStatusCell.js index fee91b83c..bad5c3770 100644 --- a/UI/Cells/EpisodeStatusCell.js +++ b/UI/Cells/EpisodeStatusCell.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app','backgrid' ], function () { NzbDrone.Cells.EpisodeStatusCell = Backgrid.Cell.extend({ @@ -25,7 +25,7 @@ define(['app','backgrid' ], function () { } } - this.$el.html(''.format(icon)); + this.$el.html(''.format(icon)); } return this; diff --git a/UI/Cells/EpisodeTitleCell.js b/UI/Cells/EpisodeTitleCell.js index 0d2731a9a..b52d8ea59 100644 --- a/UI/Cells/EpisodeTitleCell.js +++ b/UI/Cells/EpisodeTitleCell.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Cells/NzbDroneCell'], function () { NzbDrone.Cells.EpisodeTitleCell = NzbDrone.Cells.NzbDroneCell.extend({ diff --git a/UI/Cells/FileSizeCell.js b/UI/Cells/FileSizeCell.js index 4ae55c65d..f3994bb2f 100644 --- a/UI/Cells/FileSizeCell.js +++ b/UI/Cells/FileSizeCell.js @@ -1,12 +1,12 @@ -"use strict"; +'use strict'; define(['app', 'Shared/FormatHelpers','backgrid'], function () { NzbDrone.Cells.FileSizeCell = Backgrid.Cell.extend({ - className: "file-size-cell", + className: 'file-size-cell', render: function () { - var size = this.model.get(this.column.get("name")); + var size = this.model.get(this.column.get('name')); this.$el.html(NzbDrone.Shared.FormatHelpers.FileSizeHelper(size)); this.delegateEvents(); return this; diff --git a/UI/Cells/IndexerCell.js b/UI/Cells/IndexerCell.js index 59b5d4ff3..62cce919c 100644 --- a/UI/Cells/IndexerCell.js +++ b/UI/Cells/IndexerCell.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app','backgrid'], function () { NzbDrone.Cells.IndexerCell = Backgrid.Cell.extend({ diff --git a/UI/Cells/NzbDroneCell.js b/UI/Cells/NzbDroneCell.js index f6ea4bb8e..8c259085e 100644 --- a/UI/Cells/NzbDroneCell.js +++ b/UI/Cells/NzbDroneCell.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app','backgrid'], function () { NzbDrone.Cells.NzbDroneCell = Backgrid.Cell.extend({ diff --git a/UI/Cells/QualityCell.js b/UI/Cells/QualityCell.js index cbc2c74c7..409bf2e3f 100644 --- a/UI/Cells/QualityCell.js +++ b/UI/Cells/QualityCell.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Cells/TemplatedCell'], function () { NzbDrone.Cells.QualityCell = NzbDrone.Cells.TemplatedCell.extend({ diff --git a/UI/Cells/RelativeDateCell.js b/UI/Cells/RelativeDateCell.js index 5dffc0cd6..ffab2a98a 100644 --- a/UI/Cells/RelativeDateCell.js +++ b/UI/Cells/RelativeDateCell.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app','Cells/NzbDroneCell'], function () { NzbDrone.Cells.RelativeDateCell = NzbDrone.Cells.NzbDroneCell.extend({ diff --git a/UI/Cells/SeriesTitleCell.js b/UI/Cells/SeriesTitleCell.js index 8d86eb5e1..ee6630273 100644 --- a/UI/Cells/SeriesTitleCell.js +++ b/UI/Cells/SeriesTitleCell.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Cells/TemplatedCell'], function () { NzbDrone.Cells.SeriesTitleCell = NzbDrone.Cells.TemplatedCell.extend({ diff --git a/UI/Cells/TemplatedCell.js b/UI/Cells/TemplatedCell.js index d7ccd820f..37321830d 100644 --- a/UI/Cells/TemplatedCell.js +++ b/UI/Cells/TemplatedCell.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app','Cells/NzbDroneCell'], function () { NzbDrone.Cells.TemplatedCell = NzbDrone.Cells.NzbDroneCell.extend({ diff --git a/UI/Cells/ToggleCell.js b/UI/Cells/ToggleCell.js index 4c8b8ce65..aeaa51b08 100644 --- a/UI/Cells/ToggleCell.js +++ b/UI/Cells/ToggleCell.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Episode/Layout'], function () { NzbDrone.Cells.ToggleCell = Backgrid.Cell.extend({ diff --git a/UI/Commands/CommandController.js b/UI/Commands/CommandController.js index ce22c5a6e..16a0a17f9 100644 --- a/UI/Commands/CommandController.js +++ b/UI/Commands/CommandController.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function () { NzbDrone.Commands.Execute = function (name, properties) { @@ -14,4 +14,4 @@ define(['app'], function () { data: JSON.stringify(data) }); }; -}); \ No newline at end of file +}); diff --git a/UI/Config.js b/UI/Config.js index 50a6e9120..6382c91b5 100644 --- a/UI/Config.js +++ b/UI/Config.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'app' diff --git a/UI/Constants.js b/UI/Constants.js index e1a115d3a..816e34eed 100644 --- a/UI/Constants.js +++ b/UI/Constants.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define({ ApiRoot : '/api' }); diff --git a/UI/Controller.js b/UI/Controller.js index 8057fd005..6a22e2930 100644 --- a/UI/Controller.js +++ b/UI/Controller.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'app', @@ -102,13 +102,13 @@ define( return; } - var cookies = document.cookie.split(";"); + var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = cookies[i]; - var eqPos = cookie.indexOf("="); + var eqPos = cookie.indexOf('='); var name = eqPos > -1 ? cookie.substr(0, eqPos) :cookie; - document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; + document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT'; } } }); diff --git a/UI/Episode/Layout.js b/UI/Episode/Layout.js index cc4148794..30a244f4e 100644 --- a/UI/Episode/Layout.js +++ b/UI/Episode/Layout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Shared/SpinnerView', 'Episode/Summary/View', 'Episode/Search/Layout', 'Release/Collection'], function () { NzbDrone.Episode.Layout = Backbone.Marionette.Layout.extend({ diff --git a/UI/Episode/Search/Layout.js b/UI/Episode/Search/Layout.js index dd5251c38..3c38dd007 100644 --- a/UI/Episode/Search/Layout.js +++ b/UI/Episode/Search/Layout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', 'Cells/FileSizeCell', diff --git a/UI/Episode/Summary/View.js b/UI/Episode/Summary/View.js index 4403c0a0b..a1ea1fb18 100644 --- a/UI/Episode/Summary/View.js +++ b/UI/Episode/Summary/View.js @@ -1,8 +1,8 @@ -"use strict"; +'use strict'; define(['app'], function () { NzbDrone.Episode.Summary.View = Backbone.Marionette.ItemView.extend({ template: 'Episode/Summary/ViewTemplate' }); -}); \ No newline at end of file +}); diff --git a/UI/Form/FormBuilder.js b/UI/Form/FormBuilder.js index 423d2b38e..1db81c9f6 100644 --- a/UI/Form/FormBuilder.js +++ b/UI/Form/FormBuilder.js @@ -1,7 +1,7 @@ 'use strict'; define(['app', 'handlebars'], function (App,Handlebars) { Handlebars.registerHelper('formBuilder', function () { - var ret = ""; + var ret = ''; _.each(this.fields, function (field) { ret += NzbDrone.Form.FieldBuilder(field); }); diff --git a/UI/Handlebars/Helpers/DateTime.js b/UI/Handlebars/Helpers/DateTime.js index cf5db55c4..466fac7e1 100644 --- a/UI/Handlebars/Helpers/DateTime.js +++ b/UI/Handlebars/Helpers/DateTime.js @@ -1,10 +1,10 @@ -"use strict"; +'use strict'; define( [ 'sugar' ], { register: function (handlebars) { - handlebars.registerHelper("ShortDate", function (input) { + handlebars.registerHelper('ShortDate', function (input) { if (!input) { return ''; } diff --git a/UI/Handlebars/backbone.marionette.templates.js b/UI/Handlebars/backbone.marionette.templates.js index b5c2a32a5..061575c18 100644 --- a/UI/Handlebars/backbone.marionette.templates.js +++ b/UI/Handlebars/backbone.marionette.templates.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['templates'], function (Templates) { return function () { diff --git a/UI/History/Collection.js b/UI/History/Collection.js index d9fb1b740..7b8f64a75 100644 --- a/UI/History/Collection.js +++ b/UI/History/Collection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'History/Model', 'backbone.pageable'], function (App, HistoryModel, PageableCollection) { NzbDrone.History.Collection = PageableCollection.extend({ url : NzbDrone.Constants.ApiRoot + '/history', @@ -6,7 +6,7 @@ define(['app', 'History/Model', 'backbone.pageable'], function (App, HistoryMode state: { pageSize: 15, - sortKey: "date", + sortKey: 'date', order: 1 }, @@ -14,11 +14,11 @@ define(['app', 'History/Model', 'backbone.pageable'], function (App, HistoryMode totalPages: null, totalRecords: null, pageSize: 'pageSize', - sortKey: "sortKey", - order: "sortDir", + sortKey: 'sortKey', + order: 'sortDir', directions: { - "-1": "asc", - "1": "desc" + '-1': 'asc', + '1': 'desc' } }, diff --git a/UI/History/EventTypeCell.js b/UI/History/EventTypeCell.js index 7a2af47e6..eb7755681 100644 --- a/UI/History/EventTypeCell.js +++ b/UI/History/EventTypeCell.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Cells/NzbDroneCell' ], function () { NzbDrone.History.EventTypeCell = NzbDrone.Cells.NzbDroneCell.extend({ @@ -32,7 +32,7 @@ define(['app', 'Cells/NzbDroneCell' ], function () { } - this.$el.html(''.format(icon, toolTip)); + this.$el.html(''.format(icon, toolTip)); } return this; diff --git a/UI/History/HistoryLayout.js b/UI/History/HistoryLayout.js index f739cc02c..4c009dc15 100644 --- a/UI/History/HistoryLayout.js +++ b/UI/History/HistoryLayout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', 'History/Collection', diff --git a/UI/History/Model.js b/UI/History/Model.js index 3db750b81..8ca6098df 100644 --- a/UI/History/Model.js +++ b/UI/History/Model.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app','Series/SeriesModel', 'Series/EpisodeModel'], function () { NzbDrone.History.Model = Backbone.Model.extend({ mutators: { diff --git a/UI/Instrumentation/ErrorHandler.js b/UI/Instrumentation/ErrorHandler.js index bef3412e1..ec6a18f79 100644 --- a/UI/Instrumentation/ErrorHandler.js +++ b/UI/Instrumentation/ErrorHandler.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; (function () { /* var model = new NzbDrone.Shared.NotificationModel(); @@ -29,7 +29,7 @@ var a = document.createElement('a'); a.href = url; - var messageText = a.pathname.split('/').pop() + ' : ' + line + "
" + msg; + var messageText = a.pathname.split('/').pop() + ' : ' + line + '
' + msg; var message = { message : messageText, @@ -41,7 +41,7 @@ window.Messenger().post(message); } catch (error) { - console.log("An error occurred while reporting error. " + error); + console.log('An error occurred while reporting error. ' + error); console.log(msg); window.alert('Couldn\'t report JS error. ' + msg); } @@ -71,7 +71,7 @@ return false; //message.message = 'NzbDrone Server Not Reachable. make sure NzbDrone is running.'; } else { - message.message = "[{0}] {1} : {2}".format(ajaxOptions.type, xmlHttpRequest.statusText, ajaxOptions.url); + message.message = '[{0}] {1} : {2}'.format(ajaxOptions.type, xmlHttpRequest.statusText, ajaxOptions.url); } window.Messenger().post(message); diff --git a/UI/Instrumentation/StringFormat.js b/UI/Instrumentation/StringFormat.js index b441cd597..b197987d3 100644 --- a/UI/Instrumentation/StringFormat.js +++ b/UI/Instrumentation/StringFormat.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; String.prototype.format = function () { var args = arguments; return this.replace(/{(\d+)}/g, function (match, number) { diff --git a/UI/Logs/Collection.js b/UI/Logs/Collection.js index cfc645874..2f0b0f330 100644 --- a/UI/Logs/Collection.js +++ b/UI/Logs/Collection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Logs/Model', 'backbone.pageable'], function (app, SeriesModel, PagableCollection) { NzbDrone.Logs.Collection = PagableCollection.extend({ url : NzbDrone.Constants.ApiRoot + '/log', @@ -6,7 +6,7 @@ define(['app', 'Logs/Model', 'backbone.pageable'], function (app, SeriesModel, P state: { pageSize: 50, - sortKey : "time", + sortKey : 'time', order : 1 }, @@ -14,11 +14,11 @@ define(['app', 'Logs/Model', 'backbone.pageable'], function (app, SeriesModel, P totalPages : null, totalRecords: null, pageSize : 'pageSize', - sortKey : "sortKey", - order : "sortDir", + sortKey : 'sortKey', + order : 'sortDir', directions : { - "-1": "asc", - "1" : "desc" + '-1': 'asc', + '1' : 'desc' } }, diff --git a/UI/Logs/Layout.js b/UI/Logs/Layout.js index 00da82270..7f5aabbe1 100644 --- a/UI/Logs/Layout.js +++ b/UI/Logs/Layout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', 'Logs/Collection', diff --git a/UI/Logs/Model.js b/UI/Logs/Model.js index 7f0ff7edf..ce490c009 100644 --- a/UI/Logs/Model.js +++ b/UI/Logs/Model.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function (app) { NzbDrone.Logs.Model = Backbone.Model.extend({ /* mutators: { diff --git a/UI/MainMenuView.js b/UI/MainMenuView.js index c37882dfb..972d9b45c 100644 --- a/UI/MainMenuView.js +++ b/UI/MainMenuView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function () { var MainMenuView = Backbone.Marionette.ItemView.extend({ events: { diff --git a/UI/Missing/Collection.js b/UI/Missing/Collection.js index 4fc370aa6..dcd11ab10 100644 --- a/UI/Missing/Collection.js +++ b/UI/Missing/Collection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Series/EpisodeModel', 'backbone.pageable'], function (app, EpisodeModel, PagableCollection) { NzbDrone.Missing.Collection = PagableCollection.extend({ url : NzbDrone.Constants.ApiRoot + '/missing', @@ -6,7 +6,7 @@ define(['app', 'Series/EpisodeModel', 'backbone.pageable'], function (app, Episo state: { pageSize: 15, - sortKey : "airDate", + sortKey : 'airDate', order : 1 }, @@ -14,11 +14,11 @@ define(['app', 'Series/EpisodeModel', 'backbone.pageable'], function (app, Episo totalPages : null, totalRecords: null, pageSize : 'pageSize', - sortKey : "sortKey", - order : "sortDir", + sortKey : 'sortKey', + order : 'sortDir', directions : { - "-1": "asc", - "1" : "desc" + '-1': 'asc', + '1' : 'desc' } }, diff --git a/UI/Missing/MissingLayout.js b/UI/Missing/MissingLayout.js index e972d588e..f2bbcf1cd 100644 --- a/UI/Missing/MissingLayout.js +++ b/UI/Missing/MissingLayout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'app', diff --git a/UI/Missing/Row.js b/UI/Missing/Row.js index 30af3d97a..86c880fb6 100644 --- a/UI/Missing/Row.js +++ b/UI/Missing/Row.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'backgrid' diff --git a/UI/Mixins/AutoComplete.js b/UI/Mixins/AutoComplete.js index 00f43efe3..5660274e9 100644 --- a/UI/Mixins/AutoComplete.js +++ b/UI/Mixins/AutoComplete.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function () { @@ -7,8 +7,8 @@ define(['app'], function () { source : function (filter, callback) { $.ajax({ url : NzbDrone.Constants.ApiRoot + resource, - dataType: "json", - type : "GET", + dataType: 'json', + type : 'GET', data : { query: filter }, success : function (data) { callback(data); diff --git a/UI/Mixins/backbone.ajax.js b/UI/Mixins/backbone.ajax.js index e56c5e89c..5a4821d4b 100644 --- a/UI/Mixins/backbone.ajax.js +++ b/UI/Mixins/backbone.ajax.js @@ -1,5 +1,5 @@ //try to add ajax data as query string to DELETE calls. -"use strict"; +'use strict'; define(function () { return function () { diff --git a/UI/Mixins/backbone.marionette.region.mixin.js b/UI/Mixins/backbone.marionette.region.mixin.js index 185413ed4..916d5a14e 100644 --- a/UI/Mixins/backbone.marionette.region.mixin.js +++ b/UI/Mixins/backbone.marionette.region.mixin.js @@ -1,5 +1,5 @@ /* -"use strict"; +'use strict'; (function () { diff --git a/UI/Mixins/backbone.signalr.mixin.js b/UI/Mixins/backbone.signalr.mixin.js index 313f39dbf..50f397856 100644 --- a/UI/Mixins/backbone.signalr.mixin.js +++ b/UI/Mixins/backbone.signalr.mixin.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'signalR'], function () { _.extend(Backbone.Collection.prototype, {BindSignalR: function (options) { diff --git a/UI/Mixins/underscore.mixin.deepExtend.js b/UI/Mixins/underscore.mixin.deepExtend.js index 6a1d41c1a..69902775b 100644 --- a/UI/Mixins/underscore.mixin.deepExtend.js +++ b/UI/Mixins/underscore.mixin.deepExtend.js @@ -19,7 +19,7 @@ return new Date(obj.getTime()); } if (_.isRegExp(obj)) { - return new RegExp(obj.source, obj.toString().replace(/.*\//, "")); + return new RegExp(obj.source, obj.toString().replace(/.*\//, '')); } isArr = _.isArray(obj || _.isArguments(obj)); func = function(memo, value, key) { diff --git a/UI/Quality/QualitySizeCollection.js b/UI/Quality/QualitySizeCollection.js index f329b58e6..1687bfcd4 100644 --- a/UI/Quality/QualitySizeCollection.js +++ b/UI/Quality/QualitySizeCollection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Quality/QualitySizeModel'], function () { NzbDrone.Quality.QualitySizeCollection = Backbone.Collection.extend({ model: NzbDrone.Quality.QualitySizeModel, diff --git a/UI/Quality/QualitySizeModel.js b/UI/Quality/QualitySizeModel.js index 26a6bcbfe..403946eef 100644 --- a/UI/Quality/QualitySizeModel.js +++ b/UI/Quality/QualitySizeModel.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function () { NzbDrone.Quality.QualitySizeModel = Backbone.Model.extend({ diff --git a/UI/Quality/qualityProfileCollection.js b/UI/Quality/qualityProfileCollection.js index 2a15d5af5..55b93ccf4 100644 --- a/UI/Quality/qualityProfileCollection.js +++ b/UI/Quality/qualityProfileCollection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Quality/QualityProfileModel'], function () { var qualityProfileCollection = Backbone.Collection.extend({ diff --git a/UI/Quality/qualityProfileModel.js b/UI/Quality/qualityProfileModel.js index 53662a9cf..39cae21e0 100644 --- a/UI/Quality/qualityProfileModel.js +++ b/UI/Quality/qualityProfileModel.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'backbone.deepmodel'], function (App, DeepModel) { NzbDrone.Quality.QualityProfileModel = DeepModel.DeepModel.extend({ diff --git a/UI/Release/ApprovalStatusCell.js b/UI/Release/ApprovalStatusCell.js index 20ca112f8..b7f77595a 100644 --- a/UI/Release/ApprovalStatusCell.js +++ b/UI/Release/ApprovalStatusCell.js @@ -1,12 +1,12 @@ -"use strict"; +'use strict'; require(['app', 'backgrid'], function () { NzbDrone.Release.ApprovalStatusCell = Backgrid.Cell.extend({ - className: "approval-status-cell", + className: 'approval-status-cell', render: function () { - var rejections = this.model.get(this.column.get("name")); + var rejections = this.model.get(this.column.get('name')); var result = ''; diff --git a/UI/Release/Collection.js b/UI/Release/Collection.js index a8333963a..601a02c50 100644 --- a/UI/Release/Collection.js +++ b/UI/Release/Collection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Release/Model', 'backbone.pageable'], function (app, SeriesModel, PagableCollection) { NzbDrone.Release.Collection = PagableCollection.extend({ url : NzbDrone.Constants.ApiRoot + '/release', diff --git a/UI/Release/DownloadReportCell.js b/UI/Release/DownloadReportCell.js index bb308c2dc..9ccbe9a1f 100644 --- a/UI/Release/DownloadReportCell.js +++ b/UI/Release/DownloadReportCell.js @@ -1,9 +1,9 @@ -"use strict"; +'use strict'; define(['app','backgrid'], function () { NzbDrone.Release.DownloadReportCell = Backgrid.Cell.extend({ - className: "download-report-cell", + className: 'download-report-cell', events: { 'click': '_onClick' @@ -13,16 +13,16 @@ define(['app','backgrid'], function () { var self = this; - this.$el.html(''); + this.$el.html(''); this.model.save() .always(function () { - self.$el.html(''); + self.$el.html(''); }); }, render: function () { - this.$el.html(''); + this.$el.html(''); return this; } diff --git a/UI/Release/Layout.js b/UI/Release/Layout.js index f405f4bd5..38c22247c 100644 --- a/UI/Release/Layout.js +++ b/UI/Release/Layout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', 'Release/Collection', diff --git a/UI/Release/Model.js b/UI/Release/Model.js index 1a38f8706..3229b4dfc 100644 --- a/UI/Release/Model.js +++ b/UI/Release/Model.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function () { NzbDrone.Release.Model = Backbone.Model.extend({ /* mutators: { diff --git a/UI/Router.js b/UI/Router.js index ae4d9f4d6..bcc400314 100644 --- a/UI/Router.js +++ b/UI/Router.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; require( [ 'app', diff --git a/UI/Series/Details/SeasonCollectionView.js b/UI/Series/Details/SeasonCollectionView.js index 5550790a5..c76138748 100644 --- a/UI/Series/Details/SeasonCollectionView.js +++ b/UI/Series/Details/SeasonCollectionView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Series/Details/SeasonLayout', 'Series/SeasonCollection', 'Series/EpisodeCollection'], function () { NzbDrone.Series.Details.SeasonCollectionView = Backbone.Marionette.CollectionView.extend({ diff --git a/UI/Series/Details/SeriesDetailsLayout.js b/UI/Series/Details/SeriesDetailsLayout.js index 4cb037fd4..c16188b86 100644 --- a/UI/Series/Details/SeriesDetailsLayout.js +++ b/UI/Series/Details/SeriesDetailsLayout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Series/Details/SeasonCollectionView', 'Shared/LoadingView','backstrech'], function () { NzbDrone.Series.Details.SeriesDetailsLayout = Backbone.Marionette.Layout.extend({ diff --git a/UI/Series/EpisodeCollection.js b/UI/Series/EpisodeCollection.js index 9352e32f7..c53e6a88c 100644 --- a/UI/Series/EpisodeCollection.js +++ b/UI/Series/EpisodeCollection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Series/EpisodeModel'], function () { NzbDrone.Series.EpisodeCollection = Backbone.Collection.extend({ url : NzbDrone.Constants.ApiRoot + '/episodes', @@ -6,7 +6,7 @@ define(['app', 'Series/EpisodeModel'], function () { bySeason: function (season) { var filtered = this.filter(function (episode) { - return episode.get("seasonNumber") === season; + return episode.get('seasonNumber') === season; }); return new NzbDrone.Series.EpisodeCollection(filtered); diff --git a/UI/Series/EpisodeModel.js b/UI/Series/EpisodeModel.js index eef0da6a6..1ee16462a 100644 --- a/UI/Series/EpisodeModel.js +++ b/UI/Series/EpisodeModel.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Series/SeriesModel'], function () { NzbDrone.Series.EpisodeModel = Backbone.Model.extend({ diff --git a/UI/Series/Index/SeriesIndexLayout.js b/UI/Series/Index/SeriesIndexLayout.js index ef16ecd7d..a885c36f4 100644 --- a/UI/Series/Index/SeriesIndexLayout.js +++ b/UI/Series/Index/SeriesIndexLayout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', 'Series/Index/List/CollectionView', diff --git a/UI/Series/Index/Table/Row.js b/UI/Series/Index/Table/Row.js index cd0b43c85..d13497549 100644 --- a/UI/Series/Index/Table/Row.js +++ b/UI/Series/Index/Table/Row.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app','backgrid'], function () { NzbDrone.Series.Index.Table.Row = Backgrid.Row.extend({ events: { diff --git a/UI/Series/Index/Table/SeriesStatusCell.js b/UI/Series/Index/Table/SeriesStatusCell.js index b2a26ea8a..f25eeb3a1 100644 --- a/UI/Series/Index/Table/SeriesStatusCell.js +++ b/UI/Series/Index/Table/SeriesStatusCell.js @@ -1,7 +1,7 @@ -"use strict"; +'use strict'; define(['app','backgrid'], function () { Backgrid.SeriesStatusCell = Backgrid.Cell.extend({ - className: "series-status-cell", + className: 'series-status-cell', render: function () { this.$el.empty(); @@ -9,14 +9,14 @@ define(['app','backgrid'], function () { var status = this.model.get('status'); if (!monitored) { - this.$el.html(''); + this.$el.html(''); } else if (status === 'continuing') { - this.$el.html(''); + this.$el.html(''); } else { - this.$el.html(''); + this.$el.html(''); } return this; diff --git a/UI/Series/SeasonCollection.js b/UI/Series/SeasonCollection.js index 87e705421..8b2db0450 100644 --- a/UI/Series/SeasonCollection.js +++ b/UI/Series/SeasonCollection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Series/SeasonModel', 'backbone.pageable'], function (App, SeasonModel, PageAbleCollection) { NzbDrone.Series.SeasonCollection = PageAbleCollection.extend({ url : NzbDrone.Constants.ApiRoot + '/season', diff --git a/UI/Series/SeasonModel.js b/UI/Series/SeasonModel.js index ca3f26d5e..c52da83f9 100644 --- a/UI/Series/SeasonModel.js +++ b/UI/Series/SeasonModel.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function () { NzbDrone.Series.SeasonModel = Backbone.Model.extend({ @@ -7,10 +7,10 @@ define(['app'], function () { var seasonNumber = this.get('seasonNumber'); if (seasonNumber === 0) { - return "Specials"; + return 'Specials'; } - return "Season " + seasonNumber; + return 'Season ' + seasonNumber; } }, diff --git a/UI/Series/SeriesCollection.js b/UI/Series/SeriesCollection.js index ba4d9f6d1..de8d15014 100644 --- a/UI/Series/SeriesCollection.js +++ b/UI/Series/SeriesCollection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Series/SeriesModel'], function () { NzbDrone.Series.SeriesCollection = Backbone.Collection.extend({ url : NzbDrone.Constants.ApiRoot + '/series', @@ -9,7 +9,7 @@ define(['app', 'Series/SeriesModel'], function () { }, state: { - sortKey: "title", + sortKey: 'title', order: -1 } }); diff --git a/UI/Series/SeriesModel.js b/UI/Series/SeriesModel.js index 659be3eaf..5830f966b 100644 --- a/UI/Series/SeriesModel.js +++ b/UI/Series/SeriesModel.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Quality/QualityProfileCollection'], function (app, qualityProfiles) { NzbDrone.Series.SeriesModel = Backbone.Model.extend({ @@ -40,10 +40,10 @@ define(['app', 'Quality/QualityProfileCollection'], function (app, qualityProfil return undefined; }, traktUrl : function () { - return "http://trakt.tv/show/" + this.get('titleSlug'); + return 'http://trakt.tv/show/' + this.get('titleSlug'); }, imdbUrl : function () { - return "http://imdb.com/title/" + this.get('imdbId'); + return 'http://imdb.com/title/' + this.get('imdbId'); }, isContinuing : function () { return this.get('status') === 'continuing'; diff --git a/UI/ServerStatus.js b/UI/ServerStatus.js index a23f90837..2504dcd04 100644 --- a/UI/ServerStatus.js +++ b/UI/ServerStatus.js @@ -1,5 +1,5 @@ var statusText = $.ajax({ - type : "GET", + type : 'GET', url : '/api/system/status', async: false }).responseText; diff --git a/UI/Settings/DownloadClient/DownloadClientView.js b/UI/Settings/DownloadClient/DownloadClientView.js index 239b63ea8..358d4b97d 100644 --- a/UI/Settings/DownloadClient/DownloadClientView.js +++ b/UI/Settings/DownloadClient/DownloadClientView.js @@ -37,32 +37,32 @@ define([ refreshUIVisibility: function (clientId) { if (!clientId) { - clientId = "sabnzbd"; + clientId = 'sabnzbd'; } switch (clientId.toString()) { - case "sabnzbd": + case 'sabnzbd': this.ui.sabConfig.show(); this.ui.blackholeConfig.hide(); this.ui.pneumaticConfig.hide(); this.ui.nzbGetConfig.hide(); break; - case "blackhole": + case 'blackhole': this.ui.sabConfig.hide(); this.ui.blackholeConfig.show(); this.ui.pneumaticConfig.hide(); this.ui.nzbGetConfig.hide(); break; - case "pneumatic": + case 'pneumatic': this.ui.sabConfig.hide(); this.ui.blackholeConfig.hide(); this.ui.pneumaticConfig.show(); this.ui.nzbGetConfig.hide(); break; - case "nzbget": + case 'nzbget': this.ui.sabConfig.hide(); this.ui.blackholeConfig.hide(); this.ui.pneumaticConfig.hide(); @@ -70,7 +70,7 @@ define([ break; default : - throw "unknown download client id" + clientId; + throw 'unknown download client id' + clientId; } } }); diff --git a/UI/Settings/General/GeneralSettingsModel.js b/UI/Settings/General/GeneralSettingsModel.js index 70f71dc6e..e748f5d5a 100644 --- a/UI/Settings/General/GeneralSettingsModel.js +++ b/UI/Settings/General/GeneralSettingsModel.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'backbone', 'Mixins/AsChangeTrackingModel'], function (App, Backbone, AsChangeTrackingModel) { var model = Backbone.Model.extend({ diff --git a/UI/Settings/Indexers/Collection.js b/UI/Settings/Indexers/Collection.js index 5e043a01b..f2da2c061 100644 --- a/UI/Settings/Indexers/Collection.js +++ b/UI/Settings/Indexers/Collection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Settings/Indexers/Model'], function (App, IndexerModel) { return Backbone.Collection.extend({ url : App.Constants.ApiRoot + '/indexer', diff --git a/UI/Settings/Indexers/EditView.js b/UI/Settings/Indexers/EditView.js index 7eaffbce9..9332c3e19 100644 --- a/UI/Settings/Indexers/EditView.js +++ b/UI/Settings/Indexers/EditView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', diff --git a/UI/Settings/Indexers/ItemView.js b/UI/Settings/Indexers/ItemView.js index 70b537408..2531eeeb9 100644 --- a/UI/Settings/Indexers/ItemView.js +++ b/UI/Settings/Indexers/ItemView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['marionette', 'Mixins/AsModelBoundView'], function (Marionette, AsModelBoundView) { diff --git a/UI/Settings/Indexers/Model.js b/UI/Settings/Indexers/Model.js index e54ea681b..eda24acee 100644 --- a/UI/Settings/Indexers/Model.js +++ b/UI/Settings/Indexers/Model.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'Settings/SettingsModelBase'], function (ModelBase) { return ModelBase.extend({ diff --git a/UI/Settings/Misc/MiscView.js b/UI/Settings/Misc/MiscView.js index ffbba425a..e08c72b83 100644 --- a/UI/Settings/Misc/MiscView.js +++ b/UI/Settings/Misc/MiscView.js @@ -7,7 +7,7 @@ define(['marionette', 'Mixins/AsModelBoundview'], function (Marionette, AsModelB className: 'form-horizontal', ui: { - tooltip: '[class^="help-inline"] i' + tooltip: '[class^='help-inline'] i' } }); diff --git a/UI/Settings/Naming/NamingModel.js b/UI/Settings/Naming/NamingModel.js index 25b7b933a..a892f0522 100644 --- a/UI/Settings/Naming/NamingModel.js +++ b/UI/Settings/Naming/NamingModel.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Settings/SettingsModelBase'], function (App, ModelBase) { return ModelBase.extend({ diff --git a/UI/Settings/Notifications/AddItemView.js b/UI/Settings/Notifications/AddItemView.js index 65704842c..62dd32f5c 100644 --- a/UI/Settings/Notifications/AddItemView.js +++ b/UI/Settings/Notifications/AddItemView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', diff --git a/UI/Settings/Notifications/AddView.js b/UI/Settings/Notifications/AddView.js index 38f53715c..f0049a46e 100644 --- a/UI/Settings/Notifications/AddView.js +++ b/UI/Settings/Notifications/AddView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'marionette', diff --git a/UI/Settings/Notifications/Collection.js b/UI/Settings/Notifications/Collection.js index 6e0eb508d..daf20a9a7 100644 --- a/UI/Settings/Notifications/Collection.js +++ b/UI/Settings/Notifications/Collection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Settings/Notifications/Model'], function (App, NotificationModel) { return Backbone.Collection.extend({ url : App.Constants.ApiRoot + '/notification', diff --git a/UI/Settings/Notifications/EditView.js b/UI/Settings/Notifications/EditView.js index f20e4eb61..41673c85b 100644 --- a/UI/Settings/Notifications/EditView.js +++ b/UI/Settings/Notifications/EditView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', diff --git a/UI/Settings/Notifications/ItemView.js b/UI/Settings/Notifications/ItemView.js index c80e3bd54..504e75a17 100644 --- a/UI/Settings/Notifications/ItemView.js +++ b/UI/Settings/Notifications/ItemView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', diff --git a/UI/Settings/Notifications/Model.js b/UI/Settings/Notifications/Model.js index 9acfe9d9f..77f791ee0 100644 --- a/UI/Settings/Notifications/Model.js +++ b/UI/Settings/Notifications/Model.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'backbone.deepmodel'], function (App, DeepModel) { return DeepModel.DeepModel.extend({ }); diff --git a/UI/Settings/Quality/QualityLayout.js b/UI/Settings/Quality/QualityLayout.js index 668166ae1..03942df51 100644 --- a/UI/Settings/Quality/QualityLayout.js +++ b/UI/Settings/Quality/QualityLayout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', 'marionette', diff --git a/UI/Settings/SettingsLayout.js b/UI/Settings/SettingsLayout.js index c9dc9aa25..994670199 100644 --- a/UI/Settings/SettingsLayout.js +++ b/UI/Settings/SettingsLayout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', 'marionette', diff --git a/UI/Settings/SettingsModel.js b/UI/Settings/SettingsModel.js index 19a12e57c..e93127d20 100644 --- a/UI/Settings/SettingsModel.js +++ b/UI/Settings/SettingsModel.js @@ -1,9 +1,9 @@ -"use strict"; +'use strict'; define(['app', 'Settings/SettingsModelBase'], function (App, SettingsModelBase) { return SettingsModelBase.extend({ url : App.Constants.ApiRoot + '/settings', successMessage: 'Settings saved', - errorMessage : "Failed to save settings" + errorMessage : 'Failed to save settings' }); }); diff --git a/UI/Settings/SettingsModelBase.js b/UI/Settings/SettingsModelBase.js index 78d8ebc8c..22e03dc2a 100644 --- a/UI/Settings/SettingsModelBase.js +++ b/UI/Settings/SettingsModelBase.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'backbone.deepmodel', 'Mixins/AsChangeTrackingModel', diff --git a/UI/Shared/Footer/View.js b/UI/Shared/Footer/View.js index 0c29c66f4..846ff843d 100644 --- a/UI/Shared/Footer/View.js +++ b/UI/Shared/Footer/View.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'marionette', diff --git a/UI/Shared/FormatHelpers.js b/UI/Shared/FormatHelpers.js index 87cf95eb8..a6d910bbf 100644 --- a/UI/Shared/FormatHelpers.js +++ b/UI/Shared/FormatHelpers.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function () { NzbDrone.Shared.FormatHelpers.FileSizeHelper = function (sourceSize) { diff --git a/UI/Shared/Grid/HeaderCell.js b/UI/Shared/Grid/HeaderCell.js index 00242b9fc..0fb2f69a5 100644 --- a/UI/Shared/Grid/HeaderCell.js +++ b/UI/Shared/Grid/HeaderCell.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app','backgrid'], function () { @@ -10,11 +10,11 @@ define(['app','backgrid'], function () { render: function () { this.$el.empty(); - this.$el.append(this.column.get("label")); + this.$el.append(this.column.get('label')); if (this.column.get('sortable')) { this.$el.addClass('clickable'); - this.$el.append(" "); + this.$el.append(' '); if (this.collection.state) { var sortKey = this.collection.state.sortKey; @@ -47,11 +47,11 @@ define(['app','backgrid'], function () { onClick: function (e) { e.preventDefault(); - var columnName = this.column.get("name"); + var columnName = this.column.get('name'); - if (this.column.get("sortable")) { - if (this.direction() === "ascending") { - this.sort(columnName, "descending", function (left, right) { + if (this.column.get('sortable')) { + if (this.direction() === 'ascending') { + this.sort(columnName, 'descending', function (left, right) { var leftVal = left.get(columnName); var rightVal = right.get(columnName); if (leftVal === rightVal) { @@ -64,7 +64,7 @@ define(['app','backgrid'], function () { }); } else { - this.sort(columnName, "ascending", function (left, right) { + this.sort(columnName, 'ascending', function (left, right) { var leftVal = left.get(columnName); var rightVal = right.get(columnName); if (leftVal === rightVal) { diff --git a/UI/Shared/Grid/Pager.js b/UI/Shared/Grid/Pager.js index 6a8ca69ce..b3240dff6 100644 --- a/UI/Shared/Grid/Pager.js +++ b/UI/Shared/Grid/Pager.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define([ 'app', 'backgrid', @@ -10,7 +10,7 @@ define([ template: 'Shared/Grid/PagerTemplate', events: { - "click .pager-btn": "changePage" + 'click .pager-btn': 'changePage' }, windowSize: 1, @@ -77,12 +77,12 @@ define([ var windowStart = Math.floor(currentPage / this.windowSize) * this.windowSize; var windowEnd = Math.min(lastPage + 1, windowStart + this.windowSize); - if (collection.mode !== "infinite") { + if (collection.mode !== 'infinite') { for (var i = windowStart; i < windowEnd; i++) { handles.push({ label : i + 1, - title : "No. " + (i + 1), - className : currentPage === i ? "active" :undefined, + title : 'No. ' + (i + 1), + className : currentPage === i ? 'active' :undefined, pageNumber: i + 1 }); } @@ -94,7 +94,7 @@ define([ if (ffLabels.prev) { handles.unshift({ label : ffLabels.prev, - className: collection.hasPrevious() ? void 0 :"disabled", + className: collection.hasPrevious() ? void 0 :'disabled', action : 'prev' }); } @@ -102,7 +102,7 @@ define([ if (ffLabels.first) { handles.unshift({ label : ffLabels.first, - className: collection.hasPrevious() ? void 0 :"disabled", + className: collection.hasPrevious() ? void 0 :'disabled', action : 'first' }); } @@ -110,7 +110,7 @@ define([ if (ffLabels.next) { handles.push({ label : ffLabels.next, - className: collection.hasNext() ? void 0 :"disabled", + className: collection.hasNext() ? void 0 :'disabled', action : 'next' }); } @@ -118,7 +118,7 @@ define([ if (ffLabels.last) { handles.push({ label : ffLabels.last, - className: collection.hasNext() ? void 0 :"disabled", + className: collection.hasNext() ? void 0 :'disabled', action : 'last' }); } diff --git a/UI/Shared/LoadingView.js b/UI/Shared/LoadingView.js index 8a8873857..abb66d1c4 100644 --- a/UI/Shared/LoadingView.js +++ b/UI/Shared/LoadingView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function () { NzbDrone.Shared.LoadingView = Backbone.Marionette.ItemView.extend({ diff --git a/UI/Shared/Messenger.js b/UI/Shared/Messenger.js index bdda55a76..8f04009d9 100644 --- a/UI/Shared/Messenger.js +++ b/UI/Shared/Messenger.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(function () { return { show: function (options) { diff --git a/UI/Shared/Modal/Region.js b/UI/Shared/Modal/Region.js index 92f56ed25..c2b2a8e2b 100644 --- a/UI/Shared/Modal/Region.js +++ b/UI/Shared/Modal/Region.js @@ -1,20 +1,20 @@ -"use strict"; +'use strict'; define( [ 'marionette', 'bootstrap' ], function (Marionette) { return Marionette.Region.extend({ - el: "#modal-region", + el: '#modal-region', constructor: function () { Backbone.Marionette.Region.prototype.constructor.apply(this, arguments); - this.on("show", this.showModal, this); + this.on('show', this.showModal, this); }, getEl: function (selector) { var $el = $(selector); - $el.on("hidden", this.close); + $el.on('hidden', this.close); return $el; }, diff --git a/UI/Shared/NotFoundView.js b/UI/Shared/NotFoundView.js index 0c176d4a3..05115205b 100644 --- a/UI/Shared/NotFoundView.js +++ b/UI/Shared/NotFoundView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function () { NzbDrone.Shared.NotFoundView = Backbone.Marionette.ItemView.extend({ template: 'Shared/notfoundtemplate' diff --git a/UI/Shared/NotificationCollection.js b/UI/Shared/NotificationCollection.js index 95e6ffdeb..744c07dae 100644 --- a/UI/Shared/NotificationCollection.js +++ b/UI/Shared/NotificationCollection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Shared/NotificationModel'], function () { var notificationCollection = Backbone.Collection.extend({ diff --git a/UI/Shared/NotificationModel.js b/UI/Shared/NotificationModel.js index 176f67b47..5a83fa793 100644 --- a/UI/Shared/NotificationModel.js +++ b/UI/Shared/NotificationModel.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function () { NzbDrone.Shared.NotificationModel = Backbone.Model.extend({ @@ -19,21 +19,21 @@ define(['app'], function () { } if (this.get('level') === 'info') { - return "icon-info-sign"; + return 'icon-info-sign'; } else if (this.get('level') === 'success') { return 'icon-ok-sign'; } else if (this.get('level') === 'error') { return 'icon-warning-sign'; } - return ""; + return ''; } }, defaults: { - "level" : 'info', - "title" : '', - "message": '' + 'level' : 'info', + 'title' : '', + 'message': '' } }); -}); \ No newline at end of file +}); diff --git a/UI/Shared/NotificationView.js b/UI/Shared/NotificationView.js index f98a53611..e21b4f8e5 100644 --- a/UI/Shared/NotificationView.js +++ b/UI/Shared/NotificationView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Shared/NotificationCollection'], function (app, notificationCollection) { diff --git a/UI/Shared/SpinnerView.js b/UI/Shared/SpinnerView.js index 785657699..1807b321d 100644 --- a/UI/Shared/SpinnerView.js +++ b/UI/Shared/SpinnerView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ diff --git a/UI/Shared/TemplateHelpers.js b/UI/Shared/TemplateHelpers.js index 6a2881e62..c18485bb8 100644 --- a/UI/Shared/TemplateHelpers.js +++ b/UI/Shared/TemplateHelpers.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app','handlebars','Shared/FormatHelpers'], function (App,Handlebars) { Handlebars.registerHelper('partial', function (templateName) { @@ -8,23 +8,23 @@ define(['app','handlebars','Shared/FormatHelpers'], function (App,Handlebars) { return new Handlebars.SafeString(templateFunction(this)); }); - Handlebars.registerHelper("debug", function (optionalValue) { - console.log("Current Context"); - console.log("===================="); + Handlebars.registerHelper('debug', function (optionalValue) { + console.log('Current Context'); + console.log('===================='); console.log(this); if (optionalValue) { - console.log("Value"); - console.log("===================="); + console.log('Value'); + console.log('===================='); console.log(optionalValue); } }); - Handlebars.registerHelper("fileSize", function (size) { + Handlebars.registerHelper('fileSize', function (size) { return new Handlebars.SafeString(NzbDrone.Shared.FormatHelpers.FileSizeHelper(size)); }); - Handlebars.registerHelper("date", function (date) { + Handlebars.registerHelper('date', function (date) { //TODO: show actual date in tooltip if (!date) { return ''; @@ -32,12 +32,12 @@ define(['app','handlebars','Shared/FormatHelpers'], function (App,Handlebars) { var shortDate = Date.create(date).short(); var formattedDate = NzbDrone.Shared.FormatHelpers.DateHelper(date); - var result = '' + formattedDate + ''; + var result = '' + formattedDate + ''; return new Handlebars.SafeString(result); }); Handlebars.registerHelper('defaultImg', function () { - return new Handlebars.SafeString('onerror="this.src=\'/content/images/poster-dark.jpg\';"'); + return new Handlebars.SafeString('onerror='this.src=\'/content/images/poster-dark.jpg\';''); }); }); diff --git a/UI/Shared/Toolbar/Button/ButtonCollectionView.js b/UI/Shared/Toolbar/Button/ButtonCollectionView.js index 07c75bb97..d0d731a06 100644 --- a/UI/Shared/Toolbar/Button/ButtonCollectionView.js +++ b/UI/Shared/Toolbar/Button/ButtonCollectionView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Shared/Toolbar/Button/ButtonView', 'Config'], function () { NzbDrone.Shared.Toolbar.ButtonCollectionView = Backbone.Marionette.CollectionView.extend({ className: 'btn-group', diff --git a/UI/Shared/Toolbar/Button/ButtonView.js b/UI/Shared/Toolbar/Button/ButtonView.js index ba04c772a..a934d37f3 100644 --- a/UI/Shared/Toolbar/Button/ButtonView.js +++ b/UI/Shared/Toolbar/Button/ButtonView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Config', 'Commands/CommandController', 'Shared/Messenger'], function () { NzbDrone.Shared.Toolbar.ButtonView = Backbone.Marionette.ItemView.extend({ diff --git a/UI/Shared/Toolbar/ButtonCollection.js b/UI/Shared/Toolbar/ButtonCollection.js index 9477543d1..1d8b9358f 100644 --- a/UI/Shared/Toolbar/ButtonCollection.js +++ b/UI/Shared/Toolbar/ButtonCollection.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Shared/Toolbar/ButtonModel'], function () { NzbDrone.Shared.Toolbar.ButtonCollection = Backbone.Collection.extend({ model: NzbDrone.Shared.Toolbar.ButtonModel diff --git a/UI/Shared/Toolbar/ButtonModel.js b/UI/Shared/Toolbar/ButtonModel.js index 406d3d947..075718f05 100644 --- a/UI/Shared/Toolbar/ButtonModel.js +++ b/UI/Shared/Toolbar/ButtonModel.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app'], function () { NzbDrone.Shared.Toolbar.ActionTypes = diff --git a/UI/Shared/Toolbar/Radio/RadioButtonCollectionView.js b/UI/Shared/Toolbar/Radio/RadioButtonCollectionView.js index f0c387cc8..51a8609e2 100644 --- a/UI/Shared/Toolbar/Radio/RadioButtonCollectionView.js +++ b/UI/Shared/Toolbar/Radio/RadioButtonCollectionView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'app', diff --git a/UI/Shared/Toolbar/Radio/RadioButtonView.js b/UI/Shared/Toolbar/Radio/RadioButtonView.js index dc215f2c5..67d367916 100644 --- a/UI/Shared/Toolbar/Radio/RadioButtonView.js +++ b/UI/Shared/Toolbar/Radio/RadioButtonView.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(['app', 'Config'], function () { NzbDrone.Shared.Toolbar.RadioButtonView = Backbone.Marionette.ItemView.extend({ diff --git a/UI/Shared/Toolbar/ToolbarLayout.js b/UI/Shared/Toolbar/ToolbarLayout.js index 00049918e..005c11384 100644 --- a/UI/Shared/Toolbar/ToolbarLayout.js +++ b/UI/Shared/Toolbar/ToolbarLayout.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'app', diff --git a/UI/System/StatusModel.js b/UI/System/StatusModel.js index 4bc625dae..d8859d601 100644 --- a/UI/System/StatusModel.js +++ b/UI/System/StatusModel.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'backbone', diff --git a/UI/app.js b/UI/app.js index e8f5c2faa..934c17a5a 100644 --- a/UI/app.js +++ b/UI/app.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; require.config({ urlArgs: 'v=' + window.ServerStatus.version, diff --git a/UI/jQuery/RouteBinder.js b/UI/jQuery/RouteBinder.js index fc76a63ed..3905ae2ce 100644 --- a/UI/jQuery/RouteBinder.js +++ b/UI/jQuery/RouteBinder.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define(function () { //This module will automatically route all links through backbone router rather than //causing links to reload pages. diff --git a/UI/jQuery/TooltipBinder.js b/UI/jQuery/TooltipBinder.js index b0d9bb43b..18eb4d73e 100644 --- a/UI/jQuery/TooltipBinder.js +++ b/UI/jQuery/TooltipBinder.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; define( [ 'bootstrap'