This is an automated email from the ASF dual-hosted git repository.

reiern70 pushed a commit to branch 
feature/reiern70/WICKET-6750-aborting-ajax-requests-take-II
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to 
refs/heads/feature/reiern70/WICKET-6750-aborting-ajax-requests-take-II by this 
push:
     new 730c099  [WICKET-6750] clean up
730c099 is described below

commit 730c0992abb92d3d7c746ab0f29ab5e2ef83b066
Author: reiern70 <[email protected]>
AuthorDate: Thu Feb 27 08:42:03 2020 +0200

    [WICKET-6750] clean up
---
 .../java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git 
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js 
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
index 91125f1..ab99c0d 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
+++ 
b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
@@ -336,7 +336,8 @@
        Wicket.ChannelManager.FunctionsExecuter = FunctionsExecuter;
 
        /**
-        * Channel manager maintains a map of channels.
+        * AjaxRequestMonitor allows to get hold of jqXHR during AJAX request 
and
+        * manipulate it.
         */
        Wicket.AjaxRequestMonitor = Wicket.Class.create();
 
@@ -360,7 +361,7 @@
                        );
                },
 
-               getReuest: function (channel) {
+               getRequest: function (channel) {
                        var channelName = channel;
                        // (ajax channel)
                        if (typeof (channelName) !== 'string') {
@@ -371,12 +372,7 @@
                },
 
                abortRequest: function (channel) {
-                       var channelName = channel;
-                       // (ajax channel)
-                       if (typeof(channelName) !== 'string') {
-                               channelName = '0|s';
-                       }
-                       var jqXHR = getReuest(channelName);
+                       var jqXHR = this.getRequest(channel);
                        if (jqXHR) {
                                try {
                                        jqXHR.abort();

Reply via email to