mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 13:29:49 +00:00
bitbake: toaster: alerts and modals Avoid modals and alerts overlaying each other
Make sure that when we spawn a modal we clear any notifications and also make sure that old notifications are cleared before showing a new one. (Bitbake rev: c7f30a673ab973a2500092d2e981a47da05fbf12) 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>
This commit is contained in:
committed by
Richard Purdie
parent
0d70606022
commit
d209f8b7af
@@ -6,7 +6,12 @@
|
||||
* addToProject: Whether to add layers to project on accept
|
||||
* successAdd: function to run on success
|
||||
*/
|
||||
function showLayerDepsModal(layer, dependencies, title, body, addToProject, successAdd) {
|
||||
function showLayerDepsModal(layer,
|
||||
dependencies,
|
||||
title,
|
||||
body,
|
||||
addToProject,
|
||||
successAdd) {
|
||||
|
||||
if ($("#dependencies-modal").length === 0) {
|
||||
$.get(libtoaster.ctx.htmlUrl + "/layer_deps_modal.html", function(html){
|
||||
@@ -43,7 +48,10 @@ function showLayerDepsModal(layer, dependencies, title, body, addToProject, succ
|
||||
|
||||
$("#dependencies-modal").data("deps", dependencies);
|
||||
|
||||
$('#dependencies-modal').modal('show');
|
||||
/* Clear any alert notifications before showing the modal */
|
||||
$(".alert").fadeOut(function(){
|
||||
$('#dependencies-modal').modal('show');
|
||||
});
|
||||
|
||||
/* Discard the old submission function */
|
||||
$("#dependencies-modal-form").unbind('submit');
|
||||
|
||||
Reference in New Issue
Block a user