Changeset 77076 in spip-zone


Ignore:
Timestamp:
Oct 8, 2013, 11:35:34 AM (6 years ago)
Author:
cedric@…
Message:

retablir les logos survol en responsive

Location:
_plugins_/z-core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/z-core/paquet.xml

    r77065 r77076  
    22        prefix="Zcore"
    33        categorie="outil"
    4         version="2.2.6"
     4        version="2.2.7"
    55        etat="stable"
    66        compatibilite="[3.0.0;3.0.*]"
  • _plugins_/z-core/zcore_options.php

    r77066 r77076  
    5858        $class = extraire_attribut($img,"class");
    5959
     60        $hover = "";
     61        if ($hover_on = extraire_attribut($img,"onmouseover")){
     62                $hover_off = extraire_attribut($img,"onmouseout");
     63                $hover_on = str_replace("this.src=","jQuery(this).css('background-image','url('+",$hover_on)."+')')";
     64                $hover_off = str_replace("this.src=","jQuery(this).css('background-image','url('+",$hover_off)."+')')";
     65                $hover = " onmouseover=\"$hover_on\" onmouseout=\"$hover_off\"";
     66        }
     67
    6068        $ratio = round($h*100/$w,2);
    61         return "<span class='$class' style=\"width:{$w}px;\"><span class=\"img\" style=\"display:block;position:relative;height:0;width:100%;padding-bottom:{$ratio}%;overflow:hidden;background:url($src) no-repeat center;background-size:100%;\"> </span></span>";
     69        return "<span class='$class' style=\"width:{$w}px;\"><span class=\"img\" style=\"display:block;position:relative;height:0;width:100%;padding-bottom:{$ratio}%;overflow:hidden;background:url($src) no-repeat center;background-size:100%;\"$hover> </span></span>";
    6270}
    6371
Note: See TracChangeset for help on using the changeset viewer.