From 634295f254879c3eb1d89ebcf3662ff089951039 Mon Sep 17 00:00:00 2001 From: Olivier Paroz Date: Fri, 17 Apr 2015 02:13:10 +0200 Subject: Extract generic JS methods to utility class --- js/galleryview.js | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'js/galleryview.js') diff --git a/js/galleryview.js b/js/galleryview.js index 10d42112..789b6c6d 100644 --- a/js/galleryview.js +++ b/js/galleryview.js @@ -47,25 +47,6 @@ } }, - /** - * Returns the token alowing access to files - * - * @returns {string} - */ - getRequestToken: function () { - var token; - - if (this.element.data('token')) { - token = this.element.data('token'); - } - - if (this.element.data('requesttoken')) { - oc_requesttoken = this.element.data('requesttoken'); - } - - return token; - }, - /** * Starts the slideshow * @@ -127,9 +108,9 @@ var currentSort = Gallery.albumConfig.sorting; this.sortControlsSetup(currentSort.type, currentSort.order); - Gallery.albumMap[Gallery.currentAlbum].images.sort(Gallery.sortBy(currentSort.type, + Gallery.albumMap[Gallery.currentAlbum].images.sort(Gallery.utility.sortBy(currentSort.type, currentSort.order)); - Gallery.albumMap[Gallery.currentAlbum].subAlbums.sort(Gallery.sortBy('name', + Gallery.albumMap[Gallery.currentAlbum].subAlbums.sort(Gallery.utility.sortBy('name', currentSort.albumOrder)); }, @@ -161,7 +142,7 @@ infoButton.hide(); var text = '' + t('gallery', 'Configuration error') + '
' + Gallery.albumConfig.error.message + '

'; - Gallery.showHtmlNotification(text, 7); + Gallery.utility.showHtmlNotification(text, 7); } else if ($.isEmptyObject(albumInfo)) { infoButton.hide(); } else { -- cgit v1.2.3