Move include of SearchInDocument.js to PageView
This commit is contained in:
부모
4d9a1ffec0
커밋
5d6e3dc1e2
|
@ -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.
|
||||
|
|
|
@ -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 (
|
||||
|
@ -125,19 +121,6 @@ class SearchInDocumentTool extends \Kitodo\Dlf\Common\AbstractPlugin
|
|||
return $this->pi_wrapInBaseClass($content);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
|
|
불러오는 중...
Reference in New Issue