linting admin/groups

v1.18.x
psychobunny 11 years ago
parent 6ea760d636
commit d183e58771

@ -1,3 +1,6 @@
"use strict";
/*global define, templates, socket, ajaxify, app, bootbox*/
define(function() {
var Groups = {};
@ -12,7 +15,7 @@ define(function() {
searchResults = detailsModal.find('#group-details-search-results'),
groupMembersEl = detailsModal.find('ul.current_members'),
detailsModalSave = detailsModal.find('.btn-primary'),
searchDelay = undefined,
searchDelay,
listEl = $('#groups-list');
createEl.on('click', function() {
@ -107,7 +110,9 @@ define(function() {
detailsSearch.on('keyup', function() {
var searchEl = this;
if (searchDelay) clearTimeout(searchDelay);
if (searchDelay) {
clearTimeout(searchDelay);
}
searchDelay = setTimeout(function() {
var searchText = searchEl.value,
@ -117,7 +122,9 @@ define(function() {
socket.emit('admin.user.search', searchText, function(err, results) {
if (!err && results && results.users.length > 0) {
var numResults = results.users.length, x;
if (numResults > 4) numResults = 4;
if (numResults > 4) {
numResults = 4;
}
resultsEl.empty();
for (x = 0; x < numResults; x++) {

Loading…
Cancel
Save