Closed (fixed)
Project:
IMCE
Version:
master
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
31 May 2007 at 14:56 UTC
Updated:
25 Sep 2009 at 13:11 UTC
When choosing an image the preview in TinyMCE image browser window does not change.
Adding following code fixes that bug:
try {
imceVar['targetField'].fireEvent('onchange');
}
catch (evt) {
var newEvt = document.createEvent("Events");
newEvt.initEvent('change',false,true);
imceVar['targetField'].dispatchEvent(newEvt);
}
It should be placed in imce_browse.js just after following lines in imceFinitor() function body:
imceVar['targetField'].value = path;
| Comment | File | Size | Author |
|---|---|---|---|
| imce_browse.js_.txt | 5.61 KB | prond |
Comments
Comment #1
mightyiam commentedThis happens for me in 5.x-1.0. I don't know PHP or JavaScript.
I thought it may be because some hebrew translation found its way into the javascript. I got that idea from seeing that while I point at an image in the file manager, FireFox's status bar shows me "javascript: imceFinitor('/drupal/files/images/avatar.jpg', 85, 85, '2.69 ק". notice the last letter is hebrew. Its probably a part of the hebrew translation for "KB", which is "ק"ב".
I don't even know where the translation comes from. Is it the browser doing it?
Comment #2
druvision commentedSearch for the string and replace it with a string without quotes. Go to admin/settings/locale/string/search. I changed the translation to קילובייט, instead of ק"ב, and now it inserts the filename into the dialog. This is an immediate solution.
I will notify Yuval, who is responsible for the Hebrew translation, about the problem. This will hopefully go into the next translation.
Thanks alot for the lead to the solution.
Amnon
-
Professional: Drupal Israel | Drupal Development & Consulting | בניית אתרים
Personal: Hitech Dolphin: Regain Simple Joy :)
Comment #3
druvision commentedPlease make validation on the 'KB' and only allow plain text on it.
This will premanently solve the issue for other languages as well.
Comment #4
yhager commented@levavie, @DawnLight - I am not sure this is the same issue as originally reported. I opened another issue for the hebrew translation there and provided a patch. Please test it.
Comment #5
ufku commented