From: Belen Barros Pena Date: Mon, 5 Sep 2016 14:29:26 +0000 (+0100) Subject: bitbake: toaster: layer details Fix "edit" form interaction X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5070f5337cd0914b16ff619f8fcd0bfd189f464;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: toaster: layer details Fix "edit" form interaction 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. (Bitbake rev: bd08abe7c1f5fc96ee73c20b2c9d10a591a5f69c) Signed-off-by: Belen Barros Pena Signed-off-by: Michael Wood Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js index 5fd72748945..8165bad5dd6 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 7dd0c47a9e3..0594b551aaf 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.