|
|
@ -9,7 +9,7 @@ define('autocomplete', function() {
|
|
|
|
module.user = function (input, onselect) {
|
|
|
|
module.user = function (input, onselect) {
|
|
|
|
app.loadJQueryUI(function() {
|
|
|
|
app.loadJQueryUI(function() {
|
|
|
|
input.autocomplete({
|
|
|
|
input.autocomplete({
|
|
|
|
delay: 100,
|
|
|
|
delay: 200,
|
|
|
|
open: function() {
|
|
|
|
open: function() {
|
|
|
|
$(this).autocomplete('widget').css('z-index', 20000);
|
|
|
|
$(this).autocomplete('widget').css('z-index', 20000);
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -22,9 +22,10 @@ define('autocomplete', function() {
|
|
|
|
|
|
|
|
|
|
|
|
if (result && result.users) {
|
|
|
|
if (result && result.users) {
|
|
|
|
var names = result.users.map(function(user) {
|
|
|
|
var names = result.users.map(function(user) {
|
|
|
|
|
|
|
|
var username = $('<div/>').html(user.username).text()
|
|
|
|
return user && {
|
|
|
|
return user && {
|
|
|
|
label: user.username,
|
|
|
|
label: username,
|
|
|
|
value: user.username,
|
|
|
|
value: username,
|
|
|
|
user: {
|
|
|
|
user: {
|
|
|
|
uid: user.uid,
|
|
|
|
uid: user.uid,
|
|
|
|
name: user.username,
|
|
|
|
name: user.username,
|
|
|
@ -44,7 +45,7 @@ define('autocomplete', function() {
|
|
|
|
module.group = function(input, onselect) {
|
|
|
|
module.group = function(input, onselect) {
|
|
|
|
app.loadJQueryUI(function() {
|
|
|
|
app.loadJQueryUI(function() {
|
|
|
|
input.autocomplete({
|
|
|
|
input.autocomplete({
|
|
|
|
delay: 100,
|
|
|
|
delay: 200,
|
|
|
|
select: onselect,
|
|
|
|
select: onselect,
|
|
|
|
source: function(request, response) {
|
|
|
|
source: function(request, response) {
|
|
|
|
socket.emit('groups.search', {
|
|
|
|
socket.emit('groups.search', {
|
|
|
|