mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Expose view enhancement: Load next media to gallery by scrolling on thumbnails
This commit is contained in:
parent
e135e0d2ee
commit
4cd8d64130
@ -426,6 +426,7 @@ function expose (widget)
|
||||
expose_onopened: function (event){
|
||||
// Check to see if we're in a nextmatch, do magic
|
||||
var nm = find_nextmatch(this);
|
||||
var self=this;
|
||||
if(nm)
|
||||
{
|
||||
// Add scrolling to the indicator list
|
||||
@ -436,8 +437,17 @@ function expose (widget)
|
||||
.addClass('paginating')
|
||||
.mousewheel(function(event, delta) {
|
||||
if(delta > 0 && parseInt($j(this).css('left')) > gallery.container.width() / 2) return;
|
||||
|
||||
//Reload next pictures into the gallery by scrolling on thumbnails
|
||||
if (delta<0 && $j(this).width() + parseInt($j(this).css('left')) < gallery.container.width())
|
||||
{
|
||||
var nextIndex = gallery.indicatorContainer.find('[title="loading"]')[0];
|
||||
if (nextIndex) self.expose_onslideend(gallery,nextIndex.dataset.index -1);
|
||||
return;
|
||||
}
|
||||
// Move it about 5 indicators
|
||||
$j(this).css('left',parseInt($j(this).css('left'))-(-delta*gallery.activeIndicator.width()*5)+'px');
|
||||
|
||||
event.preventDefault();
|
||||
})
|
||||
.swipe(function(event, direction, distance) {
|
||||
|
Loading…
Reference in New Issue
Block a user