From 8a2bf6a616da859a62343ab2d5331f04d8fcfcdd Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 30 Jan 2015 10:56:15 +0000 Subject: [PATCH] Fix some issues in expose view: -Make indicator available for the first time load to be abale to calculate the correct active thumbnail position -Make sure the indicators always are arranged in one line --- etemplate/js/expose.js | 8 ++++++++ etemplate/templates/default/etemplate2.css | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/etemplate/js/expose.js b/etemplate/js/expose.js index 4e386e3086..063abc0262 100644 --- a/etemplate/js/expose.js +++ b/etemplate/js/expose.js @@ -473,6 +473,14 @@ function expose (widget) // See if we need to move the indicator var indicator = gallery.container.find('.indicator'); var current = $j('.active',indicator).position(); + if (current.left == 0) + { + //As controlsClass activates indicators, + //we use it to make indicators available for the first time + //which helps to re-calculate the correct position of it, if it's not loaded yet + gallery.container.addClass(this.expose_options.controlsClass); + current = $j('.active',indicator).position(); + } if(current) { indicator.animate({left: (gallery.container.width() / 2)-current.left}); diff --git a/etemplate/templates/default/etemplate2.css b/etemplate/templates/default/etemplate2.css index 7843f8cbcf..1b410f73ed 100644 --- a/etemplate/templates/default/etemplate2.css +++ b/etemplate/templates/default/etemplate2.css @@ -1822,4 +1822,8 @@ span.et2_egw_action_ddHelper_itemsCnt { /*Give room to Carousel indicator when the gallery controls is on*/ .blueimp-gallery-controls>.slides { height:85%; +} +/*indicator bar with controls*/ +.blueimp-gallery-controls>.indicator { + white-space: nowrap; } \ No newline at end of file