summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-10-05 17:08:53 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-06 11:41:48 +0100
commit7f67977518d69dc84cbbcc4cf1ea859c51e57d18 (patch)
tree69db092afd84dae2d7af07af4da24083eca01412 /bitbake
parent8df56061f63b63b77a0c7a7ddd75812e3b5a88c4 (diff)
downloadpoky-7f67977518d69dc84cbbcc4cf1ea859c51e57d18.tar.gz
bitbake: toaster: Delete notification update front end implementation to design
Update the delete notifications to reflect feedback from design review comments. (Bitbake rev: e47a1cc160c0f1da060884a8585403b35375fb09) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/toastergui/api.py2
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/layerdetails.js2
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/libtoaster.js2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/base.html2
-rw-r--r--bitbake/lib/toaster/toastergui/templates/basebuildpage.html6
5 files changed, 10 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/api.py b/bitbake/lib/toaster/toastergui/api.py
index b01d4ba815..ae1f150770 100644
--- a/bitbake/lib/toaster/toastergui/api.py
+++ b/bitbake/lib/toaster/toastergui/api.py
@@ -224,7 +224,7 @@ class XhrLayer(View):
224 224
225 return JsonResponse({ 225 return JsonResponse({
226 "error": "ok", 226 "error": "ok",
227 "gotoUrl": reverse('project', args=(kwargs['pid'],)) 227 "gotoUrl": reverse('projectlayers', args=(kwargs['pid'],))
228 }) 228 })
229 229
230 230
diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
index 4c0d0426eb..9ead393cbf 100644
--- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
@@ -392,6 +392,8 @@ function layerDetailsPageInit (ctx) {
392 392
393 $("#layer-delete-confirmed").click(function(){ 393 $("#layer-delete-confirmed").click(function(){
394 394
395 $("#delete-layer-modal button[data-dismiss='modal']").hide();
396
395 var message = $('<span>You have deleted <strong>1</strong> layer from your project: <strong id="deleted-layer-name"></strong>'); 397 var message = $('<span>You have deleted <strong>1</strong> layer from your project: <strong id="deleted-layer-name"></strong>');
396 message.find("#deleted-layer-name").text(ctx.layerVersion.name); 398 message.find("#deleted-layer-name").text(ctx.layerVersion.name);
397 399
diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
index 0832ba40c3..86662b7a68 100644
--- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
+++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
@@ -342,7 +342,7 @@ var libtoaster = (function () {
342 } 342 }
343 343
344 function _showChangeNotification(message){ 344 function _showChangeNotification(message){
345 $(".alert").fadeOut().promise().done(function(){ 345 $(".alert-dismissible").fadeOut().promise().done(function(){
346 var alertMsg = $("#change-notification-msg"); 346 var alertMsg = $("#change-notification-msg");
347 347
348 alertMsg.html(message); 348 alertMsg.html(message);
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html
index c1b1417a76..496dd6eab8 100644
--- a/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/bitbake/lib/toaster/toastergui/templates/base.html
@@ -74,7 +74,7 @@
74 </div> 74 </div>
75 75
76 <div id="change-notification" class="alert alert-info alert-dismissible change-notification" style="display:none"> 76 <div id="change-notification" class="alert alert-info alert-dismissible change-notification" style="display:none">
77 <button type="button" class="close" id="hide-alert" data-dismiss="alert">&times;</button> 77 <button type="button" class="close" id="hide-alert" data-toggle="alert">&times;</button>
78 <span id="change-notification-msg"></span> 78 <span id="change-notification-msg"></span>
79 </div> 79 </div>
80 80
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
index 0b6ef56380..f5eee96516 100644
--- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
+++ b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
@@ -28,6 +28,8 @@
28 if (data.error !== "ok") { 28 if (data.error !== "ok") {
29 console.warn(data.error); 29 console.warn(data.error);
30 } else { 30 } else {
31 libtoaster.setNotification("build-deleted",
32 $("#deleted-build-message").html());
31 window.location.replace(data.gotoUrl); 33 window.location.replace(data.gotoUrl);
32 } 34 }
33 }, 35 },
@@ -61,7 +63,9 @@
61 }); 63 });
62 </script> 64 </script>
63 65
64 66<span style="display:none" id="deleted-build-message">
67 You have deleted 1 build: <strong>{{build.get_sorted_target_list|field_values:"target"|join:", "}} {{build.machine}}</strong> completed on <strong>{{build.completed_on|date:"d/m/y H:i"}}</strong>
68</span>
65 69
66<div class="modal fade" tabindex="-1" role="dialog" id="delete-build-modal" style="display: none;" data-backdrop="static" data-keyboard="false"> 70<div class="modal fade" tabindex="-1" role="dialog" id="delete-build-modal" style="display: none;" data-backdrop="static" data-keyboard="false">
67 <div class="modal-dialog"> 71 <div class="modal-dialog">