From ff50124a085f1666c6ce1881c1a3e7f7cb14b2fe Mon Sep 17 00:00:00 2001 From: cybercraft Date: Tue, 1 Jan 2019 14:22:05 +0100 Subject: [PATCH 1/3] [TASK] Remove superfluous plugin configuration Change-Id: Ic0bbdadb58bc82e7b6c50712d36a4486ac55f5b7 Reviewed-on: https://review.typo3.org/59313 Reviewed-by: Jo Hasenau Tested-by: Jo Hasenau --- Configuration/TypoScript/DataProcessing/setup.typoscript | 2 -- Configuration/TypoScript/setup.typoscript | 2 -- ext_localconf.php | 8 -------- 3 files changed, 12 deletions(-) diff --git a/Configuration/TypoScript/DataProcessing/setup.typoscript b/Configuration/TypoScript/DataProcessing/setup.typoscript index 16103fe..7e7c61a 100644 --- a/Configuration/TypoScript/DataProcessing/setup.typoscript +++ b/Configuration/TypoScript/DataProcessing/setup.typoscript @@ -34,8 +34,6 @@ lib.gridelements.defaultGridSetup { } } -plugin.tx_gridelements_pi1 > -tt_content.gridelements_pi1 > tt_content.gridelements_pi1 < lib.gridelements.defaultGridSetup tt_content.gridelements_view < tt_content.gridelements_pi1 diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 872e01f..7ed51c9 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -25,8 +25,6 @@ lib.gridelements.defaultGridSetup { # or tx_gridelements_view_child_123 (123 is the UID of the child) } -plugin.tx_gridelements_pi1 > -tt_content.gridelements_pi1 > tt_content.gridelements_pi1 = COA tt_content.gridelements_pi1 { #10 =< lib.stdheader diff --git a/ext_localconf.php b/ext_localconf.php index eb5ace2..df4778d 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -21,13 +21,5 @@ options.saveDocNew.tx_gridelements_backend_layout=1 '); -\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43( - $_EXTKEY, - 'Classes/Plugin/Gridelements.php', - '_pi1', - 'CType', - 1 -); - $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class); $signalSlotDispatcher->connect(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::class, 'tcaIsBeingBuilt', \GridElementsTeam\Gridelements\Slots\ExtTablesInclusionPostProcessing::class, 'processData'); From e42fa6a7d1737f608dc3e0ea4ca8e7a4920fefb1 Mon Sep 17 00:00:00 2001 From: cybercraft Date: Tue, 1 Jan 2019 14:47:54 +0100 Subject: [PATCH 2/3] [TASK] Adjust version numbers Change-Id: Ic68316e2660007629fc7e2b0ff07a44fb224d956 Reviewed-on: https://review.typo3.org/59317 Reviewed-by: Jo Hasenau Tested-by: Jo Hasenau --- composer.json | 10 +++++----- ext_emconf.php | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index e6de27c..2ad717d 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "gridelementsteam/gridelements", "description": "This extension integrates the grid layout concept also to regular content elements - the grid elements. It offers a lot of new features like advanced drag & drop or real references, that improve the usability of the page and list module to speed up the daily work with the backend.", "type": "typo3-cms-extension", - "version": "9.0.0-dev", + "version": "9.1.0-dev", "prefer-stable": true, "minimum-stability": "dev", "keywords": ["TYPO3 CMS", "Grids", "Gridelements"], @@ -12,10 +12,10 @@ "issues": "https://forge.typo3.org/projects/extension-gridelements2/issues" }, "require": { - "typo3/cms-core": "^9.3 || dev-master", - "typo3/cms-backend": "^9.3 || dev-master", - "typo3/cms-recordlist": "^9.3 || dev-master", - "typo3/cms-frontend": "^9.3 || dev-master" + "typo3/cms-core": "^9.5 || dev-master", + "typo3/cms-backend": "^9.5 || dev-master", + "typo3/cms-recordlist": "^9.5 || dev-master", + "typo3/cms-frontend": "^9.5 || dev-master" }, "conflict": { "templavoila": "*", diff --git a/ext_emconf.php b/ext_emconf.php index c269273..d649378 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -13,7 +13,7 @@ 'description' => 'This extension integrates the grid layout concept also to regular content elements - the grid elements. It offers a lot of new features like advanced drag & drop or real references, that improve the usability of the page and list module to speed up the daily work with the backend.', 'category' => 'be', - 'version' => '9.0.0-dev', + 'version' => '9.1.0-dev', 'priority' => 'bottom', 'module' => '', 'state' => 'beta', @@ -26,10 +26,10 @@ 'author_company' => '', 'constraints' => [ 'depends' => [ - 'typo3' => '9.3.0-9.99.99', - 'backend' => '9.3.0-9.99.99', - 'recordlist' => '9.3.0-9.99.99', - 'frontend' => '9.3.0-9.99.99' + 'typo3' => '9.5.0-9.99.99', + 'backend' => '9.5.0-9.99.99', + 'recordlist' => '9.5.0-9.99.99', + 'frontend' => '9.5.0-9.99.99' ], 'conflicts' => [ 'templavoila' => '', From 50a1ee6965445938726ca33c423d30a29adaf0a6 Mon Sep 17 00:00:00 2001 From: cybercraft Date: Tue, 11 Dec 2018 10:50:38 +0100 Subject: [PATCH 3/3] [BUGFIX] Check data-url since it might be undefined Change-Id: I650efab31c55485aa26c507089142e650f7df769 Reviewed-on: https://review.typo3.org/59318 Reviewed-by: Jo Hasenau Tested-by: Jo Hasenau --- .../JavaScript/GridElementsDragInWizard.js | 196 +++++++++--------- 1 file changed, 99 insertions(+), 97 deletions(-) diff --git a/Resources/Public/JavaScript/GridElementsDragInWizard.js b/Resources/Public/JavaScript/GridElementsDragInWizard.js index 2d3dfbd..c88f7ea 100644 --- a/Resources/Public/JavaScript/GridElementsDragInWizard.js +++ b/Resources/Public/JavaScript/GridElementsDragInWizard.js @@ -18,119 +18,121 @@ define(['jquery', 'TYPO3/CMS/Gridelements/GridElementsDragDrop', 'jquery-ui/draggable', 'jquery-ui/droppable'], function ($, DragDrop) { - var DragInWizard = { - wizardUrl: '', - wizardIdentifier: 'new-element-drag-in-wizard' - }; + var DragInWizard = { + wizardUrl: '', + wizardIdentifier: 'new-element-drag-in-wizard' + }; - /** - * initializes Drag+Drop for all content elements on the page - */ - DragInWizard.initialize = function () { - if ($('.t3js-module-body').length && $('.t3js-page-new-ce a').first()) { - DragInWizard.getWizardUrl(); - if (DragInWizard.wizardUrl !== '') { - DragInWizard.createToggleIcon(); - } - } - }; + /** + * initializes Drag+Drop for all content elements on the page + */ + DragInWizard.initialize = function () { + if ($('.t3js-module-body').length && $('.t3js-page-new-ce a').first()) { + DragInWizard.getWizardUrl(); + if (DragInWizard.wizardUrl !== '') { + DragInWizard.createToggleIcon(); + } + } + }; - /** - * get the URL for the new element wizard the correct module token - */ - DragInWizard.getWizardUrl = function () { - var $newCeLink = $('.t3js-toggle-new-content-element-wizard').first(); - var originalWizardUrl = $newCeLink.data('url').split('\&', 4); - if (typeof originalWizardUrl !== 'undefined') { - DragInWizard.wizardUrl = originalWizardUrl[0] + '&' + originalWizardUrl[1] + '&' + originalWizardUrl[2]; - } - }; + /** + * get the URL for the new element wizard the correct module token + */ + DragInWizard.getWizardUrl = function () { + var $newCeLink = $('.t3js-toggle-new-content-element-wizard').first(); + if (typeof $newCeLink.data('url') !== 'undefined') { + var originalWizardUrl = $newCeLink.data('url').split('\&', 4); + } + if (typeof originalWizardUrl !== 'undefined') { + DragInWizard.wizardUrl = originalWizardUrl[0] + '&' + originalWizardUrl[1] + '&' + originalWizardUrl[2]; + } + }; - /** - * create a new icon to make toggling the drag in wizard possible - */ - DragInWizard.createToggleIcon = function () { - var lastIcon = $('.module-docheader-bar-column-left .btn-group .icon').last().parent(); - var addNewIcon = $('.t3js-toggle-new-content-element-wizard').first(); - var newIcon = addNewIcon.clone().attr('class', 'btn btn-default btn-sm t3js-toggle-new-content-element-wizard').insertAfter(lastIcon); - newIcon.contents().filter(function () { - return (this.nodeType === 3); - }).remove(); - newIcon.attr('title', 'Toggle Drag In Wizard'); - newIcon.click(function () { - top.dragInWizardActive = !top.dragInWizardActive; - DragInWizard.toggleWizard(); - $(this).blur(); - return false; - }); - if (top.dragInWizardActive) { - DragInWizard.toggleWizard(); - } - }; + /** + * create a new icon to make toggling the drag in wizard possible + */ + DragInWizard.createToggleIcon = function () { + var lastIcon = $('.module-docheader-bar-column-left .btn-group .icon').last().parent(); + var addNewIcon = $('.t3js-toggle-new-content-element-wizard').first(); + var newIcon = addNewIcon.clone().attr('class', 'btn btn-default btn-sm t3js-toggle-new-content-element-wizard').insertAfter(lastIcon); + newIcon.contents().filter(function () { + return (this.nodeType === 3); + }).remove(); + newIcon.attr('title', 'Toggle Drag In Wizard'); + newIcon.click(function () { + top.dragInWizardActive = !top.dragInWizardActive; + DragInWizard.toggleWizard(); + $(this).blur(); + return false; + }); + if (top.dragInWizardActive) { + DragInWizard.toggleWizard(); + } + }; - /** - * load and/or activate the new item wizard on click - */ - DragInWizard.toggleWizard = function () { - var $wizard = $('#' + DragInWizard.wizardIdentifier); - if ($wizard.length) { - if (!$wizard.hasClass('active')) { - $wizard.show(); - $wizard.addClass('active'); - } else { + /** + * load and/or activate the new item wizard on click + */ + DragInWizard.toggleWizard = function () { + var $wizard = $('#' + DragInWizard.wizardIdentifier); + if ($wizard.length) { + if (!$wizard.hasClass('active')) { + $wizard.show(); + $wizard.addClass('active'); + } else { $wizard.removeClass('active'); - setTimeout(function() { + setTimeout(function () { $wizard.hide(); }, 800); - } - } else { - $wizard = $('
'); - $('.t3js-module-docheader').append($wizard); - $wizard.load(DragInWizard.wizardUrl + ' #new-content-element-wizard-carousel div[role=\'tabpanel\']:first', function () { - DragInWizard.makeItemsDraggable(); - DragInWizard.rearrangeItems(); - }); + } + } else { + $wizard = $('
'); + $('.t3js-module-docheader').append($wizard); + $wizard.load(DragInWizard.wizardUrl + ' #new-content-element-wizard-carousel div[role=\'tabpanel\']:first', function () { + DragInWizard.makeItemsDraggable(); + DragInWizard.rearrangeItems(); + }); if (!$wizard.hasClass('active')) { $wizard.show(); $wizard.addClass('active'); } else { $wizard.removeClass('active'); - setTimeout(function() { + setTimeout(function () { $wizard.hide(); }, 800); } - } - }; + } + }; - /** - * make wizard items draggable so they can be dragged into content columns - */ - DragInWizard.makeItemsDraggable = function () { - $('#' + DragInWizard.wizardIdentifier + ' .panel-body .media').attr('language-uid', 0).find('.media-left img').addClass('t3js-page-ce-draghandle').parent().addClass('t3-page-ce-dragitem t3-page-ce-header-draggable').closest('.media').addClass('t3js-page-ce t3js-page-ce-draggable'); - DragDrop.default.initialize(); - }; + /** + * make wizard items draggable so they can be dragged into content columns + */ + DragInWizard.makeItemsDraggable = function () { + $('#' + DragInWizard.wizardIdentifier + ' .panel-body .media').attr('language-uid', 0).find('.media-left img').addClass('t3js-page-ce-draghandle').parent().addClass('t3-page-ce-dragitem t3-page-ce-header-draggable').closest('.media').addClass('t3js-page-ce t3js-page-ce-draggable'); + DragDrop.default.initialize(); + }; - /** - * rearrange wizard items, so only icons will remain as the draggable part - */ - DragInWizard.rearrangeItems = function () { - var panel = $('#' + DragInWizard.wizardIdentifier + ' .t3js-tabs'); - $('#' + DragInWizard.wizardIdentifier + ' .media').each(function () { - $(this).find('.media-left').addClass('t3-ctype-identifier'); - var description = $(this).find('.media-body'); - description = description.appendTo($(this).parent()).hide(); - $(this).find('.media-left').on('mouseenter', function () { - description.show() - }).on('mouseleave', function () { - description.hide() - }); - }); - var descriptionWidth = panel.width() - 50; - var description = $('#' + DragInWizard.wizardIdentifier + ' .media-body'); - description.width(descriptionWidth); - $('#' + DragInWizard.wizardIdentifier + ' .media-left input').parent().remove(); - }; + /** + * rearrange wizard items, so only icons will remain as the draggable part + */ + DragInWizard.rearrangeItems = function () { + var panel = $('#' + DragInWizard.wizardIdentifier + ' .t3js-tabs'); + $('#' + DragInWizard.wizardIdentifier + ' .media').each(function () { + $(this).find('.media-left').addClass('t3-ctype-identifier'); + var description = $(this).find('.media-body'); + description = description.appendTo($(this).parent()).hide(); + $(this).find('.media-left').on('mouseenter', function () { + description.show() + }).on('mouseleave', function () { + description.hide() + }); + }); + var descriptionWidth = panel.width() - 50; + var description = $('#' + DragInWizard.wizardIdentifier + ' .media-body'); + description.width(descriptionWidth); + $('#' + DragInWizard.wizardIdentifier + ' .media-left input').parent().remove(); + }; - $(DragInWizard.initialize); - return DragInWizard; + $(DragInWizard.initialize); + return DragInWizard; });