Fixed a few issues
authorAlexander Ebert <ebert@woltlab.com>
Mon, 13 Oct 2014 21:15:58 +0000 (23:15 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 13 Oct 2014 21:15:58 +0000 (23:15 +0200)
wcfsetup/install/files/js/WCF.ACL.js
wcfsetup/install/files/js/WCF.Message.js

index e2003c0dd72a7ff54c95f014e8d664e38b706fb5..cd3a21ccb7bcf5926a3a5a5a34bbb763dec55ead 100644 (file)
@@ -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));
        },
        
        /**
index 78af4ef50f6f0e9d8bf10a20012f350a5c4fedd0..5fb2e37680136e21f4364708b59005dc7519922f 100644 (file)
@@ -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('');