Changeset 7736


Ignore:
Timestamp:
Nov 10, 2010, 9:36:16 AM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] fix bugs.

Location:
extensions/Autosize/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/js/Affiche_script.js

    r7726 r7736  
    1818}
    1919//=================================================================================================
     20
     21function wait_Timer() {
     22
     23    jQuery(window).resize();
     24
     25}
    2026
    2127jQuery(document).ready(
     
    4955
    5056
    51              function wait_Timer() {
    52 
    53                  Resize();
    54 
    55              }
    5657             //=============================================================
    5758             function cl_Timer() {
     
    347348                   myevent.type = namespaces.shift();
    348349                   if (typeof (init_resize) == "undefined") init_resize = false;
    349                  
    350                        new_window = jQuery(window).infos();
    351                        init_resize = (new_window.width == old_window.width);
    352                        if (init_resize == false) {
    353                            init_resize = Resize();
    354                        }
    355                        init_resize = (new_window.height == old_window.height)
    356                        if ( init_resize  ==  false )
     350
     351                   new_window = jQuery(window).infos();
     352                   init_resize = (new_window.width == old_window.width);
     353                   if (init_resize == false) {
     354                       init_resize = Resize();
     355                   }
     356                   init_resize = (new_window.height == old_window.height)
     357                   if (init_resize == false)
    357358                       init_resize = Resize(); ;
    358        
     359
    359360
    360361
     
    364365             function Resize(Force) {
    365366
    366                  if (!cl_visible == true) return;
    367                  if (Force)
    368                      old_window = { width: 0, height: 0 };
    369 
    370 
    371                  if (chk == "") return;
     367                 if (!cl_visible == true) return true;
     368                 if (chk == "") return true;
    372369                 //=================================================================
    373370                 //var retour = (getStackTrace());
     
    584581                     case "pamoorama":
    585582                         //=========================================================
    586                          if (typeof (myPamoorama) == "undefined") return
    587                          if (typeof (myPamoorama.skipInit) == "undefined") return
    588                          if (myPamoorama.skipInit == false) return
     583                         if (typeof (myPamoorama) == "undefined") return false;
     584                         if (typeof (myPamoorama.skipInit) == "undefined") return false;
     585                         if (myPamoorama.skipInit == false) {
     586                             setTimeout("wait_Timer()",300);
     587                             return false;
     588                         }
    589589                         //=========================================================
    590590                         img_reelle.height = myPamoorama.imageHeight;
     
    927927                     new_width = Zone_Affichage.width - marge_right - marge_left;
    928928                     new_width -= 4;
    929                      jQuery("#pamoorama").css({ marginLeft: "auto",
     929                     myPamoorama.options.width = new_width;
     930                     info_theImage.height = img_reelle.height + info_pamoorama_footer.height
     931                     //====================================================
     932                     jQuery("#pamoorama").css({
     933                         marginLeft: "auto",
    930934                         marginRight: "auto",
    931 
    932                          height: Image_height + info_pamoorama_footer.height + "px",
     935                         height: info_theImage.height + "px",
    933936                         width: new_width + "px"
    934937                     });
    935 
    936                      myPamoorama.options.width = new_width;
    937938                     jQuery("#pamoorama").width(new_width);
    938                      jQuery(Cadre).height(img_height);
    939                      jQuery("#pamoorama").height(img_height);
    940 
    941 
     939                     //====================================================
    942940                     jQuery("#pamoorama_outter").css({
    943941                         left: marge_left + "px",
     
    946944                     });
    947945                     jQuery("#pamoorama_outter").width(new_width);
    948                      h = info_theImage.height;
    949                      jQuery("#pamoorama").css({ height: h + "px" });
    950 
     946                     //====================================================
    951947                     jQuery("#pamoorama_footer").width(new_width);
    952948                     jQuery("#pamoorama_footer").css('width', new_width + "px");
     949                     //====================================================
     950
     951                    //myPamoorama.continueInit();
     952                     //myPamoorama.skipInit = false;
    953953
    954954                     jQuery("#linkNext").css({ width: "200px", overflow: "hidden" });
     
    975975                 }
    976976
    977                  /*
    978                  jQuery("#Debug1").css({
    979                  position: "absolute",
    980                  top: Bandeau + "px",
    981                  textAlign: align_auto,
    982                  margin: "0px auto",
    983 
    984 
    985                  border: "solid 1px red",
    986 
    987                  width: Image_width + "px",
    988                  height: Image_height + "px"
    989 
    990                  });
    991                  //===================================================
    992                  jQuery("#Debug2").css({ position: "absolute",
    993                  left: Zone_Affichage.left + 'px',
    994                  border: "solid 1px green",
    995                  top: Zone_Affichage.top + "px",
    996                  width: Zone_Affichage.width / 2 + "px",
    997                  height: Zone_Affichage.height + "px"
    998 
    999                  });
    1000                  jQuery("#Debug2").text(info_Cadre.bottom);
    1001                  */
     977                 if (DEBUG == "true") {
     978
     979                     jQuery("#Debug1").css({
     980                         position: "absolute",
     981                         top: Bandeau + "px",
     982                         textAlign: align_auto,
     983                         margin: "0px auto",
     984
     985
     986                         border: "solid 1px red",
     987
     988                         width: Image_width + "px",
     989                         height: Image_height + "px"
     990
     991                     });
     992                     jQuery("#Debug1").text("info_theImage.height : " + info_theImage.height);
     993                     //===================================================
     994                     jQuery("#Debug2").css({ position: "absolute",
     995                         left: Zone_Affichage.left + 'px',
     996                         border: "solid 1px green",
     997                         top: Zone_Affichage.top + "px",
     998                         width: Zone_Affichage.width / 2 + "px",
     999                         height: Zone_Affichage.height + "px"
     1000
     1001                     });
     1002                     jQuery("#Debug2").text("info_Cadre.height : " + info_Cadre.height);
     1003                 }
    10021004                 jQuery("#navThumbPrev").css({ overflow: "hidden"
    10031005                 });
     
    11261128
    11271129     } // function
    1128 );                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       // ready
     1130);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             // ready
    11291131    /*
    11301132*
  • extensions/Autosize/js/conflit.js

    r7726 r7736  
    2121if (retour.match(RegExp("jQuery", "gi"))) {
    2222        ret_element = jQuery(element);
     23    } else if (retour.match(RegExp("GMaps", "gi"))) {
     24        ret_element = jQuery(element);
    2325    } else if (retour.match(RegExp("pamooramics", "gi"))) {
    2426    ret_element = jQuery().$Pamoorama(element);
     
    2729} else if (retour.match(RegExp("rv_gmaps", "gi"))) {
    2830        ret_element = jQuery().$Prototype(element);
    29 }else if (retour.match(RegExp("GMaps", "gi"))) {
    30         ret_element = jQuery(element);
    3131}else if (retour.match(RegExp("jQuery", "gi"))) {
    3232        ret_element = jQuery(element);
     
    3636    return ret_element;
    3737
    38 if (DEBUG==true)
     38if (DEBUG=="true")
    3939    alert(retour);
    4040                       return jQuery(element);
     
    9191
    9292jQuery.fn.extend({
    93 //---------------- luciano -------------------------------
    94 $Luciano: function (el, nc) {
    95 return document.id(el, nc, this.document);
    96 },
    97 //=============== PaMOOramics ===========================
    98 
    99 $Pamoorama: function (B) {
    100 if (!B) {
    101 if (typeof (B) == "boolean") return null;
    102 return jQuery();
    103 }
    104 if (B.htmlElement) {
    105 return Garbage.collect(B);
    106 
    107 }
    108 if ([window, document].contains(B)) { return B; }
    109 var A = $type(B);
    110 if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
    111 if (A != "element") {
    112 return null;
    113 }
    114 if (B.htmlElement) { return Garbage.collect(B); }
    115 if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
    116 $extend(B, Element.prototype);
    117 B.htmlElement = function () { };
    118 try{ return Garbage.collect(B);}catch(e){
    119 return ;
    120 }
    121 
    122 },
    123 //===================================================
    124 $Prototype: function (element) {
    125 //======== prototype.js =====================
    126 if (arguments.length > 1) {
    127 for (var i = 0, elements = [], length = arguments.length; i < length; i++)
    128 elements.push($(arguments[i]));
    129 return elements;
    130 }
    131 if (typeof element == "string")
    132 element = document.getElementById(element);
    133 
    134 return Element.extend(element);
    135 
    136 try {
    137 new_element = Element.extend(element);
    138 } catch (e) {
    139 return new_element;
    140 }
    141 return new_element;
    142 }
    143 //=========================================================
    144 });   // fin extend
     93    //---------------- luciano -------------------------------
     94    $Luciano: function (el, nc) {
     95        return document.id(el, nc, this.document);
     96    },
     97    //=============== PaMOOramics ===========================
     98
     99    $Pamoorama: function (B) {
     100        if (!B) {
     101            if (typeof (B) == "boolean") return null;
     102
     103        }
     104       
     105            try {
     106                if (B.htmlElement) {
     107                    return Garbage.collect(B);
     108                }
     109            } catch (e) {
     110           
     111            }
     112
     113        if ([window, document].contains(B)) { return B; }
     114        var A = $type(B);
     115        if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
     116        if (A != "element") {
     117            return null;
     118        }
     119        if (B.htmlElement) { return Garbage.collect(B); }
     120        if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
     121        $extend(B, Element.prototype);
     122        B.htmlElement = function () { };
     123        try { return Garbage.collect(B); } catch (e) {
     124            return;
     125        }
     126
     127    },
     128    //===================================================
     129    $Prototype: function (element) {
     130        //======== prototype.js =====================
     131        if (arguments.length > 1) {
     132            for (var i = 0, elements = [], length = arguments.length; i < length; i++)
     133                elements.push($(arguments[i]));
     134            return elements;
     135        }
     136        if (typeof element == "string")
     137            element = document.getElementById(element);
     138
     139        return Element.extend(element);
     140
     141        try {
     142            new_element = Element.extend(element);
     143        } catch (e) {
     144            return new_element;
     145        }
     146        return new_element;
     147    }
     148    //=========================================================
     149});    // fin extend
    145150
    146151
     
    177182callstack.push(Src_Match);
    178183}
     184if (Src_Match.match("GMaps|applyMap|markupMaps|applyMarkers")) {
     185callstack.push("GMaps");
     186isCallstackPopulated = true;
     187break;
     188}
    179189if (Src_Match.match("rv_gmaps", "gi")) {
    180190callstack.push("rv_gmaps");
     
    198208break;
    199209}
    200 if (Src_Match.match("GMaps|applyMap")) {
    201 callstack.push("GMaps");
    202 isCallstackPopulated = true;
    203 break;
    204 }
     210
    205211if (Src_Match.match("jQuery")) {
    206212callstack.push("jQuery");
     
    251257            callstack.push(fn);
    252258            // if (fname != " $") callstack.push(fn);
    253                 if (fn.match(RegExp("jquery|switchmenu|gmaps|switchTabs|switchInterface|gally|initializeImageMode", "gi"))) {
     259                if (fn.match(RegExp("jquery|switchmenu|switchTabs|switchInterface|gally|initializeImageMode", "gi"))) {
    254260                    callstack = [];
    255261                    callstack.push('jQuery');
    256262                    break;
    257263                }
    258 
     264                if (fn.match(RegExp("GMaps|applyMap|markupMaps|applyMarkers", "gi"))) {
     265                    callstack = [];
     266                    callstack.push('GMaps');
     267                    break;
     268                }
    259269                //======================
    260270                if (fn.match(RegExp("_footer|ie_ready|makeDraggable", "gi"))) {
Note: See TracChangeset for help on using the changeset viewer.