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-05-21 00:59:49 +0300
committerOlivier Paroz <github@oparoz.com>2015-09-15 17:29:25 +0300
commit377ba7c149377864787d075f051e6179bd31244a (patch)
tree7aa2a5faf793e78cae6aeae2b84b32d448010c28 /js/gallerybutton.js
parente545218678e14ecaef55a8db307fa8a89f07241a (diff)
Turn the Gallery button into a switch
Implementation of #145
Diffstat (limited to 'js/gallerybutton.js')
-rw-r--r--js/gallerybutton.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/js/gallerybutton.js b/js/gallerybutton.js
index f131572c..970cbde0 100644
--- a/js/gallerybutton.js
+++ b/js/gallerybutton.js
@@ -58,10 +58,17 @@ $(document).ready(function () {
$('#fileList').on('updated', GalleryButton.onFileListUpdated);
// Toggle for opening files list as gallery view
- GalleryButton.button = $('<div id="openAsFileListButton" class="button">' +
- '<img class="svg" src="' + OC.imagePath('core', 'actions/toggle-pictures.svg') + '"' +
- 'alt="' + t('gallery', 'Picture view') + '"/>' +
- '</div>');
+ GalleryButton.button =
+ $('<div class="button view-switcher left-switch-button disabled-button">' +
+ '<img class="svg" src="' + OC.imagePath('core', 'actions/toggle-filelist.svg') +
+ '"' +
+ 'alt="' + t('gallery', 'Picture view') + '"/>' +
+ '</div>' +
+ '<div id="gallery-button" class="button view-switcher right-switch-button inactive-button">' +
+ '<img class="svg" src="' + OC.imagePath('core', 'actions/toggle-pictures.svg') +
+ '"' +
+ 'alt="' + t('gallery', 'Picture view') + '"/>' +
+ '</div>');
GalleryButton.button.click(function () {
window.location.href = GalleryButton.url;