From 660a1bbe011fef5f0fa6bb0af43521fed7598cc7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 19 Feb 2021 13:44:56 +0300 Subject: * switch to xhr.post() almost everywhere * call App.handlerpcjson() automatically on json request (if possible) * show net/log indicators in prefs --- js/PrefUsers.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'js/PrefUsers.js') diff --git a/js/PrefUsers.js b/js/PrefUsers.js index 9b9c1deaf..3eb83b02a 100644 --- a/js/PrefUsers.js +++ b/js/PrefUsers.js @@ -8,8 +8,8 @@ const Users = { const user_search = App.byId("user_search"); const search = user_search ? user_search.value : ""; - xhrPost("backend.php", { op: "pref-users", sort: sort, search: search }, (transport) => { - dijit.byId('usersTab').attr('content', transport.responseText); + xhr.post("backend.php", { op: "pref-users", sort: sort, search: search }, (reply) => { + dijit.byId('usersTab').attr('content', reply); Notify.close(); }); }, @@ -19,8 +19,8 @@ const Users = { if (login) { Notify.progress("Adding user..."); - xhrPost("backend.php", {op: "pref-users", method: "add", login: login}, (transport) => { - alert(transport.responseText); + xhr.post("backend.php", {op: "pref-users", method: "add", login: login}, (reply) => { + alert(reply); Users.reload(); }); @@ -99,8 +99,8 @@ const Users = {
@@ -141,9 +141,9 @@ const Users = { const id = rows[0]; - xhrPost("backend.php", {op: "pref-users", method: "resetPass", id: id}, (transport) => { + xhr.post("backend.php", {op: "pref-users", method: "resetPass", id: id}, (reply) => { Notify.close(); - Notify.info(transport.responseText, true); + Notify.info(reply, true); }); } -- cgit v1.2.3-54-g00ecf