release/0.1.3.017 #5

Merged
Ray merged 4 commits from release/0.1.3.017 into master 2023-09-06 22:30:46 +00:00
Showing only changes of commit 0d3df02449 - Show all commits

View File

@ -35,7 +35,6 @@ var BSDialog = {
const _options = Object.assign(a.Default().PromptOptions, options);
return await new Promise((resolve, reject) => {
a.Create(id, _options.Title, _options.Message, _options.Size);
let html = '';
@ -138,10 +137,17 @@ var BSDialog = {
if (!this.isNullOrWhitespace(_options.Size)) {
modal.Modal[0].querySelectorAll(".modal-dialog").forEach(function(e) {
e.classList.remove("modal-sm");
e.classList.remove("modal-md");
e.classList.remove("modal-lg");
e.classList.remove("modal-xl");
e.classList.forEach(function(e2) {
if (e2 == "modal-dialog") {
return;
}
if (e2.startsWith("modal-")) {
e.classList.remove(e2);
}
});
e.classList.add("modal-" + _options.Size);
});
}
@ -367,30 +373,19 @@ var BSDialog = {
let modalDialog = modal.Modal[0].querySelectorAll(".modal-dialog")[0];
if (modalDialog.classList.contains('modal-sm')) {
modalDialog.classList.remove("modal-sm");
modalDialog.classList.add("modal-md");
a.Update({ ID: a.id, Size: "md" });
} else if (modalDialog.classList.contains('modal-md')) {
modalDialog.classList.remove("modal-md");
modalDialog.classList.add("modal-lg");
a.Update({ ID: a.id, Size: "lg" });
} else if (modalDialog.classList.contains('modal-lg')) {
modalDialog.classList.remove("modal-lg");
modalDialog.classList.add("modal-xl");
a.Update({ ID: a.id, Size: "xl" });
} else if (modalDialog.classList.contains('modal-xl')) {
modalDialog.classList.remove("modal-xl");
modalDialog.classList.add("modal-sm");
a.Update({ ID: a.id, Size: "sm" });
} else {
modalDialog.classList.remove("modal-sm");
modalDialog.classList.remove("modal-md");
modalDialog.classList.remove("modal-lg");
modalDialog.classList.remove("modal-xl");
modalDialog.classList.add("modal-md");
a.Update({ ID: a.id, Size: "md" });
}
},
//
// deprecated/legacy-support
// DefaultShowOptions: this.Default().ShowOptions,
// DefaultToastOptions: this.Default().ToastOptions,
// DefaultPromptOptions: this.Default().PromptOptions,
Create: async function (id, title, url, size) {
await this.Show({
ID: id,