v1.18.x
barisusakli 9 years ago
parent e964ca1486
commit cbafbab107

@ -1,13 +1,20 @@
"use strict";
/* global socket, define, templates, bootbox, app, ajaxify */
/* global config, socket, define, templates, bootbox, app, ajaxify */
define('admin/manage/users', ['admin/modules/selectable'], function(selectable) {
define('admin/manage/users', ['admin/modules/selectable', 'translator'], function(selectable, translator) {
var Users = {};
Users.init = function() {
selectable.enable('#users-container', '.users-box');
var navPills = $('.nav-pills li');
var pathname = window.location.pathname;
if (!navPills.find('a[href="' + pathname + '"]').length) {
pathname = config.relative_path + '/admin/manage/users/latest';
}
navPills.removeClass('active').find('a[href="' + pathname + '"]').parent().addClass('active');
function getSelectedUids() {
var uids = [];
$('#users-container .users-box.ui-selected').each(function() {
@ -246,7 +253,7 @@ define('admin/manage/users', ['admin/modules/selectable'], function(selectable)
create: {
label: 'Create',
className: 'btn-primary',
callback: function(e) {
callback: function() {
createUser.call(this);
return false;
}
@ -292,7 +299,7 @@ define('admin/manage/users', ['admin/modules/selectable'], function(selectable)
var timeoutId = 0;
$('.nav-pills li').removeClass('active').find('a[href="' + window.location.pathname + '"]').parent().addClass('active');
$('#search-user-name, #search-user-email, #search-user-ip').on('keyup', function() {
if (timeoutId !== 0) {

@ -16,7 +16,7 @@
<ul class="menu-section-list">
<li><a href="{relative_path}/admin/manage/categories">Categories</a></li>
<li><a href="{relative_path}/admin/manage/tags">Tags</a></li>
<li><a href="{relative_path}/admin/manage/users/latest">Users</a></li>
<li><a href="{relative_path}/admin/manage/users">Users</a></li>
<li><a href="{relative_path}/admin/manage/registration">Registration Queue</a></li>
<li><a href="{relative_path}/admin/manage/groups">Groups</a></li>
<li><a href="{relative_path}/admin/manage/flags">Flags</a></li>
@ -167,7 +167,7 @@
<ul class="dropdown-menu" role="menu">
<li><a href="{relative_path}/admin/manage/categories">Categories</a></li>
<li><a href="{relative_path}/admin/manage/tags">Tags</a></li>
<li><a href="{relative_path}/admin/manage/users/latest">Users</a></li>
<li><a href="{relative_path}/admin/manage/users">Users</a></li>
<li><a href="{relative_path}/admin/manage/registration">Registration Queue</a></li>
<li><a href="{relative_path}/admin/manage/groups">Groups</a></li>
<li><a href="{relative_path}/admin/manage/flags">Flags</a></li>

Loading…
Cancel
Save