Changeset 17545


Ignore:
Timestamp:
Aug 11, 2012, 10:45:29 AM (12 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with 2.4, update

Location:
extensions/Autosize
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/autosize.inc.php

    r17503 r17545  
    7676 if(isset($page['body_id']) &&  $page['body_id'] == 'theAdminPage' ) return ;   
    7777    if (!isset($_COOKIE['autosize_reload'])){   
    78             $autoscript="<script type='text/javascript' src='themes/default/js/jquery.min.js'></script>                        <script type='text/javascript' src='plugins/autosize/js/autosizeDetect.js'></script>
     78            $autoscript="<script type='text/javascript' src='themes/default/js/jquery.min.js'></script>                        <script type='text/javascript' src='plugins/Autosize/js/autosizeDetect.js'></script>
    7979      <script type='text/javascript' src='plugins/Autosize/js/autosize.cookie.js'></script>
    8080      <body onload=on_load() style='background-color:black;color :white;font-size:30px '  > 
  • extensions/Autosize/js/Affiche_script.js

    r17538 r17545  
    172172        jQuery('#bp_cla span').text(zoom_cl + "% ");
    173173        color_back = jQuery('#imageToolBar').css("backgroundColor");
    174         if (color_back.match(new RegExp("rgb", "gi"))) {
    175           color_back = color_back.split("(")[1].split(")")[0].split(",");
    176           color_back = "rgb(" + Math.abs(255 - color_back[0]) + ","
     174        try {
     175          if (color_back.match(new RegExp("rgb", "gi"))) {
     176            color_back = color_back.split("(")[1].split(")")[0].split(",");
     177            color_back = "rgb(" + Math.abs(255 - color_back[0]) + ","
    177178                + Math.abs(255 - color_back[1]) + ","
    178179                + Math.abs(255 - color_back[2]) + ")";
    179         }
    180         else if (color_back.match(new RegExp("#", "gi")))
    181           color_back = Math.abs("#65536" - color_back);
    182         else
    183           color_back = jQuery('body').css("color");
    184         jQuery('#bp_cla span').css({ color: color_back, aling: "center" });
     180          }
     181          else if (color_back.match(new RegExp("#", "gi")))
     182            color_back = Math.abs("#65536" - color_back);
     183          else
     184            color_back = jQuery('body').css("color");
     185          jQuery('#bp_cla span').css({ color: color_back, aling: "center" });
     186        } catch (e) {
     187
     188        }
    185189        if (options.src_deriv) {
    186190          jQuery('.auto_details').text(" (" + Zone_image.image.width + " x " + Zone_image.image.height + ") " + options.src_deriv);
     
    317321
    318322        if (infos_imageComment.visible = true && infos_imageComment.general.bottom > infos_theMainImage.bottom) {
    319       h02 = infos_imageComment.general.bottom - infos_theMainImage.bottom;
     323          h02 = infos_imageComment.general.bottom - infos_theMainImage.bottom;
    320324        }
    321325        if (infos_Licence.visible = true && infos_Licence.general.bottom > infos_theMainImage.bottom) {
     
    326330        if (test_theme("simple")) {
    327331          options.marge_basse += info_comments1.general.height;
    328    
     332
    329333        } else {
    330334          options.marge_basse += Math.max(h01, h02);
    331335          if (test_theme("blanc , pure, hr_ ")) {
    332           options.marge_gauche += 10;
    333           options.marge_droite += 10;
    334               }
    335             }
    336         }
     336            options.marge_gauche += 10;
     337            options.marge_droite += 10;
     338          }
     339        }
     340      }
    337341      Zone_image = { image_init: {
    338342        width: infos_theMainImage.width,
     
    391395          infos_menubar = jQuery("#menubar").infos(true);
    392396          if (infos_menubar.visible == true) {
    393             jQuery(theImage_id).width(infos_window.width - infos_imageInfos.general.width - infos_menubar.general.width-20);
     397            jQuery(theImage_id).width(infos_window.width - infos_imageInfos.general.width - infos_menubar.general.width - 20);
    394398            infos_theImage = jQuery(theImage_id).infos(true);
    395399
     
    432436
    433437
    434       infos_llgbo = jQuery(llgbo_id).infos();
    435       infos_llgboh2 = jQuery("#llgboh2").infos();
     438      infos_llgbo = jQuery(llgbo_id).infos(true);
     439      infos_llgboh2 = jQuery("#llgboh2").infos(true);
    436440      marges_llgbo = 0;
    437441      //==========================================================================================
     
    15831587      + Math.ceil(infos_theMainImage.general.marges.height);
    15841588      retrait_img.height += 2;
    1585      
     1589
    15861590      //===============================================================
    15871591      retrait_img.width = Math.ceil(infos_theMainImage.general.marges.width); // borderwidth+padding
    15881592      retrait_img.width += Math.ceil(options.marges_llgbo || 0);
    15891593      retrait_img.width += 2;
    1590    
     1594
    15911595
    15921596      //================== Limite Format Image =====================
     
    18121816      options.marges_llgbo = 0;
    18131817      if (jQuery(llgbo_id).length > 0) {
    1814         infos_llgbo = jQuery(llgbo_id).infos();
     1818        infos_llgbo = jQuery(llgbo_id).infos(true);
    18151819        if (infos_llgbo.visible == true) {
    18161820          if (infos_llgbo.height > 0) {
     
    19501954    //_______________________ init_gen _______________________
    19511955
    1952   });                                                                                                                                                                                                                                       // ready
     1956  });                                                                                                                                                                                                                                        // ready
    19531957
    19541958
Note: See TracChangeset for help on using the changeset viewer.