Ignore:
Timestamp:
Jan 12, 2011, 3:22:40 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] compatibility whith piwishack


File:
1 edited

Legend:

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

    r8588 r8627  
    7272function conflit(element, nc) {
    7373    //--- cl_conflit
    74 if (typeof MooTools=="undefined" && typeof  Prototype=="undefined" ) {
    75        ret_element = jQuery(element);
     74    if (typeof MooTools == "undefined" && typeof Prototype == "undefined") {
     75        ret_element = jQuery(element);
    7676        return ret_element;
    7777    }
     
    8282            return ret_element;
    8383        }
    84    
     84
    8585    }
    8686
     
    9494    }
    9595    else if (retour.match(RegExp("rv_gmaps", "gi"))) {
    96     try{
    97         ret_element = myjQuery().$Prototype(element);
    98         }
    99         catch(e)
    100         {
    101 
    102          ret_element = myjQuery().$Prototype(element);
    103 
    104         }
    105     } else if (retour.match(RegExp("GMaps", "gi"))) {     
     96        try {
     97            ret_element = myjQuery().$Prototype(element);
     98        }
     99        catch (e) {
     100
     101            ret_element = myjQuery().$Prototype(element);
     102
     103        }
     104    } else if (retour.match(RegExp("GMaps", "gi"))) {
    106105
    107106        ret_element = jQuery(element);
     
    113112
    114113        }
    115        
     114
    116115
    117116    } else if (retour.match(RegExp("luciano", "gi"))) {
    118          
     117
    119118
    120119        ret_element = jQuery().$Luciano(element, nc);
     
    168167//======================================================
    169168jQuery(document).ready(
    170        function (jQuery) {
    171            jQuery(window).load(function () {
    172                //============================================================
    173                jQuery("#icon_gmaps").bind('click', function () {
    174 
    175                    jQuery('html,body').stop().scrollTop(0);
    176                    jQuery('html,body').stop().scrollLeft(0);
    177                    jQuery(".ui-widget-overlay").css("opacity", "0.75");
    178 
    179                    l1 = (jQuery(window).width() - (jQuery(".gmapsPopup").width())) / 2;
    180                    h1 = (jQuery(window).height() - (jQuery(".gmapsPopup").height())) / 2;
    181 
    182                    jQuery(".gmapsPopup").css("left", l1 + "px");
    183                    jQuery(".gmapsPopup").css("top", h1 + "px");
    184                })
    185                //============================================================= 
    186                if (typeof (Parent) == "undefined")
    187                    Parent = "#theImage";
    188                info_image = jQuery(Parent).infos();
    189                p0 = jQuery(Parent);
    190                if (p0.length > 0) {
    191                    //======================================================
    192                    if (info_image.position != "static") {
    193                        try {
    194                            if (theme.match("gally", "gi")) {
    195                                if (typeof gallyPP != "undefined") {
    196                                  
    197                                } else if (jQuery.isFunction(inittoolbar)) {
    198                                    if (typeof (currentTab) == "undefined") inittoolbar();
    199                                    else initializeImageMode("resize");
    200                                };
    201                                //==== compatibilité Gally/LLGBO ===
    202                                //--- passage relative ==> static ===/
    203                                jQuery(Parent).css({ position: "static" });
    204                                jQuery("#imageToolBar").css({ position: "relative", top: "0px" });
    205 
    206                            }
    207                        } catch (e) {
    208                        }
    209 
    210                    }
    211                }
    212                //   jQuery(window).resize();
    213            });
    214            //=============================================================       
    215            //  $ = _$2; ;
    216        });
     169    function (jQuery) {
     170        jQuery(window).load(function () {
     171            //============================================================
     172            jQuery("#icon_gmaps").bind('click', function () {
     173
     174                jQuery('html,body').stop().scrollTop(0);
     175                jQuery('html,body').stop().scrollLeft(0);
     176                jQuery(".ui-widget-overlay").css("opacity", "0.75");
     177
     178                l1 = (jQuery(window).width() - (jQuery(".gmapsPopup").width())) / 2;
     179                h1 = (jQuery(window).height() - (jQuery(".gmapsPopup").height())) / 2;
     180
     181                jQuery(".gmapsPopup").css("left", l1 + "px");
     182                jQuery(".gmapsPopup").css("top", h1 + "px");
     183            })
     184            //============================================================= 
     185
     186            //   jQuery(window).resize();
     187        });
     188        //=============================================================       
     189        //  $ = _$2; ;
     190    });
    217191
    218192
     
    222196jQuery.fn.extend({
    223197
    224 //---------------- luciano -------------------------------
    225 $Luciano: function (el, nc) {
    226 return document.id(el, nc, this.document);
    227 },
    228 //=============== PaMOOramics ===========================
    229 
    230 $Pamoorama: function (B) {
     198    //---------------- luciano -------------------------------
     199    $Luciano: function (el, nc) {
     200        return document.id(el, nc, this.document);
     201    },
     202    //=============== PaMOOramics ===========================
     203
     204    $Pamoorama: function (B) {
    231205
    232206
     
    345319                        callstack.push("jQuery");
    346320                        isCallstackPopulated = true;
    347                      
     321
    348322                        break;
    349323                    }
     
    448422
    449423                states.push('paMOOramics');
    450               break;
    451           }
    452           //window_1290934905697_top
    453           if (fn.match(RegExp("window_..|WindowUtilities", "gi"))) {
    454               states.push('rv_gmaps');
    455               break;
    456           }
    457           if (fn.match(RegExp("that.overlayOpacity", "gi"))) {
    458               states.push('rv_gmaps');
    459               break;
    460           }
    461           if (fn.match(RegExp("For backward compatibility like win", "gi"))) {
    462               states.push('rv_gmaps');
    463               break;
    464           }
    465           if (fn.match(RegExp("overlay_modal|HTMLDivElement|constraintPad", "gi"))) {
    466               states.push('rv_gmaps');
    467               break;
    468           }
     424                break;
     425            }
     426            //window_1290934905697_top
     427            if (fn.match(RegExp("window_..|WindowUtilities", "gi"))) {
     428                states.push('rv_gmaps');
     429                break;
     430            }
     431            if (fn.match(RegExp("that.overlayOpacity", "gi"))) {
     432                states.push('rv_gmaps');
     433                break;
     434            }
     435            if (fn.match(RegExp("For backward compatibility like win", "gi"))) {
     436                states.push('rv_gmaps');
     437                break;
     438            }
     439            if (fn.match(RegExp("overlay_modal|HTMLDivElement|constraintPad", "gi"))) {
     440                states.push('rv_gmaps');
     441                break;
     442            }
    469443
    470444            if (fn.match(RegExp("__content|__method|observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) {
     
    474448
    475449
    476             if (all_functions.length > 50) 
    477             break;
     450            if (all_functions.length > 50)
     451                break;
    478452
    479453
     
    482456
    483457    }
    484   // state_ff + "|" +
     458    // state_ff + "|" +
    485459    state = states.join('\n');
    486460    if (state == "") {
    487        
     461
    488462        if (DEBUG == "true") {
    489463            Fn = all_functions.join('\n');
     
    494468        }
    495469
    496  
     470
    497471        state = state_ff;
    498472    }
    499473
    500474    Fn = all_functions;
    501     return { state: state, fn: callstack.join('\n'),fn1:fn2 };
     475    return { state: state, fn: callstack.join('\n'), fn1: fn2 };
    502476}
    503477//====================================
    504478test_conflit = false;
    505  librairies =new Array;
     479librairies = new Array;
    506480
    507481
     
    509483$_ = $;
    510484function save_framework(page) {
     485    // theGategoryPage,theRegisterPage
     486    // thePicturePage
     487    // si admin.php page = "",theIdentificationPage
    511488    try {
    512489        Conflit = { version: cl_version, name: cl_plugin };
     
    514491
    515492    }
    516         $_2 = $;
     493    if (typeof (Parent) == "undefined")
     494        Parent = "#theImage";
     495    info_image = jQuery(Parent).infos();
     496    p0 = jQuery(Parent);
     497    if (p0.length > 0) {
     498        //======================================================
     499        if (info_image.position != "static") {
     500            try {
     501                if (theme.match("gally", "gi")) {
     502                    if (typeof gallyPP != "undefined") {
     503
     504                    } else if (jQuery.isFunction(inittoolbar)) {
     505                        if (typeof (currentTab) == "undefined") inittoolbar();
     506                        else initializeImageMode("resize");
     507                    };
     508                    //==== compatibilité Gally/LLGBO ===                 
     509                    jQuery(Parent).css({ position: "static" });
     510
     511                }
     512            } catch (e) {
     513            }
     514
     515        }
     516    }
     517
     518    $_2 = $;
    517519    return
    518     }
     520}
    519521
    520522(function ($) {
    521     $(document).ready(function () {   
    522           //=================================================
    523           if (typeof  jQuery.fn.infos !="function")
    524           {
    525                jQuery=myjQuery;
    526                $=my$ ;
    527                }
    528         });
     523    $(document).ready(function () {
     524        //=================================================
     525        if (typeof jQuery.fn.infos != "function") {
     526            jQuery = myjQuery;
     527            $ = my$;
     528        }
     529    });
    529530
    530531})(jQuery);
    531532
    532 if(test_conflit!=true)
    533 {
    534 //--------------------------------------------------------------
    535 $_0 = $;
    536  
    537         function $(element, nc0) {
    538             if (typeof  jQuery.fn.infos !="function") 
    539              if (typeof  myjQuery !="undefined")
    540                  jQuery=myjQuery;   
    541              a = conflit(element, nc0);
    542             return a;
    543         }
    544        
    545         if (typeof ($.ajax) != "function") {
    546             $.ajax = function (origSettings) {
    547                 jQuery.ajax(origSettings);
    548             }
    549 
    550 
    551             $.parseJSON = function (msg) {
    552                 return jQuery.parseJSON(msg);
    553             }
    554 
    555 
    556         }
    557         //============================================
    558         /* url (String): URl de la page à charger
    559         * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur.
    560         * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées.
    561         * type (String): (optionnel) format des données renvoyées à la fonction de callback
    562         */
    563         if (typeof ($.get) != "function") {
    564             $.get = function ( a, b, c, d) {
    565                 return jQuery.get(a, b, c,d );
    566             }
    567         }
    568         if (typeof ($.post) != "function") {
    569 
    570             $.post = function (a, b, c,d) {
    571                 return jQuery.post(a, b, c, d);
    572             }
    573             ;
    574 
    575         }
    576        
    577 
    578  
     533if (test_conflit != true) {
     534    //--------------------------------------------------------------
     535    $_0 = $;
     536
     537    function $(element, nc0) {
     538        if (typeof jQuery.fn.infos != "function")
     539            if (typeof myjQuery != "undefined")
     540                jQuery = myjQuery;
     541        a = conflit(element, nc0);
     542        return a;
     543    }
     544
     545    if (typeof ($.ajax) != "function") {
     546        $.ajax = function (origSettings) {
     547            jQuery.ajax(origSettings);
     548        }
     549
     550
     551        $.parseJSON = function (msg) {
     552            return jQuery.parseJSON(msg);
     553        }
     554
     555
     556    }
     557    //============================================
     558    /* url (String): URl de la page à charger
     559    * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur.
     560    * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées.
     561    * type (String): (optionnel) format des données renvoyées à la fonction de callback
     562    */
     563    if (typeof ($.get) != "function") {
     564        $.get = function (a, b, c, d) {
     565            return jQuery.get(a, b, c, d);
     566        }
     567    }
     568    if (typeof ($.post) != "function") {
     569
     570        $.post = function (a, b, c, d) {
     571            return jQuery.post(a, b, c, d);
     572        }
     573        ;
     574
     575    }
     576
    579577}
    580578//--------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.