0
1
Fork 0
hedera-web-mindshore/web/forms/admin/visits/visits.js

45 lines
714 B
JavaScript
Raw Normal View History

Vn.Visits = new Class
({
Extends: Vn.Form
,activate: function ()
{
2015-03-06 23:33:54 +00:00
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';
2015-03-06 23:33:54 +00:00
this.currentStep = this.$(stepId);
this.currentStep.style.display = 'inline';
}
,onRefreshClick: function ()
{
this.model.refresh ();
}
,onSessionsClick: function ()
{
this.showStep ('sessions-step');
2015-03-06 23:33:54 +00:00
this.model = this.$('sessions');
}
,onVisitsClick: function ()
{
this.showStep ('visits-step');
2015-03-06 23:33:54 +00:00
this.model = this.$('visits');
}
,sessionsFunc: function ()
{
return 1;
}
});