872771d0b98ad2cc7dadfe89c78c57bccc66d0b9.svn-base 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Ext JS Library 1.0 Beta 1 Copyright(c) 2006-2007, Ext JS, LLC.
  3. * licensing@extjs.com
  4. *
  5. * http://www.extjs.com/license
  6. */
  7. // script.aculo.us scriptaculous.js v1.7.0, Fri Jan 19 19:16:36 CET 2007
  8. // Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us,
  9. // http://mir.aculo.us)
  10. //
  11. // Permission is hereby granted, free of charge, to any person obtaining
  12. // a copy of this software and associated documentation files (the
  13. // "Software"), to deal in the Software without restriction, including
  14. // without limitation the rights to use, copy, modify, merge, publish,
  15. // distribute, sublicense, and/or sell copies of the Software, and to
  16. // permit persons to whom the Software is furnished to do so, subject to
  17. // the following conditions:
  18. //
  19. // The above copyright notice and this permission notice shall be
  20. // included in all copies or substantial portions of the Software.
  21. //
  22. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  23. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  24. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  25. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  26. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  27. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  28. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  29. //
  30. // For details, see the script.aculo.us web site: http://script.aculo.us/
  31. var Scriptaculous = {
  32. Version : '1.7.0',
  33. require : function(libraryName) {
  34. // inserting via DOM fails in Safari 2.0, so brute force approach
  35. document.write('<script type="text/javascript" src="' + libraryName
  36. + '"></script>');
  37. },
  38. load : function() {
  39. if ((typeof Prototype == 'undefined')
  40. || (typeof Element == 'undefined')
  41. || (typeof Element.Methods == 'undefined')
  42. || parseFloat(Prototype.Version.split(".")[0] + "."
  43. + Prototype.Version.split(".")[1]) < 1.5)
  44. throw ("script.aculo.us requires the Prototype JavaScript framework >= 1.5.0");
  45. $A(document.getElementsByTagName("script")).findAll(function(s) {
  46. return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
  47. }).each(function(s) {
  48. var path = s.src.replace(/scriptaculous\.js(\?.*)?$/, '');
  49. var includes = s.src.match(/\?.*load=([a-z,]*)/);
  50. (includes
  51. ? includes[1]
  52. : 'builder,effects,dragdrop,controls,slider').split(',')
  53. .each(function(include) {
  54. Scriptaculous.require(path + include + '.js')
  55. });
  56. });
  57. }
  58. }
  59. Scriptaculous.load();