* Moved some JavaScript functions out of head.html and into a new wclib.js
authorArt Cancro <ajc@citadel.org>
Tue, 21 Jun 2005 02:27:39 +0000 (02:27 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 21 Jun 2005 02:27:39 +0000 (02:27 +0000)
  file, which can be included and cached.  This will form the basis for a
  new WebCit JavaScript function library.

webcit/ChangeLog
webcit/iconbar.c
webcit/static/head.html
webcit/static/menuExpandable3.js [deleted file]
webcit/static/wclib.js [new file with mode: 0644]

index 148b7a9ed9bc80405dcbbe197e5519a94a95473f..fd9b158182f5c513d31d59c2e271bf64c3a9ba8b 100644 (file)
@@ -1,4 +1,9 @@
 $Log$
+Revision 619.8  2005/06/21 02:27:37  ajc
+* Moved some JavaScript functions out of head.html and into a new wclib.js
+  file, which can be included and cached.  This will form the basis for a
+  new WebCit JavaScript function library.
+
 Revision 619.7  2005/06/20 20:38:50  ajc
 * The main stylesheet is now in a separate file in the static/ directory.
   Something we did recently must have fixed the caching problem, because it's
@@ -2631,4 +2636,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index 3e77abf0435352ad2d24517245f65f0a8a1473f8..7341a10325808d5120f1bf6e31fd7666f7b150df 100644 (file)
@@ -300,7 +300,7 @@ void do_iconbar(void) {
                "<li><div align=\"center\">"
                "<A HREF=\"/display_customize_iconbar\" "
                "TITLE=\"Customize this menu\" "
-               ">customize this menu</A>"
+               ">customize this menu"
                "</A></div></li>\n"
        );
 
index 5574cc6247a8aa762f08e4a5ca2746a29641f2de..93b8ea3261c3c84785e6e37a0065fee8e5f48c7c 100644 (file)
@@ -8,28 +8,6 @@
 <meta http-equiv="expired" content="28-May-1971 18:10:00 GMT" />
 <meta name="MSSmartTagsPreventParsing" content="TRUE" />
 <link href="/static/webcit.css" rel="stylesheet" type="text/css">
-
-<script language="JavaScript">
-
-var browserType;
-
-if (document.layers) {browserType = "nn4"}
-if (document.all) {browserType = "ie"}
-if (window.navigator.userAgent.toLowerCase().match("gecko")) {
-       browserType= "gecko"
-}
-
-function hide_page_popup() {
-       if (browserType == "gecko" )
-               document.poppedLayer = eval('document.getElementById(\'page_popup\')');
-       else if (browserType == "ie")
-               document.poppedLayer = eval('document.all[\'page_popup\']');
-       else
-               document.poppedLayer = eval('document.layers[\'`page_popup\']');
-document.poppedLayer.style.visibility = "hidden";
-}
-
-</script>
-
+<script type="text/javascript" src="static/wclib.js"></script>
 </head>
 <body>
diff --git a/webcit/static/menuExpandable3.js b/webcit/static/menuExpandable3.js
deleted file mode 100644 (file)
index d898aa6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * menuExpandable3.js - implements an expandable menu based on a HTML list
- * Author: Dave Lindquist (http://www.gazingus.org)
- */
-
-if (!document.getElementById)
-    document.getElementById = function() { return null; }
-
-function initializeMenu(menuId, actuatorId) {
-    var menu = document.getElementById(menuId);
-    var actuator = document.getElementById(actuatorId);
-
-    if (menu == null || actuator == null) return;
-
-    //if (window.opera) return; // I'm too tired
-
-    actuator.parentNode.style.backgroundImage = "url(/static/plus.gif)";
-    actuator.onclick = function() {
-        var display = menu.style.display;
-        this.parentNode.style.backgroundImage =
-            (display == "block") ? "url(/static/plus.gif)" : "url(/static/minus.gif)";
-        menu.style.display = (display == "block") ? "none" : "block";
-
-        return false;
-    }
-}
-
-
-
diff --git a/webcit/static/wclib.js b/webcit/static/wclib.js
new file mode 100644 (file)
index 0000000..b78b547
--- /dev/null
@@ -0,0 +1,29 @@
+//
+// $Id$
+//
+// JavaScript function library for WebCit
+//
+//
+
+
+//
+// This code handles the popups for instant messages.
+//
+
+var browserType;
+
+if (document.layers) {browserType = "nn4"}
+if (document.all) {browserType = "ie"}
+if (window.navigator.userAgent.toLowerCase().match("gecko")) {
+       browserType= "gecko"
+}
+
+function hide_page_popup() {
+       if (browserType == "gecko" )
+               document.poppedLayer = eval('document.getElementById(\'page_popup\')');
+       else if (browserType == "ie")
+               document.poppedLayer = eval('document.all[\'page_popup\']');
+       else
+               document.poppedLayer = eval('document.layers[\'`page_popup\']');
+document.poppedLayer.style.visibility = "hidden";
+}