Browse Source

Move include of SearchInDocument.js to PageView

pull/605/head
Beatrycze Volk 1 month ago
parent
commit
5d6e3dc1e2
3 changed files with 2 additions and 18 deletions
  1. +1
    -0
      Classes/Plugin/PageView.php
  2. +1
    -18
      Classes/Plugin/Tools/SearchInDocumentTool.php
  3. +0
    -0
      Resources/Public/Javascript/PageView/SearchInDocument.js

+ 1
- 0
Classes/Plugin/PageView.php View File

@@ -97,6 +97,7 @@ class PageView extends \Kitodo\Dlf\Common\AbstractPlugin
'Resources/Public/Javascript/PageView/FulltextDownloadControl.js',
'Resources/Public/Javascript/PageView/FulltextControl.js',
'Resources/Public/Javascript/PageView/FullTextUtility.js',
'Resources/Public/Javascript/PageView/SearchInDocument.js',
'Resources/Public/Javascript/PageView/PageView.js'
];
// Viewer configuration.


+ 1
- 18
Classes/Plugin/Tools/SearchInDocumentTool.php View File

@@ -13,17 +13,15 @@
namespace Kitodo\Dlf\Plugin\Tools;

use Kitodo\Dlf\Common\Helper;
use TYPO3\CMS\Core\Page\PageRenderer;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\MathUtility;
use TYPO3\CMS\Core\Utility\PathUtility;

/**
* SearchInDocument tool for the plugin 'Toolbox' of the 'dlf' extension
*
* @author Sebastian Meyer <sebastian.meyer@slub-dresden.de>
* @author Alexander Bigga <alexander.bigga@slub-dresden.de>
* @author Beatrycze Volk <beatrycze.volk@slub-dresden.de>
* @package TYPO3
* @subpackage dlf
* @access public
@@ -52,8 +50,6 @@ class SearchInDocumentTool extends \Kitodo\Dlf\Common\AbstractPlugin
$this->conf = Helper::mergeRecursiveWithOverrule($this->cObj->data['conf'], $this->conf);
}

$this->addSearchInDocumentJS();

// Load current document.
$this->loadDocument();
if (
@@ -126,19 +122,6 @@ class SearchInDocumentTool extends \Kitodo\Dlf\Common\AbstractPlugin
}

/**
* Adds the JS files necessary for search in document
*
* @access protected
*
* @return void
*/
protected function addSearchInDocumentJS()
{
$pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
$pageRenderer->addJsFooterFile(PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($this->extKey)) . 'Resources/Public/Javascript/Search/SearchInDocument.js');
}

/**
* Get the encrypted Solr core name
*
* @access protected


Resources/Public/Javascript/Search/SearchInDocument.js → Resources/Public/Javascript/PageView/SearchInDocument.js View File


Loading…
Cancel
Save