Non-git layers UI fixes
cover Non-git layers UI fixes
This series fixes some small UI-related issues in the non-git layers functionality.
Belen Barros Pena (3):
toaster: layer details Layout fixes
toaster: import layer Layout fixes
toaster: layer details Fix "edit" form interaction
bitbake/lib/toaster/toastergui/static/css/default.css | 9 ++++++++- bitbake/lib/toaster/toastergui/static/js/layerdetails.js | 8 ++++---- bitbake/lib/toaster/toastergui/templates/importlayer.html | 12 +++++++----- bitbake/lib/toaster/toastergui/templates/layerdetails.html | 7 +++---- 4 files changed, 22 insertions(+), 14 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/3 toaster: layer details Layout fixes
The layout of the layer details page was looking a bit awkward. This commit tidies things up.
--- bitbake/lib/toaster/toastergui/static/css/default.css | 8 +++++++- bitbake/lib/toaster/toastergui/templates/layerdetails.html | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-)
bitbake/lib/toaster/toastergui/static/css/default.css +7 -1
@@ -161,7 +161,13 @@ dd .glyphicon-edit { margin-left: 5px; } /* Style the forms and definition lists in the layer details pages */ #change-repo-form .form-control { width: 17em; } +#information { margin-bottom: 5em; } #information dd > form { margin-bottom: 5px; margin-top: 5px; } +#edit-layer-source-form fieldset { margin-top: 20px; } +#directory-info, +#git-repo-info { margin-top: 20px; } +#layer-dir-path-in-details { width: 55%; } +.add-deps .form-control { width: 15em; } /* Style the forms and definition lists in the BitBake variables page */ .variable-list { margin-bottom: 20px; }
@@ -196,7 +202,7 @@ h2 { margin-bottom: 25px; } .tt-suggestion:active { background-color: #f5f5f5; cursor: pointer; } /* Style the import layer form controls*/ -legend { border: none; margin-top: 20px; } +legend { border: none; } .radioLegend { margin-bottom: 0; } #layer-name-ctrl { margin-top: 20px; } #import-layer-name,
bitbake/lib/toaster/toastergui/templates/layerdetails.html +1 -1
@@ -258,7 +258,7 @@ <span class="glyphicon glyphicon-question-sign get-help" title="Other layers this layer depends upon"></span> </h3> - <ul class="list-unstyled current-value" id="layer-deps-list"> + <ul class="list-unstyled current-value lead" id="layer-deps-list"> {% for ld in layerversion.dependencies.all %} <li data-layer-id="{{ld.depends_on.id}}"> <a data-toggle="tooltip" title="{{ld.depends_on.layer.vcs_url}} | {{ld.depends_on.get_vcs_reference}}" href="{% url 'layerdetails' project.id ld.depends_on.id %}">{{ld.depends_on.layer.name}}</a>
Signature · 1 line
1.9.1
PATCH 2/3 toaster: import layer Layout fixes
In reply to Belen Barros PenaThe layout of the import layer form was looking a bit awkward. This commit tidies things up a bit.
--- bitbake/lib/toaster/toastergui/static/css/default.css | 1 + bitbake/lib/toaster/toastergui/templates/importlayer.html | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-)
bitbake/lib/toaster/toastergui/static/css/default.css +1 -0
@@ -203,6 +203,7 @@ h2 { margin-bottom: 25px; } /* Style the import layer form controls*/ legend { border: none; } +fieldset.fields-apart-from-layer-name { margin-top: 20px; } .radioLegend { margin-bottom: 0; } #layer-name-ctrl { margin-top: 20px; } #import-layer-name,
bitbake/lib/toaster/toastergui/templates/importlayer.html +7 -5
@@ -113,16 +113,18 @@ <span class="glyphicon glyphicon-question-sign get-help" title="You can provide a Git branch, a tag or a commit SHA as the revision"></span> </label> <input type="text" class="form-control" id="layer-git-ref" required> - <span class="help-inline" style="diaply:none;" id="invalid-layer-revision-hint"></span> + <span class="help-inline" style="display:none;" id="invalid-layer-revision-hint"></span> </div> </fieldset> <fieldset class="fields-apart-from-layer-name" id="local-dir" style="display:none;"> <legend>Layer directory information</legend> - <label for="local-dir-path" class="control-label">Enter the absolute path to the layer directory</label> - <input type="text" class="form-control" id="local-dir-path" required/> - <p class="help-block" id="hintError-dir-path-starts-with-slash" style="display:none;">The absolute path must start with "/".</p> - <p class="help-block" id="hintError-dir-path" style="display:none;">The directory path cannot include spaces or any of these characters: . \ ? % * : | " " < ></p> + <div class="form-group"> + <label for="local-dir-path" class="control-label">Enter the absolute path to the layer directory</label> + <input type="text" class="form-control" id="local-dir-path" required/> + <p class="help-block" id="hintError-dir-path-starts-with-slash" style="display:none;">The absolute path must start with "/".</p> + <p class="help-block" id="hintError-dir-path" style="display:none;">The directory path cannot include spaces or any of these characters: . \ ? % * : | " " < ></p> + </div> </fieldset> <fieldset class="fields-apart-from-layer-name">
Signature · 1 line
1.9.1
PATCH 3/3 toaster: layer details Fix "edit" form interaction
In reply to Belen Barros PenaMake 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/lib/toaster/toastergui/static/js/layerdetails.js | 8 ++++---- bitbake/lib/toaster/toastergui/templates/layerdetails.html | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-)
bitbake/lib/toaster/toastergui/static/js/layerdetails.js +4 -4
@@ -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() {
bitbake/lib/toaster/toastergui/templates/layerdetails.html +2 -3
@@ -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>
Signature · 1 line
1.9.1