From a0eb9f9d157d130a0477589cba91646008af91e7 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Thu, 4 Jun 2015 18:07:24 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B2=D1=8B=D0=B9=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D1=8E=D1=89=D0=B8=D0=B9=20=D0=B2?= =?UTF-8?q?=D0=B0=D1=80=D0=B8=D0=B0=D0=BD=D1=82=20=D0=BF=D0=BE=D0=BA=D0=B0?= =?UTF-8?q?=D0=B7=D0=B0=20=D1=83=D1=81=D0=BB=D0=BE=D0=B2=D0=B8=D0=B9=20?= =?UTF-8?q?=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/controllers/JsonController.php | 15 ++++++++++++++- ground/views/indexTemplate.php | 2 +- ground/views/modals/pointAgreement.php | 16 ++++++++++++++++ public/js/map.js | 12 ++++++++++++ 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 ground/views/modals/pointAgreement.php diff --git a/ground/controllers/JsonController.php b/ground/controllers/JsonController.php index 859e324..a9cee44 100644 --- a/ground/controllers/JsonController.php +++ b/ground/controllers/JsonController.php @@ -419,7 +419,6 @@ class JsonController extends Controller if (!$article) { die; } -// print_r($article->text); self::renderPartial('modals/article.php', array( 'title' => $article->title, @@ -428,4 +427,18 @@ class JsonController extends Controller } } + static function actionPointagreement() + { + $article = Article::model()->getByPK(4); + + if (!$article) { + die; + } + self::renderPartial('modals/pointAgreement.php', + array( + 'title' => $article->title, + 'text' => $article->text, + )); + } + } diff --git a/ground/views/indexTemplate.php b/ground/views/indexTemplate.php index ea75dfe..a3f5848 100644 --- a/ground/views/indexTemplate.php +++ b/ground/views/indexTemplate.php @@ -18,7 +18,7 @@ -
+
diff --git a/ground/views/modals/pointAgreement.php b/ground/views/modals/pointAgreement.php new file mode 100644 index 0000000..f240c5b --- /dev/null +++ b/ground/views/modals/pointAgreement.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/public/js/map.js b/public/js/map.js index 6411689..58161c9 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -308,3 +308,15 @@ function showArticle(id) } }); } + +function showPointagreement() +{ + $.ajax({ + url: "/json/pointagreement", + success: function (data) { + $('#articleModal').modal('hide').remove(); + $('body').append($(data)); + $('#articleModal').modal('show'); + } + }); +}