Changeset 18325


Ignore:
Timestamp:
Sep 28, 2012, 11:13:50 AM (12 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with 2.4, add theme directive

Location:
extensions/Autosize
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/admin/template/admin.tpl

    r18234 r18325  
    102102
    103103<div class="titrePage">
    104                 <h2>{'Autosize'|translate} {'version'|translate} {$cl_version}</h2>
     104                <h2 class="cluetip" title="{'cl_autosize_help'|@translate}|{'cl_autosize_hlp_line6'|@translate}">{'Autosize'|translate} {'version'|translate} {$cl_version}  <img alt="(?)" src="admin/themes/clear/icon/help.png"/></h2>
    105105</div>
    106106
  • extensions/Autosize/admin/template/header.tpl

    r16931 r18325  
    44{combine_script id="conflit_script" path = $AUTOSIZE_PATH|@cat:"js/conflit.js" require="jquery"}
    55{combine_script id="dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"}
    6 
  • extensions/Autosize/autosize.inc.php

    r18234 r18325  
    3636  // header ('X-UA-Compatible: n=7')  ;
    3737 // header ('X-UA-Compatible: IE=Edge')  ;
    38  global  $template,$version,$icon_path,$page,$picture,$conf;
    39  
     38global  $template,$version,$icon_path,$page,$picture,$conf;
     39global $user,$Css,$css_slideshow,$css_display;
    4040  $current = $template->get_template_vars('current'); 
    41   $has_pamoorama=isset($template->files['pamooramics_content']);
     41//=======================================================
     42  $theme=$user['theme']; 
     43  $Css = autosize_controler::css($theme."-rules.css");
     44  $css_slideshow=isset($Css['.Autosize']['slideshow'])?$Css['.Autosize']['slideshow']:"yes";
     45 
     46  $css_display= isset($Css['.Autosize']['display'])?$Css['.Autosize']['display']:"block";   
     47
    4248//====================================================================   
    4349  $pictureDeriv = pwg_get_session_var('picture_deriv',$conf['derivative_default_size']);
     
    4551  $SRC_IMG="";
    4652//=====================================================================
     53
    4754if(!isset($_COOKIE['picture_deriv']))
    48     if(isset($current['derivatives']['Autosize']))
     55    if(isset($current['derivatives']['Autosize'])){
    4956        $_COOKIE['picture_deriv']="Autosize";
    50 
    51 if(isset( $_COOKIE['picture_deriv']))
     57        }
     58if(isset( $_COOKIE['picture_deriv'])) 
    5259  $model=  $_COOKIE['picture_deriv'] ;
    5360else
    5461  $model= $pictureDeriv ;
    5562
     63
     64 
     65 if (($css_display=="none" || $css_slideshow=="no") && ($model=="SelMaxi" || $model=="Autosize") ) {
     66   $model=$default_size ;
     67   $_COOKIE['picture_deriv'] =$model ;
     68}
     69
    5670 if(!isset($current['derivatives'][$model]))
    5771   $model=$default_size ;
    58 
     72 
    5973$selected_derivative =  $current['derivatives'][$model];
     74     /*
     75      'selected_derivative' => $selected_derivative,
     76      'unique_derivatives' => $unique_derivatives,
     77      */
    6078
    6179
     
    7896    $template->assign('current[selected_derivative]', $selected_derivative , true);
    7997    $current = $template->get_template_vars('current');
    80   }
    81 
     98  } 
    8299return $content;
     100
    83101
    84102}//INIT
     
    105123  $current = $template->get_template_vars('current');
    106124  if (!isset($current)) return ;
     125 
    107126//===============================================================
    108127    $derivative = $current['src_image'] ;
     
    168187if (!isset($_COOKIE['theMainImageWidth']))  setcookie('theMainImageWidth',$window_width);
    169188
    170 //
    171 
     189//================= Liste =========================
    172190    $last_defined=ImageStdParams::get_defined_type_map(); 
    173191    foreach ($img_all as $img_select){
     
    214232                }
    215233      }
    216 //==============================================================   
    217   //==== Réécriture selection ====
    218   if( $img_type=="SelMaxi"){
    219       $maxi_img= $mini_img;
    220       $maxi_url= $mini_img;
    221   }
    222   if ( !array_key_exists($maxi_img, $last_defined) ){
    223    
    224             $maxi_img = $last_img->get_type();   
    225             $maxi_url  = $last_img->get_url();
    226             $imgSizeWH  =  $last_img->get_size();       
    227  
    228   }
    229  $model= $maxi_img;
    230    
    231   /*  $_COOKIE['picture_deriv']=$maxi_img ;
    232     $_COOKIE['picture_map']=  $maxi_img ;
    233     $_COOKIE['imgSrc']=       $maxi_url;
    234    */
    235   if (isset($_COOKIE['picture_deriv'])){   
    236       if ( array_key_exists($_COOKIE['picture_deriv'], ImageStdParams::get_defined_type_map()) ){
    237    //         pwg_set_session_var('picture_deriv', $_COOKIE['picture_deriv']);
    238         }else{
    239      //       pwg_set_session_var('picture_deriv', $_COOKIE['picture_deriv']);
    240         }
    241   //  setcookie('picture_deriv', false, 0, cookie_path() );
    242   } 
    243 
    244  
     234
    245235return false ;
    246236
     
    258248    global  $has_pamoorama;
    259249    global $autosize_parametres,$user_status;
    260  
    261 
     250   
    262251    if(isset($page['body_id']) &&       $page['body_id'] == 'theAdminPage' ) return ;   
    263252
    264  if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
    265      if ('stripped' == $user['theme'] ) return ;
    266 
    267                 load_language('plugin.lang', AUTOSIZE_PATH);
     253  global $css_slideshow,$css_display;
    268254                $AUTOSIZE_PATH = dirname(__FILE__).'/';
     255   $theme=$user['theme']; 
     256
     257                load_language('plugin.lang', AUTOSIZE_PATH);
    269258                 if (isset( $page['body_id']) && $page['body_id']=='thePicturePage'  ) {
    270259                        if ( isset($picture['current'])){       
    271260                                include (AUTOSIZE_PATH."include/affiche.php");
    272 
    273261        $file =AUTOSIZE_PATH_ABS.'template/picture_1.tpl' ;
     262         if ($css_display=="none"  &&  $has_pamoorama) {   
     263            $css_display="block" ;
     264         }
    274265        $template->set_filenames(array('autosize_content_header'=> $file ));
    275         $template->assign(
    276                                         array( 
    277             'select_type' =>$select_type,
    278             ));
    279 
    280         $template->concat('autosize_content', $template->parse('autosize_content_header', true)); 
    281 
     266        $template->assign(      array( AUTOSIZE_PATH,$AUTOSIZE_PATH,
     267                                  'css_display' => $css_display,
     268                                  'select_type' =>$select_type,
     269                                  'theme' =>$theme
     270                          ));
     271        $template->concat('autosize_content', $template->parse('autosize_content_header', true));
     272     if ($css_display=="none" ) {       
     273        return ;
     274      } 
     275   
    282276        $file =AUTOSIZE_PATH_ABS.'template/header.tpl' ;
    283277        $template->set_filenames(array('autosize_init_header'=> $file ));
     
    308302        $template->set_filenames(array('mes_script' => realpath(AUTOSIZE_PATH).'/template/mes_scripts.tpl') );
    309303        $template->func_combine_script(array('id'=>'my_script_2',
    310         'path'=> AUTOSIZE_PATH.'/js/JScript.js',
    311         'require' => 'jquery'),
     304                                             'path'=> AUTOSIZE_PATH.'/js/JScript.js',
     305                                             'require' => 'jquery'),
    312306        $template->smarty);
    313307        $template->assign(array(
     
    330324 
    331325    $ma_page=isset($page['body_id'])?$page['body_id']:"" ;
    332     if ($ma_page=='thePiwiShackControllerPage') return ;   
    333     if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
    334     global  $has_pamoorama;
    335     $has_pamoorama=isset($template->files['pamooramics_content']);
    336   if (!$has_pamoorama) return ;
    337       if ('stripped' == $user['theme'] ) return ;
    338 
     326    if ($ma_page=='thePiwiShackControllerPage') return ; 
     327    global  $has_pamoorama,$css_slideshow; 
     328    $has_pamoorama = isset($template->files['pamooramics_content']); 
     329 if (!$has_pamoorama) return ;
     330
     331 if ($page['slideshow']){
     332    $current = $template->get_template_vars('current');
     333    $model=$current['selected_derivative']->type ;
     334    $selected_derivative =  $current['derivatives'][$model]; 
     335    $template->append('current', array(
     336                                'selected_derivative' => $selected_derivative
     337                                    ),
     338                      true);
     339
     340 }
    339341    $template->set_filenames(array('autosize_init'=>AUTOSIZE_PATH_ABS. "template/conflit.tpl" ) );
    340342    $autosize_parametres =       cl_autosize_Get_Options() ;                   
     
    356358          'AUTOSIZE_PATH' => str_replace("../","",AUTOSIZE_PATH)  ,
    357359          'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS,
    358           'Version_pwg' => PHPWG_VERSION           )
     360          'Version_pwg' => PHPWG_VERSION ,
     361          'slideshow' => $page['slideshow']
     362         )
    359363    );
     364   
    360365    return $template->parse( 'autosize_init', false);
     366
    361367        }// function cl_autosize_script_1
    362368
     
    367373 {
    368374           global  $template,$user,$conf,$picture ,$page, $cl_plugin,$known_script ;
    369                 global  $template,$user,$conf,$picture ,$page, $cl_plugin ;
    370             if(isset($page['body_id']) &&       $page['body_id'] == 'theAdminPage' ) return ;   
    371    
    372    if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
    373      global  $has_pamoorama;
    374        if (!$has_pamoorama) return ;
    375        if ('stripped' == $user['theme'] ) return ;
    376 
     375     global  $template,$user,$conf,$picture ,$page, $cl_plugin ;
     376     if(isset($page['body_id']) &&      $page['body_id'] == 'theAdminPage' ) return ;   
     377       global  $has_pamoorama;
     378  if (!$has_pamoorama) return ;
     379  global $css_slideshow;
     380 
     381 if ($css_slideshow="no" and isset($_GET['slideshow'])) return ;   
     382 
     383   
    377384                        $AUTOSIZE_PATH = dirname(__FILE__).'/';
    378385//================================================================
     
    590597    return $parametres ;
    591598  }
     599  /****************************************************/
     600 
     601function listeFichiers($dir,$theme){
     602  global $extensions_allowed;
     603  $extensions_allowed = array();
     604  $extensions_allowed [] = 'css';
     605  if ($handle = opendir($dir)) {   
     606    while (false !== ($file = readdir($handle))) {
     607      if (($file <>'.') && ($file<>'..')) {
     608        if (is_file($dir.'/'.$file)){
     609          $extension = pathinfo($dir.'/'.$file, PATHINFO_EXTENSION);
     610          if (in_array($extension,$extensions_allowed)){
     611            $fileHandle = fopen($dir.'/'.$file, "r");
     612           
     613            $intro = fread($fileHandle,filesize ($dir.'/'.$file));
     614            fclose($fileHandle);
     615            if ($file== $theme){       
     616              flush();   
     617              return $intro ;
     618            }
     619          }
     620      } else {
     621        if (is_dir($dir.'/'.$file)){
     622          listeFichiers($dir.'/'.$file,$theme);
     623        }
     624      }
     625    }
     626   }
     627   closedir($handle);
     628  }
     629}
     630//================================================
     631function css($theme_local) {   
     632    $path = $_SERVER['DOCUMENT_ROOT'];
     633    if (substr($path,-1)=='/'){
     634              $path =  substr($path,0,-1);
     635          }
     636     if(isset($_GET['path']))
     637              $path=$_GET['path'];
     638          else
     639              $path=PHPWG_ROOT_PATH."local/css/";
     640
     641              $mycssfile=$path.$theme_local;
     642
     643              if(!file_exists($mycssfile))
     644               $mycssfile=$path."default-rules.css";
     645
     646      $ret =   file_get_contents ($mycssfile);
     647
     648function remove_comments( & $string ) {
     649   $string = preg_replace('#/\*.*?\*/#s',"",$string);
     650   return $string;
     651 }
     652
     653$order   = array("\r\n", "\n", "\r"," ");
     654$replace = '';
     655$newstr = str_replace($order, $replace, $ret);
     656
     657$order   = array('"');
     658$replace = "'";
     659$newstr = str_replace($order, $replace, $newstr);
     660
     661
     662$order   = array("}");
     663$replace = '}\r\n';
     664$newstr = str_replace($order, $replace, $newstr);
     665remove_comments($newstr);
     666
     667$newstr = explode('\r\n',$newstr);
     668$css=Array();
     669   
     670  foreach ($newstr as $key => $value) {   
     671   if($value){
     672    $css2=Array();
     673      $key=explode("{",$value);   
     674      $value = str_replace("}","",$key[1]) ;
     675      $value=explode(";",$value);
     676           foreach ($value as $key2 => $value2) {   
     677            if($value2){
     678              $key2=explode(":",$value2);   
     679                $value2 =  $key2[1] ;
     680                $css2[$key2[0]] = $value2 ;
     681            }
     682           }
     683      $css[$key[0]]=$css2 ;
     684     }   
     685}
     686
     687       
     688                    return $css;
     689        }
     690//=================================================
     691
     692
    592693} // class
    593694
     
    718819  return $m;           
    719820}
    720    
     821
     822
    721823
    722824?>
  • extensions/Autosize/css/autosize.css

    r17538 r18325  
    1   #bp_img_cla,#icon_gmaps,#bp_cla{
    2 
     1#bp_img_cla,#icon_gmaps,#bp_cla{
    32  height:26px}
    43  .actionButtons{
    54  overflow:hidden;
    6   height:30px}
     5  height:30px
     6 }
    77
    8   #theImage img{
     8  #theImage {
     9  text-align:none
    910   }
    10 #theImage {
    11 
     11#theImage img{
     12 
     13 
     14 
    1215}
    1316body {
     
    2629
    2730}
    28 #mapPicture{
    29 top:40% ;
    30 
    31 }
    32 
    3331#imageHeaderBar {
    3432
     
    4745
    4846}
    49 #theImage {/*
    50 background-color: #DDE3E3;
    51 background-image: url('../images/quadrille_100.png');
    52 */
    53  /*height:auto;
    54    */
    55 }
    56 /*
    57 .imageComment{
    58  background-color: green;
    59 background-image: url('../images/quadrille_100.png');
    60   }
    61 .licencetag {
    62 background-color:blue;
    63 background-image: url('../images/quadrille_100.png');
    64 }
    6547
    66 #theMainImage {
    67 
    68 } */
    6948#imageInfos{
    7049overflow:hidden ;
  • extensions/Autosize/include/affiche.php

    r17503 r18325  
    6060            'select_type' =>$select_type,
    6161            'select_map' =>$select_type,
    62 
    6362            'pictureDeriv' =>$pictureDeriv ,
    64 
    6563            'maxi_img' =>$maxi_img ,
    66             'ratio' =>$img_scaled_width/$img_scaled_height ,         
    67 
    68 
     64            'ratio' =>$img_scaled_width/$img_scaled_height ,     
    6965            'webmaster_type' => array(
    7066                                            'OPTIONS' => $options,
  • extensions/Autosize/js/Affiche_script.js

    r18234 r18325  
    99
    1010  jQuery(document).ready(function (jQuery) {
    11 
    12 
    13 
    14 
    1511    var Type_Img;
    1612    var theImg;
     
    7167      } else if (jQuery("#Panorama").length) {
    7268        Type_Img = "panorama";
     69
    7370      } else if (jQuery("#pamoorama").length) {
    7471        Type_Img = "pamoorama";
     72        options.valide = true;
     73
    7574      } else if (jQuery("#map").length) {
    7675        Type_Img = "map";
     
    276275          infos_theMainImage = jQuery("#pamoorama").infos(true);
    277276          theMainImage_id = "#pamoorama";
     277          options.valide = true;
    278278
    279279        } else {
     
    311311
    312312      jQuery("#loading").show(0);
    313       zheight = infos_window.height - (infos_theImage.top);
     313      if (infos_theImage.top > infos_window.height) {
     314        zheight = infos_window.height - infos_content.top;
     315      } else {
     316        zheight = infos_window.height - (infos_theImage.top);
     317      }
    314318      h01 = 0;
    315319      h02 = 0;
     
    332336
    333337        } else {
    334           options.marge_basse += Math.max(h01, h02);
     338          if (test_theme("stripped")) {
     339
     340          } else
     341            options.marge_basse += Math.max(h01, h02);
     342
    335343          if (test_theme("blanc , pure, hr_ ")) {
    336344            options.marge_gauche += 10;
     
    363371        jQuery(theImage_id).width(Zone_image.container.width);
    364372        jQuery(theImage_id).height(Zone_image.container.height);
     373
    365374      }
    366375
     
    369378      ***********************************************************/
    370379      jQuery(window).resize(function (event, ui) {
     380        if (!options.valide) {
     381          jQuery("#loading").hide(fade_in);
     382          return true;
     383        }
     384
    371385        infos_window = jQuery(window).infos();
    372386        infos_imageInfos = jQuery("#imageInfos").infos(true);
    373387        old_w = infos_theImage.width;
    374388        infos_theImage = jQuery(theImage_id).infos(true);
    375         if (options.set_sw) {
    376           if (Type_Img == "pamoorama") {
    377             if (options.set_sw == "menuSwitcher") {
    378 
    379             } else {
    380               p_width = jQuery(theImage_id).width();
    381             }
    382             if (infos_imageInfos.visible)
    383               p_width = infos_window.width - infos_theImage.left - infos_imageInfos.width - 20;
    384             else
    385               p_width = infos_window.width - infos_theImage.left - 20;
    386             jQuery(theImage_id).width(p_width);
    387             infos_theImage = jQuery(theImage_id).infos(true);
    388 
    389 
    390           }
    391         }
    392 
    393389        if (test_theme("simple")) {
    394390          jQuery(theMainImage_id).css({ maxWidth: "none" });
     
    421417
    422418        jQuery(theImage_id).height(Zone_image.container.height + 2);
    423 
    424 
    425 
    426 
    427         if (DEBUG_autosize == "no") return;
    428 
    429         Autosize_resize(true, options);
     419        if (options.valide && DEBUG_autosize != "no") {
     420
     421          Autosize_resize(true, options);
     422        }
    430423        jQuery("#loading").hide(fade_in);
    431424      });
     
    443436      marges_llgbo = 0;
    444437      //==========================================================================================
    445 
    446       init_gen();
    447       jQuery(window).resize();
    448       jQuery(window).resize();
    449 
     438      if (options.valide) {
     439
     440        init_gen();
     441        jQuery(window).resize();
     442        jQuery(window).resize();
     443
     444      }
     445      jQuery("#loading").hide(fade_in);
    450446    });
    451447    //__________________window.onload_________________
     
    509505    }
    510506
    511     jQuery("#form_autosize_picture").addClass("Autosize_margin");
     507    jQuery("#form_autosize_picture").addClass("Autosize");
    512508    //===== marges suplémentaires en fonction theme ===
    513     options.valide = jQuery(".Autosize_margin").css("display");
    514     options.marge_haute = jQuery(".Autosize_margin").Get_Val_int(jQuery(".Autosize_margin").css("top"));
    515     options.marge_basse = jQuery(".Autosize_margin").Get_Val_int(jQuery(".Autosize_margin").css("bottom"));
    516     options.marge_gauche = jQuery(".Autosize_margin").Get_Val_int(jQuery(".Autosize_margin").css("left"));
    517     options.marge_droite = jQuery(".Autosize_margin").Get_Val_int(jQuery(".Autosize_margin").css("right"));
     509    options.valide = jQuery(".Autosize").css("display") != "none";
     510
     511    options.marge_haute = jQuery(".Autosize").Get_Val_int(jQuery(".Autosize").css("top"));
     512    options.marge_basse = jQuery(".Autosize").Get_Val_int(jQuery(".Autosize").css("bottom"));
     513    options.marge_gauche = jQuery(".Autosize").Get_Val_int(jQuery(".Autosize").css("left"));
     514    options.marge_droite = jQuery(".Autosize").Get_Val_int(jQuery(".Autosize").css("right"));
    518515    fade_in = options.fade_in || 0;
    519516    imageComment_id = ".imageComment";
     
    558555        pictureDeriv_maxi = pictureDeriv;
    559556    }
    560 
     557    if (!options.valide) {
     558
     559      pictureDeriv = "medium";
     560      pictureDeriv_maxi = pictureDeriv;
     561      cookies.pictureDeriv = pictureDeriv;
     562      jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
     563      jQuery('#derivativeChecked' + options.pictureDeriv).css('visibility', 'visible');
     564      jQuery('#derivativeCheckedSelMaxi').hide();
     565      jQuery('#derivativeCheckedSelMaxi').next().hide();
     566      jQuery('#derivativeCheckedSelMaxi').next().next().hide();
     567      jQuery('#derivativeCheckedAutosize').hide();
     568      jQuery('#derivativeCheckedAutosize').next().hide();
     569      jQuery('#derivativeCheckedAutosize').next().next().hide();
     570    }
    561571
    562572    if (DEBUG_autosize == "no") return;
     
    882892    ***************************/
    883893    Autosize_resize = function (force, parametres) {
     894      sav_container = Zone_image.container;
    884895      if (Get_dimensions(force, parametres)) {
    885896        jQuery(theImageAndInfos_id).css({ height: "auto" });
     897        jQuery(theMainImage_id).removeAttr("width");
     898        jQuery(theMainImage_id).removeAttr("height");
     899
    886900        if (Type_Img == "pamoorama") {
    887           Set_Pamoorama({ width: Zone_image.container.width, height: Zone_image.image.height });
     901          Set_Pamoorama({ width: Zone_image.container.width, height: Zone_image.container.height });
    888902          if (nopano)
    889903            if (window.myPamoorama.options.autoscrollOnLoad) {
    890904              window.myPamoorama.startAnimRight();
    891905            }
    892         } else {
    893 
    894           jQuery(theMainImage_id).height(Zone_image.image.height);
     906          } else {
     907
     908          if (!options.slideshow) { jQuery(theMainImage_id).height(Zone_image.image.height); };
    895909          jQuery(theMainImage_id).width(Zone_image.image.width);
    896 
    897           if (test_theme("xxxxxxx")) {
    898             jQuery(theImage_id).css({ height: "auto" });
    899             jQuery(theImage_id).height(Zone_image.image.height + Zone_image.marges.height);
    900             jQuery(theImage_id).width(Zone_image.image.width + Zone_image.marges.width);
    901 
    902           }
     910         
     911
    903912        }
    904913
     
    906915        set_cl(true);
    907916      } else {
    908         //   jQuery(theImage_id).height(Zone_image.image.height + Zone_image.marges.height);
     917
    909918        Set_Pamoorama({ width: Zone_image.container.width, height: Zone_image.image.height });
    910919        set_cl(false);
     
    13561365
    13571366        if (options.select_type != "SelMaxi" && options.select_type != "Autosize") {
    1358          
    1359            IMg = Get_Maxi(Zone_image.image_init);
     1367
     1368          IMg = Get_Maxi(Zone_image.image_init);
    13601369        } else {
    13611370          IMg = Get_Maxi(Zone_image.image);
     
    14811490
    14821491        //---------- test largeur image
    1483         new_width = Format.width;
     1492        new_width = Format.width - (options.marge_right + options.marge_left);
    14841493
    14851494        if (new_width > new_image.width) {
     
    17151724
    17161725      if (options.imageAutosize) {
    1717         return; //stripped
     1726        return true; //stripped
    17181727      }
    17191728
     
    19922001    //_______________________ init_gen _______________________
    19932002
    1994   });                                                                                                                                                                                                                                                      // ready
     2003  });                                                                                                                                                                                                                                                                         // ready
    19952004
    19962005
  • extensions/Autosize/language/fr_FR/plugin.lang.php

    r18234 r18325  
    11<?php
    22global $lang;
     3
     4$lang['cl_autosize_help'] = "Aide.";
     5$lang['cl_autosize_hlp_line6'] = "Utilisation de la classe '.Autosize' pour modifier les directives de Autosize  en fonction du thème.<br />
     6Editez le CSS(LocalFileEditor) du theme voulu.<br />
     7Ajout de marges suplémentaires: <br/>
     8<span style='color:#80a080;'> .Autosize{left:0px;right:0px;bottom:0px;top:0px} </span>
     9<br/>
     10Interdire la fonction Autosize:<br />
     11<span style='color:#80a080;'> .Autosize{display:none} </span><br />
     12Interdire la fonction Autosize lors du diaporama:<br />
     13<span style='color:#80a080;'> .Autosize{slideshow:no} </span>
     14";
     15
    316$lang['cl_autosize_info_1'] = "Affichage auto.";
    417
     
    3750 
    3851$lang['cl_autosize_marge_basse'] = "Marges.";
    39 $lang['cl_autosize_hlp_line5'] = "Utiliser la classe<br/><span style='color:#80a080;'> .Autosize_margin{left:0px;right:0px;bottom:0px;top:0px} </span>en éditant le CSS(LocalFileEditor) du theme voulu";
     52$lang['cl_autosize_hlp_line5'] = "Pour ajouter des marges suplmentaires utiliser la classe<br/><span style='color:#80a080;'> .Autosize{left:0px;right:0px;bottom:0px;top:0px} </span>en éditant le CSS(LocalFileEditor) du theme voulu
     53
     54";
    4055
    4156$lang['cl_autosize_save'] = "Sauvegarde";
  • extensions/Autosize/template/autosize.tpl

    r17503 r18325  
    33 <script type="text/javascript">
    44var  Autosize_options={ldelim}
     5        slideshow: '{$slideshow}',
    56        select_type:'{$select_type}',
    67        maxi_img:'{$maxi_img}',       
     
    1617     scaled_width :  '{$SCALED_WIDTH}', // valeur par defaut
    1718     scaled_height : '{$SCALED_HEIGHT}', // valeur par defaut
    18 ratio:'{$IMG_WIDTH/$IMG_HEIGHT }' ,
     19      ratio:'{$IMG_WIDTH/$IMG_HEIGHT }' ,
    1920     img_width:'{$IMG_WIDTH }',
    2021     img_height : '{ $IMG_HEIGHT }',
     
    6364         Autosize_options.Size.push( {ldelim}'{$value}':{$cl_size}}  )       
    6465        {/foreach}
    65      {/if}
    66    
    67 
     66     {/if}   
    6867 </script>
    69 
    7068<link href="{$AUTOSIZE_PATH}css/autosize.css" rel="stylesheet" type="text/css" />
    71  <!--  << autosize/template/autosize.tpl   -->
    72 
    73 <script type="text/javascript">
    74        var visible = '{$visible}';
    75    </script>
    76    
    77     {/html_head}
     69<script type="text/javascript"> var visible = '{$visible}'; </script>   
     70{/html_head}
    7871{if $DEBUG_autosize == "true"}
    7972  {assign var="visible" value="block"}
    8073<!---  autosize/template/autosize.tpl  body --->
    8174<style type="text/css">
    82     {literal}
     75 {literal}
    8376.debug {
    8477    display: inline-block;
     
    8881    margin: 2px;
    8982}
    90 
    9183.debugOn {
    9284    background-color: yellow;
    9385    border: solid 1px black;
    9486}
    95 
    96 .jssource {font-size:.8em;color:#000; }
    97 pre {font-size:.9em;background-color:#ffc;overflow-x:auto; padding: 5px;}
    98 pre em {color:#009;}
    99 pre b {color:#900;}
    100 pre strong {color:#099;}
    101 pre i,
    102 pre i *{color:#090;}
    103 
    10487</style>
    10588<div id="Debug0"  ></div>
     
    11093<div id="Debug5" ></div>
    11194 <div id="Debug6"  align=center style="display:none"></div>
    112 
    113 
    11495<div id="debugsContainer"><button id="adddebugs"  style="display:none">Add a debug</button>
    11596<div class="debug"></div>
     
    119100  {assign var="visible" value="none"}
    120101  {/if}
    121 
    122 
    123102  <!--  << autosize/template/autosize.tpl body  -->
    124 
    125 
    126103<div style="display:none">
    127104<form action='' method='post' name='form_autosize_picture' id='form_autosize_picture'  type='submit'  >
     
    133110<input id='zoom'  name='zoom' type='hidden' value='' />
    134111</form ></div>
    135 
    136112<img id='loading' src='{$AUTOSIZE_PATH}images/loading.gif' style='position:absolute;left:50%;top:50%;z-index:10; display:none' />
  • extensions/Autosize/template/picture_1.tpl

    r17503 r18325  
    1 
    2 {if $select_type=="Autosize" || $select_type=="Selmaxi" }{/if}
     1{html_head}
     2{combine_css path=`$AUTOSIZE_PATH`css/`$theme`.css"  order=10 }
     3{/html_head}
     4{if $css_display=="none" }
     5    {footer_script require='jquery'}{literal}
     6         jQuery('#derivativeCheckedSelMaxi').hide();
     7          jQuery('#derivativeCheckedSelMaxi').next().hide();
     8          jQuery('#derivativeCheckedSelMaxi').next().next().hide();
     9          jQuery('#derivativeCheckedAutosize').hide();
     10          jQuery('#derivativeCheckedAutosize').next().hide();
     11          jQuery('#derivativeCheckedAutosize').next().next().hide();
     12    {/literal}{/footer_script}
     13{else }
    314{combine_script id="Affiche_script" path= $AUTOSIZE_PATH|@cat:"js/Affiche_script.js" require='jquery,autosize.dimensions'  }
    4 
    5 
    615{if $theme != "elegant"}
    716{combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery"  }{/if}
    817{combine_script id="autosize.dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"}
     18{/if}
Note: See TracChangeset for help on using the changeset viewer.