client/general: fix JSCS warnings

This commit is contained in:
rr- 2016-05-10 14:13:24 +02:00
parent 27533483b2
commit 3856e9fd0d
6 changed files with 15 additions and 13 deletions

View File

@ -45,6 +45,7 @@ Promise.all([tags.refreshExport(), api.loginFromCookies()])
page('/');
events.notify(
events.Error,
'An error happened while trying to log you in: ' + errorMessage);
'An error happened while trying to log you in: ' +
errorMessage);
}
});

View File

@ -7,8 +7,7 @@ const events = require('./events.js');
let _export = null;
let _stylesheet = null;
function _tagsToDictionary(tags)
{
function _tagsToDictionary(tags) {
let dict = {};
for (let tag of tags) {
for (let name of tag.names) {
@ -18,8 +17,7 @@ function _tagsToDictionary(tags)
return dict;
}
function _tagCategoriesToDictionary(categories)
{
function _tagCategoriesToDictionary(categories) {
let dict = {};
for (let category of categories) {
dict[category.name] = category;

View File

@ -78,8 +78,8 @@ function makeSelect(options) {
}
function makeInput(options) {
return _makeLabel(options)
+ makeVoidElement(
return _makeLabel(options) +
makeVoidElement(
'input', {
type: options.inputType,
name: options.name,
@ -120,7 +120,8 @@ function makeColorInput(options) {
type: 'color',
value: options.value || '',
});
return makeNonVoidElement('label', {class: 'color'}, colorInput + textInput);
return makeNonVoidElement(
'label', {class: 'color'}, colorInput + textInput);
}
function makeTagLink(name) {

View File

@ -116,10 +116,12 @@ class EndlessPageView {
'.page-content-holder');
ctx.pageRenderer.render(pageRendererCtx);
if (pageNumber < this.minPageShown || this.minPageShown === null) {
if (pageNumber < this.minPageShown ||
this.minPageShown === null) {
this.minPageShown = pageNumber;
}
if (pageNumber > this.maxPageShown || this.maxPageShown === null) {
if (pageNumber > this.maxPageShown ||
this.maxPageShown === null) {
this.maxPageShown = pageNumber;
}

View File

@ -19,7 +19,7 @@ class HelpView {
'users': views.getTemplate('help-search-users'),
'tags': views.getTemplate('help-search-tags'),
}
}
};
}
render(ctx) {

View File

@ -37,8 +37,8 @@ class TagListHeaderView {
}
} else {
const existingCategory = existingCategories[name];
if (existingCategory.color !== category.color
|| existingCategory.name !== category.name) {
if (existingCategory.color !== category.color ||
existingCategory.name !== category.name) {
changedCategories.push(category);
}
}