Показ большой фотки при клике на карточке
This commit is contained in:
parent
19b6917c06
commit
e7d673b9a9
|
|
@ -46,7 +46,7 @@ class JsonController extends Controller
|
||||||
if ($point->img == '' && !empty($imgs))
|
if ($point->img == '' && !empty($imgs))
|
||||||
{
|
{
|
||||||
$img = array_shift($imgs);
|
$img = array_shift($imgs);
|
||||||
$point->img = '/photos/small/' . $img->name;
|
$point->img = $img->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$imgs = $point->photos;
|
$imgs = $point->photos;
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ function showInfo(id)
|
||||||
pointsSources[id] = data;
|
pointsSources[id] = data;
|
||||||
description = '<div class="infoCard">' +
|
description = '<div class="infoCard">' +
|
||||||
'<h3>' + data.name + '</h3>' +
|
'<h3>' + data.name + '</h3>' +
|
||||||
'<img src="' + data.img + '" onclick="showImage(\''+ data.img +'\',\''+ data.name +'\')" />' +
|
'<img src="/photos/small/' + data.img + '" onclick="showImage(\'/photos/middle/'+ data.img +'\',\''+ data.name +'\')" />' +
|
||||||
'<button type="button" class="btn btn-default btn-xs" onclick="addToRoute(' + id + ')">' +
|
'<button type="button" class="btn btn-default btn-xs" onclick="addToRoute(' + id + ')">' +
|
||||||
'<span class="glyphicon glyphicon-plus"></span> Добавить в маршрут' +
|
'<span class="glyphicon glyphicon-plus"></span> Добавить в маршрут' +
|
||||||
'</button><br/>';
|
'</button><br/>';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue