Показ большой фотки при клике на карточке

This commit is contained in:
Krivchikov Dmitry 2014-08-05 00:17:47 +04:00
parent 19b6917c06
commit e7d673b9a9
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ class JsonController extends Controller
if ($point->img == '' && !empty($imgs))
{
$img = array_shift($imgs);
$point->img = '/photos/small/' . $img->name;
$point->img = $img->name;
}
$imgs = $point->photos;

View File

@ -177,7 +177,7 @@ function showInfo(id)
pointsSources[id] = data;
description = '<div class="infoCard">' +
'<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 + ')">' +
'<span class="glyphicon glyphicon-plus"></span> Добавить в маршрут' +
'</button><br/>';