Ignore:
Timestamp:
Dec 9, 2010, 3:10:07 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] fix warning on jquery


Location:
extensions/Autosize/js
Files:
2 edited

Legend:

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

    r8007 r8057  
    13111311
    13121312
    1313 
    1314      $(function () {
    1315 
     1313$(function () {
    13161314         jQuery('#pamoorama').live('ON', function (e) {
    13171315             jQuery(jQuery('.debug').get(1)).trigger('ON');
     
    13561354
    13571355         // Add 10 testing debugs to start with
    1358 
     1356         jQuery(window).load(function () {
    13591357         if (DEBUG == "true") {
    13601358             for (var i = 0; i < 10; i++) {
     
    13641362
    13651363         }
    1366          //  }); //on load
     1364        }); //on load
    13671365     });
  • extensions/Autosize/js/conflit.js

    r7962 r8057  
    1 //==== autosize  remplace $(... avec jQuery( ====
    2 /*
    3 *[gmaps=id:1;width:800;height:640;]
    4 *       Luciano rv_gmaps
    5 * pb : Gmaps llgbo pamooramics rv_map
    6 */
    7 var d1 = 0;
    8 var init_tb = 0;
    9 var dom = {};
    10 
    11 if (typeof jQuery == 'undefined') {
    12     alert(" jQuery n'est pas chargé");
    13 } else {
    14     // jQuery est chargé
    15 }
    16 
    17 try{
    18     if (DEBUG == "true") {
    19 
    20     }
    21 }catch(e)
    22 {
    23     DEBUG = "false";
    24 }
     1//==== cl_conflit  remplace $(... avec jQuery( ====
     2
    253//===================================================
    264var detect = navigator.userAgent.toLowerCase();
     
    8765netscape = mybrowser.netscape || false;
    8866
    89 
    90 //========================================
    91 /*function $defined(A) {
    92 $ = _$2; //   ;
    93 return A != undefined;
    94 }
    95 */
    96 
    9767var time_out = 0;
    9868//===================================================
     
    11484    else if (retour.match(RegExp("rv_gmaps", "gi"))) {
    11585        ret_element = jQuery().$Prototype(element);
    116     } else if (retour.match(RegExp("GMaps", "gi"))) {
    117        
     86    } else if (retour.match(RegExp("GMaps", "gi"))) {     
    11887
    11988        ret_element = jQuery(element);
     
    167136    return ret_element;
    168137} // conflit(element,nc)
    169 
    170 
    171 
    172 
    173 
     138//======================================================
     139/*
     140*
     141*
     142*/
     143//======================================================
    174144jQuery(document).ready(
    175     function (jQuery) {
    176         jQuery(window).load(function () {
    177             //============================================================
    178             jQuery("#icon_gmaps").bind('click', function () {
     145       function (jQuery) {
     146            jQuery(window).load(function () {
     147             //============================================================
     148             jQuery("#icon_gmaps").bind('click', function () {
    179149
    180150                jQuery('html,body').stop().scrollTop(0);
     
    191161            if (typeof(Parent)=="undefined")
    192162                Parent = "#theImage";
    193 
    194             info_image = jQuery(Parent).infos();
    195             p0 = jQuery(Parent);
    196             if (p0.length > 0) {   
    197 
    198                 //======================================================
    199                 if (theme.match("gally", "gi"))
     163                info_image = jQuery(Parent).infos();
     164                p0 = jQuery(Parent);
     165                if (p0.length > 0) {   
     166                    //======================================================
     167                    if (theme.match("gally", "gi"))
    200168                    if (jQuery.isFunction(inittoolbar)) {
    201169                        if (typeof (currentTab) == "undefined") inittoolbar();
    202                         else initializeImageMode("resize");
    203                    
    204 
    205                     if (info_image.position != "static") {
    206                     //==== compatibilité Gally/LLGBO ===
    207                     //--- passage relative ==> static ===/
    208                     jQuery(Parent).css({ position: "static" } );
    209                     jQuery("#imageToolBar").css({ position: "relative", top: "0px" });
    210                     };
     170                            else initializeImageMode("resize");
     171                        if (info_image.position != "static") {
     172                            //==== compatibilité Gally/LLGBO ===
     173                            //--- passage relative ==> static ===/
     174                            jQuery(Parent).css({ position: "static" } );
     175                            jQuery("#imageToolBar").css({ position: "relative", top: "0px" });
     176                        };
     177                     }
    211178                }
    212             }
    213179            //   jQuery(window).resize();
    214 
    215180        });
    216         //=============================================================       
    217 
    218         //  $ = _$2; ;
    219 
    220 
    221     })
    222 ;
     181    //=============================================================       
     182    //  $ = _$2; ;
     183});
    223184
    224185
     
    228189jQuery.fn.extend({
    229190
    230     //---------------- luciano -------------------------------
    231     $Luciano: function (el, nc) {
    232         return document.id(el, nc, this.document);
    233     },
    234     //=============== PaMOOramics ===========================
    235 
    236     $Pamoorama: function (B) {
    237 
    238 
    239         if (!B) {
    240             if (typeof (B) == "boolean") return null;
    241 
    242         }
    243 
    244         try {
    245             if (B.htmlElement) {
    246                 return Garbage.collect(B);
    247             }
    248         } catch (e) {
    249 
    250         }
    251 
    252         if ([window, document].contains(B)) { return B; }
    253         var A = $type(B);
    254         if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
    255         if (A != "element") {
    256             return null;
    257         }
    258         if (B.htmlElement) { return Garbage.collect(B); }
    259         if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
    260         $extend(B, Element.prototype);
    261         B.htmlElement = function () { };
    262         try { return Garbage.collect(B); } catch (e) {
    263             return;
    264         }
    265 
    266     },
    267     //===================================================
    268     $Prototype: function (element) {
    269         //======== prototype.js =====================
    270         if (arguments.length > 1) {
    271             for (var i = 0, elements = [], length = arguments.length; i < length; i++)
    272                 elements.push($(arguments[i]));
    273             return elements;
    274         }
    275         if (typeof element == "string")
    276             element = document.getElementById(element);
    277 
    278         return Element.extend(element);
    279 
    280         try {
    281             new_element = Element.extend(element);
    282         } catch (e) {
    283             return new_element;
    284         }
    285         return new_element;
    286     }
    287     //=========================================================
     191//---------------- luciano -------------------------------
     192$Luciano: function (el, nc) {
     193return document.id(el, nc, this.document);
     194},
     195//=============== PaMOOramics ===========================
     196
     197$Pamoorama: function (B) {
     198
     199
     200if (!B) {
     201if (typeof (B) == "boolean") return null;
     202
     203}
     204
     205try {
     206if (B.htmlElement) {
     207return Garbage.collect(B);
     208}
     209} catch (e) {
     210
     211}
     212
     213if ([window, document].contains(B)) { return B; }
     214var A = $type(B);
     215if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
     216if (A != "element") {
     217return null;
     218}
     219if (B.htmlElement) { return Garbage.collect(B); }
     220if (["object", "embed"].contains(B.tagName.toLowerCase())) { return B; }
     221$extend(B, Element.prototype);
     222B.htmlElement = function () { };
     223try { return Garbage.collect(B); } catch (e) {
     224return;
     225}
     226
     227},
     228//===================================================
     229$Prototype: function (element) {
     230//======== prototype.js =====================
     231if (arguments.length > 1) {
     232for (var i = 0, elements = [], length = arguments.length; i < length; i++)
     233elements.push($(arguments[i]));
     234return elements;
     235}
     236if (typeof element == "string")
     237element = document.getElementById(element);
     238
     239return Element.extend(element);
     240
     241try {
     242new_element = Element.extend(element);
     243} catch (e) {
     244return new_element;
     245}
     246return new_element;
     247}
     248//=========================================================
    288249});    // fin extend
    289250
     
    509470//====================================
    510471
    511 
    512 (function ($) {
    513     $(document).ready(function () {
    514         jQuery(window).load(function () {
    515             a = jQuery(':Description');
    516         });
    517     });
    518     //==============================================
    519     librairies=[];
    520     jQuery.extend(jQuery.expr[':'], {
    521         // Nom du sélecteur personnalisé
    522         Description: function (a) {
    523             n = jQuery(a).infos();
    524             if (n.id != "") {
    525                 //alert("<" + n.nodeName  +" id= " + n.id    + " >") ;
    526             }
    527             if (n.nodeName == "SCRIPT")
    528                 if (a.src == "") {
    529                     Match = jQuery(a).html();
    530                     /*
    531                     if ( Match.match(new RegExp("jQuery", "gi") )) {
    532                     alert(n.id + n.nodeName + a.outerHTML ) ;
    533                     }
    534                     if ( Match.match(new RegExp("ajax", "gi") )) {
    535                     alert(n.id + n.nodeName + a.outerHTML ) ;
    536                     }
    537                     */
    538                     if (Match.match(new RegExp("\\$", "gi"))) {
    539 
    540                         if (Match.match(new RegExp("ajax", "gi"))) {
    541                             //     alert(n.id + n.nodeName + a.outerHTML);
    542 
    543                         }
    544                     }
    545                     if (Match.match(new RegExp("pamoorama", "ig"))) {
    546 
    547                         //     alert(n.id + n.nodeName + a.innerHTML);
    548 
    549                     }
    550                 } else {
    551 
    552                     if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) {
    553                         jQuery.noop;
    554                         librairies.push(a.src);
    555                     }
    556 
    557                 }
    558 
    559             return a;
    560 
    561         }
    562     }); //fin extend
    563     /*
    564     *
    565     */
    566 })(jQuery);
    567 
    568  
    569472 
    570473$_0= $;
Note: See TracChangeset for help on using the changeset viewer.