1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 13:09:50 +00:00

bitbake: toastergui: project page Add inline project name change feature

This feature allows the project name to be changed from where ever it is
displayed in the project pages.

[YOCTO #7329]

(Bitbake rev: 81cb1cd1aa900f29a25d14dce93d301cd6b6fdb7)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Wood
2015-07-31 15:09:23 +03:00
committed by Richard Purdie
parent c76137e25b
commit 829fe32621
2 changed files with 39 additions and 1 deletions
@@ -5,6 +5,10 @@ function basePageInit(ctx) {
var newBuildButton = $("#new-build-button");
var newBuildTargetInput;
var newBuildTargetBuildBtn;
var projectNameForm = $("#project-name-change-form");
var projectName = $("#project-name");
var projectNameFormToggle = $("#project-change-form-toggle");
var projectNameChangeCancel = $("#project-name-change-cancel");
/* initially the current project is used unless overridden by the new build
* button in top right nav
@@ -16,6 +20,31 @@ function basePageInit(ctx) {
var newBuildProjectInput = $("#new-build-button #project-name-input");
var newBuildProjectSaveBtn = $("#new-build-button #save-project-button");
/* Project name change functionality */
projectNameFormToggle.click(function(e){
e.preventDefault();
$(this).add(projectName).hide();
projectNameForm.fadeIn();
});
projectNameChangeCancel.click(function(e){
e.preventDefault();
projectNameForm.hide();
projectName.add(projectNameFormToggle).fadeIn();
});
$("#project-name-change-btn").click(function(e){
var newProjectName = $("#project-name-change-input").val();
libtoaster.editCurrentProject({ projectName: newProjectName },function (){
projectName.text(newProjectName);
libtoaster.ctx.projectName = newProjectName;
projectNameChangeCancel.click();
});
});
_checkProjectBuildable();