mirror of https://github.com/apache/cloudstack.git
Bug 6330:
- Fixed vm action menu associated with the fact IE7 treats z-index differently than all current modern browsers. - Also added capability of closing previous VM menu if a new one opens.
This commit is contained in:
parent
26033833f5
commit
ef5be38453
|
|
@ -5407,7 +5407,7 @@ a:hover.add_newtemplatebutton {
|
|||
cursor:hand;
|
||||
}
|
||||
.vmactions_dropdownbox {
|
||||
width:auto;
|
||||
width:375px;
|
||||
height:auto;
|
||||
margin:0;
|
||||
padding:0;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
// Version: @VERSION@
|
||||
|
||||
// Version: @VERSION@
|
||||
|
||||
var rowZIndexGlobal = 300;
|
||||
var rowZIndex = 299;
|
||||
var currentVMAction = null;
|
||||
function showInstancesTab(p_domainId, p_account) {
|
||||
// Manage VM Tab
|
||||
// Submenus change based on role
|
||||
|
|
@ -112,7 +115,6 @@ function showInstancesTab(p_domainId, p_account) {
|
|||
if (imgUrl != null) {
|
||||
var time = new Date();
|
||||
$("#spopup .console_box0").css("background", "url("+imgUrl+"&t="+time.getTime()+")");
|
||||
$("#spopup .console_box1").css("background", "url("+imgUrl+"&t="+time.getTime()+")");
|
||||
vmTemplate.everyTime(2000, function() {
|
||||
var time = new Date();
|
||||
if ((index % 2) == 0) {
|
||||
|
|
@ -1061,17 +1063,9 @@ function showInstancesTab(p_domainId, p_account) {
|
|||
link.data("expanded", false);
|
||||
}
|
||||
break;
|
||||
case "vm_actions" :
|
||||
//fix for zIndex bug of IE7
|
||||
vmInstance.find('#vm_rows').each(function() {
|
||||
$(this).css("z-index", "1");
|
||||
});
|
||||
|
||||
vmInstance.find('#vm_actions_container').each(function() {
|
||||
$(this).css("z-ndex", "2");
|
||||
});
|
||||
|
||||
vmInstance.find("#vm_actions_container").slideDown("fast");
|
||||
case "vm_actions" :
|
||||
if (currentVMAction != null) currentVMAction.hide();
|
||||
currentVMAction = vmInstance.find("#vm_actions_container").slideDown("fast");
|
||||
break;
|
||||
case "vm_actions_close" :
|
||||
vmInstance.find("#vm_actions_container").hide();
|
||||
|
|
@ -1090,9 +1084,14 @@ function showInstancesTab(p_domainId, p_account) {
|
|||
return false;
|
||||
});
|
||||
|
||||
// FUNCTION: Parses the JSON object for VM Instances and applies it to the vm template
|
||||
function vmJSONToTemplate(instanceJSON, instanceTemplate) {
|
||||
instanceTemplate.attr("id","vm"+instanceJSON.id);
|
||||
// FUNCTION: Parses the JSON object for VM Instances and applies it to the vm template
|
||||
function vmJSONToTemplate(instanceJSON, instanceTemplate, isNew) {
|
||||
instanceTemplate.attr("id","vm"+instanceJSON.id);
|
||||
if (isNew != undefined && isNew) {
|
||||
instanceTemplate.find("#vm_rows").attr("style", "z-index: "+(rowZIndexGlobal++));
|
||||
} else {
|
||||
instanceTemplate.find("#vm_rows").attr("style", "z-index: "+(rowZIndex--));
|
||||
}
|
||||
|
||||
// Setup
|
||||
var vmName = getVmName(instanceJSON.name, instanceJSON.displayname);
|
||||
|
|
@ -1702,7 +1701,7 @@ function showInstancesTab(p_domainId, p_account) {
|
|||
vmInstance.find("#vm_loading_container").hide();
|
||||
if (result.jobstatus == 1) {
|
||||
// Succeeded
|
||||
vmJSONToTemplate(result.virtualmachine[0], vmInstance);
|
||||
vmJSONToTemplate(result.virtualmachine[0], vmInstance, true);
|
||||
if (result.virtualmachine[0].passwordenabled == 'true') {
|
||||
vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your instance has been successfully created. Your new password is : <b>" + result.virtualmachine[0].password + "</b> . Please change it as soon as you log into your new instance");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue