Ignore:
Timestamp:
Nov 17, 2010, 5:04:11 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] save

File:
1 edited

Legend:

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

    r7741 r7805  
    88var d1 = 0;
    99var init_tb = 0;
    10 //$ = jQuery.noConflict();
    11 
     10var dom = {};
     11if (typeof jQuery == 'undefined') {
     12    alert(" jQuery n'est pas chargé");
     13} else {
     14    // jQuery est chargé
     15}
     16 
     17function $(element, nc0) {
     18     a = conflit(element, nc0);
     19    return a;
     20            }
     21
     22         
     23         
    1224//===================================================
    13 function $(element, nc) {
    14 
    15         return conflit(element, nc)
    16     }
    17 
     25
     26    var time_out = 0;
    1827//===================================================
     28
     29    nbpa = 0;
     30    var Fn;
    1931function conflit(element, nc) {
    20     var retour = (getStackTrace());
    21  
    22 var ret_element = "";
    23 if (retour.match(RegExp("jQuery", "gi"))) {
    24     ret_element = jQuery(element);
    25 }
     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        }
    2643        else if (retour.match(RegExp("rv_gmaps", "gi"))) {
    2744        ret_element = jQuery().$Prototype(element);
     
    2946        ret_element = jQuery(element);
    3047    } else if (retour.match(RegExp("pamooramics", "gi"))) {
    31     ret_element = jQuery().$Pamoorama(element);
     48
     49        ret_element = jQuery().$Pamoorama(element);
     50       
     51    if (retour.match(RegExp("init_", "gi"))) {
     52
     53   }
     54    nbpa +=1 ;
     55
    3256} else if (retour.match(RegExp("luciano", "gi"))) {
    3357    ret_element = jQuery().$Luciano(element);
     
    4771} else if (typeof (element) == "function") {
    4872    fn = element.toString();
    49     if (fn.match("#pwg", "gi")) {
     73    if (fn.match("#pwg|open", "gi")) {
    5074        ret_element = jQuery(element);
    5175        return ret_element;
     
    6791}
    6892 return  ret_element ;
    69 }
    70 
    71 //============================================================
     93} // conflit(element,nc)
     94
     95
     96
     97
     98
    7299jQuery(document).ready(
    73100    function (jQuery) {
    74101        jQuery(window).load(function () {
    75             function $(element, nc) {
    76                 return conflit(element, nc);
     102            //============================================================
     103            jQuery("#icon_gmaps").bind('click', function () {
     104
     105                jQuery('html,body').stop().scrollTop(0);
     106                jQuery('html,body').stop().scrollLeft(0);
     107                jQuery(".ui-widget-overlay").css("opacity", "0.75");
     108
     109                l1 = (jQuery(window).width() - (jQuery(".gmapsPopup").width())) / 2;
     110                h1 = (jQuery(window).height() - (jQuery(".gmapsPopup").height())) / 2;
     111
     112                jQuery(".gmapsPopup").css("left", l1 + "px");
     113                jQuery(".gmapsPopup").css("top", h1 + "px");
     114            })
     115            //=============================================================               
     116            function $(element, nc0) {
     117                a = conflit(element, nc0);
     118                return a;
    77119            }
    78120            p0 = jQuery("#theImage");
    79121            if (p0.length) {
     122
     123                //======================================================
    80124                if (theme.match("gally", "gi"))
    81                     if (isFunction(inittoolbar)) {
     125                    if (jQuery.isFunction(inittoolbar)) {
    82126                        if (typeof (currentTab) == "undefined") inittoolbar();
    83127                        else initializeImageMode("resize");
     
    88132                    //==== compatibilité Gally/LLGBO ===
    89133                    //--- passage relative ==> static ===/
    90                     jQuery("#theImage").css({ position: "static",
    91                         opacity: '0', filter: 'alpha(opacity= 0)'
     134                    jQuery("#theImage").css({ position: "static"
    92135                    }
    93136
    94                    );
     137                    );
    95138                    jQuery("#imageToolBar").css({ position: "relative", top: "0px" });
    96139                }
     
    99142
    100143        });
     144        //=============================================================       
     145
     146         //  $ = _$2; ;
     147
    101148
    102149    })
    103150;
    104151
    105 function isFunction(fn) {
    106     tpfn = typeof (fn);
    107     if (tpfn == "function") return true;
    108 }
     152
     153
    109154//=========================================================
    110 (function ($2) {
    111 ajax: function () {return jQuery.ajax;
    112 }
    113 return jQuery;
    114 $2.fn.panorama2 =
    115 function (height, width) {               
    116 var src =jQuery(this);
    117 return ;
    118 }
    119 
     155; (function ($) {
    120156
    121157})(jQuery);
     158//mootools
     159/* */
     160_$2 = $;
     161 
     162function $defined(A) {
     163    $= _$2  ; //   ;
     164    return A != undefined;
     165}
     166 
     167 
     168
    122169
    123170
    124171jQuery.fn.extend({
    125      
    126     //---------------- luciano -------------------------------
    127     $Luciano: function (el, nc) {
    128         return document.id(el, nc, this.document);
    129     },
    130     //=============== PaMOOramics ===========================
    131 
    132     $Pamoorama: function (B) {
    133         if (!B) {
    134             if (typeof (B) == "boolean") return null;
    135 
    136         }
     172
     173//---------------- luciano -------------------------------
     174$Luciano: function (el, nc) {
     175return document.id(el, nc, this.document);
     176},
     177//=============== PaMOOramics ===========================
     178
     179$Pamoorama: function (B) {
     180   
     181
     182if (!B) {
     183if (typeof (B) == "boolean") return null;
     184
     185}
    137186       
    138             try {
    139                 if (B.htmlElement) {
    140                     return Garbage.collect(B);
    141                 }
    142             } catch (e) {
     187try {
     188if (B.htmlElement) {
     189return Garbage.collect(B);
     190}
     191} catch (e) {
    143192           
    144             }
    145 
    146         if ([window, document].contains(B)) { return B; }
    147         var A = $type(B);
    148         if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
    149         if (A != "element") {
    150             return null;
    151         }
    152         if (B.htmlElement) { return Garbage.collect(B); }
    153         if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
    154         $extend(B, Element.prototype);
    155         B.htmlElement = function () { };
    156         try { return Garbage.collect(B); } catch (e) {
    157             return;
    158         }
    159 
    160     },
    161     //===================================================
    162     $Prototype: function (element) {
    163         //======== prototype.js =====================
    164         if (arguments.length > 1) {
    165             for (var i = 0, elements = [], length = arguments.length; i < length; i++)
    166                 elements.push($(arguments[i]));
    167             return elements;
    168         }
    169         if (typeof element == "string")
    170             element = document.getElementById(element);
    171 
    172         return Element.extend(element);
    173 
    174         try {
    175             new_element = Element.extend(element);
    176         } catch (e) {
    177             return new_element;
    178         }
    179         return new_element;
    180     }
    181     //=========================================================
     193}
     194
     195if ([window, document].contains(B)) { return B; }
     196var A = $type(B);
     197if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
     198if (A != "element") {
     199return null;
     200}
     201if (B.htmlElement) { return Garbage.collect(B); }
     202if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
     203$extend(B, Element.prototype);
     204B.htmlElement = function () { };
     205try { return Garbage.collect(B); } catch (e) {
     206return;
     207}
     208
     209},
     210//===================================================
     211$Prototype: function (element) {
     212//======== prototype.js =====================
     213if (arguments.length > 1) {
     214for (var i = 0, elements = [], length = arguments.length; i < length; i++)
     215elements.push($(arguments[i]));
     216return elements;
     217}
     218if (typeof element == "string")
     219element = document.getElementById(element);
     220
     221return Element.extend(element);
     222
     223try {
     224new_element = Element.extend(element);
     225} catch (e) {
     226return new_element;
     227}
     228return new_element;
     229}
     230//=========================================================
    182231});    // fin extend
    183232
     
    202251        var e_message = e.message;
    203252        var  e_stack = e.stack;
    204 if (e_stack) { //Firefox Opera 3.6
    205 //=== test fichier source =============
    206 var lines = e.stack.split("\n");
    207 for (var i = 0, len = lines.length; i < len; i++) {
    208 var Src_Match = lines[i];
    209 if (Src_Match.match(/conflit.js/)) {
    210 //
    211 } else {
    212 if (Src_Match.match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
    213 callstack.push(Src_Match); //php?
    214 } else {
    215 callstack.push(Src_Match);
    216 }
    217 if (Src_Match.match("GMaps|applyMap|markupMaps|applyMarkers")) {
    218 callstack.push("GMaps");
    219 isCallstackPopulated = true;
    220 break;
    221 }
    222 if (Src_Match.match("rv_gmaps", "gi")) {
    223 callstack.push("rv_gmaps");
    224 isCallstackPopulated = true;
    225 break;
    226 }
    227 if (Src_Match.match("paMOOramics")) {
    228 isCallstackPopulated = true;
    229 callstack.push("paMOOramics");
    230 break;
    231 }
    232 if (Src_Match.match("Luciano","gi")) {
    233 callstack.push("Luciano");
    234 isCallstackPopulated = true;
    235 break;
    236 }
    237 if (Src_Match.match("main")) {
    238 alert(Src_Match)
    239 callstack.push("main");
    240 isCallstackPopulated = true;
    241 break;
    242 }
    243 
    244 if (Src_Match.match("jQuery")) {
    245 callstack.push("jQuery");
    246 isCallstackPopulated = true;
    247 break;
    248 }
    249 }
    250 }
    251 //callstack.shift();
     253        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;
    252301}
    253302if (window.opera && e.message && isCallstackPopulated == false) {
     
    264313}
    265314callstack.push(entry);
    266  isCallstackPopulated = true;
     315 //isCallstackPopulated = true;
    267316}
    268317}
     
    276325    callstack = [];
    277326    all_functions = [];
     327    state = "";
    278328    if (currentFunction == null) {
    279329        return ("");
    280330    }
    281     var fn1 = currentFunction.toString();
     331    states = [];
     332    var fn1 = currentFunction.toString(); // fonction d'appel local (conflit)
     333   
     334    currentFunction = currentFunction.caller;
    282335    currentFunction = currentFunction.caller;
    283336    //$family
     337
    284338    while (currentFunction) {
    285339        var fn = currentFunction.toString();
    286          
    287 
    288         var fname = fn.substring(fn.indexOf("function") + 8, fn.indexOf("(")) || " ";
    289         if (fname != " $") {
     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        }
    290352            callstack.push(fn);
    291             // if (fname != " $") callstack.push(fn);
     353           
    292354                if (fn.match(RegExp("jquery|switchmenu|switchTabs|switchInterface|gally|initializeImageMode", "gi"))) {
    293                     callstack = [];
    294                     callstack.push('jQuery');
    295                     break;
     355                    states.push('jQuery');
     356                   
     357                }
     358                if (fn.match(RegExp("dialog..open", "gi"))) {
     359                    states.push('GMaps');
     360                   
    296361                }
    297362                if (fn.match(RegExp("GMaps|applyMap|markupMaps|applyMarkers", "gi"))) {
    298                     callstack = [];
    299                     callstack.push('GMaps');
    300                     break;
     363                    states.push('GMaps');
     364                     
    301365                }
    302366                //======================
    303367                if (fn.match(RegExp("_footer|ie_ready|makeDraggable|droppables", "gi"))) {
    304                     callstack = [];
    305                     callstack.push('paMOOramics');
    306                     break;
     368
     369                    states.push('paMOOramics');
     370                   
    307371                }
    308372                if (fn.match(RegExp("observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) {
    309                     callstack = [];
    310                     callstack.push('rv_gmaps');
    311                     break;
     373                    states.push('rv_gmaps');
     374                     
    312375                }
    313376                //? bubble 
    314                 Expression = new RegExp("\$", "gi")
     377                Expression = new RegExp("\\$", "gi")
    315378                if (fn.match(Expression)) {
    316379                    if (fn.match(RegExp("rateForm", "gi"))) {
    317                         callstack = [];
    318                         callstack.push('Luciano');
    319                         break;
     380
     381                        states.push('Luciano');
     382                       
    320383                    }
    321384                }
    322385                if (fn.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) {  //luciano
    323                     callstack = [];
    324                     callstack.push('Luciano');
    325                     break;
    326                 }
    327 
    328             }
     386
     387                    states.push('Luciano');
     388                     
     389                }
     390
     391                if (all_functions.length > 50) break;
     392
    329393         
    330394        currentFunction = currentFunction.caller;
     
    332396 
    333397}
    334    
    335     return callstack.join('\n');
    336 }
     398state = states.join('\n');
     399Fn = all_functions;
     400    return { state:state , fn:callstack.join('\n') };
     401}
     402//====================================
     403jQuery(window).load(function () {
     404
     405a= jQuery(':Description');
     406
     407     
     408});
     409           
     410
     411
     412
     413//==============================================
     414jQuery.extend(jQuery.expr[':'], {
     415    // Nom du sélecteur personnalisé
     416    Description: function (a) {
     417        n = jQuery(a).infos();
     418        if (n.id != "") {
     419            //alert("<" + n.nodeName  +" id= " + n.id    + " >") ;
     420        }
     421        if (n.nodeName == "SCRIPT")
     422            if (a.src == "") {
     423                Match = jQuery(a).html();
     424                /*
     425                if ( Match.match(new RegExp("jQuery", "gi") )) {
     426                alert(n.id + n.nodeName + a.outerHTML ) ;
     427                }
     428                if ( Match.match(new RegExp("ajax", "gi") )) {
     429                alert(n.id + n.nodeName + a.outerHTML ) ;
     430                }
     431                */
     432                if (Match.match(new RegExp("\\$", "gi"))) {
     433
     434                    if (Match.match(new RegExp("ajax", "gi"))) {
     435                          alert(n.id + n.nodeName + a.outerHTML);
     436
     437                    }
     438                }
     439                if (Match.match(new RegExp("pamoorama", "ig"))) {
     440                   
     441               //     alert(n.id + n.nodeName + a.innerHTML);
     442
     443                }
     444            }
     445
     446        return a;
     447
     448    }
     449});
     450 
     451jQuery("#pamoorama").bind("load", { foo: "bar" }, function release(event) { 
     452//setTimeout("end_Timer()", 100);
     453 
     454  //  event.stopPropagation();
     455})
     456function end_Timer() {   
     457alert("load pamoorama");
     458 
     459}
     460jQuery().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 }
Note: See TracChangeset for help on using the changeset viewer.