]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 178178 Sidebar name should not be hardcoded to "Bugzilla"
authortimeless%mozdev.org <>
Mon, 11 Nov 2002 03:26:22 +0000 (03:26 +0000)
committertimeless%mozdev.org <>
Mon, 11 Nov 2002 03:26:22 +0000 (03:26 +0000)
r=bbaetz a=justdave

template/en/default/index.html.tmpl

index 9b34d15ee2756b8d121c56ace35173f7c04358ac..07cdf63b538d435ec1cc43c854030466b0e5e351 100644 (file)
 <script type="text/javascript" language="JavaScript">
 <!--
 function addSidebar() {
-      if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
-      {
-         window.sidebar.addPanel ("Bugzilla", "[% Param('urlbase') %]sidebar.cgi", "");
-      }
-      else
-      {
-         var rv = window.confirm ("This page is enhanced for use with Netscape 6.  " + "Would you like to upgrade now?");
-         if (rv)
-            document.location.href = "http://home.netscape.com/download/index.html";
-      }
-   }
+  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
+  {
+    var sidebarname=window.location.host;
+    if (!/bug/i.test(sidebarname))
+      sidebarname="Bugzilla "+sidebarname;
+    window.sidebar.addPanel (sidebarname, "[% Param('urlbase') %]sidebar.cgi", "");
+  }
+  else
+  {
+    var rv = window.confirm ("This page is enhanced for use with Netscape 6.  " + "Would you like to upgrade now?");
+    if (rv)
+      document.location.href = "http://home.netscape.com/download/index.html";
+  }
+}
 //-->
 </script>