Error messages now look more like common dialogs
authorAlexander Ebert <ebert@woltlab.com>
Mon, 28 Nov 2011 15:20:46 +0000 (16:20 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 28 Nov 2011 15:20:46 +0000 (16:20 +0100)
com.woltlab.wcf/template/headInclude.tpl
wcfsetup/install/files/js/WCF.js

index 7a6f184dd471eacd0417f52eaa63e23e2b7bd72d..f2cdfd88c58050840b926a5bf626052e5e7fee0f 100644 (file)
@@ -48,6 +48,7 @@
        $(function() {
                WCF.Language.addObject({
                        'wcf.global.button.next': '{lang}wcf.global.button.next{/lang}',
+                       'wcf.global.error.title': '{lang}wcf.global.error.title{/lang}',
                        'wcf.global.loading': '{lang}wcf.global.loading{/lang}',
                        'wcf.date.relative.minutes': '{capture assign=relativeMinutes}{lang}wcf.date.relative.minutes{/lang}{/capture}{@$relativeMinutes|encodeJS}',
                        'wcf.date.relative.hours': '{capture assign=relativeHours}{lang}wcf.date.relative.hours{/lang}{/capture}{@$relativeHours|encodeJS}',
index b675a3264025e54ba8af368bfdc566c4e06446fe..f2ee853af7f7659af335db818dc8bcc2a545de06 100644 (file)
@@ -1064,12 +1064,12 @@ WCF.Action.Proxy.prototype = {
                        }
                        
                        var $randomID = WCF.getRandomID();
-                       $('<div class="ajaxDebugMessage" id="' + $randomID + '" title="HTTP/1.0 ' + jqXHR.status + ' ' + errorThrown + '"><p>Der Server antwortete: ' + data.message + '</p><p>Stacktrace:</p><p>' + data.stacktrace + '</p></div>').wcfDialog();
+                       $('<div class="ajaxDebugMessage" id="' + $randomID + '"><p>' + data.message + '</p><p>Stacktrace:</p><p>' + data.stacktrace + '</p></div>').wcfDialog({ title: WCF.Language.get('wcf.global.error.title') });
                }
                // failed to parse JSON
                catch (e) {
                        var $randomID = WCF.getRandomID();
-                       $('<div class="ajaxDebugMessage" id="' + $randomID + '" title="HTTP/1.0 ' + jqXHR.status + ' ' + errorThrown + '"><p style="padding: 3px;">Der Server antwortete: ' + jqXHR.responseText + '.</p></div>').wcfDialog();
+                       $('<div class="ajaxDebugMessage" id="' + $randomID + '"><p style="padding: 3px;">' + jqXHR.responseText + '.</p></div>').wcfDialog({ title: WCF.Language.get('wcf.global.error.title') });
                }
                
                this._after();