mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-02-20 12:43:28 +02:00
updated jshint to 2.1.3
single quotes
This commit is contained in:
parent
3c686808f2
commit
769331d45d
18
UI/.idea/jsLinters/jshint.xml
generated
18
UI/.idea/jsLinters/jshint.xml
generated
@ -1,16 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="JSHintConfiguration" version="1.1.0" use-config-file="false">
|
<component name="JSHintConfiguration" version="2.1.3" use-config-file="false">
|
||||||
<option bitwise="true" />
|
<option bitwise="true" />
|
||||||
<option camelcase="false" />
|
<option camelcase="true" />
|
||||||
<option curly="true" />
|
<option curly="true" />
|
||||||
<option eqeqeq="true" />
|
<option eqeqeq="true" />
|
||||||
<option forin="true" />
|
<option forin="true" />
|
||||||
<option immed="false" />
|
<option immed="true" />
|
||||||
<option latedef="false" />
|
<option latedef="true" />
|
||||||
<option newcap="false" />
|
<option newcap="true" />
|
||||||
<option noarg="true" />
|
<option noarg="true" />
|
||||||
<option noempty="true" />
|
<option noempty="false" />
|
||||||
<option nonew="true" />
|
<option nonew="true" />
|
||||||
<option plusplus="false" />
|
<option plusplus="false" />
|
||||||
<option regexp="false" />
|
<option regexp="false" />
|
||||||
@ -18,6 +18,8 @@
|
|||||||
<option unused="false" />
|
<option unused="false" />
|
||||||
<option strict="true" />
|
<option strict="true" />
|
||||||
<option trailing="false" />
|
<option trailing="false" />
|
||||||
|
<option quotmark="single" />
|
||||||
|
<option maxdepth="3" />
|
||||||
<option asi="false" />
|
<option asi="false" />
|
||||||
<option boss="false" />
|
<option boss="false" />
|
||||||
<option debug="false" />
|
<option debug="false" />
|
||||||
@ -45,7 +47,7 @@
|
|||||||
<option validthis="false" />
|
<option validthis="false" />
|
||||||
<option browser="true" />
|
<option browser="true" />
|
||||||
<option couch="false" />
|
<option couch="false" />
|
||||||
<option devel="false" />
|
<option devel="true" />
|
||||||
<option dojo="false" />
|
<option dojo="false" />
|
||||||
<option jquery="true" />
|
<option jquery="true" />
|
||||||
<option mootools="false" />
|
<option mootools="false" />
|
||||||
@ -61,7 +63,7 @@
|
|||||||
<option passfail="false" />
|
<option passfail="false" />
|
||||||
<option white="false" />
|
<option white="false" />
|
||||||
<option maxerr="50" />
|
<option maxerr="50" />
|
||||||
<option predef="NzbDrone, define, Backbone, _, window,Handlebars, console,require,$,Marionette, Backgrid, jQuery, signalR" />
|
<option predef="NzbDrone, define, Backbone, _, window,Handlebars,require,$,Marionette, Backgrid, jQuery, signalR" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
|
13
UI/.idea/jsLinters/jslint.xml
generated
Normal file
13
UI/.idea/jsLinters/jslint.xml
generated
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JSLintConfiguration" html="true" json="true">
|
||||||
|
<option browser="true" />
|
||||||
|
<option devel="true" />
|
||||||
|
<option indent="4" />
|
||||||
|
<option maxerr="50" />
|
||||||
|
<option plusplus="true" />
|
||||||
|
<option todo="true" />
|
||||||
|
<option white="true" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'app',
|
'app',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'marionette',
|
'marionette',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'app',
|
'app',
|
||||||
|
@ -28,7 +28,7 @@ define(
|
|||||||
initialize: function () {
|
initialize: function () {
|
||||||
this.collection = new AddSeriesCollection();
|
this.collection = new AddSeriesCollection();
|
||||||
|
|
||||||
this.on("item:removed", function () {
|
this.on('item:removed', function () {
|
||||||
this.close();
|
this.close();
|
||||||
}, this);
|
}, this);
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'backbone',
|
'backbone',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'backbone',
|
'backbone',
|
||||||
@ -7,7 +7,7 @@ define(
|
|||||||
return Backbone.Model.extend({
|
return Backbone.Model.extend({
|
||||||
mutators: {
|
mutators: {
|
||||||
freeSpaceString: function () {
|
freeSpaceString: function () {
|
||||||
return this.get('freeSpace').bytes(2) + " Free";
|
return this.get('freeSpace').bytes(2) + ' Free';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ define(
|
|||||||
|
|
||||||
return Marionette.ItemView.extend({
|
return Marionette.ItemView.extend({
|
||||||
|
|
||||||
template: "AddSeries/SearchResultTemplate",
|
template: 'AddSeries/SearchResultTemplate',
|
||||||
|
|
||||||
ui: {
|
ui: {
|
||||||
qualityProfile: '.x-quality-profile',
|
qualityProfile: '.x-quality-profile',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
'Calendar/UpcomingCollectionView',
|
'Calendar/UpcomingCollectionView',
|
||||||
|
@ -18,8 +18,8 @@ define(['app', 'Calendar/Collection','fullcalendar'], function () {
|
|||||||
right : 'month,basicWeek'
|
right : 'month,basicWeek'
|
||||||
},
|
},
|
||||||
buttonText : {
|
buttonText : {
|
||||||
prev: '<i class="icon-arrow-left"></i>',
|
prev: '<i class='icon-arrow-left'></i>',
|
||||||
next: '<i class="icon-arrow-right"></i>'
|
next: '<i class='icon-arrow-right'></i>'
|
||||||
},
|
},
|
||||||
events : this.getEvents,
|
events : this.getEvents,
|
||||||
eventRender : function (event, element) {
|
eventRender : function (event, element) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Series/EpisodeModel'], function () {
|
define(['app', 'Series/EpisodeModel'], function () {
|
||||||
NzbDrone.Calendar.Collection = Backbone.Collection.extend({
|
NzbDrone.Calendar.Collection = Backbone.Collection.extend({
|
||||||
url : NzbDrone.Constants.ApiRoot + '/calendar',
|
url : NzbDrone.Constants.ApiRoot + '/calendar',
|
||||||
@ -10,4 +10,4 @@ define(['app', 'Series/EpisodeModel'], function () {
|
|||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Series/EpisodeModel'], function () {
|
define(['app', 'Series/EpisodeModel'], function () {
|
||||||
NzbDrone.Calendar.UpcomingCollection = Backbone.Collection.extend({
|
NzbDrone.Calendar.UpcomingCollection = Backbone.Collection.extend({
|
||||||
url : NzbDrone.Constants.ApiRoot + '/calendar',
|
url : NzbDrone.Constants.ApiRoot + '/calendar',
|
||||||
@ -10,4 +10,4 @@ define(['app', 'Series/EpisodeModel'], function () {
|
|||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Shared/FormatHelpers','backgrid'], function () {
|
define(['app', 'Shared/FormatHelpers','backgrid'], function () {
|
||||||
NzbDrone.Cells.AirDateCell = Backgrid.Cell.extend({
|
NzbDrone.Cells.AirDateCell = Backgrid.Cell.extend({
|
||||||
className: "air-date-cell",
|
className: 'air-date-cell',
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
|
|
||||||
this.$el.empty();
|
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));
|
this.$el.html(NzbDrone.Shared.FormatHelpers.DateHelper(airDate));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app', 'Cells/NzbDroneCell'], function () {
|
define(['app', 'Cells/NzbDroneCell'], function () {
|
||||||
NzbDrone.Cells.EpisodeNumberCell = NzbDrone.Cells.NzbDroneCell.extend({
|
NzbDrone.Cells.EpisodeNumberCell = NzbDrone.Cells.NzbDroneCell.extend({
|
||||||
|
|
||||||
className: "episode-number-cell",
|
className: 'episode-number-cell',
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app','backgrid' ], function () {
|
define(['app','backgrid' ], function () {
|
||||||
NzbDrone.Cells.EpisodeStatusCell = Backgrid.Cell.extend({
|
NzbDrone.Cells.EpisodeStatusCell = Backgrid.Cell.extend({
|
||||||
@ -25,7 +25,7 @@ define(['app','backgrid' ], function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$el.html('<i class="{0}"/>'.format(icon));
|
this.$el.html('<i class='{0}'/>'.format(icon));
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app', 'Cells/NzbDroneCell'], function () {
|
define(['app', 'Cells/NzbDroneCell'], function () {
|
||||||
NzbDrone.Cells.EpisodeTitleCell = NzbDrone.Cells.NzbDroneCell.extend({
|
NzbDrone.Cells.EpisodeTitleCell = NzbDrone.Cells.NzbDroneCell.extend({
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app', 'Shared/FormatHelpers','backgrid'], function () {
|
define(['app', 'Shared/FormatHelpers','backgrid'], function () {
|
||||||
NzbDrone.Cells.FileSizeCell = Backgrid.Cell.extend({
|
NzbDrone.Cells.FileSizeCell = Backgrid.Cell.extend({
|
||||||
|
|
||||||
className: "file-size-cell",
|
className: 'file-size-cell',
|
||||||
|
|
||||||
render: function () {
|
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.$el.html(NzbDrone.Shared.FormatHelpers.FileSizeHelper(size));
|
||||||
this.delegateEvents();
|
this.delegateEvents();
|
||||||
return this;
|
return this;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app','backgrid'], function () {
|
define(['app','backgrid'], function () {
|
||||||
NzbDrone.Cells.IndexerCell = Backgrid.Cell.extend({
|
NzbDrone.Cells.IndexerCell = Backgrid.Cell.extend({
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app','backgrid'], function () {
|
define(['app','backgrid'], function () {
|
||||||
NzbDrone.Cells.NzbDroneCell = Backgrid.Cell.extend({
|
NzbDrone.Cells.NzbDroneCell = Backgrid.Cell.extend({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Cells/TemplatedCell'], function () {
|
define(['app', 'Cells/TemplatedCell'], function () {
|
||||||
NzbDrone.Cells.QualityCell = NzbDrone.Cells.TemplatedCell.extend({
|
NzbDrone.Cells.QualityCell = NzbDrone.Cells.TemplatedCell.extend({
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app','Cells/NzbDroneCell'], function () {
|
define(['app','Cells/NzbDroneCell'], function () {
|
||||||
NzbDrone.Cells.RelativeDateCell = NzbDrone.Cells.NzbDroneCell.extend({
|
NzbDrone.Cells.RelativeDateCell = NzbDrone.Cells.NzbDroneCell.extend({
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Cells/TemplatedCell'], function () {
|
define(['app', 'Cells/TemplatedCell'], function () {
|
||||||
NzbDrone.Cells.SeriesTitleCell = NzbDrone.Cells.TemplatedCell.extend({
|
NzbDrone.Cells.SeriesTitleCell = NzbDrone.Cells.TemplatedCell.extend({
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app','Cells/NzbDroneCell'], function () {
|
define(['app','Cells/NzbDroneCell'], function () {
|
||||||
NzbDrone.Cells.TemplatedCell = NzbDrone.Cells.NzbDroneCell.extend({
|
NzbDrone.Cells.TemplatedCell = NzbDrone.Cells.NzbDroneCell.extend({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app', 'Episode/Layout'], function () {
|
define(['app', 'Episode/Layout'], function () {
|
||||||
NzbDrone.Cells.ToggleCell = Backgrid.Cell.extend({
|
NzbDrone.Cells.ToggleCell = Backgrid.Cell.extend({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app'], function () {
|
define(['app'], function () {
|
||||||
|
|
||||||
NzbDrone.Commands.Execute = function (name, properties) {
|
NzbDrone.Commands.Execute = function (name, properties) {
|
||||||
@ -14,4 +14,4 @@ define(['app'], function () {
|
|||||||
data: JSON.stringify(data)
|
data: JSON.stringify(data)
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'app'
|
'app'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define({
|
define({
|
||||||
ApiRoot : '/api'
|
ApiRoot : '/api'
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'app',
|
'app',
|
||||||
@ -102,13 +102,13 @@ define(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var cookies = document.cookie.split(";");
|
var cookies = document.cookie.split(';');
|
||||||
|
|
||||||
for (var i = 0; i < cookies.length; i++) {
|
for (var i = 0; i < cookies.length; i++) {
|
||||||
var cookie = cookies[i];
|
var cookie = cookies[i];
|
||||||
var eqPos = cookie.indexOf("=");
|
var eqPos = cookie.indexOf('=');
|
||||||
var name = eqPos > -1 ? cookie.substr(0, eqPos) :cookie;
|
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';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Shared/SpinnerView', 'Episode/Summary/View', 'Episode/Search/Layout', 'Release/Collection'], function () {
|
define(['app', 'Shared/SpinnerView', 'Episode/Summary/View', 'Episode/Search/Layout', 'Release/Collection'], function () {
|
||||||
|
|
||||||
NzbDrone.Episode.Layout = Backbone.Marionette.Layout.extend({
|
NzbDrone.Episode.Layout = Backbone.Marionette.Layout.extend({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
'Cells/FileSizeCell',
|
'Cells/FileSizeCell',
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app'], function () {
|
define(['app'], function () {
|
||||||
|
|
||||||
NzbDrone.Episode.Summary.View = Backbone.Marionette.ItemView.extend({
|
NzbDrone.Episode.Summary.View = Backbone.Marionette.ItemView.extend({
|
||||||
template: 'Episode/Summary/ViewTemplate'
|
template: 'Episode/Summary/ViewTemplate'
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
define(['app', 'handlebars'], function (App,Handlebars) {
|
define(['app', 'handlebars'], function (App,Handlebars) {
|
||||||
Handlebars.registerHelper('formBuilder', function () {
|
Handlebars.registerHelper('formBuilder', function () {
|
||||||
var ret = "";
|
var ret = '';
|
||||||
_.each(this.fields, function (field) {
|
_.each(this.fields, function (field) {
|
||||||
ret += NzbDrone.Form.FieldBuilder(field);
|
ret += NzbDrone.Form.FieldBuilder(field);
|
||||||
});
|
});
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'sugar'
|
'sugar'
|
||||||
], {
|
], {
|
||||||
register: function (handlebars) {
|
register: function (handlebars) {
|
||||||
handlebars.registerHelper("ShortDate", function (input) {
|
handlebars.registerHelper('ShortDate', function (input) {
|
||||||
if (!input) {
|
if (!input) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['templates'], function (Templates) {
|
define(['templates'], function (Templates) {
|
||||||
return function () {
|
return function () {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'History/Model', 'backbone.pageable'], function (App, HistoryModel, PageableCollection) {
|
define(['app', 'History/Model', 'backbone.pageable'], function (App, HistoryModel, PageableCollection) {
|
||||||
NzbDrone.History.Collection = PageableCollection.extend({
|
NzbDrone.History.Collection = PageableCollection.extend({
|
||||||
url : NzbDrone.Constants.ApiRoot + '/history',
|
url : NzbDrone.Constants.ApiRoot + '/history',
|
||||||
@ -6,7 +6,7 @@ define(['app', 'History/Model', 'backbone.pageable'], function (App, HistoryMode
|
|||||||
|
|
||||||
state: {
|
state: {
|
||||||
pageSize: 15,
|
pageSize: 15,
|
||||||
sortKey: "date",
|
sortKey: 'date',
|
||||||
order: 1
|
order: 1
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -14,11 +14,11 @@ define(['app', 'History/Model', 'backbone.pageable'], function (App, HistoryMode
|
|||||||
totalPages: null,
|
totalPages: null,
|
||||||
totalRecords: null,
|
totalRecords: null,
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
sortKey: "sortKey",
|
sortKey: 'sortKey',
|
||||||
order: "sortDir",
|
order: 'sortDir',
|
||||||
directions: {
|
directions: {
|
||||||
"-1": "asc",
|
'-1': 'asc',
|
||||||
"1": "desc"
|
'1': 'desc'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app', 'Cells/NzbDroneCell' ], function () {
|
define(['app', 'Cells/NzbDroneCell' ], function () {
|
||||||
NzbDrone.History.EventTypeCell = NzbDrone.Cells.NzbDroneCell.extend({
|
NzbDrone.History.EventTypeCell = NzbDrone.Cells.NzbDroneCell.extend({
|
||||||
@ -32,7 +32,7 @@ define(['app', 'Cells/NzbDroneCell' ], function () {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$el.html('<i class="{0}" title="{1}"/>'.format(icon, toolTip));
|
this.$el.html('<i class='{0}' title='{1}'/>'.format(icon, toolTip));
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
'History/Collection',
|
'History/Collection',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app','Series/SeriesModel', 'Series/EpisodeModel'], function () {
|
define(['app','Series/SeriesModel', 'Series/EpisodeModel'], function () {
|
||||||
NzbDrone.History.Model = Backbone.Model.extend({
|
NzbDrone.History.Model = Backbone.Model.extend({
|
||||||
mutators: {
|
mutators: {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
/* var model = new NzbDrone.Shared.NotificationModel();
|
/* var model = new NzbDrone.Shared.NotificationModel();
|
||||||
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
var a = document.createElement('a');
|
var a = document.createElement('a');
|
||||||
a.href = url;
|
a.href = url;
|
||||||
var messageText = a.pathname.split('/').pop() + ' : ' + line + "</br>" + msg;
|
var messageText = a.pathname.split('/').pop() + ' : ' + line + '</br>' + msg;
|
||||||
|
|
||||||
var message = {
|
var message = {
|
||||||
message : messageText,
|
message : messageText,
|
||||||
@ -41,7 +41,7 @@
|
|||||||
window.Messenger().post(message);
|
window.Messenger().post(message);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("An error occurred while reporting error. " + error);
|
console.log('An error occurred while reporting error. ' + error);
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
window.alert('Couldn\'t report JS error. ' + msg);
|
window.alert('Couldn\'t report JS error. ' + msg);
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@
|
|||||||
return false;
|
return false;
|
||||||
//message.message = 'NzbDrone Server Not Reachable. make sure NzbDrone is running.';
|
//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);
|
message.message = '[{0}] {1} : {2}'.format(ajaxOptions.type, xmlHttpRequest.statusText, ajaxOptions.url);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.Messenger().post(message);
|
window.Messenger().post(message);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
String.prototype.format = function () {
|
String.prototype.format = function () {
|
||||||
var args = arguments;
|
var args = arguments;
|
||||||
return this.replace(/{(\d+)}/g, function (match, number) {
|
return this.replace(/{(\d+)}/g, function (match, number) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Logs/Model', 'backbone.pageable'], function (app, SeriesModel, PagableCollection) {
|
define(['app', 'Logs/Model', 'backbone.pageable'], function (app, SeriesModel, PagableCollection) {
|
||||||
NzbDrone.Logs.Collection = PagableCollection.extend({
|
NzbDrone.Logs.Collection = PagableCollection.extend({
|
||||||
url : NzbDrone.Constants.ApiRoot + '/log',
|
url : NzbDrone.Constants.ApiRoot + '/log',
|
||||||
@ -6,7 +6,7 @@ define(['app', 'Logs/Model', 'backbone.pageable'], function (app, SeriesModel, P
|
|||||||
|
|
||||||
state: {
|
state: {
|
||||||
pageSize: 50,
|
pageSize: 50,
|
||||||
sortKey : "time",
|
sortKey : 'time',
|
||||||
order : 1
|
order : 1
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -14,11 +14,11 @@ define(['app', 'Logs/Model', 'backbone.pageable'], function (app, SeriesModel, P
|
|||||||
totalPages : null,
|
totalPages : null,
|
||||||
totalRecords: null,
|
totalRecords: null,
|
||||||
pageSize : 'pageSize',
|
pageSize : 'pageSize',
|
||||||
sortKey : "sortKey",
|
sortKey : 'sortKey',
|
||||||
order : "sortDir",
|
order : 'sortDir',
|
||||||
directions : {
|
directions : {
|
||||||
"-1": "asc",
|
'-1': 'asc',
|
||||||
"1" : "desc"
|
'1' : 'desc'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
'Logs/Collection',
|
'Logs/Collection',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app'], function (app) {
|
define(['app'], function (app) {
|
||||||
NzbDrone.Logs.Model = Backbone.Model.extend({
|
NzbDrone.Logs.Model = Backbone.Model.extend({
|
||||||
/* mutators: {
|
/* mutators: {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app'], function () {
|
define(['app'], function () {
|
||||||
var MainMenuView = Backbone.Marionette.ItemView.extend({
|
var MainMenuView = Backbone.Marionette.ItemView.extend({
|
||||||
events: {
|
events: {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Series/EpisodeModel', 'backbone.pageable'], function (app, EpisodeModel, PagableCollection) {
|
define(['app', 'Series/EpisodeModel', 'backbone.pageable'], function (app, EpisodeModel, PagableCollection) {
|
||||||
NzbDrone.Missing.Collection = PagableCollection.extend({
|
NzbDrone.Missing.Collection = PagableCollection.extend({
|
||||||
url : NzbDrone.Constants.ApiRoot + '/missing',
|
url : NzbDrone.Constants.ApiRoot + '/missing',
|
||||||
@ -6,7 +6,7 @@ define(['app', 'Series/EpisodeModel', 'backbone.pageable'], function (app, Episo
|
|||||||
|
|
||||||
state: {
|
state: {
|
||||||
pageSize: 15,
|
pageSize: 15,
|
||||||
sortKey : "airDate",
|
sortKey : 'airDate',
|
||||||
order : 1
|
order : 1
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -14,11 +14,11 @@ define(['app', 'Series/EpisodeModel', 'backbone.pageable'], function (app, Episo
|
|||||||
totalPages : null,
|
totalPages : null,
|
||||||
totalRecords: null,
|
totalRecords: null,
|
||||||
pageSize : 'pageSize',
|
pageSize : 'pageSize',
|
||||||
sortKey : "sortKey",
|
sortKey : 'sortKey',
|
||||||
order : "sortDir",
|
order : 'sortDir',
|
||||||
directions : {
|
directions : {
|
||||||
"-1": "asc",
|
'-1': 'asc',
|
||||||
"1" : "desc"
|
'1' : 'desc'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'app',
|
'app',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'backgrid'
|
'backgrid'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app'], function () {
|
define(['app'], function () {
|
||||||
|
|
||||||
@ -7,8 +7,8 @@ define(['app'], function () {
|
|||||||
source : function (filter, callback) {
|
source : function (filter, callback) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url : NzbDrone.Constants.ApiRoot + resource,
|
url : NzbDrone.Constants.ApiRoot + resource,
|
||||||
dataType: "json",
|
dataType: 'json',
|
||||||
type : "GET",
|
type : 'GET',
|
||||||
data : { query: filter },
|
data : { query: filter },
|
||||||
success : function (data) {
|
success : function (data) {
|
||||||
callback(data);
|
callback(data);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
//try to add ajax data as query string to DELETE calls.
|
//try to add ajax data as query string to DELETE calls.
|
||||||
"use strict";
|
'use strict';
|
||||||
define(function () {
|
define(function () {
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'signalR'], function () {
|
define(['app', 'signalR'], function () {
|
||||||
|
|
||||||
_.extend(Backbone.Collection.prototype, {BindSignalR: function (options) {
|
_.extend(Backbone.Collection.prototype, {BindSignalR: function (options) {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
return new Date(obj.getTime());
|
return new Date(obj.getTime());
|
||||||
}
|
}
|
||||||
if (_.isRegExp(obj)) {
|
if (_.isRegExp(obj)) {
|
||||||
return new RegExp(obj.source, obj.toString().replace(/.*\//, ""));
|
return new RegExp(obj.source, obj.toString().replace(/.*\//, ''));
|
||||||
}
|
}
|
||||||
isArr = _.isArray(obj || _.isArguments(obj));
|
isArr = _.isArray(obj || _.isArguments(obj));
|
||||||
func = function(memo, value, key) {
|
func = function(memo, value, key) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Quality/QualitySizeModel'], function () {
|
define(['app', 'Quality/QualitySizeModel'], function () {
|
||||||
NzbDrone.Quality.QualitySizeCollection = Backbone.Collection.extend({
|
NzbDrone.Quality.QualitySizeCollection = Backbone.Collection.extend({
|
||||||
model: NzbDrone.Quality.QualitySizeModel,
|
model: NzbDrone.Quality.QualitySizeModel,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app'], function () {
|
define(['app'], function () {
|
||||||
NzbDrone.Quality.QualitySizeModel = Backbone.Model.extend({
|
NzbDrone.Quality.QualitySizeModel = Backbone.Model.extend({
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Quality/QualityProfileModel'], function () {
|
define(['app', 'Quality/QualityProfileModel'], function () {
|
||||||
|
|
||||||
var qualityProfileCollection = Backbone.Collection.extend({
|
var qualityProfileCollection = Backbone.Collection.extend({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'backbone.deepmodel'], function (App, DeepModel) {
|
define(['app', 'backbone.deepmodel'], function (App, DeepModel) {
|
||||||
NzbDrone.Quality.QualityProfileModel = DeepModel.DeepModel.extend({
|
NzbDrone.Quality.QualityProfileModel = DeepModel.DeepModel.extend({
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
require(['app', 'backgrid'], function () {
|
require(['app', 'backgrid'], function () {
|
||||||
NzbDrone.Release.ApprovalStatusCell = Backgrid.Cell.extend({
|
NzbDrone.Release.ApprovalStatusCell = Backgrid.Cell.extend({
|
||||||
|
|
||||||
className: "approval-status-cell",
|
className: 'approval-status-cell',
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
var rejections = this.model.get(this.column.get("name"));
|
var rejections = this.model.get(this.column.get('name'));
|
||||||
|
|
||||||
var result = '';
|
var result = '';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Release/Model', 'backbone.pageable'], function (app, SeriesModel, PagableCollection) {
|
define(['app', 'Release/Model', 'backbone.pageable'], function (app, SeriesModel, PagableCollection) {
|
||||||
NzbDrone.Release.Collection = PagableCollection.extend({
|
NzbDrone.Release.Collection = PagableCollection.extend({
|
||||||
url : NzbDrone.Constants.ApiRoot + '/release',
|
url : NzbDrone.Constants.ApiRoot + '/release',
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app','backgrid'], function () {
|
define(['app','backgrid'], function () {
|
||||||
NzbDrone.Release.DownloadReportCell = Backgrid.Cell.extend({
|
NzbDrone.Release.DownloadReportCell = Backgrid.Cell.extend({
|
||||||
|
|
||||||
className: "download-report-cell",
|
className: 'download-report-cell',
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
'click': '_onClick'
|
'click': '_onClick'
|
||||||
@ -13,16 +13,16 @@ define(['app','backgrid'], function () {
|
|||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.$el.html('<i class ="icon-spinner icon-spin" />');
|
this.$el.html('<i class ='icon-spinner icon-spin' />');
|
||||||
this.model.save()
|
this.model.save()
|
||||||
.always(function () {
|
.always(function () {
|
||||||
self.$el.html('<i class ="icon-download-alt" />');
|
self.$el.html('<i class ='icon-download-alt' />');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
|
|
||||||
this.$el.html('<i class ="icon-download-alt" />');
|
this.$el.html('<i class ='icon-download-alt' />');
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
'Release/Collection',
|
'Release/Collection',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app'], function () {
|
define(['app'], function () {
|
||||||
NzbDrone.Release.Model = Backbone.Model.extend({
|
NzbDrone.Release.Model = Backbone.Model.extend({
|
||||||
/* mutators: {
|
/* mutators: {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
require(
|
require(
|
||||||
[
|
[
|
||||||
'app',
|
'app',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Series/Details/SeasonLayout', 'Series/SeasonCollection', 'Series/EpisodeCollection'], function () {
|
define(['app', 'Series/Details/SeasonLayout', 'Series/SeasonCollection', 'Series/EpisodeCollection'], function () {
|
||||||
NzbDrone.Series.Details.SeasonCollectionView = Backbone.Marionette.CollectionView.extend({
|
NzbDrone.Series.Details.SeasonCollectionView = Backbone.Marionette.CollectionView.extend({
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Series/Details/SeasonCollectionView', 'Shared/LoadingView','backstrech'], function () {
|
define(['app', 'Series/Details/SeasonCollectionView', 'Shared/LoadingView','backstrech'], function () {
|
||||||
NzbDrone.Series.Details.SeriesDetailsLayout = Backbone.Marionette.Layout.extend({
|
NzbDrone.Series.Details.SeriesDetailsLayout = Backbone.Marionette.Layout.extend({
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Series/EpisodeModel'], function () {
|
define(['app', 'Series/EpisodeModel'], function () {
|
||||||
NzbDrone.Series.EpisodeCollection = Backbone.Collection.extend({
|
NzbDrone.Series.EpisodeCollection = Backbone.Collection.extend({
|
||||||
url : NzbDrone.Constants.ApiRoot + '/episodes',
|
url : NzbDrone.Constants.ApiRoot + '/episodes',
|
||||||
@ -6,7 +6,7 @@ define(['app', 'Series/EpisodeModel'], function () {
|
|||||||
|
|
||||||
bySeason: function (season) {
|
bySeason: function (season) {
|
||||||
var filtered = this.filter(function (episode) {
|
var filtered = this.filter(function (episode) {
|
||||||
return episode.get("seasonNumber") === season;
|
return episode.get('seasonNumber') === season;
|
||||||
});
|
});
|
||||||
|
|
||||||
return new NzbDrone.Series.EpisodeCollection(filtered);
|
return new NzbDrone.Series.EpisodeCollection(filtered);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Series/SeriesModel'], function () {
|
define(['app', 'Series/SeriesModel'], function () {
|
||||||
NzbDrone.Series.EpisodeModel = Backbone.Model.extend({
|
NzbDrone.Series.EpisodeModel = Backbone.Model.extend({
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
'Series/Index/List/CollectionView',
|
'Series/Index/List/CollectionView',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app','backgrid'], function () {
|
define(['app','backgrid'], function () {
|
||||||
NzbDrone.Series.Index.Table.Row = Backgrid.Row.extend({
|
NzbDrone.Series.Index.Table.Row = Backgrid.Row.extend({
|
||||||
events: {
|
events: {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app','backgrid'], function () {
|
define(['app','backgrid'], function () {
|
||||||
Backgrid.SeriesStatusCell = Backgrid.Cell.extend({
|
Backgrid.SeriesStatusCell = Backgrid.Cell.extend({
|
||||||
className: "series-status-cell",
|
className: 'series-status-cell',
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
this.$el.empty();
|
this.$el.empty();
|
||||||
@ -9,14 +9,14 @@ define(['app','backgrid'], function () {
|
|||||||
var status = this.model.get('status');
|
var status = this.model.get('status');
|
||||||
|
|
||||||
if (!monitored) {
|
if (!monitored) {
|
||||||
this.$el.html('<i class="icon-pause grid-icon" title="Not Monitored"></i>');
|
this.$el.html('<i class='icon-pause grid-icon' title='Not Monitored'></i>');
|
||||||
}
|
}
|
||||||
else if (status === 'continuing') {
|
else if (status === 'continuing') {
|
||||||
this.$el.html('<i class="icon-play grid-icon" title="Continuing"></i>');
|
this.$el.html('<i class='icon-play grid-icon' title='Continuing'></i>');
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
this.$el.html('<i class="icon-stop grid-icon" title="Ended"></i>');
|
this.$el.html('<i class='icon-stop grid-icon' title='Ended'></i>');
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Series/SeasonModel', 'backbone.pageable'], function (App, SeasonModel, PageAbleCollection) {
|
define(['app', 'Series/SeasonModel', 'backbone.pageable'], function (App, SeasonModel, PageAbleCollection) {
|
||||||
NzbDrone.Series.SeasonCollection = PageAbleCollection.extend({
|
NzbDrone.Series.SeasonCollection = PageAbleCollection.extend({
|
||||||
url : NzbDrone.Constants.ApiRoot + '/season',
|
url : NzbDrone.Constants.ApiRoot + '/season',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app'], function () {
|
define(['app'], function () {
|
||||||
NzbDrone.Series.SeasonModel = Backbone.Model.extend({
|
NzbDrone.Series.SeasonModel = Backbone.Model.extend({
|
||||||
|
|
||||||
@ -7,10 +7,10 @@ define(['app'], function () {
|
|||||||
var seasonNumber = this.get('seasonNumber');
|
var seasonNumber = this.get('seasonNumber');
|
||||||
|
|
||||||
if (seasonNumber === 0) {
|
if (seasonNumber === 0) {
|
||||||
return "Specials";
|
return 'Specials';
|
||||||
}
|
}
|
||||||
|
|
||||||
return "Season " + seasonNumber;
|
return 'Season ' + seasonNumber;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Series/SeriesModel'], function () {
|
define(['app', 'Series/SeriesModel'], function () {
|
||||||
NzbDrone.Series.SeriesCollection = Backbone.Collection.extend({
|
NzbDrone.Series.SeriesCollection = Backbone.Collection.extend({
|
||||||
url : NzbDrone.Constants.ApiRoot + '/series',
|
url : NzbDrone.Constants.ApiRoot + '/series',
|
||||||
@ -9,7 +9,7 @@ define(['app', 'Series/SeriesModel'], function () {
|
|||||||
},
|
},
|
||||||
|
|
||||||
state: {
|
state: {
|
||||||
sortKey: "title",
|
sortKey: 'title',
|
||||||
order: -1
|
order: -1
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Quality/QualityProfileCollection'], function (app, qualityProfiles) {
|
define(['app', 'Quality/QualityProfileCollection'], function (app, qualityProfiles) {
|
||||||
NzbDrone.Series.SeriesModel = Backbone.Model.extend({
|
NzbDrone.Series.SeriesModel = Backbone.Model.extend({
|
||||||
|
|
||||||
@ -40,10 +40,10 @@ define(['app', 'Quality/QualityProfileCollection'], function (app, qualityProfil
|
|||||||
return undefined;
|
return undefined;
|
||||||
},
|
},
|
||||||
traktUrl : function () {
|
traktUrl : function () {
|
||||||
return "http://trakt.tv/show/" + this.get('titleSlug');
|
return 'http://trakt.tv/show/' + this.get('titleSlug');
|
||||||
},
|
},
|
||||||
imdbUrl : function () {
|
imdbUrl : function () {
|
||||||
return "http://imdb.com/title/" + this.get('imdbId');
|
return 'http://imdb.com/title/' + this.get('imdbId');
|
||||||
},
|
},
|
||||||
isContinuing : function () {
|
isContinuing : function () {
|
||||||
return this.get('status') === 'continuing';
|
return this.get('status') === 'continuing';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
var statusText = $.ajax({
|
var statusText = $.ajax({
|
||||||
type : "GET",
|
type : 'GET',
|
||||||
url : '/api/system/status',
|
url : '/api/system/status',
|
||||||
async: false
|
async: false
|
||||||
}).responseText;
|
}).responseText;
|
||||||
|
@ -37,32 +37,32 @@ define([
|
|||||||
refreshUIVisibility: function (clientId) {
|
refreshUIVisibility: function (clientId) {
|
||||||
|
|
||||||
if (!clientId) {
|
if (!clientId) {
|
||||||
clientId = "sabnzbd";
|
clientId = 'sabnzbd';
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (clientId.toString()) {
|
switch (clientId.toString()) {
|
||||||
case "sabnzbd":
|
case 'sabnzbd':
|
||||||
this.ui.sabConfig.show();
|
this.ui.sabConfig.show();
|
||||||
this.ui.blackholeConfig.hide();
|
this.ui.blackholeConfig.hide();
|
||||||
this.ui.pneumaticConfig.hide();
|
this.ui.pneumaticConfig.hide();
|
||||||
this.ui.nzbGetConfig.hide();
|
this.ui.nzbGetConfig.hide();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "blackhole":
|
case 'blackhole':
|
||||||
this.ui.sabConfig.hide();
|
this.ui.sabConfig.hide();
|
||||||
this.ui.blackholeConfig.show();
|
this.ui.blackholeConfig.show();
|
||||||
this.ui.pneumaticConfig.hide();
|
this.ui.pneumaticConfig.hide();
|
||||||
this.ui.nzbGetConfig.hide();
|
this.ui.nzbGetConfig.hide();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "pneumatic":
|
case 'pneumatic':
|
||||||
this.ui.sabConfig.hide();
|
this.ui.sabConfig.hide();
|
||||||
this.ui.blackholeConfig.hide();
|
this.ui.blackholeConfig.hide();
|
||||||
this.ui.pneumaticConfig.show();
|
this.ui.pneumaticConfig.show();
|
||||||
this.ui.nzbGetConfig.hide();
|
this.ui.nzbGetConfig.hide();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "nzbget":
|
case 'nzbget':
|
||||||
this.ui.sabConfig.hide();
|
this.ui.sabConfig.hide();
|
||||||
this.ui.blackholeConfig.hide();
|
this.ui.blackholeConfig.hide();
|
||||||
this.ui.pneumaticConfig.hide();
|
this.ui.pneumaticConfig.hide();
|
||||||
@ -70,7 +70,7 @@ define([
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
throw "unknown download client id" + clientId;
|
throw 'unknown download client id' + clientId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'backbone', 'Mixins/AsChangeTrackingModel'], function (App, Backbone, AsChangeTrackingModel) {
|
define(['app', 'backbone', 'Mixins/AsChangeTrackingModel'], function (App, Backbone, AsChangeTrackingModel) {
|
||||||
var model = Backbone.Model.extend({
|
var model = Backbone.Model.extend({
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Settings/Indexers/Model'], function (App, IndexerModel) {
|
define(['app', 'Settings/Indexers/Model'], function (App, IndexerModel) {
|
||||||
return Backbone.Collection.extend({
|
return Backbone.Collection.extend({
|
||||||
url : App.Constants.ApiRoot + '/indexer',
|
url : App.Constants.ApiRoot + '/indexer',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['marionette', 'Mixins/AsModelBoundView'], function (Marionette, AsModelBoundView) {
|
define(['marionette', 'Mixins/AsModelBoundView'], function (Marionette, AsModelBoundView) {
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define([
|
define([
|
||||||
'Settings/SettingsModelBase'], function (ModelBase) {
|
'Settings/SettingsModelBase'], function (ModelBase) {
|
||||||
return ModelBase.extend({
|
return ModelBase.extend({
|
||||||
|
@ -7,7 +7,7 @@ define(['marionette', 'Mixins/AsModelBoundview'], function (Marionette, AsModelB
|
|||||||
className: 'form-horizontal',
|
className: 'form-horizontal',
|
||||||
|
|
||||||
ui: {
|
ui: {
|
||||||
tooltip: '[class^="help-inline"] i'
|
tooltip: '[class^='help-inline'] i'
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app',
|
define(['app',
|
||||||
'Settings/SettingsModelBase'], function (App, ModelBase) {
|
'Settings/SettingsModelBase'], function (App, ModelBase) {
|
||||||
return ModelBase.extend({
|
return ModelBase.extend({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'marionette',
|
'marionette',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'Settings/Notifications/Model'], function (App, NotificationModel) {
|
define(['app', 'Settings/Notifications/Model'], function (App, NotificationModel) {
|
||||||
return Backbone.Collection.extend({
|
return Backbone.Collection.extend({
|
||||||
url : App.Constants.ApiRoot + '/notification',
|
url : App.Constants.ApiRoot + '/notification',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app', 'backbone.deepmodel'], function (App, DeepModel) {
|
define(['app', 'backbone.deepmodel'], function (App, DeepModel) {
|
||||||
return DeepModel.DeepModel.extend({
|
return DeepModel.DeepModel.extend({
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
'marionette',
|
'marionette',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
'marionette',
|
'marionette',
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app',
|
define(['app',
|
||||||
'Settings/SettingsModelBase'], function (App, SettingsModelBase) {
|
'Settings/SettingsModelBase'], function (App, SettingsModelBase) {
|
||||||
return SettingsModelBase.extend({
|
return SettingsModelBase.extend({
|
||||||
url : App.Constants.ApiRoot + '/settings',
|
url : App.Constants.ApiRoot + '/settings',
|
||||||
successMessage: 'Settings saved',
|
successMessage: 'Settings saved',
|
||||||
errorMessage : "Failed to save settings"
|
errorMessage : 'Failed to save settings'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(['app',
|
define(['app',
|
||||||
'backbone.deepmodel',
|
'backbone.deepmodel',
|
||||||
'Mixins/AsChangeTrackingModel',
|
'Mixins/AsChangeTrackingModel',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define(
|
define(
|
||||||
[
|
[
|
||||||
'marionette',
|
'marionette',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app'], function () {
|
define(['app'], function () {
|
||||||
NzbDrone.Shared.FormatHelpers.FileSizeHelper = function (sourceSize) {
|
NzbDrone.Shared.FormatHelpers.FileSizeHelper = function (sourceSize) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
define(['app','backgrid'], function () {
|
define(['app','backgrid'], function () {
|
||||||
|
|
||||||
@ -10,11 +10,11 @@ define(['app','backgrid'], function () {
|
|||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
this.$el.empty();
|
this.$el.empty();
|
||||||
this.$el.append(this.column.get("label"));
|
this.$el.append(this.column.get('label'));
|
||||||
|
|
||||||
if (this.column.get('sortable')) {
|
if (this.column.get('sortable')) {
|
||||||
this.$el.addClass('clickable');
|
this.$el.addClass('clickable');
|
||||||
this.$el.append(" <i class='pull-right'></i>");
|
this.$el.append(' <i class='pull-right'></i>');
|
||||||
|
|
||||||
if (this.collection.state) {
|
if (this.collection.state) {
|
||||||
var sortKey = this.collection.state.sortKey;
|
var sortKey = this.collection.state.sortKey;
|
||||||
@ -47,11 +47,11 @@ define(['app','backgrid'], function () {
|
|||||||
onClick: function (e) {
|
onClick: function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var columnName = this.column.get("name");
|
var columnName = this.column.get('name');
|
||||||
|
|
||||||
if (this.column.get("sortable")) {
|
if (this.column.get('sortable')) {
|
||||||
if (this.direction() === "ascending") {
|
if (this.direction() === 'ascending') {
|
||||||
this.sort(columnName, "descending", function (left, right) {
|
this.sort(columnName, 'descending', function (left, right) {
|
||||||
var leftVal = left.get(columnName);
|
var leftVal = left.get(columnName);
|
||||||
var rightVal = right.get(columnName);
|
var rightVal = right.get(columnName);
|
||||||
if (leftVal === rightVal) {
|
if (leftVal === rightVal) {
|
||||||
@ -64,7 +64,7 @@ define(['app','backgrid'], function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.sort(columnName, "ascending", function (left, right) {
|
this.sort(columnName, 'ascending', function (left, right) {
|
||||||
var leftVal = left.get(columnName);
|
var leftVal = left.get(columnName);
|
||||||
var rightVal = right.get(columnName);
|
var rightVal = right.get(columnName);
|
||||||
if (leftVal === rightVal) {
|
if (leftVal === rightVal) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
"use strict";
|
'use strict';
|
||||||
define([
|
define([
|
||||||
'app',
|
'app',
|
||||||
'backgrid',
|
'backgrid',
|
||||||
@ -10,7 +10,7 @@ define([
|
|||||||
template: 'Shared/Grid/PagerTemplate',
|
template: 'Shared/Grid/PagerTemplate',
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
"click .pager-btn": "changePage"
|
'click .pager-btn': 'changePage'
|
||||||
},
|
},
|
||||||
|
|
||||||
windowSize: 1,
|
windowSize: 1,
|
||||||
@ -77,12 +77,12 @@ define([
|
|||||||
var windowStart = Math.floor(currentPage / this.windowSize) * this.windowSize;
|
var windowStart = Math.floor(currentPage / this.windowSize) * this.windowSize;
|
||||||
var windowEnd = Math.min(lastPage + 1, windowStart + 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++) {
|
for (var i = windowStart; i < windowEnd; i++) {
|
||||||
handles.push({
|
handles.push({
|
||||||
label : i + 1,
|
label : i + 1,
|
||||||
title : "No. " + (i + 1),
|
title : 'No. ' + (i + 1),
|
||||||
className : currentPage === i ? "active" :undefined,
|
className : currentPage === i ? 'active' :undefined,
|
||||||
pageNumber: i + 1
|
pageNumber: i + 1
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ define([
|
|||||||
if (ffLabels.prev) {
|
if (ffLabels.prev) {
|
||||||
handles.unshift({
|
handles.unshift({
|
||||||
label : ffLabels.prev,
|
label : ffLabels.prev,
|
||||||
className: collection.hasPrevious() ? void 0 :"disabled",
|
className: collection.hasPrevious() ? void 0 :'disabled',
|
||||||
action : 'prev'
|
action : 'prev'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ define([
|
|||||||
if (ffLabels.first) {
|
if (ffLabels.first) {
|
||||||
handles.unshift({
|
handles.unshift({
|
||||||
label : ffLabels.first,
|
label : ffLabels.first,
|
||||||
className: collection.hasPrevious() ? void 0 :"disabled",
|
className: collection.hasPrevious() ? void 0 :'disabled',
|
||||||
action : 'first'
|
action : 'first'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ define([
|
|||||||
if (ffLabels.next) {
|
if (ffLabels.next) {
|
||||||
handles.push({
|
handles.push({
|
||||||
label : ffLabels.next,
|
label : ffLabels.next,
|
||||||
className: collection.hasNext() ? void 0 :"disabled",
|
className: collection.hasNext() ? void 0 :'disabled',
|
||||||
action : 'next'
|
action : 'next'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ define([
|
|||||||
if (ffLabels.last) {
|
if (ffLabels.last) {
|
||||||
handles.push({
|
handles.push({
|
||||||
label : ffLabels.last,
|
label : ffLabels.last,
|
||||||
className: collection.hasNext() ? void 0 :"disabled",
|
className: collection.hasNext() ? void 0 :'disabled',
|
||||||
action : 'last'
|
action : 'last'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user