[BUGFIX] Fix tooltip after changing permissions 15/52115/2
authorJosef Glatz <josefglatz@gmail.com>
Wed, 22 Mar 2017 08:29:30 +0000 (09:29 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 22 Mar 2017 17:33:42 +0000 (18:33 +0100)
Fix js tooltip after permission settings are changed
in the permissions backend module.

Resolves: #80387
Releases: master, 7.6
Change-Id: I6be57ff0a48b3245c5e2d1aabc4260720c480e5f
Reviewed-on: https://review.typo3.org/52115
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Thomas Hohn <thomas@hohn.dk>
Reviewed-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Tested-by: Mona Muzaffar <mona.muzaffar@gmx.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/beuser/Resources/Public/JavaScript/Permissions.js

index 4528615..ad68902 100644 (file)
@@ -76,6 +76,7 @@ define(['jquery'], function($) {
        Permissions.setPermissions = function($element) {
                var page = $element.data('page');
                var who = $element.data('who');
+               var elementSelector = '#' + page + '_' + who;
 
                $.ajax({
                        url: ajaxUrl,
@@ -91,7 +92,9 @@ define(['jquery'], function($) {
                        }
                }).done(function(data) {
                        // Replace content
-                       $('#' + page + '_' + who).replaceWith(data);
+                       $(elementSelector).replaceWith(data);
+                       // Reinitialize tooltip
+                       $(elementSelector).find('span').tooltip();
                });
        };