voy a completar mas el codigo:
Código Javascript
:
Ver original/* DHTML Objects */
dhtElement = new Class({
initialize:function(data){
for (prop in data) {
this[prop] = data[prop]
if (typeof(data[prop].element) != 'undefined' || data[prop].element != null) {
alert(this.element)
this.element.appendChild(data[prop].element) // Line 82
}
}
},
element:null,
x:function(){},
y:function(){},
width:function(){},
height:function(){},
draw:function(){
return this.element
}
})
dhtComponent = new Class({
element:$C("div")
},dhtElement)
/* Layer Types */
dhtLayer = new Class({},dhtElement)
lyrDIV = new Class({
element:$C('div')
},dhtLayer)
/* DHTML Default Componentes */
dhtLoader = new Class({
initialize:function(image,text,width,height,bgColor,color,progressBar,porcentage) {
usedHeight = 0
if (typeof(image) != 'undefined' && image != "") {
image = typeof(image) == 'string' ? new lyrImage(image) : image
image.x((image.width() + width) / 2 - image.width())
usedHeight = image.height()
this.ldrImage = image
} else {
image = null
}
if (porcentage) {
porcentage = new lyrDinamicText("[1]%")
porcentage.x(width-porcentage.width())
this.ldrPorcentage = porcentage
} else {
porcentage = null
}
if (progressBar) {
progressBar = new dhtComponent({
box:new lyrDIV({
bar:new lyrDIV()
})
})
xs = porcentage ? porcentage.width() : 0
with (progressBar.box) {
width(width-xs)
height(height)
y(usedHeight)
bar.width(width-xs-2)
bar.height(height-2)
bar.x(1)
bar.y(1)
}
usedHeight+=height
this.ldrProgress = progressBar
}
if (typeof(text) == 'string' && text != "") {
text = new lyrStyledText(text,styLoaderText)
text.x((width + text.width()) / 2 - text.width())
text.y(usedHeight)
this.ldrText = text
}
}
},dhtComponent)