| 1 |
// $Id$
|
| 2 |
/**
|
| 3 |
* @file
|
| 4 |
* Javascript functions for progress bar status on node creation forms
|
| 5 |
*
|
| 6 |
* @author Patrick Fournier <patrick at patrickfournier dot com>
|
| 7 |
* @author Fabio Varesano <fvaresano at yahoo dot it>
|
| 8 |
*/
|
| 9 |
|
| 10 |
/**
|
| 11 |
* Hide the node form and show the busy div
|
| 12 |
*/
|
| 13 |
Drupal.upload_progress_hide_timeout = function() {
|
| 14 |
var delay = Drupal.settings["upload_progress"]["delay"];
|
| 15 |
setTimeout('upload_progress_hide()', delay*1000);
|
| 16 |
}
|
| 17 |
|
| 18 |
function upload_progress_hide() {
|
| 19 |
$('#node-form').hide();
|
| 20 |
$("#sending").show();
|
| 21 |
$("#upload_progress_cancel_link").click(Drupal.upload_progress_show);
|
| 22 |
}
|
| 23 |
|
| 24 |
Drupal.upload_progress_show = function() {
|
| 25 |
$('#node-form').show();
|
| 26 |
$("#sending").hide();
|
| 27 |
|
| 28 |
// "reload" the form
|
| 29 |
window.location = window.location;
|
| 30 |
}
|
| 31 |
|
| 32 |
/**
|
| 33 |
* Attaches the upload behaviour to the video upload form.
|
| 34 |
*/
|
| 35 |
Drupal.upload_progress = function() {
|
| 36 |
$('#node-form').submit(Drupal.upload_progress_hide_timeout);
|
| 37 |
}
|
| 38 |
|
| 39 |
// Global killswitch
|
| 40 |
if (Drupal.jsEnabled) {
|
| 41 |
$(document).ready(Drupal.upload_progress);
|
| 42 |
}
|