updated jshint to 2.1.3

single quotes
This commit is contained in:
kay.one 2013-06-21 23:24:24 -07:00
commit 769331d45d
120 changed files with 233 additions and 218 deletions

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(
[
'marionette',

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app'], function () {
NzbDrone.Shared.FormatHelpers.FileSizeHelper = function (sourceSize) {

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app','backgrid'], function () {
@ -10,11 +10,11 @@ define(['app','backgrid'], function () {
render: function () {
this.$el.empty();
this.$el.append(this.column.get("label"));
this.$el.append(this.column.get('label'));
if (this.column.get('sortable')) {
this.$el.addClass('clickable');
this.$el.append(" <i class='pull-right'></i>");
this.$el.append(' <i class='pull-right'></i>');
if (this.collection.state) {
var sortKey = this.collection.state.sortKey;
@ -47,11 +47,11 @@ define(['app','backgrid'], function () {
onClick: function (e) {
e.preventDefault();
var columnName = this.column.get("name");
var columnName = this.column.get('name');
if (this.column.get("sortable")) {
if (this.direction() === "ascending") {
this.sort(columnName, "descending", function (left, right) {
if (this.column.get('sortable')) {
if (this.direction() === 'ascending') {
this.sort(columnName, 'descending', function (left, right) {
var leftVal = left.get(columnName);
var rightVal = right.get(columnName);
if (leftVal === rightVal) {
@ -64,7 +64,7 @@ define(['app','backgrid'], function () {
});
}
else {
this.sort(columnName, "ascending", function (left, right) {
this.sort(columnName, 'ascending', function (left, right) {
var leftVal = left.get(columnName);
var rightVal = right.get(columnName);
if (leftVal === rightVal) {

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define([
'app',
'backgrid',
@ -10,7 +10,7 @@ define([
template: 'Shared/Grid/PagerTemplate',
events: {
"click .pager-btn": "changePage"
'click .pager-btn': 'changePage'
},
windowSize: 1,
@ -77,12 +77,12 @@ define([
var windowStart = Math.floor(currentPage / this.windowSize) * 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++) {
handles.push({
label : i + 1,
title : "No. " + (i + 1),
className : currentPage === i ? "active" :undefined,
title : 'No. ' + (i + 1),
className : currentPage === i ? 'active' :undefined,
pageNumber: i + 1
});
}
@ -94,7 +94,7 @@ define([
if (ffLabels.prev) {
handles.unshift({
label : ffLabels.prev,
className: collection.hasPrevious() ? void 0 :"disabled",
className: collection.hasPrevious() ? void 0 :'disabled',
action : 'prev'
});
}
@ -102,7 +102,7 @@ define([
if (ffLabels.first) {
handles.unshift({
label : ffLabels.first,
className: collection.hasPrevious() ? void 0 :"disabled",
className: collection.hasPrevious() ? void 0 :'disabled',
action : 'first'
});
}
@ -110,7 +110,7 @@ define([
if (ffLabels.next) {
handles.push({
label : ffLabels.next,
className: collection.hasNext() ? void 0 :"disabled",
className: collection.hasNext() ? void 0 :'disabled',
action : 'next'
});
}
@ -118,7 +118,7 @@ define([
if (ffLabels.last) {
handles.push({
label : ffLabels.last,
className: collection.hasNext() ? void 0 :"disabled",
className: collection.hasNext() ? void 0 :'disabled',
action : 'last'
});
}

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app'], function () {
NzbDrone.Shared.LoadingView = Backbone.Marionette.ItemView.extend({

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(function () {
return {
show: function (options) {

View file

@ -1,20 +1,20 @@
"use strict";
'use strict';
define(
[
'marionette',
'bootstrap'
], function (Marionette) {
return Marionette.Region.extend({
el: "#modal-region",
el: '#modal-region',
constructor: function () {
Backbone.Marionette.Region.prototype.constructor.apply(this, arguments);
this.on("show", this.showModal, this);
this.on('show', this.showModal, this);
},
getEl: function (selector) {
var $el = $(selector);
$el.on("hidden", this.close);
$el.on('hidden', this.close);
return $el;
},

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app'], function () {
NzbDrone.Shared.NotFoundView = Backbone.Marionette.ItemView.extend({
template: 'Shared/notfoundtemplate'

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app', 'Shared/NotificationModel'], function () {
var notificationCollection = Backbone.Collection.extend({

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app'], function () {
NzbDrone.Shared.NotificationModel = Backbone.Model.extend({
@ -19,21 +19,21 @@ define(['app'], function () {
}
if (this.get('level') === 'info') {
return "icon-info-sign";
return 'icon-info-sign';
} else if (this.get('level') === 'success') {
return 'icon-ok-sign';
} else if (this.get('level') === 'error') {
return 'icon-warning-sign';
}
return "";
return '';
}
},
defaults: {
"level" : 'info',
"title" : '',
"message": ''
'level' : 'info',
'title' : '',
'message': ''
}
});
});
});

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app', 'Shared/NotificationCollection'], function (app, notificationCollection) {

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(
[

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app','handlebars','Shared/FormatHelpers'], function (App,Handlebars) {
Handlebars.registerHelper('partial', function (templateName) {
@ -8,23 +8,23 @@ define(['app','handlebars','Shared/FormatHelpers'], function (App,Handlebars) {
return new Handlebars.SafeString(templateFunction(this));
});
Handlebars.registerHelper("debug", function (optionalValue) {
console.log("Current Context");
console.log("====================");
Handlebars.registerHelper('debug', function (optionalValue) {
console.log('Current Context');
console.log('====================');
console.log(this);
if (optionalValue) {
console.log("Value");
console.log("====================");
console.log('Value');
console.log('====================');
console.log(optionalValue);
}
});
Handlebars.registerHelper("fileSize", function (size) {
Handlebars.registerHelper('fileSize', function (size) {
return new Handlebars.SafeString(NzbDrone.Shared.FormatHelpers.FileSizeHelper(size));
});
Handlebars.registerHelper("date", function (date) {
Handlebars.registerHelper('date', function (date) {
//TODO: show actual date in tooltip
if (!date) {
return '';
@ -32,12 +32,12 @@ define(['app','handlebars','Shared/FormatHelpers'], function (App,Handlebars) {
var shortDate = Date.create(date).short();
var formattedDate = NzbDrone.Shared.FormatHelpers.DateHelper(date);
var result = '<span title="' + shortDate + '">' + formattedDate + '</span>';
var result = '<span title='' + shortDate + ''>' + formattedDate + '</span>';
return new Handlebars.SafeString(result);
});
Handlebars.registerHelper('defaultImg', function () {
return new Handlebars.SafeString('onerror="this.src=\'/content/images/poster-dark.jpg\';"');
return new Handlebars.SafeString('onerror='this.src=\'/content/images/poster-dark.jpg\';'');
});
});

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app', 'Shared/Toolbar/Button/ButtonView', 'Config'], function () {
NzbDrone.Shared.Toolbar.ButtonCollectionView = Backbone.Marionette.CollectionView.extend({
className: 'btn-group',

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app', 'Config', 'Commands/CommandController', 'Shared/Messenger'], function () {
NzbDrone.Shared.Toolbar.ButtonView = Backbone.Marionette.ItemView.extend({

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app', 'Shared/Toolbar/ButtonModel'], function () {
NzbDrone.Shared.Toolbar.ButtonCollection = Backbone.Collection.extend({
model: NzbDrone.Shared.Toolbar.ButtonModel

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app'], function () {
NzbDrone.Shared.Toolbar.ActionTypes =

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(
[
'app',

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(['app', 'Config'], function () {
NzbDrone.Shared.Toolbar.RadioButtonView = Backbone.Marionette.ItemView.extend({

View file

@ -1,4 +1,4 @@
"use strict";
'use strict';
define(
[
'app',