diff options
author | Olivier Paroz <github@oparoz.com> | 2015-04-17 03:13:10 +0300 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-04-17 03:13:10 +0300 |
commit | 634295f254879c3eb1d89ebcf3662ff089951039 (patch) | |
tree | 0ea968fa525480f2fb1fbc637fcf932b2fa44373 /js/galleryview.js | |
parent | 75e62c4be88db952cb80074ad0dbcc3fa7ab5da1 (diff) |
Extract generic JS methods to utility class
Diffstat (limited to 'js/galleryview.js')
-rw-r--r-- | js/galleryview.js | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/js/galleryview.js b/js/galleryview.js index 10d42112..789b6c6d 100644 --- a/js/galleryview.js +++ b/js/galleryview.js @@ -48,25 +48,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 * * @param {string} path @@ -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 = '<strong>' + t('gallery', 'Configuration error') + '</strong></br>' + Gallery.albumConfig.error.message + '</br></br>'; - Gallery.showHtmlNotification(text, 7); + Gallery.utility.showHtmlNotification(text, 7); } else if ($.isEmptyObject(albumInfo)) { infoButton.hide(); } else { |