开发者

Tiny mce breaking django own pop-up on raw_id_fields

Im using Tiny mce for my wysiwyg.

Im using a subdomain to serving media files

#settings.py:
MEDIA_URL = 'http://media.mydomain.com/'
ADMIN_MEDIA_PREFIX = 'http://media.mydomain.com/admin_media/'

In my textareas.js i have this code:

document.domain = 'mydomain.com';
tinyMCE.init({
..

And in my tiny开发者_如何学Python_mce_popup.js I also have

document.domain = 'mydomain.com';

The tiny mce popups works fine with the document.domain code, but django own popup on raw_id_fields does not works so well. When I click on the magnifier icon (on the ForeignKey field) the popup window is displayed, but when I click the link for the object, I open the edit page for the object, instead of closing the popup window and returing to the orignal page with the ID of the object selected in the ForeignKey.

What could I do to fix this?


I fixed this by putting the tiny_mce folder in my top domain.

Is there a better way to do this?


this appears to be an open issue that's been reported, but maybe it's fixed in development branch? The specifics described in the tickets match what I'm seeing.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜