mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 05:09:24 +00:00
bitbake: toaster: All machines Update layer notifications
Update layer notifications to the new wording for layer add remove notifications. Fix bug where the the alert area is being removed from the dom on dismiss instead of re-hidden (Bitbake rev: 2a571a4523dbbe9b6afcf2e6b41edf2cb059729d) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
479338cc7b
commit
a1347a150a
@@ -24,7 +24,7 @@ function machinesPageInit (ctx) {
|
||||
|
||||
/* If we have added layer dependencies */
|
||||
if (depsList) {
|
||||
alertMsg.append("You have added <strong>"+(depsList.length+1)+"</strong> layers: <span id=\"layer-affected-name\"></span> and its dependencies ");
|
||||
alertMsg.append("You have added <strong>"+(depsList.length+1)+"</strong> layers to <a id=\"project-affected-name\"></a>: <span id=\"layer-affected-name\"></span> and its dependencies ");
|
||||
|
||||
/* Build the layer deps list */
|
||||
depsList.map(function(layer, i){
|
||||
@@ -40,14 +40,18 @@ function machinesPageInit (ctx) {
|
||||
alertMsg.append(link);
|
||||
});
|
||||
} else {
|
||||
alertMsg.append("You have added <strong>1</strong> layer: <span id=\"layer-affected-name\"></span>");
|
||||
alertMsg.append("You have added <strong>1</strong> layer to <a id=\"project-affected-name\"></a>: <strong id=\"layer-affected-name\"></strong>");
|
||||
}
|
||||
|
||||
var layerName = addLayerBtn.data('layer-name');
|
||||
alertMsg.children("#layer-affected-name").text(layerName);
|
||||
alertMsg.children("#project-affected-name").text(ctx.projectName).attr('href', ctx.projectPageUrl);
|
||||
|
||||
$("#alert-area").show();
|
||||
}
|
||||
|
||||
$("#dismiss-alert").click(function(){ $(this).parent().hide() });
|
||||
|
||||
/* Add or remove this layer from the project */
|
||||
$(".add-layer").click(function() {
|
||||
var btn = $(this);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
$(document).ready(function (){
|
||||
var ctx = {
|
||||
projectPageUrl : "{% url 'project' project.id %}",
|
||||
projectName : "{{project.name}}",
|
||||
xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}",
|
||||
projectId : {{project.id}},
|
||||
xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}",
|
||||
@@ -35,9 +36,8 @@
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info lead" id="alert-area" style="display:none">
|
||||
<button type="button" class="close" id="dismiss-alert" data-dismiss="alert">×</button>
|
||||
<button type="button" class="close" id="dismiss-alert">×</button>
|
||||
<span id="alert-msg"></span>
|
||||
<p style="margin-top:10px;"><a href="{% url 'project' project.id %}">Go to project configuration</a></p>
|
||||
</div>
|
||||
|
||||
{% include "basetable_top.html" %}
|
||||
|
||||
Reference in New Issue
Block a user