aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Varesano <fax8@13637.no-reply.drupal.org>2007-01-14 17:30:40 +0000
committerFabio Varesano <fax8@13637.no-reply.drupal.org>2007-01-14 17:30:40 +0000
commit3589ea14165fdf19609720406229ebfab8418e08 (patch)
tree7e4dc69b093356ad9b70dd5166f3756094b00e4b
parent3a610e5651640441e70d1d2739803e1268a06a04 (diff)
downloadvideo-3589ea14165fdf19609720406229ebfab8418e08.tar.gz
video-3589ea14165fdf19609720406229ebfab8418e08.tar.bz2
it's possible to abort upload.
-rw-r--r--plugins/video_upload/video_upload.js11
-rw-r--r--plugins/video_upload/video_upload.module1
2 files changed, 11 insertions, 1 deletions
diff --git a/plugins/video_upload/video_upload.js b/plugins/video_upload/video_upload.js
index bed69a0..d5726c0 100644
--- a/plugins/video_upload/video_upload.js
+++ b/plugins/video_upload/video_upload.js
@@ -14,13 +14,22 @@
Drupal.video_upload_hide = function () {
$('#node-form').hide();
$("#sending").show();
+ $("#video_upload_cancel_link").click(Drupal.video_upload_show);
+}
+
+Drupal.video_upload_show = function() {
+ $('#node-form').show();
+ $("#sending").hide();
+
+ //$("form").bind("submit", function() { return false; })
+ window.location = window.location;
}
/**
* Attaches the upload behaviour to the video upload form.
*/
Drupal.video_upload = function() {
- $('#node-form').submit(video_upload_hide);
+ $('#node-form').submit(Drupal.video_upload_hide);
}
// Global killswitch
diff --git a/plugins/video_upload/video_upload.module b/plugins/video_upload/video_upload.module
index d0a82f0..5424ef7 100644
--- a/plugins/video_upload/video_upload.module
+++ b/plugins/video_upload/video_upload.module
@@ -371,6 +371,7 @@ function theme_video_upload_busy() {
return '<div id="sending" style="display: none;">
<h3>' . t('Sending video... please wait.') . '</h3>
<img src="'. drupal_get_path('module', 'video_upload') . '/busy.gif" alt="' . t('Sending video... please wait.') . '"/>
+ <p>'. t('Video upload could take some minutes.') . '<br /><a href="#" id="video_upload_cancel_link">abort upload.</a></p>
</div>';
}