mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-27 09:48:21 +01:00
force jquery to disable cache
This commit is contained in:
parent
3f05659940
commit
11b8d0b2de
@ -821,6 +821,7 @@ namespace OS {
|
|||||||
* @export
|
* @export
|
||||||
*/
|
*/
|
||||||
export function boot(): void {
|
export function boot(): void {
|
||||||
|
$.ajaxSetup({ cache: false });
|
||||||
//first login
|
//first login
|
||||||
console.log("Booting system");
|
console.log("Booting system");
|
||||||
API.handle
|
API.handle
|
||||||
@ -1135,7 +1136,7 @@ namespace OS {
|
|||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
const q = announcer.getMID();
|
const q = announcer.getMID();
|
||||||
API.loading(q, p);
|
API.loading(q, p);
|
||||||
const xhr = $.ajax({
|
return $.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: p,
|
url: p,
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
@ -1154,7 +1155,6 @@ namespace OS {
|
|||||||
})
|
})
|
||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
API.loaded(q, p, "OK");
|
API.loaded(q, p, "OK");
|
||||||
xhr.abort();
|
|
||||||
return resolve(data);
|
return resolve(data);
|
||||||
})
|
})
|
||||||
.fail(function (j, s, e) {
|
.fail(function (j, s, e) {
|
||||||
@ -1223,7 +1223,7 @@ namespace OS {
|
|||||||
const formd = new FormData();
|
const formd = new FormData();
|
||||||
formd.append("path", d);
|
formd.append("path", d);
|
||||||
formd.append("upload", file);
|
formd.append("upload", file);
|
||||||
const xhr = $.ajax({
|
return $.ajax({
|
||||||
url: p,
|
url: p,
|
||||||
data: formd,
|
data: formd,
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -1232,7 +1232,6 @@ namespace OS {
|
|||||||
})
|
})
|
||||||
.done(function (data) {
|
.done(function (data) {
|
||||||
tasks.push("OK");
|
tasks.push("OK");
|
||||||
xhr.abort();
|
|
||||||
if (tasks.length == n_files)
|
if (tasks.length == n_files)
|
||||||
{
|
{
|
||||||
API.loaded(q, p, "OK");
|
API.loaded(q, p, "OK");
|
||||||
|
Loading…
Reference in New Issue
Block a user