f207e549c6d14dce7cd4ff7e65d8b3bd03cd6d7e
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Resources / Private / TypeScript / Wizard / NewContentElement.ts
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 import Modal = require('TYPO3/CMS/Backend/Modal');
15 import Severity = require('TYPO3/CMS/Backend/Severity');
16
17 /**
18 * Module: TYPO3/CMS/Backend/Wizard/NewContentElement
19 * NewContentElement JavaScript
20 * @exports TYPO3/CMS/Backend/Wizard/NewContentElement
21 */
22 class NewContentElement {
23 public static wizard(url: string, title: string): void {
24 Modal.advanced({
25 callback: (currentModal: JQuery) => {
26 currentModal.find('.t3js-modal-body').addClass('t3-new-content-element-wizard-window');
27 },
28 content: url,
29 severity: Severity.notice,
30 size: Modal.sizes.medium,
31 title,
32 type: Modal.types.ajax,
33 });
34 }
35 }
36
37 export = NewContentElement;