[TASK] Change modal state to warning instead of error 53/38353/2
authorFrank Nägler <typo3@naegler.net>
Mon, 30 Mar 2015 13:55:56 +0000 (15:55 +0200)
committerXavier Perseguers <xavier@typo3.org>
Mon, 30 Mar 2015 18:41:05 +0000 (20:41 +0200)
Change the modal state to warning in case of deleting a record.
The dialog display a warning and no error, so the correct state
should be used.

Resolves: #66149
Releases: master
Change-Id: I673462b80c3ff7c8b588dd94695c2e7f165e7d70
Reviewed-on: http://review.typo3.org/38353
Reviewed-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Tested-by: Andreas Fernandez <andreas.fernandez@aspedia.de>
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>
typo3/sysext/backend/Resources/Public/JavaScript/AjaxDataHandler.js

index 31dbb6f..bab5037 100644 (file)
@@ -84,7 +84,7 @@ define('TYPO3/CMS/Backend/AjaxDataHandler', ['jquery', 'TYPO3/CMS/Backend/Notifi
                $(document).on('click', '.t3js-record-delete', function(evt) {
                        evt.preventDefault();
                        var $anchorElement = $(this);
-                       TYPO3.Modal.confirm($anchorElement.data('title'), $anchorElement.data('message'), top.TYPO3.Severity.error, [
+                       TYPO3.Modal.confirm($anchorElement.data('title'), $anchorElement.data('message'), top.TYPO3.Severity.warning, [
                                {
                                        text: $(this).data('button-close-text') || TYPO3.lang['button.cancel'] || 'Close',
                                        active: true,
@@ -94,7 +94,7 @@ define('TYPO3/CMS/Backend/AjaxDataHandler', ['jquery', 'TYPO3/CMS/Backend/Notifi
                                },
                                {
                                        text: $(this).data('button-ok-text') || TYPO3.lang['button.delete'] || 'OK',
-                                       btnClass: 'btn-danger',
+                                       btnClass: 'btn-warning',
                                        trigger: function() {
                                                TYPO3.Modal.dismiss();
                                                AjaxDataHandler.deleteRecord($anchorElement);