@ -4,8 +4,9 @@
define ( 'admin/manage/groups' , [
define ( 'admin/manage/groups' , [
'iconSelect' ,
'iconSelect' ,
'admin/modules/colorpicker' ,
'admin/modules/colorpicker' ,
'translator'
'translator' ,
] , function ( iconSelect , colorpicker , translator ) {
'components'
] , function ( iconSelect , colorpicker , translator , components ) {
var Groups = { } ;
var Groups = { } ;
Groups . init = function ( ) {
Groups . init = function ( ) {
@ -26,9 +27,6 @@ define('admin/manage/groups', [
groupLabelPreview = $ ( '#group-label-preview' ) ,
groupLabelPreview = $ ( '#group-label-preview' ) ,
searchDelay ;
searchDelay ;
// Tooltips
$ ( '#groups-list .members li' ) . tooltip ( ) ;
createModal . on ( 'keypress' , function ( e ) {
createModal . on ( 'keypress' , function ( e ) {
if ( e . keyCode === 13 ) {
if ( e . keyCode === 13 ) {
createModalGo . click ( ) ;
createModalGo . click ( ) ;
@ -87,10 +85,10 @@ define('admin/manage/groups', [
} , 0 ) ;
} , 0 ) ;
} ) ;
} ) ;
$ ( ' # groups-list') . on ( 'click' , 'button[data-action]' , function ( ) {
$ ( ' . groups-list') . on ( 'click' , 'button[data-action]' , function ( ) {
var el = $ ( this ) ,
var el = $ ( this ) ,
action = el . attr ( 'data-action' ) ,
action = el . attr ( 'data-action' ) ,
groupName = el . parents ( ' li [data-groupname]') . attr ( 'data-groupname' ) ;
groupName = el . parents ( ' tr [data-groupname]') . attr ( 'data-groupname' ) ;
switch ( action ) {
switch ( action ) {
case 'delete' :
case 'delete' :
@ -110,7 +108,6 @@ define('admin/manage/groups', [
break ;
break ;
case 'members' :
case 'members' :
socket . emit ( 'admin.groups.get' , groupName , function ( err , groupObj ) {
socket . emit ( 'admin.groups.get' , groupName , function ( err , groupObj ) {
changeGroupName . val ( groupObj . name ) . prop ( 'readonly' , groupObj . system ) ;
changeGroupName . val ( groupObj . name ) . prop ( 'readonly' , groupObj . system ) ;
changeGroupDesc . val ( groupObj . description ) ;
changeGroupDesc . val ( groupObj . description ) ;
changeGroupUserTitle . val ( groupObj . userTitle ) ;
changeGroupUserTitle . val ( groupObj . userTitle ) ;