From 40cda40db81b1d797caf84c4cda53aedf82667e6 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Tue, 12 Aug 2014 11:04:21 +0400 Subject: [PATCH] =?UTF-8?q?FIX=20=D0=B3=D0=B0=D0=BB=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/views/modals/image.php | 3 --- public/js/app.js | 5 +++++ public/js/map.js | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ground/views/modals/image.php b/ground/views/modals/image.php index 6bf3529..d4a0c36 100644 --- a/ground/views/modals/image.php +++ b/ground/views/modals/image.php @@ -9,9 +9,6 @@
- \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index 525d069..9d4c842 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -81,6 +81,11 @@ function showImage(id) if (typeof(point.images) == 'object') { + if( typeof($('.fotorama').data('fotorama')) != 'undefined' ) + { + $('.fotorama').data('fotorama').destroy(); + } + $('#imageModalImg').hide(); $('.fotorama').show(); diff --git a/public/js/map.js b/public/js/map.js index 4de1ba1..e56f96d 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -171,7 +171,10 @@ function showInfo(id) pointsSources[id] = data; if (typeof(data.images) == 'object') { - ph = '
+' + (data.photosCount-1) + '
'; + ph = ''; + if (data.images.length > 1) + ph = '
+' + (data.photosCount-1) + '
'; + ph += ''; } else