amic 7 mesiacov pred
rodič
commit
f84051a1d1

+ 4 - 4
modules/manager/views/analytics/dashboard.php

@@ -1047,8 +1047,8 @@ $(function(){
 			var datasetn = [];
 			data.data.forEach( el => {
 				var ref = el.dimensions[0].name;
-				var crefc = el.metrics[0][el.metrics[0].length-1];
-				var crefp = el.metrics[0][el.metrics[0].length-2];
+				var crefc = Math.round(el.metrics[0][el.metrics[0].length-1]);
+				var crefp = Math.round(el.metrics[0][el.metrics[0].length-2]);
 				var perc = Math.round(crefp*100/crefc,1);
 				var delta = crefc-crefp;
 				gper = Math.round(crefc*100/total,1);
@@ -1073,7 +1073,7 @@ $(function(){
 				tr.appendChild(td);
 
 				td = document.createElement("td");
-				newContent = document.createTextNode(el.metrics[0][el.metrics[0].length-1]);
+				newContent = document.createTextNode(Math.round(el.metrics[0][el.metrics[0].length-1]));
 				td.appendChild(newContent);
 				tr.appendChild(td);
 
@@ -1082,7 +1082,7 @@ $(function(){
 				sty = (delta>=0)?'fa-arrow-up':'fa-arrow-down';
 				sty1 = (delta>=0)?'success':'danger';
 				$(td).html('<small class="text-'+sty1+' mr-1"><i class="fas '+sty+'"></i>'+perc+'%</small>');
-				newContent = document.createTextNode(delta);
+				newContent = document.createTextNode(Math.round(delta));
 				td.appendChild(newContent);
 				tr.appendChild(td);
 

+ 4 - 1
views/news/view/inject-gallery-x.php

@@ -43,7 +43,10 @@ use yii\helpers\Html;
 <script type="text/javascript">
 		window.addEventListener("DOMContentLoaded",function () {
 		$('#gallery-<?=$gallery->id?>').fotorama({ width:'100%',maxwidth:1200,maxheight:<?=$maxheight?>,minheight:250, fit: 'contain', thumbheight:70,thumbwidth:94, captions: true,nav:'thumbs', caption: 'overlay', allowfullscreen:'native',transition:'slide', data: [ <?=$ltext?> ] });
-		$('#gallery-<?=$gallery->id?>').on('fotorama:show', function (e, fotorama, extra) {	 console.log('cnt+')} );
+		$('#gallery-<?=$gallery->id?>').on('fotorama:show', function (e, fotorama, extra) {
+				console.log('cnt+');
+				new Image().src = "https://counter.yadro.ru/hit;amicru?r"+escape(document.referrer)+((typeof(screen)=="undefined")?"":";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+";h"+escape(document.title.substring(0,150))+";"+Math.random();
+			} );
 		});
 </script>
 <?