diff --git a/ground/controllers/IndexController.php b/ground/controllers/IndexController.php index e68533b..c8248cc 100644 --- a/ground/controllers/IndexController.php +++ b/ground/controllers/IndexController.php @@ -19,4 +19,11 @@ class IndexController extends Controller 'category' => $category->getAll(), )); } + + static function actionAddpoint() + { + $point = new Point(); + $point->add($_POST); + App::redirect('/'); + } } diff --git a/public/css/style.css b/public/css/style.css index 32d097e..4327cff 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -12,4 +12,5 @@ div#map {width: 100%; height: 100%;} div.infoCard {width: 400px;} div.infoCard img {width: 200px; float: left; margin: 0 10px 5px 0;} div.header {display: block; position: absolute; top: 0; left: 115px; border-radius: 0 0 5px 5px; z-index: 1000; background-color: #FFF; padding: 5px 10px;} -div.header h1 {display: inline; margin-right: 25px; color: #555;} \ No newline at end of file +div.header h1 {display: inline; margin-right: 25px; color: #555;} +div.add {cursor: pointer;} \ No newline at end of file diff --git a/public/js/main.js b/public/js/main.js index e83a818..333abc3 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -18,25 +18,33 @@ function init() { myMap.controls.add('smallZoomControl'); myMap.controls.add('scaleLine'); - // myPlacemark = new ymaps.Placemark([59.977822,30.283677], { - // hintContent: 'Дом Ирен Адлер', - // balloonContent: '

Кто-то щелкнул по карте.
' + - 'Координаты щелчка: ' + [ - coords[0].toPrecision(6), - coords[1].toPrecision(6) - ].join(', ') + '
', - contentFooter:'Щелкните еще раз' + contentHeader:'Добавление точки', + contentBody: + '' }); } else { @@ -68,4 +76,9 @@ function getPoints() }); return true; +} + +function addNewPoint() +{ + console.log($('#name').val()); } \ No newline at end of file