lsd_rails 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/Packages/art/Source/ART.Path.js +1 -1
  2. data/Packages/art/Source/ART.SVG.js +4 -3
  3. data/Packages/art/Source/ART.VML.js +8 -2
  4. data/Packages/mootools-core/Docs/Browser/Browser.md +1 -1
  5. data/Packages/mootools-core/Docs/Core/Core.md +1 -1
  6. data/Packages/{mootools-more → mootools-core}/Docs/Element/Element.Delegation.md +58 -38
  7. data/Packages/mootools-core/Docs/Element/Element.md +5 -5
  8. data/Packages/mootools-core/Docs/Fx/Fx.Morph.md +5 -1
  9. data/Packages/mootools-core/Docs/Intro.md +3 -1
  10. data/Packages/mootools-core/Docs/Request/Request.HTML.md +3 -3
  11. data/Packages/mootools-core/Docs/Request/Request.JSON.md +1 -1
  12. data/Packages/mootools-core/Docs/Request/Request.md +12 -12
  13. data/Packages/mootools-core/Docs/Slick/Slick.md +318 -0
  14. data/Packages/mootools-core/Docs/Types/{Event.md → DOMEvent.md} +37 -27
  15. data/Packages/mootools-core/Docs/Types/Function.md +2 -2
  16. data/Packages/mootools-core/Docs/Types/String.md +4 -4
  17. data/Packages/mootools-core/Source/Class/Class.Extras.js +1 -1
  18. data/Packages/mootools-core/Source/Core/Core.js +3 -3
  19. data/Packages/mootools-core/Source/Element/Element.Delegation.js +198 -0
  20. data/Packages/mootools-core/Source/Element/Element.Dimensions.js +1 -2
  21. data/Packages/mootools-core/Source/Element/Element.Event.js +22 -7
  22. data/Packages/mootools-core/Source/Element/Element.Style.js +65 -50
  23. data/Packages/mootools-core/Source/Element/Element.js +289 -200
  24. data/Packages/mootools-core/Source/Fx/Fx.Tween.js +16 -10
  25. data/Packages/mootools-core/Source/Fx/Fx.js +6 -6
  26. data/Packages/mootools-core/Source/Request/Request.js +7 -7
  27. data/Packages/mootools-core/Source/Slick/Slick.Finder.js +23 -10
  28. data/Packages/mootools-core/Source/Types/Array.js +7 -7
  29. data/Packages/mootools-core/Source/Types/DOMEvent.js +125 -0
  30. data/Packages/mootools-core/Source/Types/Function.js +20 -10
  31. data/Packages/mootools-core/Source/Types/String.js +10 -10
  32. data/Packages/mootools-core/Source/Utilities/DOMReady.js +2 -2
  33. data/Packages/mootools-core/build +0 -2
  34. data/Packages/mootools-core/package.yml +2 -1
  35. data/Packages/mootools-more/Docs/Element/Element.Event.Pseudos.md +9 -9
  36. data/Packages/mootools-more/Docs/Forms/Form.Validator.md +20 -4
  37. data/Packages/mootools-more/Docs/Interface/HtmlTable.md +19 -0
  38. data/Packages/mootools-more/Docs/Interface/Tips.md +2 -2
  39. data/Packages/mootools-more/Docs/Types/Number.Format.md +10 -2
  40. data/Packages/mootools-more/Source/Class/Events.Pseudos.js +39 -62
  41. data/Packages/mootools-more/Source/Element/Element.Event.Pseudos.Keys.js +24 -25
  42. data/Packages/mootools-more/Source/Element/Element.Event.Pseudos.js +5 -5
  43. data/Packages/mootools-more/Source/Forms/Form.Validator.js +14 -2
  44. data/Packages/mootools-more/Source/Forms/OverText.js +0 -1
  45. data/Packages/mootools-more/Source/Interface/HtmlTable.js +21 -14
  46. data/Packages/mootools-more/Source/Locale/Locale.en-US.Form.Validator.js +1 -0
  47. data/Packages/mootools-more/Source/Locale/Locale.fr-FR.Form.Validator.js +1 -0
  48. data/Packages/mootools-more/Source/Locale/Locale.nl-NL.Form.Validator.js +1 -0
  49. data/Packages/mootools-more/Source/More/More.js +2 -2
  50. data/Packages/mootools-more/Source/Types/Date.js +2 -1
  51. data/Packages/mootools-more/Source/Types/Number.Format.js +6 -4
  52. data/Packages/mootools-more/Source/Utilities/Group.js +17 -23
  53. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(container).html +2 -2
  54. data/Packages/mootools-more/Tests/Interactive/Element/Element.Event.Pseudos.html +10 -10
  55. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(id).html +15 -4
  56. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(zebra).html +4 -1
  57. data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(nested).html +19 -26
  58. data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(single).html +21 -24
  59. data/Packages/mootools-more/Tests/Specs/1.3/Class/Events.Pseudos.js +7 -154
  60. data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Delegation.js +2 -4
  61. data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Event.Pseudos.js +13 -21
  62. data/Packages/mootools-more/Tests/Specs/1.3/Forms/Form.Validator.js +14 -0
  63. data/Packages/mootools-more/Tests/Specs/1.3/Interface/HtmlTable.js +29 -14
  64. data/Packages/mootools-more/Tests/Specs/1.3/Types/Date.js +1 -0
  65. data/Packages/mootools-more/Tests/Specs/1.3/Types/Number.Format.js +4 -1
  66. data/Packages/mootools-more/Tests/Specs/Configuration.js +136 -4
  67. data/Packages/mootools-more/package.yml +0 -1
  68. data/lib/lsd/railtie.rb +2 -2
  69. data/lib/lsd/widget_generator.rb +1 -1
  70. metadata +32 -39
  71. data/Packages/mootools-core/Source/Types/Event.js +0 -135
  72. data/Packages/mootools-more/Source/Element/Element.Delegation.js +0 -140
@@ -53,7 +53,7 @@ var Fx = this.Fx = new Class({
53
53
  } else {
54
54
  this.frame++;
55
55
  }
56
-
56
+
57
57
  if (this.frame < this.frames){
58
58
  var delta = this.transition(this.frame / this.frames);
59
59
  this.set(this.compute(this.from, this.to, delta));
@@ -96,7 +96,7 @@ var Fx = this.Fx = new Class({
96
96
  pushInstance.call(this, fps);
97
97
  return this;
98
98
  },
99
-
99
+
100
100
  stop: function(){
101
101
  if (this.isRunning()){
102
102
  this.time = null;
@@ -110,7 +110,7 @@ var Fx = this.Fx = new Class({
110
110
  }
111
111
  return this;
112
112
  },
113
-
113
+
114
114
  cancel: function(){
115
115
  if (this.isRunning()){
116
116
  this.time = null;
@@ -120,7 +120,7 @@ var Fx = this.Fx = new Class({
120
120
  }
121
121
  return this;
122
122
  },
123
-
123
+
124
124
  pause: function(){
125
125
  if (this.isRunning()){
126
126
  this.time = null;
@@ -128,12 +128,12 @@ var Fx = this.Fx = new Class({
128
128
  }
129
129
  return this;
130
130
  },
131
-
131
+
132
132
  resume: function(){
133
133
  if ((this.frame < this.frames) && !this.isRunning()) pushInstance.call(this, this.options.fps);
134
134
  return this;
135
135
  },
136
-
136
+
137
137
  isRunning: function(){
138
138
  var list = instances[this.options.fps];
139
139
  return list && list.contains(this);
@@ -73,7 +73,7 @@ var Request = this.Request = new Class({
73
73
  xhr.onreadystatechange = empty;
74
74
  if (progressSupport) xhr.onprogress = xhr.onloadstart = empty;
75
75
  clearTimeout(this.timer);
76
-
76
+
77
77
  this.response = {text: this.xhr.responseText || '', xml: this.xhr.responseXML};
78
78
  if (this.options.isSuccess.call(this, this.status))
79
79
  this.success(this.response.text, this.response.xml);
@@ -110,15 +110,15 @@ var Request = this.Request = new Class({
110
110
  onFailure: function(){
111
111
  this.fireEvent('complete').fireEvent('failure', this.xhr);
112
112
  },
113
-
113
+
114
114
  loadstart: function(event){
115
115
  this.fireEvent('loadstart', [event, this.xhr]);
116
116
  },
117
-
117
+
118
118
  progress: function(event){
119
119
  this.fireEvent('progress', [event, this.xhr]);
120
120
  },
121
-
121
+
122
122
  timeout: function(){
123
123
  this.fireEvent('timeout', this.xhr);
124
124
  },
@@ -142,7 +142,7 @@ var Request = this.Request = new Class({
142
142
  }
143
143
  return false;
144
144
  },
145
-
145
+
146
146
  send: function(options){
147
147
  if (!this.check(options)) return this;
148
148
 
@@ -178,7 +178,7 @@ var Request = this.Request = new Class({
178
178
  }
179
179
 
180
180
  if (!url) url = document.location.pathname;
181
-
181
+
182
182
  var trimPosition = url.lastIndexOf('/');
183
183
  if (trimPosition > -1 && (trimPosition = url.indexOf('#')) > -1) url = url.substr(0, trimPosition);
184
184
 
@@ -198,7 +198,7 @@ var Request = this.Request = new Class({
198
198
 
199
199
  xhr.open(method.toUpperCase(), url, this.options.async, this.options.user, this.options.password);
200
200
  if (this.options.user && 'withCredentials' in xhr) xhr.withCredentials = true;
201
-
201
+
202
202
  xhr.onreadystatechange = this.onStateChange.bind(this);
203
203
 
204
204
  Object.each(this.headers, function(value, key){
@@ -74,7 +74,7 @@ local.setDocument = function(document){
74
74
 
75
75
  var selected, id = 'slick_uniqueid';
76
76
  var testNode = document.createElement('div');
77
-
77
+
78
78
  var testRoot = document.body || document.getElementsByTagName('body')[0] || root;
79
79
  testRoot.appendChild(testNode);
80
80
 
@@ -125,7 +125,7 @@ local.setDocument = function(document){
125
125
 
126
126
  features.brokenGEBCN = cachedGetElementsByClassName || brokenSecondClassNameGEBCN;
127
127
  }
128
-
128
+
129
129
  if (testNode.querySelectorAll){
130
130
  // IE 8 returns closed nodes (EG:"</foo>") for querySelectorAll('*') for some documents
131
131
  try {
@@ -251,7 +251,7 @@ var reSimpleSelector = /^([#.]?)((?:[\w-]+|\*))$/,
251
251
  local.search = function(context, expression, append, first){
252
252
 
253
253
  var found = this.found = (first) ? null : (append || []);
254
-
254
+
255
255
  if (!context) return found;
256
256
  else if (context.navigator) context = context.document; // Convert the node from a window to a document
257
257
  else if (!context.nodeType) return found;
@@ -557,12 +557,12 @@ local.matchNode = function(node, selector){
557
557
  return this.nativeMatchesSelector.call(node, selector.replace(/\[([^=]+)=\s*([^'"\]]+?)\s*\]/g, '[$1="$2"]'));
558
558
  } catch(matchError) {}
559
559
  }
560
-
560
+
561
561
  var parsed = this.Slick.parse(selector);
562
562
  if (!parsed) return true;
563
563
 
564
564
  // simple (single) selectors
565
- var expressions = parsed.expressions, reversedExpressions, simpleExpCounter = 0, i;
565
+ var expressions = parsed.expressions, simpleExpCounter = 0, i;
566
566
  for (i = 0; (currentExpression = expressions[i]); i++){
567
567
  if (currentExpression.length == 1){
568
568
  var exp = currentExpression[0];
@@ -636,7 +636,7 @@ var combinators = {
636
636
  this.push(item, tag, null, classes, attributes, pseudos);
637
637
  break;
638
638
  }
639
- }
639
+ }
640
640
  return;
641
641
  }
642
642
  if (!item){
@@ -845,7 +845,7 @@ var pseudos = {
845
845
  'root': function(node){
846
846
  return (node === this.root);
847
847
  },
848
-
848
+
849
849
  'selected': function(node){
850
850
  return node.selected;
851
851
  }
@@ -857,7 +857,7 @@ for (var p in pseudos) local['pseudo:' + p] = pseudos[p];
857
857
 
858
858
  // attributes methods
859
859
 
860
- local.attributeGetters = {
860
+ var attributeGetters = local.attributeGetters = {
861
861
 
862
862
  'class': function(){
863
863
  return this.getAttribute('class') || this.className;
@@ -874,7 +874,7 @@ local.attributeGetters = {
874
874
  'style': function(){
875
875
  return (this.style) ? this.style.cssText : this.getAttribute('style');
876
876
  },
877
-
877
+
878
878
  'tabindex': function(){
879
879
  var attributeNode = this.getAttributeNode('tabindex');
880
880
  return (attributeNode && attributeNode.specified) ? attributeNode.nodeValue : null;
@@ -882,15 +882,22 @@ local.attributeGetters = {
882
882
 
883
883
  'type': function(){
884
884
  return this.getAttribute('type');
885
+ },
886
+
887
+ 'maxlength': function(){
888
+ var attributeNode = this.getAttributeNode('maxLength');
889
+ return (attributeNode && attributeNode.specified) ? attributeNode.nodeValue : null;
885
890
  }
886
891
 
887
892
  };
888
893
 
894
+ attributeGetters.MAXLENGTH = attributeGetters.maxLength = attributeGetters.maxlength;
895
+
889
896
  // Slick
890
897
 
891
898
  var Slick = local.Slick = (this.Slick || {});
892
899
 
893
- Slick.version = '1.1.5';
900
+ Slick.version = '1.1.6';
894
901
 
895
902
  // Slick finder
896
903
 
@@ -912,9 +919,15 @@ Slick.contains = function(container, node){
912
919
  // Slick attribute getter
913
920
 
914
921
  Slick.getAttribute = function(node, name){
922
+ local.setDocument(node);
915
923
  return local.getAttribute(node, name);
916
924
  };
917
925
 
926
+ Slick.hasAttribute = function(node, name){
927
+ local.setDocument(node);
928
+ return local.hasAttribute(node, name);
929
+ };
930
+
918
931
  // Slick matcher
919
932
 
920
933
  Slick.match = function(node, selector){
@@ -18,7 +18,7 @@ Array.implement({
18
18
 
19
19
  /*<!ES5>*/
20
20
  every: function(fn, bind){
21
- for (var i = 0, l = this.length; i < l; i++){
21
+ for (var i = 0, l = this.length >>> 0; i < l; i++){
22
22
  if ((i in this) && !fn.call(bind, this[i], i, this)) return false;
23
23
  }
24
24
  return true;
@@ -26,30 +26,30 @@ Array.implement({
26
26
 
27
27
  filter: function(fn, bind){
28
28
  var results = [];
29
- for (var i = 0, l = this.length; i < l; i++){
29
+ for (var i = 0, l = this.length >>> 0; i < l; i++){
30
30
  if ((i in this) && fn.call(bind, this[i], i, this)) results.push(this[i]);
31
31
  }
32
32
  return results;
33
33
  },
34
34
 
35
35
  indexOf: function(item, from){
36
- var len = this.length;
37
- for (var i = (from < 0) ? Math.max(0, len + from) : from || 0; i < len; i++){
36
+ var length = this.length >>> 0;
37
+ for (var i = (from < 0) ? Math.max(0, length + from) : from || 0; i < length; i++){
38
38
  if (this[i] === item) return i;
39
39
  }
40
40
  return -1;
41
41
  },
42
42
 
43
43
  map: function(fn, bind){
44
- var results = [];
45
- for (var i = 0, l = this.length; i < l; i++){
44
+ var length = this.length >>> 0, results = Array(length);
45
+ for (var i = 0; i < length; i++){
46
46
  if (i in this) results[i] = fn.call(bind, this[i], i, this);
47
47
  }
48
48
  return results;
49
49
  },
50
50
 
51
51
  some: function(fn, bind){
52
- for (var i = 0, l = this.length; i < l; i++){
52
+ for (var i = 0, l = this.length >>> 0; i < l; i++){
53
53
  if ((i in this) && fn.call(bind, this[i], i, this)) return true;
54
54
  }
55
55
  return false;
@@ -0,0 +1,125 @@
1
+ /*
2
+ ---
3
+
4
+ name: Event
5
+
6
+ description: Contains the Event Type, to make the event object cross-browser.
7
+
8
+ license: MIT-style license.
9
+
10
+ requires: [Window, Document, Array, Function, String, Object]
11
+
12
+ provides: Event
13
+
14
+ ...
15
+ */
16
+
17
+ (function() {
18
+
19
+ var _keys = {};
20
+
21
+ var DOMEvent = this.DOMEvent = new Type('DOMEvent', function(event, win){
22
+ if (!win) win = window;
23
+ event = event || win.event;
24
+ if (event.$extended) return event;
25
+ this.event = event;
26
+ this.$extended = true;
27
+ this.shift = event.shiftKey;
28
+ this.control = event.ctrlKey;
29
+ this.alt = event.altKey;
30
+ this.meta = event.metaKey;
31
+ var type = this.type = event.type;
32
+ var target = event.target || event.srcElement;
33
+ while (target && target.nodeType == 3) target = target.parentNode;
34
+ this.target = document.id(target);
35
+
36
+ if (type.indexOf('key') == 0){
37
+ var code = this.code = (event.which || event.keyCode);
38
+ this.key = _keys[code]/*<1.3compat>*/ || Object.keyOf(Event.Keys, code)/*</1.3compat>*/;
39
+ if (type == 'keydown'){
40
+ if (code > 111 && code < 124) this.key = 'f' + (code - 111);
41
+ else if (code > 95 && code < 106) this.key = code - 96;
42
+ }
43
+ if (this.key == null) this.key = String.fromCharCode(code).toLowerCase();
44
+ } else if (type == 'click' || type == 'dblclick' || type == 'contextmenu' || type == 'DOMMouseScroll' || type.indexOf('mouse') == 0){
45
+ var doc = win.document;
46
+ doc = (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body;
47
+ this.page = {
48
+ x: (event.pageX != null) ? event.pageX : event.clientX + doc.scrollLeft,
49
+ y: (event.pageY != null) ? event.pageY : event.clientY + doc.scrollTop
50
+ };
51
+ this.client = {
52
+ x: (event.pageX != null) ? event.pageX - win.pageXOffset : event.clientX,
53
+ y: (event.pageY != null) ? event.pageY - win.pageYOffset : event.clientY
54
+ };
55
+ if (type == 'DOMMouseScroll' || type == 'mousewheel')
56
+ this.wheel = (event.wheelDelta) ? event.wheelDelta / 120 : -(event.detail || 0) / 3;
57
+
58
+ this.rightClick = (event.which == 3 || event.button == 2);
59
+ if (type == 'mouseover' || type == 'mouseout'){
60
+ var related = event.relatedTarget || event[(type == 'mouseover' ? 'from' : 'to') + 'Element'];
61
+ while (related && related.nodeType == 3) related = related.parentNode;
62
+ this.relatedTarget = document.id(related);
63
+ }
64
+ } else if (type.indexOf('touch') == 0 || type.indexOf('gesture') == 0){
65
+ this.rotation = event.rotation;
66
+ this.scale = event.scale;
67
+ this.targetTouches = event.targetTouches;
68
+ this.changedTouches = event.changedTouches;
69
+ var touches = this.touches = event.touches;
70
+ if (touches && touches[0]){
71
+ var touch = touches[0];
72
+ this.page = {x: touch.pageX, y: touch.pageY};
73
+ this.client = {x: touch.clientX, y: touch.clientY};
74
+ }
75
+ }
76
+
77
+ if (!this.client) this.client = {};
78
+ if (!this.page) this.page = {};
79
+ });
80
+
81
+ DOMEvent.implement({
82
+
83
+ stop: function(){
84
+ return this.preventDefault().stopPropagation();
85
+ },
86
+
87
+ stopPropagation: function(){
88
+ if (this.event.stopPropagation) this.event.stopPropagation();
89
+ else this.event.cancelBubble = true;
90
+ return this;
91
+ },
92
+
93
+ preventDefault: function(){
94
+ if (this.event.preventDefault) this.event.preventDefault();
95
+ else this.event.returnValue = false;
96
+ return this;
97
+ }
98
+
99
+ });
100
+
101
+ DOMEvent.defineKey = function(code, key){
102
+ _keys[code] = key;
103
+ return this;
104
+ };
105
+
106
+ DOMEvent.defineKeys = DOMEvent.defineKey.overloadSetter(true);
107
+
108
+ DOMEvent.defineKeys({
109
+ '38': 'up', '40': 'down', '37': 'left', '39': 'right',
110
+ '27': 'esc', '32': 'space', '8': 'backspace', '9': 'tab',
111
+ '46': 'delete', '13': 'enter'
112
+ });
113
+
114
+ })();
115
+
116
+ /*<1.3compat>*/
117
+ var Event = DOMEvent;
118
+ Event.Keys = {};
119
+ /*</1.3compat>*/
120
+
121
+ /*<1.2compat>*/
122
+
123
+ Event.Keys = new Hash(Event.Keys);
124
+
125
+ /*</1.2compat>*/
@@ -33,22 +33,30 @@ Function.implement({
33
33
  try {
34
34
  return this.apply(bind, Array.from(args));
35
35
  } catch (e){}
36
-
36
+
37
37
  return null;
38
38
  },
39
39
 
40
- /*<!ES5>*/
41
- bind: function(bind){
40
+ /*<!ES5-bind>*/
41
+ bind: function(that){
42
42
  var self = this,
43
- args = (arguments.length > 1) ? Array.slice(arguments, 1) : null;
44
-
45
- return function(){
46
- if (!args && !arguments.length) return self.call(bind);
47
- if (args && arguments.length) return self.apply(bind, args.concat(Array.from(arguments)));
48
- return self.apply(bind, args || arguments);
43
+ args = arguments.length > 1 ? Array.slice(arguments, 1) : null,
44
+ F = function(){};
45
+
46
+ var bound = function(){
47
+ var context = that, length = arguments.length;
48
+ if (this instanceof bound){
49
+ F.prototype = self.prototype;
50
+ context = new F;
51
+ }
52
+ var result = (!args && !length)
53
+ ? self.call(context)
54
+ : self.apply(context, args && length ? args.concat(Array.slice(arguments)) : args || arguments);
55
+ return context == that ? result : context;
49
56
  };
57
+ return bound;
50
58
  },
51
- /*</!ES5>*/
59
+ /*</!ES5-bind>*/
52
60
 
53
61
  pass: function(args, bind){
54
62
  var self = this;
@@ -113,6 +121,8 @@ Function.implement({
113
121
 
114
122
  });
115
123
 
124
+ if (Object.create == Function.prototype.create) Object.create = null;
125
+
116
126
  var $try = Function.attempt;
117
127
 
118
128
  //</1.2compat>
@@ -21,37 +21,37 @@ String.implement({
21
21
  },
22
22
 
23
23
  contains: function(string, separator){
24
- return (separator) ? (separator + this + separator).indexOf(separator + string + separator) > -1 : this.indexOf(string) > -1;
24
+ return (separator) ? (separator + this + separator).indexOf(separator + string + separator) > -1 : String(this).indexOf(string) > -1;
25
25
  },
26
26
 
27
27
  trim: function(){
28
- return this.replace(/^\s+|\s+$/g, '');
28
+ return String(this).replace(/^\s+|\s+$/g, '');
29
29
  },
30
30
 
31
31
  clean: function(){
32
- return this.replace(/\s+/g, ' ').trim();
32
+ return String(this).replace(/\s+/g, ' ').trim();
33
33
  },
34
34
 
35
35
  camelCase: function(){
36
- return this.replace(/-\D/g, function(match){
36
+ return String(this).replace(/-\D/g, function(match){
37
37
  return match.charAt(1).toUpperCase();
38
38
  });
39
39
  },
40
40
 
41
41
  hyphenate: function(){
42
- return this.replace(/[A-Z]/g, function(match){
42
+ return String(this).replace(/[A-Z]/g, function(match){
43
43
  return ('-' + match.charAt(0).toLowerCase());
44
44
  });
45
45
  },
46
46
 
47
47
  capitalize: function(){
48
- return this.replace(/\b[a-z]/g, function(match){
48
+ return String(this).replace(/\b[a-z]/g, function(match){
49
49
  return match.toUpperCase();
50
50
  });
51
51
  },
52
52
 
53
53
  escapeRegExp: function(){
54
- return this.replace(/([-.*+?^${}()|[\]\/\\])/g, '\\$1');
54
+ return String(this).replace(/([-.*+?^${}()|[\]\/\\])/g, '\\$1');
55
55
  },
56
56
 
57
57
  toInt: function(base){
@@ -63,17 +63,17 @@ String.implement({
63
63
  },
64
64
 
65
65
  hexToRgb: function(array){
66
- var hex = this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);
66
+ var hex = String(this).match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);
67
67
  return (hex) ? hex.slice(1).hexToRgb(array) : null;
68
68
  },
69
69
 
70
70
  rgbToHex: function(array){
71
- var rgb = this.match(/\d{1,3}/g);
71
+ var rgb = String(this).match(/\d{1,3}/g);
72
72
  return (rgb) ? rgb.rgbToHex(array) : null;
73
73
  },
74
74
 
75
75
  substitute: function(object, regexp){
76
- return this.replace(regexp || (/\\?\{([^{}]+)\}/g), function(match, name){
76
+ return String(this).replace(regexp || (/\\?\{([^{}]+)\}/g), function(match, name){
77
77
  if (match.charAt(0) == '\\') return match.slice(1);
78
78
  return (object[name] != null) ? object[name] : '';
79
79
  });
@@ -28,7 +28,7 @@ var domready = function(){
28
28
  if (ready) return;
29
29
  Browser.loaded = ready = true;
30
30
  document.removeListener('DOMContentLoaded', domready).removeListener('readystatechange', check);
31
-
31
+
32
32
  document.fireEvent('domready');
33
33
  window.fireEvent('domready');
34
34
  };
@@ -57,7 +57,7 @@ var doScrollWorks = function(){
57
57
  return true;
58
58
  } catch (e){}
59
59
  return false;
60
- }
60
+ };
61
61
  // If doScroll works already, it can't be used to determine domready
62
62
  // e.g. in an iframe
63
63
  if (testElement.doScroll && !doScrollWorks()){
@@ -36,5 +36,3 @@ $output = $pkg->build($files, array(), array(), ($no_compat) ? array("1.2compat"
36
36
  echo $output;
37
37
 
38
38
  fclose($stderr);
39
-
40
- ?>
@@ -19,7 +19,7 @@ sources:
19
19
  - "Source/Types/Number.js"
20
20
  - "Source/Types/Function.js"
21
21
  - "Source/Types/Object.js"
22
- - "Source/Types/Event.js"
22
+ - "Source/Types/DOMEvent.js"
23
23
  - "Source/Browser/Browser.js"
24
24
  - "Source/Class/Class.js"
25
25
  - "Source/Class/Class.Extras.js"
@@ -28,6 +28,7 @@ sources:
28
28
  - "Source/Element/Element.js"
29
29
  - "Source/Element/Element.Style.js"
30
30
  - "Source/Element/Element.Event.js"
31
+ - "Source/Element/Element.Delegation.js"
31
32
  - "Source/Element/Element.Dimensions.js"
32
33
  - "Source/Fx/Fx.js"
33
34
  - "Source/Fx/Fx.CSS.js"
@@ -76,16 +76,16 @@ The default pausetime is *250* milliseconds.
76
76
  This is exactly the same as the [Events.Pseudos :pause][] pseudo event.
77
77
 
78
78
 
79
- Event {#Event}
80
- =============
79
+ DOMEvent {#DOMEvent}
80
+ ====================
81
81
 
82
- Function: Event.definePseudo {#Event:Event-definePseudo}
83
- ----------------------------------------------------------
82
+ Function: DOMEvent.definePseudo {#DOMEvent:DOMEvent-definePseudo}
83
+ -----------------------------------------------------------------
84
84
 
85
- It's possible to define your own pseudos with Event.definePseudo
85
+ It's possible to define your own pseudos with DOMEvent.definePseudo
86
86
 
87
87
  ### Syntax
88
- Event.definePseudo(name, fn);
88
+ DOMEvent.definePseudo(name, fn);
89
89
 
90
90
  ### Arguments:
91
91
  1. name - (*string*) The pseudo name, for example `once` will become `click:once`
@@ -101,7 +101,7 @@ It's possible to define your own pseudos with Event.definePseudo
101
101
  - pseudo - (*string*) between the `:` and `(`
102
102
  - original - (*string*) the original event name, thus `event:pseudo(value)`
103
103
  2. fn - (*function*) This is the function that has been passed in the `addEvent` method. So it is the 'fn' in `myEvent.addEvent('event:pseudo', fn)`
104
- 3. args - (*array*) An array with arguments. The [Event][] object is in most cases the first element.
104
+ 3. args - (*array*) An array with arguments. The [DOMEvent][] object is in most cases the first element.
105
105
 
106
106
  The `this` variable refers to the Element where the event is added to.
107
107
 
@@ -109,13 +109,13 @@ The `this` variable refers to the Element where the event is added to.
109
109
 
110
110
  This is how the :once pseudo is implemented
111
111
 
112
- Event.definePseudo('once', function(split, fn, args){
112
+ DOMEvent.definePseudo('once', function(split, fn, args){
113
113
  fn.apply(this, args);
114
114
  this.removeEvent(split.original, fn);
115
115
  });
116
116
 
117
117
 
118
- [Event]: /core/Types/Event
118
+ [DOMEvent]: /core/Types/DOMEvent
119
119
  [Element.Delegation]: /more/Element/Element.Delegation
120
120
  [Events.Pseudos :once]: /more/Class/Events.Pseudos#Pseudos:once
121
121
  [Events.Pseudos :throttle]: /more/Class/Events.Pseudos#Pseudos:throttle
@@ -405,6 +405,22 @@ Displays an error if the field is empty.
405
405
 
406
406
  Error Msg: "This field is required"
407
407
 
408
+ Validator: length {#Validators:length}
409
+ --------------------------------------------
410
+
411
+ Displays a message if the input value is not the exact supplied length.
412
+
413
+ Error Msg: "Please enter [defined length] characters (you entered [input length] characters)"
414
+
415
+ ### Note
416
+
417
+ You must add this name AND properties for it to your input.
418
+
419
+ ### Example
420
+
421
+ <input type="text" name="username" class="length:10" id="username" />
422
+
423
+
408
424
  Validator: minLength {#Validators:minLength}
409
425
  --------------------------------------------
410
426
 
@@ -503,10 +519,10 @@ Validator: validate-currency-dollar {#Validators:validate-currency-dollar}
503
519
 
504
520
  Validates that the entry matches any of the following:
505
521
 
506
- * [$]1[##][,###]+[.##]
507
- * [$]1###+[.##]
508
- * [$]0.##
509
- * [$].##
522
+ * [$]1[\#\#][,\#\#\#]+[.\#\#]
523
+ * [$]1\#\#\#+[.\#\#]
524
+ * [$]0.\#\#
525
+ * [$].\#\#
510
526
 
511
527
  Error Msg: "Please enter a valid $ amount. For example $100.00 ."
512
528
 
@@ -121,6 +121,25 @@ Note that it can also be an actual *TR* element.
121
121
  ### Example of Object Returned
122
122
 
123
123
  {tr: theTableRow, tds: [td, td, td]}
124
+
125
+ HtmlTable Method: update {#HtmlTable:push}
126
+ ----------------------------------------
127
+
128
+ Update a table row
129
+
130
+ ### Syntax
131
+
132
+ myHtmlTable.update(tr, row);
133
+
134
+ ### Arguments
135
+
136
+ 1. tr - (*TR* element) the row to update
137
+ 2. row - (*array* or *element*) the data for the row or *TR* element. Same as the row data sent to [HtmlTable.push][]
138
+
139
+ ### Returns
140
+
141
+ * (*object*) an object containing the tr and td tags.
142
+
124
143
 
125
144
 
126
145
  HtmlTable Method: pushMany {#HtmlTable:pushMany}
@@ -126,14 +126,14 @@ To override the default tip hide behavior, you must either declare the onHide ev
126
126
  onHide: function(tip, el){
127
127
  tip.fade('out').get('tween').chain(function(){
128
128
  tip.setStyle('display', 'none');
129
- }
129
+ });
130
130
  }
131
131
  });
132
132
  //if you want to add this after init
133
133
  myTips.removeEvents('hide').addEvent('hide', function(tip, el){
134
134
  tip.fade('out').get('tween').chain(function(){
135
135
  tip.setStyle('display', 'none');
136
- }
136
+ });
137
137
  });
138
138
 
139
139
  Tips Method: setTitle {#Tips:setTitle}