Skip to content

Commit

Permalink
[FIX] TIKA-Preview does not work on TYPO3 13.4+
Browse files Browse the repository at this point in the history
* Migrate ContextMenuActions.js to non jQuery version.
* Migrate to Fluid 4+
* Migrate to EXT:solr dev-main 2024.10.08 state

Fixes: #234
  • Loading branch information
dkd-kaehm committed Nov 8, 2024
1 parent 85885a9 commit 0e60e2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions Classes/ViewHelpers/Backend/IsStringViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

namespace ApacheSolrForTypo3\Tika\ViewHelpers\Backend;

use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper;

/**
Expand All @@ -37,15 +38,7 @@ public function initializeArguments(): void
$this->registerArgument('value', 'mixed', 'Value to be verified.', true);
}

/**
* This method decides if the condition is true or false
*
* @param array $arguments ViewHelper arguments to evaluate the condition for this ViewHelper.
*
* @noinspection PhpMissingReturnTypeInspection
* @noinspection PhpUnused
*/
protected static function evaluateCondition($arguments = null)
public static function verdict(array $arguments, RenderingContextInterface $renderingContext): bool
{
return is_string($arguments['value'] ?? null);
}
Expand Down
4 changes: 2 additions & 2 deletions Resources/Public/JavaScript/ContextMenuActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import $ from 'jquery';
class ContextMenuActions {


tikaPreview = function (table, uid) {
tikaPreview = function (table, uid, dataAttributes) {
if (table === 'sys_file') {

const configuration = {
title: 'Tika Preview',
content: $(this).data('action-url') + '&identifier=' + encodeURIComponent(uid).replace(/\*/g, '%2A'),
content: dataAttributes.actionUrl + '&identifier=' + encodeURIComponent(uid).replace(/\*/g, '%2A'),
size: Modal.sizes.large,
type: Modal.types.ajax
};
Expand Down

0 comments on commit 0e60e2f

Please sign in to comment.