[TYPO3-dam-devel] RFC: Bugfix: 5527: Go to editing of DAM record from the content element (image)
Michiel Roos
michiel at netcreators.com
Mon Feb 11 21:41:10 CET 2008
Hi,
Unable to produce a working situation using this patch.
Met vriendelijke groet,
Michiel Roos
Netcreators BV :: creation and innovation
www.netcreators.com
Interesse in werken bij Netcreators?
http://www.netcreators.com/bedrijf/vacatures/
On Feb 9, 2008, at 2:49 PM, Peter Kühn wrote:
> This is a svn patch request.
>
> Type: bugfix
>
> Description:
> Now it is not possible to go to editing of DAM record from the
> content element (image, text with image), where this record is used.
>
> Steps to reproduce:
> - create a content element of type "Image"
> - add a DAM-record to the images field
> - save the record without closing it
> - if the form is back, click on image-icon top-left of the
> thumbnailsection of the added image
>
> Expected behaviour:
> like fx. in CType "Insert Records" a clickmenu should appear with an
> edit, info and copy option for the referenced record.
>
> Observed behaviour:
> the ajax request for the content of the clickmenu is sent in the
> background, but alt_clickmenu.php returns a result without the
> expected entries.
>
> The reason for this is, that t3lib_TCEforms::getClickMenu() renders
> a get-parameter enDisItems with the value
> '+copy,info,edit,view' (hardcoded on line 3304 in the current 4.1.5
> and checked to *not* have been changed in 4.2beta1a). The plus as
> the first char defines that only the given keys may be returned.
> As defined in dam/ext_tables.php on line 315 the key for fx. the
> action to edit a dam-record is "tx_dam_action_editRec" instead of
> "edit" as in TCEforms, the action is not returned.
>
> The provided solution may look a little brute, but I think it can be
> done this way cause the reason for this missbehave (the enDisItems=
> +copy,info,edit,view param in the request) is hardcoded in TCEforms
> and therefore works like sort of a switch, indicating to display a
> certain type of clickmenu that should not be overwritten by dam-
> actions.
>
> please ack or comment.
> grtz
> pekue
> Index: binding/be/class.tx_dam_cm_record.php
> ===================================================================
> --- binding/be/class.tx_dam_cm_record.php (revision 8213)
> +++ binding/be/class.tx_dam_cm_record.php (working copy)
> @@ -54,7 +54,12 @@
>
> // Returns directly, because the clicked item was not from the
> DAM table
> if ($table!='tx_dam') return $menuItems;
> -
> +
> + // Returns directly, because the clicked item was rendered by
> t3lib_TCEforms::getClickMenu()
> + if ($backRef->iParts[3]=='+copy,info,edit,view') {
> + return $menuItems;
> + }
> +
> $this->backRef = &$backRef;
> $item = $backRef->rec;
>
> _______________________________________________
> TYPO3-team-dam mailing list
> TYPO3-team-dam at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-dam
More information about the TYPO3-team-dam
mailing list