From 49adce2d782ee433f13950f7c855bd30353ee594 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 1 Jan 2013 16:14:27 +0100 Subject: [PATCH] Fixes ACL JavaScript code --- wcfsetup/install/files/js/WCF.ACL.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.ACL.js b/wcfsetup/install/files/js/WCF.ACL.js index 078ae0ac59..36ac507ec3 100644 --- a/wcfsetup/install/files/js/WCF.ACL.js +++ b/wcfsetup/install/files/js/WCF.ACL.js @@ -315,11 +315,9 @@ WCF.ACL.List = Class.extend({ // add list items for (var $typeID in data.returnValues[type].label) { - this.addObject({ - label: data.returnValues[type].label[$typeID], - objectID: $typeID, - type: type - }); + var $listItem = $('
  • ' + data.returnValues[type].label[$typeID] + '
  • ').appendTo(this._containerElements.aclList); + $listItem.data('objectID', $typeID).data('type', type).click($.proxy(this._click, this)); + $('').click($.proxy(this._removeItem, this)).appendTo($listItem); this._search.addExcludedSearchValue(data.returnValues[type].label[$typeID]); } @@ -522,15 +520,15 @@ WCF.ACL.List = Class.extend({ if ($checkbox.attr('id') != 'grantAll' && $checkbox.attr('id') != 'denyAll') { var $optionValue = ($checkbox.data('type') === 'deny') ? 0 : 1; var $optionID = $checkbox.data('optionID'); - + if ($checkbox.is(':checked')) { if (!self._values[$type][$objectID]) { self._values[$type][$objectID] = { }; } - + // store value self._values[$type][$objectID][$optionID] = $optionValue; - + // reset value afterwards $checkbox.removeAttr('checked'); } @@ -564,7 +562,7 @@ WCF.ACL.List = Class.extend({ for (var $objectID in this._values[$type]) { var $object = this._values[$type][$objectID]; - + for (var $optionID in $object) { $('').appendTo($form); } -- 2.20.1