mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
linting client side modules
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/* globals define, app, socket, utils */
|
/* globals ajaxify, define, app, socket, utils */
|
||||||
|
|
||||||
define('forum/account/groups', ['forum/account/header'], function(header) {
|
define('forum/account/groups', ['forum/account/header'], function(header) {
|
||||||
var AccountTopics = {};
|
var AccountTopics = {};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/* globals define, app, ajaxify, utils, socket, templates */
|
/* globals define, app, ajaxify, utils, socket, templates, translator */
|
||||||
|
|
||||||
define('forum/chats', ['string', 'sounds', 'forum/infinitescroll'], function(S, sounds, infinitescroll) {
|
define('forum/chats', ['string', 'sounds', 'forum/infinitescroll'], function(S, sounds, infinitescroll) {
|
||||||
var Chats = {
|
var Chats = {
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
"use strict";
|
||||||
|
/*globals define, app, translator, socket*/
|
||||||
|
|
||||||
define('forum/footer', ['notifications', 'chat'], function(Notifications, Chat) {
|
define('forum/footer', ['notifications', 'chat'], function(Notifications, Chat) {
|
||||||
|
|
||||||
Notifications.prepareDOM();
|
Notifications.prepareDOM();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
/* global define, app, RELATIVE_PATH */
|
/* global define, app, translator, config, RELATIVE_PATH */
|
||||||
|
|
||||||
define('forum/login', ['csrf'], function(csrf) {
|
define('forum/login', ['csrf'], function(csrf) {
|
||||||
var Login = {};
|
var Login = {};
|
||||||
@@ -31,7 +31,7 @@ define('forum/login', ['csrf'], function(csrf) {
|
|||||||
},
|
},
|
||||||
error: function(data, status) {
|
error: function(data, status) {
|
||||||
translator.translate(data.responseText, config.defaultLang, function(translated) {
|
translator.translate(data.responseText, config.defaultLang, function(translated) {
|
||||||
errorEl.find('p').text(translated)
|
errorEl.find('p').text(translated);
|
||||||
errorEl.show();
|
errorEl.show();
|
||||||
submitEl.removeClass('disabled');
|
submitEl.removeClass('disabled');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
"use strict";
|
||||||
|
/*globals define, app, socket*/
|
||||||
|
|
||||||
define('forum/reset', function() {
|
define('forum/reset', function() {
|
||||||
var ResetPassword = {};
|
var ResetPassword = {};
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
"use strict";
|
||||||
|
/*globals define, app, ajaxify, socket, RELATIVE_PATH*/
|
||||||
|
|
||||||
define('forum/reset_code', function() {
|
define('forum/reset_code', function() {
|
||||||
var ResetCode = {};
|
var ResetCode = {};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/* globals define, app, socket */
|
/* globals define, app, ajaxify, socket */
|
||||||
|
|
||||||
define('forum/tag', ['forum/recent', 'forum/infinitescroll'], function(recent, infinitescroll) {
|
define('forum/tag', ['forum/recent', 'forum/infinitescroll'], function(recent, infinitescroll) {
|
||||||
var Tag = {};
|
var Tag = {};
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ define('forum/topic', [
|
|||||||
function getPostIndex() {
|
function getPostIndex() {
|
||||||
var parts = window.location.pathname.split('/');
|
var parts = window.location.pathname.split('/');
|
||||||
if (parts[parts.length - 1] && utils.isNumber(parts[parts.length - 1])) {
|
if (parts[parts.length - 1] && utils.isNumber(parts[parts.length - 1])) {
|
||||||
return parseInt(parts[parts.length - 1], 10)
|
return parseInt(parts[parts.length - 1], 10);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/* globals define, app, translator, socket */
|
/* globals define, app, ajaxify, translator, socket */
|
||||||
|
|
||||||
define('forum/topic/fork', function() {
|
define('forum/topic/fork', function() {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/* globals define, app, socket */
|
/* globals define, app, socket, templates */
|
||||||
|
|
||||||
define('forum/topic/move', function() {
|
define('forum/topic/move', function() {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/* globals config, app, ajaxify, define, socket, utils */
|
/* globals config, app, ajaxify, define, socket, utils */
|
||||||
@@ -259,4 +258,4 @@ define('forum/topic/posts', [
|
|||||||
|
|
||||||
return Posts;
|
return Posts;
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -103,7 +103,7 @@ define('forum/users', function() {
|
|||||||
$('.users').on('click', '.pagination a', function() {
|
$('.users').on('click', '.pagination a', function() {
|
||||||
doSearch($(this).attr('data-page'));
|
doSearch($(this).attr('data-page'));
|
||||||
return false;
|
return false;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSearch(page) {
|
function doSearch(page) {
|
||||||
@@ -147,7 +147,7 @@ define('forum/users', function() {
|
|||||||
|
|
||||||
templates.parse('partials/paginator', {pagination: data.pagination}, function(html) {
|
templates.parse('partials/paginator', {pagination: data.pagination}, function(html) {
|
||||||
$('.pagination-container').replaceWith(html);
|
$('.pagination-container').replaceWith(html);
|
||||||
})
|
});
|
||||||
|
|
||||||
templates.parse('users', 'users', data, function(html) {
|
templates.parse('users', 'users', data, function(html) {
|
||||||
translator.translate(html, function(translated) {
|
translator.translate(html, function(translated) {
|
||||||
|
|||||||
Reference in New Issue
Block a user