/[drupal]/contributions/modules/upload_progress/upload_progress.js
ViewVC logotype

Contents of /contributions/modules/upload_progress/upload_progress.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Sat Nov 17 06:47:47 2007 UTC (2 years ago) by pfournier
Branch: MAIN
CVS Tags: DRUPAL-5--1-4, DRUPAL-5--1-1, DRUPAL-5--1-0, DRUPAL-5--1-3, DRUPAL-5--1-2, HEAD
Branch point for: DRUPAL-5
File MIME type: text/javascript
Initial checkin of the upload_progress module
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 }

  ViewVC Help
Powered by ViewVC 1.1.2