Changeset 88684 in spip-zone


Ignore:
Timestamp:
Apr 20, 2015, 9:05:32 AM (5 years ago)
Author:
arno@…
Message:

Version 5.1: quand srcset ou sources, faire gérer par picturefill.js (en prévision de art direction)

Location:
_plugins_/image_responsive
Files:
4 added
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/image_responsive/image_responsive_fonctions.php

    r88654 r88684  
    1414        }
    1515       
    16         $flux .= "<script>htactif=$htactif;</script>";
     16        $flux .= "<script>htactif=$htactif;document.createElement('picture');</script>";
    1717        $flux .= "
    18 <script type='text/javascript' src='".find_in_path("jquery.smartresize.js")."'></script>
    19 <script type='text/javascript' src='".find_in_path("image_responsive.js")."'></script>
     18<script type='text/javascript' src='".find_in_path("javascript/jquery.smartresize.js")."'></script>
     19<script type='text/javascript' src='".find_in_path("javascript/image_responsive.js")."'></script>
     20<script type='text/javascript' src='".find_in_path("javascript/picturefill.js")."'></script>
    2021                ";
    2122       
     
    2526function image_responsive_header_prive($flux) {
    2627        $flux .= "\n<link rel='stylesheet' type='text/css' media='all' href='".find_in_path("image_responsive.css")."'>\n";
    27         $flux .= "<script>htactif=false;</script>";
     28        $flux .= "<script>htactif=false;document.createElement('picture');</script>";
    2829
    2930        $flux .= "
    30 <script type='text/javascript' src='".find_in_path("jquery.smartresize.js")."'></script>
    31 <script type='text/javascript' src='".find_in_path("image_responsive.js")."'></script>
     31<script type='text/javascript' src='".find_in_path("javascript/jquery.smartresize.js")."'></script>
     32<script type='text/javascript' src='".find_in_path("javascript/image_responsive.js")."'></script>
     33<script type='text/javascript' src='".find_in_path("javascript/picturefill.js")."'></script>
    3234                ";
    3335
     
    154156
    155157                // Gérer le srcset
     158                if ($sources || $srcset) $classe .= " avec_picturefill";
    156159
    157160                $img = inserer_attribut($img, "src", $src);
     
    162165                        $img = inserer_attribut($img, "srcset", $srcset);
    163166                }
    164                
    165167               
    166168               
  • _plugins_/image_responsive/paquet.xml

    r88654 r88684  
    22        prefix="image_responsive"
    33        categorie="outil"
    4         version="5.0.0"
     4        version="5.1.0"
    55        etat="stable"
    66        compatibilite="[3.0.0;3.1.*]"
     
    1212        <auteur>ARNO*</auteur>
    1313        <licence lien="http://www.gnu.org/licenses/gpl-2.0.html">GPL</licence>
     14        <licence lien="http://scottjehl.github.io/picturefill">Inclus PictureFill</licence>
    1415
    1516
Note: See TracChangeset for help on using the changeset viewer.