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
@@ -153,7 +153,7 @@ function visitArc(rx, ry, rotation, large, clockwise, x, y, tX, tY, curveTo, arc
153
153
 
154
154
  var n = Math.ceil(Math.abs(arc / (circle / 4))),
155
155
  step = arc / n,
156
- k = (4 / 3) * Math.tan(step / 4),
156
+ k = (4 / 3) * Math.tan(step / 4);
157
157
  a = sa;
158
158
 
159
159
  x = Math.cos(a); y = Math.sin(a);
@@ -159,7 +159,7 @@ ART.SVG.Base = new Class({
159
159
 
160
160
  _injectBrush: function(type){
161
161
  if (!this.container) return;
162
- var brush = this[type + 'Brush'];
162
+ var brush = (type == 'fill') ? this.fillBrush : this.strokeBrush;
163
163
  if (brush) this.container.defs.appendChild(brush);
164
164
  },
165
165
 
@@ -175,9 +175,10 @@ ART.SVG.Base = new Class({
175
175
  this._ejectBrush(type);
176
176
 
177
177
  var brush = createElement(tag);
178
- this[type + 'Brush'] = brush;
178
+ if (type == 'fill') this.fillBrush = brush;
179
+ else this.strokeBrush = brush;
179
180
 
180
- var id = type + '-brush-e' + this.uid;
181
+ var id = type + '-brush-e' + String.uniqueID();
181
182
  brush.setAttribute('id', id);
182
183
 
183
184
  this._injectBrush(type);
@@ -29,6 +29,12 @@ ART.VML = new Class({
29
29
  if (width != null && height != null) this.resize(width, height);
30
30
  },
31
31
 
32
+ eject: function(){
33
+ var element = this.vml, parent = element.parentNode;
34
+ if (parent) parent.removeChild(element);
35
+ return this;
36
+ },
37
+
32
38
  inject: function(element){
33
39
  if (element.element) element = element.element;
34
40
  element.appendChild(this.vml);
@@ -304,7 +310,7 @@ ART.VML.Base = new Class({
304
310
  if (strokeWidth){
305
311
  // Scale is the hypothenus between the two vectors
306
312
  // TODO: Use area calculation instead
307
- var vx = m.xx + m.xy, vy = m.yy + m.yx;
313
+ vx = m.xx + m.xy; vy = m.yy + m.yx;
308
314
  strokeWidth *= Math.sqrt(vx * vx + vy * vy) / Math.sqrt(2);
309
315
  }
310
316
 
@@ -546,7 +552,7 @@ ART.VML.Shape = new Class({
546
552
  var vml = this._vml || '';
547
553
 
548
554
  this._prefix = prefix;
549
- this._suffix = suffix
555
+ this._suffix = suffix;
550
556
  if (prefix){
551
557
  vml = [
552
558
  prefix, vml, suffix,
@@ -69,7 +69,7 @@ Browser.Platform {#Browser:Browser-Platform}
69
69
  Browser.Plugins {#Browser:Browser-Plugins}
70
70
  ------------------------------------------
71
71
 
72
- * Browser.Plugins.Flash - (*boolean*) - True if Flash is present.
72
+ * Browser.Plugins.Flash - (*object*) - An object with properties corresponding to the `version` and `build` number of the installed Flash plugin. Note: if flash is not installed, both `Browser.Plugins.Flash.version` and `Browser.Plugins.Flash.build` will return zero.
73
73
  * Browser.Plugins.Flash.version - (*number*) The major version of the flash plugin installed.
74
74
  * Browser.Plugins.Flash.build - (*number*) The build version of the flash plugin installed.
75
75
 
@@ -34,7 +34,7 @@ Returns the type of an object.
34
34
  * 'window' - (*string*) If object is the window object.
35
35
  * 'document' - (*string*) If object is the document object.
36
36
  * 'event' - (*string*) If object is an event.
37
- * 'null' - (*boolean*) If object is undefined, null, NaN or none of the above.
37
+ * 'null' - (*string*) If object is undefined, null, NaN or none of the above.
38
38
 
39
39
  ### Example:
40
40
 
@@ -1,70 +1,88 @@
1
1
  Type: Element {#Element}
2
2
  ========================
3
3
 
4
- Extends the [Element][] type to include delegations in the addEvent and addEvents methods. It adds the `:relay` pseudo using [Element.Event.Pseudos][].
4
+ Extends the [Element][] type to include event-delegation in its event system.
5
5
 
6
- ### Demo
6
+ Event delegation is a common practice where an event listener is attached to a parent element to monitor its children rather than attach events to every single child element. It's more efficient for dynamic content or highly interactive pages with a lot of DOM elements.
7
+
8
+ ### Demo:
7
9
 
8
10
  * [Element.Delegation](http://mootools.net/demos/?demo=Element.Delegation)
9
11
 
10
- ### Notes
12
+ ### Example:
13
+
14
+ An example of how delegation is usually applied. Delegation is extra useful when working with dynamic content like AJAX.
11
15
 
16
+ var myElement = $('myElement');
17
+ var request = new Request({
18
+ // other options
19
+ onSuccess: function(text){
20
+ myElement.set('html', text); // No need to attach more click events.
21
+ }
22
+ });
23
+ // Adding the event, notice the :relay syntax with the selector that matches the target element inside of myElement.
24
+ // Every click on an anchor-tag inside of myElement executes this function.
25
+ myElement.addEvent('click:relay(a)', function(event, target){
26
+ event.preventDefault();
27
+ request.send({
28
+ url: target.get('href')
29
+ });
30
+ });
31
+
32
+ ### Notes:
33
+
34
+ * Delegation is especially useful if you are using AJAX to load content into your pages dynamically, as the contents of an element can change with new elements added or others removed and your delegated events need not change.
12
35
  * By delegating events to parent objects you can dramatically increase the efficiency of your pages. Consider the example above. You could attach events to every link on a page - which may be hundreds of DOM elements - or you can delegate the event to the document body, evaluating your code only when the user actually clicks a link (instead of on page load/domready).
13
36
  * You can use any selector in combination with any event
14
37
  * Be wary of the cost of delegation; for example, mouseover/mouseout delegation on an entire document can cause your page to run the selector constantly as the user moves his or her mouse around the page. Delegation is not always the best solution.
15
- * Delegation is especially useful if you are using AJAX to load content into your pages dynamically, as the contents of an element can change with new elements added or others removed and your delegated events need not change.
16
38
  * In general it is always better to delegate to the closest parent to your elements as possible; delegate to an element in the page rather than the document body for example.
17
39
 
18
- ### Credits
19
-
20
- Event checking based on the work of [Daniel Steigerwald](http://daniel.steigerwald.cz).
21
-
22
40
  Element method: addEvent {#Element:addEvent}
23
41
  --------------------------------------------
24
42
 
25
- Delegates the methods of an element's children to the parent element for greater efficiency when a filter is provided. Otherwise works normally as [addEvent][] always does.
43
+ Delegates the methods of an element's children to the parent element for greater efficiency when a selector is provided. Otherwise it will work like [addEvent][].
26
44
 
27
- ### Syntax
45
+ ### Syntax:
28
46
 
29
47
  myElement.addEvent(typeSelector, fn);
30
48
 
31
- ### Arguments
49
+ ### Arguments:
32
50
 
33
51
  2. typeSelector - (*string*) An event name (click, mouseover, etc) that should be monitored paired with a selector (see example) to limit functionality to child elements.
34
52
  3. fn - (*function*) The callback to execute when the event occurs (passed the event just like any other [addEvent][] usage and a second argument, the element that matches your selector that was clicked).
35
53
 
36
54
 
37
- ### Example
55
+ ### Example:
38
56
 
39
- // Alerts when an anchor element is clicked with class myStyle in myElement
57
+ // Alerts when an anchor element with class 'myStyle' is clicked inside of myElement
40
58
  document.id(myElement).addEvent('click:relay(a.myStyle)', function(){
41
59
  alert('hello');
42
60
  });
43
61
 
44
62
 
45
- $(element).addEvent('click:relay(a)', function(event, clicked){
63
+ document.id('myElement').addEvent('click:relay(a)', function(event, clicked){
46
64
  event.preventDefault(); //don't follow the link
47
65
  alert('you clicked a link!');
48
- //you can reference the element clicked with the second
49
- //argument passed to your callback
66
+ // You can reference the element clicked with the second
67
+ // Argument passed to your callback
50
68
  clicked.setStyle('color', '#777');
51
69
  });
52
70
 
53
- ### Returns
71
+ ### Returns:
54
72
 
55
73
  * *element* - This element.
56
74
 
57
75
  Element method: addEvents {#Element:addEvents}
58
76
  ----------------------------------------------
59
77
 
60
- Delegates the events to the parent just as with addEvent above. Works as [addEvents][] does.
78
+ Delegates the events to the parent just as with addEvent above. Works like [addEvents][].
61
79
 
62
- ### Example
80
+ ### Example:
63
81
 
64
- myElement.addEvents({
65
- //monitor an element for mouseover
82
+ $('myElement').addEvents({
83
+ // monitor an element for mouseover
66
84
  mouseover: fn,
67
- //but only monitor child links for click
85
+ // but only monitor child links for clicks
68
86
  'click:relay(a)': fn2
69
87
  });
70
88
 
@@ -72,43 +90,46 @@ Delegates the events to the parent just as with addEvent above. Works as [addEve
72
90
  Element method: removeEvent {#Element:removeEvent}
73
91
  --------------------------------------------------
74
92
 
75
- Removes a method from an element as [removeEvent][] always does.
93
+ Removes a method from an element like [removeEvent][].
76
94
 
77
- ### Example
95
+ ### Example:
78
96
 
79
- var monitor = function(event, element){ alert('you clicked a link!')};
80
- $(element).addEvent('click:relay(a)', monitor);
81
- //link clicks are delegated to element
97
+ var monitor = function(event, element){
98
+ alert('you clicked a link!');
99
+ };
100
+
101
+ $('myElement').addEvent('click:relay(a)', monitor);
102
+ // link clicks are delegated to element
82
103
 
83
- //...now we remove the delegation:
84
- $(element).removeEvent('click:relay(a)', monitor);
104
+ // remove delegation:
105
+ $('myElement').removeEvent('click:relay(a)', monitor);
85
106
 
86
107
 
87
108
  Element method: removeEvents {#Element:removeEvents}
88
- ---------------------------------------------------
109
+ ----------------------------------------------------
89
110
 
90
- Removes a series of methods from delegation if the functions were used for delegation or else works as [removeEvents][] always does.
111
+ Removes a series of methods from delegation if the functions were used for delegation or else works like [removeEvents][].
91
112
 
92
- ### Example
113
+ ### Example:
93
114
 
94
115
  var monitor = function(){
95
116
  alert('you clicked or moused over a link!');
96
117
  };
97
118
 
98
- $(element).addEvents({
119
+ $('myElement').addEvents({
99
120
  'mouseover:relay(a)': monitor,
100
121
  'click:relay(a)': monitor
101
122
  });
102
123
 
103
124
  // link clicks are delegated to element
104
- // ...now we remove the delegation:
105
- $(element).removeEvents({
125
+ // remove the delegation:
126
+ $('myElement').removeEvents({
106
127
  'mouseover:relay(a)': monitor,
107
128
  'click:relay(a)': monitor
108
129
  });
109
130
 
110
- //or we could remove all click:relay(a) events
111
- $(element).removeEvents('click:relay(a)');
131
+ // remove all click:relay(a) events
132
+ $('myElement').removeEvents('click:relay(a)');
112
133
 
113
134
 
114
135
 
@@ -117,4 +138,3 @@ Removes a series of methods from delegation if the functions were used for deleg
117
138
  [addEvents]: /core/Element/Element.Event#Element:addEvents
118
139
  [removeEvent]: /core/Element/Element.Event#Element:removeEvent
119
140
  [removeEvents]: /core/Element/Element.Event#Element:removeEvents
120
- [Element.Event.Pseudos]: /more/Element/Element.Event.Pseudos
@@ -304,7 +304,7 @@ This is a "dynamic arguments" method. Properties passed in can be any of the 'se
304
304
  // the 'events' property passes the object to Element:addEvents.
305
305
  events: {
306
306
  click: function(){ alert('click'); },
307
- mouseover: function(){ this.addClass('over') }
307
+ mouseover: function(){ this.addClass('over'); }
308
308
  },
309
309
  //Any other property uses Element:setProperty.
310
310
  id: 'documentBody'
@@ -820,7 +820,7 @@ Clones the Element and returns the cloned one.
820
820
 
821
821
  ##### HTML
822
822
 
823
- <div id="myElement"></div>
823
+ <div id="myElement">ciao</div>
824
824
 
825
825
  ##### JavaScript
826
826
 
@@ -1609,11 +1609,11 @@ Sets the innerHTML of the Element.
1609
1609
 
1610
1610
  #### Syntax:
1611
1611
 
1612
- myElement.set('html', [htmlString[, htmlString2[, htmlString3[, ..]]]);
1612
+ myElement.set('html', html);
1613
1613
 
1614
1614
  #### Arguments:
1615
1615
 
1616
- 1. Any number of string parameters with HTML.
1616
+ 1. html - (*string*) The new content as HTML string.
1617
1617
 
1618
1618
  #### Returns:
1619
1619
 
@@ -1627,7 +1627,7 @@ Sets the innerHTML of the Element.
1627
1627
 
1628
1628
  ##### JavaScript
1629
1629
 
1630
- $('myElement').set('html', '<div></div>', '<p></p>');
1630
+ $('myElement').set('html', '<div></div><p></p>');
1631
1631
 
1632
1632
  ##### Resulting HTML
1633
1633
 
@@ -1,7 +1,7 @@
1
1
  Class: Fx.Morph {#Fx-Morph}
2
2
  ===========================
3
3
 
4
- Allows for the animation of multiple CSS properties at once, even by a CSS selector. Inherits methods, properties, options and events from [Fx][].
4
+ Allows for the animation of multiple CSS properties at once, even by a simple CSS selector. Inherits methods, properties, options and events from [Fx][].
5
5
 
6
6
  ### Extends:
7
7
 
@@ -59,6 +59,9 @@ separating the logic and styles:
59
59
  // the styles of myClassName will be applied to the target Element.
60
60
  myEffect.start('.myClassName');
61
61
 
62
+ ### Notes:
63
+
64
+ - This feature only works for simple selectors like a single class or id due to limited browser support for complex selectors.
62
65
 
63
66
  ### See Also:
64
67
 
@@ -128,6 +131,7 @@ Executes a transition for any number of CSS properties in tandem.
128
131
 
129
132
  - If a string is passed as the CSS selector, the selector must be identical to the one within the CSS.
130
133
  - Multiple selectors (with commas) are not supported.
134
+ - @import'ed CSS rules will not be available for Morph calls. All CSS selectors must be present in CSS directly loaded into the page.
131
135
 
132
136
 
133
137
  Object: Element.Properties {#Element-Properties}
@@ -6,9 +6,10 @@ MooTools API Documentation
6
6
  Popular Pages
7
7
  -------------
8
8
 
9
+ - [Class][] - Use MooTools with Class
9
10
  - [Element][] - Interact with the DOM
10
11
  - [Element.Event][] - Add events to DOM Elements
11
- - [Class][] - Use MooTools with Class
12
+ - [Element.Delegation][] - Event Delegation
12
13
  - [Fx.Tween][] - Create effects for single properties
13
14
  - [Request][] - An XMLHttpRequest Wrapper
14
15
 
@@ -32,6 +33,7 @@ Previous Versions Documentation
32
33
 
33
34
  [Element]: /core/Element/Element
34
35
  [Element.Event]: /core/Element/Element.Event
36
+ [Element.Delegation]: /core/Element/Element.Delegation
35
37
  [Class]: /core/Class/Class
36
38
  [Fx.Tween]: /core/Fx/Fx.Tween
37
39
  [Request]: /core/Request/Request
@@ -51,12 +51,12 @@ Request Specifically made for receiving HTML.
51
51
 
52
52
  #### POST Request with data as String:
53
53
 
54
- var myHTMLRequest = new Request.HTML({url:'myPage.html'}).post('user_id=25&save=true');
54
+ var myHTMLRequest = new Request.HTML({url: 'myPage.html'}).post('user_id=25&save=true');
55
55
 
56
56
  #### Data from Object Passed via GET:
57
57
 
58
58
  //Loads "load/?user_id=25".
59
- var myHTMLRequest = new Request.HTML({url:'load/'}).get({'user_id': 25});
59
+ var myHTMLRequest = new Request.HTML({url: 'load/'}).get({'user_id': 25});
60
60
 
61
61
  #### Data from Element via POST:
62
62
 
@@ -73,7 +73,7 @@ Request Specifically made for receiving HTML.
73
73
  ##### JavaScript
74
74
 
75
75
  //Needs to be in a submit event or the form handler.
76
- var myHTMLRequest = new Request.HTML({url:'save/'}).post($('user-form'));
76
+ var myHTMLRequest = new Request.HTML({url: 'save/'}).post($('user-form'));
77
77
 
78
78
  ### See Also:
79
79
 
@@ -1,7 +1,7 @@
1
1
  Class: Request.JSON {#Request-JSON}
2
2
  =================================
3
3
 
4
- Wrapped Request with automated sending and receiving of JavaScript Objects in JSON Format.
4
+ Wrapped Request with automated receiving of JavaScript Objects in JSON Format.
5
5
 
6
6
  ### Extends:
7
7
 
@@ -17,25 +17,25 @@ An XMLHttpRequest Wrapper.
17
17
 
18
18
  ### Options:
19
19
 
20
- * url - (*string*: defaults to null) The URL to request. (Note, this can also be an instance of [URI][])
21
- * method - (*string*: defaults to 'post') The HTTP method for the request, can be either 'post' or 'get'.
20
+ * url - (*string*: defaults to *null*) The URL to request. (Note, this can also be an instance of [URI][])
22
21
  * data - (*string*: defaults to '') The default data for [Request:send][], used when no data is given.
23
22
  * link - (*string*: defaults to 'ignore') Can be 'ignore', 'cancel' and 'chain'.
24
23
  * 'ignore' - Any calls made to start while the request is running will be ignored. (Synonymous with 'wait': true from 1.11)
25
24
  * 'cancel' - Any calls made to start while the request is running will take precedence over the currently running request. The new request will start immediately, canceling the one that is currently running. (Synonymous with 'wait': false from 1.11)
26
25
  * 'chain' - Any calls made to start while the request is running will be chained up, and will take place as soon as the current request has finished, one after another.
27
- * async - (*boolean*: defaults to true) If set to false, the requests will be synchronous and freeze the browser during request.
28
- * encoding - (*string*: defaults to 'utf-8') The encoding to be set in the request header.
26
+ * method - (*string*: defaults to 'post') The HTTP method for the request, can be either 'post' or 'get'.
27
+ * emulation - (*boolean*: defaults to *true*) If set to true, other methods than 'post' or 'get' are appended as post-data named '\_method' (as used in rails)
28
+ * async - (*boolean*: defaults to *true*) If set to false, the requests will be synchronous and freeze the browser during request.
29
+ * timeout - (*integer*: defaults to 0) In conjunction with `onTimeout` event, it determines the amount of milliseconds before considering a connection timed out. (It's suggested to not use timeout with big files and only when knowing what's expected.)
29
30
  * headers - (*object*) An object to use in order to set the request headers.
31
+ * urlEncoded - (*boolean*: defaults to *true*) If set to true, the content-type header is set to www-form-urlencoded + encoding
32
+ * encoding - (*string*: defaults to 'utf-8') The encoding to be set in the request header.
33
+ * noCache - (*boolean*; defaults to *false*) If *true*, appends a unique *noCache* value to the request to prevent caching. (IE has a bad habit of caching ajax request values. Including this script and setting the *noCache* value to true will prevent it from caching. The server should ignore the *noCache* value.)
30
34
  * isSuccess - (*function*) Overrides the built-in isSuccess function.
31
- * evalScripts - (*boolean*: defaults to false) If set to true, `script` tags inside the response will be evaluated.
32
- * evalResponse - (*boolean*: defaults to false) If set to true, the entire response will be evaluated. Responses with javascript content-type will be evaluated automatically.
33
- * emulation - (*boolean*: defaults to true) If set to true, other methods than 'post' or 'get' are appended as post-data named '\_method' (used in rails)
34
- * urlEncoded - (*boolean*: defaults to true) If set to true, the content-type header is set to www-form-urlencoded + encoding
35
- * timeout - (*integer*: defaults to 0) In conjunction with `onTimeout` event, it determines the amount of milliseconds before considering a connection timed out. (It's suggested to not use timeout with big files and only when knowing what's expected.)
36
- * noCache - (*boolean*; defaults to false) If *true*, appends a unique *noCache* value to the request to prevent caching. (IE has a bad habit of caching ajax request values. Including this script and setting the *noCache* value to true will prevent it from caching. The server should ignore the *noCache* value.)
37
- * user - (*string*: defaults to undefined) When username is set the Request will open with credentials and try to authenticate.
38
- * password - (*string*: defaults to undefined) You can use this option together with the `user` option to set authentication credentials when necessary. Note that the password will be passed as plain text and is therefore readable by anyone through the source code. It is therefore encouraged to use this option carefully
35
+ * evalScripts - (*boolean*: defaults to *false*) If set to true, `script` tags inside the response will be evaluated.
36
+ * evalResponse - (*boolean*: defaults to *false*) If set to true, the entire response will be evaluated. Responses with javascript content-type will be evaluated automatically.
37
+ * user - (*string*: defaults to *null*) When username is set the Request will open with credentials and try to authenticate.
38
+ * password - (*string*: defaults to *null*) You can use this option together with the `user` option to set authentication credentials when necessary. Note that the password will be passed as plain text and is therefore readable by anyone through the source code. It is therefore encouraged to use this option carefully
39
39
 
40
40
  ### Events:
41
41