Project

General

Profile

Actions

Feature #24627

closed

Pagetree - Add "paste into" and "paste after" to the context menu (from clipboard)

Added by Stefan Galinski almost 14 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-01-17
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.3
Tags:
Complexity:
Sprint Focus:

Description

When the normal clipboard (accessible through the Web>List module) contains elements, the context menu on pages has a new entry called "Paste into". If the element in the clipboard is a page, we have "Paste into" and "Paste after". This also respects the current setting of the clipboard ("Copy" or "Move").

This should be implemented in the new context menus that we have in the new page tree, as this is a missing feature from the old tree.

Copied from a mail of Ernesto regarding this topic:

Im alten Click-Menu (alt_clickmenu.php) geht das so:

In main() wird der Clipboard vorbereitet und der "normale Clipboard" aktiviert (wo nur ein Element rein passt, a la Windows):

// Initialize Clipboard object: $clipObj = t3lib_div::makeInstance('t3lib_clipboard'); $clipObj->initializeClipboard(); $clipObj->lockToNormal(); // This locks the clipboard to the Normal for this request.

Hier kommt die Entscheidung, ob es was zu pasten gibt. "Pages" haben die Besonderheit, dass man "Paste after" und "Paste into" machen kann, alle anderen einfach nur "Paste into":

// Paste: $elFromAllTables = count($this->clipObj->elFromTable('')); if (!in_array('paste',$this->disabledItems) && $elFromAllTables) { $selItem = $this->clipObj->getSelectedRecord(); $elInfo=array(

t3lib_div::fixed_lgd_cs($selItem['_RECORD_TITLE'],$BE_USER->uc['titleLen'] ), ($root?$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']:t3lib_div::fixed_lgd _cs(t3lib_BEfunc::getRecordTitle($table,$this->rec),$BE_USER->uc['titleLen' ])), $this->clipObj->currentMode() ); if ($table=='pages' && ($lCP & 8)) { if ($elFromAllTables) $menuItems['pasteinto']=$this->DB_paste('',$uid,'into',$elInfo); }

$elFromTable = count($this->clipObj->elFromTable($table)); if (!$root && !$DBmount && $elFromTable && $TCA[$table]['ctrl']['sortby']) $menuItems['pasteafter']=$this->DB_paste($table,-$uid,'after',$elInfo); }

Die "Aktion" ist dann einfach diese URL aufzurufen:

$this->clipObj->pasteUrl($table, $uid, 0)

(issue imported from #M17099)


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #25035: It is no longer possible to "copy" and "paste into" page recordsClosed2011-02-14

Actions
Actions #1

Updated by Stefan Galinski almost 13 years ago

  • Assignee deleted (Stefan Galinski)
Actions #2

Updated by Felix Kopp almost 10 years ago

  • Description updated (diff)
  • Status changed from Accepted to Closed
  • Target version deleted (0)

Hi Stefan,

since the page tree implements drag+drop functionality I guess there will be no further development for this clickmenu improvement.
Thanks for the concept and time, Stefan.

Closed due to inactivity

Actions

Also available in: Atom PDF