From 90af568b3a6c80578047dccd9cba16122bd0b828 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Fri, 11 Sep 2015 15:46:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=82=D1=84=D0=BE=D1=80=D0=BC=D0=B0?= =?UTF-8?q?=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D1=8B=20=D0=BB=D0=B5?= =?UTF-8?q?=D0=B9=D0=B0=D1=83=D1=82=D1=8B;=20=D0=9F=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=B5=D1=81=D0=B5=D0=BD=D0=B0=20=D1=87=D0=B0=D1=81=D1=82?= =?UTF-8?q?=D1=8C=20JS=20=D0=B8=D0=B7=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=20=D0=B2=20map.js=20-=20=D0=B2=20=D0=BE?= =?UTF-8?q?=D0=B1=D1=89=D0=B5=D0=BC=20=D0=BD=D0=B0=D0=B2=D0=B5=D0=BB=20?= =?UTF-8?q?=D0=BA=D1=80=D0=B0=D1=81=D0=BE=D1=82=D1=83=20=D0=B2=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B7=D0=BC=D0=B5=D1=82=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/views/indexTemplate.php | 18 ----- ground/views/layout.php | 91 ++++++++++++------------ ground/views/layoutPage.php | 116 ++++++++++++++++--------------- ground/views/layoutPrint.php | 47 ++++++------- ground/views/modals/addPoint.php | 68 ------------------ public/js/map.js | 88 +++++++++++++++++++++++ 6 files changed, 215 insertions(+), 213 deletions(-) diff --git a/ground/views/indexTemplate.php b/ground/views/indexTemplate.php index 2983908..90d8bf7 100644 --- a/ground/views/indexTemplate.php +++ b/ground/views/indexTemplate.php @@ -124,21 +124,3 @@ if (App::$user) { var categoryArray = ''; - diff --git a/ground/views/layout.php b/ground/views/layout.php index e64d533..d60c943 100644 --- a/ground/views/layout.php +++ b/ground/views/layout.php @@ -4,58 +4,61 @@ prefix="og: http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#"> - - <?= App::getConfig('title') ?> + + <?= App::getConfig('title') ?> - - - - - - - - - - - + + + + + + + + + + + + - - - - - - -
- -
- - - - + + + + + + +
+ +
- + + + - - - - - + - - - - - - \ No newline at end of file + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ground/views/layoutPage.php b/ground/views/layoutPage.php index 98c095a..531dc21 100644 --- a/ground/views/layoutPage.php +++ b/ground/views/layoutPage.php @@ -4,72 +4,74 @@ prefix="og: http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" xmlns:og="http://ogp.me/ns#"> - - <?= App::getConfig('title') ?> + + <?= App::getConfig('title') ?> - - - - - + + + + + - - - - - + + + + + - - - + + + - - - - - - - - + + + + + + + + - + - - - - - - -
- -
- - - - - - \ No newline at end of file + height = width / 4 * 3; + $('.pagePoinsNearCards').width(width); + $('.pagePoinsNearCardsImg').width(width); + $('.pagePoinsNearCards').height(height); + $('.pagePoinsNearCardsImg').height(height); + } + + setSizeForAdditional(); + + $(window).resize(function () { + setSizeForAdditional(); + }); + + \ No newline at end of file diff --git a/ground/views/layoutPrint.php b/ground/views/layoutPrint.php index 1e59113..2ab78d4 100644 --- a/ground/views/layoutPrint.php +++ b/ground/views/layoutPrint.php @@ -1,32 +1,27 @@ - - <?= App::getConfig('title') ?> - - - - - - - - - - - - - - - - - + + <?= App::getConfig('title') ?> + + + + + - - - + + + + + + + + + +

WikiPoints.ru


diff --git a/ground/views/modals/addPoint.php b/ground/views/modals/addPoint.php index f5e2020..6aeb6e4 100644 --- a/ground/views/modals/addPoint.php +++ b/ground/views/modals/addPoint.php @@ -74,71 +74,3 @@ - diff --git a/public/js/map.js b/public/js/map.js index 5cb2ecb..8ed7e35 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -353,3 +353,91 @@ function showPointagreement() } }); } + +// =============== ADD POINT + +function addNewImage(link) +{ + if ($('.extraImage', '#addPointForm').length < 10) + { + $('.extraImage', '#newIm').clone().appendTo('#imgsContainer').show(200); + if (link != undefined) + { + $('.form-control.images', '#addPointForm').last().attr('readonly', 'readonly').val(link); + $('.input-group-addon.type.button', '#addPointForm').remove(); + } + } +} + +function removeInput(el) +{ + container = $(el).parent().parent(); + container.hide(300, function () { + container.remove() + }); +} + +function switchType(el) +{ + container = $(el).parent().parent(); + if (container.hasClass('asLink')) + { + $('.ordering', container).val('FILE'); + $('.ico span', container).removeClass('glyphicon-link').addClass('glyphicon-paperclip'); + $('.form-control.images', container).attr('type', 'file').attr('name', 'photos[]'); + $('.form-control.photoLinks', container).show(); + container.removeClass('asLink'); + el.attr('title', 'Указать ссылку на изображение'); + $('.input-group-addon.type.ico', container).attr('title', 'Загрузите файл с изображением'); + $('.input-group-addon.type.preview', container).hide(); + } + else + { + $('.ordering', container).val('LINK'); + $('.ico span', container).removeClass('glyphicon-paperclip').addClass('glyphicon-link'); + $('.form-control.images', container).attr('type', 'text').attr('name', 'imgs[]'); + $('.form-control.photoLinks', container).hide(); + container.addClass('asLink'); + el.attr('title', 'Загрузить файл'); + $('.input-group-addon.type.ico', container).attr('title', 'Укажите ссылку на изображение'); + $('.input-group-addon.type.preview', container).show(); + } +} + +function showPreview(el) { + img = $('input.images', el.parent()).val(); + + if ($('input.ordering', el.parent()).val() == 'FILE' || img.length < 12) { + return true; + } + + if (img.toLowerCase().indexOf('http') == -1) { + img = '/photos/small/' + img; + } + + $('#imgPreview').attr('src', img); + $('#imgPreview').show(); +} + +function hidePerview() { + $('#imgPreview').hide(); +} + +// ======================= VK Button + +$(document).ready(function () { + if ($.cookie('doNotShowVKgroup')) { + $('#vkBigLogo').remove(); + } else { + setTimeout(function () { + $('#vkBigLogo').css({'display': 'block'}).animate({'margin-left': "-225px"}, 1500); + }, 10000); + } +}) + +function hideBigLogo() { + $.cookie('doNotShowVKgroup', true, {expires: 100, path: '/'}); + $('#vkBigLogo').animate({'margin-left': "285px"}, 1500, function () { + $('#vkBigLogo').remove(); + }); +}