mirror of https://github.com/JohnHammond/CTFd.git
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 #1275bulk-clear-sessions
parent
ae1c2ec50d
commit
348fe5504e
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
|
@ -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
Loading…
Reference in New Issue