diff options
author | Andrew Dolgov <[email protected]> | 2021-02-18 12:27:26 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-18 12:27:26 +0300 |
commit | 39c0fe3697c71e9cfeec74c020b0c31fca376dc0 (patch) | |
tree | b67a018eb001e5c819f3366bc62f2e69b3ff0cd0 /plugins/af_readability/init.php | |
parent | ee0b66b6bd14d116b878a57f1d35b466d9994138 (diff) |
shorten many invocations of Ajax.Request in inline form methods
Diffstat (limited to 'plugins/af_readability/init.php')
-rwxr-xr-x | plugins/af_readability/init.php | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php index 43d064fc7..a1f92815c 100755 --- a/plugins/af_readability/init.php +++ b/plugins/af_readability/init.php @@ -69,19 +69,15 @@ class Af_Readability extends Plugin { <?= \Controls\pluginhandler_tags($this, "save") ?> - <script type='dojo/method' event='onSubmit' args='evt'> + <script type="dojo/method" event="onSubmit" args="evt"> evt.preventDefault(); if (this.validate()) { - console.log(dojo.objectToQuery(this.getValues())); - new Ajax.Request('backend.php', { - parameters: dojo.objectToQuery(this.getValues()), - onComplete: function(transport) { - Notify.info(transport.responseText); - } - }); - //this.reset(); + Notify.progress('Saving data...', true); + xhrPost("backend.php", this.getValues(), (transport) => { + Notify.info(transport.responseText); + }) } - </script> + </script> <fieldset> <label class='checkbox'> |