Changeset 8185 for extensions/Autosize


Ignore:
Timestamp:
Dec 18, 2010, 11:29:52 AM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] fix bug whith user tags


Location:
extensions/Autosize
Files:
3 edited

Legend:

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

    r8093 r8185  
    1010
    1111//[gmaps=id:2;width:200;height:120;]
     12
     13
    1214
    1315
  • extensions/Autosize/js/conflit.js

    r8093 r8185  
    126126    if (ret_element != "")
    127127        return ret_element;
    128        
    129     n = document;
    130     v = window;
    131          nbpa += 1;
     128
    132129    if (typeof (element) == "string") {
    133130        if (element.match("^#|.ui", "gi")) {
     
    226223
    227224
    228 if (!B) {
    229 if (typeof (B) == "boolean") return null;
    230 
    231 }
    232 
    233 try {
    234 if (B.htmlElement) {
    235 return Garbage.collect(B);
    236 }
    237 } catch (e) {
    238 
    239 }
    240 
    241 if ([window, document].contains(B)) { return B; }
    242 var A = $type(B);
    243 if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
    244 if (A != "element") {
    245 return null;
    246 }
    247 if (B.htmlElement) { return Garbage.collect(B); }
    248 if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
    249 $extend(B, Element.prototype);
    250 B.htmlElement = function () { };
    251 try { return Garbage.collect(B); } catch (e) {
    252 return;
    253 }
    254 
    255 },
    256 //===================================================
    257 $Prototype: function (element) {
    258 //======== prototype.js =====================
    259 if (arguments.length > 1) {
    260     for (var i = 0, elements = [], length = arguments.length; i < length; i++)
    261         elements.push($(arguments[i]));
    262         return elements;
    263 }
    264 if (typeof element == "string")
    265     element = document.getElementById(element);
    266 
    267 //return Element.extend(element);
    268 
    269     try {
    270         new_element = Element.extend(element);
    271     } catch (e) {
     225        if (!B) {
     226            if (typeof (B) == "boolean") return null;
     227
     228        }
     229
     230        try {
     231            if (B.htmlElement) {
     232                return Garbage.collect(B);
     233            }
     234        } catch (e) {
     235
     236        }
     237
     238        if ([window, document].contains(B)) { return B; }
     239        var A = $type(B);
     240        if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
     241        if (A != "element") {
     242            return null;
     243        }
     244        if (B.htmlElement) { return Garbage.collect(B); }
     245        if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
     246        $extend(B, Element.prototype);
     247        B.htmlElement = function () { };
     248        try { return Garbage.collect(B); } catch (e) {
     249            return;
     250        }
     251
     252    },
     253    //===================================================
     254    $Prototype: function (element) {
     255        //======== prototype.js =====================
     256        if (arguments.length > 1) {
     257            for (var i = 0, elements = [], length = arguments.length; i < length; i++)
     258                elements.push($(arguments[i]));
     259            return elements;
     260        }
     261        if (typeof element == "string")
     262            element = document.getElementById(element);
     263
     264        return Element.extend(element);
     265
     266        try {
     267            new_element = Element.extend(element);
     268        } catch (e) {
     269            return new_element;
     270        }
    272271        return new_element;
    273272    }
    274     return new_element;
    275 }
    276 //=========================================================
     273    //=========================================================
    277274});    // fin extend
    278275
     
    504501$_ = $;
    505502function save_framework(page) {
    506 
    507503    try {
    508504        Conflit = { version: cl_version, name: cl_plugin };
     
    510506
    511507    }
    512    
    513     $_2 = $;
     508        $_2 = $;
    514509    return
    515 
    516 }
     510    }
    517511
    518512(function ($) {
     
    564558            }
    565559        }
     560        if (typeof ($.post) != "function") {
     561
     562            $.post = function (a, b, c,d) {
     563                return jQuery.post(a, b, c, d);
     564            }
     565            ;
     566
     567        }
     568       
     569
    566570 
    567571}
  • extensions/Autosize/template/conflit.tpl

    r8093 r8185  
    11{html_head}
    2   <!--- {$AUTOSIZE_PATH}template/confilt.tpl (head) ---> 
    3   <!--- Ajout scripts {$AUTOSIZE_PATH}--->   
    4 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"  now=1}<!--- RECHARGE DE {$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"} --->
    5 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}<!---{$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"} --->
    6  {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}<!--- {$AUTOSIZE_PATH|@cat:"js/conflit.js"} --->
     2 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"  now=1}
     3 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"}
     4 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"}
    75
    86<script type="text/javascript">
     
    108</script>
    119
    12 <!--- fin Ajout scripts  --->
     10
    1311<script type="text/javascript">
    1412    var theme = '{$theme}';
     
    2624{/if}
    2725</script>
    28 <!---FIN Autosize/template/confilt.tpl (/head) --->     
     26
    2927{/html_head}
    30 <!---{$ROOT_URL} --- {$AUTOSIZE_PATH}template/confilt.tpl (body) ---> 
    31 <!---FIN {$ROOT_URL} --- {$AUTOSIZE_PATH}template/confilt.tpl (body) --->       
     28 
Note: See TracChangeset for help on using the changeset viewer.