Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.tpl « templates « Live « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 617dc916604d6a82bb5345da099b12614a6c5359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
{literal}
<script type="text/javascript" src="plugins/Live/templates/scripts/spy.js"></script>

<script type="text/javascript" charset="utf-8">

	$(document).ready(function() {
		if($('#_spyTmp').size() == 0) {
			$('#visitsLive > div:gt(2)').fadeEachDown(); // initial fade
			$('#visitsLive').spy({
				limit: 10,
				ajax: 'index.php?module=Live&idSite={/literal}{$idSite}{literal}&action=getLastVisitsStart',
				fadeLast: 2,
				isDupe: check_for_dupe,
				timeout: 8000,
				customParameterName: 'minIdVisit',
				customParameterValueCallback: lastIdVisit,
				fadeInSpeed: 600
			});
		}
	});

	// first I'm ensuring that 'last' has been initialised (with last.constructor == Object),
	// then prev.html() == last.html() will return true if the HTML is the same, or false,
	// if I have a different entry.
	function check_for_dupe(prev, last)
	{
		if (last.constructor == Object)	{
			return (prev.html() == last.html());
		}
		else {
			return 0;
		}
	}

	function lastIdVisit()
	{
		updateTotalVisits();
		updateVisitBox();
		return $('#visitsLive > div:lt(2) .idvisit').html();
	}

	var pauseImage = "plugins/Live/templates/images/pause.gif";
	var pauseDisabledImage = "plugins/Live/templates/images/pause_disabled.gif";
	var playImage = "plugins/Live/templates/images/play.gif";
	var playDisabledImage = "plugins/Live/templates/images/play_disabled.gif";

	function onClickPause()
	{
		$('#pauseImage').attr('src', pauseImage);
		$('#playImage').attr('src', playDisabledImage);
		return pauseSpy();
	}
	function onClickPlay()
	{
		$('#playImage').attr('src', playImage);
		$('#pauseImage').attr('src', pauseDisabledImage);
		return playSpy();
	}

	// updates the numbers of total visits in startbox
	function updateTotalVisits()
	{
		$("#visitsTotal").load("index.php?module=Live&idSite={/literal}{$idSite}{literal}&action=ajaxTotalVisitors");
	}

	// updates the visit table, to refresh the already presented visotors pages
	function updateVisitBox()
	{
		$("#visitsLive").load("index.php?module=Live&idSite={/literal}{$idSite}{literal}&action=getLastVisitsStart");
	}

	/* TOOLTIP */
		$('#visitsLive label').tooltip({
		    track: true,
		    delay: 0,
		    showURL: false,
		    showBody: " - ",
		    fade: 250
		});

</script>

<style>
#visitsLive {
	text-align:left;
	font-size:90%;
}
#visitsLive .datetime, #visitsLive .country, #visitsLive .referer, #visitsLive .settings, #visitsLive .returning , #visitsLive .countActions{
	border-bottom:1px solid #C1DAD7;
	border-right:1px solid #C1DAD7;
	padding:5px 5px 5px 12px;
}

#visitsLive .datetime {
	background:#D4E3ED url(plugins/CoreHome/templates/images/bg_header.jpg) repeat-x scroll 0 0;
	border-top:1px solid #C1DAD7;
	color:#6D929B;
	margin:0;
	text-align:left;
}

#visitsLive .country {
	color:#4F6B72;
	background:#FFFFFF url(plugins/CoreHome/templates/images/bullet1.gif) no-repeat scroll 0 0;
}

#visitsLive .referer {
	background:#F9FAFA none repeat scroll 0 0;
	color:#797268;
}

#visitsLive .pagesTitle {
	display:block;
	float:left;
	padding-top: 3px;
}

#visitsLive .countActions {
	background:#FFFFFF none repeat scroll 0 0;
	color:#4F6B72;
}

#visitsLive .settings {
	background:#FFFFFF none repeat scroll 0 0;
	color:#4F6B72;
}

#visitsLive .returning {
	background:#F9FAFA none repeat scroll 0 0;
	color:#797268;
}

#visitsLive .visit {
}

#visitsLive .alt {
}

#visitsLive .actions {
	background:#F9FAFA none repeat scroll 0 0;
	color:#797268;
	padding:0px 5px 0px 12px;
}

</style>
{/literal}

<div id="visitsTotal">
	<table class="dataTable" cellspacing="0">
	<thead>
	<tr>
	<th id="label" class="sortable label" style="cursor: auto;">
	<div id="thDIV">Period<div></th>
	<th id="label" class="sortable label" style="cursor: auto;">
	<div id="thDIV">Visits<div></th>
	<th id="label" class="sortable label" style="cursor: auto;">
	<div id="thDIV">PageViews<div></th>
	</tr>
	</thead>
	<tbody>
	<tr>
	<tr class="">
	<td class="columnodd">Today</td>
	<td class="columnodd">{$visitorsCountToday}</td>
	<td class="columnodd">{$pisToday}</td>
	</tr>
	<tr class="">
	<td class="columnodd">Last 30 minutes</td>
	<td class="columnodd">{$visitorsCountHalfHour}</td>
	<td class="columnodd">{$pisHalfhour}</td>
	</tr>
	</tbody>
	</table>
</div>

<div id='visitsLive'>
{$visitors}
</div>

<div>
	<a href="javascript:void(0);" onclick="onClickPause();"><img id="pauseImage" border="0" src="plugins/Live/templates/images/pause_disabled.gif" /></a>
	<a href="javascript:void(0);" onclick="onClickPlay();"><img id="playImage" border="0" src="plugins/Live/templates/images/play.gif" /></a>
</div>