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'); + } + }); +}