unsorted listdir in obvious place
[redakcja.git] / redakcja / static / filebrowser / js / FB_TinyMCE.js
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