diff options
author | Tristan Darricau <github@nicofuma.fr> | 2016-12-03 13:03:13 +0100 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2016-12-03 13:03:13 +0100 |
commit | 3e8071478b7910bd4a9ca0e8dccbd8159d2c8df6 (patch) | |
tree | 7e3a4a2e447851e1717b1727b66132a95ef3ef62 /phpBB/adm/style/tooltip.js | |
parent | 098764a0aa851fa16e760de3c2b6de5e18341e1a (diff) | |
parent | b24c2ea5be700b09053c9916f15f807c195d151b (diff) | |
download | forums-3e8071478b7910bd4a9ca0e8dccbd8159d2c8df6.tar forums-3e8071478b7910bd4a9ca0e8dccbd8159d2c8df6.tar.gz forums-3e8071478b7910bd4a9ca0e8dccbd8159d2c8df6.tar.bz2 forums-3e8071478b7910bd4a9ca0e8dccbd8159d2c8df6.tar.xz forums-3e8071478b7910bd4a9ca0e8dccbd8159d2c8df6.zip |
Merge pull request #4549 from marc1706/ticket/14736
[ticket/14736] Reset role dropdown when modifying permissions
* marc1706/ticket/14736:
[ticket/14736] Reset role dropdown when modifying permissions
Diffstat (limited to 'phpBB/adm/style/tooltip.js')
-rw-r--r-- | phpBB/adm/style/tooltip.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/adm/style/tooltip.js b/phpBB/adm/style/tooltip.js index 65773ae14f..8781e2b509 100644 --- a/phpBB/adm/style/tooltip.js +++ b/phpBB/adm/style/tooltip.js @@ -211,6 +211,23 @@ $(function() { // Prepare dropdown phpbb.prepareRolesDropdown(); + + // Reset role drop-down on modifying permissions in advanced tab + $('div.permissions-switch > a').on('click', function () { + $.each($('input[type=radio][name^="setting["]'), function () { + var $this = $(this); + $this.on('click', function () { + var $rolesOptions = $this.closest('fieldset.permissions').find('.roles-options'), + rolesSelect = $rolesOptions.find('select > option')[0]; + + // Set selected setting + $rolesOptions.children('span') + .text(rolesSelect.text); + $rolesOptions.children('input[type=hidden]') + .val(rolesSelect.value); + }); + }); + }); }); })(jQuery); // Avoid conflicts with other libraries |