diff options
-rw-r--r-- | js/album.js | 10 | ||||
-rw-r--r-- | js/breadcrumb.js | 2 | ||||
-rw-r--r-- | js/eventsource.js | 1 | ||||
-rw-r--r-- | js/gallery.js | 7 | ||||
-rw-r--r-- | js/galleryconfig.js | 5 | ||||
-rw-r--r-- | js/galleryfileaction.js | 1 | ||||
-rw-r--r-- | js/galleryutility.js | 2 | ||||
-rw-r--r-- | js/slideshowcontrols.js | 2 | ||||
-rw-r--r-- | js/thumbnail.js | 6 |
9 files changed, 21 insertions, 15 deletions
diff --git a/js/album.js b/js/album.js index 2d89b366..e7e643dd 100644 --- a/js/album.js +++ b/js/album.js @@ -3,8 +3,8 @@ * Creates a new album object to store information about an album * * @param {string} path - * @param {[]} subAlbums - * @param {[]} images + * @param {Array<Album|GalleryImage>} subAlbums + * @param {Array<Album|GalleryImage>} images * @param {string} name * @constructor */ @@ -227,7 +227,7 @@ Album.prototype = { * * @param {Album} album * @param {Row} row - * @param {array<Album|GalleryImage>} images + * @param {Array<Album|GalleryImage>} images * * @returns {$.Deferred<Row>} */ @@ -284,7 +284,7 @@ Row.prototype = { * * @param {Album|GalleryImage} element * - * @return {$.Deferred<bool>} true if more images can be added to the row + * @return {jQuery.Deferred<bool>} true if more images can be added to the row */ addElement: function (element) { var row = this; @@ -354,7 +354,7 @@ GalleryImage.prototype = { * * @param {bool} square * - * @returns {$.Deferred<Thumbnail.image>} + * @returns {jQuery.Deferred<Thumbnail.image>} */ getThumbnail: function (square) { if (this.thumbnail === null) { diff --git a/js/breadcrumb.js b/js/breadcrumb.js index c4df1f4a..e0a754ab 100644 --- a/js/breadcrumb.js +++ b/js/breadcrumb.js @@ -89,7 +89,7 @@ * Adds an element to the breadcrumb * * @param {string} name - * @param {string} link + * @param {string|bool} link * @param img * @private */ diff --git a/js/eventsource.js b/js/eventsource.js index bb927f2d..c70ea938 100644 --- a/js/eventsource.js +++ b/js/eventsource.js @@ -38,6 +38,7 @@ dataStr += keys[i] + '=' + encodeURIComponent(data[keys[i]]) + '&'; } } + /* jshint camelcase: false */ dataStr += 'requesttoken=' + encodeURIComponent(oc_requesttoken); if (typeof EventSource !== 'undefined') { joinChar = '&'; diff --git a/js/gallery.js b/js/gallery.js index 239e0299..2b9cb3b9 100644 --- a/js/gallery.js +++ b/js/gallery.js @@ -84,13 +84,12 @@ Gallery.getFiles = function () { }; // Only use the folder as a GET parameter and not as part of the URL var url = Gallery.utility.buildGalleryUrl('files', '', params); - return $.getJSON(url).then(function (data) { + return $.getJSON(url).then(function (/**{albuminfo}*/ data) { var path = null; var fileId = null; var mimeType = null; var mTime = null; var files = data.files; - var albumInfo = data.albuminfo; Gallery.config.setAlbumConfig(albumInfo); for (var i = 0; i < files.length; i++) { @@ -124,6 +123,7 @@ Gallery.getFiles = function () { * This enables us to show as many as 4 pictures for each albums, even if the images are found in * very deep sub-folders * + * @param {string} path * @param dir * @param currentFolder */ @@ -290,7 +290,7 @@ Gallery.resetContentHeight = function () { /** * Creates a new slideshow using the images found in the current folder * - * @param {array} images + * @param {Array} images * @param {string} startImage * @param {bool} autoPlay * @@ -305,6 +305,7 @@ Gallery.slideShow = function (images, startImage, autoPlay) { images = images.map(function (image) { var name = OC.basename(image.path); var previewUrl = Gallery.utility.getPreviewUrl(image.src); + /* jshint camelcase: false */ var params = { file: image.src, requesttoken: oc_requesttoken diff --git a/js/galleryconfig.js b/js/galleryconfig.js index b7b4933d..b76bd670 100644 --- a/js/galleryconfig.js +++ b/js/galleryconfig.js @@ -67,7 +67,7 @@ /** * Saves the description and copyright information for the current album * - * @param albumConfig + * @param {{path, information, description_link, copyright_link}} albumConfig * * @returns {{}} */ @@ -88,6 +88,7 @@ } } + /* jshint camelcase: false */ params = { description: albumInfo.description, descriptionLink: albumInfo.description_link, @@ -105,7 +106,7 @@ /** * Saves the sorting configuration for the current album * - * @param albumConfig + * @param {{sorting}} albumConfig * * @returns {{type: string, order: string, albumOrder: string}} */ diff --git a/js/galleryfileaction.js b/js/galleryfileaction.js index 447ecd97..1b0d6762 100644 --- a/js/galleryfileaction.js +++ b/js/galleryfileaction.js @@ -67,6 +67,7 @@ var galleryFileAction = { // We only add images to the slideshow if we think we'll be able // to generate previews for this media type if (galleryFileAction.mediaTypes[file.mimetype]) { + /* jshint camelcase: false */ var params = { file: dir + file.name, x: width, diff --git a/js/galleryutility.js b/js/galleryutility.js index 438551be..9182bf29 100644 --- a/js/galleryutility.js +++ b/js/galleryutility.js @@ -65,6 +65,7 @@ } if (element.data('requesttoken')) { + /* jshint camelcase: false */ oc_requesttoken = element.data('requesttoken'); } @@ -83,6 +84,7 @@ getPreviewUrl: function (image) { var width = $(window).width() * window.devicePixelRatio; var height = $(window).height() * window.devicePixelRatio; + /* jshint camelcase: false */ var params = { file: image, x: width, diff --git a/js/slideshowcontrols.js b/js/slideshowcontrols.js index cc692eee..7c8e515b 100644 --- a/js/slideshowcontrols.js +++ b/js/slideshowcontrols.js @@ -4,7 +4,7 @@ * Button and key controls for the slideshow * * @param {object} slideshow - * @param {element} container + * @param {*} container * @param {object} zoomablePreview * @param {array} images * @param {int} interval diff --git a/js/thumbnail.js b/js/thumbnail.js index 9c3a3020..a841940d 100644 --- a/js/thumbnail.js +++ b/js/thumbnail.js @@ -2,7 +2,7 @@ /** * A thumbnail is the actual image attached to the GalleryImage object * - * @param {number} path + * @param {string} path * @param {bool} square * @constructor */ @@ -54,7 +54,7 @@ Thumbnails.get = function (path, square) { * @returns {{}} */ Thumbnails.loadBatch = function (paths, square) { - var map = (square) ? this.squareMap : this.map; + var map = (square) ? Thumbnails.squareMap : Thumbnails.map; // Purely here as a precaution paths = paths.filter(function (path) { return !map[path]; @@ -75,7 +75,7 @@ Thumbnails.loadBatch = function (paths, square) { var url = Gallery.utility.buildGalleryUrl('thumbnails', '', params); var eventSource = new Gallery.EventSource(url); - eventSource.listen('preview', function (preview) { + eventSource.listen('preview', function (/**{path, status, mimetype, preview}*/ preview) { var path = preview.path; var thumb = batch[path]; thumb.status = preview.status; |