[ Index ]
 

Code source de WordPress 2.1.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/wp-includes/js/scriptaculous/ -> wp-scriptaculous.js (source)

   1  // Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
   2  // 
   3  // Permission is hereby granted, free of charge, to any person obtaining
   4  // a copy of this software and associated documentation files (the
   5  // "Software"), to deal in the Software without restriction, including
   6  // without limitation the rights to use, copy, modify, merge, publish,
   7  // distribute, sublicense, and/or sell copies of the Software, and to
   8  // permit persons to whom the Software is furnished to do so, subject to
   9  // the following conditions:
  10  // 
  11  // The above copyright notice and this permission notice shall be
  12  // included in all copies or substantial portions of the Software.
  13  
  14  var Scriptaculous = {
  15    Version: '1.6.1',
  16    require: function(libraryName) {
  17      // inserting via DOM fails in Safari 2.0, so brute force approach
  18      document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
  19    },
  20    load: function() {
  21      if((typeof Prototype=='undefined') || 
  22         (typeof Element == 'undefined') || 
  23         (typeof Element.Methods=='undefined') ||
  24         parseFloat(Prototype.Version.split(".")[0] + "." +
  25                    Prototype.Version.split(".")[1]) < 1.5)
  26         throw("script.aculo.us requires the Prototype JavaScript framework >= 1.5.0");
  27      
  28      $A(document.getElementsByTagName("script")).findAll( function(s) {
  29        return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
  30      }).each( function(s) {
  31        var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
  32        var includes = s.src.match(/\?.*load=([a-z,]*)/);
  33        if ( includes )
  34         includes[1].split(',').each(
  35         function(include) { Scriptaculous.require(path+include+'.js') });
  36      });
  37    }
  38  }
  39  
  40  Scriptaculous.load();


Généré le : Fri Mar 30 19:41:27 2007 par Balluche grâce à PHPXref 0.7