diff --git a/ui/scripts/cloud.core.callbacks.js b/ui/scripts/cloud.core.callbacks.js index f9279193961..cab0b4e3421 100644 --- a/ui/scripts/cloud.core.callbacks.js +++ b/ui/scripts/cloud.core.callbacks.js @@ -67,7 +67,6 @@ $(document).ready(function() { $.cookie('domainid', '1'); //e.g. domainid of ROOT domain is 1 $.cookie('account', json.loginresponse.account); $.cookie('directattachnetworkgroupsenabled', json.loginresponse.directattachnetworkgroupsenabled); - $.cookie('directattacheduntaggedenabled', json.loginresponse.directattacheduntaggedenabled); $.cookie('timezoneoffset', null); //comment this line and uncomment the next line if you want to set a specific timezone offset. Otherwise, default timezone from browser will be used. //$.cookie('timezoneoffset', '5.75'); //e.g. Timezone "Kathmandu" is 'UTC+05:45'. Thus, its timezoneoffset is '5.75' diff --git a/ui/scripts/cloud.core.init.js b/ui/scripts/cloud.core.init.js index 1bf706f331e..a86b556c974 100644 --- a/ui/scripts/cloud.core.init.js +++ b/ui/scripts/cloud.core.init.js @@ -688,8 +688,6 @@ $(document).ready(function() { g_hypervisorType = json.loginresponse.hypervisortype; if (json.loginresponse.directattachsecuritygroupsenabled != null) g_directAttachSecurityGroupsEnabled = json.loginresponse.directattachsecuritygroupsenabled; - if (json.loginresponse.directattacheduntaggedenabled != null) - g_directAttachedUntaggedEnabled = json.loginresponse.directattacheduntaggedenabled; if (json.loginresponse.systemvmuselocalstorage != null) g_systemVmUseLocalStorage = json.loginresponse.systemvmuselocalstorage; @@ -702,7 +700,6 @@ $(document).ready(function() { $.cookie('timezoneoffset', g_timezoneoffset, { expires: 1}); $.cookie('timezone', g_timezone, { expires: 1}); $.cookie('directattachsecuritygroupsenabled', g_directAttachSecurityGroupsEnabled, { expires: 1}); - $.cookie('directattacheduntaggedenabled', g_directAttachedUntaggedEnabled, { expires: 1}); $.cookie('systemvmuselocalstorage', g_systemVmUseLocalStorage, { expires: 1}); @@ -775,7 +772,6 @@ $(document).ready(function() { g_hypervisorType = $.cookie("hypervisortype"); g_timezone = $.cookie("timezone"); g_directAttachSecurityGroupsEnabled = $.cookie("directattachsecuritygroupsenabled"); - g_directAttachedUntaggedEnabled = $.cookie("directattacheduntaggedenabled"); g_systemVmUseLocalStorage = $.cookie("systemvmuselocalstorage"); g_userPublicTemplateEnabled = $.cookie("userpublictemplateenabled"); @@ -790,9 +786,6 @@ $(document).ready(function() { if (!g_directAttachSecurityGroupsEnabled || g_directAttachSecurityGroupsEnabled.length == 0) g_directAttachSecurityGroupsEnabled = "false"; - if (!g_directAttachedUntaggedEnabled || g_directAttachedUntaggedEnabled.length == 0) - g_directAttachedUntaggedEnabled = "false"; - if (!g_systemVmUseLocalStorage || g_systemVmUseLocalStorage.length == 0) g_systemVmUseLocalStorage = "false"; diff --git a/ui/scripts/cloud.core.iso.js b/ui/scripts/cloud.core.iso.js index 2062290e382..57d3b572164 100644 --- a/ui/scripts/cloud.core.iso.js +++ b/ui/scripts/cloud.core.iso.js @@ -67,7 +67,7 @@ function afterLoadIsoJSP() { $editFields = $detailsTab.find("#name_edit, #displaytext_edit, #ispublic_edit, #ostypename_edit, #isfeatured_edit"); } else { - if (g_userPublicTemplateEnabled == "true") { + if (getUserPublicTemplateEnabled() == "true") { $readonlyFields = $detailsTab.find("#name, #displaytext, #ispublic, #ostypename"); $editFields = $detailsTab.find("#name_edit, #displaytext_edit, #ispublic_edit, #ostypename_edit"); } else { @@ -126,7 +126,7 @@ function initAddIsoDialog() { //add button *** $("#add_iso_button").unbind("click").bind("click", function(event) { - if (g_userPublicTemplateEnabled == "true" || isAdmin()) { + if (getUserPublicTemplateEnabled() == "true" || isAdmin()) { $("#dialog_add_iso #add_iso_public_container").show(); } diff --git a/ui/scripts/cloud.core.js b/ui/scripts/cloud.core.js index fc88a656318..5a41dce3bd0 100644 --- a/ui/scripts/cloud.core.js +++ b/ui/scripts/cloud.core.js @@ -1215,12 +1215,12 @@ function getHypervisorType() { return g_hypervisorType; } var g_directAttachSecurityGroupsEnabled = "false"; function getDirectAttachSecurityGroupsEnabled() { return g_directAttachSecurityGroupsEnabled; } -var g_directAttachedUntaggedEnabled = "false"; -function getDirectAttachUntaggedEnabled() { return g_directAttachedUntaggedEnabled; } - var g_systemVmUseLocalStorage = "false"; function getSystemVmUseLocalStorage() { return g_systemVmUseLocalStorage; } +g_userPublicTemplateEnabled = "true" +function getUserPublicTemplateEnabled() { return g_userPublicTemplateEnabled; } + //keyboard keycode var keycode_Enter = 13; diff --git a/ui/scripts/cloud.core.pod.js b/ui/scripts/cloud.core.pod.js index 4d4899beec7..f11120a5c90 100644 --- a/ui/scripts/cloud.core.pod.js +++ b/ui/scripts/cloud.core.pod.js @@ -230,9 +230,6 @@ function podJsonClearDetailsTab(jsonObj) { $thisTab.find("#gateway").text(""); $thisTab.find("#gateway_edit").val(""); - - //if (getDirectAttachUntaggedEnabled() == "true") - // $("#submenu_content_zones #action_add_directip_vlan").data("type", "pod").data("id", obj.id).data("name", obj.name).data("zoneid", obj.zoneid).show(); } function getIpRange(startip, endip) { diff --git a/ui/scripts/cloud.core.snapshot.js b/ui/scripts/cloud.core.snapshot.js index 061719b6243..51a212ed7db 100644 --- a/ui/scripts/cloud.core.snapshot.js +++ b/ui/scripts/cloud.core.snapshot.js @@ -50,7 +50,7 @@ function afterLoadSnapshotJSP() { } function initCreateTemplateFromSnapshotDialog() { - if (g_userPublicTemplateEnabled == "true" || isAdmin()) { + if (getUserPublicTemplateEnabled() == "true" || isAdmin()) { $("#dialog_create_template_from_snapshot #create_template_public_container").show(); } diff --git a/ui/scripts/cloud.core.template.js b/ui/scripts/cloud.core.template.js index 837f4c87eec..eb4198e616d 100644 --- a/ui/scripts/cloud.core.template.js +++ b/ui/scripts/cloud.core.template.js @@ -90,7 +90,7 @@ function afterLoadTemplateJSP() { $("#dialog_add_template #add_template_featured_container, #dialog_edit_template #edit_template_featured_container").show(); } else { - if (g_userPublicTemplateEnabled == "true") { + if (getUserPublicTemplateEnabled() == "true") { $readonlyFields = $detailsTab.find("#name, #displaytext, #passwordenabled, #ispublic, #ostypename"); $editFields = $detailsTab.find("#name_edit, #displaytext_edit, #passwordenabled_edit, #ispublic_edit, #ostypename_edit"); } else { @@ -105,7 +105,7 @@ function afterLoadTemplateJSP() { $("#add_template_button").unbind("click").bind("click", function(event) { $("#dialog_add_template #add_template_hypervisor").change(); - if (g_userPublicTemplateEnabled == "true" || isAdmin()) { + if (getUserPublicTemplateEnabled() == "true" || isAdmin()) { $("#dialog_add_template #add_template_public_container").show(); } diff --git a/ui/scripts/cloud.core.volume.js b/ui/scripts/cloud.core.volume.js index 3b9390d742e..70105e4bf3f 100644 --- a/ui/scripts/cloud.core.volume.js +++ b/ui/scripts/cloud.core.volume.js @@ -630,7 +630,7 @@ function doDownloadVolume($actionLink, $detailsTab, $midmenuItem1) { } function doCreateTemplateFromVolume($actionLink, $detailsTab, $midmenuItem1) { - if (g_userPublicTemplateEnabled == "true" || isAdmin()) { + if (getUserPublicTemplateEnabled() == "true" || isAdmin()) { $("#dialog_create_template #create_template_public_container").show(); } @@ -1027,7 +1027,7 @@ function doCreateVolumeFromSnapshotInVolumePage($actionLink, $subgridItem) { } function doCreateTemplateFromSnapshotInVolumePage($actionLink, $subgridItem) { - if (g_userPublicTemplateEnabled == "true" || isAdmin()) { + if (getUserPublicTemplateEnabled() == "true" || isAdmin()) { $("#dialog_create_template_from_snapshot #create_template_public_container").show(); }