From 3c0d2da9a725c7851215778d948793bc8a141fcb Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Thu, 18 Jul 2013 17:20:46 +0800 Subject: [PATCH] description fixed for gallery --- .../gallery/app/assets/javascripts/galleryAPI.js.erb | 5 ++++- .../app/assets/javascripts/galleryAPI_frontend.js.erb | 5 ++++- .../app/views/panel/gallery/back_end/albums/_album.html.erb | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI.js.erb b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI.js.erb index 1cf1490e9..dd60a1837 100644 --- a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI.js.erb +++ b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI.js.erb @@ -198,7 +198,10 @@ var galleryAPI = function(){ // $(".slideinfo b.info").text(imageArray[imagecount].title); if($('.bt-tag').hasClass("active")) updatePhotoTag(); - $(".slideinfo .info").text(imageArray[imagecount].description); + if(imageArray[imagecount].description) + $(".slideinfo .info").text(imageArray[imagecount].description); + else + $(".slideinfo .info").text(""); if(imageArray.length > 1) updateNavigation(); }) diff --git a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb index a1757aa5d..44a2a9e5e 100644 --- a/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb +++ b/vendor/built_in_modules/gallery/app/assets/javascripts/galleryAPI_frontend.js.erb @@ -218,7 +218,10 @@ var galleryAPI = function(){ } // $(".slideinfo b.info").text(imageArray[imagecount].title); updatePhotoTag(); - $(".slideinfo .info").text(imageArray[imagecount].description); + if(imageArray[imagecount].description) + $(".slideinfo .info").text(imageArray[imagecount].description); + else + $(".slideinfo .info").text(""); if(imageArray.length > 1) updateNavigation(); }) diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/albums/_album.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/albums/_album.html.erb index 332ac53be..005768e0f 100644 --- a/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/albums/_album.html.erb +++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/albums/_album.html.erb @@ -11,7 +11,7 @@