PerfectlyNormal/tinymce-rails-imageupload — pull request #11 by dpc (2012-08-01 11:09:30+00:00)
Title: Fix 3.4.9.1

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.