From 7e2d5017be4e988df893a36976029b1ea51031f4 Mon Sep 17 00:00:00 2001 From: Sujith H Date: Tue, 10 May 2016 00:01:50 +0100 Subject: bitbake: toaster: ui handles duplicate project name in project page When already existing project name is typed by user, the ui pops up message regarding the existance of the project name. When an existing project is typed the save button will be disabled. Else user can proceed ahead by modifying the project name. [YOCTO #7005] (Bitbake rev: 05ddf48cda6690adab4c097b16387578523e751b) Signed-off-by: Sujith H Signed-off-by: Michael Wood Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/projecttopbar.js | 7 +++++++ bitbake/lib/toaster/toastergui/templates/projecttopbar.html | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js index b09f974e47..f0cd18bf48 100644 --- a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js +++ b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js @@ -25,6 +25,7 @@ function projectTopBarInit(ctx) { e.preventDefault(); projectNameForm.hide(); projectNameContainer.fadeIn(); + $("#project-name-change-input").val(projectName.text()); }); $("#project-name-change-btn").click(function(){ @@ -87,4 +88,10 @@ function projectTopBarInit(ctx) { window.location.replace(libtoaster.ctx.projectBuildsUrl); }, null); }); + + /* Call makeProjectNameValidation function */ + libtoaster.makeProjectNameValidation($("#project-name-change-input"), + $("#hint-error-project-name"), $("#validate-project-name"), + $("#project-name-change-btn")); + } diff --git a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html index 007de06ffb..e878caba8b 100644 --- a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html +++ b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html @@ -33,11 +33,12 @@ {% endif %} -- cgit v1.2.3-54-g00ecf