bug 12263: Remove 'all zones' select when in project view

This commit is contained in:
Brian Federle 2011-12-02 13:26:15 -08:00
parent 3d3e0afd81
commit 5fb518662f
1 changed files with 4 additions and 2 deletions

View File

@ -70,7 +70,8 @@
success: function(json) {
var zoneObjs = json.listzonesresponse.zone;
var items = [];
if (isAdmin())
if (isAdmin() && !(cloudStack.context.projects &&
cloudStack.context.projects[0]))
items.push({id: -1, description: "All Zones"});
$(zoneObjs).each(function() {
items.push({id: this.id, description: this.name});
@ -775,7 +776,8 @@
success: function(json) {
var zoneObjs = json.listzonesresponse.zone;
var items = [];
if (isAdmin())
if (isAdmin() && !(cloudStack.context.projects &&
cloudStack.context.projects[0]))
items.push({id: -1, description: "All Zones"});
$(zoneObjs).each(function() {
items.push({id: this.id, description: this.name});