diff options
Diffstat (limited to 'apps/gallery/js/pictures.js')
-rw-r--r-- | apps/gallery/js/pictures.js | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/apps/gallery/js/pictures.js b/apps/gallery/js/pictures.js index 678c9bcbf55..3a797889688 100644 --- a/apps/gallery/js/pictures.js +++ b/apps/gallery/js/pictures.js @@ -1,4 +1,3 @@ - function constructSharingPath() { return document.location.protocol + '//' + document.location.host + OC.linkTo('', 'public.php') + '?service=gallery&token=' + Albums.token; } @@ -35,3 +34,35 @@ function shareGallery() { }); }); } + +function explode(element) { + $('div', element).each(function(index, elem) { + if ($(elem).hasClass('title')) { + $(elem).addClass('visible'); + } else { + $(elem).css('margin-top', Math.floor(30-(Math.random()*60)) + 'px') + .css('margin-left', Math.floor(30-(Math.random()*60))+ 'px') + .css('z-index', '999'); + } + }); +} + +function deplode(element) { + $('div', element).each(function(index, elem) { + if ($(elem).hasClass('title')) { + $(elem).removeClass('visible'); + } else { + $(elem).css('margin-top', Math.floor(5-(Math.random()*10)) + 'px') + .css('margin-left', Math.floor(5-(Math.random()*10))+ 'px') + .css('z-index', '3'); + } + }); +} + +function openNewGal(album_name) { + root = root + album_name + "/"; + var url = window.location.toString().replace(window.location.search, ''); + url = url + "?app=gallery&root="+encodeURIComponent(root); + + window.location = url; +} |