Skip to content

Commit

Permalink
Trailing whitepace police
Browse files Browse the repository at this point in the history
  • Loading branch information
arian committed Aug 21, 2012
1 parent 205df1b commit c5cae2a
Show file tree
Hide file tree
Showing 30 changed files with 144 additions and 145 deletions.
6 changes: 3 additions & 3 deletions Docs/Element/Element.md
Expand Up @@ -640,9 +640,9 @@ Inserts the passed element(s) inside the Element (which will then become the par
var mySecondElement = new Element('p#second');
var myThirdElement = new Element('ul#third');
var myFourthElement = new Element('a#fourth');

var myParentElement = new Element('div#parent');

myFirstElement.adopt(mySecondElement);
mySecondElement.adopt(myThirdElement, myFourthElement);
myParentElement.adopt([myFirstElement, new Element('span#another')]);
Expand Down Expand Up @@ -1427,7 +1427,7 @@ Sets an attribute or special property for this Element.
- use 'class', not 'className'
- use 'frameborder', not 'frameBorder'
- etc.
- When setting the `src` property for an image file, be sure to remove the `width` and `height` attribute (use `Element.removeAttribute`). IE7, and less, set and freeze the `width` and `height` of an image if previously specified.
- When setting the `src` property for an image file, be sure to remove the `width` and `height` attribute (use `Element.removeAttribute`). IE7, and less, set and freeze the `width` and `height` of an image if previously specified.

Element Method: setProperties {#Element:setProperties}
------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion Docs/Request/Request.HTML.md
Expand Up @@ -176,4 +176,4 @@ Updates the content of the Element with a Request.HTML GET request.
[Request]: /core/Request/Request
[$]: /core/Element/Element/#Window:dollar
[Element.Properties]: /core/Element/Element/#Element-Properties
[Elements:filter]: /core/Element/Element#Elements:filter
[Elements:filter]: /core/Element/Element#Elements:filter
4 changes: 2 additions & 2 deletions Docs/Slick/Slick.md
Expand Up @@ -240,7 +240,7 @@ Nth Expression:
* nExpression - (string) A nth expression for the "every" nth-child.

### Examples:

<span id="i1"></span>
<span id="i2"></span>
<span id="i3"></span>
Expand All @@ -252,7 +252,7 @@ Nth Expression:
$$(':nth-last-child(2n)'); //Returns Elements #i2 and #i4.

$$(':nth-last-child(2n+1)') //Returns Elements #i1, #i3 and #i5.

$$(':nth-last-child(3n+2)') //Returns Elements #i1 and #i4.

Every Odd Child (same as 2n+1):
Expand Down
2 changes: 1 addition & 1 deletion Docs/Types/String.md
Expand Up @@ -397,4 +397,4 @@ Strips the String of its *<script>* tags and anything in between them.
[MDC Array]: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array
[String:trim]: #String:trim
[Array:rgbToHex]: /core/Types/Array/#Array:rgbToHex
[String:trim]: #String:trim
[String:trim]: #String:trim
2 changes: 1 addition & 1 deletion Specs/1.2/Core/Browser.js
Expand Up @@ -37,4 +37,4 @@ describe('Window', {
expect($defined(window.Element.prototype)).toBeTruthy();
}

});
});
8 changes: 4 additions & 4 deletions Specs/1.2/Core/Core.js
Expand Up @@ -240,7 +240,7 @@ describe('$time', {
'should return a timestamp': function(){
expect(Number.type($time())).toBeTruthy();
},

'should be within a reasonable range': function(){
expect($time() < 1e13 && $time() > 1e12).toBeTruthy();
}
Expand Down Expand Up @@ -318,7 +318,7 @@ describe('$type', {
expect(type == 'array' || type == 'arguments').toBeTruthy();
return;
}

expect($type(arguments)).toEqual('arguments');
},

Expand All @@ -338,11 +338,11 @@ describe('$type', {
var div = document.createElement('div');
expect($type(div)).toEqual('element');
},

"should return 'array' for Elements": function(){
expect($type(new Elements)).toEqual('array');
},

"should return 'window' for the window object": function(){
expect($type(window)).toEqual('window');
},
Expand Down
2 changes: 1 addition & 1 deletion Specs/1.2/Core/Native.js
Expand Up @@ -66,4 +66,4 @@ describe('Native (private)', {

});

})();
})();
38 changes: 19 additions & 19 deletions Specs/1.2/Element/Element.Dimensions.js
Expand Up @@ -28,7 +28,7 @@ describe('Element.Dimensions', function(){
zIndex: 1
}
}).inject($(document.body));

relDiv = new Element('div', {
styles: {
width: 50,
Expand All @@ -43,7 +43,7 @@ describe('Element.Dimensions', function(){
'display': 'inline'
}
}).inject(div);

absDiv = new Element('div', {
styles: {
width: 10,
Expand All @@ -58,7 +58,7 @@ describe('Element.Dimensions', function(){
overflow: 'hidden'
}
}).inject(relDiv);

scrollDiv = new Element('div', {
styles: {
width: 100,
Expand All @@ -70,7 +70,7 @@ describe('Element.Dimensions', function(){
left: 0
}
}).inject($(document.body));

tallDiv = new Element('div', {
styles: {
width: 200,
Expand All @@ -81,50 +81,50 @@ describe('Element.Dimensions', function(){
});

describe('Element.getSize', function(){

it('should measure the width and height of the element', function(){
expect(div.getSize().x).toEqual(108);
expect(div.getSize().y).toEqual(108);
});

});

describe('Element.getPosition', function(){

it('should measure the x and y position of the element', function(){
expect(div.getPosition()).toEqual({x: 102, y: 102});
});

it('should measure the x and y position of the element relative to another', function(){
expect(relDiv.getPosition(div)).toEqual({x: 8, y: 8});
});

});

describe('Element.getCoordinates', function(){

it('should return the coordinates relative to parent', function(){
expect(absDiv.getCoordinates(relDiv)).toEqual({left:15, top:15, width:22, height:22, right:37, bottom:37});
});

});

describe('Element.getScrollSize', function(){

it('should return the scrollSize', function(){
expect(scrollDiv.getScrollSize()).toEqual({x:200, y:200});
});

});

describe('Element.scrollTo', function(){

it('should scroll the element', function(){
expect(scrollDiv.scrollTo(20, 20).getScroll()).toEqual({x:20, y:20});
});

});

afterEach(function(){
[div, relDiv, absDiv, scrollDiv, tallDiv].each(function(el){
$(el).destroy();
Expand Down
2 changes: 1 addition & 1 deletion Specs/1.2/Element/Element.Style.js
Expand Up @@ -84,4 +84,4 @@ describe('Element.setStyles', {
expect(new Element('div').setStyles({'list-style-type':'square', 'color':'#00ff00'}).getStyles('list-style-type', 'color')).toEqual({'list-style-type':'square', color:'#00ff00'});
}

});
});
10 changes: 5 additions & 5 deletions Specs/1.2/Utilities/Cookie.js
Expand Up @@ -7,11 +7,11 @@ License:
*/

describe('Cookie', {

"should set a cookie": function(){
Cookie.write('test', 1);


}
});

});
4 changes: 2 additions & 2 deletions Specs/1.3base/Class/Class.js
Expand Up @@ -263,7 +263,7 @@ describe('Class toString', function(){
var Italian = new Class({

Extends: Person,

toString: function(){
return "It's me, " + this.name;
}
Expand All @@ -277,4 +277,4 @@ describe('Class toString', function(){

});

})();
})();
22 changes: 11 additions & 11 deletions Specs/1.3base/Types/Array.js
Expand Up @@ -7,7 +7,7 @@ provides: [Array.Specs]
...
*/
(function(){

var getTestArray = function(){
var a = [0, 1, 2, 3];
delete a[1];
Expand Down Expand Up @@ -41,14 +41,14 @@ describe("Array Methods 1.3", {
var arr = array.concat([false, null, 4]).filter(Type.isNumber);
expect(arr).toEqual(array.concat(4));
},

'filter should skip deleted elements': function(){
var i = 0;
getTestArray().filter(function(){
i++;
return true;
});

expect(i).toEqual(2);
},

Expand All @@ -75,25 +75,25 @@ describe("Array Methods 1.3", {
getTestArray().map(function(){
return i++;
});

expect(i).toEqual(2);
},

// Array.every

'should return true if every item matches the comparator, otherwise false': function(){
expect([1,2,3,0,0,0].every(Type.isNumber)).toBeTruthy();

expect(['1',2,3,0].every(Type.isNumber)).toBeFalsy();
},

'every should skip deleted elements': function(){
var i = 0;
getTestArray().every(function(){
i++;
return true;
});

expect(i).toEqual(2);
},

Expand All @@ -104,18 +104,18 @@ describe("Array Methods 1.3", {

expect([1,2,3,0,0,0].map(String).some(Type.isNumber)).toBeFalsy();
},

'some should skip deleted elements': function(){
var i = 0;
var a = getTestArray();
delete a[0];

// skips the first three elements
a.some(function(value, index){
i = index;
return true;
});

expect(i).toEqual(3);
},

Expand Down Expand Up @@ -268,4 +268,4 @@ describe('Array.pick', function(){

});

})();
})();
2 changes: 1 addition & 1 deletion Specs/1.3base/Types/Object.js
Expand Up @@ -125,4 +125,4 @@ describe('Object.getLength', function(){

});

})();
})();
2 changes: 1 addition & 1 deletion Specs/1.3base/package.yml
Expand Up @@ -12,4 +12,4 @@ sources:
- "Types/Function.js"
- "Types/Object.js"
- "Class/Class.js"
- "Fx/Fx.js"
- "Fx/Fx.js"
4 changes: 2 additions & 2 deletions Specs/1.3client/Browser/Browser.js
Expand Up @@ -12,9 +12,9 @@ describe('Browser', {
'should think it is executed in a browser': function(){
expect(Browser.ie || Browser.safari || Browser.chrome || Browser.firefox || Browser.opera).toEqual(true);
},

'should assume the IE version is emulated by the documentMode (X-UA-Compatible)': function(){
if (Browser.ie && document.documentMode) expect(Browser.version).toEqual(document.documentMode);
}

});
});
2 changes: 1 addition & 1 deletion Specs/1.3client/Class/Class.Extras.js
Expand Up @@ -180,4 +180,4 @@ runEventSpecs('element', function(){
return new Element('div');
});

})();
})();
4 changes: 2 additions & 2 deletions Specs/1.3client/Core/Core.js
Expand Up @@ -44,7 +44,7 @@ describe('Array.from', function(){
var array = Array.from(div1.getElementsByTagName('*'));
expect(Type.isArray(array)).toEqual(true);
});

it('should return an array for an Options collection', function(){
var div = document.createElement('div');
div.innerHTML = '<select><option>a</option></select>';
Expand All @@ -53,4 +53,4 @@ describe('Array.from', function(){
expect(Type.isArray(array)).toEqual(true);
});

});
});
2 changes: 1 addition & 1 deletion Specs/1.3client/Element/Element.Dimensions.js
Expand Up @@ -28,7 +28,7 @@ describe('Element.getOffsetParent', function(){
td = new Element('td').inject(new Element('tr').inject(table));

container.inject(document.body);

});

it('Should return the right offsetParent', function(){
Expand Down

1 comment on commit c5cae2a

@ibolmo
Copy link
Member

@ibolmo ibolmo commented on c5cae2a Aug 21, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol nice.

Please sign in to comment.