Changeset 1290

Show
Ignore:
Timestamp:
09/10/07 16:09:35 (1 year ago)
Author:
benoitg
Message:
  • Fix #370: Dropdown Javascript menus didn't retract in Internet Explorer. My thanks to Robin Jones for at least proposing a solution to the problem, even if it didn't work in this case. The problem turned out to be a wrong regex in the IE workaround javascript.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wifidog-auth/CHANGELOG

    r1289 r1290  
    11# $Id$ 
     22007-09-10 Benoit GrĂ©goire  <bock@step.polymtl.ca> 
     3        * Fix #370:  Dropdown Javascript menus didn't retract in Internet Explorer.  My thanks to Robin Jones for at least proposing a solution to the problem, even if it didn't work in this case.  The problem turned out to be a wrong regex in the IE workaround javascript. 
     4         
    252007-09-09 Benoit GrĂ©goire  <bock@step.polymtl.ca> 
    36        * Early OpenID support.  The auth server can now be used as an identity provider, with your profile page as the identity URL 
  • trunk/wifidog-auth/wifidog/classes/MainUI.php

    r1256 r1290  
    559559            $menu = Menu::getObject(); 
    560560            $this->addContent('main_area_top', $menu->getUserUI()); 
     561                        $this->appendHtmlHeadContent(Menu::getIEWorkaroundJS()); 
    561562        } 
    562563 
  • trunk/wifidog-auth/wifidog/classes/Menu.php

    r1264 r1290  
    200200    } 
    201201 
    202     public function getUserUI() 
    203     { 
    204         $this->initMenu(); 
    205         $html = ''; 
    206         //Deal with internet explorer's baindeadness.  From http://www.htmldog.com/articles/suckerfish/dropdowns/example/vertical.html 
    207         $html .= <<<EOT 
     202    /** 
     203     * IE's braindeadness requires a javascript workaround to allow suckerfish menus to work. 
     204     * 
     205     * @return HTML markup 
     206     */ 
     207    static public function getIEWorkaroundJS() { 
     208                $html = <<<EOT 
    208209        <script type="text/javascript"><!--//--><![CDATA[//><!-- 
    209210 
     
    215216                } 
    216217                sfEls[i].onmouseout=function() { 
    217                         this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); 
     218                        //alert(this.className); 
     219                        this.className=this.className.replace(new RegExp(" sfhover"), ""); 
     220                        //alert(this.className); 
    218221                } 
    219222        } 
     
    223226//--><!]]></script> 
    224227EOT; 
     228return $html; 
     229    } 
     230    public function getUserUI() 
     231    { 
     232        $this->initMenu(); 
     233        $html = ''; 
     234        //Deal with internet explorer's baindeadness.  From http://www.htmldog.com/articles/suckerfish/dropdowns/example/vertical.html 
     235 
    225236$html .= "<ul id='nav'>\n"; 
    226237        $userData=null; 
  • trunk/wifidog-auth/wifidog/media/base_theme/stylesheet.css

    r1256 r1290  
    645645} 
    646646 
    647 /********** Content type section **********/ /* MainMenu */ 
    648 #nav,#nav ul { 
     647/********** Content type section **********/  
     648/* MainMenu */ 
     649 
     650 
     651#nav,#nav ul { /* all lists */ 
     652        padding: 0; 
     653        margin: 0 0 1em 0; 
     654        list-style: none; 
     655        line-height: 1; 
     656        /* WD specific */ 
    649657        float: left; 
    650658        width: auto; 
    651         list-style: none; 
    652         line-height: 1; 
    653659        background: white; 
    654660        font-weight: bold; 
    655         padding: 0; 
    656661        border: solid #d7d5d5; 
    657662        border-width: 1px 0; 
    658         margin: 0 0 1em 0; 
    659663        z-index: 99; 
    660664} 
    661665 
    662666#nav { 
     667        /* WD specific, this must be after the #nav,#nav ul, it will apply only to the top menu items */ 
    663668        background: none; 
    664669        margin: 0 0 0 0; 
     
    669674} 
    670675 
    671 #nav>li { 
     676#nav a { /* WD specific */ 
     677        display: block; 
     678        width: 10em; 
     679        w\idth: 6em; 
     680        text-decoration: none; 
     681        padding: 0.25em 2em; 
     682
     683 
     684#nav li { /* all list items */ 
     685        float: left; 
     686        width: 10em; /* width needed or else Opera goes nuts */ 
     687        /* WD specific */ 
     688        padding: 0; 
     689
     690 
     691#nav>li { /* WD specific */ 
    672692        border-left: 1px solid #d7d5d5; 
    673693        border-right: 1px solid #d7d5d5; 
    674                 border-bottom: 1px solid #d7d5d5; 
    675 
    676  
    677 #nav a { 
    678         display: block; 
    679         width: 10em; 
    680         w\idth: 6em; 
    681         /*color: #7C6240;*/ 
    682         text-decoration: none; 
    683         padding: 0.25em 2em; 
    684 
    685  
    686 #nav a.daddy { 
    687         background: url(rightarrow2.gif) center right no-repeat; 
    688 
    689  
    690 #nav li { 
    691         float: left; 
    692         padding: 0; 
    693         width: 10em; 
    694 
    695  
    696 #nav li ul { 
     694        border-bottom: 1px solid #d7d5d5; 
     695
     696 
     697#nav li li { /* WD specific */ 
     698        padding-right: 1em; 
     699        width: 13em 
     700
     701 
     702#nav li ul a { /* WD specific */ 
     703        width: 13em; 
     704        w\idth: 9em; 
     705
     706 
     707#nav li ul { /* second-level lists */ 
    697708        position: absolute; 
     709        width: 14.4em; 
    698710        left: -999em; 
     711        /* using left instead of display to hide menus because display: none isn't read by screen readers */ 
     712        /* WD specific */ 
    699713        height: auto; 
    700         width: 14.4em; 
    701714        w\idth: 13.9em; 
    702715        font-weight: normal; 
     
    705718} 
    706719 
    707 #nav li li { 
    708         padding-right: 1em; 
    709         width: 13em 
    710 
    711  
    712 #nav li ul a { 
    713         width: 13em; 
    714         w\idth: 9em; 
    715 
    716  
    717 #nav li ul ul { 
     720#nav li:hover ul { /* WD specific */ 
     721        left: auto; 
     722
     723 
     724#nav li ul ul { /* third-and-above-level lists */ 
    718725        margin: -1.75em 0 0 14em; 
    719726} 
     
    725732 
    726733#nav li:hover ul,#nav li li:hover ul,#nav li li li:hover ul,#nav li.sfhover ul,#nav li li.sfhover ul,#nav li li li.sfhover ul 
    727         { 
     734        { /* lists nested under hovered list items */ 
    728735        left: auto; 
    729736} 
    730737 
    731 #nav li:hover,#nav li.sfhover { 
     738#nav li:hover,#nav li.sfhover { /* WD specific */ 
    732739        background: #f5f5f5; 
    733740} 
     
    800807        z-index: 100; 
    801808        opacity: 0.90; 
    802         filter: alpha(opacity =   90); 
     809        filter: alpha(opacity =     90); 
    803810        -webkit-border-radius: 5px; 
    804811        -moz-border-radius: 5px; 
     
    13701377 
    13711378\html 
     1379 
    13721380  
     1381 
    13731382div 
     1383 
     1384 
    13741385.tableContainer 
     1386 
    13751387  
     1388 
    13761389table 
    1377   /* */ 
     1390 
     1391   /* */ 
    13781392{ 
    13791393margin 
     1394 
     1395 
    13801396: 
    1381   
    138213970 
    13831398-16 
    13841399px 
     1400 
    13851401  
     1402 
    138614030 
    138714040 
    13881405} 
    13891406\html 
     1407 
    13901408  
     1409 
    13911410div 
     1411 
     1412 
    13921413.tableContainer 
    1393   /* */ 
     1414 
     1415   /* */ 
    13941416{ 
    13951417padding 
     1418 
     1419 
    13961420: 
    1397   
    139814210 
    1399142216 
    14001423px 
     1424 
    14011425  
     1426 
    140214270 
    140314280;