Skip to content
Browse files

whitespace cleanup

  • Loading branch information...
1 parent 627c4e3 commit 45333ed6acfb2af9362dffb02bfd8940829b88fe @kassens kassens committed Oct 5, 2008
View
4 Compatibility/Element/Element.Style.js
@@ -1,7 +1,7 @@
Element.implement({
-
+
setOpacity: function(op){
return this.set('opacity', op);
}
-
+
});
View
2 Compatibility/Fx/Fx.Morph.js
@@ -1,7 +1,7 @@
Fx.Styles = Fx.Morph;
Element.implement({
-
+
effects: function(options){
return new Fx.Morph(this, options);
}
View
2 Compatibility/Fx/Fx.Tween.js
@@ -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));
}
View
4 Compatibility/Fx/Fx.js
@@ -7,11 +7,11 @@ Fx.implement({
clearTimer: function(){
return this.cancel();
},
-
+
stop: function(){
return this.cancel();
}
});
-Fx.Base = Fx;
+Fx.Base = Fx;
View
2 Compatibility/Request/Request.JSON.js
@@ -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);
}
View
2 Compatibility/Request/Request.js
@@ -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);
}
View
10 Docs/Core/Core.md
@@ -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.
@@ -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}
View
2 Docs/Element/Element.Dimensions.md
@@ -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:
View
4 Docs/Element/Element.Event.md
@@ -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);
@@ -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.
View
40 Docs/Element/Element.Style.md
@@ -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.
@@ -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.
@@ -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][]
@@ -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][]
View
38 Docs/Element/Element.md
@@ -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:
@@ -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'
});
@@ -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.
@@ -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]);
@@ -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.
@@ -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}
--------------------------------------------------
@@ -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.
@@ -1366,7 +1366,7 @@ Removes numerous attributes from the Element.
##### Resulting HTML
<a></a>
-
+
Element Method: store {#Element:store}
--------------------------------------
@@ -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
@@ -1499,8 +1499,8 @@ Sets the innerHTML of the Element.
<p></p>
</div>
-### Getter:
-
+### Getter:
+
Returns the inner HTML of the Element.
#### Syntax:
@@ -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.
View
4 Docs/Fx/Fx.Tween.md
@@ -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.
@@ -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][]
View
2 Docs/Fx/Fx.md
@@ -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
View
18 Docs/Native/Event.md
@@ -35,7 +35,7 @@ Event Method: constructor {#Event:constructor}
### Examples:
$('myLink').addEvent('keydown', function(event){
- //The passed event parameter is already an instance of the Event class.
+ //The passed event parameter is already an instance of the Event class.
alert(event.key); //Returns the lowercase letter pressed.
alert(event.shift); //Returns true if the key pressed is shift.
if (event.key == 's' && event.control) alert('Document saved.'); //Executes if the user hits Ctr+S.
@@ -52,15 +52,15 @@ Event Method: stop {#Event:stop}
Stop an Event from propagating and also executes preventDefault.
-### Syntax:
+### Syntax:
myEvent.stop();
### Returns:
* (*object*) This Event instance.
-### Examples:
+### Examples:
##### HTML:
@@ -76,7 +76,7 @@ Stop an Event from propagating and also executes preventDefault.
}).delay(500, this);
});
-### Notes:
+### Notes:
- Returning false within the function can also stop the propagation of the Event.
@@ -91,15 +91,15 @@ Event Method: stopPropagation {#Event:stopPropagation}
Cross browser method to stop the propagation of an event (this stops the event from bubbling up through the DOM).
-### Syntax:
+### Syntax:
myEvent.stopPropagation();
-### Returns:
+### Returns:
* (*object*) This Event object.
-### Examples:
+### Examples:
"#myChild" does not cover the same area as myElement. Therefore, the 'click' differs from parent and child depending on the click location:
@@ -131,15 +131,15 @@ Event Method: preventDefault {#Event:preventDefault}
Cross browser method to prevent the default action of the event.
-### Syntax:
+### Syntax:
myEvent.preventDefault();
### Returns:
* (*object*) This Event object.
-### Examples:
+### Examples:
##### HTML:
View
2 Docs/Native/Hash.md
@@ -120,7 +120,7 @@ Returns the key of the specified value. Synonymous with [Array:indexOf][].
var hash = new Hash({'a': 'one', 'b': 'two', 'c': 3});
hash.keyOf('two'); //returns 'b'
hash.keyOf(3); //returns 'c'
- hash.keyOf('four') //returns false
+ hash.keyOf('four') //returns false
### Notes:
View
4 Docs/Request/Request.md
@@ -224,7 +224,7 @@ Sets a default Request instance for an Element. This is useful when handling fo
#### Returns:
-* (*element*) The original element.
+* (*element*) The original element.
#### Example:
@@ -252,7 +252,7 @@ Returns the previously set Request instance (or a new one with default options).
el.get('send', {method: 'get'});
el.send();
el.get('send'); //Returns the Request instance.
-
+
Native: Element {#Element}
==========================
View
24 Docs/Utilities/Cookie.md
@@ -7,7 +7,7 @@ Sets and accesses cookies.
- Based on the functions by Peter-Paul Koch [QuirksMode][].
-### Options: {#Cookie-options}
+### Options: {#Cookie-options}
* domain - (*string*: defaults to false) The domain the Cookie belongs to.
* path - (*string*: defaults to false) The path the Cookie belongs to.
@@ -25,21 +25,21 @@ Cookie Method: write {#Cookie:write}
Writes a cookie in the browser.
-### Syntax:
+### Syntax:
var myCookie = Cookie.write(key, value[, options]);
-### Arguments:
+### Arguments:
1. key - (*string*) The key (or name) of the cookie.
2. value - (*string*) The value to set. Cannot contain semicolons.
3. options - (*mixed*, optional) See [Cookie][].
-### Returns:
+### Returns:
* (*object*) An object with the options, the key and the value. You can give it as first parameter to Cookie.remove.
-### Examples:
+### Examples:
Saves the Cookie for the Duration of the Session:
@@ -56,19 +56,19 @@ Cookie Method: read {#Cookie:read}
Reads the value of a Cookie.
-### Syntax:
+### Syntax:
var myCookie = Cookie.read(name);
-### Arguments:
+### Arguments:
1. name - (*string*) The name of the Cookie to retrieve.
-### Returns:
+### Returns:
* (*mixed*) The cookie string value, or null if not found.
-### Examples:
+### Examples:
Cookie.read("username");
@@ -79,16 +79,16 @@ Cookie Method: dispose {#Cookie:dispose}
Removes a cookie from the browser.
-### Syntax:
+### Syntax:
var oldCookie = Cookie.dispose(cookie[, options]);
-### Arguments:
+### Arguments:
1. name - (*string*) The name of the cookie to remove or a previously saved Cookie instance.
2. options - (*object*, optional) See [Cookie][].
-### Examples:
+### Examples:
Remove a Cookie:
View
18 Docs/Utilities/JSON.md
@@ -12,19 +12,19 @@ JSON Method: encode {#JSON:encode}
Converts an object or array to a JSON string.
-### Syntax:
+### Syntax:
var myJSON = JSON.encode(obj);
-### Arguments:
+### Arguments:
1. obj - (*object*) The object to convert to string.
-### Returns:
+### Returns:
* (*string*) A JSON string.
-### Examples:
+### Examples:
var fruitsJSON = JSON.encode({apple: 'red', lemon: 'yellow'}); // returns: '{"apple":"red","lemon":"yellow"}'
@@ -35,23 +35,23 @@ JSON Method: decode {#JSON:decode}
Converts a JSON string into an JavaScript object.
-### Syntax:
+### Syntax:
var object = JSON.decode(string[, secure]);
-### Arguments:
+### Arguments:
1. string - (*string*) The string to evaluate.
2. secure - (*boolean*, optional: defaults to false) If set to true, checks for any hazardous syntax and returns null if any found.
-### Returns:
+### Returns:
* (*object*) The object represented by the JSON string.
-### Examples:
+### Examples:
var myObject = JSON.decode('{"apple":"red","lemon":"yellow"}'); //returns: {apple: 'red', lemon: 'yellow'}
-### Credits:
+### Credits:
- JSON test regexp is by [Douglas Crockford](http://crockford.com/) and [Tobie Langel](http://tobielangel.com/).
View
20 Docs/Utilities/Selectors.md
@@ -23,14 +23,14 @@ Gets all the elements within an element that match the given selector.
### Examples:
//Returns all anchors within myElement.
- $('myElement').getElements('a');
-
+ $('myElement').getElements('a');
+
//Returns all input tags with name "dialog".
$('myElement').getElements('input[name=dialog]');
//Returns all input tags with names ending with 'log'.
$('myElement').getElements('input[name$=log]');
-
+
//Returns all email links (starting with "mailto:").
$('myElement').getElements('a[href^=mailto:]');
@@ -58,15 +58,15 @@ Element Property: getElement {#Element:getElement}
Same as [Element:getElements](#Element:getElements), but returns only the first.
-### Syntax:
+### Syntax:
var anElement = myElement.getElement(selector);
-### Arguments:
+### Arguments:
1. selector - (*string*) The CSS Selector to match.
-### Returns:
+### Returns:
* (*mixed*) An extended [Element][], or null if not found.
@@ -85,7 +85,7 @@ Matches the Element with the given selector.
var matched = myElement.match(selector);
-### Arguments:
+### Arguments:
1. selector - (*string*) Selector to match the Element to.
@@ -206,7 +206,7 @@ First Child:
Last Child:
'nth-child(last)'
-
+
### Note:
This selector respects the w3c specifications, so it has 1 as its first child, not 0. Therefore nth-child(odd) will actually select the even children, if you think in zero-based indexes.
@@ -223,7 +223,7 @@ Matches every even child.
### Example:
$$('td:even');
-
+
### Note:
This selector is not part of the w3c specification, therefore its index starts at 0. This selector is highly recommended over nth-child(even), as this will return the real even children.
@@ -240,7 +240,7 @@ Matches every odd child.
### Example:
$$('td:odd');
-
+
### Note:
This selector is not part of the w3c specification, therefore its index starts at 0. This selector is highly recommended over nth-child(odd), as this will return the real odd children.
View
14 Docs/Utilities/Swiff.md
@@ -16,7 +16,7 @@ Flash detection and Internet Explorer/Flash Player 9 fix adapted from [SWFObject
1. path - (*string*) The path to the SWF file.
2. options - (*object*, optional) See Options below.
-### Options:
+### Options:
* id - (*string*: defaults to 'Swiff\_' + unique id) The id of the SWF object.
* width - (*number*: defaults to 1) The width of the SWF object.
@@ -62,28 +62,28 @@ Flash detection and Internet Explorer/Flash Player 9 fix adapted from [SWFObject
Swiff Function: remote {#Swiff:remote}
--------------------------------------
-Calls an ActionScript function from JavaScript.
+Calls an ActionScript function from JavaScript.
-### Syntax:
+### Syntax:
var result = Swiff.remote(obj, fn);
-### Arguments:
+### Arguments:
1. obj - (*element*) A Swiff instance (an HTML object Element).
2. fn - (*string*) The name of the function to execute in the Flash movie.
-### Returns:
+### Returns:
* (*mixed*) The ActionScript function's result.
-### Example:
+### Example:
var obj = new Swiff('myMovie.swf');
//Alerts "This is from the .swf file!".
alert(Swiff.remote(obj, 'myFlashFn'));
-### Note:
+### Note:
The SWF file must be compiled with the ExternalInterface component. See the Adobe documentation on [External Interface][] for more information.
View
2 README.md
@@ -1,6 +1,6 @@
MooTools Core
=============
-This repository is for MooTools developers, not users.
+This repository is for MooTools developers, not users.
All users should download MooTools from [MooTools.net](http://mootools.net "MooTools")
[See the MooTools Wiki for more information](http://github.com/mootools/mootools-core/wikis)
View
8 Source/Element/Element.Dimensions.js
@@ -48,14 +48,14 @@ Element.implement({
}
return position;
},
-
+
getOffsetParent: function(){
var element = this;
- if (isBody(element)) return null;
+ if (isBody(element)) return null;
if (!Browser.Engine.trident) return element.offsetParent;
- while ((element = element.parentNode) && !isBody(element)){
+ while ((element = element.parentNode) && !isBody(element)){
if (styleString(element, 'position') != 'static') return element;
- }
+ }
return null;
},
View
4 Source/Element/Element.Style.js
@@ -33,11 +33,11 @@ Element.Properties.opacity = {
};
Element.implement({
-
+
setOpacity: function(value){
return this.set('opacity', value, true);
},
-
+
getOpacity: function(){
return this.get('opacity');
},
View
2 Source/Native/Array.js
@@ -22,7 +22,7 @@ Array.implement({
}
return results;
},
-
+
clean: function() {
return this.filter($defined);
},
View
12 Source/Native/Event.js
@@ -19,7 +19,7 @@ var Event = new Native({
var type = event.type;
var target = event.target || event.srcElement;
while (target && target.nodeType == 3) target = target.parentNode;
-
+
if (type.test(/key/)){
var code = event.which || event.keyCode;
var key = Event.Keys.keyOf(code);
@@ -58,19 +58,19 @@ var Event = new Native({
return $extend(this, {
event: event,
type: type,
-
+
page: page,
client: client,
rightClick: rightClick,
-
+
wheel: wheel,
-
+
relatedTarget: related,
target: target,
-
+
code: code,
key: key,
-
+
shift: event.shiftKey,
control: event.ctrlKey,
alt: event.altKey,
View
4 Source/Native/Hash.js
@@ -107,7 +107,7 @@ Hash.implement({
});
return values;
},
-
+
toQueryString: function(base){
var queryString = [];
Hash.each(this, function(value, key){
@@ -126,7 +126,7 @@ Hash.implement({
}
if (value != undefined) queryString.push(result);
});
-
+
return queryString.join('&');
}
View
18 Source/Request/Request.HTML.js
@@ -19,9 +19,9 @@ Request.HTML = new Class({
processHTML: function(text){
var match = text.match(/<body[^>]*>([\s\S]*?)<\/body>/i);
text = (match) ? match[1] : text;
-
+
var container = new Element('div');
-
+
return $try(function(){
var root = '<root>' + text + '</root>', doc;
if (Browser.Engine.trident){
@@ -42,27 +42,27 @@ Request.HTML = new Class({
success: function(text){
var options = this.options, response = this.response;
-
+
response.html = text.stripScripts(function(script){
response.javascript = script;
});
-
+
var temp = this.processHTML(response.html);
-
+
response.tree = temp.childNodes;
response.elements = temp.getElements('*');
-
+
if (options.filter) response.tree = response.elements.filter(options.filter);
if (options.update) $(options.update).empty().adopt(response.tree);
if (options.evalScripts) $exec(response.javascript);
-
+
this.onSuccess(response.tree, response.elements, response.html, response.javascript);
}
});
Element.Properties.load = {
-
+
set: function(options){
var load = this.retrieve('load');
if (load) load.cancel();
@@ -80,7 +80,7 @@ Element.Properties.load = {
};
Element.implement({
-
+
load: function(){
this.get('load').send(Array.link(arguments, {data: Object.type, url: String.type}));
return this;
View
6 Source/Utilities/DomReady.js
@@ -15,14 +15,14 @@ Element.Events.domready = {
};
(function(){
-
+
var domready = function(){
if (Browser.loaded) return;
Browser.loaded = true;
window.fireEvent('domready');
document.fireEvent('domready');
};
-
+
if (Browser.Engine.trident){
var temp = document.createElement('div');
(function(){
@@ -39,5 +39,5 @@ Element.Events.domready = {
window.addEvent('load', domready);
document.addEvent('DOMContentLoaded', domready);
}
-
+
})();
View
12 Source/scripts.json
@@ -40,7 +40,7 @@
"deps": ["Core"],
"desc": "Contains Hash Prototypes. Provides a means for overcoming the JavaScript practical impossibility of extending native Objects."
},
-
+
"Event": {
"deps": ["Browser", "Array", "Function", "Number", "String", "Hash"],
"desc": "Contains the Event Class, to make the event object Crossbrowser."
@@ -78,22 +78,22 @@
"deps": ["Element"],
"desc": "Contains methods for interacting with the styles of Elements in a fashionable way."
},
-
+
"Element.Dimensions": {
"deps": ["Element"],
"desc": "Contains methods to work with size, scroll, or positioning of Elements and the window object."
}
},
-
+
"Utilities": {
-
+
"Selectors": {
"deps": ["Element"],
"desc": "Adds advanced CSS-style querying capabilities for targeting HTML Elements. Includes pseudo selectors."
},
-
+
"DomReady": {
"deps": ["Element.Event"],
"desc": "Contains the custom event domready."
@@ -108,7 +108,7 @@
"deps": ["Browser", "Class", "Class.Extras"],
"desc": "Class for creating, reading, and deleting browser Cookies."
},
-
+
"Swiff": {
"deps": ["Element.Event"],
"desc": "Wrapper for embedding SWF movies. Supports External Interface Communication."
View
2 Specs/Assets/Scripts/DiffMatchPatch.js
@@ -800,7 +800,7 @@ diff_match_patch.prototype.diff_cleanupSemantic = function(diffs) {
* @param {Array.<Array.<*>>} diffs Array of diff tuples
*/
diff_match_patch.prototype.diff_cleanupSemanticLossless = function(diffs) {
- // Define some regex patterns for matching boundaries.
+ // Define some regex patterns for matching boundaries.
var punctuation = /[^a-zA-Z0-9]/;
var whitespace = /\s/;
var linebreak = /[\r\n]/;
View
10 Specs/Element/Element.Style.js
@@ -7,17 +7,17 @@ License:
*/
describe('Element.set `opacity`', {
-
+
'should set the opacity of an Element': function() {
var el = new Element('div').set('opacity', 0.4);
if (Browser.Engine.trident) value_of(el.style.filter).should_be('alpha(opacity=40)');
value_of(el.style.opacity).should_be(0.4);
},
-
+
'should return the opacity of an Element': function() {
value_of(new Element('div').set('opacity', 0.4).get('opacity')).should_be(0.4);
}
-
+
});
describe('Element.getStyle', {
@@ -26,12 +26,12 @@ describe('Element.getStyle', {
var el = new Element('div').set('html', '<div style="color:#00ff00"></div>');
value_of(el.getElement('div').getStyle('color')).should_be('#00ff00');
},
-
+
'should getStyle a six digit hex code from an RGB value': function() {
var el = new Element('div').set('html', '<div style="color:rgb(0, 255, 0)"></div>');
value_of(el.getElement('div').getStyle('color')).should_be('#00ff00');
},
-
+
'should `getStyle` with a dash in it': function() {
var el = new Element('div').set('html', '<div style="list-style-type:square"></div>');
value_of(el.getElement('div').getStyle('list-style-type')).should_be('square');
View
30 Specs/Utilities/Color.js
@@ -2,61 +2,61 @@ var myColor;
//colors compared with photoshop values.
describe('Color constructor, hex', {
-
+
'before all': function(){
myColor = new Color('#a2c240');
},
-
+
'should have the correct rgb': function(){
value_of(myColor).should_be([162, 194, 64]);
},
-
+
'should have the correct hsb': function(){
value_of(myColor.hsb).should_be([75, 67, 76]);
},
-
+
'should have the correct hex': function(){
value_of(myColor.hex).should_be('#a2c240');
}
-
+
});
describe('Color constructor, hsb', {
-
+
'before all': function(){
myColor = new Color('hsb(75, 67, 76)');
},
-
+
'should have the correct rgb': function(){
value_of(myColor).should_be([161, 194, 64]);
},
-
+
'should have the correct hsb': function(){
value_of(myColor.hsb).should_be([75, 67, 76]);
},
-
+
'should have the correct hex': function(){
value_of(myColor.hex).should_be('#a1c240');
}
-
+
});
describe('Color constructor, rgb', {
-
+
'before all': function(){
myColor = new Color('rgb(162, 194, 64)');
},
-
+
'should have the correct rgb': function(){
value_of(myColor).should_be([162, 194, 64]);
},
-
+
'should have the correct hsb': function(){
value_of(myColor.hsb).should_be([75, 67, 76]);
},
-
+
'should have the correct hex': function(){
value_of(myColor.hex).should_be('#a2c240');
}
-
+
});
View
8 Specs/index.html
@@ -3,24 +3,24 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
-
+
<title>MooTools Specs</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" media="screen" href="Assets/Styles/Specs.css" />
<script type="text/javascript" src="Assets/Scripts/JSSpec.js"></script>
<script type="text/javascript" src="Assets/Scripts/DiffMatchPatch.js"></script>
<script type="text/javascript" src="Assets/Scripts/Builder.js"></script>
-
+
<script type="text/javascript" charset="utf-8">
Builder.includeType('source');
if (!Builder.includeRequest('specs')) Builder.includeType('specs');
</script>
-
+
</head>
<body>
-
+
</body>
</html>

0 comments on commit 45333ed

Please sign in to comment.
Something went wrong with that request. Please try again.