nextcloud /
gallery
| 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
|
|||
| 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 |
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.