[bitbake-devel] [PATCH 18/27] toaster: layerdetails Don't remove alert from dom on dismissal

Alex DAMIAN alexandru.damian at intel.com
Mon Feb 9 18:01:48 UTC 2015


From: Michael Wood <michael.g.wood at intel.com>

When dismissing the alert we actually want to keep the alert area still
in the dom for the use of future alerts. The default behaviour is to
remove it from the dom. Hide it again instead.

Signed-off-by: Michael Wood <michael.g.wood at intel.com>
---
 lib/toaster/toastergui/static/js/layerdetails.js   | 2 ++
 lib/toaster/toastergui/templates/layerdetails.html | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/toaster/toastergui/static/js/layerdetails.js b/lib/toaster/toastergui/static/js/layerdetails.js
index 9339ae8..99552de 100644
--- a/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/lib/toaster/toastergui/static/js/layerdetails.js
@@ -261,6 +261,8 @@ function layerDetailsPageInit (ctx) {
     $("#alert-area").show();
   }
 
+  $("#dismiss-alert").click(function(){ $(this).parent().hide() });
+
   /* Add or remove this layer from the project */
   addRmLayerBtn.click(function() {
     var directive = $(this).data('directive');
diff --git a/lib/toaster/toastergui/templates/layerdetails.html b/lib/toaster/toastergui/templates/layerdetails.html
index 7a1a22d..0321a0b 100644
--- a/lib/toaster/toastergui/templates/layerdetails.html
+++ b/lib/toaster/toastergui/templates/layerdetails.html
@@ -72,7 +72,7 @@
 
     <div class="row-fluid span7 tabbable">
         <div class="alert alert-info lead" id="alert-area" style="display:none">
-          <button type="button" class="close" id="dismiss-alert" data-dismiss="alert">&times;</button>
+          <button type="button" class="close" id="dismiss-alert">&times;</button>
           <span id="alert-msg"></span>
         </div>
         <ul class="nav nav-pills">
-- 
1.9.1




More information about the bitbake-devel mailing list