phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/templates/desktop navbar.tpl, 1.1.2.4 head.t


From: skwashd
Subject: [Phpgroupware-cvs] phpgwapi/templates/desktop navbar.tpl, 1.1.2.4 head.tpl, 1.1.2.4 head.inc.php, 1.1.2.3
Date: Sun, 27 Feb 2005 01:29:00 +0100

Update of phpgwapi/templates/desktop

Modified Files:
     Branch: Version-0_9_16-branch
            navbar.tpl lines: +1 -1
            head.tpl lines: +45 -10
            head.inc.php lines: +2 -2

Log Message:
IE and other little fixes

====================================================
Index: phpgwapi/templates/desktop/navbar.tpl
diff -u phpgwapi/templates/desktop/navbar.tpl:1.1.2.3 
phpgwapi/templates/desktop/navbar.tpl:1.1.2.4
--- phpgwapi/templates/desktop/navbar.tpl:1.1.2.3       Sat Feb 26 23:05:53 2005
+++ phpgwapi/templates/desktop/navbar.tpl       Sun Feb 27 00:29:59 2005
@@ -1,7 +1,7 @@
 <!-- BEGIN navbar -->
                <div id="header">
                        <div id="navbar">
-                               <ul>
+                               <ul id="navbar_ul">
                                        <li><img src="{img_base_url}logo.png" 
alt="phpGroupWare Logo" height="21" width="25" />{lang_applications}
                                                <ul>
                                                        <!-- BEGIN app_both -->

====================================================
Index: phpgwapi/templates/desktop/head.tpl
diff -u phpgwapi/templates/desktop/head.tpl:1.1.2.3 
phpgwapi/templates/desktop/head.tpl:1.1.2.4
--- phpgwapi/templates/desktop/head.tpl:1.1.2.3 Sat Feb 26 23:05:53 2005
+++ phpgwapi/templates/desktop/head.tpl Sun Feb 27 00:29:59 2005
@@ -16,33 +16,61 @@
                {java_script}
                <script>
                        //<![CDATA[
-                       //lifted from A List Apart 
http://www.alistapart.com/articles/dropdowns/ :)
-                       //Improved a little by Dave Hall
-                       window.onload = function()
+                       //Parts based public doman code from ALA - 
http://www.alistapart.com/articles/dropdowns/
+                       function fixIE()
                        {
                                if( document.all && document.getElementById )
                                {
-                                       navRoot = 
document.getElementById("#header");
-                                       for( i=0; i<navRoot.childNodes.length; 
i++ )
+                                       navRoot = 
document.getElementById('navbar_ul');
+                                       for( i=0; i < 
navRoot.childNodes.length; i++ )
                                        {
                                                node = navRoot.childNodes[i];
-                                               if( node.nodeName == "LI" )
+                                               if( node.nodeName == 'LI' )
                                                {
                                                        
node.onmouseover=function()
                                                        {
-                                                               this.className 
+= " over";
+                                                               this.className 
+= ' over';
                                                        }

                                                        
node.onmouseout=function()
                                                        {
-                                                               this.className 
= this.className.replace(" over", "");
+                                                               this.className 
= this.className.replace(' over', '');
+                                                       }
+                                                       if( 
node.childNodes.length )
+                                                       {
+                                                               for( j=0; j < 
node.childNodes.length; j++)
+                                                               {
+                                                                       subNode 
= node.childNodes[j];
+                                                                       if( 
subNode.nodeName == 'UL' )
+                                                                       {
+                                                                               
if( subNode.childNodes.length )
+                                                                               
{
+                                                                               
        for( k = 0; k < subNode.childNodes.length; k++)
+                                                                               
        {
+                                                                               
                if( subNode.childNodes[k].nodeName == 'LI' )
+                                                                               
                {
+                                                                               
                        subNode.childNodes[k].onmouseover=function()
+                                                                               
                        {
+                                                                               
                                this.className += ' over';
+                                                                               
                        }
+
+                                                                               
                        subNode.childNodes[k].onmouseout=function()
+                                                                               
                        {
+                                                                               
                                this.className = this.className.replace(' 
over', '');
+                                                                               
                        }
+
+                                                                               
                }
+                                                                               
        }
+                                                                               
}
+                                                                       }
+
+                                                               }
                                                        }
                                                }
                                        }
                                }
                        }
-                       //]]>
-
+
                        function updateClock()
                        {
                                var oDate = new Date();
@@ -54,6 +82,13 @@

                                setTimeout('updateClock()', 1000);
                        }
+
+                       function initPage()
+                       {
+                               fixIE();
+                               updateClock();
+                       }
+                       //]]>
                </script>
 </head>
 <body {body_tags}>

====================================================
Index: phpgwapi/templates/desktop/head.inc.php
diff -u phpgwapi/templates/desktop/head.inc.php:1.1.2.2 
phpgwapi/templates/desktop/head.inc.php:1.1.2.3
--- phpgwapi/templates/desktop/head.inc.php:1.1.2.2     Sat Feb 26 23:05:53 2005
+++ phpgwapi/templates/desktop/head.inc.php     Sun Feb 27 00:29:59 2005
@@ -31,7 +31,7 @@
        {
                $GLOBALS['phpgw']->js = createObject('phpgwapi.javascript');
        }
-       $GLOBALS['phpgw']->js->set_onload('updateClock();');
+       $GLOBALS['phpgw']->js->set_onload('initPage();');

        $var = Array (
                'img_icon'      => PHPGW_IMAGES_DIR . '/favicon.ico',






reply via email to

[Prev in Thread] Current Thread [Next in Thread]