summaryrefslogtreecommitdiffstats
path: root/apps/gallery/js
diff options
context:
space:
mode:
authorBartek Przybylski <bart.p.pl@gmail.com>2011-10-18 21:43:33 +0200
committerBartek Przybylski <bart.p.pl@gmail.com>2011-10-18 21:43:33 +0200
commitc32cce4b35919c255089922abe64f5fe833ecb27 (patch)
tree565ed0f9592c5f929b80f3509c431c4d594fe9bd /apps/gallery/js
parent55e8b02a0923ed33c2c3a17c21d2e6c5e1692192 (diff)
downloadnextcloud-server-c32cce4b35919c255089922abe64f5fe833ecb27.tar.gz
nextcloud-server-c32cce4b35919c255089922abe64f5fe833ecb27.zip
new way of showing gallery covers, missing files
Diffstat (limited to 'apps/gallery/js')
-rw-r--r--apps/gallery/js/album_cover.js2
-rw-r--r--apps/gallery/js/albums.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/gallery/js/album_cover.js b/apps/gallery/js/album_cover.js
index 776feae32cc..c475c60d5da 100644
--- a/apps/gallery/js/album_cover.js
+++ b/apps/gallery/js/album_cover.js
@@ -4,7 +4,7 @@ $(document).ready(function() {
if (r.status == 'success') {
for (var i in r.albums) {
var a = r.albums[i];
- Albums.add(a.name, a.numOfItems);
+ Albums.add(a.name, a.numOfItems, a.bgPath);
}
var targetDiv = document.getElementById('gallery_list');
if (targetDiv) {
diff --git a/apps/gallery/js/albums.js b/apps/gallery/js/albums.js
index 7ab243ededf..a8e317159d5 100644
--- a/apps/gallery/js/albums.js
+++ b/apps/gallery/js/albums.js
@@ -12,13 +12,13 @@ Albums={
// album with the same name wont be insered,
// and false will be returned
// true on success
- add: function(album_name, num) {
+ add: function(album_name, num, bgPath) {
for (var a in Albums.albums) {
if (a.name == album_name) {
return false;
}
}
- Albums.albums.push({name: album_name, numOfCovers: num});
+ Albums.albums.push({name: album_name, numOfCovers: num, backgroundPath: bgPath});
return true;
},
// remove element with given name
@@ -63,7 +63,7 @@ Albums={
var local = $(displayTemplate.replace(/\*NAME\*/g, a.name));
local.css('background-repeat', 'no-repeat');
local.css('background-position', '0 0');
- local.css('background-image','url("ajax/getCovers.php?album_name='+a.name+'")');
+ local.css('background-image','url("'+a.backgroundPath+'")');
local.mousemove(function(e) {
var albumMetadata = Albums.find(this.title);
if (albumMetadata == undefined) {