@@ -289,15 +289,16 @@ function initAddVLANButton($addButton) {
289289 $addButton . find ( "#label" ) . text ( "Add VLAN" ) ;
290290 $addButton . show ( ) ;
291291 $addButton . unbind ( "click" ) . bind ( "click" , function ( event ) {
292- $ ( "#tab_network" ) . click ( ) ;
292+ if ( $ ( "#tab_content_network" ) . css ( "display" ) == "none" )
293+ $ ( "#tab_network" ) . click ( ) ;
294+
293295 var zoneObj = $ ( "#tab_content_details" ) . data ( "jsonObj" ) ;
294296 var dialogAddVlanForZone = $ ( "#dialog_add_vlan_for_zone" ) ;
295297 dialogAddVlanForZone . find ( "#info_container" ) . hide ( ) ;
296298 dialogAddVlanForZone . find ( "#zone_name" ) . text ( fromdb ( zoneObj . name ) ) ;
297299 dialogAddVlanForZone . find ( "#add_publicip_vlan_vlan_container, #add_publicip_vlan_domain_container, #add_publicip_vlan_account_container" ) . hide ( ) ;
298300 dialogAddVlanForZone . find ( "#add_publicip_vlan_tagged, #add_publicip_vlan_vlan, #add_publicip_vlan_gateway, #add_publicip_vlan_netmask, #add_publicip_vlan_startip, #add_publicip_vlan_endip, #add_publicip_vlan_account" ) . val ( "" ) ;
299-
300-
301+
301302 if ( getNetworkType ( ) == 'vnet' ) {
302303 dialogAddVlanForZone . find ( "#add_publicip_vlan_type_container" ) . hide ( ) ;
303304 } else {
@@ -449,7 +450,9 @@ function initAddSecondaryStorageButton($addButton) {
449450 $addButton . find ( "#label" ) . text ( "Add Secondary Storage" ) ;
450451 $addButton . show ( ) ;
451452 $addButton . unbind ( "click" ) . bind ( "click" , function ( event ) {
452- $ ( "#tab_secondarystorage" ) . click ( ) ;
453+ if ( $ ( "#tab_content_secondarystorage" ) . css ( "display" ) == "none" )
454+ $ ( "#tab_secondarystorage" ) . click ( ) ;
455+
453456 var zoneObj = $ ( "#tab_content_details" ) . data ( "jsonObj" ) ;
454457 $ ( "#dialog_add_secondarystorage" ) . find ( "#zone_name" ) . text ( fromdb ( zoneObj . name ) ) ;
455458 $ ( "#dialog_add_secondarystorage" ) . find ( "#info_container" ) . hide ( ) ;
0 commit comments