forked from verdnatura/hedera-web
28 lines
459 B
JavaScript
28 lines
459 B
JavaScript
|
Htk.Spinner = new Class
|
||
|
({
|
||
|
Extends: Htk.Widget
|
||
|
,Tag: 'htk-spinner'
|
||
|
|
||
|
,initialize: function (props)
|
||
|
{
|
||
|
var loader = this.createElement ('div');
|
||
|
loader.className = 'htk-spinner';
|
||
|
|
||
|
var spin = document.createElement ('div');
|
||
|
loader.appendChild (spin);
|
||
|
|
||
|
this.spin = spin;
|
||
|
this.parent (props);
|
||
|
}
|
||
|
|
||
|
,start: function ()
|
||
|
{
|
||
|
Vn.Node.addClass (this.spin, 'spinner');
|
||
|
}
|
||
|
|
||
|
,stop: function ()
|
||
|
{
|
||
|
Vn.Node.removeClass (this.spin, 'spinner');
|
||
|
}
|
||
|
});
|