[oe-commits] [bitbake] 11/18: toaster: layer details Fix "edit" form interaction

git at git.openembedded.org git at git.openembedded.org
Tue Sep 6 09:37:46 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit bd08abe7c1f5fc96ee73c20b2c9d10a591a5f69c
Author: Belen Barros Pena <belen.barros.pena at linux.intel.com>
AuthorDate: Mon Sep 5 15:29:26 2016 +0100

    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.
    
    Signed-off-by: Belen Barros Pena <belen.barros.pena at linux.intel.com>
    Signed-off-by: Michael Wood <michael.g.wood at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/toaster/toastergui/static/js/layerdetails.js   | 8 ++++----
 lib/toaster/toastergui/templates/layerdetails.html | 5 ++---
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/lib/toaster/toastergui/static/js/layerdetails.js b/lib/toaster/toastergui/static/js/layerdetails.js
index 5fd7274..8165bad 100644
--- a/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/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/lib/toaster/toastergui/templates/layerdetails.html b/lib/toaster/toastergui/templates/layerdetails.html
index 7dd0c47..0594b55 100644
--- a/lib/toaster/toastergui/templates/layerdetails.html
+++ b/lib/toaster/toastergui/templates/layerdetails.html
@@ -130,8 +130,8 @@
 
           <!-- 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
@@ -200,8 +200,7 @@
                    <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>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list