2 * Unbind all event handlers before tearing down a page
4 AJAX.registerTeardown('server_user_groups.js', function () {
5 $(document).off('click', 'a.deleteUserGroup.ajax');
11 AJAX.registerOnload('server_user_groups.js', function () {
12 // update the checkall checkbox on Edit user group page
13 $(checkboxes_sel).trigger('change');
15 $(document).on('click', 'a.deleteUserGroup.ajax', function (event) {
16 event.preventDefault();
18 var groupName = $link.parents('tr').find('td:first').text();
19 var buttonOptions = {};
20 buttonOptions[PMA_messages.strGo] = function () {
21 $(this).dialog('close');
22 $link.removeClass('ajax').trigger('click');
24 buttonOptions[PMA_messages.strClose] = function () {
25 $(this).dialog('close');
28 .attr('id', 'confirmUserGroupDeleteDialog')
29 .append(PMA_sprintf(PMA_messages.strDropUserGroupWarning, escapeHtml(groupName)))
34 buttons: buttonOptions,
35 title: PMA_messages.strConfirm,