2 // this is set automatically
3 admin_media_prefix: '',
5 thumb_prefix: 'thumb_',
6 no_thumb: 'filebrowser/img/no_thumb.gif',
9 // Deduce admin_media_prefix by looking at the <script>s in the
10 // current document and finding the URL of *this* module.
11 var scripts = document.getElementsByTagName('script');
12 for (var i=0; i<scripts.length; i++) {
13 if (scripts[i].src.match(/AddFileBrowser/)) {
14 var idx = scripts[i].src.indexOf('filebrowser/js/AddFileBrowser');
15 FileBrowser.admin_media_prefix = scripts[i].src.substring(0, idx);
21 show: function(id, href) {
22 // var id2=String(id).split(".").join("___");
23 var id2=String(id).replace(/\-/g,"____").split(".").join("___");
24 FBWindow = window.open(href, String(id2), 'height=600,width=960,resizable=yes,scrollbars=yes');
29 addEvent(window, 'load', FileBrowser.init);