? mozilla.org/docshell/resources/content/netError.css ? mozilla.org/docshell/resources/content/netErrorExclamation.png ? mozilla.org/docshell/resources/content/netErrorGradient.png Index: mozilla.org/docshell/resources/content/netError.js =================================================================== RCS file: /cvsroot/mozilla/docshell/resources/content/netError.js,v retrieving revision 1.6 diff -u -8 -p -r1.6 netError.js --- mozilla.org/docshell/resources/content/netError.js 18 Feb 2005 17:53:45 -0000 1.6 +++ mozilla.org/docshell/resources/content/netError.js 24 Apr 2005 07:04:12 -0000 @@ -1,81 +1,90 @@ -// Error url MUST be formatted like this: -// chrome://neterror.xhtml?e=error&u=url&d=desc - -// Note that this file uses document.documentURI to get -// the URL (with the format from above). This is because -// document.location.href gets the current URI off the docshell, -// which is the URL displayed in the location bar, i.e. -// the URI that the user attempted to load. - -function getErrorCode() -{ - var url = document.documentURI; - var error = url.search(/e\=/); - var duffUrl = url.search(/\&u\=/); - return decodeURIComponent(url.slice(error + 2, duffUrl)); -} - -function getDuffUrl() -{ - var url = document.documentURI; - var duffUrl = url.search(/u\=/); - var desc = url.search(/\&d\=/); - return decodeURIComponent(url.slice(duffUrl + 2, desc)); -} - -function getDescription() -{ - var url = document.documentURI; - var desc = url.search(/d\=/); - return decodeURIComponent(url.slice(desc + 2)); -} - -function retryThis() -{ - // Session history has the URL of the page that failed - // to load, not the one of the error page. So, just call - // reload(), which will also repost POST data correctly. - location.reload(); -} - -function fillIn() -{ - var err = getErrorCode(); - var duffUrl = getDuffUrl(); - var i; - - // Fill in the title - var et = document.getElementById("et_" + err); - if (et) { - et.className = "et_visible"; - } - - -// for (i = 0; i < t.childNodes.length; i++) -// { -// var n = t.childNodes.item(i); -// if (n.nodeType == Node.TEXT_NODE) -// { -// n.nodeValue = titleText; -// break; -// } -// } - - // Fill in the short description - var sd = document.getElementById("shortDesc"); - for (i = 0; i < sd.childNodes.length; i++) - { - var n = sd.childNodes.item(i); - if (n.nodeType == Node.TEXT_NODE) - { - n.nodeValue = getDescription(); - break; - } - } - - // Long description - var ld = document.getElementById("ld_" + err); - if (ld) { - ld.className = "ld_visible"; - } -} +// Error url MUST be formatted like this: +// chrome://neterror.xhtml?e=error&u=url&d=desc + +// Note that this file uses document.documentURI to get +// the URL (with the format from above). This is because +// document.location.href gets the current URI off the docshell, +// which is the URL displayed in the location bar, i.e. +// the URI that the user attempted to load. + +function getErrorCode() +{ + var url = document.documentURI; + var error = url.search(/e\=/); + var duffUrl = url.search(/\&u\=/); + return decodeURIComponent(url.slice(error + 2, duffUrl)); +} + +function getDuffUrl() +{ + var url = document.documentURI; + var duffUrl = url.search(/u\=/); + var desc = url.search(/\&d\=/); + return decodeURIComponent(url.slice(duffUrl + 2, desc)); +} + +function getDescription() +{ + var url = document.documentURI; + var desc = url.search(/d\=/); + return decodeURIComponent(url.slice(desc + 2)); +} + +function retryThis() +{ + // Session history has the URL of the page that failed + // to load, not the one of the error page. So, just call + // reload(), which will also repost POST data correctly. + location.reload(); +} + +function fillIn() +{ + var err = getErrorCode(); + var duffUrl = getDuffUrl(); + var i; + + // Fill in the title + var et = document.getElementById("et_" + err); + if (et) { + et.className = "visible_block"; + } + + // Fill in the long description of the problem + var ld = document.getElementById("ld_" + err); + if (ld) { + ld.className = "visible_block"; + } + + +// Do we need to keep the following commented block? -- WRP + +// for (i = 0; i < t.childNodes.length; i++) +// { +// var n = t.childNodes.item(i); +// if (n.nodeType == Node.TEXT_NODE) +// { +// n.nodeValue = titleText; +// break; +// } +// } + + // Fill in the short description received in the URI + var sd = document.getElementById("errorShortDesc"); + for (i = 0; i < sd.childNodes.length; i++) + { + var n = sd.childNodes.item(i); + if (n.nodeType == Node.TEXT_NODE) + { + n.nodeValue = getDescription(); + break; + } + } + + // Fill in the (new) resolution suggestions + var rs = document.getElementById("rs_" + err); + if (rs) { + rs.className = "visible_block"; + } + +} Index: mozilla.org/docshell/resources/content/netError.xhtml =================================================================== RCS file: /cvsroot/mozilla/docshell/resources/content/netError.xhtml,v retrieving revision 1.7 diff -u -8 -p -r1.7 netError.xhtml --- mozilla.org/docshell/resources/content/netError.xhtml 18 Feb 2005 17:53:45 -0000 1.7 +++ mozilla.org/docshell/resources/content/netError.xhtml 24 Apr 2005 07:04:12 -0000 @@ -1,172 +1,131 @@ - - - - %htmlDTD; - - %netErrorDTD; -]> - - - - - -
-&malformedURI.title;
-&fileNotFound.title;
-&dnsNotFound.title;
-&protocolNotFound.title;
-&connectionFailure.title;
-&netTimeout.title;
-&redirectLoop.title;
-&unknownSocketType.title;
-&netReset.title;
-&netOffline.title;
--
&malformedURI.longDesc;
-&fileNotFound.longDesc;
-&dnsNotFound.longDesc;
-&protocolNotFound.longDesc;
-&connectionFailure.longDesc;
-&netTimeout.longDesc;
-&redirectLoop.longDesc;
-&unknownSocketType.longDesc;
-&netReset.longDesc;
-&netOffline.longDesc;
-&malformedURI.longDesc;
+&fileNotFound.longDesc;
+&dnsNotFound.longDesc;
+&protocolNotFound.longDesc;
+&connectionFailure.longDesc;
+&netTimeout.longDesc;
+&redirectLoop.longDesc;
+&unknownSocketType.longDesc;
+&netReset.longDesc;
+&netOffline.longDesc;
+&malformedURI.hint;
+&fileNotFound.hint;
+&dnsNotFound.hint;
+&protocolNotFound.hint;
+&connectionFailure.hint;
+&netTimeout.hint;
+&redirectLoop.hint;
+&unknownSocketType.hint;
+&netReset.hint;
+&netOffline.hint;
+