2008-01-15 Benjamin Mack <mack@xnos.org>
- * (cleanup) #6958: added comments in t3lib_htmlmail.php, used foreach and some better variable namings
+ * (bugfix) #2936, 5613: Improvements to clipboard copy/move selection (by Bernhard Kraft)
+ * (cleanup) #6958: added comments in t3lib_htmlmail.php, used foreach and some better variable namings (thanks to Stefano Cecere and Steffen Kamper)
* (bugfix) #5482:t3lib_htmlmail.php is now initialized with empty variables
2008-01-15 Dmitry Dulepov <dmitry@typo3.org>
// Button/menu header:
$thumb_url = t3lib_div::linkThisScript(array('CB'=>array('setThumb'=>$this->clipData['_setThumb']?0:1)));
- $copymode_url = t3lib_div::linkThisScript(array('CB'=>array('setCopyMode'=>($this->currentMode()=='copy'?'':'copy'))));
$rmall_url = t3lib_div::linkThisScript(array('CB'=>array('removeAll'=>$this->current)));
+
+ // Copymode Selector menu
+ $copymode_url = t3lib_div::linkThisScript();
+ $moveLabel = htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.php:moveElements'));
+ $copyLabel = htmlspecialchars($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_misc.php:copyElements'));
+ $opt=array();
+ $opt[]='<option style="padding-left: 20px; background-image: url(\''.t3lib_iconWorks::skinImg($this->backPath, 'gfx/clip_cut.gif', '', 1).'\'); background-repeat: no-repeat;" value="" '.(($this->currentMode()=='copy')?'':'selected="selected"').'>'.$moveLabel .'</option>';
+ $opt[]='<option style="padding-left: 20px; background-image: url(\''.t3lib_iconWorks::skinImg($this->backPath, 'gfx/clip_copy.gif', '', 1).'\'); background-repeat: no-repeat;" value="1" '.(($this->currentMode()=='copy')?'selected="selected"':'').'>'.$copyLabel .'</option>';
+
+ $copymode_selector = ' <select name="CB[setCopyMode]" onchange="this.form.method=\'POST\'; this.form.action=\''.$copymode_url.'&CB[setCopyMode]=\'+(this.options[this.selectedIndex].value); this.form.submit(); return true;" >'.implode('',$opt).'</select>';
// Selector menu + clear button
$opt=array();
'<a href="'.htmlspecialchars($thumb_url).'#clip_head">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/thumb_'.($this->clipData['_setThumb']?'s':'n').'.gif','width="21" height="16"').' vspace="2" border="0" title="'.$this->clLabel('thumbmode_clip').'" alt="" />'.
'</a>'.
- '<a href="'.htmlspecialchars($copymode_url).'#clip_head">'.
- '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/copymode_'.($this->currentMode()=='copy'?'s':'n').'.gif','width="21" height="16"').' vspace="2" border="0" title="'.$this->clLabel('copymode').'" alt="" />'.
- '</a>'.
'</td>
- <td width="95%">'.$selector_menu.'</td>
+ <td width="95%" nowrap="nowrap">'.
+ $copymode_selector.' '.
+ $selector_menu.
+ '</td>
<td>'.
'<a href="'.htmlspecialchars($rmall_url).'#clip_head">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/closedok_2.gif','width="21" height="16"').' vspace="2" border="0" title="'.$LANG->sL('LLL:EXT:lang/locallang_core.php:buttons.clear',1).'" alt="" />'.
<label index="insertNewRecordHere">Insert new record here</label>
<label index="movePageToHere">Move page to this position</label>
<label index="moveElement">Move element</label>
+ <label index="moveElements">Move elements</label>
+ <label index="copyElements">Copy elements</label>
<label index="selectPositionOfElement">Select position of the element</label>
<label index="movingElement">Move element</label>
<label index="makeCopy">Make copy instead of moving element</label>