new UI - resource page - update zone total number, pod total number after adding zone and/or pod.

This commit is contained in:
Jessica Wang 2010-11-12 16:58:40 -08:00
parent 756831aa74
commit a0e4b927f0
1 changed files with 13 additions and 1 deletions

View File

@ -332,6 +332,10 @@ function initAddPodShortcut() {
$zoneNode.find("#pods_container").prepend(template.show());
$zoneNode.find("#zone_arrow").removeClass("white_nonexpanded_close").addClass("expanded_open");
template.fadeIn("slow");
var podTotal = parseInt($("#pod_total").text());
podTotal++;
$("#pod_total").text(podTotal.toString());
forceLogout = false; // We don't force a logout if pod(s) exit.
if (forceLogout) {
@ -787,7 +791,11 @@ function addZoneWizardSubmit($thisWizard) {
var item = json.createzoneresponse.zone;
zoneJSONToTreeNode(item, $zoneNode);
zoneId = item.id;
zoneId = item.id;
var zoneTotal = parseInt($("#zone_total").text());
zoneTotal++;
$("#zone_total").text(zoneTotal.toString());
},
error: function(XMLHttpResponse) {
handleError(XMLHttpResponse, function() {
@ -827,6 +835,10 @@ function addZoneWizardSubmit($thisWizard) {
$zoneNode.find("#pods_container").prepend($podNode.show());
$zoneNode.find("#zone_arrow").removeClass("white_nonexpanded_close").addClass("expanded_open");
$podNode.fadeIn("slow");
var podTotal = parseInt($("#pod_total").text());
podTotal++;
$("#pod_total").text(podTotal.toString());
forceLogout = false; // We don't force a logout if pod(s) exit.
if (forceLogout) {