Skip to content

Commit

Permalink
add button osb
Browse files Browse the repository at this point in the history
  • Loading branch information
ErshKUS committed Feb 18, 2012
1 parent fc5c5ce commit 8817298
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 10 deletions.
19 changes: 13 additions & 6 deletions www/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,17 @@ a.wheremi:hover div.wheremi {
height: 9px;
}

#menupan table {
#menupan #tablemenu {
margin: 0 22px;
/*min-width: 980px;*/
position: absolute;
top: 0;
}

#menupan table div {
#menupan #mainmenu {
top: 0;
}

#menupan #mainmenu div, #menupan #mainmenupage div {
border-bottom: 3px solid #333333;
cursor: pointer;
height: 22px;
Expand All @@ -389,21 +392,22 @@ a.wheremi:hover div.wheremi {
overflow: hidden;
}

.fs #menupan table div {
.fs #menupan #mainmenu div {
border-bottom: 0 none;
height: 4px;
}

.fs #menupan table div:hover {
.fs #menupan #mainmenu div:hover {
height: 22px;
}

#menupan a {
color: #aaaaaa;
text-decoration: none;
outline: none;
}

#menupan a:hover, #menupan a:active {
#menupan a:hover, #menupan a:active, #menupan a.on {
color: #ffffff;
outline: none;
}
Expand All @@ -427,6 +431,9 @@ a.wheremi:hover div.wheremi {
#menupan td:nth-child(6) div:hover, #menupan td:nth-child(6) div.current { background: #faaa87; }
#menupan td:nth-child(7) div:hover, #menupan td:nth-child(7) div.current { background: #4a8af5; }

#menupan #mainmenupage td:nth-child(1) div { width: 190px; border-top: 5px solid #c3102e; }
#menupan #mainmenupage td:nth-child(1) div:hover, #menupan #mainmenupage td:nth-child(1) a.on div { background: #c3102e; }


#loginpan {
color: #aaa;
Expand Down
4 changes: 2 additions & 2 deletions www/include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
function show_menu($current = '', $level = 0) {
$result = pg_query('SELECT * FROM "pagedata" WHERE "level"<='.$level.' AND "activate" AND "order">0 ORDER BY "order" asc');

echo '<div id="menupan"><div id="menuback"></div><table><tr>';
echo '<table id="mainmenu"><tr>';
$menu = array();
while ($row = pg_fetch_assoc($result))
$menu[] = ($current == $row['name'] ? '<td><div class="current">'.$row['text'].'</div></td>' : '<td><a href="/'.$row['name'].'"><div>'.$row['text'].'</div></a></td>');
echo implode($menu);
echo '</tr></table></div>';
echo '</tr></table>';
}

function show_menu_old($current = '', $level = 0) {
Expand Down
14 changes: 12 additions & 2 deletions www/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,18 @@
<? print($page_head); ?>
</head>
<body>

<? show_menu($_URL[0]); ?>
<div id="menupan">
<div id="menuback"></div>
<table id="tablemenu"><tr>
<td><? show_menu($_URL[0]); ?></td>
<td width="100%"></td>
<td>
<table id="mainmenupage"><tr>
<? print($page_topmenu); ?>
</tr></table>
</td>
</tr></table>
</div>

<div id="toppan">
<a href="/">
Expand Down
14 changes: 14 additions & 0 deletions www/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,17 @@ osm.ui.togglefs = function() {
osm.ui.searchsubmit = function() {
return search.search($_('qsearch').value);
}

osm.osbclick = function(e) {
if (e.className!="on") {
e.className="on";
osm.map.addLayer(osm.layers.osb);
document.body.style.cursor="help"
}
else {
e.className="";
osm.map.removeLayer(osm.layers.osb);
document.body.style.cursor=""
}
osm.map.control_layers._update();
}
4 changes: 4 additions & 0 deletions www/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
<link rel="stylesheet" href="css/osb.css" />
PHP_HEAD;

$page_topmenu = <<<PHP_TOPMENU
<td><a href="/" title="Достаточно двойного клика мышью по месту и указать неточность" onclick="osm.osbclick(this); return false;"><div>Указать неточность на карте?</div></a></td>
PHP_TOPMENU;

$page_topbar = <<<PHP_TOPBAR
<div id="searchpan">
<form id="search" method="get" action="/" onsubmit="return osm.ui.searchsubmit();"><table style="width:100%;"><tr>
Expand Down

0 comments on commit 8817298

Please sign in to comment.