[BUGFIX] Remove HTML markup from flashMessage 01/44701/4
authorFrank Nägler <frank.naegler@typo3.org>
Fri, 13 Nov 2015 09:55:12 +0000 (10:55 +0100)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Sun, 15 Nov 2015 14:49:55 +0000 (15:49 +0100)
This patch adds the possibility to add line breaks to JS Notifications
to be able to structure the output of extension installation messages.

Resolves: #71518
Releases: master
Change-Id: Id3fffc54f1d47b972cada208c91abe942ca18706
Reviewed-on: https://review.typo3.org/44701
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Tested-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Richard Haeser <richardhaeser@gmail.com>
Tested-by: Richard Haeser <richardhaeser@gmail.com>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Build/Resources/Public/Less/TYPO3/_main_type.less
typo3/sysext/backend/Resources/Public/JavaScript/Notification.js
typo3/sysext/extensionmanager/Resources/Public/JavaScript/Main.js
typo3/sysext/t3skin/Resources/Public/Css/backend.css

index 6c2b490..cf5d905 100644 (file)
@@ -7,6 +7,9 @@
 .text-normal {
        font-weight: normal;
 }
+.text-pre-wrap {
+       white-space: pre-wrap;
+}
 
 //
 // Lead text
index b921871..4e60875 100644 (file)
@@ -174,7 +174,7 @@ define(['jquery'], function ($) {
                                        '</div>' +
                                        '<div class="media-body">' +
                                                '<h4 class="alert-title"></h4>' +
-                                               '<p class="alert-message"></p>' +
+                                               '<p class="alert-message text-pre-wrap"></p>' +
                                        '</div>' +
                                '</div>' +
                        '</div>'
index f5cf5a6..4895990 100644 (file)
@@ -504,14 +504,14 @@ define([
                                                });
                                        });
                                } else {
-                                       var successMessage = TYPO3.lang['extensionList.dependenciesResolveDownloadSuccess.message' + data.installationTypeLanguageKey].replace(/\{0\}/g, data.extension) + ' <br />';
-                                       successMessage += '<br /><h3>' + TYPO3.lang['extensionList.dependenciesResolveDownloadSuccess.header'] + ':</h3>';
+                                       var successMessage = TYPO3.lang['extensionList.dependenciesResolveDownloadSuccess.message' + data.installationTypeLanguageKey].replace(/\{0\}/g, data.extension);
+
+                                       successMessage += '\n' + TYPO3.lang['extensionList.dependenciesResolveDownloadSuccess.header'] + ': ';
                                        $.each(data.result, function(index, value) {
-                                               successMessage += TYPO3.lang['extensionList.dependenciesResolveDownloadSuccess.item'] + ' ' + index + ':<br /><ul>';
-                                               $.each(value, function(extkey, extdata) {
-                                                       successMessage += '<li>' + extkey + '</li>';
+                                               successMessage += '\n\n' + TYPO3.lang['extensionList.dependenciesResolveDownloadSuccess.item'] + ' ' + index + ': ';
+                                               $.each(value, function(extkey) {
+                                                       successMessage += '\n* ' + extkey
                                                });
-                                               successMessage += '</ul>';
                                        });
                                        top.TYPO3.Notification.info(TYPO3.lang['extensionList.dependenciesResolveFlashMessage.title' + data.installationTypeLanguageKey].replace(/\{0\}/g, data.extension), successMessage, 15);
                                        top.TYPO3.ModuleMenu.App.refreshMenu();
index 5886c6d..d36e0ec 100644 (file)
@@ -9138,6 +9138,9 @@ div#typo3-docbody {
 .text-normal {
   font-weight: normal;
 }
+.text-pre-wrap {
+  white-space: pre-wrap;
+}
 .lead {
   font-size: 1.25em;
 }