Move asynctask/asyncdownload to base

This commit is contained in:
Raphael Michel
2017-02-06 22:15:23 +01:00
parent eb4ba70be8
commit b7df5eff19
6 changed files with 40 additions and 29 deletions

View File

@@ -119,3 +119,29 @@ $(function () {
);
});
});
var waitingDialog = {
show: function (message) {
"use strict";
$("#loadingmodal").find("h1").html(message);
$("body").addClass("loading");
},
hide: function () {
"use strict";
$("body").removeClass("loading");
}
};
var ajaxErrDialog = {
show: function (c) {
"use strict";
$("#ajaxerr").html(c);
$("#ajaxerr .links").html("<a class='btn btn-default ajaxerr-close'>"
+ gettext("Close message") + "</a>");
$("body").addClass("ajaxerr");
},
hide: function () {
"use strict";
$("body").removeClass("ajaxerr");
}
};

View File

@@ -142,6 +142,14 @@ h1 .btn-sm {
}
}
body.loading #wrapper {
-webkit-filter: blur(2px);
-moz-filter: blur(2px);
-ms-filter: blur(2px);
-o-filter: blur(2px);
filter: blur(2px);
}
#loadingmodal, #ajaxerr {
position: fixed;
top: 0;
@@ -153,6 +161,7 @@ h1 .btn-sm {
text-align: center;
z-index: 900000;
visibility: hidden;
padding: 10px;
.big-icon {
margin-top: 50px;

View File

@@ -78,29 +78,3 @@ function copy_answers(idx) {
}
});
}
var waitingDialog = {
show: function (message) {
"use strict";
$("#loadingmodal").find("h1").html(message);
$("body").addClass("loading");
},
hide: function () {
"use strict";
$("body").removeClass("loading");
}
};
var ajaxErrDialog = {
show: function (c) {
"use strict";
$("#ajaxerr").html(c);
$("#ajaxerr .links").html("<a class='btn btn-default ajaxerr-close'>"
+ gettext("Close message") + "</a>");
$("body").addClass("ajaxerr");
},
hide: function () {
"use strict";
$("body").removeClass("ajaxerr");
}
};