Skip to content

Commit

Permalink
picking up latest core
Browse files Browse the repository at this point in the history
  • Loading branch information
anutron committed Apr 7, 2009
1 parent 3f66473 commit 72bea50
Show file tree
Hide file tree
Showing 142 changed files with 20,160 additions and 0 deletions.
24 changes: 24 additions & 0 deletions assets/mootools-core/CHANGELOG
@@ -0,0 +1,24 @@
MooTools 1.2.1 - October 16th, 2008

[ADD] Element.set('html') now allows to set the innerHTML of all Elements (including tables and selects)
[ADD] Browser.Features.query to check if the Browser supports the new querySelector method on the document object
[ADD] Browser.Engine detection for WebKit version 525
[ADD] Browser.Engine detection for Opera 9.6
[ADD] Element.removeEvents now also accepts an object
[ADD] Class.removeEvents now also accepts an object
[ADD] Element.match now also accepts an Element
[CHG] Element.js has been refactored to make use of private variables wherever possible
[CHG] $unlink now returns an unlinked Hash instead of an object when a Hash is passed in
[CHG] Faster Element.hasChild
[CHG] The domready event for WebKit version 525 (or later) uses the native DomContentLoaded event
[FIX] Fixed getPosition in Internet Explorer to be faster and more reliable
[FIX] Selector [attribute!=val] now matches elements with empty attribute
[FIX] Element.clone is now much faster and retains state of form elements
[FIX] Fixed memory leaks related to IFrame unloading
[FIX] Fixed memory leaks related to Element storage
[FIX] Custom Events no longer stop the event when the condition returns false
[FIX] Documentation fixes and improvements
[FIX] :checked pseudo now works properly in Internet Explorer
[FIX] Class.js works in Safari 2 again, and contains no more eval hack
[FIX] Element text setter/getter is now working in Safari 2
[FIX] $exec is now working in Safari 2
8 changes: 8 additions & 0 deletions assets/mootools-core/Compatibility/Class/Class.js
@@ -0,0 +1,8 @@
Class.empty = $empty;

//legacy .extend support

Class.prototype.extend = function(properties){
properties.Extends = this;
return new Class(properties);
};
9 changes: 9 additions & 0 deletions assets/mootools-core/Compatibility/Core/Browser.js
@@ -0,0 +1,9 @@
window.extend = document.extend = function(properties){
for (var property in properties) this[property] = properties[property];
};

window[Browser.Engine.name] = window[Browser.Engine.name + Browser.Engine.version] = true;

window.ie = window.trident;
window.ie6 = window.trident4;
window.ie7 = window.trident5;
18 changes: 18 additions & 0 deletions assets/mootools-core/Compatibility/Core/Core.js
@@ -0,0 +1,18 @@
$A = function(iterable, start, length){
if (Browser.Engine.trident && $type(iterable) == 'collection'){
start = start || 0;
if (start < 0) start = iterable.length + start;
length = length || (iterable.length - start);
var array = [];
for (var i = 0; i < length; i++) array[i] = iterable[start++];
return array;
}
start = (start || 0) + ((start < 0) ? iterable.length : 0);
var end = ((!$chk(length)) ? iterable.length : length) + start;
return Array.prototype.slice.call(iterable, start, end);
};

(function(){
var natives = [Array, Function, String, RegExp, Number];
for (var i = 0, l = natives.length; i < l; i++) natives[i].extend = natives[i].implement;
})();
@@ -0,0 +1 @@
Event.keys = Event.Keys;
7 changes: 7 additions & 0 deletions assets/mootools-core/Compatibility/Element/Element.Style.js
@@ -0,0 +1,7 @@
Element.implement({

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

});
47 changes: 47 additions & 0 deletions assets/mootools-core/Compatibility/Element/Element.js
@@ -0,0 +1,47 @@
Element.extend = Element.implement;

Elements.extend = Elements.implement;

Element.implement({

getFormElements: function(){
return this.getElements('input, textarea, select');
},

replaceWith: function(el){
el = $(el);
this.parentNode.replaceChild(el, this);
return el;
},

removeElements: function(){
return this.dispose();
}

});

Element.alias({'dispose': 'remove', 'getLast': 'getLastChild'});

Element.implement({

getText: function(){
return this.get('text');
},

setText: function(text){
return this.set('text', text);
},

setHTML: function(){
return this.set('html', arguments);
},

getHTML: function(){
return this.get('html');
},

getTag: function(){
return this.get('tag');
}

});
9 changes: 9 additions & 0 deletions assets/mootools-core/Compatibility/Fx/Fx.Morph.js
@@ -0,0 +1,9 @@
Fx.Styles = Fx.Morph;

Element.implement({

effects: function(options){
return new Fx.Morph(this, options);
}

});
7 changes: 7 additions & 0 deletions assets/mootools-core/Compatibility/Fx/Fx.Scroll.js
@@ -0,0 +1,7 @@
Fx.Scroll.implement({

scrollTo: function(y, x){
return this.start(y, x);
}

});
11 changes: 11 additions & 0 deletions assets/mootools-core/Compatibility/Fx/Fx.Tween.js
@@ -0,0 +1,11 @@
Fx.Style = function(element, property, options){
return new Fx.Tween(element, $extend({property: property}, options));
};

Element.implement({

effect: function(property, options){
return new Fx.Tween(this, $extend({property: property}, options));
}

});
17 changes: 17 additions & 0 deletions assets/mootools-core/Compatibility/Fx/Fx.js
@@ -0,0 +1,17 @@
Fx.implement({

custom: function(from, to){
return this.start(from, to);
},

clearTimer: function(){
return this.cancel();
},

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

});

Fx.Base = Fx;
9 changes: 9 additions & 0 deletions assets/mootools-core/Compatibility/Native/Array.js
@@ -0,0 +1,9 @@
Array.implement({

copy: function(start, length){
return $A(this, start, length);
}

});

Array.alias({erase: 'remove', combine: 'merge'});
9 changes: 9 additions & 0 deletions assets/mootools-core/Compatibility/Native/Function.js
@@ -0,0 +1,9 @@
Function.extend({

bindAsEventListener: function(bind, args){
return this.create({'bind': bind, 'event': true, 'arguments': args});
}

});

Function.empty = $empty;
2 changes: 2 additions & 0 deletions assets/mootools-core/Compatibility/Native/Hash.js
@@ -0,0 +1,2 @@
Hash.alias({getKeys: 'keys', getValues: 'values', has: 'hasKey', combine: 'merge'});
var Abstract = Hash;
24 changes: 24 additions & 0 deletions assets/mootools-core/Compatibility/Request/Request.JSON.js
@@ -0,0 +1,24 @@
JSON.Remote = new Class({

options: {
key: 'json'
},

Extends: Request.JSON,

initialize: function(url, options){
this.parent(options);
this.onComplete = $empty;
this.url = url;
},

send: function(data){
if (!this.check(data)) return this;
return this.parent({url: this.url, data: {json: Json.encode(data)}});
},

failure: function(){
this.fireEvent('failure', this.xhr);
}

});
37 changes: 37 additions & 0 deletions assets/mootools-core/Compatibility/Request/Request.js
@@ -0,0 +1,37 @@
Object.toQueryString = Hash.toQueryString;

var XHR = new Class({

Extends: Request,

options: {
update: false
},

initialize: function(url, options){
this.parent(options);
this.url = url;
},

request: function(data){
return this.send(this.url, data || this.options.data);
},

send: function(url, data){
if (!this.check(url, data)) return this;
return this.parent({url: url, data: data});
},

success: function(text, xml){
text = this.processScripts(text);
if (this.options.update) $(this.options.update).empty().set('html', text);
this.onSuccess(text, xml);
},

failure: function(){
this.fireEvent('failure', this.xhr);
}

});

var Ajax = XHR;
11 changes: 11 additions & 0 deletions assets/mootools-core/Compatibility/Utilities/Cookie.js
@@ -0,0 +1,11 @@
Cookie.set = function(key, value, options){
return new Cookie(key, options).write(value);
};

Cookie.get = function(key){
return new Cookie(key).read();
};

Cookie.remove = function(key, options){
return new Cookie(key, options).dispose();
};
4 changes: 4 additions & 0 deletions assets/mootools-core/Compatibility/Utilities/JSON.js
@@ -0,0 +1,4 @@
var Json = JSON;

JSON.toString = JSON.encode;
JSON.evaluate = JSON.decode;
39 changes: 39 additions & 0 deletions assets/mootools-core/Compatibility/Utilities/Selectors.js
@@ -0,0 +1,39 @@
Native.implement([Element, Document], {

getElementsByClassName: function(className){
return this.getElements('.' + className);
},

getElementsBySelector: function(selector){
return this.getElements(selector);
}

});

Elements.implement({

filterByTag: function(tag){
return this.filter(tag);
},

filterByClass: function(className){
return this.filter('.' + className);
},

filterById: function(id){
return this.filter('#' + id);
},

filterByAttribute: function(name, operator, value){
return this.filter('[' + name + (operator || '') + (value || '') + ']');
}

});

var $E = function(selector, filter){
return ($(filter) || document).getElement(selector);
};

var $ES = function(selector, filter){
return ($(filter) || document).getElements(selector);
};

0 comments on commit 72bea50

Please sign in to comment.