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