summaryrefslogtreecommitdiff
path: root/plugins/af_psql_trgm
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 /plugins/af_psql_trgm
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 'plugins/af_psql_trgm')
-rw-r--r--plugins/af_psql_trgm/init.js6
-rw-r--r--plugins/af_psql_trgm/init.php4
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/af_psql_trgm/init.js b/plugins/af_psql_trgm/init.js
index e5bc21885..921272c4b 100644
--- a/plugins/af_psql_trgm/init.js
+++ b/plugins/af_psql_trgm/init.js
@@ -1,4 +1,4 @@
-/* global dijit, dojo, Plugins, xhrPost, __ */
+/* global dijit, dojo, Plugins, xhr, __ */
Plugins.Psql_Trgm = {
showRelated: function (id) {
@@ -10,8 +10,8 @@ Plugins.Psql_Trgm = {
const tmph = dojo.connect(dialog, "onShow", null, function (/* e */) {
dojo.disconnect(tmph);
- xhrPost("backend.php", {op: 'pluginhandler', plugin: 'af_psql_trgm', method: 'showrelated', id: id}, (transport) => {
- dialog.attr('content', transport.responseText);
+ xhr.post("backend.php", {op: 'pluginhandler', plugin: 'af_psql_trgm', method: 'showrelated', id: id}, (reply) => {
+ dialog.attr('content', reply);
});
});
diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php
index 4ecfe0cd5..3b7ed6b14 100644
--- a/plugins/af_psql_trgm/init.php
+++ b/plugins/af_psql_trgm/init.php
@@ -152,8 +152,8 @@ class Af_Psql_Trgm extends Plugin {
evt.preventDefault();
if (this.validate()) {
Notify.progress('Saving data...', true);
- xhrPost("backend.php", this.getValues(), (transport) => {
- Notify.info(transport.responseText);
+ xhr.post("backend.php", this.getValues(), (reply) => {
+ Notify.info(reply);
})
}
</script>