Skip to content

Commit db6112f

Browse files
[TASK] Pass dataset to context menu actions and drop jQuery in them
The context menu module now passes the dataset bound to a context menu item to the respective callback action, excluding `callback-action` and `callback-module`. The context menu items bound to `this` in the respective callback actions are not required anymore, allowing to ditch jQuery in the `context-menu-actions` modules. For this reason, binding the context menu item to `this` is deprecated, usages will trigger a deprecation log entry in the browser's console. Resolves: #98168 Releases: main Change-Id: Ibaf3c5b343323dcd29bd9aae3212ebcee91d83ef Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75491 Tested-by: Benjamin Franzke <[email protected]> Tested-by: core-ci <[email protected]> Tested-by: Christian Kuhn <[email protected]> Tested-by: Andreas Fernandez <[email protected]> Reviewed-by: Benjamin Franzke <[email protected]> Reviewed-by: Christian Kuhn <[email protected]> Reviewed-by: Andreas Fernandez <[email protected]>
1 parent 870bdd2 commit db6112f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Resources/Public/JavaScript/context-menu-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
*
1111
* The TYPO3 project - inspiring people to share!
1212
*/
13-
import $ from"jquery";class ContextMenuActions{exportT3d(t,e){const n=$(this).data("action-url");"pages"===t?top.TYPO3.Backend.ContentContainer.setUrl(n+"&id="+e+"&tx_impexp[pagetree][id]="+e+"&tx_impexp[pagetree][levels]=0&tx_impexp[pagetree][tables][]=_ALL"):top.TYPO3.Backend.ContentContainer.setUrl(n+"&tx_impexp[record][]="+t+":"+e+"&tx_impexp[external_ref][tables][]=_ALL")}importT3d(t,e){const n=$(this).data("action-url");top.TYPO3.Backend.ContentContainer.setUrl(n+"&id="+e+"&table="+t)}}export default new ContextMenuActions;
13+
class ContextMenuActions{exportT3d(e,t,n){const o=n.actionUrl;"pages"===e?top.TYPO3.Backend.ContentContainer.setUrl(o+"&id="+t+"&tx_impexp[pagetree][id]="+t+"&tx_impexp[pagetree][levels]=0&tx_impexp[pagetree][tables][]=_ALL"):top.TYPO3.Backend.ContentContainer.setUrl(o+"&tx_impexp[record][]="+e+":"+t+"&tx_impexp[external_ref][tables][]=_ALL")}importT3d(e,t,n){const o=n.actionUrl;top.TYPO3.Backend.ContentContainer.setUrl(o+"&id="+t+"&table="+e)}}export default new ContextMenuActions;

0 commit comments

Comments
 (0)