* fix the bug #207
This commit is contained in:
@@ -170,6 +170,9 @@ class file extends control
|
||||
*/
|
||||
public function sendDownHeader($fileName, $fileType, $content)
|
||||
{
|
||||
/* Set the downloading cookie, thus the export form page can use it to judge whether to close the window or not. */
|
||||
setcookie('downloading', 1);
|
||||
|
||||
/* Append the extension name auto. */
|
||||
$extension = '.' . $fileType;
|
||||
if(strpos($fileName, $extension) === false) $fileName .= $extension;
|
||||
|
||||
@@ -11,7 +11,29 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<form method='post' target='hiddenwin'>
|
||||
<?php include '../../common/view/colorbox.html.php';?>
|
||||
|
||||
<script>
|
||||
function setDownloading()
|
||||
{
|
||||
$.cookie('downloading', 0);
|
||||
time = setInterval("closeWindow()", 300);
|
||||
return true;
|
||||
}
|
||||
|
||||
function closeWindow()
|
||||
{
|
||||
if($.cookie('downloading') == 1 || i >= 30)
|
||||
{
|
||||
parent.$.fn.colorbox.close();
|
||||
$.cookie('downloading', null);
|
||||
clearInterval(time);
|
||||
}
|
||||
i ++;
|
||||
}
|
||||
</script>
|
||||
|
||||
<form method='post' target='hiddenwin' onsubmit='setDownloading();'>
|
||||
<table class='table-1'>
|
||||
<caption><?php echo $lang->export;?></caption>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user