ajaxlibs 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +97 -0
  5. data/Rakefile +45 -0
  6. data/VERSION +1 -0
  7. data/lib/ajaxlibs/constants.rb +3 -0
  8. data/lib/ajaxlibs/exceptions.rb +8 -0
  9. data/lib/ajaxlibs/includes_helper.rb +90 -0
  10. data/lib/ajaxlibs/libraries/jquery.rb +10 -0
  11. data/lib/ajaxlibs/libraries/jqueryui.rb +16 -0
  12. data/lib/ajaxlibs/libraries/prototype.rb +5 -0
  13. data/lib/ajaxlibs/libraries/scriptaculous.rb +9 -0
  14. data/lib/ajaxlibs/library.rb +73 -0
  15. data/lib/ajaxlibs/versions_tools.rb +16 -0
  16. data/lib/ajaxlibs.rb +34 -0
  17. data/public/jquery/1.2.3/jquery.js +3408 -0
  18. data/public/jquery/1.2.6/jquery.js +3549 -0
  19. data/public/jquery/1.3.0/jquery.js +4241 -0
  20. data/public/jquery/1.3.1/jquery.js +4241 -0
  21. data/public/jquery/1.3.2/jquery.js +4376 -0
  22. data/public/jquery/1.4.0/jquery.js +5999 -0
  23. data/public/jquery/1.4.1/jquery.js +6078 -0
  24. data/public/jquery/1.4.2/jquery.js +6240 -0
  25. data/public/jqueryui/1.5.2/jquery-ui.js +7598 -0
  26. data/public/jqueryui/1.5.3/jquery-ui.js +7616 -0
  27. data/public/jqueryui/1.6/jquery-ui.js +8862 -0
  28. data/public/jqueryui/1.7.0/jquery-ui.js +9049 -0
  29. data/public/jqueryui/1.7.1/jquery-ui.js +9074 -0
  30. data/public/jqueryui/1.7.2/jquery-ui.js +9133 -0
  31. data/public/mootools/1.1.1/mootools.js +7102 -0
  32. data/public/mootools/1.1.2/mootools.js +7102 -0
  33. data/public/mootools/1.2.1/mootools.js +3946 -0
  34. data/public/mootools/1.2.2/mootools.js +4003 -0
  35. data/public/mootools/1.2.3/mootools.js +4036 -0
  36. data/public/mootools/1.2.4/mootools.js +4329 -0
  37. data/public/prototype/1.6.0.2/prototype.js +4221 -0
  38. data/public/prototype/1.6.0.3/prototype.js +4320 -0
  39. data/public/prototype/1.6.1.0/prototype.js +4874 -0
  40. data/public/scriptaculous/1.8.1/builder.js +136 -0
  41. data/public/scriptaculous/1.8.1/controls.js +965 -0
  42. data/public/scriptaculous/1.8.1/dragdrop.js +974 -0
  43. data/public/scriptaculous/1.8.1/effects.js +1122 -0
  44. data/public/scriptaculous/1.8.1/scriptaculous.js +58 -0
  45. data/public/scriptaculous/1.8.1/slider.js +275 -0
  46. data/public/scriptaculous/1.8.1/sound.js +55 -0
  47. data/public/scriptaculous/1.8.2/builder.js +136 -0
  48. data/public/scriptaculous/1.8.2/controls.js +965 -0
  49. data/public/scriptaculous/1.8.2/dragdrop.js +975 -0
  50. data/public/scriptaculous/1.8.2/effects.js +1130 -0
  51. data/public/scriptaculous/1.8.2/scriptaculous.js +60 -0
  52. data/public/scriptaculous/1.8.2/slider.js +275 -0
  53. data/public/scriptaculous/1.8.2/sound.js +55 -0
  54. data/public/scriptaculous/1.8.3/builder.js +136 -0
  55. data/public/scriptaculous/1.8.3/controls.js +965 -0
  56. data/public/scriptaculous/1.8.3/dragdrop.js +974 -0
  57. data/public/scriptaculous/1.8.3/effects.js +1123 -0
  58. data/public/scriptaculous/1.8.3/scriptaculous.js +68 -0
  59. data/public/scriptaculous/1.8.3/slider.js +275 -0
  60. data/public/scriptaculous/1.8.3/sound.js +59 -0
  61. data/spec/includes_helper_spec.rb +139 -0
  62. data/spec/library_spec.rb +84 -0
  63. data/spec/spec.opts +1 -0
  64. data/spec/spec_helper.rb +14 -0
  65. data/spec/versions_tools_spec.rb +27 -0
  66. metadata +143 -0
@@ -0,0 +1,136 @@
1
+ // script.aculo.us builder.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
2
+
3
+ // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
4
+ //
5
+ // script.aculo.us is freely distributable under the terms of an MIT-style license.
6
+ // For details, see the script.aculo.us web site: http://script.aculo.us/
7
+
8
+ var Builder = {
9
+ NODEMAP: {
10
+ AREA: 'map',
11
+ CAPTION: 'table',
12
+ COL: 'table',
13
+ COLGROUP: 'table',
14
+ LEGEND: 'fieldset',
15
+ OPTGROUP: 'select',
16
+ OPTION: 'select',
17
+ PARAM: 'object',
18
+ TBODY: 'table',
19
+ TD: 'table',
20
+ TFOOT: 'table',
21
+ TH: 'table',
22
+ THEAD: 'table',
23
+ TR: 'table'
24
+ },
25
+ // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
26
+ // due to a Firefox bug
27
+ node: function(elementName) {
28
+ elementName = elementName.toUpperCase();
29
+
30
+ // try innerHTML approach
31
+ var parentTag = this.NODEMAP[elementName] || 'div';
32
+ var parentElement = document.createElement(parentTag);
33
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
34
+ parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
35
+ } catch(e) {}
36
+ var element = parentElement.firstChild || null;
37
+
38
+ // see if browser added wrapping tags
39
+ if(element && (element.tagName.toUpperCase() != elementName))
40
+ element = element.getElementsByTagName(elementName)[0];
41
+
42
+ // fallback to createElement approach
43
+ if(!element) element = document.createElement(elementName);
44
+
45
+ // abort if nothing could be created
46
+ if(!element) return;
47
+
48
+ // attributes (or text)
49
+ if(arguments[1])
50
+ if(this._isStringOrNumber(arguments[1]) ||
51
+ (arguments[1] instanceof Array) ||
52
+ arguments[1].tagName) {
53
+ this._children(element, arguments[1]);
54
+ } else {
55
+ var attrs = this._attributes(arguments[1]);
56
+ if(attrs.length) {
57
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
58
+ parentElement.innerHTML = "<" +elementName + " " +
59
+ attrs + "></" + elementName + ">";
60
+ } catch(e) {}
61
+ element = parentElement.firstChild || null;
62
+ // workaround firefox 1.0.X bug
63
+ if(!element) {
64
+ element = document.createElement(elementName);
65
+ for(attr in arguments[1])
66
+ element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
67
+ }
68
+ if(element.tagName.toUpperCase() != elementName)
69
+ element = parentElement.getElementsByTagName(elementName)[0];
70
+ }
71
+ }
72
+
73
+ // text, or array of children
74
+ if(arguments[2])
75
+ this._children(element, arguments[2]);
76
+
77
+ return element;
78
+ },
79
+ _text: function(text) {
80
+ return document.createTextNode(text);
81
+ },
82
+
83
+ ATTR_MAP: {
84
+ 'className': 'class',
85
+ 'htmlFor': 'for'
86
+ },
87
+
88
+ _attributes: function(attributes) {
89
+ var attrs = [];
90
+ for(attribute in attributes)
91
+ attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +
92
+ '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'&quot;') + '"');
93
+ return attrs.join(" ");
94
+ },
95
+ _children: function(element, children) {
96
+ if(children.tagName) {
97
+ element.appendChild(children);
98
+ return;
99
+ }
100
+ if(typeof children=='object') { // array can hold nodes and text
101
+ children.flatten().each( function(e) {
102
+ if(typeof e=='object')
103
+ element.appendChild(e)
104
+ else
105
+ if(Builder._isStringOrNumber(e))
106
+ element.appendChild(Builder._text(e));
107
+ });
108
+ } else
109
+ if(Builder._isStringOrNumber(children))
110
+ element.appendChild(Builder._text(children));
111
+ },
112
+ _isStringOrNumber: function(param) {
113
+ return(typeof param=='string' || typeof param=='number');
114
+ },
115
+ build: function(html) {
116
+ var element = this.node('div');
117
+ $(element).update(html.strip());
118
+ return element.down();
119
+ },
120
+ dump: function(scope) {
121
+ if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
122
+
123
+ var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
124
+ "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
125
+ "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
126
+ "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
127
+ "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
128
+ "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
129
+
130
+ tags.each( function(tag){
131
+ scope[tag] = function() {
132
+ return Builder.node.apply(Builder, [tag].concat($A(arguments)));
133
+ }
134
+ });
135
+ }
136
+ }