From 23b0abb9742d3418484fe8d01609f6849d7960ce Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 4 Mar 2009 08:51:49 +0000 Subject: Redefine the batch API to be very very simple. You call batch::start() before starting a series of events, and batch::stop() when you're done. In batch mode, the notification module will store up pending notifications. When the batch job is complete, it'll send a single digested email to each user for all of her notifications. Updated the scaffold and local_import to use this. Haven't modified SimpleUploader yet. --- modules/local_import/js/local_import.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'modules/local_import/js') diff --git a/modules/local_import/js/local_import.js b/modules/local_import/js/local_import.js index ba9f63b0..c9645bfc 100644 --- a/modules/local_import/js/local_import.js +++ b/modules/local_import/js/local_import.js @@ -66,10 +66,18 @@ function do_import(submit, event) { var check_list = $("#gLocalImport :checkbox[checked]"); process_length = check_list.length; current = 0; + var base_url = $("#gLocalImport form :hidden[name='base_url']")[0].value; + $.ajax({async: false, + success: function(data, textStatus) { + document.location.reload(); + }, + dataType: "json", + type: "POST", + url: base_url + "local_import/start" + }); $.each(check_list, function () { process_checkbox(this); }); - var base_url = $("#gLocalImport form :hidden[name='base_url']")[0].value; $.ajax({async: false, success: function(data, textStatus) { document.location.reload(); -- cgit v1.2.3