bug 9795: Copy Template Dialog, Copy ISO Dialog - fix a bug that entries in zone dropdown are duplicated when the dialog pops up the 2nd time.

This commit is contained in:
Jessica Wang 2011-05-10 14:34:56 -07:00
parent 8901d0e73c
commit 2e645d18cf
2 changed files with 4 additions and 2 deletions

View File

@ -109,7 +109,8 @@ function initAddIsoDialog() {
$.ajax({
data: createURL("command=listZones&available=true"),
dataType: "json",
success: function(json) {
success: function(json) {
g_zoneIds = [];
var zones = json.listzonesresponse.zone;
if (zones != null && zones.length > 0) {
for (var i = 0; i < zones.length; i++) {

View File

@ -217,7 +217,8 @@ function afterLoadTemplateJSP() {
$.ajax({
data: createURL("command=listZones&available=true"),
dataType: "json",
success: function(json) {
success: function(json) {
g_zoneIds = [];
var zones = json.listzonesresponse.zone;
if (zones != null && zones.length > 0) {
for (var i = 0; i < zones.length; i++) {