client/general: fix JSCS warnings
This commit is contained in:
parent
27533483b2
commit
3856e9fd0d
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ class HelpView {
|
|||
'users': views.getTemplate('help-search-users'),
|
||||
'tags': views.getTemplate('help-search-tags'),
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
render(ctx) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue