From 76702347a8f51871106e32f81e459c5548482e3d Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Fri, 2 Oct 2015 14:23:35 +0100 Subject: bitbake: toaster: Hide tabs and add info popups for command line builds Command line builds don't have a configuration or layers which can be modified through Toaster. Change the project builds page for the command line builds project, to hide the tabs and add some info popups in appropriate places on that page. [YOCTO #8231] (Bitbake rev: 565611749d47c915035890db60d19ab2fca7c42e) Signed-off-by: Elliot Smith Signed-off-by: Ed Bartosh Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/base.js | 12 ++-- .../toaster/toastergui/templates/mrb_section.html | 4 ++ .../toastergui/templates/projecttopbar.html | 80 ++++++++++++---------- bitbake/lib/toaster/toastergui/tests.py | 41 +++++++++++ 4 files changed, 94 insertions(+), 43 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js index 895e61b2aa..6042a96ee4 100644 --- a/bitbake/lib/toaster/toastergui/static/js/base.js +++ b/bitbake/lib/toaster/toastergui/static/js/base.js @@ -6,6 +6,7 @@ function basePageInit(ctx) { var newBuildTargetInput; var newBuildTargetBuildBtn; var projectNameForm = $("#project-name-change-form"); + var projectNameContainer = $("#project-name-container"); var projectName = $("#project-name"); var projectNameFormToggle = $("#project-change-form-toggle"); var projectNameChangeCancel = $("#project-name-change-cancel"); @@ -23,24 +24,21 @@ function basePageInit(ctx) { /* Project name change functionality */ projectNameFormToggle.click(function(e){ e.preventDefault(); - - $(this).add(projectName).hide(); + projectNameContainer.hide(); projectNameForm.fadeIn(); }); projectNameChangeCancel.click(function(e){ e.preventDefault(); - projectNameForm.hide(); - projectName.add(projectNameFormToggle).fadeIn(); + projectNameContainer.fadeIn(); }); $("#project-name-change-btn").click(function(e){ var newProjectName = $("#project-name-change-input").val(); - libtoaster.editCurrentProject({ projectName: newProjectName },function (){ - - projectName.text(newProjectName); + libtoaster.editCurrentProject({ projectName: newProjectName }, function (){ + projectName.html(newProjectName); libtoaster.ctx.projectName = newProjectName; projectNameChangeCancel.click(); }); diff --git a/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/bitbake/lib/toaster/toastergui/templates/mrb_section.html index b29f650f5d..53f40d0f14 100644 --- a/bitbake/lib/toaster/toastergui/templates/mrb_section.html +++ b/bitbake/lib/toaster/toastergui/templates/mrb_section.html @@ -8,6 +8,10 @@ {%if mrb_type == 'project' %}

Latest project builds + + {% if project.is_default %} + + {% endif %}

{% else %}