1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

Clean up jsHint warnings (#1225)

This commit is contained in:
Zach 2017-03-19 11:34:22 -05:00 committed by Devin Buhl
parent 1b29b89bf1
commit 31fcac5bd9
7 changed files with 11 additions and 11 deletions

View File

@ -39,7 +39,7 @@ module.exports = Marionette.Layout.extend({
RootFolderCollection.synced = true;
});
if (options.action == "search") {
if (options.action === "search") {
this._addMovies(options);
}
},

View File

@ -49,7 +49,7 @@ module.exports = Marionette.Layout.extend({
this.throttledSearch = _.debounce(this.search, 1000, { trailing : true }).bind(this);
if (options.action == "search") {
if (options.action === "search") {
this.search({term: options.query});
}

View File

@ -315,8 +315,8 @@ module.exports = Marionette.Layout.extend({
//this._showToolbar();
//debugger;
self = this;
setTimeout(function(){self._showToolbar();}, 0);//wtf???
var self = this;
setTimeout(function(){self._showToolbar();}, 0); // jshint ignore:line
//this._renderView();
},

View File

@ -49,7 +49,7 @@ var filterModes = {
"inCinemas",
//function(model) { return model.getStatus() == "inCinemas"; }
]
}//Hacky, I know
}; //Hacky, I know
var Collection = PageableCollection.extend({
@ -273,7 +273,7 @@ var filterMode = Config.getValue("series.filterMode", "all");
var sortKey = Config.getValue("movie.sortKey", "sortTitle");
var sortDir = Config.getValue("movie.sortDirection", -1);
var sortD = "asc";
if (sortDir == 1) {
if (sortDir === 1) {
sortD = "desc";
}

View File

@ -28,9 +28,9 @@ module.exports = NzbDroneController.extend({
this._renderMovieDetails(query);
//debugger;
} else {
self = this;
var self = this;
$.getJSON(window.NzbDrone.ApiRoot + '/movie/titleslug/'+query, { }, function(data) {
FullMovieCollection.add(data)
FullMovieCollection.add(data);
self._renderMovieDetails(query);
});
this.listenTo(FullMovieCollection, 'sync', function(model, options) {

View File

@ -30,7 +30,7 @@ $.fn.bindSearch = function() {
},
templates : {
empty : function(input) {
return '<div class="tt-dataset-series"><span class="tt-suggestions" style="display: block;"><div class="tt-suggestion"><p style="white-space: normal;"><a class="no-movies-found" href="/addmovies/search/' + input.query + '">Search for "' + input.query + '"</a></p></div></span></div>'
return '<div class="tt-dataset-series"><span class="tt-suggestions" style="display: block;"><div class="tt-suggestion"><p style="white-space: normal;"><a class="no-movies-found" href="/addmovies/search/' + input.query + '">Search for "' + input.query + '"</a></p></div></span></div>';
},
},
source : substringMatcher()

View File

@ -32,7 +32,7 @@ var view = Marionette.ItemView.extend({
var refresh=params.get('refresh');
if (oauth && refresh){
//var callback_url = window.location.href;
history.pushState('object', 'title', (window.location.href).replace(window.location.search, ''));
history.pushState('object', 'title', (window.location.href).replace(window.location.search, '')); // jshint ignore:line
this.ui.authToken.val(oauth).trigger('change');
this.ui.refreshToken.val(refresh).trigger('change');
//Config.setValue("traktAuthToken", oauth);
@ -101,7 +101,7 @@ var view = Marionette.ItemView.extend({
//if (event.item.startsWith('tt')) {
// newText = newText+'['+event.item+']';
//}
event.item = response['titleSlug'];//+' ('+response['year']+')-'+response['tmdbId'];
event.item = response.titleSlug;//+' ('+response['year']+')-'+response['tmdbId'];
});
promise.error(function(request, status, error) {