hedera-web/web/forms/admin/visits/visits.js

45 lines
716 B
JavaScript
Executable File

Vn.Visits = new Class
({
Extends: Vn.Module
,activate: function ()
{
this.$('date-to').value = new Date ();
this.$('num-sessions').func = this.sessionsFunc;
this.onSessionsClick ();
}
,showStep: function (stepId)
{
if (this.currentStep)
this.currentStep.style.display = 'none';
this.currentStep = this.$(stepId);
this.currentStep.style.display = 'inline';
}
,onRefreshClick: function ()
{
this.model.refresh ();
}
,onSessionsClick: function ()
{
this.showStep ('sessions-step');
this.model = this.$('sessions');
}
,onVisitsClick: function ()
{
this.showStep ('visits-step');
this.model = this.$('visits');
}
,sessionsFunc: function ()
{
return 1;
}
});