Merge pull request #514 from O2Graphics/master

Fix buttons not working for dynamically added services
This commit is contained in:
Amauri CHAMPEAUX 2020-11-06 13:39:04 +01:00 committed by GitHub
commit 1846f2c436
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -715,6 +715,14 @@ var tarteaucitron = {
tarteaucitron.userInterface.css('tarteaucitronNoServicesTitle', 'display', 'none');
tarteaucitron.userInterface.order(service.type);
tarteaucitron.addClickEventToId(service.key + 'Allowed', function () {
tarteaucitron.userInterface.respond(this, true);
});
tarteaucitron.addClickEventToId(service.key + 'Denied', function () {
tarteaucitron.userInterface.respond(this, false);
});
}
tarteaucitron.pro('!' + service.key + '=' + isAllowed);