86d6939b97420a4a86bc7f96ce8c2c82b7f57be3
[redakcja.git] / platforma / static / filebrowser / js / .svn / text-base / FB_TinyMCE.js.svn-base
1 var FileBrowserDialogue = {
2     init : function () {
3         // remove tinymce stylesheet.
4         var allLinks = document.getElementsByTagName("link");
5         allLinks[allLinks.length-1].parentNode.removeChild(allLinks[allLinks.length-1]);
6     },
7     fileSubmit : function (FileURL) {
8         var URL = FileURL;
9         var win = tinyMCEPopup.getWindowArg("window");
10         
11         // insert information now
12         win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL;
13         
14         // change width/height & show preview
15         if (win.ImageDialog){
16             if (win.ImageDialog.getImageData)
17                 win.ImageDialog.getImageData();
18             if (win.ImageDialog.showPreviewImage)
19                 win.ImageDialog.showPreviewImage(URL);
20         }
21         
22         // close popup window
23         tinyMCEPopup.close();
24     }
25 }
26
27 tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
28