|
|
@ -119,6 +119,17 @@ var dialog = {
|
|
|
|
$("#close" + id).click();
|
|
|
|
$("#close" + id).click();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
create:function(conf) {
|
|
|
|
create:function(conf) {
|
|
|
|
|
|
|
|
let last = {
|
|
|
|
|
|
|
|
dlg: $("div.modal.show").last()[0],
|
|
|
|
|
|
|
|
exists: () => last.dlg,
|
|
|
|
|
|
|
|
setZIndex: (obj, offset) => {
|
|
|
|
|
|
|
|
if (!last.exists()) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let zIndex = Number($(last.dlg).css("z-index"));
|
|
|
|
|
|
|
|
obj.css("z-index", zIndex + offset);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
conf = conf || {};
|
|
|
|
conf = conf || {};
|
|
|
|
let id = conf.id || "dlg-" + uuid(),
|
|
|
|
let id = conf.id || "dlg-" + uuid(),
|
|
|
|
backdropID = id + "-backdrop",
|
|
|
|
backdropID = id + "-backdrop",
|
|
|
@ -160,6 +171,7 @@ var dialog = {
|
|
|
|
setTimeout(function(){dialog.close(id);}, conf.timeout);
|
|
|
|
setTimeout(function(){dialog.close(id);}, conf.timeout);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
last.setZIndex(dlg, 10);
|
|
|
|
dlg.modal("show");
|
|
|
|
dlg.modal("show");
|
|
|
|
$(".modal-backdrop").each(function() { // gives id to its backdrop
|
|
|
|
$(".modal-backdrop").each(function() { // gives id to its backdrop
|
|
|
|
let backdrop = $(this);
|
|
|
|
let backdrop = $(this);
|
|
|
|