[Argil-svn] SF.net SVN: argil: [487] trunk/src/ArgilCore/Public/scripts/mootools.full. v1.00.js
Status: Alpha
Brought to you by:
tswicegood
|
From: <tsw...@us...> - 2007-02-19 02:29:41
|
Revision: 487
http://argil.svn.sourceforge.net/argil/?rev=487&view=rev
Author: tswicegood
Date: 2007-02-18 18:29:36 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
Namespace all references to 'window'
Modified Paths:
--------------
trunk/src/ArgilCore/Public/scripts/mootools.full.v1.00.js
Modified: trunk/src/ArgilCore/Public/scripts/mootools.full.v1.00.js
===================================================================
--- trunk/src/ArgilCore/Public/scripts/mootools.full.v1.00.js 2007-02-19 02:22:43 UTC (rev 486)
+++ trunk/src/ArgilCore/Public/scripts/mootools.full.v1.00.js 2007-02-19 02:29:36 UTC (rev 487)
@@ -208,9 +208,12 @@
//window, document
-window.extend = document.extend = Moo.Object.extend;
-Moo.Window = window;
+Moo.document = document;
+Moo.window = window;
+Moo.window.extend = Moo.document.extend = Moo.Object.extend;
+Moo.Window = Moo.window;
+
/*
Function: $type
Returns the type of object that matches the element passed in.
@@ -322,13 +325,13 @@
window.gecko - will be set to true if the current browser is Mozilla/Gecko.
*/
-if (window.ActiveXObject) window.ie = window[window.XMLHttpRequest ? 'ie7' : 'ie6'] = true;
-else if (document.childNodes && !document.all && !navigator.taintEnabled) window.khtml = true;
-else if (document.getBoxObjectFor != null) window.gecko = true;
+if (Moo.window.ActiveXObject) Moo.window.ie = Moo.window[Moo.window.XMLHttpRequest ? 'ie7' : 'ie6'] = true;
+else if (Moo.document.childNodes && !Moo.document.all && !navigator.taintEnabled) Moo.window.khtml = true;
+else if (Moo.document.getBoxObjectFor != null) Moo.window.gecko = true;
//enables background image cache for internet explorer 6
-if (window.ie6) try {document.execCommand("BackgroundImageCache", false, true);} catch (e){};
+if (Moo.window.ie6) try {Moo.document.execCommand("BackgroundImageCache", false, true);} catch (e){};
/*
Script: Array.js
@@ -894,7 +897,7 @@
return function(event){
var args;
if (options.event){
- event = event || window.event;
+ event = event || Moo.window.event;
args = [(options.event === true) ? event : new options.event(event)];
if (options.arguments) args = args.concat(options.arguments);
}
@@ -1098,7 +1101,7 @@
Moo.$ = function(el){
if (!el) return false;
- if (el._element_extended_ || [window, document].test(el)) return el;
+ if (el._element_extended_ || [Moo.window, document].test(el)) return el;
if ($type(el) == 'string') el = document.getElementById(el);
if ($type(el) != 'element') return false;
if (['object', 'embed'].test(el.tagName.toLowerCase()) || el.extend) return el;
@@ -1323,7 +1326,7 @@
*/
appendText: function(text){
- if (window.ie){
+ if (Moo.window.ie){
switch(this.getTag()){
case 'style': this.styleSheet.cssText = text; return this;
case 'script': this.setProperty('text', text); return this;
@@ -1465,7 +1468,7 @@
if(this.style.visibility != "visible") this.style.visibility = "visible";
}
if (!this.currentStyle || !this.currentStyle.hasLayout) this.style.zoom = 1;
- if (window.ie) this.style.filter = "alpha(opacity=" + opacity*100 + ")";
+ if (Moo.window.ie) this.style.filter = "alpha(opacity=" + opacity*100 + ")";
this.style.opacity = this.opacity = opacity;
return this;
},
@@ -1520,7 +1523,7 @@
if (!this.events[type].keys.test(fn)){
this.events[type].keys.push(fn);
if (this.addEventListener){
- this.addEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, fn, false);
+ this.addEventListener((type == 'mousewheel' && Moo.window.gecko) ? 'DOMMouseScroll' : type, fn, false);
} else {
fn = fn.bind(this);
this.attachEvent('on'+type, fn);
@@ -1548,7 +1551,7 @@
if (pos == -1) return this;
var key = this.events[type].keys.splice(pos,1)[0];
if (this.removeEventListener){
- this.removeEventListener((type == 'mousewheel' && window.gecko) ? 'DOMMouseScroll' : type, key, false);
+ this.removeEventListener((type == 'mousewheel' && Moo.window.gecko) ? 'DOMMouseScroll' : type, key, false);
} else {
this.detachEvent('on'+type, this.events[type].values.splice(pos,1)[0]);
}
@@ -1677,7 +1680,7 @@
switch (property){
case 'class': this.className = value; break;
case 'style': this.setStyles(value); break;
- case 'name': if (window.ie6){
+ case 'name': if (Moo.window.ie6){
var el = $(document.createElement('<'+this.getTag()+' name="'+value+'" />'));
$each(this.attributes, function(attribute){
if (attribute.name != 'name') el.setProperty(attribute.name, attribute.value);
@@ -1905,9 +1908,9 @@
});
-window.addEvent = document.addEvent = Moo.Element.prototype.addEvent;
-window.removeEvent = document.removeEvent = Moo.Element.prototype.removeEvent;
-window.removeEvents = document.removeEvents = Moo.Element.prototype.removeEvents;
+Moo.window.addEvent = document.addEvent = Moo.Element.prototype.addEvent;
+Moo.window.removeEvent = document.removeEvent = Moo.Element.prototype.removeEvent;
+Moo.window.removeEvents = document.removeEvents = Moo.Element.prototype.removeEvents;
Moo.Garbage = {
@@ -1918,7 +1921,7 @@
},
trash: function(){
- Moo.Garbage.collect(window);
+ Moo.Garbage.collect(Moo.window);
Moo.Garbage.collect(document);
Moo.Garbage.elements.each(function(el){
el.removeEvents();
@@ -1929,7 +1932,7 @@
};
-window.addEvent('unload', Moo.Garbage.trash);
+Moo.window.addEvent('unload', Moo.Garbage.trash);
/*
Script: Event.js
@@ -1979,7 +1982,7 @@
Moo.Event = new Moo.Class({
initialize: function(event){
- this.event = event || window.event;
+ this.event = event || Moo.window.event;
this.type = this.event.type;
this.target = this.event.target || this.event.srcElement;
if (this.target.nodeType == 3) this.target = this.target.parentNode; // Safari
@@ -1988,7 +1991,7 @@
this.alt = this.event.altKey;
this.meta = this.event.metaKey;
if (['DOMMouseScroll', 'mousewheel'].test(this.type)){
- this.wheel = this.event.wheelDelta ? (this.event.wheelDelta / (window.opera ? -120 : 120)) : -(this.event.detail || 0) / 3;
+ this.wheel = this.event.wheelDelta ? (this.event.wheelDelta / (Moo.window.opera ? -120 : 120)) : -(this.event.detail || 0) / 3;
} else if (this.type.test(/key/)){
this.code = this.event.which || this.event.keyCode;
for (var name in Event.keys){
@@ -2005,8 +2008,8 @@
'y': this.event.pageY || this.event.clientY + document.documentElement.scrollTop
};
this.client = {
- 'x': this.event.pageX ? this.event.pageX - window.pageXOffset : this.event.clientX,
- 'y': this.event.pageY ? this.event.pageY - window.pageYOffset : this.event.clientY
+ 'x': this.event.pageX ? this.event.pageX - Moo.window.pageXOffset : this.event.clientX,
+ 'y': this.event.pageY ? this.event.pageY - Moo.window.pageYOffset : this.event.clientY
};
this.rightClick = (this.event.which == 3) || (this.event.button == 2);
switch (this.type){
@@ -2903,7 +2906,7 @@
Cross browser methods to get the window size, onDomReady method.
*/
-window.extend({
+Moo.window.extend({
/*
Property: window.addEvent
@@ -2986,7 +2989,7 @@
Warning: All these methods require that the browser operates in strict mode, not quirks mode.
*/
-window.extend({
+Moo.window.extend({
/*
Property: getWidth
@@ -4408,7 +4411,7 @@
},
initialize: function(options){
- this.transport = window.XMLHttpRequest ? new XMLHttpRequest() : (window.ie ? new ActiveXObject('Microsoft.XMLHTTP') : false);
+ this.transport = Moo.window.XMLHttpRequest ? new XMLHttpRequest() : (Moo.window.ie ? new ActiveXObject('Microsoft.XMLHTTP') : false);
this.setOptions(this.getOptions(), options);
if (!this.transport) return;
this.headers = {};
@@ -5174,7 +5177,7 @@
initialize: function(element, options){
this.setOptions(this.getOptions(), options);
this.element = $(element);
- this.mousemover = ([window, document].test(element)) ? $(document.body) : this.element;
+ this.mousemover = ([Moo.window, document].test(element)) ? $(document.body) : this.element;
},
/*
@@ -5198,7 +5201,7 @@
},
getCoords: function(event){
- this.page = (this.element == window) ? event.client : event.page;
+ this.page = (this.element == Moo.window) ? event.client : event.page;
if (!this.timer) this.timer = this.scroll.periodical(50, this);
},
@@ -5408,19 +5411,19 @@
initialize: function(options){
this.addEvent('onCancel', this.clearChain);
- var location = window.location.href.match(/^[^#]*/)[0] + '#';
+ var location = Moo.window.location.href.match(/^[^#]*/)[0] + '#';
$each(document.links, function(lnk){
if (lnk.href.indexOf(location) != 0) return;
var anchor = lnk.href.substr(location.length);
if (anchor && $(anchor)) this.useLink(lnk, anchor);
}, this);
- this.parent(window, options);
+ this.parent(Moo.window, options);
},
useLink: function(lnk, anchor){
lnk.addEvent('click', function(event){
- if(!window.khtml) this.chain(function(){
- window.location.href = '#'+anchor;
+ if(!Moo.window.khtml) this.chain(function(){
+ Moo.window.location.href = '#'+anchor;
});
this.toElement(anchor);
event.stop();
@@ -5690,8 +5693,8 @@
},
locate: function(event){
- var win = {'x': window.getWidth(), 'y': window.getHeight()};
- var scroll = {'x': window.getScrollLeft(), 'y': window.getScrollTop()};
+ var win = {'x': Moo.window.getWidth(), 'y': Moo.window.getHeight()};
+ var scroll = {'x': Moo.window.getScrollLeft(), 'y': Moo.window.getScrollTop()};
var tip = {'x': this.toolTip.offsetWidth, 'y': this.toolTip.offsetHeight};
var prop = {'x': 'left', 'y': 'top'};
for (var z in prop){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|