Changeset 11912


Ignore:
Timestamp:
Aug 5, 2011, 5:52:44 PM (13 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with click hd

Location:
extensions/Autosize
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/css/autosize.css

    r11442 r11912  
    2828 
    2929}
    30 #the_page{ margin-top:-4px;
    31  
    32    position:static ;
     30#the_page {
     31  margin-top: -4px;position:static ;
    3332 
    3433}
  • extensions/Autosize/js/Affiche_script.js

    r11442 r11912  
    407407
    408408           jQuery(Parent).width(winwidth);
    409            jQuery(Parent).height(winheight);
     409           //  jQuery(Parent).height(winheight);
    410410
    411411           var Cadre = jQuery(Parent).get(0);
     
    725725
    726726           h = (Zone_Affichage.padding.bottom + Zone_Affichage.padding.top + Zone_Affichage.margin.top + Zone_Affichage.margin.bottom);
    727            if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top;
     727
     728           if (typeof Bandeau_t != "undefined") Bandeau = Bandeau_t.img_top|0;
    728729           Zone_Affichage.height = winheight - Bandeau - Marge_Basse - correction - h;
    729730           //=========================================================================
     
    734735           //=========================================================================
    735736           if (typeof (Bandeau_bas) != "undefined") {           
    736              Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top + Bandeau_bas.marge.bottom);
     737              Zone_Affichage.height -= (Bandeau_bas.height + Bandeau_bas.marge.top|0 + Bandeau_bas.marge.bottom|0);
    737738                        } else {
    738739           }
     
    11561157           } else {
    11571158             if (pos_copyright.top > 100) {
    1158                jQuery("#the_page").height(pos_copyright.top);
     1159               // jQuery("#the_page").height(pos_copyright.top);
    11591160             }
    11601161           }
  • extensions/Autosize/js/JScript.js

    r11442 r11912  
    11jQuery(document).ready(
    22function (jQuery) {
    3   stb = jQuery('#scrolltobottom');
    4   stt = jQuery('#scrolltotop');
    5   stt.css('opacity', 1 )
     3  var stt = jQuery('#scrolltobottom');
     4  var stb = jQuery('#scrolltotop');
     5
     6
     7  stt.css('opacity', 1);
     8  var scrollBottom = 0;
     9
    610  //===================================================================                 
    7   jQuery(window).resize(function (event, ui) {
     11  jQuery(window).load(function (event, ui) {
    812    if (typeof (event) == 'undefined') return;
    9     scrollBottom = jQuery(window).scrollTop();
    10   });
     13    scrollBottom = jQuery(window).scrollTop(0);
     14    var v_max = jQuery("#the_page").height();
    1115  //===================================================================                 
    1216  jQuery(window).scroll(function () {
    13     if (scrollBottom < 500) {
    14       if (stt.css('opacity') > 0) {
    15         stt.stop().fadeTo(1000, 0);
    16         stt.css("display", "none");
     17      scrollBottom = jQuery(window).scrollTop();
     18      v_max = jQuery("#the_page").height() - jQuery(window).height();
     19      if (scrollBottom > 100) {
     20        if (stt.css('opacity') == 0) {
     21          stt.stop().fadeTo(1000, 1);
     22        }
     23      }
     24      if (scrollBottom > v_max - 100) {
     25        if (stb.css('opacity') == 0) {
     26          stb.stop().fadeTo(1000, 1);
     27        }
     28    }
     29      return;
     30
     31      if (scrollBottom < v_max) {
     32        if (stb.css('opacity') > 0) {
     33          stb.stop().fadeTo(1000, 0);
     34          stb.css("display", "none");
     35        }
    1736      } else {
     37      if (stb.css('opacity') == 0) {
     38        stb.stop().fadeTo(1000, 1);
     39        stb.css("display", "block");
     40        }
     41      }
     42
     43      //=========================================
     44      if (scrollBottom < v_max) {
    1845        if (stt.css('opacity') == 0) {
    1946          stt.stop().fadeTo(1000, 1);
    2047          stt.css("display", "block");
    21         }
    22       }
    23     }
    24 
    25     if (scrollBottom < 500) {
    26       if (stb.css('opacity') == 0) {
    27         stb.stop().fadeTo(1000, 1);
    28         stb.css("display", "block");
    29 
    3048      }
    3149    } else {
    32       if (stb.css('opacity') > 0) {
    33         stb.stop().fadeTo(1000, 0);
    34         stb.css("display", "none");
     50        if (stt.css('opacity') > 0) {
     51          stt.stop().fadeTo(1000, 0);
     52          stt.css("display", "none");
    3553
    3654      }
     
    3856
    3957  });
     58  });
    4059
    4160  jQuery('#scrolltobottom a').click(function () {
    42     pos = jQuery('body').outerHeight();
     61    pos = jQuery('#the_page').outerHeight();
    4362    jQuery('html, body').animate({
    4463      scrollTop: pos + 'px'
    4564    }, 1000, function () {
    46       scrollBottom = jQuery(window).scrollTop();
    47       if (stb.css('opacity') > 0) {
    48         stb.stop().fadeTo(1000, 0);
    49         stb.css("display", "none");
    50         stt.stop().fadeTo(1000, 1);
    51         stt.css("display", "block");
    52       }
     65
     66      stt.stop().fadeTo(1000, 0);
     67      stb.stop().fadeTo(1000, 1);
     68
    5369    });
    5470  });
     
    6076      scrollTop: pos + 'px'
    6177    }, 1000, function () {
    62       st = false;
    63      // scrollBottom = jQuery(window).scrollTop();
    64       if (stb.css('opacity') > 0) {
    65         stt.stop().fadeTo(1000, 0);
    66         stt.css("display", "none");
    67         stb.stop().fadeTo(1000, 1);
    68         stb.css("display", "block");
    69       }
    70       scrollBottom = jQuery(window).scrollTop();
     78      stb.stop().fadeTo(1000, 0);
     79      stt.stop().fadeTo(1000, 1);
    7180    });
    7281  });
     
    7584  function gotoPos(pos) {
    7685    jQuery('html, body').animate({ scrollTop: jQuery('body').outerHeight() + 'px' },
    77      600, function () {
    78 
     86     0, function () {
     87       scrollBottom = jQuery(window).scrollTop();
    7988
    8089     });
     
    8493  }
    8594  //===================================================================   
    86   jQuery(window).resize();
     95  // jQuery(window).resize();
    8796  jQuery(window).scroll();
    8897
  • extensions/Autosize/template/mes_scripts.tpl

    r11442 r11912  
    2828 {/literal} 
    2929{/html_head}
    30 <div id="scrolltobottom"><a title="Revenir en bas de la page" href="#"></a></div>
     30<div id="scrolltobottom"><a title="Aller en bas de la page" href="#"></a></div>
    3131<div id="scrolltotop" ><a title="Revenir en haut de la page" href="#"></a></div>
    3232{literal}
Note: See TracChangeset for help on using the changeset viewer.