Issues (263)

js/newfilemenuplugins.js (1 issue)

Languages
Labels
Severity
1
/**
2
 * Nextcloud - Gallery
3
 *
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the COPYING file.
7
 *
8
 * @author Olivier Paroz <[email protected]>
9
 *
10
 * @copyright Olivier Paroz 2017
11
 */
12
var galleryMenuHideAlbum = {
13
	attach: function (menu) {
14
		menu.addMenuEntry({
15
			'id': 'hideAlbum',
16
			'displayName': t('gallery', 'Hide Album'),
17
			'iconClass': 'icon-close',
18
			'actionHandler': function () {
19
				FileList.createFile('.nomedia')
0 ignored issues
show
The variable FileList seems to be never declared. If this is a global, consider adding a /** global: FileList */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
20
					.then(function() {
21
						window.location.reload();
22
					})
23
					.fail(function() {
24
						OC.Notification.showTemporary(t('gallery', 'Could not hide album'));
25
					});
26
			}
27
		});
28
	}
29
};
30
OC.Plugins.register('Gallery.NewFileMenu', galleryMenuHideAlbum);
31