Changeset 4757 in spip-zone


Ignore:
Timestamp:
Aug 20, 2006, 1:21:50 AM (13 years ago)
Author:
renatoformato@…
Message:

fixes menu buttons height problem on IE and Safari; the "triangles" works immediately.

Location:
_plugins_/_ze_laboratoire_/spiip
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/_ze_laboratoire_/spiip/img_pack/presentation.js

    r4743 r4757  
    88                //init couche images
    99                //console.time("couche");
    10                 $('img.swapCouche').click(jquerySwapCouche).css({display:'inline',cursor:'pointer'});
     10                //$('img.swapCouche').click(jquerySwapCouche).css({display:'inline',cursor:'pointer'});
    1111                //console.timeEnd("couche");
    1212                //init ajax links
     
    3131
    3232function decalerCouche() {
    33         this.decaler = true;
    3433        //make the submenu have a layout, center it and reset state
     34        var b = document.getElementById('bandeau-principal');
    3535        $('div.bandeau_sec',this).css({visibility:'visible',display:'block'}).each(function() {
    3636                if (bug_offsetwidth) {
     
    4141                       
    4242                        this.style.left = gauche+'px';
    43                         var b = document.getElementById('bandeau-principal');
    4443                        //-1 is the border of bandeau-principal
    4544                        this.style.top = b.offsetTop+b.offsetHeight+-1+'px';
    4645                }
    4746        }).css({visibility:'',display:''});
     47        //i love ff...
     48        if(jQuery.browser.msie)$('>:first-child',this).css('height',b.childNodes[0].offsetHeight+'px');
     49        if(jQuery.browser.safari)$('>:first-child',this).css('height',b.offsetHeight-6+'px');
    4850}
    4951
  • _plugins_/_ze_laboratoire_/spiip/inc/layer.php

    r4628 r4757  
    108108        global $spip_lang_rtl;
    109109        // ne rien afficher si js desactive
    110         /*
     110       
    111111        if ($_COOKIE['spip_accepte_ajax'] == -1)
    112112                return '';
    113 
     113        /*
    114114        $onclick = array();
    115115        foreach($couches as $i=>$couche)
     
    123123onclick="'.join(' ',$onclick).'" />';*/
    124124        return
    125         '<img class="swapCouche" id="triangle'.join($couches,'-').$spip_lang_rtl.'" src="'._DIR_IMG_PACK.$icone.'" alt="" title="'._T('info_deplier').'" style="display:none;border:none" height="10" width="10" />';
     125        '<img class="swapCouche" onclick="jquerySwapCouche.apply(this)" id="triangle'.join($couches,'-').$spip_lang_rtl.'" src="'._DIR_IMG_PACK.$icone.'" alt="" title="'._T('info_deplier').'" style="border:none;cursor:pointer" height="10" width="10" />';
    126126
    127127}
  • _plugins_/_ze_laboratoire_/spiip/inc/presentation.php

    r4743 r4757  
    21222122        "$('#bandeau-principal li.boutons_admin').hover(\n".
    21232123        "//init the position one submenu at a time and only once when hovering\n".
    2124         "       function(){if(!this.decaler)decalerCouche.apply(this);active_menu.hide();if(jQuery.browser.msie){\$('#bandeau_couleur select').css('visibility','hidden');$(this).addClass('sfhover')}},\n".
    2125         "       function(){active_menu.hide();if(jQuery.browser.msie){\$('#bandeau_couleur select').css('visibility','visible');$(this).removeClass('sfhover')}}\n".
    2126         ").\n".
    2127         "//bug safari does not fire onmouseover on li when applying hover style but on one of its children\n".
    2128         "mouseover(function(){active_menu.hide()});");
    2129        
     2124        "       function(){active_menu.hide();$(this).addClass('sfhover');if(jQuery.browser.msie)\$('#bandeau_couleur select').css('visibility','hidden')},\n".
     2125        "       function(){active_menu.hide();$(this).removeClass('sfhover');if(jQuery.browser.msie)\$('#bandeau_couleur select').css('visibility','visible')}\n".
     2126        ").onemouseover(decalerCouche).\n".
     2127        "//bug safari does not fire onmouseover on li but on one of its children when applying hover style so it breaks hover\n".
     2128        "mouseover(function(){active_menu.hide();})\n");
    21302129        //
    21312130        // Bandeau colore
Note: See TracChangeset for help on using the changeset viewer.