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

[cl_conflit] compatibility whith piwishack


File:
1 edited

Legend:

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

    r8587 r8629  
    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    }
     
    100100        {
    101101
    102          ret_element = myjQuery().$Prototype(element);
     102            ret_element = myjQuery().$Prototype(element);
    103103
    104104        }
     
    168168//======================================================
    169169jQuery(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        });
     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
     187            //   jQuery(window).resize();
     188        });
     189        //=============================================================       
     190        //  $ = _$2; ;
     191    });
    217192
    218193
     
    222197jQuery.fn.extend({
    223198
    224 //---------------- luciano -------------------------------
    225 $Luciano: function (el, nc) {
    226 return document.id(el, nc, this.document);
    227 },
    228 //=============== PaMOOramics ===========================
    229 
    230 $Pamoorama: function (B) {
     199    //---------------- luciano -------------------------------
     200    $Luciano: function (el, nc) {
     201        return document.id(el, nc, this.document);
     202    },
     203    //=============== PaMOOramics ===========================
     204
     205    $Pamoorama: function (B) {
    231206
    232207
     
    448423
    449424                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           }
     425                break;
     426            }
     427            //window_1290934905697_top
     428            if (fn.match(RegExp("window_..|WindowUtilities", "gi"))) {
     429                states.push('rv_gmaps');
     430                break;
     431            }
     432            if (fn.match(RegExp("that.overlayOpacity", "gi"))) {
     433                states.push('rv_gmaps');
     434                break;
     435            }
     436            if (fn.match(RegExp("For backward compatibility like win", "gi"))) {
     437                states.push('rv_gmaps');
     438                break;
     439            }
     440            if (fn.match(RegExp("overlay_modal|HTMLDivElement|constraintPad", "gi"))) {
     441                states.push('rv_gmaps');
     442                break;
     443            }
    469444
    470445            if (fn.match(RegExp("__content|__method|observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) {
     
    474449
    475450
    476             if (all_functions.length > 50) 
    477             break;
     451            if (all_functions.length > 50)
     452                break;
    478453
    479454
     
    482457
    483458    }
    484   // state_ff + "|" +
     459    // state_ff + "|" +
    485460    state = states.join('\n');
    486461    if (state == "") {
     
    499474
    500475    Fn = all_functions;
    501     return { state: state, fn: callstack.join('\n'),fn1:fn2 };
     476    return { state: state, fn: callstack.join('\n'), fn1: fn2 };
    502477}
    503478//====================================
    504479test_conflit = false;
    505  librairies =new Array;
     480librairies = new Array;
    506481
    507482
     
    509484$_ = $;
    510485function save_framework(page) {
     486    // theGategoryPage,theRegisterPage
     487    // thePicturePage
     488    // si admin.php page = "",theIdentificationPage
    511489    try {
    512490        Conflit = { version: cl_version, name: cl_plugin };
     
    514492
    515493    }
    516         $_2 = $;
     494    if (typeof (Parent) == "undefined")
     495        Parent = "#theImage";
     496    info_image = jQuery(Parent).infos();
     497    p0 = jQuery(Parent);
     498    if (p0.length > 0) {
     499        //======================================================
     500        if (info_image.position != "static") {
     501            try {
     502                if (theme.match("gally", "gi")) {
     503                    if (typeof gallyPP != "undefined") {
     504
     505                    } else if (jQuery.isFunction(inittoolbar)) {
     506                        if (typeof (currentTab) == "undefined") inittoolbar();
     507                        else initializeImageMode("resize");
     508                    };
     509                    //==== compatibilité Gally/LLGBO ===                 
     510                    jQuery(Parent).css({ position: "static" });         
     511
     512                }
     513            } catch (e) {
     514            }
     515
     516        }
     517    }
     518     
     519    $_2 = $;
    517520    return
    518     }
     521}
    519522
    520523(function ($) {
    521     $(document).ready(function () {   
    522           //=================================================
    523           if (typeof  jQuery.fn.infos !="function")
    524           {
    525                jQuery=myjQuery;
    526                $=my$ ;
    527                }
    528         });
     524    $(document).ready(function () {
     525        //=================================================
     526        if (typeof jQuery.fn.infos != "function") {
     527            jQuery = myjQuery;
     528            $ = my$;
     529        }
     530    });
    529531
    530532})(jQuery);
    531533
    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        
    546         if (typeof ($.ajax) != "function") {
    547             $.ajax = function (origSettings) {
    548                 jQuery.ajax(origSettings);
    549             }
    550 
    551 
    552             $.parseJSON = function (msg) {
    553                 return jQuery.parseJSON(msg);
    554             }
    555 
    556 
    557         }
    558         //============================================
    559         /* url (String): URl de la page à charger
    560         * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur.
    561         * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées.
    562         * type (String): (optionnel) format des données renvoyées à la fonction de callback
    563         */
    564         if (typeof ($.get) != "function") {
    565             $.get = function ( a, b, c, d) {
    566                 return jQuery.get(a, b, c,d );
    567             }
    568         }
    569         if (typeof ($.post) != "function") {
    570 
    571             $.post = function (a, b, c,d) {
    572                 return jQuery.post(a, b, c, d);
    573             }
    574             ;
    575 
    576         }
    577        
    578 
     534if (test_conflit != true) {
     535    //--------------------------------------------------------------
     536    $_0 = $;
     537
     538    function $(element, nc0) {
     539        if (typeof jQuery.fn.infos != "function")
     540            if (typeof myjQuery != "undefined")
     541                jQuery = myjQuery;
     542        a = conflit(element, nc0);
     543        return a;
     544    }
     545
     546    if (typeof ($.ajax) != "function") {
     547        $.ajax = function (origSettings) {
     548            jQuery.ajax(origSettings);
     549        }
     550
     551
     552        $.parseJSON = function (msg) {
     553            return jQuery.parseJSON(msg);
     554        }
     555
     556
     557    }
     558    //============================================
     559    /* url (String): URl de la page à charger
     560    * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur.
     561    * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées.
     562    * type (String): (optionnel) format des données renvoyées à la fonction de callback
     563    */
     564    if (typeof ($.get) != "function") {
     565        $.get = function (a, b, c, d) {
     566            return jQuery.get(a, b, c, d);
     567        }
     568    }
     569    if (typeof ($.post) != "function") {
     570
     571        $.post = function (a, b, c, d) {
     572            return jQuery.post(a, b, c, d);
     573        }
     574        ;
     575
     576    }
    579577 
    580578}
Note: See TracChangeset for help on using the changeset viewer.