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

DisplayJavascriptCode.tpl « templates « SitesManager « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 51bf27e2fdec8d9543b4ff2e346ceb9d0951609b (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

{literal}
<style type="text/css">
.trackingHelp ul { 
	padding-left:40px;
	list-style-type:square;
}
.trackingHelp ul li {
	margin-bottom:10px;
}
.trackingHelp h2 {
	margin-top:20px;
}
p {
	text-align:justify;
}
</style>
{/literal}

<h2>{'SitesManager_TrackingTags'|translate:$displaySiteName}</h2>

<div class='trackingHelp'>
{'Installation_JSTracking_Intro'|translate}
<br/><br/>
{'CoreAdminHome_JSTrackingIntro3'|translate:'<a href="http://piwik.org/integrate/" target="_blank">':'</a>'}

<h3>{'SitesManager_JsTrackingTag'|translate}</h3>
<p>{'CoreAdminHome_JSTracking_CodeNote'|translate:"&lt;/body&gt;"}</p>

<pre class="code-pre"><code>{$jsTag}</code></pre>

<br />
{'CoreAdminHome_JSTrackingIntro5'|translate:'<a target="_blank" href="http://piwik.org/docs/javascript-tracking/">':'</a>'}
<br/><br/>
{'Installation_JSTracking_EndNote'|translate:'<em>':'</em>'}

</div>
{literal}
<script type="text/javascript">
$(document).ready(function () {
	// when code element is clicked, select the text
	$('code').click(function () {
		// credit where credit is due:
		//   http://stackoverflow.com/questions/1173194/select-all-div-text-with-single-mouse-click
		var range;
		if (document.body.createTextRange) // MSIE
		{
			range = document.body.createTextRange();
			range.moveToElementText(this);
			range.select();
		}
		else if (window.getSelection) // others
		{
			range = document.createRange();
			range.selectNodeContents(this);
			
			var selection = window.getSelection();
			selection.removeAllRanges();
			selection.addRange(range);
		}
	});
	
	$('code').click();
});
</script>
{/literal}