From b06a633f25aec303e867c6109fb97d63d9ee1f73 Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Fri, 31 Jul 2015 15:09:03 +0300 Subject: bitbake: toastergui: Implement new project navigation Change the structure of the project page to include a navigation menu and top tab navigation. Remove old breadcrumb method. [YOCTO #7329] (Bitbake rev: 66fa0dd988e01ec79e74be7a5697eaa3b4f017d8) Signed-off-by: Michael Wood Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/layerdetails.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bitbake/lib/toaster/toastergui/static/js/layerdetails.js') diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js index 0accd971d4..e522373b3f 100644 --- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js +++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js @@ -15,6 +15,19 @@ function layerDetailsPageInit (ctx) { layerDepBtn.removeAttr("disabled"); }); + $(".breadcrumb li:first a").click(function(e){ + /* By default this link goes to the project configuration page. However + * if we have some builds we go there instead of the default href + */ + libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){ + if (prjInfo.builds && prjInfo.builds.length > 0) { + window.location.replace(libtoaster.ctx.projectBuildsUrl); + e.preventDefault(); + return; + } + }); + }); + function addRemoveDep(depLayerId, add, doneCb) { var data = { layer_version_id : ctx.layerVersion.id }; if (add) -- cgit v1.2.3-54-g00ecf