CLOUDSTACK-1065: cloudstack UI - AWS Style Regions - allow user to delete region whose end point matches the current URL, but set region button on top menu to blank after the region is deleted.

This commit is contained in:
Jessica Wang 2013-03-22 12:02:27 -07:00
parent b932059d33
commit 8ecdbd8537
2 changed files with 7 additions and 2 deletions

View File

@ -136,10 +136,12 @@
region.endpoint == "http://localhost:8080/client/"
document.location.href == "http://localhost:8080/client/#"
*/
/*
if(document.location.href.indexOf(region.endpoint) != -1) {
cloudStack.dialog.notice({ message: _l('You can not remove the region that you are currently in.') });
return false;
}
}
*/
return true;
},
action: function(args) {

View File

@ -50,7 +50,10 @@
if(currentRegion != null) {
$regionSwitcherButton.find('.title').html(_s(currentRegion.name)).attr('title', _s(currentRegion.name));
}
}
else {
$regionSwitcherButton.find('.title').html('').attr('title', '');
}
}
}
});