From 72a07c576d7e4f93d5b6285735543341545178ca Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 13 Oct 2014 23:15:58 +0200 Subject: [PATCH] Fixed a few issues --- wcfsetup/install/files/js/WCF.ACL.js | 12 +++++------- wcfsetup/install/files/js/WCF.Message.js | 8 ++++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.ACL.js b/wcfsetup/install/files/js/WCF.ACL.js index e2003c0dd7..cd3a21ccb7 100644 --- a/wcfsetup/install/files/js/WCF.ACL.js +++ b/wcfsetup/install/files/js/WCF.ACL.js @@ -540,9 +540,7 @@ WCF.ACL.List = Class.extend({ // clear old values this._values[$type][$objectID] = { }; - - var self = this; - this._containerElements.permissionList.find("input[type='checkbox']").each(function(index, checkbox) { + this._containerElements.permissionList.find("input[type='checkbox']").each((function(index, checkbox) { var $checkbox = $(checkbox); if ($checkbox.attr('id') != 'grantAll_' + this._container.attr('id') && $checkbox.attr('id') != 'denyAll_' + this._container.attr('id')) { var $optionValue = ($checkbox.data('type') === 'deny') ? 0 : 1; @@ -550,16 +548,16 @@ WCF.ACL.List = Class.extend({ if ($checkbox.is(':checked')) { // store value - self._values[$type][$objectID][$optionID] = $optionValue; + this._values[$type][$objectID][$optionID] = $optionValue; // reset value afterwards $checkbox.prop('checked', false); } - else if (self._values[$type] && self._values[$type][$objectID] && self._values[$type][$objectID][$optionID] && self._values[$type][$objectID][$optionID] == $optionValue) { - delete self._values[$type][$objectID][$optionID]; + else if (this._values[$type] && this._values[$type][$objectID] && this._values[$type][$objectID][$optionID] && this._values[$type][$objectID][$optionID] == $optionValue) { + delete this._values[$type][$objectID][$optionID]; } } - }); + }).bind(this)); }, /** diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index 78af4ef50f..5fb2e37680 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -912,7 +912,7 @@ WCF.Message.QuickReply = Class.extend({ var $message = ''; if ($.browser.redactor) { - $message = this._messageField.redactor('getText'); + $message = this._messageField.redactor('wutil.getText'); } else { $message = $.trim(this._messageField.val()); @@ -1031,7 +1031,7 @@ WCF.Message.QuickReply = Class.extend({ var $message = ''; if ($.browser.redactor) { - $message = this._messageField.redactor('getText'); + $message = this._messageField.redactor('wutil.getText'); } else { $message = this._messageField.val(); @@ -1063,7 +1063,7 @@ WCF.Message.QuickReply = Class.extend({ */ _success: function(data, textStatus, jqXHR) { if ($.browser.redactor) { - this._messageField.redactor('autosavePurge'); + this._messageField.redactor('wutil.autosavePurge'); } // redirect to new page @@ -1096,7 +1096,7 @@ WCF.Message.QuickReply = Class.extend({ } if ($.browser.redactor) { - this._messageField.redactor('reset'); + this._messageField.redactor('wutil.reset'); } else { this._messageField.val(''); -- 2.20.1