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

[Autosize][beta] fix bugs.

File:
1 edited

Legend:

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

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