mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-23 17:09:51 +02:00
linted client side modules
This commit is contained in:
@@ -19,7 +19,7 @@ define('composer/categoryList', function() {
|
||||
|
||||
// Remove categories that are just external links
|
||||
categories = categories.filter(function(category) {
|
||||
return !category.link
|
||||
return !category.link;
|
||||
});
|
||||
|
||||
categories.forEach(function(category) {
|
||||
|
||||
@@ -202,7 +202,7 @@ define('composer/uploads', ['composer/preview', 'csrf'], function(preview, csrf)
|
||||
|
||||
function insertText(str, index, insert) {
|
||||
return str.slice(0, index) + insert + str.slice(index);
|
||||
};
|
||||
}
|
||||
|
||||
function uploadContentFiles(params) {
|
||||
var files = params.files,
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
"use strict";
|
||||
/*globals define*/
|
||||
|
||||
define('csrf', function() {
|
||||
"use strict";
|
||||
var csrf = {},
|
||||
_data = {};
|
||||
|
||||
csrf.get = function() {
|
||||
return _data.token;
|
||||
}
|
||||
};
|
||||
|
||||
csrf.set = function(token) {
|
||||
_data.token = token;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
/* globals define, socket, translator, utils, config, app, ajaxify, Tinycon*/
|
||||
/* globals define, socket, translator, utils, config, app, ajaxify, templates, Tinycon*/
|
||||
|
||||
define('notifications', ['sounds'], function(sound) {
|
||||
var Notifications = {};
|
||||
@@ -86,7 +86,7 @@ define('notifications', ['sounds'], function(sound) {
|
||||
notifIcon.attr('data-content', count > 20 ? '20+' : count);
|
||||
|
||||
Tinycon.setBubble(count);
|
||||
};
|
||||
}
|
||||
|
||||
function increaseNotifCount(delta) {
|
||||
var count = parseInt(notifIcon.attr('data-content'), 10) + delta;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
/* globals define, translator, templates */
|
||||
/* globals define, config, socket, app, ajaxify, translator, templates */
|
||||
|
||||
define('sort', function() {
|
||||
var module = {};
|
||||
|
||||
@@ -57,7 +57,9 @@ define('sounds', ['buzz'], function(buzz) {
|
||||
};
|
||||
|
||||
Sounds.playFile = function(fileName) {
|
||||
if (!fileName) return;
|
||||
if (!fileName) {
|
||||
return;
|
||||
}
|
||||
|
||||
function play() {
|
||||
if (loadedSounds[fileName]) {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
/*globals define, RELATIVE_PATH*/
|
||||
|
||||
define('templates', function() {
|
||||
var Templates = {};
|
||||
|
||||
@@ -6,7 +10,9 @@ define('templates', function() {
|
||||
Templates.config = data.templatesConfig;
|
||||
Templates.available = data.availableTemplates;
|
||||
|
||||
if (callback) callback();
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user