From d5f795816ba3cb93ad1999383435e6e9065d854e Mon Sep 17 00:00:00 2001 From: Kowalski Date: Sun, 11 Oct 2026 20:37:26 +0200 Subject: [PATCH] =?UTF-8?q?P=C5=99esm=C4=9Brov=C3=A1n=C3=AD=20po=20p=C5=99?= =?UTF-8?q?ihl=C3=A1=C5=A1en=C3=AD/odhl=C3=A1=C5=A1en=C3=AD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Presentation/@layout.latte | 2 +- app/Presentation/Home/HomePresenter.php | 3 +++ app/Presentation/Mapa/MapaPresenter.php | 7 +++++++ app/Presentation/Mapa/default.latte | 2 +- app/Presentation/Sign/SignPresenter.php | 3 ++- www/js/stari.js | 7 +++++-- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/app/Presentation/@layout.latte b/app/Presentation/@layout.latte index 261b7b7..e28135b 100644 --- a/app/Presentation/@layout.latte +++ b/app/Presentation/@layout.latte @@ -59,7 +59,7 @@ Odhlásit {else} Home - Přihlásit + Přihlásit {/if} diff --git a/app/Presentation/Home/HomePresenter.php b/app/Presentation/Home/HomePresenter.php index 172cf8a..f0c46f1 100644 --- a/app/Presentation/Home/HomePresenter.php +++ b/app/Presentation/Home/HomePresenter.php @@ -17,6 +17,9 @@ final class HomePresenter extends Nette\Application\UI\Presenter public function beforeRender(): void { + if (!$this->getUser()->isLoggedIn()) { + $this->template->navrat = $this->storeRequest(); + } } public function renderDefault(int $obvod = null): void diff --git a/app/Presentation/Mapa/MapaPresenter.php b/app/Presentation/Mapa/MapaPresenter.php index 591d2d6..f1c0274 100644 --- a/app/Presentation/Mapa/MapaPresenter.php +++ b/app/Presentation/Mapa/MapaPresenter.php @@ -22,6 +22,13 @@ final class MapaPresenter extends Nette\Application\UI\Presenter ) { } + public function beforeRender(): void + { + if (!$this->getUser()->isLoggedIn()) { + $this->template->navrat = $this->storeRequest(); + } + } + public function actionDefault(?int $obvod = null, ?string $filtr = null): void { if (!$this->getUser()->isLoggedIn() && $filtr !== null && $filtr !== 'obvody') { diff --git a/app/Presentation/Mapa/default.latte b/app/Presentation/Mapa/default.latte index 9d7a855..a1e1636 100644 --- a/app/Presentation/Mapa/default.latte +++ b/app/Presentation/Mapa/default.latte @@ -11,5 +11,5 @@ - + {/block} diff --git a/app/Presentation/Sign/SignPresenter.php b/app/Presentation/Sign/SignPresenter.php index 895973e..7b18ed4 100644 --- a/app/Presentation/Sign/SignPresenter.php +++ b/app/Presentation/Sign/SignPresenter.php @@ -66,6 +66,7 @@ final class SignPresenter extends Nette\Application\UI\Presenter public function renderIn(): void { + $this->template->navrat = $this->backlink; } /** @@ -76,6 +77,6 @@ final class SignPresenter extends Nette\Application\UI\Presenter { $this->getUser()->logout(); $this->flashMessage('Odhlášení bylo úspěšné.'); - $this->redirect('Sign:in'); + $this->redirect(':Home:'); } } \ No newline at end of file diff --git a/www/js/stari.js b/www/js/stari.js index d9668e0..9500911 100644 --- a/www/js/stari.js +++ b/www/js/stari.js @@ -22,7 +22,7 @@ var SEDA = '#9e9e9e'; var SEDA_HRANICE = '#616161'; var MODRA = '#2652a8'; - var MODRA_PLOCHA = '#5c8fd6'; + var MODRA_PLOCHA = '#c5ddf6'; function mix(a, b, t) { return [ @@ -60,7 +60,7 @@ color: '#1d4f91', weight: 2, opacity: 1, - fillOpacity: 0.4, + fillOpacity: 0.28, }; } if (rezim === 'nedokoncene') { @@ -542,6 +542,9 @@ mouseout: function (e) { geojson.resetStyle(e.target); }, + click: function (e) { + map.fitBounds(e.target.getBounds(), { padding: [24, 24] }); + }, }); }