Подробнее - новая кнопка. И убран мусор.

This commit is contained in:
Krivchikov Dmitry 2014-10-06 21:38:26 +04:00
parent 22a1b414b8
commit a15c92d99e
7 changed files with 18 additions and 76 deletions

View File

@ -26,6 +26,12 @@ div.add {cursor: pointer;}
#addPointModal .extraImage .input-group-addon.type.button {border-left: 0px;} #addPointModal .extraImage .input-group-addon.type.button {border-left: 0px;}
div.leaflet-popup-content div.control {margin-top: 7px;} div.leaflet-popup-content div.control {margin-top: 7px;}
div.leaflet-popup-content div.control a {min-width: 150px; color: #333; font-size: 14px; font-weight: normal;}
div.leaflet-popup-content div.control a span.label {display: inline; font-size: 12px; font-weight: normal; color: #333;}
div.leaflet-popup-content div.control:hover a {min-width: 40px;}
div.leaflet-popup-content div.control:hover a span.label {display: none;}
div.leaflet-popup-content div.control:hover a:hover {min-width: 150px;}
div.leaflet-popup-content div.control:hover a:hover span.label {display: inline;}
div.leaflet-popup-content button span.label {display: none; font-size: 90%; font-weight: normal; color: #333;} div.leaflet-popup-content button span.label {display: none; font-size: 90%; font-weight: normal; color: #333;}
div.leaflet-popup-content button:hover {min-width: 150px;} div.leaflet-popup-content button:hover {min-width: 150px;}
div.leaflet-popup-content button:hover span.label {display: inline;} div.leaflet-popup-content button:hover span.label {display: inline;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 852 B

View File

@ -1,59 +0,0 @@
<?php
function loadGif($imgname)
{
$res = array();
$im = @imagecreatefromgif($imgname);
$b = imagecolorat($im, 0, 0);
$w = imagecolorat($im, 3, 3);
$digits = array(
0 => array($b,$b,$b,$w,$b,$b),
1 => array($w,$w,$w,$b,$w,$w),
2 => array($b,$w,$b,$b,$b,$w),
3 => array($b,$w,$b,$b,$w,$b),
4 => array($w,$b,$b,$b,$w,$b),
5 => array($b,$b,$w,$b,$w,$b),
6 => array($b,$b,$w,$b,$b,$b),
7 => array($b,$w,$b,$w,$w,$b),
8 => array($b,$b,$b,$b,$b,$b),
9 => array($b,$b,$b,$b,$w,$b),
);
if($im)
{
for ($index = 0; $index < 10; $index++) {
$block = 0;
if ($index >= 3) $block++;
if ($index >= 6) $block++;
if ($index >= 9) $block++;
$x = 78 - 5*$index - 2*$block;
$y = 72;
$digit = array(
imagecolorat($im, $x+1, $y),
imagecolorat($im, $x, $y+1),
imagecolorat($im, $x+3, $y+1),
imagecolorat($im, $x+2, $y+2),
imagecolorat($im, $x, $y+3),
imagecolorat($im, $x+3, $y+3),
);
$d = array_search($digit, $digits);
if ($d !== false) {
$res[] = array_search($digit, $digits);
}
}
}
return implode('', array_reverse($res));
}
for ($index = 0; $index <= 2; $index++) {
print loadGif('/home/web/poi/public/hit'.$index.'.gif');
print '<br/>';
}

View File

@ -193,31 +193,26 @@ function showInfo(id)
photos = '<img src="' + data.img + '" onclick="showImage(\'' + id + '\')" />'; photos = '<img src="' + data.img + '" onclick="showImage(\'' + id + '\')" />';
} }
description = '<div class="infoCard">' + description = '<div class="infoCard">' + '<h3>' + data.name + '</h3>' + photos;
'<h3>' + data.name + '</h3>' + description += data.descriptionHtml;
photos; description += '</div><div class="clear"></div>';
description += '<div class="btn-group control">';
description = description + data.descriptionHtml;
//description = description + ' <a href="/page/point/id/' + id + '" target="blank">Подробнее...</a>';
if (data.source.length > 11) if (data.source.length > 11)
{ {
description = description + ' <a href="' + data.source + '" target="blank">Подробнее...</a>'; description += '<a type="button" class="btn btn-default" href="' + data.source + '" target="blank"><span class="glyphicon glyphicon-eye-open"></span> <span class="label">Подробнее</span></a>';
} }
// description += '<a type="button" class="btn btn-default" href="/page/point/id/' + id + '"><span class="glyphicon glyphicon-eye-open"></span> <span class="label">Подробнее</span></a>';
description = description + '</div><div class="clear"></div>'; description += '<button type="button" class="btn btn-default" onclick="addToRoute(' + id + ')"><span class="glyphicon glyphicon-map-marker"></span> <span class="label">В маршрут</span></button>';
// description += '<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> <span class="label">Был здесь</span></button>';
description = description + '<div class="btn-group control">'; // description += '<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-thumbs-up"></span> <span class="label">Нравится</span></button>';
description = description + '<button type="button" class="btn btn-default" onclick="addToRoute(' + id + ')"><span class="glyphicon glyphicon-map-marker"></span> <span class="label">В маршрут</span></button>'; description += '<button type="button" class="btn btn-default" onclick="addRemoveFavorite(' + id + ')"><span id="myFavoritesButton" class="glyphicon glyphicon-star' + (data.inFavorites ? '' : '-empty') + ' "></span> <span class="label">Хочу посетить</span></button>';
// description = description + '<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> <span class="label">Был здесь</span></button>';
// description = description + '<button type="button" class="btn btn-default"><span class="glyphicon glyphicon-thumbs-up"></span> <span class="label">Нравится</span></button>';
description = description + '<button type="button" class="btn btn-default" onclick="addRemoveFavorite(' + id + ')"><span id="myFavoritesButton" class="glyphicon glyphicon-star' + (data.inFavorites ? '' : '-empty') + ' "></span> <span class="label">Хочу посетить</span></button>';
if (isAdmin == '1') if (isAdmin == '1')
{ {
description = description + '<button type="button" class="btn btn-default" onclick="editPoint(' + id + ')"><span class="glyphicon glyphicon-pencil"></span> <span class="label">Редактировать</span></button>'; description += '<button type="button" class="btn btn-default" onclick="editPoint(' + id + ')"><span class="glyphicon glyphicon-pencil"></span> <span class="label">Редактировать</span></button>';
} }
description = description + '</div>'; description += '</div>';
marker.options.description = description; marker.options.description = description;
marker.bindPopup(marker.options.description, {maxWidth: 500, maxHeight: 300}); marker.bindPopup(marker.options.description, {maxWidth: 500, maxHeight: 300});