diff options
-rw-r--r-- | src/usr/local/www/system_groupmanager_addprivs.php | 5 | ||||
-rw-r--r-- | src/usr/local/www/system_usermanager_addprivs.php | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/usr/local/www/system_groupmanager_addprivs.php b/src/usr/local/www/system_groupmanager_addprivs.php index c9434d1..891f3f0 100644 --- a/src/usr/local/www/system_groupmanager_addprivs.php +++ b/src/usr/local/www/system_groupmanager_addprivs.php @@ -287,7 +287,10 @@ events.push(function() { // When the 'sysprivs" selector is clicked, we display a description $('.multiselect').click(function() { - $('#pdesc').html('<span class="text-info">' + descs[$(this).children('option:selected').index()] + '</span>'); + var targetoption = $(this).children('option:selected').val(); + var idx = $('.shadowselect option[value="' + targetoption + '"]').index(); + + $('#pdesc').html('<span class="text-info">' + descs[idx] + '</span>'); // and update the shadow list from the real list $(".multiselect option").each(function() { diff --git a/src/usr/local/www/system_usermanager_addprivs.php b/src/usr/local/www/system_usermanager_addprivs.php index 0184c94..c24da9f 100644 --- a/src/usr/local/www/system_usermanager_addprivs.php +++ b/src/usr/local/www/system_usermanager_addprivs.php @@ -275,7 +275,10 @@ events.push(function() { // When the 'sysprivs" selector is clicked, we display a description $('.multiselect').click(function() { - $('#pdesc').html('<span class="text-info">' + descs[$(this).children('option:selected').index()] + '</span>'); + var targetoption = $(this).children('option:selected').val(); + var idx = $('.shadowselect option[value="' + targetoption + '"]').index(); + + $('#pdesc').html('<span class="text-info">' + descs[idx] + '</span>'); // and update the shadow list from the real list $(".multiselect option").each(function() { |