dom/tests/mochitest/ajax/scriptaculous/src/scriptaculous.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/mochitest/ajax/scriptaculous/src/scriptaculous.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,58 @@
     1.4 +// script.aculo.us scriptaculous.js v1.7.1_beta2, Tue May 15 15:15:45 EDT 2007
     1.5 +
     1.6 +// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
     1.7 +// 
     1.8 +// Permission is hereby granted, free of charge, to any person obtaining
     1.9 +// a copy of this software and associated documentation files (the
    1.10 +// "Software"), to deal in the Software without restriction, including
    1.11 +// without limitation the rights to use, copy, modify, merge, publish,
    1.12 +// distribute, sublicense, and/or sell copies of the Software, and to
    1.13 +// permit persons to whom the Software is furnished to do so, subject to
    1.14 +// the following conditions:
    1.15 +// 
    1.16 +// The above copyright notice and this permission notice shall be
    1.17 +// included in all copies or substantial portions of the Software.
    1.18 +//
    1.19 +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    1.20 +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    1.21 +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    1.22 +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
    1.23 +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
    1.24 +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
    1.25 +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    1.26 +//
    1.27 +// For details, see the script.aculo.us web site: http://script.aculo.us/
    1.28 +
    1.29 +var Scriptaculous = {
    1.30 +  Version: '1.7.1_beta2',
    1.31 +  require: function(libraryName) {
    1.32 +    // inserting via DOM fails in Safari 2.0, so brute force approach
    1.33 +    document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
    1.34 +  },
    1.35 +  REQUIRED_PROTOTYPE: '1.5.1',
    1.36 +  load: function() {
    1.37 +    function convertVersionString(versionString){
    1.38 +      var r = versionString.split('.');
    1.39 +      return parseInt(r[0])*100000 + parseInt(r[1])*1000 + parseInt(r[2]);
    1.40 +    }
    1.41 + 
    1.42 +    if((typeof Prototype=='undefined') || 
    1.43 +       (typeof Element == 'undefined') || 
    1.44 +       (typeof Element.Methods=='undefined') ||
    1.45 +       (convertVersionString(Prototype.Version) < 
    1.46 +        convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE)))
    1.47 +       throw("script.aculo.us requires the Prototype JavaScript framework >= " +
    1.48 +        Scriptaculous.REQUIRED_PROTOTYPE);
    1.49 +    
    1.50 +    $A(document.getElementsByTagName("script")).findAll( function(s) {
    1.51 +      return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
    1.52 +    }).each( function(s) {
    1.53 +      var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
    1.54 +      var includes = s.src.match(/\?.*load=([a-z,]*)/);
    1.55 +      (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each(
    1.56 +       function(include) { Scriptaculous.require(path+include+'.js') });
    1.57 +    });
    1.58 +  }
    1.59 +}
    1.60 +
    1.61 +Scriptaculous.load();
    1.62 \ No newline at end of file

mercurial