bug 12569

Disable system navigation item when in project mode
This commit is contained in:
bfederle 2011-12-22 15:39:11 -08:00
parent c429a66306
commit deef431cc7
1 changed files with 4 additions and 3 deletions

View File

@ -123,6 +123,7 @@
var $target = $(event.target);
var $projectSwitcher = $(this);
var $container = $('html body');
var $navDisabled = $('#navigation li.projects, #navigation li.system');
if ($target.closest('.select.project-view').size()) {
$('#cloudStack3-container').addClass('project-view');
@ -131,14 +132,14 @@
.siblings().removeClass('active');
// Activate project view
$('#navigation li.projects').addClass('disabled').attr({
title: 'Projects can only be edited outside of project view.'
$navDisabled.addClass('disabled').attr({
title: 'Projects and system resources can only be edited outside of project view.'
});
cloudStack.uiCustom.projects({
$projectSelect: $projectSelect.hide().find('select')
});
} else {
$('#navigation li.projects').removeClass('disabled').attr('title', '');
$navDisabled.removeClass('disabled').attr('title', '');
$('#cloudStack3-container').removeClass('project-view');
$projectSwitcher.removeClass('alt');
$projectSelect.hide();