]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: layer details Fix "edit" form interaction
authorBelen Barros Pena <belen.barros.pena@linux.intel.com>
Mon, 5 Sep 2016 14:29:26 +0000 (15:29 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 7 Sep 2016 23:33:47 +0000 (00:33 +0100)
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 <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/toaster/toastergui/static/js/layerdetails.js
bitbake/lib/toaster/toastergui/templates/layerdetails.html

index 5fd72748945b00985ed5dfb57284137565cfc632..8165bad5dd6d37c1e09976a9a5b1ca5beedd898d 100644 (file)
@@ -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() {
index 7dd0c47a9e3e31c700c82f32e212d6cb4081c3d4..0594b551aafd651e4c441635d761d7c159df307d 100644 (file)
 
           <!-- layer details pane -->
           <div id="information" class="tab-pane active">
-           {% if layerversion.layer.local_source_dir %}
            <h3>Layer source code location</h3>
+           {% if layerversion.layer.local_source_dir %}
            <dl class="dl-horizontal" id="directory-info">
              <dt>
                Path to the layer directory
                    <input type="radio" name="source-location" id="repo" value="repo">
                    In a <strong>Git repository</strong>
                  </label>
-                 <p class="help-block" style="margin-left:20px;width:70%;">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.</p>
+                 <p class="help-block" style="margin-left:20px;width:70%;">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.</p>
                </div>
                <div class="radio" style="margin-top:15px;">
                  <label>