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-07-27 05:28:33 +0300
committerOlivier Paroz <github@oparoz.com>2015-07-27 05:28:33 +0300
commitd53b8cd8afeed3de3fcdfece196d92fc1a3e80aa (patch)
tree0353884ad39e4a34aca44531f6e26a1391bbf2cf /js/gallerybutton.js
parentaeecff52ca70f16def62329d017c843b556b2557 (diff)
JS cleanup
All methods should be documented Public methods first, then private ones Finish "use strict" implementation
Diffstat (limited to 'js/gallerybutton.js')
-rw-r--r--js/gallerybutton.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/js/gallerybutton.js b/js/gallerybutton.js
index 0c36df13..f131572c 100644
--- a/js/gallerybutton.js
+++ b/js/gallerybutton.js
@@ -4,6 +4,9 @@ GalleryButton.isPublic = false;
GalleryButton.button = {};
GalleryButton.url = null;
+/**
+ * Rebuilds the Gallery URL every time the files list has changed
+ */
GalleryButton.onFileListUpdated = function () {
"use strict";
var fileList;
@@ -17,6 +20,11 @@ GalleryButton.onFileListUpdated = function () {
GalleryButton.buildGalleryUrl(fileList.getCurrentDirectory().replace(/^\//, ''));
};
+/**
+ * Builds the URL which will load the exact same folder in Gallery
+ *
+ * @param dir
+ */
GalleryButton.buildGalleryUrl = function (dir) {
"use strict";
var params = {};
@@ -49,7 +57,7 @@ $(document).ready(function () {
$('#fileList').on('updated', GalleryButton.onFileListUpdated);
- // toggle for opening shared file list as picture view
+ // 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') + '"/>' +