summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-02-03 16:05:15 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-10 23:07:49 +0000
commita1347a150af1964a7063d9577497ef5ad11227b8 (patch)
treead32f5e2faf62da28cb343126a8cf2714cafe9c3
parent479338cc7b43b55740ba2396d94dd88c3d8fc445 (diff)
downloadpoky-a1347a150af1964a7063d9577497ef5ad11227b8.tar.gz
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>
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/machines.js8
-rw-r--r--bitbake/lib/toaster/toastergui/templates/machines.html4
2 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/machines.js b/bitbake/lib/toaster/toastergui/static/js/machines.js
index a3ea43baed..1b7ea36893 100644
--- a/bitbake/lib/toaster/toastergui/static/js/machines.js
+++ b/bitbake/lib/toaster/toastergui/static/js/machines.js
@@ -24,7 +24,7 @@ function machinesPageInit (ctx) {
24 24
25 /* If we have added layer dependencies */ 25 /* If we have added layer dependencies */
26 if (depsList) { 26 if (depsList) {
27 alertMsg.append("You have added <strong>"+(depsList.length+1)+"</strong> layers: <span id=\"layer-affected-name\"></span> and its dependencies "); 27 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 ");
28 28
29 /* Build the layer deps list */ 29 /* Build the layer deps list */
30 depsList.map(function(layer, i){ 30 depsList.map(function(layer, i){
@@ -40,14 +40,18 @@ function machinesPageInit (ctx) {
40 alertMsg.append(link); 40 alertMsg.append(link);
41 }); 41 });
42 } else { 42 } else {
43 alertMsg.append("You have added <strong>1</strong> layer: <span id=\"layer-affected-name\"></span>"); 43 alertMsg.append("You have added <strong>1</strong> layer to <a id=\"project-affected-name\"></a>: <strong id=\"layer-affected-name\"></strong>");
44 } 44 }
45 45
46 var layerName = addLayerBtn.data('layer-name'); 46 var layerName = addLayerBtn.data('layer-name');
47 alertMsg.children("#layer-affected-name").text(layerName); 47 alertMsg.children("#layer-affected-name").text(layerName);
48 alertMsg.children("#project-affected-name").text(ctx.projectName).attr('href', ctx.projectPageUrl);
49
48 $("#alert-area").show(); 50 $("#alert-area").show();
49 } 51 }
50 52
53 $("#dismiss-alert").click(function(){ $(this).parent().hide() });
54
51 /* Add or remove this layer from the project */ 55 /* Add or remove this layer from the project */
52 $(".add-layer").click(function() { 56 $(".add-layer").click(function() {
53 var btn = $(this); 57 var btn = $(this);
diff --git a/bitbake/lib/toaster/toastergui/templates/machines.html b/bitbake/lib/toaster/toastergui/templates/machines.html
index e3329bf238..487d6b73c1 100644
--- a/bitbake/lib/toaster/toastergui/templates/machines.html
+++ b/bitbake/lib/toaster/toastergui/templates/machines.html
@@ -13,6 +13,7 @@
13 $(document).ready(function (){ 13 $(document).ready(function (){
14 var ctx = { 14 var ctx = {
15 projectPageUrl : "{% url 'project' project.id %}", 15 projectPageUrl : "{% url 'project' project.id %}",
16 projectName : "{{project.name}}",
16 xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}", 17 xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}",
17 projectId : {{project.id}}, 18 projectId : {{project.id}},
18 xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}", 19 xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}",
@@ -35,9 +36,8 @@
35</div> 36</div>
36 37
37<div class="alert alert-info lead" id="alert-area" style="display:none"> 38<div class="alert alert-info lead" id="alert-area" style="display:none">
38 <button type="button" class="close" id="dismiss-alert" data-dismiss="alert">&times;</button> 39 <button type="button" class="close" id="dismiss-alert">&times;</button>
39 <span id="alert-msg"></span> 40 <span id="alert-msg"></span>
40 <p style="margin-top:10px;"><a href="{% url 'project' project.id %}">Go to project configuration</a></p>
41</div> 41</div>
42 42
43{% include "basetable_top.html" %} 43{% include "basetable_top.html" %}