From deef431cc708c4ada32e80258512774356e30237 Mon Sep 17 00:00:00 2001 From: bfederle Date: Thu, 22 Dec 2011 15:39:11 -0800 Subject: [PATCH] bug 12569 Disable system navigation item when in project mode --- ui/scripts/ui/core.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/scripts/ui/core.js b/ui/scripts/ui/core.js index f9be4e10ca9..961cd50cb7f 100644 --- a/ui/scripts/ui/core.js +++ b/ui/scripts/ui/core.js @@ -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();