浏览代码

toastergui: layerBtn use libtoaster for change notification

Use the common functionality for change notifications.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Michael Wood 8 年之前
父节点
当前提交
79af72e1b8

+ 1 - 3
lib/toaster/toastergui/static/js/layerBtn.js

@@ -11,8 +11,7 @@ function layerBtnsInit(ctx) {
     var thisBtn = $(this);
 
     libtoaster.addRmLayer(layerObj, add, function (layerDepsList){
-      var alertMsg = $("#alert-msg");
-      alertMsg.html(libtoaster.makeLayerAddRmAlertMsg(layerObj, layerDepsList, add));
+      libtoaster.showChangeNotification(libtoaster.makeLayerAddRmAlertMsg(layerObj, layerDepsList, add));
 
       /* In-cell notification */
       var notification = $('<div id="temp-inline-notify" style="display: none; font-size: 11px; line-height: 1.3;" class="tooltip-inner"></div>');
@@ -53,7 +52,6 @@ function layerBtnsInit(ctx) {
         });
       }
 
-      $("#zone1alerts, #zone1alerts *").fadeIn();
     });
   });
 

+ 1 - 6
lib/toaster/toastergui/templates/generic-toastertable-page.html

@@ -10,12 +10,7 @@
   <i class="icon-question-sign get-help heading-help" title="This page lists {{title}} compatible with the release selected for this project, which is {{project.release.description}}"></i>
   {% endif %}
 </h2>
-<div id="zone1alerts" style="display:none">
-  <div class="alert alert-info lead">
-    <button type="button" class="close" id="hide-alert">&times;</button>
-    <span id="alert-msg"></span>
-  </div>
-</div>
+
 {% url table_name project.id as xhr_table_url %}
 {% include "toastertable.html" %}