bug 8296: show action complete(success/fail) info in a dialog box even users have navigated to a different page. This change applies to all actions in subgrids and multiple-selection middle menus in all pages.

This commit is contained in:
Jessica Wang 2011-05-06 16:24:44 -07:00
parent d0174a22f9
commit 5166285f99

View File

@ -21,7 +21,7 @@ var g_nonCompleteAsyncJob = {};
function periodicallyCheckNonCompleteAsyncJob() {
var timerKey = "checkNonCompleteAsyncJob";
$("#dialog_action_complete").everyTime(
20000,
30000,
timerKey,
function() {
for(var jobId in g_nonCompleteAsyncJob) {
@ -351,7 +351,8 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, $subgridItem) {
dataType: "json",
success: function(json) {
var jobId = json[asyncJobResponse].jobid;
var timerKey = "asyncJob_" + jobId;
var timerKey = "asyncJob_" + jobId;
g_nonCompleteAsyncJob[jobId] = label2;
$("body").everyTime(
10000,
timerKey,
@ -364,7 +365,8 @@ function doActionToSubgridItem(id, $actionLink, apiCommand, $subgridItem) {
if (result.jobstatus == 0) {
return; //Job has not completed
} else {
$("body").stopTime(timerKey);
$("body").stopTime(timerKey);
delete g_nonCompleteAsyncJob[jobId];
$spinningWheel.hide();
if (result.jobstatus == 1) { // Succeeded
$subgridItem.find("#after_action_info_container").removeClass("error").addClass("success").show();
@ -485,7 +487,8 @@ function doActionToMidMenu(id, apiInfo, apiCommand) {
dataType: "json",
success: function(json) {
var jobId = json[asyncJobResponse].jobid;
var timerKey = "asyncJob_" + jobId;
var timerKey = "asyncJob_" + jobId;
g_nonCompleteAsyncJob[jobId] = label2;
$("body").everyTime(
10000,
timerKey,
@ -498,7 +501,8 @@ function doActionToMidMenu(id, apiInfo, apiCommand) {
if (result.jobstatus == 0) {
return; //Job has not completed
} else {
$("body").stopTime(timerKey);
$("body").stopTime(timerKey);
delete g_nonCompleteAsyncJob[jobId];
$midmenuItem1.find("#content").removeClass("inaction");
$midmenuItem1.find("#spinning_wheel").hide();