summaryrefslogtreecommitdiffstats
path: root/apps/gallery/js
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-20 21:22:41 +0200
committerBart Visscher <bartv@thisnet.nl>2012-06-20 21:28:37 +0200
commita6dc7345d0053aa93c8f44f94002b7d2426c2658 (patch)
treeadc3601e62e36b8a9ce8f6171ab28ff40dd1ca53 /apps/gallery/js
parent10a0d5a46c277ed342f19946b451db1082fb41c5 (diff)
downloadnextcloud-server-a6dc7345d0053aa93c8f44f94002b7d2426c2658.tar.gz
nextcloud-server-a6dc7345d0053aa93c8f44f94002b7d2426c2658.zip
Gallery: Move code/js/css from main template to the right place
Diffstat (limited to 'apps/gallery/js')
-rw-r--r--apps/gallery/js/pictures.js33
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;
+}