-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5677a79
commit 488084f
Showing
5 changed files
with
36 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
return [ | ||
'dependencies' => [ | ||
'backend', | ||
], | ||
'tags' => [ | ||
'backend.contextmenu', | ||
], | ||
'imports' => [ | ||
'TYPO3/CMS/Tika/' => 'EXT:tika/Resources/Public/JavaScript/', | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,23 @@ | ||
/** | ||
* Module: TYPO3/CMS/Tika/ContextMenuActions | ||
* | ||
* JavaScript to handle import/export actions from context menu | ||
* @exports TYPO3/CMS/Tika/ContextMenuActions | ||
*/ | ||
define(function () { | ||
'use strict'; | ||
import Modal from "@typo3/backend/modal.js"; | ||
import $ from 'jquery'; | ||
|
||
/** | ||
* @exports TYPO3/CMS/Tika/ContextMenuActions | ||
*/ | ||
const ContextMenuActions = {}; | ||
class ContextMenuActions { | ||
|
||
ContextMenuActions.tikaPreview = function (table, uid) { | ||
if (table === 'sys_file') { | ||
|
||
require([ | ||
'jquery', | ||
'TYPO3/CMS/Backend/Modal' | ||
], function ($, Modal) { | ||
tikaPreview = function (table, uid) { | ||
if (table === 'sys_file') { | ||
|
||
const configuration = { | ||
title: 'Tika Preview', | ||
content: top.TYPO3.settings.TikaPreview.moduleUrl + '&identifier=' + encodeURIComponent(uid).replace(/\*/g, '%2A'), | ||
size: Modal.sizes.large, | ||
type: Modal.types.ajax | ||
}; | ||
Modal.advanced(configuration); | ||
}); | ||
const configuration = { | ||
title: 'Tika Preview', | ||
content: $(this).data('action-url') + '&identifier=' + encodeURIComponent(uid).replace(/\*/g, '%2A'), | ||
size: Modal.sizes.large, | ||
type: Modal.types.ajax | ||
}; | ||
Modal.advanced(configuration); | ||
} | ||
|
||
}; | ||
|
||
return ContextMenuActions; | ||
}); | ||
} | ||
|
||
export default new ContextMenuActions(); |