From 26d9993b3ed3e0cfb56c84478e8b4c3f5be459fb Mon Sep 17 00:00:00 2001 From: DeLtAfOx Date: Tue, 15 Jul 2014 07:52:04 +0200 Subject: Userlist: async load doesnt fill checked group/subadmin array --- settings/js/users/users.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 7d567e225d9..7cc9a6ad030 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -365,7 +365,12 @@ var UserList = { var user = UserList.getUID($element); if ($element.data('user-groups')) { - checked = $element.data('user-groups'); + if (typeof $element.data('user-groups') == 'string') { + checked = $element.data('user-groups').split(", "); + } + else { + checked = $element.data('user-groups'); + } } var checkHandler = null; if(user) { // Only if in a user row, and not the #newusergroups select @@ -445,7 +450,12 @@ var UserList = { var user = UserList.getUID($element); if ($element.data('subadmin')) { - checked = $element.data('subadmin'); + if (typeof $element.data('subadmin') == 'string') { + checked = $element.data('subadmin').split(", "); + } + else { + checked = $element.data('subadmin'); + } } var checkHandler = function (group) { if (group === 'admin') { -- cgit v1.2.3 From cd97847cd686b5d894cf9c4ab0e21373cd4f6ba1 Mon Sep 17 00:00:00 2001 From: DeLtAfOx Date: Tue, 15 Jul 2014 13:44:41 +0200 Subject: Strinct comparsion fix --- settings/js/users/users.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings/js/users/users.js b/settings/js/users/users.js index 7cc9a6ad030..ba228905a8a 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -365,7 +365,7 @@ var UserList = { var user = UserList.getUID($element); if ($element.data('user-groups')) { - if (typeof $element.data('user-groups') == 'string') { + if (typeof $element.data('user-groups') === 'string') { checked = $element.data('user-groups').split(", "); } else { @@ -450,7 +450,7 @@ var UserList = { var user = UserList.getUID($element); if ($element.data('subadmin')) { - if (typeof $element.data('subadmin') == 'string') { + if (typeof $element.data('subadmin') === 'string') { checked = $element.data('subadmin').split(", "); } else { -- cgit v1.2.3