Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id AEF74E00708; Mon, 9 May 2016 08:27:41 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [74.125.82.43 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id A02CFE0059B for ; Mon, 9 May 2016 08:27:38 -0700 (PDT) Received: by mail-wm0-f43.google.com with SMTP id a17so193672526wme.0 for ; Mon, 09 May 2016 08:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZWRWRbTITvFRu1Kix+EodYv3YwdEt2U8xk2gl8FaOF0=; b=Z+5/WaFwZnptryoBhMGMvcE3z0hiNLK0LYuoQon8vipn7ZRWwucNUoiBt3vZEOPQQN okCAUvcGTtQs95hnsd5wUHaFZHc1FlHVX+1GMBCOEe8u65t+PYOGUKbjwBfCHoQF3MrF IAx4KcEIkImqm60H8/bQGvVKrmfK6yVdhsO7xNth0Pz5gzPGHq147s9ugwT2+v5U5hCD ObdsgaMkYY1ZApSt++lI9TZqz9uRqEFEiLXmaYuxHX7uw8HF1bqkAo/kHsgp18V/h8x6 XD+/EqQ+uQSJzY/G5n1Dgq/okWOckgJH+xCBzPvAY4NEN+drGABKtQkmS6xYqV74+y8W tX6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZWRWRbTITvFRu1Kix+EodYv3YwdEt2U8xk2gl8FaOF0=; b=H7VEcE3Mqr+5xEQMS96wYyAF2INPpYdMhghPe4RTmtj5GCq1AtzA6EESiW2n5n1bn2 Rba5PGGedrjUOHl8si7Bc87aC1xLH+jWxymFduDvEwpIM6R52sEnzEopnYwX0Bl6+q+C txQj1pFcgPynuKo1Oq826tiZ7K3QdJdKHKvXxjpSd9MgiB5UxzGhm9goeFj+MA+DeYFK yHz6xTxjdBoKmWT+iSmf6sKWnz2gOcktJwR8cLzqhQ49COaQ6wfOFb7ZPGvss1dPkgP1 ECaGeA7R90yVdl008fERpdLO1jvNi3NhzDzhnb82vMc4Rrc+pk/nxNNF9YD5AtgdVPvI DzAg== X-Gm-Message-State: AOPr4FVczgh9KgpmRK44oMAtBuBBy72daWrZ8dlPb8PCkv+xp0hdMi7YRzWnZD86koezJAGI X-Received: by 10.28.212.71 with SMTP id l68mr12139760wmg.22.1462807657664; Mon, 09 May 2016 08:27:37 -0700 (PDT) Received: from orion.home (host109-151-244-175.range109-151.btcentralplus.com. [109.151.244.175]) by smtp.gmail.com with ESMTPSA id b15sm25192732wmd.1.2016.05.09.08.27.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 May 2016 08:27:37 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Mon, 9 May 2016 16:27:29 +0100 Message-Id: <1462807651-16627-4-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1462807651-16627-1-git-send-email-michael.g.wood@intel.com> References: <1462807651-16627-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 3/5] toaster: ui handles duplicate project name in project page X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 May 2016 15:27:41 -0000 From: Sujith H 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] Signed-off-by: Sujith H --- bitbake/lib/toaster/toastergui/static/js/projecttopbar.js | 7 +++++++ bitbake/lib/toaster/toastergui/templates/projecttopbar.html | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js b/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js index b09f974..f0cd18b 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 007de06..e878cab 100644 --- a/bitbake/lib/toaster/toastergui/templates/projecttopbar.html +++ b/bitbake/lib/toaster/toastergui/templates/projecttopbar.html @@ -33,11 +33,12 @@ {% endif %} -- 2.7.4