From d708e69649422024f1d9e65d371613cf1ce03f38 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Fri, 11 Apr 2014 12:42:05 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D0=B0=D1=8F=20=D0=B2=D1=81?= =?UTF-8?q?=D0=BF=D0=BB=D1=8B=D0=B2=D0=B0=D0=B9=D0=BA=D0=B0=20=D0=B4=D0=BE?= =?UTF-8?q?=D1=8E=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=82?= =?UTF-8?q?=D0=BE=D1=87=D0=BA=D0=B8,=20=D1=84=D0=B8=D0=BA=D1=81=20=D0=BE?= =?UTF-8?q?=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D1=81=20=D0=B1=D1=83=D1=84?= =?UTF-8?q?=D0=B5=D1=80=D0=BE=D0=BC=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/classes/Controller.php | 5 +++ ground/controllers/IndexController.php | 2 +- ground/views/indexTemplate.php | 48 ++++++++++++++++++++++++++ public/js/main.js | 27 +++------------ 4 files changed, 58 insertions(+), 24 deletions(-) diff --git a/ground/classes/Controller.php b/ground/classes/Controller.php index d53d630..d01a369 100644 --- a/ground/classes/Controller.php +++ b/ground/classes/Controller.php @@ -37,7 +37,10 @@ abstract class Controller return 'Template not found'; if ($return) + { $oldContentFormBuffer_temp = ob_get_clean(); + ob_start(); + } extract($data); @@ -46,6 +49,7 @@ abstract class Controller if ($return) { $newContentFormBuffer_temp = ob_get_clean(); + ob_start(); echo $oldContentFormBuffer_temp; return $newContentFormBuffer_temp; } @@ -76,6 +80,7 @@ abstract class Controller } else { echo $result; + return true; } } diff --git a/ground/controllers/IndexController.php b/ground/controllers/IndexController.php index 0bb351a..ed30b40 100644 --- a/ground/controllers/IndexController.php +++ b/ground/controllers/IndexController.php @@ -19,7 +19,7 @@ class IndexController extends Controller $category = new Category(); self::render('indexTemplate.php', array( - 'category' => $category->getAll(), + 'categories' => $category->getAll(), )); } diff --git a/ground/views/indexTemplate.php b/ground/views/indexTemplate.php index 644287b..0d32b60 100644 --- a/ground/views/indexTemplate.php +++ b/ground/views/indexTemplate.php @@ -23,3 +23,51 @@ + diff --git a/public/js/main.js b/public/js/main.js index 6e7a2a5..9f9e6a6 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -25,29 +25,10 @@ function init() { if (!myMap.balloon.isOpen()) { if ( $('#addPointButton').hasClass('btn-success') ) { - var coords = e.get('coordPosition'); - myMap.balloon.open(coords, { - contentHeader:'Добавление точки', - contentBody: - '
' + - '

Название:
' + - '

' + - '

URL изображения:
' + - '

' + - '

Описание:
' + - '

' + - '

Тип:
' + - '' + - '

Источник:
' + - '

' + - - '' + - '' + - '' + - '
' - }); + coords = e.get('coordPosition'); + $('#lat').val(coords[0].toPrecision(11)); + $('#lng').val(coords[1].toPrecision(11)); + $('#addPointModal').modal('show'); } } else {