From: Matthias Schmidt Date: Tue, 1 Jan 2013 15:14:27 +0000 (+0100) Subject: Fixes ACL JavaScript code X-Git-Tag: 2.0.0_Beta_1~620^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49adce2d782ee433f13950f7c855bd30353ee594;p=GitHub%2FWoltLab%2FWCF.git Fixes ACL JavaScript code --- 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); }