Fix modal-body parameters in ezq.js and fix the progress bar for certain cases in ezProgressBar (#1278)

* Fix `modal-body` parameters in ezq.js for `ezAlert` and `ezQuery` and fix the progress bar for certain cases in `ezProgressBar`
* Mostly copied from #1275
bulk-clear-sessions
Kevin Chung 2020-03-04 19:51:01 -05:00 committed by GitHub
parent ae1c2ec50d
commit 348fe5504e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 27 additions and 26 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -58,7 +58,7 @@ const yesTpl =
'<button type="button" class="btn btn-primary" data-dismiss="modal">Yes</button>'; '<button type="button" class="btn btn-primary" data-dismiss="modal">Yes</button>';
export function ezAlert(args) { export function ezAlert(args) {
const modal = modalTpl.format(args.title, args.body); const modal = modalTpl.format(args.title);
const obj = $(modal); const obj = $(modal);
if (typeof args.body === "string") { if (typeof args.body === "string") {
@ -141,7 +141,7 @@ export function ezToast(args) {
} }
export function ezQuery(args) { export function ezQuery(args) {
const modal = modalTpl.format(args.title, args.body); const modal = modalTpl.format(args.title);
const obj = $(modal); const obj = $(modal);
if (typeof args.body === "string") { if (typeof args.body === "string") {
@ -180,9 +180,10 @@ export function ezProgressBar(args) {
} }
const progress = progressTpl.format(args.width); const progress = progressTpl.format(args.width);
const modal = modalTpl.format(args.title, progress); const modal = modalTpl.format(args.title);
const obj = $(modal); const obj = $(modal);
obj.find(".modal-body").append($(progress));
$("main").append(obj); $("main").append(obj);
return obj.modal("show"); return obj.modal("show");

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long