source: tapas/web/resources/js/Loading.js @ 376

Last change on this file since 376 was 376, checked in by rboipsl, 12 years ago

Creation projet tapas

File size: 896 bytes
Line 
1//******************************************************************************
2// Loading interface
3// parameters :
4// parent : specify the parent of loading component
5// id : component id ( for css style )
6//******************************************************************************
7
8var Loading = Class.create({
9
10    initialize:function( parameters )
11    {
12        //Init parameters
13        this.parent = parameters.parent;
14        this.id = parameters.id;
15
16        //Create loading component
17        this.loadingDiv = document.createElement("div");
18        this.loadingDiv.id = this.id;
19        this.loadingDiv.className = "loading-classic";
20        this.parent.appendChild(this.loadingDiv);
21        this.hide();
22    } ,
23
24    display:function()
25    {
26        this.loadingDiv.style.display = "";
27    },
28
29    hide:function()
30    {
31        this.loadingDiv.style.display = "none";
32    }
33}) ;
Note: See TracBrowser for help on using the repository browser.