From 726d8647833c254394a72e26ac557021a14c8f12 Mon Sep 17 00:00:00 2001
From: Patrick Broens <patrick@patrickbroens.nl>
Date: Sun, 22 Mar 2015 20:37:11 +0100
Subject: [PATCH] [TASK] Move new content element wizard configuration to
 css_styled_content

The configuration for the new content element wizard is defined in the
extension frontend. The content elements which are defined are specifically
to css_styled_content. For the new frontend rendering some content elements
will not be used anymore.

This patch moves this configuration from frontend to css_styled_content
in a seperated file

Resolves: #65901
Releases: master

Change-Id: Idea403c64775ccdf1dd792229e594a470ad72ff9
Reviewed-on: http://review.typo3.org/38007
Reviewed-by: Oliver Eglseder <oliver.eglseder@in2code.de>
Tested-by: Oliver Eglseder <oliver.eglseder@in2code.de>
Reviewed-by: Markus Sommer <markussom@posteo.de>
Tested-by: Markus Sommer <markussom@posteo.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
---
 .../Configuration/PageTS/modWizards.ts        | 130 ++++++++++++++++++
 .../css_styled_content/ext_localconf.php      |   3 +
 typo3/sysext/frontend/ext_localconf.php       | 123 -----------------
 3 files changed, 133 insertions(+), 123 deletions(-)
 create mode 100644 typo3/sysext/css_styled_content/Configuration/PageTS/modWizards.ts

diff --git a/typo3/sysext/css_styled_content/Configuration/PageTS/modWizards.ts b/typo3/sysext/css_styled_content/Configuration/PageTS/modWizards.ts
new file mode 100644
index 000000000000..981e008b531a
--- /dev/null
+++ b/typo3/sysext/css_styled_content/Configuration/PageTS/modWizards.ts
@@ -0,0 +1,130 @@
+mod.wizards.newContentElement {
+	renderMode = tabs
+	wizardItems {
+		common.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common
+		common.elements {
+			header {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/regular_header.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_description
+				tt_content_defValues {
+					CType = header
+				}
+			}
+
+			text {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/regular_text.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_description
+				tt_content_defValues {
+					CType = text
+				}
+			}
+
+			textpic {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/text_image_right.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_description
+				tt_content_defValues {
+					CType = textpic
+					imageorient = 17
+				}
+			}
+
+			image {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/images_only.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_description
+				tt_content_defValues {
+					CType = image
+				}
+			}
+
+			bullets {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/bullet_list.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_description
+				tt_content_defValues {
+					CType = bullets
+				}
+			}
+
+			table {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/table.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_description
+				tt_content_defValues {
+					CType = table
+				}
+			}
+		}
+
+		common.show = header,text,textpic,image,bullets,table
+
+		special.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special
+		special.elements {
+			uploads {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/filelinks.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_description
+				tt_content_defValues {
+					CType = uploads
+				}
+			}
+
+			menu {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/sitemap2.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_description
+				tt_content_defValues {
+					CType = menu
+					menu_type = 0
+				}
+			}
+
+			html {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/html.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_description
+				tt_content_defValues {
+					CType = html
+				}
+			}
+
+			div {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/div.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_description
+				tt_content_defValues {
+					CType = div
+				}
+			}
+
+			shortcut {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/shortcut.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_description
+				tt_content_defValues {
+					CType = shortcut
+				}
+			}
+		}
+
+		special.show = uploads,menu,html,div,shortcut
+
+		# dummy placeholder for forms group
+		forms.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms
+
+		plugins.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins
+		plugins.elements {
+			general {
+				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/user_defined.gif
+				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_title
+				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_description
+				tt_content_defValues.CType = list
+			}
+		}
+
+		plugins.show = *
+	}
+}
\ No newline at end of file
diff --git a/typo3/sysext/css_styled_content/ext_localconf.php b/typo3/sysext/css_styled_content/ext_localconf.php
index 5156bff99d72..20050a655a4b 100644
--- a/typo3/sysext/css_styled_content/ext_localconf.php
+++ b/typo3/sysext/css_styled_content/ext_localconf.php
@@ -24,3 +24,6 @@ $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php'][
 // Register for hook to show preview of tt_content element of CType="text" in page module
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['text'] =
 	\TYPO3\CMS\CssStyledContent\Hooks\PageLayoutView\TextPreviewRenderer::class;
+
+// Include new content elements to modWizards
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:css_styled_content/Configuration/PageTS/modWizards.ts">');
\ No newline at end of file
diff --git a/typo3/sysext/frontend/ext_localconf.php b/typo3/sysext/frontend/ext_localconf.php
index c342957b8c03..ba554b9f2798 100644
--- a/typo3/sysext/frontend/ext_localconf.php
+++ b/typo3/sysext/frontend/ext_localconf.php
@@ -49,129 +49,6 @@ if (TYPO3_MODE === 'FE') {
 	options.saveDocNew.sys_file = 0
 	options.disableDelete.sys_file = 1
 ');
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
-mod.wizards.newContentElement {
-	renderMode = tabs
-	wizardItems {
-		common.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common
-		common.elements {
-			header {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/regular_header.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_description
-				tt_content_defValues {
-					CType = header
-				}
-			}
-			text {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/regular_text.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_description
-				tt_content_defValues {
-					CType = text
-				}
-			}
-			textpic {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/text_image_right.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_description
-				tt_content_defValues {
-					CType = textpic
-					imageorient = 17
-				}
-			}
-			image {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/images_only.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_description
-				tt_content_defValues {
-					CType = image
-				}
-			}
-			bullets {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/bullet_list.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_description
-				tt_content_defValues {
-					CType = bullets
-				}
-			}
-			table {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/table.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_description
-				tt_content_defValues {
-					CType = table
-				}
-			}
-
-		}
-		common.show = header,text,textpic,image,bullets,table
-
-		special.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special
-		special.elements {
-			uploads {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/filelinks.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_description
-				tt_content_defValues {
-					CType = uploads
-				}
-			}
-			menu {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/sitemap2.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_description
-				tt_content_defValues {
-					CType = menu
-					menu_type = 0
-				}
-			}
-			html {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/html.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_description
-				tt_content_defValues {
-					CType = html
-				}
-			}
-			div {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/div.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_description
-				tt_content_defValues {
-					CType = div
-				}
-			}
-			shortcut {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/shortcut.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_description
-				tt_content_defValues {
-					CType = shortcut
-				}
-			}
-
-		}
-		special.show = uploads,menu,html,div,shortcut
-
-		# dummy placeholder for forms group
-		forms.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms
-
-		plugins.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins
-		plugins.elements {
-			general {
-				icon = EXT:frontend/Resources/Public/Icons/ContentElementWizard/user_defined.gif
-				title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_title
-				description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_description
-				tt_content_defValues.CType = list
-			}
-		}
-		plugins.show = *
-	}
-}
-
-');
 
 // Registering hooks for the treelist cache
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
-- 
GitLab