diff --git a/bsdialog4.js b/bsdialog4.js index 318943e..ad3ec91 100644 --- a/bsdialog4.js +++ b/bsdialog4.js @@ -1,6 +1,6 @@ /** * BSDialog4 - * @version v0.1.4.031 (2023/11/03 22:42) + * @version v0.1.5.006 (2023/11/14 17:40) */ var BSDialog = { Show: async function (options) { @@ -11,8 +11,12 @@ var BSDialog = { a.pfx = "bsdia4_"; a.body = document.getElementsByTagName("body")[0]; - a.addBackdrop(); - a.addModal(_options.ID, _options.Title, _options.Size, _options.ShowFooter, _options.EasyClose, _options.Colour); + a.addModal(_options.ID, _options.Title, _options.Size, _options.ShowFooter, _options.Colour); + + $("#" + a.pfx + _options.ID).modal({ + backdrop: _options.EasyClose, + show: true + }); if (_options.URL == null) { await a.Update({ ID: _options.ID, Body: _options.Message }); @@ -179,29 +183,9 @@ var BSDialog = { BodyURL: null, Footer: null, Size: null - }, - ShowToast: { - ID: null, - Title: "", - Message: "", - Size: "md" } }, - addBackdrop: function () { - const a = this; - - // don't allow duplicates - if (a.body.querySelectorAll(".modal-backdrop").length > 0) { - return; - } - - a.appendHtml(a.body, '
'); - - // lock background - a.body.classList.add("modal-open"); - a.body.style.overflow = "hidden"; - }, - addModal: function (id, title, size, showFooter, easyClose, closeColour) { + addModal: function (id, title, size, showFooter, closeColour) { const a = this; // don't allow duplicates @@ -211,7 +195,7 @@ var BSDialog = { } let html = ""; - html += '"+options.Message+"
"),body+='"+t.Message+"
"),s+='