Skip to content

Commit

Permalink
[TASK] Remove FileDragProvider
Browse files Browse the repository at this point in the history
The FileDragProvider was a special provider, only
used in the "legacy" FileList tree. As this tree was
already replaced by the svg tree, the provider is
now removed.

Resolves: #94523
Releases: master
Change-Id: I2536cfe8fd9fbd92704b4cd7ea66c0fb3143d070
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69801
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Jochen <rothjochen@gmail.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Jochen <rothjochen@gmail.com>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
  • Loading branch information
o-ba committed Jul 12, 2021
1 parent 3e1ea9b commit e51c76c
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 89 deletions.
Expand Up @@ -228,24 +228,6 @@ class ContextMenuActions {
Modal.dismiss();
});
}

public static dropInto(table: string, uid: string, mode: string): void {
const target = $(this).data('drop-target');
top.TYPO3.Backend.ContentContainer.setUrl(
top.TYPO3.settings.FileCommit.moduleUrl
+ '&file[' + mode + '][0][data]=' + encodeURIComponent(uid)
+ '&file[' + mode + '][0][target]=' + encodeURIComponent(target)
+ '&redirect=' + ContextMenuActions.getReturnUrl(),
);
}

public static dropMoveInto(table: string, uid: string): void {
ContextMenuActions.dropInto.bind($(this))(table, uid, 'move');
}

public static dropCopyInto(table: string, uid: string): void {
ContextMenuActions.dropInto.bind($(this))(table, uid, 'copy');
}
}

export = ContextMenuActions;
Expand Up @@ -156,8 +156,7 @@ class RecordProvider extends AbstractProvider
*/
public function canHandle(): bool
{
if (in_array($this->table, ['sys_file', 'pages'], true)
|| strpos($this->table, '-drag') !== false) {
if (in_array($this->table, ['sys_file', 'pages'], true)) {
return false;
}
return isset($GLOBALS['TCA'][$this->table]);
Expand Down

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion typo3/sysext/filelist/ext_localconf.php
Expand Up @@ -3,5 +3,4 @@
defined('TYPO3') or die();

$GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418731] = \TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileProvider::class;
$GLOBALS['TYPO3_CONF_VARS']['BE']['ContextMenu']['ItemProviders'][1486418734] = \TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileDragProvider::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/backend.php']['constructPostProcess'][] = \TYPO3\CMS\Filelist\Hook\BackendControllerHook::class . '->addJavaScript';
2 changes: 1 addition & 1 deletion typo3/sysext/impexp/Classes/ContextMenu/ItemProvider.php
Expand Up @@ -50,7 +50,7 @@ class ItemProvider extends AbstractProvider
*/
public function canHandle(): bool
{
return $this->table !== 'sys_file' && strpos($this->table, '-drag') === false;
return $this->table !== 'sys_file';
}

/**
Expand Down

0 comments on commit e51c76c

Please sign in to comment.