[TASK] Replace confirm with a dialog when creating a new bookmark 82/42282/6
authorWouter Wolters <typo3@wouterwolters.nl>
Wed, 5 Aug 2015 16:16:37 +0000 (18:16 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Wed, 5 Aug 2015 17:30:03 +0000 (19:30 +0200)
Resolves: #68751
Releases: master
Change-Id: I4fa9c9be82581832356d1217885f0a2ba41a9aeb
Reviewed-on: http://review.typo3.org/42282
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
typo3/sysext/backend/Resources/Public/JavaScript/Toolbar/ShortcutMenu.js

index d0f63e0..3e83ba0 100644 (file)
@@ -105,7 +105,15 @@ define('TYPO3/CMS/Backend/Toolbar/ShortcutMenu', ['jquery'], function($) {
        ShortcutMenu.createShortcut = function(moduleName, url, confirmationText, motherModule) {
                var shouldCreateShortcut = true;
                if (typeof confirmationText !== 'undefined') {
        ShortcutMenu.createShortcut = function(moduleName, url, confirmationText, motherModule) {
                var shouldCreateShortcut = true;
                if (typeof confirmationText !== 'undefined') {
-                       shouldCreateShortcut = window.confirm(confirmationText);
+                       // @todo: translations
+                       top.TYPO3.Modal.confirm('Create bookmark', confirmationText)
+                               .on('confirm.button.ok', function() {
+                                       shouldCreateShortcut = true;
+                                       $(this).trigger('modal-dismiss');
+                               })
+                               .on('confirm.button.cancel', function() {
+                                       $(this).trigger('modal-dismiss');
+                               });
                }
 
                if (shouldCreateShortcut) {
                }
 
                if (shouldCreateShortcut) {