1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:55:56 +00:00

shorten many invocations of Ajax.Request in inline form methods

This commit is contained in:
Andrew Dolgov
2021-02-18 12:27:26 +03:00
parent ee0b66b6bd
commit 39c0fe3697
5 changed files with 78 additions and 112 deletions

View File

@@ -55,12 +55,10 @@ class NSFW extends Plugin {
<script type="dojo/method" event="onSubmit" args="evt">
evt.preventDefault();
if (this.validate()) {
new Ajax.Request('backend.php', {
parameters: dojo.objectToQuery(this.getValues()),
onComplete: function(transport) {
Notify.info(transport.responseText);
}
});
Notify.progress('Saving data...', true);
xhrPost("backend.php", this.getValues(), (transport) => {
Notify.info(transport.responseText);
})
}
</script>