Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-09-13 03:24:37 +0300
committerOlivier Paroz <github@oparoz.com>2015-09-13 03:24:37 +0300
commit31311c9fe0606fc9c031bf3137f25c455b3b94ed (patch)
treeccb93a887ac968f2119753d9fa84a0d2c510796a /js/galleryview.js
parentedc9a0133facd8fbecae6ea86ac22c5d210b0046 (diff)
Make the background colour of the photowall user configurable
Diffstat (limited to 'js/galleryview.js')
-rw-r--r--js/galleryview.js21
1 files changed, 19 insertions, 2 deletions
diff --git a/js/galleryview.js b/js/galleryview.js
index 23ec59eb..93339fde 100644
--- a/js/galleryview.js
+++ b/js/galleryview.js
@@ -53,6 +53,7 @@
$('#save #save-button').click(Gallery.showSaveForm);
$('.save-form').submit(Gallery.saveForm);
}
+ this._setBackgroundColour();
this.viewAlbum(albumPath);
}
},
@@ -234,8 +235,9 @@
var currentSort = Gallery.config.albumSorting;
this.sortControlsSetup(currentSort.type, currentSort.order);
- Gallery.albumMap[Gallery.currentAlbum].images.sort(Gallery.utility.sortBy(currentSort.type,
- currentSort.order));
+ Gallery.albumMap[Gallery.currentAlbum].images.sort(
+ Gallery.utility.sortBy(currentSort.type,
+ currentSort.order));
Gallery.albumMap[Gallery.currentAlbum].subAlbums.sort(Gallery.utility.sortBy('name',
currentSort.albumOrder));
},
@@ -280,6 +282,21 @@
infoButton.find('span').delay(1000).slideDown();
}
}
+ },
+
+ /**
+ * Sets the background colour of the photowall
+ *
+ * @private
+ */
+ _setBackgroundColour: function () {
+ var wrapper = $('#content-wrapper');
+ var albumInfo = Gallery.config.albumInfo;
+ if (!$.isEmptyObject(albumInfo) && albumInfo.background) {
+ wrapper.css('background-color', '#' + albumInfo.background);
+ } else {
+ wrapper.css('background-color', '#fff');
+ }
}
};