diff --git a/CTFd/themes/admin/static/js/ezq.js b/CTFd/themes/admin/static/js/ezq.js
index ecc3777..1a45b7d 100644
--- a/CTFd/themes/admin/static/js/ezq.js
+++ b/CTFd/themes/admin/static/js/ezq.js
@@ -16,6 +16,11 @@ var modal = '
' +
'
' +
'';
+var progress = '';
+
function ezal(args){
var res = modal.format(args.title, args.body);
var obj = $(res);
@@ -28,7 +33,9 @@ function ezal(args){
$(obj).on('hidden.bs.modal', function (e) {
$(this).modal('dispose');
- })
+ });
+
+ return obj;
}
function ezq(args){
@@ -51,4 +58,16 @@ function ezq(args){
});
obj.modal('show');
+
+ return obj;
+}
+
+function ezpg(args){
+ var bar = progress.format(args.width);
+ var res = modal.format(args.title, bar);
+
+ var obj = $(res);
+ $('main').append(obj);
+
+ return obj.modal('show');
}
\ No newline at end of file
diff --git a/CTFd/themes/admin/static/js/utils.js b/CTFd/themes/admin/static/js/utils.js
index 1625dd2..2f2171f 100644
--- a/CTFd/themes/admin/static/js/utils.js
+++ b/CTFd/themes/admin/static/js/utils.js
@@ -58,7 +58,7 @@ function htmlentities(string) {
}
// http://stepansuvorov.com/blog/2014/04/jquery-put-and-delete/
-jQuery.each(["put", "delete"], function(i, method) {
+jQuery.each(["patch", "put", "delete"], function(i, method) {
jQuery[method] = function(url, data, callback, type) {
if (jQuery.isFunction(data)) {
type = type || callback;
diff --git a/CTFd/themes/core/static/js/ezq.js b/CTFd/themes/core/static/js/ezq.js
index ecc3777..1a45b7d 100644
--- a/CTFd/themes/core/static/js/ezq.js
+++ b/CTFd/themes/core/static/js/ezq.js
@@ -16,6 +16,11 @@ var modal = '' +
'
' +
'';
+var progress = '';
+
function ezal(args){
var res = modal.format(args.title, args.body);
var obj = $(res);
@@ -28,7 +33,9 @@ function ezal(args){
$(obj).on('hidden.bs.modal', function (e) {
$(this).modal('dispose');
- })
+ });
+
+ return obj;
}
function ezq(args){
@@ -51,4 +58,16 @@ function ezq(args){
});
obj.modal('show');
+
+ return obj;
+}
+
+function ezpg(args){
+ var bar = progress.format(args.width);
+ var res = modal.format(args.title, bar);
+
+ var obj = $(res);
+ $('main').append(obj);
+
+ return obj.modal('show');
}
\ No newline at end of file
diff --git a/CTFd/themes/core/static/js/utils.js b/CTFd/themes/core/static/js/utils.js
index 1809f32..2f2171f 100644
--- a/CTFd/themes/core/static/js/utils.js
+++ b/CTFd/themes/core/static/js/utils.js
@@ -58,7 +58,7 @@ function htmlentities(string) {
}
// http://stepansuvorov.com/blog/2014/04/jquery-put-and-delete/
-jQuery.each(["put", "delete"], function(i, method) {
+jQuery.each(["patch", "put", "delete"], function(i, method) {
jQuery[method] = function(url, data, callback, type) {
if (jQuery.isFunction(data)) {
type = type || callback;
@@ -74,4 +74,4 @@ jQuery.each(["put", "delete"], function(i, method) {
success: callback
});
};
-});
\ No newline at end of file
+});