diff --git a/ChangeLog b/ChangeLog index e3ec7e1..cf73ff6 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ +2020-01-08 Franz Holzinger + * new feature: add support for extension lib_jquery to include the jquery-1.10.0.min.js library in many versions. + 2020-01-04 Franz Holzinger * compatibility TYPO3 7.5, deprecation 69057: replace \TYPO3\CMS\Backend\Utility\IconUtility::skinImg by TYPO3\CMS\Core\Imaging\IconFactory * deprecation 79259: EXT:t3skin removed diff --git a/README.md b/README.md index c48a924..2d2ac3b 100755 --- a/README.md +++ b/README.md @@ -6,12 +6,16 @@ I have developed the existing jfmulticontent extension for the TYPO3 version 8.7 The upgrade script must be executed in the Install Tool or in the Extension Manager once. All the flexform sheet names must have a leading 's_'. This transformation is done in the update script. Older versions of this extension require some more modifications, which the Extension Manager update script will perform. -The extension t3jquery seems not to exist any more and TYPO3 10 will provide jQuery for extensions. Any support for t3jquery will therefore be dropped soon. +## Third Party Extennsions +The extension t3jquery seems not to exist any more and TYPO3 10 will provide jQuery for extensions. Any support for t3jquery shall therefore be dropped in a later version. +Now you can use the extension lib_jquery. In this case its jquery-x.min.js library will be used automatically. +TYPO3 8 and later require the extension patchlayout to be installed. + +## Contributions Any contributions are welcome. Just create an issue or write a pull request. -TYPO3 8 and later require the extension patchlayout to be installed. ## TSConfig Requirement @@ -22,6 +26,6 @@ TCEFORM.tt_content.tx_jfmulticontent_contents.PAGE_TSCONFIG_ID = 17 ``` -The starting point page record in the plugin is not used any more. +The starting point page record in the plugin is not existing any more. diff --git a/ext_emconf.php b/ext_emconf.php index 0fd999a..0c59cfe 100755 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -15,7 +15,7 @@ 'description' => 'Arranges multiple contents into one content element with multiple columns, accordions, tabs, slider, slidedeck, easyAccordion or Booklet (Sponsored by http://www.made-in-nature.de/typo3-agentur.html). This extension will also extend tt_news with two new lists.', 'category' => 'plugin', 'shy' => 0, - 'version' => '2.11.0', + 'version' => '2.11.1', 'dependencies' => '', 'conflicts' => '', 'priority' => '', @@ -41,6 +41,7 @@ 'conflicts' => array( ), 'suggests' => array( + 'lib_jquery' => '2.1.0-0.0.0', 'patchlayout' => '0.0.1-0.1.9', ), ), diff --git a/pi1/class.tx_jfmulticontent_pi1.php b/pi1/class.tx_jfmulticontent_pi1.php index 53a3956..dfeea87 100755 --- a/pi1/class.tx_jfmulticontent_pi1.php +++ b/pi1/class.tx_jfmulticontent_pi1.php @@ -76,6 +76,10 @@ public function main ($content, $conf) $tsfe = $this->getTypoScriptFrontendController(); $this->setFlexFormData(); + $jQueryAvailable = false; + if (class_exists(\Sonority\LibJquery\Hooks\PageRenderer::class)) { + $jQueryAvailable = true; + } // get the config from EXT $this->confArr = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][JFMULTICONTENT_EXT]; @@ -842,8 +846,13 @@ public function main ($content, $conf) } // Add Cookies script, if cookie is active - if ($this->conf['config.']['tabCookieExpires'] > 0 && $this->conf['config.']['tabOpen'] != -1) { - if (T3JQUERY !== true) { + if ( + $this->conf['config.']['tabCookieExpires'] > 0 && + $this->conf['config.']['tabOpen'] != -1 + ) { + if ($jQueryAvailable) { + // nothing + } else if (T3JQUERY !== true) { $this->pagerenderer->addJsFile($this->conf['jQueryCookies']); } unset($options['active']); @@ -864,9 +873,9 @@ public function main ($content, $conf) $fx[] = "duration:'{$this->conf['config.']['tabHideTransitionduration']}'"; } if ($this->conf['config.']['tabHideTransition']) { - $fx[] = "easing:'".(in_array($this->conf['config.']['tabHideTransition'], array("swing", "linear")) ? "" : "ease{$this->conf['config.']['tabHideTransitiondir']}")."{$this->conf['config.']['tabHideTransition']}'"; + $fx[] = "easing:'" . (in_array($this->conf['config.']['tabHideTransition'], array("swing", "linear")) ? "" : "ease{$this->conf['config.']['tabHideTransitiondir']}") . "{$this->conf['config.']['tabHideTransition']}'"; } - $options['hide'] = "hide:{".implode(', ', $fx)."}"; + $options['hide'] = "hide:{" . implode(', ', $fx) . "}"; } if ($this->conf['config.']['tabShowEffect'] == 'none') { @@ -878,7 +887,7 @@ public function main ($content, $conf) $fx[] = "duration:'{$this->conf['config.']['tabShowTransitionduration']}'"; } if ($this->conf['config.']['tabShowTransition']) { - $fx[] = "easing:'".(in_array($this->conf['config.']['tabShowTransition'], array("swing", "linear")) ? "" : "ease{$this->conf['config.']['tabShowTransitiondir']}") . "{$this->conf['config.']['tabShowTransition']}'"; + $fx[] = "easing:'" . (in_array($this->conf['config.']['tabShowTransition'], array("swing", "linear")) ? "" : "ease{$this->conf['config.']['tabShowTransitiondir']}") . "{$this->conf['config.']['tabShowTransition']}'"; } $options['show'] = "show:{" . implode(', ', $fx) . "}"; } @@ -922,7 +931,10 @@ public function main ($content, $conf) $templateCode = $parser->substituteMarkerArray($templateCode, $markerArray, '###|###', 0); // Add all CSS and JS files - if (T3JQUERY === true) { + if ($jQueryAvailable) { + $this->pagerenderer->addJsFile($this->conf['jQueryEasing']); + $this->pagerenderer->addJsFile($this->conf['jQueryUI']); + } else if (T3JQUERY === true) { tx_t3jquery::addJqJS(); } else { $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true); @@ -976,9 +988,9 @@ public function main ($content, $conf) $fx[] = "duration:'{$this->conf['config.']['accordionTransitionduration']}'"; } if ($this->conf['config.']['accordionTransition']) { - $fx[] = "easing:'".(in_array($this->conf['config.']['accordionTransition'], array("swing", "linear")) ? "" : "ease{$this->conf['config.']['accordionTransitiondir']}")."{$this->conf['config.']['accordionTransition']}'"; + $fx[] = 'easing:\'' . (in_array($this->conf['config.']['accordionTransition'], array('swing', 'linear')) ? '' : 'ease' . $this->conf['config.']['accordionTransitiondir']) . $this->conf['config.']['accordionTransition'] . '\''; } - $options['animate'] = "animate:{".implode(', ', $fx)."}"; + $options['animate'] = 'animate:{' . implode(', ', $fx) . '}'; } // app the open-link-template @@ -1012,7 +1024,11 @@ public function main ($content, $conf) $templateCode = $parser->substituteMarkerArray($templateCode, $markerArray, '###|###', 0); // Add all CSS and JS files - if (T3JQUERY === true) { + + if ($jQueryAvailable) { + $this->pagerenderer->addJsFile($this->conf['jQueryEasing']); + $this->pagerenderer->addJsFile($this->conf['jQueryUI']); + } else if (T3JQUERY === true) { tx_t3jquery::addJqJS(); } else { $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true); @@ -1139,7 +1155,10 @@ public function main ($content, $conf) $templateCode = $parser->substituteMarkerArray($templateCode, $markerArray, '###|###', 0); // Add all CSS and JS files - if (T3JQUERY === true) { + + if ($jQueryAvailable) { + $this->pagerenderer->addJsFile($this->conf['jQueryEasing']); + } else if (T3JQUERY === true) { tx_t3jquery::addJqJS(); } else { $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true); @@ -1200,7 +1219,10 @@ public function main ($content, $conf) $templateCode = $parser->substituteMarkerArray($templateCode, $markerArray, '###|###', 0); // Add all CSS and JS files - if (T3JQUERY === true) { + + if ($jQueryAvailable) { + $this->pagerenderer->addJsFile($this->conf['jQueryEasing']); + } else if (T3JQUERY === true) { tx_t3jquery::addJqJS(); } else { $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true); @@ -1249,7 +1271,10 @@ public function main ($content, $conf) $templateCode = $parser->substituteMarkerArray($templateCode, $markerArray, '###|###', 0); // Add all CSS and JS files - if (T3JQUERY === true) { + + if ($jQueryAvailable) { + // nothing + } else if (T3JQUERY === true) { tx_t3jquery::addJqJS(); } else { $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true); @@ -1323,7 +1348,10 @@ public function main ($content, $conf) $templateCode = $parser->substituteMarkerArray($templateCode, $markerArray, '###|###', 0); // Add all CSS and JS files - if (T3JQUERY === true) { + + if ($jQueryAvailable) { + $this->pagerenderer->addJsFile($this->conf['jQueryEasing']); + } else if (T3JQUERY === true) { tx_t3jquery::addJqJS(); } else { $this->pagerenderer->addJsFile($this->conf['jQueryLibrary'], true);