2015-01-23 13:09:30 +00:00
|
|
|
|
|
|
|
Vn.Visits = new Class
|
|
|
|
({
|
|
|
|
Extends: Vn.Module
|
|
|
|
|
|
|
|
,activate: function ()
|
|
|
|
{
|
2015-03-06 23:33:54 +00:00
|
|
|
this.$('date-to').value = new Date ();
|
|
|
|
this.$('num-sessions').func = this.sessionsFunc;
|
2015-03-27 19:10:49 +00:00
|
|
|
this.onSessionsClick ();
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
,showStep: function (stepId)
|
|
|
|
{
|
|
|
|
if (this.currentStep)
|
|
|
|
this.currentStep.style.display = 'none';
|
|
|
|
|
2015-03-06 23:33:54 +00:00
|
|
|
this.currentStep = this.$(stepId);
|
2015-01-23 13:09:30 +00:00
|
|
|
this.currentStep.style.display = 'inline';
|
|
|
|
}
|
|
|
|
|
2015-03-27 19:10:49 +00:00
|
|
|
,onRefreshClick: function ()
|
|
|
|
{
|
|
|
|
this.model.refresh ();
|
|
|
|
}
|
|
|
|
|
|
|
|
,onSessionsClick: function ()
|
2015-01-23 13:09:30 +00:00
|
|
|
{
|
|
|
|
this.showStep ('sessions-step');
|
2015-03-06 23:33:54 +00:00
|
|
|
this.model = this.$('sessions');
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
|
2015-03-27 19:10:49 +00:00
|
|
|
,onVisitsClick: function ()
|
2015-01-23 13:09:30 +00:00
|
|
|
{
|
|
|
|
this.showStep ('visits-step');
|
2015-03-06 23:33:54 +00:00
|
|
|
this.model = this.$('visits');
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
,sessionsFunc: function ()
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|