summaryrefslogtreecommitdiffstats
path: root/user_guide/nav
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-21 21:44:22 +0200
committeradmin <devnull@localhost>2006-10-21 21:44:22 +0200
commite334c472fb4be44feec3a73402fc4a2b062cbfc0 (patch)
tree553f17d67e7ef652016ec85b2a576bb2210f0ff8 /user_guide/nav
parentbd6bee75dd26ade1c8d9cfd104bb913065797c59 (diff)
Diffstat (limited to 'user_guide/nav')
-rwxr-xr-xuser_guide/nav/moo.fx.pack.js6
-rwxr-xr-xuser_guide/nav/prototype.lite.js112
2 files changed, 59 insertions, 59 deletions
diff --git a/user_guide/nav/moo.fx.pack.js b/user_guide/nav/moo.fx.pack.js
index 8b4228329..b5c360c30 100755
--- a/user_guide/nav/moo.fx.pack.js
+++ b/user_guide/nav/moo.fx.pack.js
@@ -24,7 +24,7 @@ fx.Text.prototype = Object.extend(new fx.Base(), {
fx.Resize = Class.create();
fx.Resize.prototype = {
initialize: function(el, options) {
- this.h = new fx.Height(el, options);
+ this.h = new fx.Height(el, options);
if (options) options.onComplete = null;
this.w = new fx.Width(el, options);
this.el = $(el);
@@ -93,8 +93,8 @@ Multi.prototype = {
getElementsFromArray: function(array) {
var elements = new Array();
- for (i=0;i<array.length;i++) {
- elements.push($(array[i]));
+ for (i=0;i<array.length;i++) {
+ elements.push($(array[i]));
}
return elements;
}
diff --git a/user_guide/nav/prototype.lite.js b/user_guide/nav/prototype.lite.js
index f1520e2c6..e6c362279 100755
--- a/user_guide/nav/prototype.lite.js
+++ b/user_guide/nav/prototype.lite.js
@@ -12,15 +12,15 @@
var Class = {
create: function() {
- return function() {
- this.initialize.apply(this, arguments);
- }
+ return function() {
+ this.initialize.apply(this, arguments);
+ }
}
}
Object.extend = function(destination, source) {
for (property in source) {
- destination[property] = source[property];
+ destination[property] = source[property];
}
return destination;
}
@@ -28,7 +28,7 @@ Object.extend = function(destination, source) {
Function.prototype.bind = function(object) {
var __method = this;
return function() {
- return __method.apply(object, arguments);
+ return __method.apply(object, arguments);
}
}
@@ -36,14 +36,14 @@ function $() {
var elements = new Array();
for (var i = 0; i < arguments.length; i++) {
- var element = arguments[i];
- if (typeof element == 'string')
- element = document.getElementById(element);
+ var element = arguments[i];
+ if (typeof element == 'string')
+ element = document.getElementById(element);
- if (arguments.length == 1)
- return element;
+ if (arguments.length == 1)
+ return element;
- elements.push(element);
+ elements.push(element);
}
return elements;
@@ -54,18 +54,18 @@ function $() {
document.getElementsByClassName = function(className) {
var children = document.getElementsByTagName('*') || document.all;
var elements = new Array();
-
+
for (var i = 0; i < children.length; i++) {
- var child = children[i];
- var classNames = child.className.split(' ');
- for (var j = 0; j < classNames.length; j++) {
- if (classNames[j] == className) {
- elements.push(child);
- break;
- }
- }
+ var child = children[i];
+ var classNames = child.className.split(' ');
+ for (var j = 0; j < classNames.length; j++) {
+ if (classNames[j] == className) {
+ elements.push(child);
+ break;
+ }
+ }
}
-
+
return elements;
}
@@ -77,51 +77,51 @@ if (!window.Element) {
Object.extend(Element, {
remove: function(element) {
- element = $(element);
- element.parentNode.removeChild(element);
+ element = $(element);
+ element.parentNode.removeChild(element);
},
hasClassName: function(element, className) {
- element = $(element);
- if (!element)
- return;
- var a = element.className.split(' ');
- for (var i = 0; i < a.length; i++) {
- if (a[i] == className)
- return true;
- }
- return false;
+ element = $(element);
+ if (!element)
+ return;
+ var a = element.className.split(' ');
+ for (var i = 0; i < a.length; i++) {
+ if (a[i] == className)
+ return true;
+ }
+ return false;
},
addClassName: function(element, className) {
- element = $(element);
- Element.removeClassName(element, className);
- element.className += ' ' + className;
+ element = $(element);
+ Element.removeClassName(element, className);
+ element.className += ' ' + className;
},
-
+
removeClassName: function(element, className) {
- element = $(element);
- if (!element)
- return;
- var newClassName = '';
- var a = element.className.split(' ');
- for (var i = 0; i < a.length; i++) {
- if (a[i] != className) {
- if (i > 0)
- newClassName += ' ';
- newClassName += a[i];
- }
- }
- element.className = newClassName;
+ element = $(element);
+ if (!element)
+ return;
+ var newClassName = '';
+ var a = element.className.split(' ');
+ for (var i = 0; i < a.length; i++) {
+ if (a[i] != className) {
+ if (i > 0)
+ newClassName += ' ';
+ newClassName += a[i];
+ }
+ }
+ element.className = newClassName;
},
-
+
// removes whitespace-only text node children
cleanWhitespace: function(element) {
- element = $(element);
- for (var i = 0; i < element.childNodes.length; i++) {
- var node = element.childNodes[i];
- if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
- Element.remove(node);
- }
+ element = $(element);
+ for (var i = 0; i < element.childNodes.length; i++) {
+ var node = element.childNodes[i];
+ if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+ Element.remove(node);
+ }
}
}); \ No newline at end of file