From 35a6ab71d3fa3fb11e147322ca813d03f7c55974 Mon Sep 17 00:00:00 2001 From: rstular Date: Thu, 14 May 2020 10:51:54 +0200 Subject: Bug fix --- js/gsec.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/js/gsec.js b/js/gsec.js index 925fed1..3c3fdc5 100644 --- a/js/gsec.js +++ b/js/gsec.js @@ -82,14 +82,13 @@ class gsec { }, crossDomain: true, url: getUrl, - cache: false, type: "GET", dataType: "html", - success: (getData) => { + success: (data, textStatus, request) => { if (useDiffAction == true) { useDiffAction = getUrl; } - this.parseAndPost(getData, params, formId, useDiffAction).then((value) => { + this.parseAndPost(data, params, formId, useDiffAction).then((value) => { resolve(value); }); }, @@ -113,7 +112,7 @@ class gsec { if (response.code === 302) { resolve(true); } else { - if (!!(parsed.getElementById("lblMsg"))) { // če obstaja lblMsg (napaka pri prijavi) + if (!(parsed.getElementById("lblMsg"))) { // če obstaja lblMsg (napaka pri prijavi) reject(new Error(GSEC_ERR_LOGIN)); } else if (!(parsed.getElementById("ctl00_lblLoginName"))) { // če ni ctl00_lblLoginName nismo na Default.aspx reject(new Error(GSEC_ERR_LOGIN)); @@ -133,7 +132,6 @@ class gsec { }, crossDomain: true, url: GSE_URL + "WS_Gim/wsGimSisUtils.asmx/GetSessionData", - cache: false, type: "POST", dataType: "json", contentType: "application/json", @@ -171,7 +169,6 @@ class gsec { }, crossDomain: true, url: GSE_URL + "Page_Gim/Uporabnik/modSporociloPrejemniki.aspx/NajdiOsebePrejemniki", - cache: false, type: "POST", dataType: "json", contentType: "application/json", @@ -337,7 +334,6 @@ class gsec { }, crossDomain: true, url: GSE_URL + "Page_Gim/Uporabnik/Sporocila.aspx/DeleteMessage", - cache: false, type: "POST", dataType: "json", contentType: "application/json", -- cgit v1.2.3