Allow different dataType value for WCF.Action.Proxy
authorAlexander Ebert <ebert@woltlab.com>
Sat, 23 Feb 2013 16:06:57 +0000 (17:06 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 23 Feb 2013 16:06:57 +0000 (17:06 +0100)
wcfsetup/install/files/js/WCF.js

index 748c7e316e30708b50d5aff78e65dc2b0de6a0ad..01c3667e6d5f2e25e75e468875291e9131a8794d 100755 (executable)
@@ -1467,6 +1467,7 @@ WCF.Action.Proxy = Class.extend({
                this.options = $.extend(true, {
                        autoSend: false,
                        data: { },
+                       dataType: 'json',
                        after: null,
                        init: null,
                        failure: null,
@@ -1499,7 +1500,7 @@ WCF.Action.Proxy = Class.extend({
                
                $.ajax({
                        data: this.options.data,
-                       dataType: 'json',
+                       dataType: this.options.dataType,
                        type: this.options.type,
                        url: this.options.url,
                        success: $.proxy(this._success, this),