fix for ie8,9 for tinymce

This commit is contained in:
Harry Bomrah committed 2012-08-07 20:55:18 +08:00
1 parent 8ea7bf75cd
commit 4660c26b7a
6 files changed
+44 -32

No files matched your search

+1 -21
View File
@@ -1,21 +1 @@
// Uncomment and change this document.domain value if you are loading the script cross subdomains
// document.domain = 'moxiecode.com';
(function(){
var returnurl = "<%= @asset.data.url %>";
var returntitle = "<%= show_all_fields(@asset, 'title') %>";
var returndescription = "<%= show_all_fields(@asset, 'description') %>";
var win = tinyMCEPopup.getWindowArg("window");
win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = returnurl;
win.document.getElementById(tinyMCEPopup.getWindowArg("alt")).value = returndescription;
win.document.getElementById(tinyMCEPopup.getWindowArg("title")).value = returntitle;
if (typeof(win.ImageDialog) != "undefined") {
// we are, so update image dimensions...
if (win.ImageDialog.getImageData)
win.ImageDialog.getImageData();
// ... and preview if necessary
if (win.ImageDialog.showPreviewImage)
win.ImageDialog.showPreviewImage(returnurl);
}
tinyMCEPopup.close();})()
<%= @asset.data.url %>#<%= show_all_fields(@asset, 'title') %>#<%= show_all_fields(@asset, 'description') %>