Попытался исправить ошибку из-за которой иногда в карточке текст наслаивается сам на себя. Думаю дело в картинке, для которой был не задан размер

This commit is contained in:
Krivchikov Dmitry 2016-01-12 00:41:00 +03:00
parent ed465a9dc6
commit 9a8e897ae9
3 changed files with 6 additions and 4 deletions

View File

@ -13,7 +13,7 @@ class IndexController extends Controller
self::addScript('/js/bootstrap.min.js'); self::addScript('/js/bootstrap.min.js');
self::addScript('/js/leaflet-0.7.3.js'); self::addScript('/js/leaflet-0.7.3.js');
self::addScript('http://maps.google.com/maps/api/js?v=3&sensor=false'); self::addScript('http://maps.google.com/maps/api/js?v=3');
self::addScript('/js/tile/Google.js'); self::addScript('/js/tile/Google.js');
self::addScript('/js/api-maps-yandex-2.0.js'); self::addScript('/js/api-maps-yandex-2.0.js');

View File

@ -16,7 +16,8 @@ body.openBox div#map {right: 250px;}
div.clear {clear: both;} div.clear {clear: both;}
div.infoCard {text-align: justify;} div.infoCard {text-align: justify;}
div.infoCard h3 {text-align: center; margin-top: 0;} div.infoCard h3 {text-align: center; margin-top: 0;}
div.infoCard img {width: 200px; float: left; margin: 0 10px 5px 0; cursor: pointer;} div.infoCard div.photoContainer {position: relative; width: 200px;height: 150px;float: left;margin-right: 10px;margin-bottom: 10px; background-image: url(/img/noPhoto200150.png); }
div.infoCard img {width: 200px; margin: 0; cursor: pointer;}
div.infoCard .photosCount {position: absolute;margin: 3px;color: white;background-color: black;border-radius: 3px;padding: 2px 4px;opacity: 0.5;} div.infoCard .photosCount {position: absolute;margin: 3px;color: white;background-color: black;border-radius: 3px;padding: 2px 4px;opacity: 0.5;}
div.header {display: block; position: absolute; top: 0px; left: 40px; z-index: 1000; background-color: rgba(255,255,255,0.7); padding: 5px 10px; border-radius: 0 0 5px 5px;} div.header {display: block; position: absolute; top: 0px; left: 40px; z-index: 1000; background-color: rgba(255,255,255,0.7); padding: 5px 10px; border-radius: 0 0 5px 5px;}
div.header img {height: 89px;} div.header img {height: 89px;}

View File

@ -269,10 +269,11 @@ function drawInfoPopup(id, showPopup, doNotPushToHistory) {
data = pointsSources[id]; data = pointsSources[id];
if (typeof (data.images) == 'object') if (typeof (data.images) == 'object')
{ {
photos = '<div style="position: relative;">'; photos = '<div class="photoContainer">';
if (data.images.length > 1) if (data.images.length > 1) {
photos += '<div class="photosCount"><span class="glyphicon glyphicon-camera"></span> <b>+' + (data.photosCount - 1) + '</b></div>'; photos += '<div class="photosCount"><span class="glyphicon glyphicon-camera"></span> <b>+' + (data.photosCount - 1) + '</b></div>';
}
photos += '<img src="/photos/small/' + data.img + '" onclick="showImage(\'' + id + '\')" />'; photos += '<img src="/photos/small/' + data.img + '" onclick="showImage(\'' + id + '\')" />';
photos += '</div>'; photos += '</div>';