Commits

Kevin Chan committed e1179d4

Renamed "media" director to "static" to work with collectstatic command.

Comments (0)

Files changed (62)

media/filebrowser/css/filebrowser.css

-
-
-
-/*  Filebrowser Table
------------------------------------------------------------------------------------------------------- */
-
-.filebrowser table td {
-    font-size: 10px;
-}
-.filebrowser table a {
-    font-size: 11px;
-}
-.filebrowser thead th.sorted a {
-    padding-right: 13px;
-}
-.filebrowser thead th.filename {
-    min-width: 160px;
-}
-.filebrowser td {
-    padding: 9px 10px 6px 10px !important;
-}
-/*.filebrowser tr.fb_folder {
-    background: #e8e8e8;
-    background: -moz-linear-gradient(top, #ededed, #e8e8e8);
-    background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#e8e8e8));
-}
-.filebrowser tr.fb_folder td {
-    border-top-color: #fff !important;
-    background: transparent !important;
-}*/
-.filebrowser td.fb_thumbnail {
-    line-height: 11px;
-    padding-bottom: 0 !important;
-}
-
-
-
-/*  Filebrowser Buttons & Links
------------------------------------------------------------------------------------------------------- */
-
-span.fb_type {
-    display: inline-block;
-    margin: 0 0;
-    padding: 1px 0;
-    color: #999;
-    font-size: 11px;
-    font-weight: bold;
-    font-style: italic;
-    border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;
-}
-span.fb_type.folder {
-    color: #666;
-    font-weight: bold;
-}
-
-
-/*  Filebrowser Show-Preview-Link & Show-Versions-Link (uses Grappellis a.internal) ......................................... */
-
-.filebrowser a.fb_showpreview, 
-.filebrowser a.fb_showversions {
-    display: block;
-    margin-top: 8px;
-    padding-left: 8px;
-    line-height: 20px;
-    white-space: nowrap;
-    background-position: 0 50%;
-}
-.filebrowser a.fb_showpreview {
-    float: left;
-}
-.filebrowser a.fb_showversions {
-    float: left; // This is left because we arent using previews right now
-}
-.filebrowser a.fb_showversions {
-    padding-left: 25px;
-    
-    background: 0 50% no-repeat scroll;
-}
-a.fb_showversions:link, a.fb_showversions:visited {
-    background-image: url('../img/filebrowser_icon_showversions.gif');
-}
-a.fb_showversions:hover, a.fb_showversions:active {
-    background-image: url('../img/filebrowser_icon_showversions_hover.gif');
-}
-.filebrowser a.fb_showpreview {
-    padding-left: 16px;
-    background: 0 50% no-repeat scroll;
-}
-a.fb_showpreview:link, a.fb_showpreview:visited {
-    background-image: url('../img/icon-fb-preview.png');
-}
-a.fb_showpreview:hover, a.fb_showpreview:active {
-    background-image: url('../img/icon-fb-preview-hover.png');
-}
-
-
-/*  Filebrowser View-Link (contains thumbnail) & Select-Link......................................... */
-
-a.fb_viewlink, 
-button.fb_selectlink {
-    position: relative;
-    top: -4px !important;
-    margin-bottom: -5px !important;
-}
-button.fb_selectlink {
-    padding-top: 3px;
-    padding-bottom: 4px;
-    height: 24px;
-    font-size: 11px;
-}
-@media screen and (-webkit-min-device-pixel-ratio:0) {
-    button.fb_selectlink {
-        padding-top: 4px;
-    }
-}
-
-
-/*  Filebrowser Image Preview ......................................... */
-
-.filebrowser .fb_preview_container {
-    display: none;
-    position: absolute;
-    z-index: 1000;
-    margin-top: 25px;
-    padding: 5px 5px 1px;
-    border: 1px solid #bdbdbd;
-    border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;
-    background: #fff;
-    box-shadow: 0 10px 50px #333; -moz-box-shadow: 0 10px 50px #333; -webkit-box-shadow: 0 10px 50px #333;
-}
-/*.filebrowser img.fb_preview {
-    max-width: 400px;
-    max-height: 400px;
-}*/
-
-a.fb_view_image span {
-    display: none;
-    position: absolute;
-    top: 1px;
-    right: 0;
-    padding: 5px 10px 5px 20px;
-    width: auto;
-    line-height: 11px;
-    font-weight: bold;
-    border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;
-}
-a.fb_view_image:hover span {
-    display: block;
-    color: #83c3d9;
-    background: #fff url('../img/icon-fb-view-image-hover.png') 8px 7px no-repeat scroll;
-}
-
-
-
-/*  Filebrowser Pulldown Actions
------------------------------------------------------------------------------------------------------- */
-
-.pulldown-actions-container {
-    position: relative;
-}
-.pulldown-actions-handler {
-    display: block;
-    width: 27px;
-    height: 17px;
-    background: transparent 50% 50% no-repeat scroll;
-}
-.pulldown-actions-handler:link, .pulldown-actions-handler:visited {
-    background-image: url('../img/icon-pulldown-actions.png');
-}
-.pulldown-actions-handler:hover, .pulldown-actions-handler:active {
-    background-image: url('../img/icon-pulldown-actions-hover.png');
-}
-.open .pulldown-actions-handler {
-    background-image: url('../img/icon-pulldown-actions-active.png');
-}
-ul.pulldown-actions {
-    display: none;
-}
-.open ul.pulldown-actions {
-    display: block;
-    position: absolute;
-    right: 0;
-    z-index: 1000;
-    margin: 3px 0 0;
-    padding: 0;
-    border: 1px solid #ccc;
-    border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;
-    background: #eee;
-    box-shadow: 0 0 50px #333; -moz-box-shadow: 0 0 50px #333; -webkit-box-shadow: 0 0 50px #333;
-}
-ul.pulldown-actions li {
-    border-top: 1px solid #fff;
-    border-bottom: 1px solid #d4d4d4;
-}
-ul.pulldown-actions li:first-child {
-    border-top: 0;
-}
-ul.pulldown-actions li:last-child {
-    border-bottom: 0;
-}
-ul.pulldown-actions a {
-    display: block;
-    padding: 5px 30px 5px 10px;
-    font-weight: bold;
-    white-space: nowrap;
-}

media/filebrowser/img/filebrowser_icon_delete.gif

Removed
Old image

media/filebrowser/img/filebrowser_icon_delete_hover.gif

Removed
Old image

media/filebrowser/img/filebrowser_icon_rename.gif

Removed
Old image

media/filebrowser/img/filebrowser_icon_rename_hover.gif

Removed
Old image

media/filebrowser/img/filebrowser_icon_select.gif

Removed
Old image

media/filebrowser/img/filebrowser_icon_select_disabled.gif

Removed
Old image

media/filebrowser/img/filebrowser_icon_select_hover.gif

Removed
Old image

media/filebrowser/img/filebrowser_icon_show.gif

Removed
Old image

media/filebrowser/img/filebrowser_icon_show_hover.gif

Removed
Old image

media/filebrowser/img/filebrowser_icon_showversions.gif

Removed
Old image

media/filebrowser/img/filebrowser_icon_showversions_hover.gif

Removed
Old image

media/filebrowser/img/filebrowser_type_.gif

Removed
Old image

media/filebrowser/img/filebrowser_type_audio.gif

Removed
Old image

media/filebrowser/img/filebrowser_type_code.gif

Removed
Old image

media/filebrowser/img/filebrowser_type_document.gif

Removed
Old image

media/filebrowser/img/filebrowser_type_folder.gif

Removed
Old image

media/filebrowser/img/filebrowser_type_image.gif

Removed
Old image

media/filebrowser/img/filebrowser_type_video.gif

Removed
Old image

media/filebrowser/img/icon-fb-preview-hover.png

Removed
Old image

media/filebrowser/img/icon-fb-preview.png

Removed
Old image

media/filebrowser/img/icon-fb-view-image-hover.png

Removed
Old image

media/filebrowser/img/icon-pulldown-actions-active.png

Removed
Old image

media/filebrowser/img/icon-pulldown-actions-hover.png

Removed
Old image

media/filebrowser/img/icon-pulldown-actions.png

Removed
Old image

media/filebrowser/img/icon-showversions.png

Removed
Old image

media/filebrowser/js/AddFileBrowser.js

-var FileBrowser = {
-    // this is set automatically
-    admin_media_prefix: '',
-    // change this
-    thumb_prefix: 'thumb_',
-    no_thumb: 'filebrowser/img/no_thumb.gif',
-    
-    init: function() {
-        // Deduce admin_media_prefix by looking at the <script>s in the
-        // current document and finding the URL of *this* module.
-        var scripts = document.getElementsByTagName('script');
-        for (var i=0; i<scripts.length; i++) {
-            if (scripts[i].src.match(/AddFileBrowser/)) {
-                var idx = scripts[i].src.indexOf('filebrowser/js/AddFileBrowser');
-                FileBrowser.admin_media_prefix = scripts[i].src.substring(0, idx);
-                break;
-            }
-        }
-    },
-    // show FileBrowser
-    show: function(id, href, close_func) {
-        // var id2=String(id).split(".").join("___");
-        var id2=String(id).replace(/\-/g,"____").split(".").join("___");
-        FBWindow = window.open(href, String(id2), 'height=600,width=960,resizable=yes,scrollbars=yes');
-        FBWindow.focus();
-        if (close_func) {
-            FBWindow.onbeforeunload = close_func;
-        }
-    }
-}
-
-function addEvent( obj, type, fn ) {
-    if ( obj.attachEvent ) {
-        obj['e'+type+fn] = fn;
-        obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
-        obj.attachEvent( 'on'+type, obj[type+fn] );
-    } else
-        obj.addEventListener( type, fn, false );
-}
-
-addEvent(window, 'load', FileBrowser.init);
-

media/filebrowser/js/FB_CKEditor.js

-function ProtectPath(path) {
-    path = path.replace( /\\/g,'\\\\');
-    path = path.replace( /'/g,'\\\'');
-    return path ;
-}
-
-function gup( name ) {
-  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
-  var regexS = "[\\?&]"+name+"=([^&#]*)";
-  var regex = new RegExp(regexS);
-  var results = regex.exec(window.location.href);
-  if(results == null)
-    return "";
-  else
-    return results[1];
-}
-
-function OpenFile(fileUrl) {
-    var CKEditorFuncNum = gup('CKEditorFuncNum');
-    window.top.opener.CKEDITOR.tools.callFunction(CKEditorFuncNum,encodeURI(fileUrl).replace('#','%23'));
-    window.top.close();
-    window.top.opener.focus();
-}
-

media/filebrowser/js/FB_FileBrowseField.js

-function FileSubmit(FileURL, ThumbURL, FileType) {
-    
-    // var input_id=window.name.split("___").join(".");
-    var input_id=window.name.replace(/____/g,'-').split("___").join(".");
-    var preview_id = 'image_' + input_id;
-    var link_id = 'link_' + input_id;
-    var help_id = 'help_' + input_id;
-    input = opener.document.getElementById(input_id);
-    preview = opener.document.getElementById(preview_id);
-    link = opener.document.getElementById(link_id);
-    help = opener.document.getElementById(help_id);
-    // set new value for input field
-    input.value = FileURL;
-    
-    if (ThumbURL && FileType != "") {
-        // selected file is an image and thumbnail is available:
-        // display the preview-image (thumbnail)
-        // link the preview-image to the original image
-        link.setAttribute("href", FileURL);
-        link.setAttribute("target", "_blank");
-        preview.setAttribute("src", ThumbURL);
-        help.setAttribute("style", "display:block");
-    } else {
-        // hide preview elements
-        link.setAttribute("href", "");
-        link.setAttribute("target", "");
-        preview.setAttribute("src", "");
-        help.setAttribute("style", "display:none");
-    }
-    this.close();
-}
-

media/filebrowser/js/FB_TinyMCE.js

-var FileBrowserDialogue = {
-    init : function () {
-        // remove tinymce stylesheet.
-        var allLinks = document.getElementsByTagName("link");
-        allLinks[allLinks.length-1].parentNode.removeChild(allLinks[allLinks.length-1]);
-    },
-    fileSubmit : function (FileURL) {
-        var URL = FileURL;
-        var win = tinyMCEPopup.getWindowArg("window");
-        
-        // insert information now
-        win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL;
-        
-        // change width/height & show preview
-        if (win.ImageDialog){
-            if (win.ImageDialog.getImageData)
-                win.ImageDialog.getImageData();
-            if (win.ImageDialog.showPreviewImage)
-                win.ImageDialog.showPreviewImage(URL);
-        }
-        
-        // close popup window
-        tinyMCEPopup.close();
-    }
-}
-
-tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
-

media/filebrowser/js/TinyMCEAdmin.js

-function CustomFileBrowser(field_name, url, type, win) {
-
-    var cmsURL = "/admin/filebrowser/browse/?pop=2";
-    cmsURL = cmsURL + "&type=" + type;
-    
-    tinyMCE.activeEditor.windowManager.open({
-        file: cmsURL,
-        width: 820,  // Your dimensions may differ - toy around with them!
-        height: 500,
-        resizable: "yes",
-        scrollbars: "yes",
-        inline: "no",  // This parameter only has an effect if you use the inlinepopups plugin!
-        close_previous: "no"
-    }, {
-        window: win,
-        input: field_name,
-        editor_id: tinyMCE.selectedInstance.editorId
-    });
-    return false;
-}
-
-
-tinyMCE.init({
-    mode: "textareas",
-    theme: "advanced",
-    language: "en",
-    skin: "o2k7",
-    browsers: "gecko",
-    dialog_type: "modal",
-    object_resizing: true,
-    cleanup_on_startup: true,
-    forced_root_block: "p",
-    remove_trailing_nbsp: true,
-    theme_advanced_toolbar_location: "top",
-    theme_advanced_toolbar_align: "left",
-    theme_advanced_statusbar_location: "none",
-    theme_advanced_buttons1: "formatselect,bold,italic,underline,bullist,numlist,undo,redo,link,unlink,image,code,fullscreen,pasteword,media,charmap",
-    theme_advanced_buttons2: "",
-    theme_advanced_buttons3: "",
-    theme_advanced_path: false,
-    theme_advanced_blockformats: "p,h2,h3,h4,h5,h6",
-    width: '700',
-    height: '200',
-    plugins: "advimage,advlink,fullscreen,visualchars,paste,media,template,searchreplace",
-    advimage_styles: "Linksbündig neben Text=img_left;Rechtsbündig neben Text=img_right;Eigener Block=img_block",
-    advlink_styles: "internal (sehmaschine.net)=internal;external (link to an external site)=external",
-    advimage_update_dimensions_onchange: true,
-    file_browser_callback: "CustomFileBrowser",
-    relative_urls: false,
-    valid_elements : "" +
-    "-p," + 
-    "a[href|target=_blank|class]," +
-    "-strong/-b," +
-    "-em/-i," +
-    "-u," + 
-    "-ol," + 
-    "-ul," + 
-    "-li," + 
-    "br," + 
-    "img[class|src|alt=|width|height]," + 
-    "-h2,-h3,-h4," + 
-    "-pre," +
-    "-code," + 
-    "-div",
-    extended_valid_elements: "" + 
-    "a[name|class|href|target|title|onclick]," + 
-    "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]," + 
-    "br[clearfix]," + 
-    "-p[class<clearfix?summary?code]," + 
-    "h2[class<clearfix],h3[class<clearfix],h4[class<clearfix]," + 
-    "ul[class<clearfix],ol[class<clearfix]," + 
-    "div[class],"
-});
-
-

static/filebrowser/css/filebrowser.css

+
+
+
+/*  Filebrowser Table
+------------------------------------------------------------------------------------------------------ */
+
+.filebrowser table td {
+    font-size: 10px;
+}
+.filebrowser table a {
+    font-size: 11px;
+}
+.filebrowser thead th.sorted a {
+    padding-right: 13px;
+}
+.filebrowser thead th.filename {
+    min-width: 160px;
+}
+.filebrowser td {
+    padding: 9px 10px 6px 10px !important;
+}
+/*.filebrowser tr.fb_folder {
+    background: #e8e8e8;
+    background: -moz-linear-gradient(top, #ededed, #e8e8e8);
+    background: -webkit-gradient(linear, left top, left bottom, from(#ededed), to(#e8e8e8));
+}
+.filebrowser tr.fb_folder td {
+    border-top-color: #fff !important;
+    background: transparent !important;
+}*/
+.filebrowser td.fb_thumbnail {
+    line-height: 11px;
+    padding-bottom: 0 !important;
+}
+
+
+
+/*  Filebrowser Buttons & Links
+------------------------------------------------------------------------------------------------------ */
+
+span.fb_type {
+    display: inline-block;
+    margin: 0 0;
+    padding: 1px 0;
+    color: #999;
+    font-size: 11px;
+    font-weight: bold;
+    font-style: italic;
+    border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;
+}
+span.fb_type.folder {
+    color: #666;
+    font-weight: bold;
+}
+
+
+/*  Filebrowser Show-Preview-Link & Show-Versions-Link (uses Grappellis a.internal) ......................................... */
+
+.filebrowser a.fb_showpreview, 
+.filebrowser a.fb_showversions {
+    display: block;
+    margin-top: 8px;
+    padding-left: 8px;
+    line-height: 20px;
+    white-space: nowrap;
+    background-position: 0 50%;
+}
+.filebrowser a.fb_showpreview {
+    float: left;
+}
+.filebrowser a.fb_showversions {
+    float: left; // This is left because we arent using previews right now
+}
+.filebrowser a.fb_showversions {
+    padding-left: 25px;
+    
+    background: 0 50% no-repeat scroll;
+}
+a.fb_showversions:link, a.fb_showversions:visited {
+    background-image: url('../img/filebrowser_icon_showversions.gif');
+}
+a.fb_showversions:hover, a.fb_showversions:active {
+    background-image: url('../img/filebrowser_icon_showversions_hover.gif');
+}
+.filebrowser a.fb_showpreview {
+    padding-left: 16px;
+    background: 0 50% no-repeat scroll;
+}
+a.fb_showpreview:link, a.fb_showpreview:visited {
+    background-image: url('../img/icon-fb-preview.png');
+}
+a.fb_showpreview:hover, a.fb_showpreview:active {
+    background-image: url('../img/icon-fb-preview-hover.png');
+}
+
+
+/*  Filebrowser View-Link (contains thumbnail) & Select-Link......................................... */
+
+a.fb_viewlink, 
+button.fb_selectlink {
+    position: relative;
+    top: -4px !important;
+    margin-bottom: -5px !important;
+}
+button.fb_selectlink {
+    padding-top: 3px;
+    padding-bottom: 4px;
+    height: 24px;
+    font-size: 11px;
+}
+@media screen and (-webkit-min-device-pixel-ratio:0) {
+    button.fb_selectlink {
+        padding-top: 4px;
+    }
+}
+
+
+/*  Filebrowser Image Preview ......................................... */
+
+.filebrowser .fb_preview_container {
+    display: none;
+    position: absolute;
+    z-index: 1000;
+    margin-top: 25px;
+    padding: 5px 5px 1px;
+    border: 1px solid #bdbdbd;
+    border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;
+    background: #fff;
+    box-shadow: 0 10px 50px #333; -moz-box-shadow: 0 10px 50px #333; -webkit-box-shadow: 0 10px 50px #333;
+}
+/*.filebrowser img.fb_preview {
+    max-width: 400px;
+    max-height: 400px;
+}*/
+
+a.fb_view_image span {
+    display: none;
+    position: absolute;
+    top: 1px;
+    right: 0;
+    padding: 5px 10px 5px 20px;
+    width: auto;
+    line-height: 11px;
+    font-weight: bold;
+    border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;
+}
+a.fb_view_image:hover span {
+    display: block;
+    color: #83c3d9;
+    background: #fff url('../img/icon-fb-view-image-hover.png') 8px 7px no-repeat scroll;
+}
+
+
+
+/*  Filebrowser Pulldown Actions
+------------------------------------------------------------------------------------------------------ */
+
+.pulldown-actions-container {
+    position: relative;
+}
+.pulldown-actions-handler {
+    display: block;
+    width: 27px;
+    height: 17px;
+    background: transparent 50% 50% no-repeat scroll;
+}
+.pulldown-actions-handler:link, .pulldown-actions-handler:visited {
+    background-image: url('../img/icon-pulldown-actions.png');
+}
+.pulldown-actions-handler:hover, .pulldown-actions-handler:active {
+    background-image: url('../img/icon-pulldown-actions-hover.png');
+}
+.open .pulldown-actions-handler {
+    background-image: url('../img/icon-pulldown-actions-active.png');
+}
+ul.pulldown-actions {
+    display: none;
+}
+.open ul.pulldown-actions {
+    display: block;
+    position: absolute;
+    right: 0;
+    z-index: 1000;
+    margin: 3px 0 0;
+    padding: 0;
+    border: 1px solid #ccc;
+    border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;
+    background: #eee;
+    box-shadow: 0 0 50px #333; -moz-box-shadow: 0 0 50px #333; -webkit-box-shadow: 0 0 50px #333;
+}
+ul.pulldown-actions li {
+    border-top: 1px solid #fff;
+    border-bottom: 1px solid #d4d4d4;
+}
+ul.pulldown-actions li:first-child {
+    border-top: 0;
+}
+ul.pulldown-actions li:last-child {
+    border-bottom: 0;
+}
+ul.pulldown-actions a {
+    display: block;
+    padding: 5px 30px 5px 10px;
+    font-weight: bold;
+    white-space: nowrap;
+}

static/filebrowser/img/filebrowser_icon_delete.gif

Added
New image

static/filebrowser/img/filebrowser_icon_delete_hover.gif

Added
New image

static/filebrowser/img/filebrowser_icon_rename.gif

Added
New image

static/filebrowser/img/filebrowser_icon_rename_hover.gif

Added
New image

static/filebrowser/img/filebrowser_icon_select.gif

Added
New image

static/filebrowser/img/filebrowser_icon_select_disabled.gif

Added
New image

static/filebrowser/img/filebrowser_icon_select_hover.gif

Added
New image

static/filebrowser/img/filebrowser_icon_show.gif

Added
New image

static/filebrowser/img/filebrowser_icon_show_hover.gif

Added
New image

static/filebrowser/img/filebrowser_icon_showversions.gif

Added
New image

static/filebrowser/img/filebrowser_icon_showversions_hover.gif

Added
New image

static/filebrowser/img/filebrowser_type_.gif

Added
New image

static/filebrowser/img/filebrowser_type_audio.gif

Added
New image

static/filebrowser/img/filebrowser_type_code.gif

Added
New image

static/filebrowser/img/filebrowser_type_document.gif

Added
New image

static/filebrowser/img/filebrowser_type_folder.gif

Added
New image

static/filebrowser/img/filebrowser_type_image.gif

Added
New image

static/filebrowser/img/filebrowser_type_video.gif

Added
New image

static/filebrowser/img/icon-fb-preview-hover.png

Added
New image

static/filebrowser/img/icon-fb-preview.png

Added
New image

static/filebrowser/img/icon-fb-view-image-hover.png

Added
New image

static/filebrowser/img/icon-pulldown-actions-active.png

Added
New image

static/filebrowser/img/icon-pulldown-actions-hover.png

Added
New image

static/filebrowser/img/icon-pulldown-actions.png

Added
New image

static/filebrowser/img/icon-showversions.png

Added
New image

static/filebrowser/js/AddFileBrowser.js

+var FileBrowser = {
+    // this is set automatically
+    admin_media_prefix: '',
+    // change this
+    thumb_prefix: 'thumb_',
+    no_thumb: 'filebrowser/img/no_thumb.gif',
+    
+    init: function() {
+        // Deduce admin_media_prefix by looking at the <script>s in the
+        // current document and finding the URL of *this* module.
+        var scripts = document.getElementsByTagName('script');
+        for (var i=0; i<scripts.length; i++) {
+            if (scripts[i].src.match(/AddFileBrowser/)) {
+                var idx = scripts[i].src.indexOf('filebrowser/js/AddFileBrowser');
+                FileBrowser.admin_media_prefix = scripts[i].src.substring(0, idx);
+                break;
+            }
+        }
+    },
+    // show FileBrowser
+    show: function(id, href, close_func) {
+        // var id2=String(id).split(".").join("___");
+        var id2=String(id).replace(/\-/g,"____").split(".").join("___");
+        FBWindow = window.open(href, String(id2), 'height=600,width=960,resizable=yes,scrollbars=yes');
+        FBWindow.focus();
+        if (close_func) {
+            FBWindow.onbeforeunload = close_func;
+        }
+    }
+}
+
+function addEvent( obj, type, fn ) {
+    if ( obj.attachEvent ) {
+        obj['e'+type+fn] = fn;
+        obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
+        obj.attachEvent( 'on'+type, obj[type+fn] );
+    } else
+        obj.addEventListener( type, fn, false );
+}
+
+addEvent(window, 'load', FileBrowser.init);
+

static/filebrowser/js/FB_CKEditor.js

+function ProtectPath(path) {
+    path = path.replace( /\\/g,'\\\\');
+    path = path.replace( /'/g,'\\\'');
+    return path ;
+}
+
+function gup( name ) {
+  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
+  var regexS = "[\\?&]"+name+"=([^&#]*)";
+  var regex = new RegExp(regexS);
+  var results = regex.exec(window.location.href);
+  if(results == null)
+    return "";
+  else
+    return results[1];
+}
+
+function OpenFile(fileUrl) {
+    var CKEditorFuncNum = gup('CKEditorFuncNum');
+    window.top.opener.CKEDITOR.tools.callFunction(CKEditorFuncNum,encodeURI(fileUrl).replace('#','%23'));
+    window.top.close();
+    window.top.opener.focus();
+}
+

static/filebrowser/js/FB_FileBrowseField.js

+function FileSubmit(FileURL, ThumbURL, FileType) {
+    
+    // var input_id=window.name.split("___").join(".");
+    var input_id=window.name.replace(/____/g,'-').split("___").join(".");
+    var preview_id = 'image_' + input_id;
+    var link_id = 'link_' + input_id;
+    var help_id = 'help_' + input_id;
+    input = opener.document.getElementById(input_id);
+    preview = opener.document.getElementById(preview_id);
+    link = opener.document.getElementById(link_id);
+    help = opener.document.getElementById(help_id);
+    // set new value for input field
+    input.value = FileURL;
+    
+    if (ThumbURL && FileType != "") {
+        // selected file is an image and thumbnail is available:
+        // display the preview-image (thumbnail)
+        // link the preview-image to the original image
+        link.setAttribute("href", FileURL);
+        link.setAttribute("target", "_blank");
+        preview.setAttribute("src", ThumbURL);
+        help.setAttribute("style", "display:block");
+    } else {
+        // hide preview elements
+        link.setAttribute("href", "");
+        link.setAttribute("target", "");
+        preview.setAttribute("src", "");
+        help.setAttribute("style", "display:none");
+    }
+    this.close();
+}
+

static/filebrowser/js/FB_TinyMCE.js

+var FileBrowserDialogue = {
+    init : function () {
+        // remove tinymce stylesheet.
+        var allLinks = document.getElementsByTagName("link");
+        allLinks[allLinks.length-1].parentNode.removeChild(allLinks[allLinks.length-1]);
+    },
+    fileSubmit : function (FileURL) {
+        var URL = FileURL;
+        var win = tinyMCEPopup.getWindowArg("window");
+        
+        // insert information now
+        win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL;
+        
+        // change width/height & show preview
+        if (win.ImageDialog){
+            if (win.ImageDialog.getImageData)
+                win.ImageDialog.getImageData();
+            if (win.ImageDialog.showPreviewImage)
+                win.ImageDialog.showPreviewImage(URL);
+        }
+        
+        // close popup window
+        tinyMCEPopup.close();
+    }
+}
+
+tinyMCEPopup.onInit.add(FileBrowserDialogue.init, FileBrowserDialogue);
+

static/filebrowser/js/TinyMCEAdmin.js

+function CustomFileBrowser(field_name, url, type, win) {
+
+    var cmsURL = "/admin/filebrowser/browse/?pop=2";
+    cmsURL = cmsURL + "&type=" + type;
+    
+    tinyMCE.activeEditor.windowManager.open({
+        file: cmsURL,
+        width: 820,  // Your dimensions may differ - toy around with them!
+        height: 500,
+        resizable: "yes",
+        scrollbars: "yes",
+        inline: "no",  // This parameter only has an effect if you use the inlinepopups plugin!
+        close_previous: "no"
+    }, {
+        window: win,
+        input: field_name,
+        editor_id: tinyMCE.selectedInstance.editorId
+    });
+    return false;
+}
+
+
+tinyMCE.init({
+    mode: "textareas",
+    theme: "advanced",
+    language: "en",
+    skin: "o2k7",
+    browsers: "gecko",
+    dialog_type: "modal",
+    object_resizing: true,
+    cleanup_on_startup: true,
+    forced_root_block: "p",
+    remove_trailing_nbsp: true,
+    theme_advanced_toolbar_location: "top",
+    theme_advanced_toolbar_align: "left",
+    theme_advanced_statusbar_location: "none",
+    theme_advanced_buttons1: "formatselect,bold,italic,underline,bullist,numlist,undo,redo,link,unlink,image,code,fullscreen,pasteword,media,charmap",
+    theme_advanced_buttons2: "",
+    theme_advanced_buttons3: "",
+    theme_advanced_path: false,
+    theme_advanced_blockformats: "p,h2,h3,h4,h5,h6",
+    width: '700',
+    height: '200',
+    plugins: "advimage,advlink,fullscreen,visualchars,paste,media,template,searchreplace",
+    advimage_styles: "Linksbündig neben Text=img_left;Rechtsbündig neben Text=img_right;Eigener Block=img_block",
+    advlink_styles: "internal (sehmaschine.net)=internal;external (link to an external site)=external",
+    advimage_update_dimensions_onchange: true,
+    file_browser_callback: "CustomFileBrowser",
+    relative_urls: false,
+    valid_elements : "" +
+    "-p," + 
+    "a[href|target=_blank|class]," +
+    "-strong/-b," +
+    "-em/-i," +
+    "-u," + 
+    "-ol," + 
+    "-ul," + 
+    "-li," + 
+    "br," + 
+    "img[class|src|alt=|width|height]," + 
+    "-h2,-h3,-h4," + 
+    "-pre," +
+    "-code," + 
+    "-div",
+    extended_valid_elements: "" + 
+    "a[name|class|href|target|title|onclick]," + 
+    "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]," + 
+    "br[clearfix]," + 
+    "-p[class<clearfix?summary?code]," + 
+    "h2[class<clearfix],h3[class<clearfix],h4[class<clearfix]," + 
+    "ul[class<clearfix],ol[class<clearfix]," + 
+    "div[class],"
+});
+
+