From a48a224eaef1f13ac06addf85963f9f6e0f3b279 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Thu, 5 Nov 2015 12:35:25 +0530 Subject: [PATCH] CLOUDSTACK-9020: Method to remove last panel from the breadcrumb Adds a new method to cloudBrowser that can remove the last panel and link/ref from the breadcrumb Signed-off-by: Rohit Yadav --- ui/scripts/ui/widgets/cloudBrowser.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/scripts/ui/widgets/cloudBrowser.js b/ui/scripts/ui/widgets/cloudBrowser.js index 007025b14be..b7a5c38b390 100644 --- a/ui/scripts/ui/widgets/cloudBrowser.js +++ b/ui/scripts/ui/widgets/cloudBrowser.js @@ -321,6 +321,14 @@ return $panel; }, + removeLastPanel: function(args) { + $('div.panel:last').stop(); // Prevent destroyed panels from animating + this.element.find('div.panel:last').remove(); + this.element.find('div.panel:last').removeClass('reduced'); + $('#breadcrumbs').find('ul li:last').remove(); + $('#breadcrumbs').find('ul div.end').remove(); + }, + /** * Clear all panels */