mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-28 10:19:50 +01:00
style(eslint): newlines in public/src as well
This commit is contained in:
@@ -177,7 +177,8 @@ define('admin/extend/widgets', ['jqueryui'], function () {
|
|||||||
})
|
})
|
||||||
.children('.panel-heading')
|
.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> </div>')
|
.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> </div>')
|
||||||
.children('small').html('');
|
.children('small')
|
||||||
|
.html('');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ define('admin/general/sounds', ['sounds', 'settings', 'admin/settings'], functio
|
|||||||
$('.sounds').find('button[data-action="play"]').on('click', function (e) {
|
$('.sounds').find('button[data-action="play"]').on('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var soundName = $(this).parent().parent().find('select').val();
|
var soundName = $(this).parent().parent().find('select')
|
||||||
|
.val();
|
||||||
Sounds.playSound(soundName);
|
Sounds.playSound(soundName);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,8 @@ define('admin/modules/search', ['mousetrap'], function (mousetrap) {
|
|||||||
mousetrap(input[0]).bind(['up', 'down'], function (ev, key) {
|
mousetrap(input[0]).bind(['up', 'down'], function (ev, key) {
|
||||||
var next;
|
var next;
|
||||||
if (key === 'up') {
|
if (key === 'up') {
|
||||||
next = menu.find('li.result > a.focus').removeClass('focus').parent().prev('.result').children();
|
next = menu.find('li.result > a.focus').removeClass('focus').parent().prev('.result')
|
||||||
|
.children();
|
||||||
if (!next.length) {
|
if (!next.length) {
|
||||||
next = menu.find('li.result > a').last();
|
next = menu.find('li.result > a').last();
|
||||||
}
|
}
|
||||||
@@ -98,7 +99,8 @@ define('admin/modules/search', ['mousetrap'], function (mousetrap) {
|
|||||||
next[0].scrollIntoView(true);
|
next[0].scrollIntoView(true);
|
||||||
}
|
}
|
||||||
} else if (key === 'down') {
|
} else if (key === 'down') {
|
||||||
next = menu.find('li.result > a.focus').removeClass('focus').parent().next('.result').children();
|
next = menu.find('li.result > a.focus').removeClass('focus').parent().next('.result')
|
||||||
|
.children();
|
||||||
if (!next.length) {
|
if (!next.length) {
|
||||||
next = menu.find('li.result > a').first();
|
next = menu.find('li.result > a').first();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -271,7 +271,8 @@ app.cacheBuster = null;
|
|||||||
var path = window.location.pathname + window.location.search;
|
var path = window.location.pathname + window.location.search;
|
||||||
$('#main-nav li').removeClass('active');
|
$('#main-nav li').removeClass('active');
|
||||||
if (path) {
|
if (path) {
|
||||||
$('#main-nav li').removeClass('active').find('a[href="' + path + '"]').parent().addClass('active');
|
$('#main-nav li').removeClass('active').find('a[href="' + path + '"]').parent()
|
||||||
|
.addClass('active');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ define('forum/account/settings', ['forum/account/header', 'components', 'sounds'
|
|||||||
$('.account').find('button[data-action="play"]').on('click', function (e) {
|
$('.account').find('button[data-action="play"]').on('click', function (e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
var soundName = $(this).parent().parent().find('select').val();
|
var soundName = $(this).parent().parent().find('select')
|
||||||
|
.val();
|
||||||
sounds.playSound(soundName);
|
sounds.playSound(soundName);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,8 @@ define('forum/search', ['search', 'autocomplete', 'storage'], function (searchMo
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
searchQuery = utils.escapeHTML(searchQuery);
|
searchQuery = utils.escapeHTML(searchQuery);
|
||||||
var regexStr = searchQuery.replace(/^"/, '').replace(/"$/, '').trim().split(' ').join('|');
|
var regexStr = searchQuery.replace(/^"/, '').replace(/"$/, '').trim().split(' ')
|
||||||
|
.join('|');
|
||||||
var regex = new RegExp('(' + regexStr + ')', 'gi');
|
var regex = new RegExp('(' + regexStr + ')', 'gi');
|
||||||
|
|
||||||
$('.search-result-text p, .search-result-text h4').each(function () {
|
$('.search-result-text p, .search-result-text h4').each(function () {
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ define('forum/topic/replies', ['navigator', 'components', 'forum/topic/posts'],
|
|||||||
hideReplies: true,
|
hideReplies: true,
|
||||||
};
|
};
|
||||||
app.parseAndTranslate('topic', 'posts', tplData, function (html) {
|
app.parseAndTranslate('topic', 'posts', tplData, function (html) {
|
||||||
$('<div>', { component: 'post/replies' }).html(html).hide().insertAfter(button).slideDown('fast');
|
$('<div>', { component: 'post/replies' }).html(html).hide().insertAfter(button)
|
||||||
|
.slideDown('fast');
|
||||||
posts.processPage(html);
|
posts.processPage(html);
|
||||||
$(window).trigger('action:posts.loaded', { posts: data });
|
$(window).trigger('action:posts.loaded', { posts: data });
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ define('forum/users', ['translator', 'benchpress'], function (translator, Benchp
|
|||||||
app.enterRoom('user_list');
|
app.enterRoom('user_list');
|
||||||
|
|
||||||
var section = utils.params().section ? ('?section=' + utils.params().section) : '';
|
var section = utils.params().section ? ('?section=' + utils.params().section) : '';
|
||||||
$('.nav-pills li').removeClass('active').find('a[href="' + window.location.pathname + section + '"]').parent().addClass('active');
|
$('.nav-pills li').removeClass('active').find('a[href="' + window.location.pathname + section + '"]').parent()
|
||||||
|
.addClass('active');
|
||||||
|
|
||||||
handleSearch();
|
handleSearch();
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,8 @@
|
|||||||
|
|
||||||
function stringify(obj) {
|
function stringify(obj) {
|
||||||
// Turns the incoming object into a JSON string
|
// Turns the incoming object into a JSON string
|
||||||
return JSON.stringify(obj).replace(/&/gm, '&').replace(/</gm, '<').replace(/>/gm, '>').replace(/"/g, '"');
|
return JSON.stringify(obj).replace(/&/gm, '&').replace(/</gm, '<').replace(/>/gm, '>')
|
||||||
|
.replace(/"/g, '"');
|
||||||
}
|
}
|
||||||
|
|
||||||
function escape(str) {
|
function escape(str) {
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ define('iconSelect', ['benchpress'], function (Benchpress) {
|
|||||||
className: 'btn-primary',
|
className: 'btn-primary',
|
||||||
callback: function () {
|
callback: function () {
|
||||||
var iconClass = $('.bootbox .selected').attr('class');
|
var iconClass = $('.bootbox .selected').attr('class');
|
||||||
var categoryIconClass = $('<div/>').addClass(iconClass).removeClass('fa').removeClass('selected').attr('class');
|
var categoryIconClass = $('<div/>').addClass(iconClass).removeClass('fa').removeClass('selected')
|
||||||
|
.attr('class');
|
||||||
|
|
||||||
if (categoryIconClass) {
|
if (categoryIconClass) {
|
||||||
el.attr('class', 'fa ' + (doubleSize ? 'fa-2x ' : '') + categoryIconClass);
|
el.attr('class', 'fa ' + (doubleSize ? 'fa-2x ' : '') + categoryIconClass);
|
||||||
|
|||||||
Reference in New Issue
Block a user