diff --git a/UI/History/Model.js b/UI/History/Model.js index 40496f8c8..53bda4db1 100644 --- a/UI/History/Model.js +++ b/UI/History/Model.js @@ -1,4 +1,4 @@ -'use strict'; +'use strict'; define( [ 'backbone', diff --git a/UI/Instrumentation/ErrorHandler.js b/UI/Instrumentation/ErrorHandler.js index d805c6613..bf6caa14a 100644 --- a/UI/Instrumentation/ErrorHandler.js +++ b/UI/Instrumentation/ErrorHandler.js @@ -1,4 +1,4 @@ -'use strict'; +'use strict'; (function () { if (!window.console) { @@ -32,7 +32,8 @@ window.Messenger().post(message); - } catch (error) { + } + catch (error) { console.log('An error occurred while reporting error. ' + error); console.log(msg); window.alert('Couldn\'t report JS error. ' + msg); @@ -62,7 +63,8 @@ if (xmlHttpRequest.status === 0 && xmlHttpRequest.readyState === 0) { return false; //message.message = 'NzbDrone Server Not Reachable. make sure NzbDrone is running.'; - } else { + } + else { message.message = '[{0}] {1} : {2}'.format(ajaxOptions.type, xmlHttpRequest.statusText, ajaxOptions.url); } diff --git a/UI/Quality/QualitySizeModel.js b/UI/Quality/QualitySizeModel.js index f3fa4f10a..a78f44090 100644 --- a/UI/Quality/QualitySizeModel.js +++ b/UI/Quality/QualitySizeModel.js @@ -1,4 +1,4 @@ -'use strict'; +'use strict'; define( [ 'backbone' diff --git a/UI/Release/Model.js b/UI/Release/Model.js index 692c6c3a9..0397d5ff1 100644 --- a/UI/Release/Model.js +++ b/UI/Release/Model.js @@ -1,5 +1,4 @@ - -'use strict'; +'use strict'; define( [ 'backbone' diff --git a/UI/Series/SeriesModel.js b/UI/Series/SeriesModel.js index 4b440ca61..223b00ac4 100644 --- a/UI/Series/SeriesModel.js +++ b/UI/Series/SeriesModel.js @@ -2,11 +2,11 @@ define( [ 'backbone', - 'Quality/QualityProfileCollection', + 'Quality/QualityProfileCollection' ], function (Backbone, QualityProfileCollection) { return Backbone.Model.extend({ - urlRoot: Constants.ApiRoot + '/series', + urlRoot: ApiRoot + '/series', mutators: { percentOfEpisodes: function () { diff --git a/UI/app.js b/UI/app.js index 6ae34756c..8606ba288 100644 --- a/UI/app.js +++ b/UI/app.js @@ -28,12 +28,11 @@ require.config({ shim: { $: { - exports: '$', - init : function () { - window.Constants = { - ApiRoot: '/api' - }; - } + deps : + [ + 'Instrumentation/ErrorHandler' + ], + exports: '$' }, @@ -163,7 +162,6 @@ define( 'marionette', 'shared/modal/region', 'Instrumentation/StringFormat', - 'Instrumentation/ErrorHandler' ], function (Marionette, ModalRegion) { require(