diff --git a/NzbDrone.Backbone/.idea/NzbDrone.Backbone.iml b/NzbDrone.Backbone/.idea/NzbDrone.Backbone.iml
new file mode 100644
index 000000000..9ffbb36a1
--- /dev/null
+++ b/NzbDrone.Backbone/.idea/NzbDrone.Backbone.iml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/NzbDrone.Backbone/.idea/codeStyleSettings.xml b/NzbDrone.Backbone/.idea/codeStyleSettings.xml
index 1129f0010..a4b8a09a1 100644
--- a/NzbDrone.Backbone/.idea/codeStyleSettings.xml
+++ b/NzbDrone.Backbone/.idea/codeStyleSettings.xml
@@ -2,8 +2,38 @@
+
diff --git a/NzbDrone.Backbone/.idea/encodings.xml b/NzbDrone.Backbone/.idea/encodings.xml
new file mode 100644
index 000000000..e206d70d8
--- /dev/null
+++ b/NzbDrone.Backbone/.idea/encodings.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/NzbDrone.Backbone/.idea/inspectionProfiles/Project_Default.xml b/NzbDrone.Backbone/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 000000000..9cc3673b7
--- /dev/null
+++ b/NzbDrone.Backbone/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NzbDrone.Backbone/.idea/inspectionProfiles/profiles_settings.xml b/NzbDrone.Backbone/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 000000000..3b312839b
--- /dev/null
+++ b/NzbDrone.Backbone/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/NzbDrone.Backbone/.idea/jsLibraryMappings.xml b/NzbDrone.Backbone/.idea/jsLibraryMappings.xml
new file mode 100644
index 000000000..723694460
--- /dev/null
+++ b/NzbDrone.Backbone/.idea/jsLibraryMappings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/NzbDrone.Backbone/.idea/jsLinters/jshint.xml b/NzbDrone.Backbone/.idea/jsLinters/jshint.xml
new file mode 100644
index 000000000..994917c7a
--- /dev/null
+++ b/NzbDrone.Backbone/.idea/jsLinters/jshint.xml
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NzbDrone.Backbone/.idea/misc.xml b/NzbDrone.Backbone/.idea/misc.xml
new file mode 100644
index 000000000..1162f4382
--- /dev/null
+++ b/NzbDrone.Backbone/.idea/misc.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/NzbDrone.Backbone/.idea/modules.xml b/NzbDrone.Backbone/.idea/modules.xml
new file mode 100644
index 000000000..196fe418f
--- /dev/null
+++ b/NzbDrone.Backbone/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/NzbDrone.Backbone/.idea/vcs.xml b/NzbDrone.Backbone/.idea/vcs.xml
new file mode 100644
index 000000000..def6a6a18
--- /dev/null
+++ b/NzbDrone.Backbone/.idea/vcs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/NzbDrone.Backbone/AddSeries/AddSeriesLayout.js b/NzbDrone.Backbone/AddSeries/AddSeriesLayout.js
index 8b73c08b2..ea17ece16 100644
--- a/NzbDrone.Backbone/AddSeries/AddSeriesLayout.js
+++ b/NzbDrone.Backbone/AddSeries/AddSeriesLayout.js
@@ -1,4 +1,5 @@
-define([
+"use strict";
+define([
'app',
'AddSeries/RootFolders/RootFolderCollection',
'Quality/QualityProfileCollection',
diff --git a/NzbDrone.Backbone/Missing/MissingCollection.js b/NzbDrone.Backbone/Missing/MissingCollection.js
index 6c7b1e9de..e42ca97b9 100644
--- a/NzbDrone.Backbone/Missing/MissingCollection.js
+++ b/NzbDrone.Backbone/Missing/MissingCollection.js
@@ -1,8 +1,9 @@
-define(['app', 'Missing/MissingModel'], function () {
+"use strict";
+define(['app', 'Missing/MissingModel'], function () {
NzbDrone.Missing.MissingCollection = Backbone.Collection.extend({
- url: NzbDrone.Constants.ApiRoot + '/missing',
- model: NzbDrone.Missing.MissingModel,
- comparator: function(model) {
+ url : NzbDrone.Constants.ApiRoot + '/missing',
+ model : NzbDrone.Missing.MissingModel,
+ comparator: function (model) {
return model.get('airDate');
}
});
diff --git a/NzbDrone.Backbone/Missing/MissingCollectionView.js b/NzbDrone.Backbone/Missing/MissingCollectionView.js
index 8bfec813e..a2d74c1f7 100644
--- a/NzbDrone.Backbone/Missing/MissingCollectionView.js
+++ b/NzbDrone.Backbone/Missing/MissingCollectionView.js
@@ -2,29 +2,30 @@
define(['app', 'Missing/MissingItemView'], function (app) {
NzbDrone.Missing.MissingCollectionView = Backbone.Marionette.CompositeView.extend({
- itemView: NzbDrone.Missing.MissingItemView,
+ itemView : NzbDrone.Missing.MissingItemView,
itemViewContainer: 'tbody',
- template: 'Missing/MissingCollectionTemplate',
+ template : 'Missing/MissingCollectionTemplate',
- ui:{
- table : '.x-missing-table',
- pager : '.x-missing-table-pager'
+ ui: {
+ table: '.x-missing-table',
+ pager: '.x-missing-table-pager'
},
- initialize: function (context, action, query, collection) {
+ initialize : function (context, action, query, collection) {
this.collection = collection;
},
- onCompositeCollectionRendered: function() {
+ onCompositeCollectionRendered: function () {
this.ui.table.trigger('update');
- if(!this.tableSorter && this.collection.length > 0)
- {
+ if (!this.tableSorter && this.collection.length > 0) {
this.tableSorter = this.ui.table.tablesorter({
textExtraction: function (node) {
return node.innerHTML;
},
- sortList: [[3,1]],
- headers: {
+ sortList : [
+ [3, 1]
+ ],
+ headers : {
0: {
sorter: 'innerHtml'
},
@@ -43,45 +44,47 @@ define(['app', 'Missing/MissingItemView'], function (app) {
}
});
- this.ui.table.bind('pagerComplete pagerInitialized', function(event, c){
+ this.ui.table.bind('pagerComplete pagerInitialized', function (event, c) {
c.container.find('.page-number').text(c.page + 1);
});
this.ui.table.tablesorterPager({
container: this.ui.pager,
- output: 'Displaying {startRow} to {endRow} of {totalRows} episodes'
+ output : 'Displaying {startRow} to {endRow} of {totalRows} episodes'
});
this.applySortIcons();
- this.ui.table.bind("sortEnd", function() {
+ this.ui.table.bind("sortEnd", function () {
this.applySortIcons();
});
}
- else
- {
+ else {
this.ui.table.trigger('update');
}
- },
+ },
//Todo: Remove this from each view that requires it
- applySortIcons: function() {
- $(this.ui.table).find('th.tablesorter-header .tablesorter-header-inner i').each(function(){
+ applySortIcons : function () {
+ $(this.ui.table).find('th.tablesorter-header .tablesorter-header-inner i').each(function () {
$(this).remove();
});
$(this.ui.table).find('th.tablesorter-header').each(function () {
- if ($(this).hasClass('tablesorter-headerDesc'))
+ if ($(this).hasClass('tablesorter-headerDesc')) {
$(this).children('.tablesorter-header-inner').append('');
+ }
- else if ($(this).hasClass('tablesorter-headerAsc'))
+ else if ($(this).hasClass('tablesorter-headerAsc')) {
$(this).children('.tablesorter-header-inner').append('');
+ }
- else if (!$(this).hasClass('sorter-false'))
+ else if (!$(this).hasClass('sorter-false')) {
$(this).children('.tablesorter-header-inner').append('');
+ }
});
},
- updatePageNumber: function(event, stuff) {
+ updatePageNumber : function (event, stuff) {
}
});
diff --git a/NzbDrone.Backbone/app.js b/NzbDrone.Backbone/app.js
index 5091b3b61..b27f8219d 100644
--- a/NzbDrone.Backbone/app.js
+++ b/NzbDrone.Backbone/app.js
@@ -1,7 +1,8 @@
-require.config({
+"use strict";
+require.config({
paths: {
- 'backbone': 'JsLibraries/backbone',
+ 'backbone' : 'JsLibraries/backbone',
'underscore': 'JsLibraries/underscore',
'marionette': 'JsLibraries/backbone.marionette',
'handlebars': 'JsLibraries/handlebars'
@@ -11,12 +12,12 @@
underscore: {
exports: '_'
},
- backbone: {
- deps: ['underscore'],
+ backbone : {
+ deps : ['underscore'],
exports: 'Backbone'
},
marionette: {
- deps: ['backbone'],
+ deps : ['backbone'],
exports: 'Marionette'
},
handlebars: {
@@ -26,7 +27,7 @@
}
});
-define('app', function () {
+define('app', function () {
window.NzbDrone = new Backbone.Marionette.Application();
window.NzbDrone.Series = {};
@@ -55,9 +56,9 @@ define('app', function () {
window.NzbDrone.Missing = {};
window.NzbDrone.Events = {
- OpenModalDialog :'openModal',
- CloseModalDialog : 'closeModal'
- },
+ OpenModalDialog : 'openModal',
+ CloseModalDialog: 'closeModal'
+ };
window.NzbDrone.Constants = {
ApiRoot: '/api'
@@ -71,19 +72,26 @@ define('app', function () {
//TODO: move this out of here
Handlebars.registerHelper("formatStatus", function (status, monitored) {
- if (!monitored) return '';
- if (status === 'Continuing') return '';
+ if (!monitored) {
+ return '';
+ }
+ if (status === 'Continuing') {
+ return '';
+ }
- return '';
+ return null;
});
- NzbDrone.addRegions({
- titleRegion: '#title-region',
- mainRegion: '#main-region',
- notificationRegion: '#notification-region',
- });
+ return '';
});
+ NzbDrone.addRegions({
+ titleRegion : '#title-region',
+ mainRegion : '#main-region',
+ notificationRegion: '#notification-region'
+ });
+
+
window.NzbDrone.start();
return NzbDrone;
@@ -93,3 +101,4 @@ define('app', function () {
+