Skip to content

Commit

Permalink
whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kassens committed Oct 5, 2008
1 parent 627c4e3 commit 45333ed
Show file tree
Hide file tree
Showing 33 changed files with 167 additions and 167 deletions.
4 changes: 2 additions & 2 deletions Compatibility/Element/Element.Style.js
@@ -1,7 +1,7 @@
Element.implement({

setOpacity: function(op){
return this.set('opacity', op);
}

});
2 changes: 1 addition & 1 deletion Compatibility/Fx/Fx.Morph.js
@@ -1,7 +1,7 @@
Fx.Styles = Fx.Morph;

Element.implement({

effects: function(options){
return new Fx.Morph(this, options);
}
Expand Down
2 changes: 1 addition & 1 deletion Compatibility/Fx/Fx.Tween.js
Expand Up @@ -3,7 +3,7 @@ Fx.Style = function(element, property, options){
};

Element.implement({

effect: function(property, options){
return new Fx.Tween(this, $extend({property: property}, options));
}
Expand Down
4 changes: 2 additions & 2 deletions Compatibility/Fx/Fx.js
Expand Up @@ -7,11 +7,11 @@ Fx.implement({
clearTimer: function(){
return this.cancel();
},

stop: function(){
return this.cancel();
}

});

Fx.Base = Fx;
Fx.Base = Fx;
2 changes: 1 addition & 1 deletion Compatibility/Request/Request.JSON.js
Expand Up @@ -16,7 +16,7 @@ JSON.Remote = new Class({
if (!this.check(arguments.callee, data)) return this;
return this.parent({url: this.url, data: {json: Json.encode(data)}});
},

failure: function(){
this.fireEvent('failure', this.xhr);
}
Expand Down
2 changes: 1 addition & 1 deletion Compatibility/Request/Request.js
Expand Up @@ -27,7 +27,7 @@ var XHR = new Class({
if (this.options.update) $(this.options.update).empty().set('html', text);
this.onSuccess(text, xml);
},

failure: function(){
this.fireEvent('failure', this.xhr);
}
Expand Down
10 changes: 5 additions & 5 deletions Docs/Core/Core.md
Expand Up @@ -130,7 +130,7 @@ Creates an empty function which does nothing but return the value passed.
### Syntax:

var returnTrue = $lambda(true);

### Arguments

1. value - (*mixed*) The value for the created function to return.
Expand Down Expand Up @@ -369,18 +369,18 @@ Tries to execute a number of functions. Returns immediately the return value of
}, function(){
return false;
});

//result is false

var failure, success;

$try(function(){
some.made.up.object = 'something';
success = true;
}, function(){
failure = true;
});

if (success) alert('yey!');

Function: $type {#type}
Expand Down
2 changes: 1 addition & 1 deletion Docs/Element/Element.Dimensions.md
Expand Up @@ -52,7 +52,7 @@ The following method is also available on the Window object.

### Returns:

* (*object*) An object containing the width (as x) and the height (as y) of the target Element.
* (*object*) An object containing the width (as x) and the height (as y) of the target Element.

### Example:

Expand Down
4 changes: 2 additions & 2 deletions Docs/Element/Element.Event.md
Expand Up @@ -73,7 +73,7 @@ Works as Element.addEvent, but instead removes the specified event listener.

var destroy = function(){ alert('Boom: ' + this.id); } // this refers to the Element.
$('myElement').addEvent('click', destroy);

// later
$('myElement').removeEvent('click', destroy);

Expand Down Expand Up @@ -165,7 +165,7 @@ Removes all events of a certain type from an Element. If no argument is passed,

myElement.addEvent('click', function(){ alert('clicked again'); });
myElement.addEvent('click', function(){ alert('clicked and again :('); });
//addEvent will keep appending each function.
//addEvent will keep appending each function.
//Unfortunately for the visitor, that'll be three alerts they'll have to click on.
myElement.removeEvents('click'); // This saves the visitor's finger by removing every click event.

Expand Down
40 changes: 20 additions & 20 deletions Docs/Element/Element.Style.md
Expand Up @@ -10,25 +10,25 @@ Element Method: setStyle {#Element:setStyle}

Sets a CSS property to the Element.

### Syntax:
### Syntax:

myElement.setStyle(property, value);

### Arguments:
### Arguments:

1. property - (*string*) The property to set.
2. value - (*mixed*) The value to which to set it. Numeric values of properties requiring a unit will automatically be appended with 'px'.

### Returns:
### Returns:

* (*element*) This element.

### Example:
### Example:
//Both lines have the same effect.
$('myElement').setStyle('width', '300px'); //The width is now 300px.
$('myElement').setStyle('width', 300); //The width is now 300px.

### Notes:
### Notes:

- All number values will automatically be rounded to the nearest whole number.

Expand All @@ -39,19 +39,19 @@ Element Method: getStyle {#Element:getStyle}

Returns the style of the Element given the property passed in.

### Syntax:
### Syntax:

var style = myElement.getStyle(property);

### Arguments:
### Arguments:

1. property - (*string*) The css style property you want to retrieve.

### Returns:
### Returns:

* (*string*) The style value.

### Examples:
### Examples:

$('myElement').getStyle('width'); //Returns "300px".
$('myElement').getStyle('width').toInt(); //Returns 300.
Expand All @@ -63,27 +63,27 @@ Element Method: setStyles {#Element:setStyles}

Applies a collection of styles to the Element.

### Syntax:
### Syntax:

myElement.setStyles(styles);

### Arguments:
### Arguments:

1. styles - (*object*) An object of property/value pairs for all the styles to apply.

### Returns:
### Returns:

* (*element*) This element.

### Example:
### Example:

$('myElement').setStyles({
border: '1px solid #000',
width: 300,
height: 400
});

### See Also:
### See Also:

- [Element:getStyle][]

Expand All @@ -94,24 +94,24 @@ Element Method: getStyles {#Element:getStyles}

Returns an object of styles of the Element for each argument passed in.

### Syntax:
### Syntax:

var styles = myElement.getStyles(property[, property2[, property3[, ...]]]);

### Arguments:
### Arguments:

1. properties - (*strings*) Any number of style properties.

### Returns:
### Returns:

* (*object*) An key/value object with the CSS styles as computed by the browser.

### Examples:
### Examples:

$('myElement').getStyles('width', 'height', 'padding');
$('myElement').getStyles('width', 'height', 'padding');
//returns {width: "10px", height: "10px", padding: "10px 0px 10px 0px"}

### See Also:
### See Also:

- [Element:getStyle][]

Expand Down
38 changes: 19 additions & 19 deletions Docs/Element/Element.md
Expand Up @@ -52,10 +52,10 @@ Selects and extends DOM elements. Elements arrays returned with $$ will also acc

### Arguments:

* Any number of the following as arguments are accepted:
* HTMLCollections,
* arrays of elements,
* elements, or
* Any number of the following as arguments are accepted:
* HTMLCollections,
* arrays of elements,
* elements, or
* strings as selectors.

### Returns:
Expand Down Expand Up @@ -263,7 +263,7 @@ This is a "dynamic arguments" method. Properties passed in can be any of the 'se
$('myElement').set('text', 'text goes here');
$('myElement').set('class', 'active');
//The 'styles' property passes the object to Element:setStyles.
var body = $(document.body).set('styles', {
var body = $(document.body).set('styles', {
'font': '12px Arial',
'color': 'blue'
});
Expand Down Expand Up @@ -529,9 +529,9 @@ Works like [Element:grab](#Element:grab), but allows multiple elements to be ado
Inserts the passed element(s) inside the Element (which will then become the parent element).

### Syntax:

myParent.adopt(el[, others]);

### Arguments:

1. el - (*mixed*) The id of an element, an Element, or an array of elements.
Expand All @@ -548,7 +548,7 @@ Inserts the passed element(s) inside the Element (which will then become the par
var myFirstElement = new Element('div', {id: 'myFirstElement'});
var mySecondElement = new Element('a', {id: 'mySecondElement'});
var myThirdElement = new Element('ul', {id: 'myThirdElement'});

myParent.adopt(myFirstElement);
myParent2.adopt(myFirstElement, 'mySecondElement');
myParent3.adopt([myFirstElement, mySecondElement, myThirdElement]);
Expand Down Expand Up @@ -582,9 +582,9 @@ Works like [Element:grab](#Element:grab), but instead of moving the grabbed elem
The Element is moved to the position of the passed element and becomes the parent.

### Syntax:

myParent.wraps(el[, where]);

### Arguments:

1. el - (*mixed*) The id of an element or an Element.
Expand Down Expand Up @@ -1141,7 +1141,7 @@ Reads the child inputs of the Element and generates a query string based on thei
##### JavaScript

$('myForm').toQueryString(); //Returns "email=bob@bob.com&zipCode=90210".


Element Method: getSelected {#Element:getSelected}
--------------------------------------------------
Expand Down Expand Up @@ -1169,7 +1169,7 @@ Returns the selected options of a select element.
##### JavaScript

$('country-select').getSelected(); //Returns whatever the user selected.

### Note:

This method returns an array, regardless of the multiple attribute of the select element.
Expand Down Expand Up @@ -1366,7 +1366,7 @@ Removes numerous attributes from the Element.
##### Resulting HTML

<a></a>


Element Method: store {#Element:store}
--------------------------------------
Expand Down Expand Up @@ -1426,16 +1426,16 @@ This Hash contains the functions that respond to the first argument passed in [E
### Adding a Custom Element Property

Element.Properties.disabled = {

get: function(){
return this.disabled;
}

set: function(value){
this.disabled = !!value;
this.setAttribute('disabled', !!value);
}

};

### Using a Custom Element Property
Expand Down Expand Up @@ -1499,8 +1499,8 @@ Sets the innerHTML of the Element.
<p></p>
</div>

### Getter:
### Getter:

Returns the inner HTML of the Element.

#### Syntax:
Expand Down Expand Up @@ -1546,7 +1546,7 @@ Sets the inner text of the Element.
##### Resulting HTML

<div id="myElement">some text</div>

### Getter:

Gets the inner text of the Element.
Expand Down
4 changes: 2 additions & 2 deletions Docs/Fx/Fx.Tween.md
Expand Up @@ -22,7 +22,7 @@ The Tween effect, used to transition any CSS property from one value to another.

1. element - (*mixed*) An Element or the string id of an Element to apply the transition to.
2. options - (*object*, optional) The [Fx][] options object, plus the options described below:

### Options:

* property - (*string*) The CSS property to transition to, for example 'width', 'color', 'font-size', 'border', etc. If this option is omitted, you are required to use the property as a first argument for the start and set methods. Defaults to null.
Expand Down Expand Up @@ -195,7 +195,7 @@ Element shortcut method which immediately transitions any single CSS property of
$('myElement').tween('height', [20, 200]);
//Transitions the border of "myElement" from its current to "6px solid blue":
$('myElement').tween('border', '6px solid #36f');

### See Also:

- [Fx.Tween][]
Expand Down
2 changes: 1 addition & 1 deletion Docs/Fx/Fx.md
Expand Up @@ -166,4 +166,4 @@ Resume a previously paused effect.
[Events]: /Class/Class.Extras#Events
[Options]: /Class/Class.Extras#Options
[Fx.Tween]: /Fx/Fx.Tween
[Fx.Morph]: /Fx/Fx.Morph
[Fx.Morph]: /Fx/Fx.Morph

0 comments on commit 45333ed

Please sign in to comment.