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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user