summaryrefslogtreecommitdiff
path: root/js/PrefUsers.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-19 13:44:56 +0300
committerAndrew Dolgov <[email protected]>2021-02-19 13:44:56 +0300
commit660a1bbe011fef5f0fa6bb0af43521fed7598cc7 (patch)
treef31ee123db91e479b93a6d086fd78de2ecfae014 /js/PrefUsers.js
parentbb4e4282f46824308aebc2eaeac29fa29f8687ad (diff)
* switch to xhr.post() almost everywhere
* call App.handlerpcjson() automatically on json request (if possible) * show net/log indicators in prefs
Diffstat (limited to 'js/PrefUsers.js')
-rw-r--r--js/PrefUsers.js16
1 files changed, 8 insertions, 8 deletions
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 = {
<div dojoType="dijit.layout.ContentPane" title="${__('User details')}">
<script type='dojo/method' event='onShow' args='evt'>
if (this.domNode.querySelector('.loading')) {
- xhrPost("backend.php", {op: 'pref-users', method: 'userdetails', id: ${user.id}}, (transport) => {
- this.attr('content', transport.responseText);
+ xhr.post("backend.php", {op: 'pref-users', method: 'userdetails', id: ${user.id}}, (reply) => {
+ this.attr('content', reply);
});
}
</script>
@@ -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);
});
}