[Typo3] Drag and drop in backend

Kraft Bernhard kraftb at gmx.net
Wed Jun 22 11:29:32 CEST 2005


Jeff Segars wrote:
> At line 15, I just added an ID to the span tag so that it can be 
> referenced later on....
> 15: return '<span id="'.$row['uid'].'" ondragstart=....
> 
> At line 117, I inserted a new line.  This line grabs the image 
> corresponding to the ID we set up earlier and sets the dragIcon's image 
> to it.
> 117: document.getElementById("dragIcon").innerHTML = 
> document.getElementById(dragID).innerHTML;

Nice to hear that it works easier.

Yesterday (21.06) I downloaded and installed this extension and was quite amazed
that this adds such a very nice feature.

But when I noticed that there wasn't an Icon indicating the Drag I actually started
to modify the extension ...

I have made a change which displays the correct Icon from the Page which get's moved.
But different to Jeff's method who adds a id="" attribute to the <span> tag containing
the image to later retrieve the TAG directly my method writes out an image tag with
document.write where it enters the src of the image.
It retrieves the source by getting the "outter" container of a page-table-row and then
doing a RegExp match to get the correct src attribute of the page-icon ... slightly more
complicated I think ...

But if you are also interested how I did it send me a mail and I will send you a diff.


greets,
Bernhard
-- 
Kraft Bernhard
MOKKA Medienagentur <http://www.mokka.at>
T: +43 - 1 - 895 33 33 - 50



More information about the TYPO3-english mailing list