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
This commit is contained in:
Hadi Nategh 2015-01-30 10:56:15 +00:00
parent b193dc0733
commit 8a2bf6a616
2 changed files with 12 additions and 0 deletions

View File

@ -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});

View File

@ -1823,3 +1823,7 @@ span.et2_egw_action_ddHelper_itemsCnt {
.blueimp-gallery-controls>.slides {
height:85%;
}
/*indicator bar with controls*/
.blueimp-gallery-controls>.indicator {
white-space: nowrap;
}