Clean up jsHint warnings (#1225)

Zach 8 years ago committed by Devin Buhl
parent 1b29b89bf1
commit 31fcac5bd9

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

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

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

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

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

@ -30,7 +30,7 @@ $.fn.bindSearch = function() {
}, },
templates : { templates : {
empty : function(input) { 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() source : substringMatcher()

@ -32,7 +32,7 @@ var view = Marionette.ItemView.extend({
var refresh=params.get('refresh'); var refresh=params.get('refresh');
if (oauth && refresh){ if (oauth && refresh){
//var callback_url = window.location.href; //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.authToken.val(oauth).trigger('change');
this.ui.refreshToken.val(refresh).trigger('change'); this.ui.refreshToken.val(refresh).trigger('change');
//Config.setValue("traktAuthToken", oauth); //Config.setValue("traktAuthToken", oauth);
@ -101,7 +101,7 @@ var view = Marionette.ItemView.extend({
//if (event.item.startsWith('tt')) { //if (event.item.startsWith('tt')) {
// newText = newText+'['+event.item+']'; // 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) { promise.error(function(request, status, error) {

Loading…
Cancel
Save