]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: toaster: Delete notification update front end implementation to design
authorMichael Wood <michael.g.wood@intel.com>
Thu, 6 Oct 2016 00:08:53 +0000 (17:08 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Oct 2016 10:41:48 +0000 (11:41 +0100)
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>
bitbake/lib/toaster/toastergui/api.py
bitbake/lib/toaster/toastergui/static/js/layerdetails.js
bitbake/lib/toaster/toastergui/static/js/libtoaster.js
bitbake/lib/toaster/toastergui/templates/base.html
bitbake/lib/toaster/toastergui/templates/basebuildpage.html

index b01d4ba8159155154be616896eac5efea1a5eced..ae1f150770569835f692298d619ab9e824cfba92 100644 (file)
@@ -224,7 +224,7 @@ class XhrLayer(View):
 
         return JsonResponse({
             "error": "ok",
-            "gotoUrl": reverse('project', args=(kwargs['pid'],))
+            "gotoUrl": reverse('projectlayers', args=(kwargs['pid'],))
         })
 
 
index 4c0d0426ebd0c883d20e14702a1d9171bcbe72bf..9ead393cbf022036dd5e4ce8da30b852572559a4 100644 (file)
@@ -392,6 +392,8 @@ function layerDetailsPageInit (ctx) {
 
   $("#layer-delete-confirmed").click(function(){
 
+    $("#delete-layer-modal button[data-dismiss='modal']").hide();
+
     var message = $('<span>You have deleted <strong>1</strong> layer from your project: <strong id="deleted-layer-name"></strong>');
     message.find("#deleted-layer-name").text(ctx.layerVersion.name);
 
index 0832ba40c34003890c41ddc10247dbc813d04dd2..86662b7a6850b523f8cd69a606bff030e1990b99 100644 (file)
@@ -342,7 +342,7 @@ var libtoaster = (function () {
   }
 
   function _showChangeNotification(message){
-    $(".alert").fadeOut().promise().done(function(){
+    $(".alert-dismissible").fadeOut().promise().done(function(){
       var alertMsg = $("#change-notification-msg");
 
       alertMsg.html(message);
index c1b1417a7630a948cacbe099b5460651727da9bd..496dd6eab8d99781419a5eab4a07f1be4a2c2502 100644 (file)
@@ -74,7 +74,7 @@
     </div>
 
     <div id="change-notification" class="alert alert-info alert-dismissible change-notification" style="display:none">
-      <button type="button" class="close" id="hide-alert" data-dismiss="alert">&times;</button>
+      <button type="button" class="close" id="hide-alert" data-toggle="alert">&times;</button>
       <span id="change-notification-msg"></span>
     </div>
 
index 0b6ef563800dae93ae1b352a0563070e94baac08..f5eee96516eb52968282a063e38709323b488d01 100644 (file)
@@ -28,6 +28,8 @@
             if (data.error !== "ok") {
               console.warn(data.error);
             } else {
+              libtoaster.setNotification("build-deleted",
+                $("#deleted-build-message").html());
              window.location.replace(data.gotoUrl);
             }
           },
@@ -61,7 +63,9 @@
   });
  </script>
 
-
+<span style="display:none" id="deleted-build-message">
+  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>
+</span>
 
 <div class="modal fade" tabindex="-1" role="dialog" id="delete-build-modal" style="display: none;" data-backdrop="static" data-keyboard="false">
   <div class="modal-dialog">