summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/scriptaculous/builder.js
diff options
context:
space:
mode:
authorwei <>2007-03-27 02:23:20 +0000
committerwei <>2007-03-27 02:23:20 +0000
commit1b9b64637fe08848f610bbd19b80c031cb7dba63 (patch)
tree52f7486e911f60c9a91904c91e3944f4f4f27bca /framework/Web/Javascripts/scriptaculous/builder.js
parentc5d0cd2824e3c3bb2f6f3834177a71c1d7b78519 (diff)
set prado trunk to use prototype.js v1.5.1rc2, script.aculo.us to v1.7.1beta
Diffstat (limited to 'framework/Web/Javascripts/scriptaculous/builder.js')
-rw-r--r--framework/Web/Javascripts/scriptaculous/builder.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/framework/Web/Javascripts/scriptaculous/builder.js b/framework/Web/Javascripts/scriptaculous/builder.js
index 199afc12..c110e0c7 100644
--- a/framework/Web/Javascripts/scriptaculous/builder.js
+++ b/framework/Web/Javascripts/scriptaculous/builder.js
@@ -1,6 +1,6 @@
-// script.aculo.us builder.js v1.7.0, Fri Jan 19 19:16:36 CET 2007
+// script.aculo.us builder.js v1.7.1_beta1, Mon Mar 12 14:40:50 +0100 2007
-// Copyright (c) 2005, 2006 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
@@ -48,7 +48,8 @@ var Builder = {
// attributes (or text)
if(arguments[1])
if(this._isStringOrNumber(arguments[1]) ||
- (arguments[1] instanceof Array)) {
+ (arguments[1] instanceof Array) ||
+ arguments[1].tagName) {
this._children(element, arguments[1]);
} else {
var attrs = this._attributes(arguments[1]);
@@ -66,7 +67,7 @@ var Builder = {
}
if(element.tagName.toUpperCase() != elementName)
element = parentElement.getElementsByTagName(elementName)[0];
- }
+ }
}
// text, or array of children
@@ -92,6 +93,10 @@ var Builder = {
return attrs.join(" ");
},
_children: function(element, children) {
+ if(children.tagName) {
+ element.appendChild(children);
+ return;
+ }
if(typeof children=='object') { // array can hold nodes and text
children.flatten().each( function(e) {
if(typeof e=='object')
@@ -101,8 +106,8 @@ var Builder = {
element.appendChild(Builder._text(e));
});
} else
- if(Builder._isStringOrNumber(children))
- element.appendChild(Builder._text(children));
+ if(Builder._isStringOrNumber(children))
+ element.appendChild(Builder._text(children));
},
_isStringOrNumber: function(param) {
return(typeof param=='string' || typeof param=='number');