ESlint quotes

v1.18.x
Peter Jaszkowiak 8 years ago
parent 604358ecc4
commit a038c66549

@ -98,7 +98,7 @@
"strict": "off",
// "comma-dangle": "off",
// "no-multi-spaces": "off",
"quotes": "off",
// "quotes": "off",
// "keyword-spacing": "off",
// "no-mixed-operators": "off",
// "comma-spacing": "off",

@ -1,4 +1,4 @@
"use strict";
'use strict';
var fork = require('child_process').fork;
var env = process.env;

@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
"use strict";
'use strict';
var nconf = require('nconf');
nconf.argv().env('__');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');
var prompt = require('prompt');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var winston = require('winston');
var express = require('express');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var uglifyjs = require('uglify-js');
var async = require('async');

@ -1,4 +1,4 @@
"use strict";
'use strict';
(function () {
var logoutTimer = 0;
@ -157,7 +157,7 @@
}
function launchSnackbar(params) {
var message = (params.title ? "<strong>" + params.title + "</strong>" : '') + (params.message ? params.message : '');
var message = (params.title ? '<strong>' + params.title + '</strong>' : '') + (params.message ? params.message : '');
require(['translator'], function (translator) {
translator.translate(message, function (html) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/advanced/errors', ['Chart', 'translator'], function (Chart, translator) {
@ -41,13 +41,13 @@ define('admin/advanced/errors', ['Chart', 'translator'], function (Chart, transl
labels: dailyLabels,
datasets: [
{
label: "",
backgroundColor: "rgba(186,139,175,0.2)",
borderColor: "rgba(186,139,175,1)",
pointBackgroundColor: "rgba(186,139,175,1)",
pointHoverBackgroundColor: "#fff",
pointBorderColor: "#fff",
pointHoverBorderColor: "rgba(186,139,175,1)",
label: '',
backgroundColor: 'rgba(186,139,175,0.2)',
borderColor: 'rgba(186,139,175,1)',
pointBackgroundColor: 'rgba(186,139,175,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(186,139,175,1)',
data: ajaxify.data.analytics['not-found'],
},
],
@ -56,13 +56,13 @@ define('admin/advanced/errors', ['Chart', 'translator'], function (Chart, transl
labels: dailyLabels,
datasets: [
{
label: "",
backgroundColor: "rgba(151,187,205,0.2)",
borderColor: "rgba(151,187,205,1)",
pointBackgroundColor: "rgba(151,187,205,1)",
pointHoverBackgroundColor: "#fff",
pointBorderColor: "#fff",
pointHoverBorderColor: "rgba(151,187,205,1)",
label: '',
backgroundColor: 'rgba(151,187,205,0.2)',
borderColor: 'rgba(151,187,205,1)',
pointBackgroundColor: 'rgba(151,187,205,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(151,187,205,1)',
data: ajaxify.data.analytics.toobusy,
},
],

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/advanced/events', function () {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/advanced/logs', function () {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/appearance/customise', ['admin/settings'], function (Settings) {
@ -9,11 +9,11 @@ define('admin/appearance/customise', ['admin/settings'], function (Settings) {
$('#customCSS').text($('#customCSS-holder').val());
$('#customHTML').text($('#customHTML-holder').val());
var customCSS = ace.edit("customCSS");
var customHTML = ace.edit("customHTML");
var customCSS = ace.edit('customCSS');
var customHTML = ace.edit('customHTML');
customCSS.setTheme("ace/theme/twilight");
customCSS.getSession().setMode("ace/mode/css");
customCSS.setTheme('ace/theme/twilight');
customCSS.getSession().setMode('ace/mode/css');
customCSS.on('change', function (event) {
app.flags = app.flags || {};
@ -21,8 +21,8 @@ define('admin/appearance/customise', ['admin/settings'], function (Settings) {
$('#customCSS-holder').val(customCSS.getValue());
});
customHTML.setTheme("ace/theme/twilight");
customHTML.getSession().setMode("ace/mode/html");
customHTML.setTheme('ace/theme/twilight');
customHTML.getSession().setMode('ace/mode/html');
customHTML.on('change', function (event) {
app.flags = app.flags || {};

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/appearance/skins', ['translator'], function (translator) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/appearance/themes', ['translator'], function (translator) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/extend/plugins', ['jqueryui', 'translator'], function (jqueryui, translator) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/extend/rewards', ['translator'], function (translator) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/extend/widgets', ['jqueryui'], function (jqueryui) {
@ -35,7 +35,7 @@ define('admin/extend/widgets', ['jqueryui'], function (jqueryui) {
return $(e.target).parents('.widget-panel').clone();
},
distance: 10,
connectToSortable: ".widget-area",
connectToSortable: '.widget-area',
});
$('#widgets .available-containers .containers > [data-container-html]')
@ -57,7 +57,7 @@ define('admin/extend/widgets', ['jqueryui'], function (jqueryui) {
createDatePicker(ui.item);
appendToggle(ui.item);
},
connectWith: "div",
connectWith: 'div',
}).on('click', '.delete-widget', function () {
var panel = $(this).parents('.widget-panel');
@ -177,7 +177,7 @@ define('admin/extend/widgets', ['jqueryui'], function (jqueryui) {
el.find('.panel-body .container-html').val(ui.draggable.attr('data-container-html'));
el.find('.panel-body').removeClass('hidden');
},
hoverClass: "panel-info",
hoverClass: 'panel-info',
})
.children('.panel-heading')
.append('<div class="pull-right pointer"><span class="delete-widget"><i class="fa fa-times-circle"></i></span></div><div class="pull-left pointer"><span class="toggle-widget"><i class="fa fa-chevron-circle-down"></i></span>&nbsp;</div>')

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/general/dashboard', ['semver', 'Chart', 'translator'], function (semver, Chart, translator) {
@ -126,14 +126,14 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator'], function (s
topics: null,
};
var topicColors = ["#bf616a", "#5B90BF", "#d08770", "#ebcb8b", "#a3be8c", "#96b5b4", "#8fa1b3", "#b48ead", "#ab7967", "#46BFBD"];
var topicColors = ['#bf616a', '#5B90BF', '#d08770', '#ebcb8b', '#a3be8c', '#96b5b4', '#8fa1b3', '#b48ead', '#ab7967', '#46BFBD'];
var usedTopicColors = [];
// from chartjs.org
function lighten(col, amt) {
var usePound = false;
if (col[0] == "#") {
if (col[0] == '#') {
col = col.slice(1);
usePound = true;
}
@ -155,7 +155,7 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator'], function (s
if (g > 255) g = 255;
else if (g < 0) g = 0;
return (usePound ? "#" : "") + (g | (b << 8) | (r << 16)).toString(16);
return (usePound ? '#' : '') + (g | (b << 8) | (r << 16)).toString(16);
}
function setupGraphs() {
@ -190,22 +190,22 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator'], function (s
datasets: [
{
label: translations[0],
backgroundColor: "rgba(220,220,220,0.2)",
borderColor: "rgba(220,220,220,1)",
pointBackgroundColor: "rgba(220,220,220,1)",
pointHoverBackgroundColor: "#fff",
pointBorderColor: "#fff",
pointHoverBorderColor: "rgba(220,220,220,1)",
backgroundColor: 'rgba(220,220,220,0.2)',
borderColor: 'rgba(220,220,220,1)',
pointBackgroundColor: 'rgba(220,220,220,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(220,220,220,1)',
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
},
{
label: translations[1],
backgroundColor: "rgba(151,187,205,0.2)",
borderColor: "rgba(151,187,205,1)",
pointBackgroundColor: "rgba(151,187,205,1)",
pointHoverBackgroundColor: "#fff",
pointBorderColor: "#fff",
pointHoverBorderColor: "rgba(151,187,205,1)",
backgroundColor: 'rgba(151,187,205,0.2)',
borderColor: 'rgba(151,187,205,1)',
pointBackgroundColor: 'rgba(151,187,205,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(151,187,205,1)',
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
},
],
@ -236,8 +236,8 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator'], function (s
labels: translations.slice(2, 4),
datasets: [{
data: [1, 1],
backgroundColor: ["#F7464A", "#46BFBD"],
hoverBackgroundColor: ["#FF5A5E", "#5AD3D1"],
backgroundColor: ['#F7464A', '#46BFBD'],
hoverBackgroundColor: ['#FF5A5E', '#5AD3D1'],
}],
},
options: {
@ -254,8 +254,8 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator'], function (s
labels: translations.slice(4, 9),
datasets: [{
data: [1, 1, 1, 1, 1],
backgroundColor: ["#F7464A", "#46BFBD", "#FDB45C", "#949FB1", "#9FB194"],
hoverBackgroundColor: ["#FF5A5E", "#5AD3D1", "#FFC870", "#A8B3C5", "#A8B3C5"],
backgroundColor: ['#F7464A', '#46BFBD', '#FDB45C', '#949FB1', '#9FB194'],
hoverBackgroundColor: ['#FF5A5E', '#5AD3D1', '#FFC870', '#A8B3C5', '#A8B3C5'],
}],
},
options: {
@ -375,7 +375,7 @@ define('admin/general/dashboard', ['semver', 'Chart', 'translator'], function (s
function updateTopicsGraph(topics) {
if (!Object.keys(topics).length) {
topics = {0: {
title: "No users browsing",
title: 'No users browsing',
value: 1,
}};
}

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/general/homepage', ['admin/settings'], function (Settings) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/general/languages', ['admin/settings'], function (Settings) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/general/navigation', ['translator', 'iconSelect', 'jqueryui'], function (translator, iconSelect, jqueryui) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/general/social', [], function () {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/general/sounds', ['sounds', 'settings'], function (Sounds, Settings) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/manage/categories', ['vendor/jquery/serializeObject/jquery.ba-serializeobject.min', 'translator'], function (serialize, translator) {
@ -197,7 +197,7 @@ define('admin/manage/categories', ['vendor/jquery/serializeObject/jquery.ba-seri
animation: 150,
handle: '.icon',
dataIdAttr: 'data-cid',
ghostClass: "placeholder",
ghostClass: 'placeholder',
onAdd: itemDidAdd,
onEnd: itemDragDidEnd,
});

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/manage/category-analytics', ['Chart'], function (Chart) {
@ -25,13 +25,13 @@ define('admin/manage/category-analytics', ['Chart'], function (Chart) {
labels: hourlyLabels,
datasets: [
{
label: "",
backgroundColor: "rgba(186,139,175,0.2)",
borderColor: "rgba(186,139,175,1)",
pointBackgroundColor: "rgba(186,139,175,1)",
pointHoverBackgroundColor: "#fff",
pointBorderColor: "#fff",
pointHoverBorderColor: "rgba(186,139,175,1)",
label: '',
backgroundColor: 'rgba(186,139,175,0.2)',
borderColor: 'rgba(186,139,175,1)',
pointBackgroundColor: 'rgba(186,139,175,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(186,139,175,1)',
data: ajaxify.data.analytics['pageviews:hourly'],
},
],
@ -40,13 +40,13 @@ define('admin/manage/category-analytics', ['Chart'], function (Chart) {
labels: dailyLabels,
datasets: [
{
label: "",
backgroundColor: "rgba(151,187,205,0.2)",
borderColor: "rgba(151,187,205,1)",
pointBackgroundColor: "rgba(151,187,205,1)",
pointHoverBackgroundColor: "#fff",
pointBorderColor: "#fff",
pointHoverBorderColor: "rgba(151,187,205,1)",
label: '',
backgroundColor: 'rgba(151,187,205,0.2)',
borderColor: 'rgba(151,187,205,1)',
pointBackgroundColor: 'rgba(151,187,205,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(151,187,205,1)',
data: ajaxify.data.analytics['pageviews:daily'],
},
],
@ -55,13 +55,13 @@ define('admin/manage/category-analytics', ['Chart'], function (Chart) {
labels: dailyLabels.slice(-7),
datasets: [
{
label: "",
backgroundColor: "rgba(171,70,66,0.2)",
borderColor: "rgba(171,70,66,1)",
pointBackgroundColor: "rgba(171,70,66,1)",
pointHoverBackgroundColor: "#fff",
pointBorderColor: "#fff",
pointHoverBorderColor: "rgba(171,70,66,1)",
label: '',
backgroundColor: 'rgba(171,70,66,0.2)',
borderColor: 'rgba(171,70,66,1)',
pointBackgroundColor: 'rgba(171,70,66,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(171,70,66,1)',
data: ajaxify.data.analytics['topics:daily'],
},
],
@ -70,13 +70,13 @@ define('admin/manage/category-analytics', ['Chart'], function (Chart) {
labels: dailyLabels.slice(-7),
datasets: [
{
label: "",
backgroundColor: "rgba(161,181,108,0.2)",
borderColor: "rgba(161,181,108,1)",
pointBackgroundColor: "rgba(161,181,108,1)",
pointHoverBackgroundColor: "#fff",
pointBorderColor: "#fff",
pointHoverBorderColor: "rgba(161,181,108,1)",
label: '',
backgroundColor: 'rgba(161,181,108,0.2)',
borderColor: 'rgba(161,181,108,1)',
pointBackgroundColor: 'rgba(161,181,108,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(161,181,108,1)',
data: ajaxify.data.analytics['posts:daily'],
},
],

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/manage/category', [

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/manage/flags', [
@ -98,13 +98,13 @@ define('admin/manage/flags', [
labels: dailyLabels,
datasets: [
{
label: "",
backgroundColor: "rgba(151,187,205,0.2)",
borderColor: "rgba(151,187,205,1)",
pointBackgroundColor: "rgba(151,187,205,1)",
pointHoverBackgroundColor: "#fff",
pointBorderColor: "#fff",
pointHoverBorderColor: "rgba(151,187,205,1)",
label: '',
backgroundColor: 'rgba(151,187,205,0.2)',
borderColor: 'rgba(151,187,205,1)',
pointBackgroundColor: 'rgba(151,187,205,1)',
pointHoverBackgroundColor: '#fff',
pointBorderColor: '#fff',
pointHoverBorderColor: 'rgba(151,187,205,1)',
data: ajaxify.data.analytics,
},
],

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/manage/group', [
@ -93,8 +93,8 @@ define('admin/manage/group', [
username: userLabel.attr('data-username'),
userslug: userLabel.attr('data-userslug'),
picture: userLabel.attr('data-picture'),
"icon:bgColor": userLabel.attr('data-usericon-bgColor'),
"icon:text": userLabel.attr('data-usericon-text'),
'icon:bgColor': userLabel.attr('data-usericon-bgColor'),
'icon:text': userLabel.attr('data-usericon-text'),
};
templates.parse('partials/groups/memberlist', 'members', {group: {isOwner: ajaxify.data.group.isOwner, members: [member]}}, function (html) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/manage/groups', ['translator'], function (translator) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/manage/registration', function () {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/manage/tags', [
@ -93,8 +93,8 @@ define('admin/manage/tags', [
message: firstTag.find('.tag-modal').html(),
buttons: {
success: {
label: "Save",
className: "btn-primary save",
label: 'Save',
className: 'btn-primary save',
callback: function () {
var modal = $('.bootbox');
var bgColor = modal.find('[data-name="bgColor"]').val();

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/manage/users', ['translator'], function (translator) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/modules/colorpicker', function () {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/modules/instance', function () {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/modules/search', ['mousetrap'], function (mousetrap) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/modules/selectable', ['jqueryui'], function (jqueryui) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/settings/email', ['admin/settings'], function (settings) {
@ -30,10 +30,10 @@ define('admin/settings/email', ['admin/settings'], function (settings) {
function configureEmailEditor() {
$('#email-editor-selector').on('change', updateEmailEditor);
emailEditor = ace.edit("email-editor");
emailEditor = ace.edit('email-editor');
emailEditor.$blockScrolling = Infinity;
emailEditor.setTheme("ace/theme/twilight");
emailEditor.getSession().setMode("ace/mode/html");
emailEditor.setTheme('ace/theme/twilight');
emailEditor.getSession().setMode('ace/mode/html');
emailEditor.on('change', function () {
var emailPath = $('#email-editor-selector').val();

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('admin/settings/general', ['admin/settings'], function (Settings) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
var ajaxify = ajaxify || {};
@ -329,7 +329,7 @@ $(document).ready(function () {
callback(data.toString());
},
error: function (error) {
throw new Error("Unable to load template: " + template + " (" + error.statusText + ")");
throw new Error('Unable to load template: ' + template + ' (' + error.statusText + ')');
},
});
}

@ -1,4 +1,4 @@
"use strict";
'use strict';
var app = app || {};
@ -462,8 +462,8 @@ app.cacheBuster = null;
}
app.handleSearch = function () {
var searchButton = $("#search-button");
var searchFields = $("#search-fields");
var searchButton = $('#search-button');
var searchFields = $('#search-fields');
var searchInput = $('#search-fields input');
$('#search-form .advanced-search-link').on('mousedown', function () {
@ -507,8 +507,8 @@ app.cacheBuster = null;
};
app.prepareSearch = function () {
$("#search-fields").removeClass('hidden');
$("#search-button").addClass('hidden');
$('#search-fields').removeClass('hidden');
$('#search-button').addClass('hidden');
$('#search-fields input').focus();
};

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

@ -313,11 +313,11 @@ define('forum/chats', [
messages.appendChatMessage($('.expanded-chat .chat-content'), data.message);
} else {
if (ajaxify.currentPage.startsWith("chats")) {
if (ajaxify.currentPage.startsWith('chats')) {
var roomEl = $('[data-roomid=' + data.roomId + ']');
if (roomEl.length > 0) {
roomEl.addClass("unread");
roomEl.addClass('unread');
} else {
var recentEl = components.get('chat/recent');
templates.parse('partials/chats/recent_room', {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('forum/footer', ['notifications', 'chat', 'components', 'translator'], function (Notifications, Chat, components, translator) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('forum/groups/details', [

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('forum/groups/list', ['forum/infinitescroll'], function (infinitescroll) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('forum/groups/memberlist', ['components', 'forum/infinitescroll'], function (components, infinitescroll) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('forum/login', ['translator'], function (translator) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('forum/reset', function () {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('forum/reset_code', function () {

@ -39,10 +39,10 @@ define('forum/topic/move-post', [], function () {
function showMoveModal(modal) {
modal.modal('show')
.css("position", "fixed")
.css("left", Math.max(0, (($(window).width() - modal.outerWidth()) / 2) + $(window).scrollLeft()) + "px")
.css("top", "0px")
.css("z-index", "2000");
.css('position', 'fixed')
.css('left', Math.max(0, (($(window).width() - modal.outerWidth()) / 2) + $(window).scrollLeft()) + 'px')
.css('top', '0px')
.css('z-index', '2000');
}
function movePost(post, pid, tid, callback) {

@ -72,7 +72,7 @@ define('forum/unread', ['forum/recent', 'topicSelect', 'forum/infinitescroll', '
topicSelect.init();
if ($("body").height() <= $(window).height() && $('[component="category"]').children().length >= 20) {
if ($('body').height() <= $(window).height() && $('[component="category"]').children().length >= 20) {
$('#load-more-btn').show();
}

@ -1,4 +1,4 @@
"use strict";
'use strict';
$('document').ready(function () {

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

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('components', function () {
var components = {};

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

@ -1,5 +1,5 @@
(function (exports) {
"use strict";
'use strict';
// export the class if we are in a Node-like system.
@ -56,7 +56,7 @@
helpers.stringify = function (obj) {
// Turns the incoming object into a JSON string
return JSON.stringify(obj).replace(/&/gm, "&amp;").replace(/</gm, "&lt;").replace(/>/gm, "&gt;").replace(/"/g, '&quot;');
return JSON.stringify(obj).replace(/&/gm, '&amp;').replace(/</gm, '&lt;').replace(/>/gm, '&gt;').replace(/"/g, '&quot;');
};
helpers.escape = function (str) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('iconSelect', function () {

@ -43,15 +43,15 @@ define('pictureCropper', ['translator', 'cropper'], function (translator, croppe
viewMode: 1,
ready: function () {
cropperModal.find('.rotate').on('click', function () {
var degrees = this.getAttribute("data-degrees");
var degrees = this.getAttribute('data-degrees');
cropperTool.rotate(degrees);
});
cropperModal.find('.flip').on('click', function () {
var option = this.getAttribute("data-option");
var method = this.getAttribute("data-method");
var option = this.getAttribute('data-option');
var method = this.getAttribute('data-method');
method === 'scaleX' ? cropperTool.scaleX(option) : cropperTool.scaleY(option);
this.setAttribute("data-option", option * -1);
this.setAttribute('data-option', option * -1);
});
cropperModal.find('.reset').on('click', function () {
@ -119,7 +119,7 @@ define('pictureCropper', ['translator', 'cropper'], function (translator, croppe
var imageUrl;
var imageType = file.type;
reader.addEventListener("load", function () {
reader.addEventListener('load', function () {
imageUrl = reader.result;
data.uploadModal.modal('hide');

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('search', ['navigator', 'translator'], function (nav, translator) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('settings', function () {
@ -293,14 +293,14 @@ define('settings', function () {
app.alert({
title: 'Settings Not Saved',
type: 'danger',
message: "NodeBB failed to save the settings.",
message: 'NodeBB failed to save the settings.',
timeout: 5000,
});
} else {
app.alert({
title: 'Settings Saved',
type: 'success',
message: "Settings have been successfully saved",
message: 'Settings have been successfully saved',
timeout: 2500,
});
}

@ -57,7 +57,7 @@ define('settings/array', function () {
}
}
helper.fillField(element, value);
if ($("[data-parent=\"_" + key + "\"]", field).length) {
if ($('[data-parent="_' + key + '"]', field).length) {
insertCb(separator);
}
insertCb(element);
@ -124,7 +124,7 @@ define('settings/array', function () {
},
get: function (element, trim, empty) {
var key = element.data('key') || element.data('parent');
var children = $("[data-parent=\"_" + key + "\"]", element);
var children = $('[data-parent="_' + key + '"]', element);
var values = [];
children.each(function (i, child) {
child = $(child);

@ -75,9 +75,9 @@ define('settings/key', function () {
} else if (code >= 48 && code <= 90) {
return String.fromCharCode(code).toUpperCase();
} else if (code >= 112 && code <= 123) {
return "F" + (code - 111);
return 'F' + (code - 111);
} else {
return keyMap[code] || ("#" + code);
return keyMap[code] || ('#' + code);
}
}

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('sounds', ['buzz'], function (buzz) {

@ -1,4 +1,4 @@
"use strict";
'use strict';
define('taskbar', function () {

@ -46,7 +46,7 @@
}(function (string, load, warn) {
'use strict';
var assign = Object.assign || jQuery.extend;
function classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var Translator = (function () {
/**

@ -91,7 +91,7 @@ if ('undefined' !== typeof window) {
// FIX FOR #1245 - https://github.com/NodeBB/NodeBB/issues/1245
// from http://stackoverflow.com/questions/15931962/bootstrap-dropdown-disappear-with-right-click-on-firefox
// obtain a reference to the original handler
var _clearMenus = $._data(document, "events").click.filter(function (el) {
var _clearMenus = $._data(document, 'events').click.filter(function (el) {
return el.namespace === 'bs.data-api.dropdown' && el.selector === undefined;
});

@ -165,29 +165,29 @@
},
extensionMimeTypeMap: {
bmp: "image/bmp",
cmx: "image/x-cmx",
cod: "image/cis-cod",
gif: "image/gif",
ico: "image/x-icon",
ief: "image/ief",
jfif: "image/pipeg",
jpe: "image/jpeg",
jpeg: "image/jpeg",
jpg: "image/jpeg",
png: "image/png",
pbm: "image/x-portable-bitmap",
pgm: "image/x-portable-graymap",
pnm: "image/x-portable-anymap",
ppm: "image/x-portable-pixmap",
ras: "image/x-cmu-raster",
rgb: "image/x-rgb",
svg: "image/svg+xml",
tif: "image/tiff",
tiff: "image/tiff",
xbm: "image/x-xbitmap",
xpm: "image/x-xpixmap",
xwd: "image/x-xwindowdump",
bmp: 'image/bmp',
cmx: 'image/x-cmx',
cod: 'image/cis-cod',
gif: 'image/gif',
ico: 'image/x-icon',
ief: 'image/ief',
jfif: 'image/pipeg',
jpe: 'image/jpeg',
jpeg: 'image/jpeg',
jpg: 'image/jpeg',
png: 'image/png',
pbm: 'image/x-portable-bitmap',
pgm: 'image/x-portable-graymap',
pnm: 'image/x-portable-anymap',
ppm: 'image/x-portable-pixmap',
ras: 'image/x-cmu-raster',
rgb: 'image/x-rgb',
svg: 'image/svg+xml',
tif: 'image/tiff',
tiff: 'image/tiff',
xbm: 'image/x-xbitmap',
xpm: 'image/x-xpixmap',
xwd: 'image/x-xwindowdump',
},
fileMimeType: function (path) {
@ -230,7 +230,7 @@
// takes a string like 1000 and returns 1,000
addCommas: function (text) {
return text.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
return text.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,');
},
toISOString: function (timestamp) {
@ -254,11 +254,11 @@
'th', 'thead', 'time', 'title', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr'],
escapeRegexChars: function (text) {
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
},
escapeHTML: function (raw) {
return raw.replace(/&/gm, "&amp;").replace(/</gm, "&lt;").replace(/>/gm, "&gt;");
return raw.replace(/&/gm, '&amp;').replace(/</gm, '&lt;').replace(/>/gm, '&gt;');
},
isAndroidBrowser: function () {
@ -325,7 +325,7 @@
/* Retrieved from http://stackoverflow.com/a/7557433 @ 27 Mar 2016 */
isElementInViewport: function (el) {
// special bonus for those using jQuery
if (typeof jQuery === "function" && el instanceof jQuery) {
if (typeof jQuery === 'function' && el instanceof jQuery) {
el = el[0];
}
@ -351,7 +351,7 @@
if (options.url) {
a = utils.urlToLocation(options.url);
}
params = (a ? a.search : window.location.search).substring(1).split("&");
params = (a ? a.search : window.location.search).substring(1).split('&');
params.forEach(function (param) {
var val = param.split('=');

@ -1,4 +1,4 @@
"use strict";
'use strict';
(function (ajaxify) {

@ -1,5 +1,5 @@
"use strict";
'use strict';
var async = require('async');
var db = require('../database');

@ -92,11 +92,11 @@ profileController.get = function (req, res, callback) {
res.locals.metaTags = [
{
name: "title",
name: 'title',
content: userData.fullname || userData.username,
},
{
name: "description",
name: 'description',
content: plainAboutMe,
},
{
@ -117,7 +117,7 @@ profileController.get = function (req, res, callback) {
noEscape: true,
},
{
property: "og:image:url",
property: 'og:image:url',
content: userData.picture,
noEscape: true,
}

@ -83,23 +83,23 @@ settingsController.get = function (req, res, callback) {
userData.bootswatchSkinOptions = [
{ name: "Default", value: "default" },
{ name: "Cerulean", value: "cerulean" },
{ name: "Cosmo", value: "cosmo" },
{ name: "Cyborg", value: "cyborg" },
{ name: "Darkly", value: "darkly" },
{ name: "Flatly", value: "flatly" },
{ name: "Journal", value: "journal" },
{ name: "Lumen", value: "lumen" },
{ name: "Paper", value: "paper" },
{ name: "Readable", value: "readable" },
{ name: "Sandstone", value: "sandstone" },
{ name: "Simplex", value: "simplex" },
{ name: "Slate", value: "slate" },
{ name: "Spacelab", value: "spacelab" },
{ name: "Superhero", value: "superhero" },
{ name: "United", value: "united" },
{ name: "Yeti", value: "yeti" },
{ name: 'Default', value: 'default' },
{ name: 'Cerulean', value: 'cerulean' },
{ name: 'Cosmo', value: 'cosmo' },
{ name: 'Cyborg', value: 'cyborg' },
{ name: 'Darkly', value: 'darkly' },
{ name: 'Flatly', value: 'flatly' },
{ name: 'Journal', value: 'journal' },
{ name: 'Lumen', value: 'lumen' },
{ name: 'Paper', value: 'paper' },
{ name: 'Readable', value: 'readable' },
{ name: 'Sandstone', value: 'sandstone' },
{ name: 'Simplex', value: 'simplex' },
{ name: 'Slate', value: 'slate' },
{ name: 'Spacelab', value: 'spacelab' },
{ name: 'Superhero', value: 'superhero' },
{ name: 'United', value: 'united' },
{ name: 'Yeti', value: 'yeti' },
];
var isCustom = true;

@ -1,4 +1,4 @@
"use strict";
'use strict';
var adminController = {
dashboard: require('./admin/dashboard'),

@ -1,4 +1,4 @@
"use strict";
'use strict';
var appearanceController = {};

@ -1,4 +1,4 @@
"use strict";
'use strict';
var meta = require('../../meta');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');
var validator = require('validator');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var topics = require('../../topics');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var fs = require('fs');
var path = require('path');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');
var validator = require('validator');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');
var validator = require('validator');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');
var winston = require('winston');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');
var nconf = require('nconf');
@ -12,10 +12,10 @@ var categoriesController = {};
categoriesController.list = function (req, res, next) {
res.locals.metaTags = [{
name: "title",
name: 'title',
content: validator.escape(String(meta.config.title || 'NodeBB')),
}, {
name: "description",
name: 'description',
content: validator.escape(String(meta.config.description || '')),
}, {
property: 'og:title',

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');
@ -178,7 +178,7 @@ categoryController.get = function (req, res, callback) {
content: categoryData.description,
},
{
property: "og:type",
property: 'og:type',
content: 'website',
},
];

@ -1,4 +1,4 @@
"use strict";
'use strict';
var user = require('../user');
var adminBlacklistController = require('./admin/blacklist');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');
var nconf = require('nconf');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');
var nconf = require('nconf');
@ -61,7 +61,7 @@ Controllers.home = function (req, res, next) {
var match = /^category\/(\d+)\/(.*)$/.exec(route);
if (match) {
req.params.topic_index = "1";
req.params.topic_index = '1';
req.params.category_id = match[1];
req.params.slug = match[2];
Controllers.category.get(req, res, next);
@ -270,12 +270,12 @@ Controllers.confirmEmail = function (req, res) {
Controllers.robots = function (req, res) {
res.set('Content-Type', 'text/plain');
if (meta.config["robots.txt"]) {
res.send(meta.config["robots.txt"]);
if (meta.config['robots.txt']) {
res.send(meta.config['robots.txt']);
} else {
res.send("User-agent: *\n" +
"Disallow: " + nconf.get('relative_path') + "/admin/\n" +
"Sitemap: " + nconf.get('url') + "/sitemap.xml");
res.send('User-agent: *\n' +
'Disallow: ' + nconf.get('relative_path') + '/admin/\n' +
'Sitemap: ' + nconf.get('url') + '/sitemap.xml');
}
};

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var posts = require('../posts');
var helpers = require('./helpers');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');
@ -187,11 +187,11 @@ topicsController.get = function (req, res, callback) {
res.locals.metaTags = [
{
name: "title",
name: 'title',
content: topicData.titleRaw,
},
{
name: "description",
name: 'description',
content: description,
},
{
@ -203,11 +203,11 @@ topicsController.get = function (req, res, callback) {
content: description,
},
{
property: "og:type",
property: 'og:type',
content: 'article',
},
{
property: "og:url",
property: 'og:url',
content: nconf.get('url') + '/topic/' + topicData.slug + (req.params.post_index ? ('/' + req.params.post_index) : ''),
noEscape: true,
},
@ -217,12 +217,12 @@ topicsController.get = function (req, res, callback) {
noEscape: true,
},
{
property: "og:image:url",
property: 'og:image:url',
content: ogImageUrl,
noEscape: true,
},
{
property: "article:published_time",
property: 'article:published_time',
content: utils.toISOString(topicData.timestamp),
},
{

@ -1,4 +1,4 @@
"use strict";
'use strict';
var fs = require('fs');
var path = require('path');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var async = require('async');
var user = require('../user');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var coverPhoto = {};
var meta = require('./meta');

@ -1,4 +1,4 @@
"use strict";
'use strict';
var nconf = require('nconf');
var databaseName = nconf.get('database');

@ -37,8 +37,8 @@
before: function (value) { value = value || nconf.get('mongo:password') || ''; return value; },
},
{
name: "mongo:database",
description: "MongoDB database name",
name: 'mongo:database',
description: 'MongoDB database name',
default: nconf.get('mongo:database') || 'nodebb',
},
];
@ -92,7 +92,7 @@
mongoClient.connect(connString, connOptions, function (err, _db) {
if (err) {
winston.error("NodeBB could not connect to your Mongo database. Mongo returned the following error: " + err.message);
winston.error('NodeBB could not connect to your Mongo database. Mongo returned the following error: ' + err.message);
return callback(err);
}

@ -1,4 +1,4 @@
"use strict";
'use strict';
module.exports = function (db, module) {
var helpers = module.helpers.mongo;

@ -1,4 +1,4 @@
"use strict";
'use strict';
var helpers = {};

@ -1,4 +1,4 @@
"use strict";
'use strict';
module.exports = function (db, module) {
var helpers = module.helpers.mongo;

@ -1,4 +1,4 @@
"use strict";
'use strict';
var winston = require('winston');

@ -1,4 +1,4 @@
"use strict";
'use strict';
module.exports = function (db, module) {
var helpers = module.helpers.mongo;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save