| 1 |
<!-- gimme quirks -->
|
| 2 |
<html xmlns="http://www.w3.org/1999/xhtml">
|
| 3 |
<head>
|
| 4 |
<!--
|
| 5 |
don't want to display docs inline in this window
|
| 6 |
All other links should be getting handled by AJAX
|
| 7 |
-->
|
| 8 |
<base target="_blank">
|
| 9 |
<title>
|
| 10 |
Filebrowser - <?= $subfolder ?>
|
| 11 |
</title>
|
| 12 |
<?php
|
| 13 |
$mod_path = drupal_get_path('module', 'filebrowser_extensions');
|
| 14 |
drupal_add_js($mod_path.'/filebrowser.js');
|
| 15 |
theme_add_style($mod_path .'/filebrowser-popup.css');
|
| 16 |
theme_add_style($mod_path .'/filebrowser-tree.css');
|
| 17 |
?>
|
| 18 |
<?php print drupal_get_html_head() ?>
|
| 19 |
<?php print theme_get_styles() . $styles ?>
|
| 20 |
<!--[if IE]>
|
| 21 |
<style type="text/css">
|
| 22 |
body { height: 100%; overflow: hidden; font-size: 100%; padding-bottom:20px; }
|
| 23 |
div#content { width: 100%; height: 100%; overflow: auto; padding-bottom:60px; padding-top:4px }
|
| 24 |
div#footer { position: absolute; }
|
| 25 |
</style>
|
| 26 |
<![endif]-->
|
| 27 |
|
| 28 |
<script type='text/javascript'>
|
| 29 |
//<![CDATA[
|
| 30 |
function selectPath(selection) {
|
| 31 |
if(!window.opener){return;}
|
| 32 |
elm = window.opener.document.getElementById('<?= $_GET['targetelement'] ?>');
|
| 33 |
if (elm) {
|
| 34 |
var subsection = '<?= $_GET['subsection'] ?>';
|
| 35 |
|
| 36 |
elm.value = selection;
|
| 37 |
|
| 38 |
var callback = '<?= $_GET['callback'] ?>';
|
| 39 |
if(callback){
|
| 40 |
opener.eval(callback+"('"+selection+"')");
|
| 41 |
}
|
| 42 |
|
| 43 |
elm = $('remainOpen');
|
| 44 |
if (elm && elm.checked) return;
|
| 45 |
window.close();
|
| 46 |
return;
|
| 47 |
}
|
| 48 |
alert('Unable to set selection <?= $_GET['targetelement'] ?>. Contact with the launch window may have been lost.');
|
| 49 |
}
|
| 50 |
|
| 51 |
function setCookie(name, value)
|
| 52 |
{
|
| 53 |
document.cookie = name+'='+escape(value);
|
| 54 |
}
|
| 55 |
|
| 56 |
//]]>
|
| 57 |
</script>
|
| 58 |
|
| 59 |
</head>
|
| 60 |
<body id="popup">
|
| 61 |
<h1>
|
| 62 |
File Browser
|
| 63 |
</h1>
|
| 64 |
<div id="content" class='filebrowser'>
|
| 65 |
<?php
|
| 66 |
echo theme_status_messages();
|
| 67 |
?>
|
| 68 |
<div id='filebrowser'>
|
| 69 |
<?php
|
| 70 |
print $output;
|
| 71 |
?>
|
| 72 |
</div>
|
| 73 |
</div>
|
| 74 |
<div id="footer">
|
| 75 |
<div id="controls">
|
| 76 |
<span title="When checked the window will not be closed when an item is selected.">
|
| 77 |
<input type="checkbox" id="remainOpen" onclick="setCookie('remainOpen', this.checked);" <?= $_COOKIE["remainOpen"]=="true"?"checked=\"checked\"":"" ?> />
|
| 78 |
<label for="remainOpen">Remain open</label>
|
| 79 |
</span>
|
| 80 |
</div>
|
| 81 |
</div>
|
| 82 |
|
| 83 |
</body>
|
| 84 |
</html>
|