0
1
Fork 0
hedera-web-mindshore/package/usr/share/hedera-web/js/htk/widget.js

56 lines
847 B
JavaScript
Raw Normal View History

Htk.Widget = new Class
({
Extends: Vn.Object
2015-03-06 23:33:54 +00:00
,Properties:
{
class:
{
type: String
,set: function (x)
{
this.node.className = x +' '+ this.node.className;
}
,get: function ()
{
return this.node.className;
}
}
}
/** Main HTML node that represents the widget **/
,node: null
2015-03-06 23:33:54 +00:00
,builder: null
,builderInit: function (path)
{
this.builder = new Vn.Builder ();
this.builder.signalData = this;
2015-03-06 23:33:54 +00:00
this.builder.loadXml (Vn.getXml (path));
this.node = this.builder.get ('main');
}
,createElement: function (tagName)
{
this.node = document.createElement (tagName);
return this.node;
}
,getNode: function ()
{
return this.node;
}
2015-03-09 08:36:54 +00:00
2015-03-06 23:33:54 +00:00
,$: function (id)
{
if (this.builder)
return this.builder.get (id);
return null;
}
2015-03-15 12:44:57 +00:00
,remove: function ()
{
Vn.Node.remove (this.node);
}
});