Closed (fixed)
Project:
Web File Manager
Version:
6.x-2.9-alpha1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2008 at 14:28 UTC
Updated:
5 May 2008 at 10:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedHi,
since the clipboard function does not work in Opera (see http://drupal.org/node/246914), I wrote a little patch to get a similar function into the context menu for the attached files instead of adding the clipboard function there.
The new menu entry "Paste link in editor window" creates the same
<a href=..>code that you can copy and paste from the meta data window, but immediately inserts it at the last known cursor position in the Body textarea. This makes it very easy to create anchors for your attachments in the body.However, there is one issue in this patch I'm not sure about. To reference the textarea, I use
document.getElementById('edit-body'). I got this ID from the drupal source code, but I don't feel well relying on a hard-coded string.If someone knows a clean way to fetch the id of the body textarea by some drupal function (I just started programming in Javascript and drupal yesterday, so I have noe clue :-)), please let me know or change the patch yourself.
Frank
Comment #2
robmilne commentedWow, thanks a lot for these 4 patches. Open source rocks. If you've only just started in drupal/javascript I'm impressed. General programming skill is more valuable than specific language knowledge.
I don't see an issue with hardcoding the id since hardcoded classes and ids are endemic to this cms.
I'll commit to DRUPAL-5 head of the project so that you test drive before I release a 2.13 version.
Btw Andre is handling the DRUPAL-6 stuff so you may have to wait longer for a new 6 release.
Comment #3
robmilne commentedfixed in 5 branch only at this time
Comment #4
Anonymous (not verified) commentedThanks :-) I'm glad I could help!
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.