[BUGFIX] Fix broken ImageManipulation wizard
[Packages/TYPO3.CMS.git] / typo3 / sysext / recordlist / Resources / Public / JavaScript / BrowseFolders.js
1 /*
2 * This file is part of the TYPO3 CMS project.
3 *
4 * It is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License, either version 2
6 * of the License, or any later version.
7 *
8 * For the full copyright and license information, please read the
9 * LICENSE.txt file that was distributed with this source code.
10 *
11 * The TYPO3 project - inspiring people to share!
12 */
13
14 /**
15 * Module: TYPO3/CMS/Recordlist/BrowseFolders
16 * Folder selection
17 * @exports TYPO3/CMS/Recordlist/BrowseFolders
18 */
19 define(['jquery', 'TYPO3/CMS/Recordlist/ElementBrowser', 'TYPO3/CMS/Backend/Modal', 'TYPO3/CMS/Backend/Severity'], function ($, ElementBrowser, Modal, Severity) {
20 'use strict';
21
22 $(function() {
23 $('[data-folder-id]').on('click', function (event) {
24 event.preventDefault();
25 var folderId = $(this).data('folderId');
26 var close = $(this).data('close');
27 ElementBrowser.insertElement('', folderId, 'folder', folderId, folderId, '', '', '', close);
28 });
29
30 $('.t3js-folderIdError').on('click', function (event) {
31 event.preventDefault();
32 Modal.confirm('', $(this).data('message'), Severity.error, [], []);
33 });
34 });
35
36 });