Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id DCD4AE00F10; Fri, 2 Sep 2016 04:01:18 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id A6BC6E00F10 for ; Fri, 2 Sep 2016 04:01:14 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 02 Sep 2016 04:01:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,270,1470726000"; d="scan'208,217";a="874441368" Received: from icarus.ld.intel.com ([10.103.239.199]) by orsmga003.jf.intel.com with ESMTP; 02 Sep 2016 04:01:14 -0700 From: Belen Barros Pena To: toaster@yoctoproject.org Date: Fri, 2 Sep 2016 11:57:24 +0100 Message-Id: <1472813844-37622-4-git-send-email-belen.barros.pena@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1472813844-37622-1-git-send-email-belen.barros.pena@linux.intel.com> References: <1472813844-37622-1-git-send-email-belen.barros.pena@linux.intel.com> Subject: [PATCH 3/3] toaster: layer details Fix "edit" form interaction 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: Fri, 02 Sep 2016 11:01:18 -0000 Make sure the layer information disappears when the edit form shows, and that the layer details come back when you click the 'cancel' button in the edit form. Signed-off-by: Belen Barros Pena --- bitbake/lib/toaster/toastergui/static/js/layerdetails.js | 8 ++++---- bitbake/lib/toaster/toastergui/templates/layerdetails.html | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js index 5fd7274..8165bad 100644 --- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js +++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js @@ -423,7 +423,7 @@ function layerDetailsPageInit (ctx) { $(this).hide(); saveSourceChangesBtn.attr("disabled", "disabled"); - $("#git-repo-info", "#directory-info").hide(); + $("#git-repo-info, #directory-info").hide(); $("#edit-layer-source-form").fadeIn(); if ($("#layer-dir-path-in-details").val() == "") { //Local dir path is empty... @@ -473,9 +473,9 @@ function layerDetailsPageInit (ctx) { }); $('#cancel-changes-for-switch').click(function() { - $("#edit-layer-source-form").add("#layer-git").add("#layer-dir").fadeOut().promise().done(function(){ - editLayerSource.show(); - }); + $("#edit-layer-source-form").hide(); + $("#directory-info, #git-repo-info").fadeIn(); + editLayerSource.show(); }); saveSourceChangesBtn.click(function() { diff --git a/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/bitbake/lib/toaster/toastergui/templates/layerdetails.html index 7dd0c47..0594b55 100644 --- a/bitbake/lib/toaster/toastergui/templates/layerdetails.html +++ b/bitbake/lib/toaster/toastergui/templates/layerdetails.html @@ -130,8 +130,8 @@
- {% if layerversion.layer.local_source_dir %}

Layer source code location

+ {% if layerversion.layer.local_source_dir %}
Path to the layer directory @@ -200,8 +200,7 @@ In a Git repository -

To build the layer Toaster must be able to access the Git repository, otherwise builds will fail. Toaster will\ - fetch and checkout your chosen Git revision every time you start a build.

+

To build the layer Toaster must be able to access the Git repository, otherwise builds will fail. Toaster will fetch and checkout your chosen Git revision every time you start a build.