Changeset 7816


Ignore:
Timestamp:
Nov 19, 2010, 11:13:00 AM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] Improvement compatibility Gmaps, rvmaps,pamooramic.

Location:
extensions/Autosize
Files:
6 edited

Legend:

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

    r7805 r7816  
    4949                                $debug = isset($conf['debug']) ? $conf['debug'] : false ;
    5050                                $cl_visible=isset($conf['cl_auto']) ? $conf['cl_auto'] : 'true' ;
     51                                $cl_conlit=isset($conf['cl_conlit']) ? $conf['cl_conlit'] : 'true' ;
    5152                               
    5253                                if($autosize_parametres->check_icon_v == 'on'){
     
    131132 * conflit =============================================
    132133 */
    133  static public function cl_autosize_script_3()
     134 static public function cl_autosize_script_3($content)
    134135 {
    135136           global  $template,$user,$conf,$picture ,$page;
     
    138139            $my_path = dirname(__FILE__).'/';
    139140                        $debug = isset($conf['debug']) ? $conf['debug'] : false ;
    140                         $cl_conflit =  isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'false' ;
     141                        $cl_conflit =  isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ;
     142
     143$ThePicture = $template->get_template_vars('current');
     144$tpl_name =   $user['theme'] ;
     145if ( !empty($content) )   {  return $content;  }       
     146if ($ThePicture['is_picture'] <> 1 )    {  return $content;  ; }       
     147 $tpls=' {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1}';
     148         $autosizejs = '<script type="text/javascript" charset="utf-8"  src="'.$ROOT_URL;
     149              $autocss =   $autosizejs.'themes/default/js/jquery.packed.js"></script>'."\n";
     150                  $template->append('head_elements',$autocss);
     151
     152$autocss="<script type='text/javascript'>
     153jQuery('#theImage').css({opacity:'0.20'});
     154</script>";
     155
     156$template->append('footer_elements',"\n".$autocss);
     157
     158
     159
     160                return $content ;
     161//====================================================================
    141162                        $template->set_filenames(
    142163                     array('autosize_init'=>$my_path. "template/cl_conflit3.tpl" 
     
    160181
    161182 }// function cl_autosize_script_3
    162 
     183 //=================================================================================
    163184 static public function cl_autosize_script_2()
    164185 {
     
    168189            $my_path = dirname(__FILE__).'/';
    169190                        $debug = isset($conf['debug']) ? $conf['debug'] : false ;
    170                         $cl_conflit =  isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'false' ;
    171                         $template->set_filenames(
    172                      array('autosize_init'=>$my_path. "template/cl_conflit.tpl" 
    173                          )
    174                       );               
    175                          
    176                        
    177                           $theme=$user['theme'];
    178                          
    179                 $template->assign(
     191                        $cl_conflit =  isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ;
     192                          $theme=$user['theme'];
     193                                $template->assign(
    180194                                                array('ma_page' =>      $page['body_id'],
    181195                                                'cl_conflit' => $cl_conflit  ,
     
    184198                                                'AUTOSIZE_PATH' => AUTOSIZE_PATH)
    185199                                                 );
     200                                                 
     201$autoscript="<script type='text/javascript'>
     202if (typeof (save_framework) == 'function')
     203save_framework('".$page['body_id']."');
     204
     205</script>";
     206                         $template->append('footer_elements',$autoscript); 
     207                         return ;
     208
     209
     210                        $template->set_filenames(
     211                     array('autosize_init'=>$my_path. "template/cl_conflit.tpl" 
     212                         )
     213                      );               
     214                         
     215                       
     216                       
     217                         
     218
    186219
    187220if(     $page['body_id'] == 'theAdminPage' ) return ;
     
    198231            $my_path = dirname(__FILE__).'/';
    199232                        $debug = isset($conf['debug']) ? $conf['debug'] : false ;
    200                         $cl_conflit =  isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'false' ;
     233                        $cl_conflit =  isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ;
    201234                        $template->set_filenames(
    202235                     array('autosize_init'=>$my_path. "template/conflit.tpl" 
  • extensions/Autosize/js/Affiche_script.js

    r7805 r7816  
    2424}
    2525//=================================================================================================
    26 new_width=0;
    27 function Wait_Pamoorama() {
     26 function Wait_Pamoorama() {
    2827               mypanorama = window.myPamoorama;
    2928               if (!mypanorama) setTimeout("Wait_Pamoorama()", 500);
    3029                 if ( mypanorama.skipInit==false) setTimeout("Wait_Pamoorama()", 500);
    31              
     30                     info_pamoorama = jQuery("#pamoorama").infos();
     31                    new_width= info_pamoorama.width ;
    3232              if(! jQuery().newResize()) setTimeout("Wait_Pamoorama()", 500);
    33                  if (  myPamoorama.options.width == new_width ) return
     33                 if (  myPamoorama.options.width!= new_width ) return
     34                   jQuery("#theImage").css(
     35                         { opacity: 1 }
     36                        );
    3437}
    3538 
     
    5760
    5861             if (llgboframe.length > 0) {
    59                  ll1 = jQuery(llgboframe).infos();
    60                  ll2 = jQuery("#gbo div:last").infos();
     62                       ll1=jQuery("#llgboframe31").infos();
     63          ll2=jQuery("#llgboframe1" ).infos();
     64
    6165                 marges_llgbo = (ll1.width - ll2.width) + ll2.borderwidth.left + ll2.borderwidth.right;
    6266             }
     
    104108
    105109                 }
    106 
    107                  marge_top = Info_the_page.top +
     110           
     111                 marge_top =Math.ceil( Info_the_page.top +
    108112                                     Info_the_page.borderwidth.top +
    109                                      info_theImage.borderwidth.top;
    110 
    111                  img_top = info_theImage.top + info_theImage.borderwidth.top;
     113                                     info_theImage.borderwidth.top);
     114
     115                 img_top = Math.ceil( info_theImage.top + info_theImage.borderwidth.top);
    112116                 return { marge_top: marge_top, img_top: img_top };
    113117
     
    129133                     });
    130134                 } else {
    131 
     135               
    132136                     jQuery("#" + Parent).css({ padding: "0px",
    133137                         marginLeft: "auto",
     
    158162                     info_description.top = info_gbo.bottom;
    159163                 //=============================================================================
    160                  info_desc = jQuery("#" + Parent + " p:first").infos();
     164                  info_desc = jQuery("#" + Parent + " p:first").infos();
     165                 //----> difference IE8/FF ====
     166                 /* borderwidth           2 | 0
     167                 margin top/booom       13  | 12
     168                 margin                  1  | 0
     169                 top                    101 | 104
     170                 */
    161171                 if (info_desc.bottom < info_img.bottom)
    162172                     info_desc.bottom = info_img.bottom;
     
    164174                 //  if (info_desc.top > info_img.bottom)
    165175                 //     info_description.top = info_desc.top;
    166 
    167                  if (jQuery("#Panorama").length) {
    168                      Type_Img = "panorama";
    169                      //  cl_visible = false;
    170 
    171                  }
    172176                 info_table = jQuery(".infoTable").infos();
    173 
     177                   
    174178                 if (info_table.top > info_description.bottom)
    175179                     info_description.bottom = info_table.top;
     
    180184
    181185                 if (info_licencetag.bottom > 0) {
     186                 if(jQuery.browser.msie == true)
     187                 jQuery(".licencetag").css("padding", "0px");
     188
    182189                     jQuery(".licencetag").css("border", "solid 5px transparent");
    183190                     if (info_licencetag.bottom > info_description.bottom) {
     
    220227                 }
    221228
    222                  if (theme.match(RegExp("luciano", "g"))) { info_description.bottom -= 30 }
    223 
    224                  info_description.height = info_description.bottom - info_description.top;
    225 
     229                 if (theme.match(RegExp("luciano", "g"))) {
     230                 //info_description.bottom -= 30
     231                 }
     232                 if(jQuery.browser.msie!= true)
     233                info_description.bottom +=4;
     234                 
     235                  info_description.height = info_description.bottom - info_description.top;
    226236
    227237                 if (DEBUG == "true") {
     
    269279                     info_description.height = 0;
    270280                 }
    271 
    272 
    273 
     281             
    274282
    275283                 return info_description;
     
    312320               function (event, ui) {       
    313321               event = event || window.event;
    314        
     322
    315323                   if (event.type == "resize")                     
    316324                  { 
     
    331339                   if (init_resize == false)
    332340                       init_resize = Resize(); ;
     341
     342                  jQuery("#theImage").css(
     343                         { opacity: 1 }
     344                        );
     345
    333346               });
    334347
     
    340353                         opacity: 1,
    341354                         filter: 'alpha(opacity:100)'}
    342                  )}else{
     355                 )
     356                                 }else{
    343357                 jQuery("#theImage").animate(
    344358                         { opacity: 1 }, fade_in   , "swing"
     
    479493//====================================================
    480494             newResize: function () {
    481            
    482                  //_____________________________________________________
    483495                 var chk = eval(user_status + "_enabled");
    484496                 if (!cl_visible == true)  { return true; }
     
    738750
    739751
    740                  if (img_reelle.width < mini_width) return;
     752                 if (img_reelle.width < mini_width) return true;
    741753
    742754                 img_reelle.height = parseInt(img_reelle.height);
    743                  if (img_reelle.height < parseInt(mini_height)) return;
     755                 if (img_reelle.height < parseInt(mini_height)) return true;
    744756                 //==================================================================================   
    745757                 if (rapport < 0) {
     
    797809                 //====================================================
    798810                 info_img = jQuery(TheImg).infos();
    799 
    800 
    801                  
    802811                 img_top = Bandeau;
    803812
     
    884893                     }
    885894                     if (TheImg.src) {
    886 
     895                   
    887896                         Image_width -= marges_llgbo; // réduction frame
    888897                         Image_height -= marges_llgbo; // réduction frame
    889898                         if (rapport > 1) {
    890899                             if (Image_width > winwidth) {
    891                                  jQuery("#gbo").outerWidth(winwidth);
     900                                 jQuery("#gbo").width(winwidth);
     901                                 jQuery("#gbo").height(winheight);
    892902                                 jQuery("#gbo").css("width", winwidth + "px");
     903                                 jQuery("#gbo").css("height", winheight + "px");
    893904                             }
    894905                             else {
    895                                  jQuery("#gbo").outerWidth(Image_width);
     906                                 jQuery("#gbo").width(Image_width);
     907                                 jQuery("#gbo").height(Image_height);
    896908                                 jQuery("#gbo").css("width", Image_width + "px");
     909                                 jQuery("#gbo").css("height", Image_height + "px");
    897910                             }
    898911
     
    902915                             Image_height = parseInt(Image_width / rapport);
    903916
    904                              jQuery("#gbo").outerHeight(Image_height + marges_llgbo);
     917                             jQuery("#gbo").height(Image_height + marges_llgbo);
    905918                             jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px");
    906                              if (jQuery.browser.msie) {
    907                                  jQuery("#gbo").css("paddingBottom", 17 + "px");
    908                              }
     919
    909920
    910921                         } else {
    911                              Image_height -= 4;
    912                              Image_width -= 4;
     922                         Image_width -= (marges_llgbo/2); // réduction frame
     923                         Image_height -= (marges_llgbo/2); // réduction frame
    913924                             if (Image_width > winwidth) {
    914                                  jQuery("#gbo").outerWidth(winwidth);
     925                                 jQuery("#gbo").width(winwidth);
     926                                 jQuery("#gbo").height(winheight);
    915927                                 jQuery("#gbo").css("width", winwidth + "px");
     928                                 jQuery("#gbo").css("height", winheight + "px");
    916929                             }
    917930                             else {
    918                                  jQuery("#gbo").outerWidth(Image_width);
     931                                 jQuery("#gbo").width(Image_width);
     932                                 jQuery("#gbo").height(Image_height);
    919933                                 jQuery("#gbo").css("width", Image_width + "px");
     934                                 jQuery("#gbo").css("height", Image_height + "px");
    920935                             }
     936
    921937
    922938                             jQuery("#gbo").css("height", (Image_height + marges_llgbo) + "px");
     
    925941                             jQuery("#gbo").css("width", Image_width + marges_llgbo + "px");
    926942                             jQuery("#gbo").width(Image_width + marges_llgbo);
    927 
    928 
    929 
    930                              if (jQuery.browser.msie) {
    931                                  jQuery("#gbo").css("paddingBottom", 17 + "px");
    932                              }
     943 
    933944
    934945                         }
     
    979990                 if (theme.match(RegExp("luciano", "g"))) {
    980991                     //---- information en dehors du cadre
    981                      Zone_Affichage.height -= Bandeau_bas.height - 20;
    982                      jQuery(Cadre).height(Zone_Affichage.height);
    983 
     992                  //   Zone_Affichage.height -= Bandeau_bas.height - 20;
     993                     jQuery(Cadre).height(Zone_Affichage.height -= Bandeau_bas.height);
     994                   
    984995                 }
    985996
     
    10451056                     img_height = myPamoorama.imageHeight
    10461057
    1047                      marge_left += 0;
     1058                     marge_left += 2;
    10481059
    10491060                     if (theme.match(RegExp("simple", "g"))) {
    1050                          marge_right = 0;
     1061                         marge_right = 2;
    10511062                     }
    10521063                     new_width = Zone_Affichage.width - marge_right - marge_left;
     
    10851096                     info_frame = jQuery(myPamoorama.frame).infos();
    10861097                     myPamoorama.ratio = new_width / 200;
    1087                      jQuery("#pamoorama_frame").width(myPamoorama.ratio);
    1088                      jQuery("#pamoorama_frame").css("width", myPamoorama.ratio + "px");
    1089 
    1090 
    1091                      jQuery("#linkNext").css({ width: "200px", overflow: "hidden" });
    1092                      jQuery("#linkPrev").css({ width: "200px", overflow: "hidden" });
     1098                 //    jQuery("#pamoorama_frame").width(myPamoorama.ratio);
     1099                 //    jQuery("#pamoorama_frame").css("width", myPamoorama.ratio + "px");
     1100
     1101                 jQuery("#pamoorama_footer img").css({ width: "", height: "" });
     1102
    10931103
    10941104                     jQuery(TheImg).height(img_finale.height);
     
    11961206                     pos = jQuery("#copyright").infos();
    11971207                 if (pos.top > 100) jQuery("#the_page").height(pos.top);
     1208                 jQuery("#linkNext").css({ height:"80px",width: "200px", overflow: "hidden" });
     1209                 jQuery("#linkPrev").css({  height:"80px",width: "200px", overflow: "hidden" });
     1210                 jQuery(".navThumb img").css({ height:"80px",width:"", overflow: "hidden" });
    11981211                                 return true;
    11991212
  • extensions/Autosize/js/conflit.js

    r7805 r7816  
    33* A faire Compatibilité entre LLGBO GMAPS
    44*           Infobulles spécifiques pour les EXIFS au survol du bouton :  Non  pour être ok
    5 *
     5*147 llgbo2 main.php.   //      $template->Clear_assign('metadata');// hide original metadata
     6*[gmaps=id:1;width:800;height:640;]
    67*       Luciano rv_gmaps
    78*/
     
    1415    // jQuery est chargé
    1516}
    16  
    17 function $(element, nc0) {
    18      a = conflit(element, nc0);
    19     return a;
    20             }
    21 
    22          
    23          
     17
    2418//===================================================
    2519
    26     var time_out = 0;
     20/*
     21 
     22*/
     23msie = jQuery.browser.msie || false;
     24opera= jQuery.browser.opera || false;
     25//========================================
     26/*function $defined(A) {
     27    $ = _$2; //   ;
     28    return A != undefined;
     29}
     30*/
     31
     32var time_out = 0;
    2733//===================================================
    2834
    29     nbpa = 0;
    30     var Fn;
     35nbpa = 0;
     36var Fn;
    3137function conflit(element, nc) {
    32         //--- cl_conflit   
    33         var retour = (getStackTrace());
    34         Fn=retour.fn ;
    35         retour=retour.state ;
    36 
    37         n=document ;
    38         v=window;
    39         var ret_element = "";
    40         if (retour.match(RegExp("jQuery", "gi"))) {
    41             ret_element = jQuery(element);
    42         }
    43         else if (retour.match(RegExp("rv_gmaps", "gi"))) {
     38    //--- cl_conflit   
     39    var retour = (getStackTrace());
     40    Fn = retour.fn;
     41    retour = retour.state;
     42
     43    n = document;
     44    v = window;
     45    var ret_element = "";
     46    if (retour.match(RegExp("jQuery", "gi"))) {
     47        ret_element = jQuery(element);
     48    }
     49    else if (retour.match(RegExp("rv_gmaps", "gi"))) {
    4450        ret_element = jQuery().$Prototype(element);
    4551    } else if (retour.match(RegExp("GMaps", "gi"))) {
     
    4753    } else if (retour.match(RegExp("pamooramics", "gi"))) {
    4854
    49         ret_element = jQuery().$Pamoorama(element);
    50        
    51     if (retour.match(RegExp("init_", "gi"))) {
    52 
    53    }
    54     nbpa +=1 ;
    55 
    56 } else if (retour.match(RegExp("luciano", "gi"))) {
    57     ret_element = jQuery().$Luciano(element);
    58 
    59 }else if (retour.match(RegExp("jQuery", "gi"))) {
     55    ret_element =  jQuery().$Pamoorama(element);
     56
     57        if (retour.match(RegExp("init_", "gi"))) {
     58
     59        }
     60        nbpa += 1;
     61
     62    } else if (retour.match(RegExp("luciano", "gi"))) {
     63        ret_element = jQuery().$Luciano(element);
     64
     65    } else if (retour.match(RegExp("jQuery", "gi"))) {
    6066        ret_element = jQuery(element);
    6167    }
    6268
    63 if (ret_element != "")
    64     return ret_element;
    65 
    66 if (typeof (element) == "string") {
    67     if (element.match("^#|.ui", "gi")) {
     69    if (ret_element != "")
     70        return ret_element;
     71
     72    if (typeof (element) == "string") {
     73        if (element.match("^#|.ui", "gi")) {
     74            ret_element = jQuery(element);
     75            return ret_element;
     76        }
     77    } else if (typeof (element) == "function") {
     78        fn = element.toString();
     79        if (fn.match("#pwg|open", "gi")) {
     80            ret_element = jQuery(element);
     81            return ret_element;
     82        }
     83    } else if (element == document) {
     84
    6885        ret_element = jQuery(element);
    6986        return ret_element;
    70     }
    71 } else if (typeof (element) == "function") {
    72     fn = element.toString();
    73     if (fn.match("#pwg|open", "gi")) {
    74         ret_element = jQuery(element);
    75         return ret_element;
    76     }
    77 } else if ( element==document) {
    78  
    79         ret_element = jQuery(element);
    80         return ret_element;
    81    
    82      
    83     }
    84 tp0 = typeof (element);
    85 
    86  ret_element = jQuery(element);
    87 if (DEBUG == "true") {
    88      retour = (getStackTrace());
    89      alert("element : " + element + " retour : " + retour);
    90    
    91 }
    92  return  ret_element ;
     87
     88
     89    }
     90    tp0 = typeof (element);
     91
     92    ret_element = jQuery(element);
     93    if (DEBUG == "true") {
     94        retour = (getStackTrace());
     95        alert("element : " + element + " retour : " + retour);
     96
     97    }
     98    return ret_element;
    9399} // conflit(element,nc)
    94100
     
    114120            })
    115121            //=============================================================               
    116             function $(element, nc0) {
    117                 a = conflit(element, nc0);
    118                 return a;
    119             }
    120122            p0 = jQuery("#theImage");
    121123            if (p0.length) {
     
    144146        //=============================================================       
    145147
    146          //  $ = _$2; ;
     148        //  $ = _$2; ;
    147149
    148150
     
    153155
    154156//=========================================================
    155 ; (function ($) {
    156 
    157 })(jQuery);
    158 //mootools
    159 /* */
    160 _$2 = $;
    161  
    162 function $defined(A) {
    163     $= _$2  ; //   ;
    164     return A != undefined;
    165 }
    166  
    167  
    168 
    169 
    170157
    171158jQuery.fn.extend({
    172159
    173 //---------------- luciano -------------------------------
    174 $Luciano: function (el, nc) {
    175 return document.id(el, nc, this.document);
    176 },
    177 //=============== PaMOOramics ===========================
    178 
    179 $Pamoorama: function (B) {
    180    
    181 
    182 if (!B) {
    183 if (typeof (B) == "boolean") return null;
    184 
    185 }
    186        
    187 try {
    188 if (B.htmlElement) {
    189 return Garbage.collect(B);
    190 }
    191 } catch (e) {
    192            
    193 }
    194 
    195 if ([window, document].contains(B)) { return B; }
    196 var A = $type(B);
    197 if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
    198 if (A != "element") {
    199 return null;
    200 }
    201 if (B.htmlElement) { return Garbage.collect(B); }
    202 if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
    203 $extend(B, Element.prototype);
    204 B.htmlElement = function () { };
    205 try { return Garbage.collect(B); } catch (e) {
    206 return;
    207 }
    208 
    209 },
    210 //===================================================
    211 $Prototype: function (element) {
    212 //======== prototype.js =====================
    213 if (arguments.length > 1) {
    214 for (var i = 0, elements = [], length = arguments.length; i < length; i++)
    215 elements.push($(arguments[i]));
    216 return elements;
    217 }
    218 if (typeof element == "string")
    219 element = document.getElementById(element);
    220 
    221 return Element.extend(element);
    222 
    223 try {
    224 new_element = Element.extend(element);
    225 } catch (e) {
    226 return new_element;
    227 }
    228 return new_element;
    229 }
    230 //=========================================================
     160    //---------------- luciano -------------------------------
     161    $Luciano: function (el, nc) {
     162        return document.id(el, nc, this.document);
     163    },
     164    //=============== PaMOOramics ===========================
     165
     166    $Pamoorama: function (B) {
     167
     168
     169        if (!B) {
     170            if (typeof (B) == "boolean") return null;
     171
     172        }
     173
     174        try {
     175            if (B.htmlElement) {
     176                return Garbage.collect(B);
     177            }
     178        } catch (e) {
     179
     180        }
     181
     182        if ([window, document].contains(B)) { return B; }
     183        var A = $type(B);
     184        if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
     185        if (A != "element") {
     186            return null;
     187        }
     188        if (B.htmlElement) { return Garbage.collect(B); }
     189        if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
     190        $extend(B, Element.prototype);
     191        B.htmlElement = function () { };
     192        try { return Garbage.collect(B); } catch (e) {
     193            return;
     194        }
     195
     196    },
     197    //===================================================
     198    $Prototype: function (element) {
     199        //======== prototype.js =====================
     200        if (arguments.length > 1) {
     201            for (var i = 0, elements = [], length = arguments.length; i < length; i++)
     202                elements.push($(arguments[i]));
     203            return elements;
     204        }
     205        if (typeof element == "string")
     206            element = document.getElementById(element);
     207
     208        return Element.extend(element);
     209
     210        try {
     211            new_element = Element.extend(element);
     212        } catch (e) {
     213            return new_element;
     214        }
     215        return new_element;
     216    }
     217    //=========================================================
    231218});    // fin extend
    232219
     
    246233    var isCallstackPopulated = false;
    247234    try {
    248             i.dont.exist += 0; //doesn't exist- that's the point
     235        i.dont.exist += 0; //doesn't exist- that's the point
    249236    } catch (e) {
    250237        var retcallstack = [];
    251238        var e_message = e.message;
    252         var  e_stack = e.stack;
     239        var e_stack = e.stack;
    253240        if (e_stack) { //Firefox Opera 3.6
    254                         //=== test fichier source =============
    255                         var lines = e.stack.split("\n");
    256                         for (var i = 0, len = lines.length; i < len; i++) {
    257                                 var Src_Match = lines[i];
    258                                 if (Src_Match.match(/conflit.js/)) {
    259                                         //
    260                                 } else {
    261                                     if (Src_Match.match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
    262                                         callstack.push(Src_Match); //php?
    263                                     } else {
    264                                         callstack.push(Src_Match);
    265                                     }
    266                         if (Src_Match.match("GMaps|applyMap|markupMaps|applyMarkers")) {
    267                                  callstack.push("GMaps");
    268                                 isCallstackPopulated = true;
    269                             break;
    270                     }
    271             if (Src_Match.match("rv_gmaps", "gi")) {
    272                 callstack.push("rv_gmaps");
    273                 isCallstackPopulated = true;
    274                 break;
    275             }
    276             if (Src_Match.match("paMOOramics")) {
    277                 isCallstackPopulated = true;
    278                 callstack.push("paMOOramics");
    279                 break;
    280             }
    281             if (Src_Match.match("Luciano","gi")) {
    282                 callstack.push("Luciano");
    283                 isCallstackPopulated = true;
    284                 break;
    285             }
    286             if (Src_Match.match("main")) {
    287                 alert(Src_Match)
    288                 callstack.push("main");
    289                 isCallstackPopulated = true;
    290                 break;
    291             }
    292              if (Src_Match.match("jQuery")) {
    293                     callstack.push("jQuery");
    294                     isCallstackPopulated = true;
    295                     break;
    296                 }
    297         }
    298     }
    299         //callstack.shift();
    300         isCallstackPopulated = false;
    301 }
    302 if (window.opera && e.message && isCallstackPopulated == false) {
    303    callstack = [];
    304 //Opera =================================
    305 var lines = e.message.split("\n");
    306 for (var i = 0, len = lines.length; i < len; i++) {
    307 if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
    308 var entry = lines[i];
    309 //Append next line also since it has the file info
    310 if (lines[i + 1]) {
    311 entry += " at " + lines[i + 1];
    312 i++;
    313 }
    314 callstack.push(entry);
    315  //isCallstackPopulated = true;
    316 }
    317 }
    318 
    319 }
    320 //===== fin Opera======================================
    321 }
    322 if (!isCallstackPopulated) { //IE and Safari
    323     var currentFunction = arguments.callee.caller;
    324     //next
    325     callstack = [];
    326     all_functions = [];
    327     state = "";
    328     if (currentFunction == null) {
    329         return ("");
    330     }
    331     states = [];
    332     var fn1 = currentFunction.toString(); // fonction d'appel local (conflit)
    333    
    334     currentFunction = currentFunction.caller;
    335     currentFunction = currentFunction.caller;
    336     //$family
    337 
    338     while (currentFunction) {
    339         var fn = currentFunction.toString();
    340         all_functions.push(fn);
    341         var fname = fn.substring(fn.indexOf("function") + 8, fn.indexOf("(")) || " ";
    342         if (fname != " ") {
    343    
    344             jQuery.noop;
    345               if (states.length>0) break;
    346 
    347         // if (fname != " $") callstack.push(fn);
    348         } if (fname != "") {
    349             jQuery.noop;
    350             // if (fname != " $") callstack.push(fn);
    351         }
     241            //=== test fichier source =============
     242            var lines = e.stack.split("\n");
     243            for (var i = 0, len = lines.length; i < len; i++) {
     244                var Src_Match = lines[i];
     245                if (Src_Match.match(/conflit.js/)) {
     246                    //
     247                } else {
     248                    if (Src_Match.match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
     249                        callstack.push(Src_Match); //php?
     250                    } else {
     251                        callstack.push(Src_Match);
     252                    }
     253                    if (Src_Match.match("GMaps|applyMap|markupMaps|applyMarkers")) {
     254                        callstack.push("GMaps");
     255                        isCallstackPopulated = true;
     256                        break;
     257                    }
     258                    if (Src_Match.match("rv_gmaps", "gi")) {
     259                        callstack.push("rv_gmaps");
     260                        isCallstackPopulated = true;
     261                        break;
     262                    }
     263                    if (Src_Match.match("paMOOramics")) {
     264                        isCallstackPopulated = true;
     265                        callstack.push("paMOOramics");
     266                        break;
     267                    }
     268                    if (Src_Match.match("Luciano", "gi")) {
     269                        callstack.push("Luciano");
     270                        isCallstackPopulated = true;
     271                        break;
     272                    }
     273                    if (Src_Match.match("main")) {
     274                        alert(Src_Match)
     275                        callstack.push("main");
     276                        isCallstackPopulated = true;
     277                        break;
     278                    }
     279                    if (Src_Match.match("jQuery")) {
     280                        callstack.push("jQuery");
     281                        isCallstackPopulated = true;
     282                        break;
     283                    }
     284                }
     285            }
     286            //callstack.shift();
     287            isCallstackPopulated = false;
     288        }
     289        if (window.opera && e.message && isCallstackPopulated == false) {
     290            callstack = [];
     291            //Opera =================================
     292            var lines = e.message.split("\n");
     293            for (var i = 0, len = lines.length; i < len; i++) {
     294                if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
     295                    var entry = lines[i];
     296                    //Append next line also since it has the file info
     297                    if (lines[i + 1]) {
     298                        entry += " at " + lines[i + 1];
     299                        i++;
     300                    }
     301                    callstack.push(entry);
     302                    //isCallstackPopulated = true;
     303                }
     304            }
     305
     306        }
     307        //===== fin Opera======================================
     308    }
     309    if (!isCallstackPopulated) { //IE and Safari
     310        var currentFunction = arguments.callee.caller;
     311        //next
     312        callstack = [];
     313        all_functions = [];
     314        state = "";
     315        if (currentFunction == null) {
     316            return ("");
     317        }
     318        states = [];
     319        var fn1 = currentFunction.toString(); // fonction d'appel local (conflit)
     320
     321        currentFunction = currentFunction.caller;
     322        currentFunction = currentFunction.caller;
     323        //$family
     324
     325        while (currentFunction) {
     326            var fn = currentFunction.toString();
     327            all_functions.push(fn);
     328            var fname = fn.substring(fn.indexOf("function") + 8, fn.indexOf("(")) || " ";
     329            if (fname != " ") {
     330
     331                jQuery.noop;
     332                if (states.length > 0) break;
     333
     334                // if (fname != " $") callstack.push(fn);
     335            } if (fname != "") {
     336                jQuery.noop;
     337                // if (fname != " $") callstack.push(fn);
     338            }
    352339            callstack.push(fn);
    353            
    354                 if (fn.match(RegExp("jquery|switchmenu|switchTabs|switchInterface|gally|initializeImageMode", "gi"))) {
    355                     states.push('jQuery');
    356                    
    357                 }
    358                 if (fn.match(RegExp("dialog..open", "gi"))) {
    359                     states.push('GMaps');
    360                    
    361                 }
    362                 if (fn.match(RegExp("GMaps|applyMap|markupMaps|applyMarkers", "gi"))) {
    363                     states.push('GMaps');
    364                      
    365                 }
    366                 //======================
    367                 if (fn.match(RegExp("_footer|ie_ready|makeDraggable|droppables", "gi"))) {
    368 
    369                     states.push('paMOOramics');
    370                    
    371                 }
    372                 if (fn.match(RegExp("observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) {
    373                     states.push('rv_gmaps');
    374                      
    375                 }
    376                 //? bubble 
    377                 Expression = new RegExp("\\$", "gi")
    378                 if (fn.match(Expression)) {
    379                     if (fn.match(RegExp("rateForm", "gi"))) {
    380 
    381                         states.push('Luciano');
    382                        
    383                     }
    384                 }
    385                 if (fn.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) {  //luciano
     340
     341            if (fn.match(RegExp("jquery|switchmenu|switchTabs|switchInterface|gally|initializeImageMode", "gi"))) {
     342                states.push('jQuery');
     343
     344            }
     345            if (fn.match(RegExp("dialog..open", "gi"))) {
     346                states.push('GMaps');
     347
     348            }
     349            if (fn.match(RegExp("GMaps|applyMap|markupMaps|applyMarkers", "gi"))) {
     350                states.push('GMaps');
     351
     352            }
     353            //======================
     354            if (fn.match(RegExp("_footer|ie_ready|makeDraggable|droppables", "gi"))) {
     355
     356                states.push('paMOOramics');
     357
     358            }
     359            if (fn.match(RegExp("observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) {
     360                states.push('rv_gmaps');
     361
     362            }
     363            //? bubble 
     364            Expression = new RegExp("\\$", "gi")
     365            if (fn.match(Expression)) {
     366                if (fn.match(RegExp("rateForm", "gi"))) {
    386367
    387368                    states.push('Luciano');
    388                      
    389                 }
    390 
    391                 if (all_functions.length > 50) break;
    392 
    393          
    394         currentFunction = currentFunction.caller;
    395         }
    396  
    397 }
    398 state = states.join('\n');
    399 Fn = all_functions;
    400     return { state:state , fn:callstack.join('\n') };
     369
     370                }
     371            }
     372            if (fn.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) {  //luciano
     373
     374                states.push('Luciano');
     375
     376            }
     377
     378            if (all_functions.length > 50) break;
     379
     380
     381            currentFunction = currentFunction.caller;
     382        }
     383
     384    }
     385    state = states.join('\n');
     386    Fn = all_functions;
     387    return { state: state, fn: callstack.join('\n') };
    401388}
    402389//====================================
    403 jQuery(window).load(function () {
    404 
    405 a= jQuery(':Description');
    406 
    407      
    408 });
    409            
    410 
    411 
    412 
    413 //==============================================
    414 jQuery.extend(jQuery.expr[':'], {
     390
     391
     392(function($) {
     393    $(document).ready(function(){
     394         jQuery(window).load(function () {
     395               a = jQuery(':Description');
     396        });
     397    });
     398    //==============================================
     399    jQuery.extend(jQuery.expr[':'], {
    415400    // Nom du sélecteur personnalisé
    416     Description: function (a) {
     401        Description: function (a) {
    417402        n = jQuery(a).infos();
    418403        if (n.id != "") {
     
    433418
    434419                    if (Match.match(new RegExp("ajax", "gi"))) {
    435                           alert(n.id + n.nodeName + a.outerHTML);
     420                        //     alert(n.id + n.nodeName + a.outerHTML);
    436421
    437422                    }
    438423                }
    439424                if (Match.match(new RegExp("pamoorama", "ig"))) {
    440                    
    441                //     alert(n.id + n.nodeName + a.innerHTML);
    442 
    443                 }
    444             }
     425
     426                    //     alert(n.id + n.nodeName + a.innerHTML);
     427
     428                }
     429            }else{
     430         
     431            if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) {   
     432              jQuery.noop;           
     433
     434                     }
     435 
     436                }
    445437
    446438        return a;
    447439
    448440    }
    449 });
     441  }); //fin extend
     442  /*
     443  *
     444  */
     445
     446
     447
     448
     449
     450
     451})(jQuery);
     452
     453
     454 function $(element, nc0) {
     455        a = conflit(element, nc0);
     456        return a;
     457    }
     458if (typeof ($.ajax)!="function")
     459    {   
     460    $.ajax=        function  (origSettings) {
     461             jQuery.ajax(origSettings) ;
     462        }
     463     
     464
     465     $.parseJSON=  function (msg){
     466            return jQuery.parseJSON(msg) ;
     467        }
     468
    450469 
    451 jQuery("#pamoorama").bind("load", { foo: "bar" }, function release(event) { 
    452 //setTimeout("end_Timer()", 100);
     470  }
    453471 
    454   //  event.stopPropagation();
    455 })
    456 function end_Timer() {   
    457 alert("load pamoorama");
    458472 
     473  function save_framework(page) {
     474      return 
     475 
    459476}
    460 jQuery().ajaxSuccess(function (evt, request, settings) {
    461      alert("ok ajax");
    462 
    463 });
    464     function save_framework(page) {
    465 
    466         _$2 = window.$; // Pour $.ajax sauvegarge ;
    467         if (page == "theCategoryPage")
    468             $ = jQuery;
    469         else {
    470             tpe = jQuery.browser.msie || false;
    471             if (tpe == true) {
    472 
    473   // $ = jQuery; // ---> ajax
    474               }else{
    475                  $ = jQuery; // ---> ajax
    476               }
    477 
    478             }
    479        
    480  }
     477
  • extensions/Autosize/js/jquery.dimensions.js

    r7805 r7816  
    8585            //=====================================================================
    8686            results = {
    87                 position: {
    88                     top: 0, left: 0
    89                 },
     87                position: jQuery(this).attr("position"),
    9088                top: 0,
    9189                left: 0,
     
    149147                    }
    150148                }
     149
    151150                results = {
    152                     position: Position,
     151                    position: jQuery(this).attr("position"),
    153152                    top: top,
    154153                    left: left,
     
    201200                    parentOffset = { top: 0, left: 0 };
    202201                }
     202
    203203                results = {
    204                     top: offset.top - parentOffset.top, left: offset.left - parentOffset.left
     204                    top: Math.ceil( offset.top - parentOffset.top), left: Math.ceil(offset.left - parentOffset.left)
    205205                };
    206206            } return results;
     
    223223        Get_Val_int: function (myObj, Maxi_val, Mini_val) {
    224224            var val = 0;
    225             var reg1 = new RegExp("%", "g")
     225
    226226            Maxi_val = parseInt(Maxi_val || "0");
    227227
     
    237237                return Maxi_val;
    238238            }
     239
    239240            if (typeof (myObj) == "string") {
    240241                if (myObj == "none") return Maxi_val;
    241242                if (myObj == "auto") return Maxi_val;
     243                var reg1 = new RegExp("px", "g")
     244                if (myObj.match(reg1)) {
     245
     246                    myObj = parseInt(myObj) ;
     247
     248                }
     249                else {
     250                    reg1 = new RegExp("%", "g")
     251                    if (myObj.match(reg1)) {
     252                        val =Math.ceil(myObj * Maxi_val / 100);
     253                        return val;
     254                    }
     255                }
     256
    242257                if (Mini_val)
    243258                    if (myObj < Mini_val) return Maxi_val;
     259
    244260                switch (myObj) {
    245261                    case 'thin':
     
    253269                        break;
    254270                    case 'inherit':
    255 
    256 
    257                         break;
    258 
     271                        break;
    259272                    default:
    260 
    261 
    262                         break;
    263                 }
    264 
    265 
    266 
    267 
    268 
    269                 if (myObj.match(reg1)) val = myObj * Maxi_val / 100;
     273                        break;
     274                }
     275
     276
     277
    270278                val = parseInt(myObj);
    271279
    272             } else
     280            } else {
    273281                val = parseInt(myObj);
    274 
    275 
     282            }
    276283            if (typeof (val) == "NaN") return Maxi_val;
    277284            return val;
  • extensions/Autosize/main.inc.php

    r7805 r7816  
    2121 add_event_handler('loc_end_page_tail',array(&$autosize_controler, 'cl_autosize_script_2'),  EVENT_HANDLER_PRIORITY_NEUTRAL );
    2222
     23 add_event_handler('render_element_content',
     24  array(&$autosize_controler, 'cl_autosize_script_3'),  EVENT_HANDLER_PRIORITY_NEUTRAL-1,  2  );
    2325 //add_event_handler('loc_end_index',array(&$autosize_controler, 'cl_autosize_script_3'),  EVENT_HANDLER_PRIORITY_NEUTRAL );
    2426 
  • extensions/Autosize/template/cl_conflit.tpl

    r7805 r7816  
    66
    77<!--- {$AUTOSIZE_PATH} template/cl_confilt.tpl (body) --->
    8   <script type="text/javascript">
    9      
    10       save_framework('{$ma_page}');
    118 
    12 </script>
    139    <!---FIN  {$AUTOSIZE_PATH} template/cl_confilt.tpl (body) --->
Note: See TracChangeset for help on using the changeset viewer.