[TYPO3-dam-devel] RFC Bugfix: 5681: Link Popup javascript error when changing DAM directory in File selection
Peter Kühn
peter.kuehn at wmdb.de
Sat Dec 29 17:48:49 CET 2007
Andreas Balzer schrieb:
> +1 to the following three:
> http://bugs.typo3.org/view.php?id=5681
> http://bugs.typo3.org/view.php?id=6700
> http://bugs.typo3.org/view.php?id=6697
Peter Kühn schrieb:
> Hi Michiel, hi yall,
>
> you were right:
> it didn't work for links in the media type tree.
>
> it didnt work as well for
> - the plus and minus signs in the folder tree.
> - the arrow bullets on the right side of the folder tree
> - all other titles, plus/minus and arrow bullets in all other trees
> - the show 20/50/... pull down
> - the file sorting pull down
> - the asc/desc switch button
> - the selection, search and options foldout menus in the bottom of the EB
>
> please check thoroughly if
> - the list above is this time complete
> - the attached patch solves all existing issues
> and make my day ...
>
> gRTz
> pekue
>
> Michiel Roos schrieb:
>> Dear Peter,
>>
>> I regret to inform you that I cannot get it to a working state using
>> this patch.
>>
>> It indeed works fine when choosing an image from the 'file' tree, but
>> when you choose 'image' from media types and then try to link to one
>> of the images, it does not work.
>>
>> Kind regards,
>>
>>
>> Michiel Roos
>>
>
>
> ------------------------------------------------------------------------
>
> Index: class.tx_dam_browse_media.php
> ===================================================================
> --- class.tx_dam_browse_media.php (revision 7677)
> +++ class.tx_dam_browse_media.php (working copy)
> @@ -164,7 +164,6 @@
> function initDAMSelection () {
> global $TYPO3_CONF_VARS;
>
> -
> $this->damSC->addParams = $this->addParams;
>
> $txdamSel = $this->getModSettings('txdamSel');
> @@ -1183,6 +1182,10 @@
> if (t3lib_div::_GP('SLCMD')) {
> $this->addParams['SET[txdamSel]'] = $this->damSC->addParams['SET[txdamSel]'] = '__txdam_eb_selection';
> }
> + if (t3lib_div::_GP('editorNo')) {
> + $this->addParams['editorNo'] = t3lib_div::_GP('editorNo');
> + }
> +
>
>
> }
> Index: components/class.tx_dam_selectionFolder.php
> ===================================================================
> --- components/class.tx_dam_selectionFolder.php (revision 7677)
> +++ components/class.tx_dam_selectionFolder.php (working copy)
> @@ -547,7 +547,7 @@
> * @return string
> */
> function eb_wrapTitle($title,$row) {
> - $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.$this->getJumpToParam($row).'\');';
> + $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.($GLOBALS['SOBE']->browser->editorNo?'&editorNo='.$GLOBALS['SOBE']->browser->editorNo:'').$this->getJumpToParam($row).'\');';
> return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$title.'</a>';
> }
>
> @@ -566,7 +566,7 @@
> $anchor = '#'.$bMark;
> $name=' name="'.$bMark.'"';
> }
> - $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?PM='.$cmd.'&act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.'\',\''.$anchor.'\');';
> + $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?PM='.$cmd.'&act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.($GLOBALS['SOBE']->browser->editorNo?'&editorNo='.$GLOBALS['SOBE']->browser->editorNo:'').'\',\''.$anchor.'\');';
> return '<a href="#"'.$name.' onclick="'.htmlspecialchars($aOnClick).'">'.$icon.'</a>';
> }
>
> @@ -606,7 +606,7 @@
> $arrCol='<td></td>';
> }
> // Create arrow-bullet for file listing (if folder path is linkable):
> - $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.$this->getJumpToParam($v['row']).'\');';
> + $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.($GLOBALS['SOBE']->browser->editorNo?'&editorNo='.$GLOBALS['SOBE']->browser->editorNo:'').$this->getJumpToParam($v['row']).'\');';
> $cEbullet = $this->ext_isLinkable($v['row']) ? '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/ol/arrowbullet.gif','width="18" height="16"').' alt="" /></a>' : '';
>
> // Put table row with folder together:
> Index: lib/class.tx_dam_selprocbase.php
> ===================================================================
> --- lib/class.tx_dam_selprocbase.php (revision 7677)
> +++ lib/class.tx_dam_selprocbase.php (working copy)
> @@ -567,7 +567,7 @@
> */
> function eb_wrapTitle($title,$row) {
> if ($row['uid']) {
> - $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.$this->getJumpToParam($row).'\');';
> + $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.($GLOBALS['SOBE']->browser->editorNo?'&editorNo='.$GLOBALS['SOBE']->browser->editorNo:'').$this->getJumpToParam($row).'\');';
> return '<a href="#" onclick="'.htmlspecialchars($aOnClick).'">'.$title.'</a>';
> } else {
> return $title;
> @@ -590,7 +590,7 @@
> $anchor = '#'.$bMark;
> $name=' name="'.$bMark.'"';
> }
> - $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?PM='.$cmd.'&act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.'\',\''.$anchor.'\');';
> + $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?PM='.$cmd.'&act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.($GLOBALS['SOBE']->browser->editorNo?'&editorNo='.$GLOBALS['SOBE']->browser->editorNo:'').'\',\''.$anchor.'\');';
> return '<a href="#"'.$name.' onclick="'.htmlspecialchars($aOnClick).'">'.$icon.'</a>';
> }
>
> @@ -627,7 +627,7 @@
> $arrCol='<td></td>';
> }
> // Create arrow-bullet for file listing (if folder path is linkable):
> - $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.$this->getJumpToParam($v['row']).'\');';
> + $aOnClick = 'return jumpToUrl(\''.$this->thisScript.'?act='.$GLOBALS['SOBE']->act.'&mode='.$GLOBALS['SOBE']->mode.'&bparams='.$GLOBALS['SOBE']->bparams.($GLOBALS['SOBE']->browser->editorNo?'&editorNo='.$GLOBALS['SOBE']->browser->editorNo:'').$this->getJumpToParam($v['row']).'\');';
> $cEbullet = $this->ext_isLinkable($v['row']) ? '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"><img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/ol/arrowbullet.gif','width="18" height="16"').' alt="" /></a>' : '';
>
> // Put table row with folder together:
More information about the TYPO3-team-dam
mailing list