Skip to content

Commit

Permalink
* new feature: add support for extension lib_jquery to include the jq…
Browse files Browse the repository at this point in the history
…uery-1.10.0.min.js library in many versions.
  • Loading branch information
franzholz committed Jan 8, 2020
1 parent 7d1a5dd commit bc02ea8
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 17 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

2020-01-08 Franz Holzinger <franz@ttproducts.de>
* 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 <franz@ttproducts.de>
* compatibility TYPO3 7.5, deprecation 69057: replace \TYPO3\CMS\Backend\Utility\IconUtility::skinImg by TYPO3\CMS\Core\Imaging\IconFactory
* deprecation 79259: EXT:t3skin removed
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.


3 changes: 2 additions & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '',
Expand All @@ -41,6 +41,7 @@
'conflicts' => array(
),
'suggests' => array(
'lib_jquery' => '2.1.0-0.0.0',
'patchlayout' => '0.0.1-0.1.9',
),
),
Expand Down
54 changes: 41 additions & 13 deletions pi1/class.tx_jfmulticontent_pi1.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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']);
Expand All @@ -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') {
Expand All @@ -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) . "}";
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit bc02ea8

Please sign in to comment.