- Web UI: Automatically close torrent download window once the torrent upload is complete

This commit is contained in:
Christophe Dumez 2009-11-23 14:21:07 +00:00
parent 68092f3b5c
commit bc52863aec
3 changed files with 5 additions and 2 deletions

View file

@ -143,6 +143,10 @@ window.addEvent('domready', function(){
});
function closeWindows() {
MochaUI.closeAll();
}
// This runs when a person leaves your page.
window.addEvent('unload', function(){

View file

@ -11,6 +11,7 @@
function showSuccess() {
$('myiframe').addClass('invisible');
$('successMessage').removeClass('invisible');
window.parent.closeWindows();
}
</script>
</head>

View file

@ -6,7 +6,6 @@
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/mocha.css" type="text/css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
<script type="text/javascript" src="scripts/mocha.js"></script>
<!-- <script type="text/javascript" src="scripts/upload.js" charset="utf-8"></script> -->
<script type="text/javascript">
function submitForm(form) {
@ -16,7 +15,6 @@ function submitForm(form) {
}
document.uploadForm.submit();
window.parent.showSuccess();
//MochaUI.closeAll();
}
</script>
</head>