PerfectlyNormal / tinymce-rails-imageupload

Image upload plugin for TinyMCE and Rails with the asset pipeline
MIT License
149 stars 153 forks source link

Fix 3.4.9.1 #11

Closed dpc closed 12 years ago

dpc commented 12 years ago

Hi,

First of all forcing version of tinymce-rails to 3.4.8 does not work. The popup system is broken there somehow and I just couldn't got it work. The JavaScript code didn't replaced the text label values in popus and nothing worked.

So I've found tjoneseng fix, that helped me. Now I'm using tinymce-rails-imageupload with recent tinymce-rails (3.5.6).

However it still failed to upload files as JavaScript failed on unknown tinymce.$ function in dialog.html file. I've analyzed the intention of the mentioned line and googled that correct way to access this csrf token from parent window would be through window.opener.$.

I've cloned, tested and it works for me, so please review and consider merging into mainstream. Thanks.

PerfectlyNormal commented 12 years ago

I don't really use this gem any more, so I've been a bit lazy in getting it updated and making sure it works everywhere. I gave it a quick test, and works for me, so I merged it. Thanks a lot!