[Libreoffice-commits] .: bug/bug bug/bug.xhtml

Loic Dachary loic at kemper.freedesktop.org
Wed Sep 21 01:52:23 PDT 2011


 bug/bug.xhtml   |   34 +++++++++++++++++++++++++++-------
 bug/bug/bug.css |    8 ++++----
 2 files changed, 31 insertions(+), 11 deletions(-)

New commits:
commit 58c0e1808583b8cb29fbbe2e316be40dd57e998a
Author: Loic Dachary <loic at dachary.org>
Date:   Wed Sep 21 10:52:15 2011 +0200

    fallback for unsupported browsers

diff --git a/bug/bug.xhtml b/bug/bug.xhtml
index b7c955c..ef75845 100644
--- a/bug/bug.xhtml
+++ b/bug/bug.xhtml
@@ -21,13 +21,18 @@
     <link rel="stylesheet" href="bug.css" type="text/css" media="screen"></link>
   </head>
   <body>
-    <div class="nojavascript">
+    <div class="compatibility">
+      <div class="version message unsupported"></div>
+      <div class="message unsupported">This browser version is not supported and this page cannot be displayed properly.</div>
+      <div class="message nojavascript">JavaScript is disabled and this page cannot be displayed.</div>
       <div class="message">
-        JavaScript is disabled, use <a href="/enter_bug.cgi?product=LibreOffice;bug_status=UNCONFIRMED;version=?">bugzilla</a> to report a problem.
+        <p>Please use <a href="/enter_bug.cgi?product=LibreOffice;bug_status=UNCONFIRMED;version=?">bugzilla</a> instead to report a problem.</p>
+        <p>It works on all browsers and when JavaScript is disabled.</p>
       </div>
       <div class="eyecandy"></div>
     </div>
     <div class="javascript">
+      <div class="version"></div>
       <div class="skin"><a href="?skin=login">login</a> <a href="?skin=component">component</a> <a href="?skin=subcomponent">subcomponent</a> <a href="?skin=version">version</a> <a href="?skin=description">description</a> <a href="?skin=submit">submit</a> <a href="?skin=complete">complete</a> </div>
       <div class="header">
         <div class="title">Bug</div>
@@ -172,15 +177,30 @@
       </div>
     </div>
     <script>
+      var unsupported = false;
       $(document).ready(function() {
-        $('.nojavascript').hide();
-        $('.javascript').show();
-        if(location.search.indexOf('skin') >= 0) {
-          $.skin();
+        try {
+          $('.version').text(window.navigator.userAgent);
+        } catch(e) {
+        }
+        if(unsupported) {
+          $('.unsupported').show();
+          $('.nojavascript').hide();
         } else {
-          $.bug.main();
+          $('.compatibility').hide();
+          $('.javascript').show();
+          if(location.search.indexOf('skin') >= 0) {
+            $.skin();
+          } else {
+            $.bug.main();
+          }
         }
       });
     </script>
+    <!--[if LT IE  8]>
+        <script>
+          unsupported = true;
+        </script>
+    <![endif]-->
   </body>
 </html>
diff --git a/bug/bug/bug.css b/bug/bug/bug.css
index c5230c6..be984d9 100644
--- a/bug/bug/bug.css
+++ b/bug/bug/bug.css
@@ -1,13 +1,13 @@
-/* javascript fallback */
-.javascript { 
+/* javascript and old browsers fallback */
+.javascript, .unsupported { 
     display: none;
 }
 
-.nojavascript .message {
+.compatibility .message {
     padding: 10px 0px 10px 50px;
 }
 
-.nojavascript .eyecandy {
+.compatibility .eyecandy {
     width: 500px;
     height: 116px;
     background: url('images/noscript.png') no-repeat top left;


More information about the Libreoffice-commits mailing list