[ 
https://issues.apache.org/jira/browse/WICKET-7179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18075820#comment-18075820
 ] 

ASF GitHub Bot commented on WICKET-7179:
----------------------------------------

martin-g commented on code in PR #1412:
URL: https://github.com/apache/wicket/pull/1412#discussion_r3133683108


##########
wicket-core/src/test/js/qunit/jquery.mockjax.js:
##########


Review Comment:
   We can update it to 2.7.0 from 
https://github.com/jakerella/jquery-mockjax/blob/master/dist/jquery.mockjax.js



##########
wicket-core/src/main/java/org/apache/wicket/resource/JQueryMigrateResourceReference.java:
##########
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.wicket.resource;
+
+import java.util.List;
+import org.apache.wicket.Application;
+import org.apache.wicket.markup.head.HeaderItem;
+import org.apache.wicket.markup.head.JavaScriptHeaderItem;
+import org.apache.wicket.request.resource.JavaScriptResourceReference;
+import org.apache.wicket.request.resource.ResourceReference;
+
+
+/**
+ * The jQuery mirate library

Review Comment:
   ```suggestion
    * The jQuery migrate library
   ```



##########
wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js:
##########
@@ -183,6 +183,11 @@
                }
        };
 
+    Wicket.isFunction = function (f) {
+        return typeof(f) === 'function';
+    };
+
+    Wicket.isWindow = function (obj) { return obj != null && obj === 
obj.window; };

Review Comment:
   ```suggestion
       Wicket.isWindow = function (obj) { 
           return obj !== null && obj === obj.window;
       };
       
   ```



##########
wicket-core/src/test/js/ajax.js:
##########
@@ -445,7 +446,7 @@ jQuery(document).ready(function() {
                                                assert.equal(attributes.dt, 
'xml', 'data type');
                                                assert.equal(attributes.wr, 
true, 'wicket ajax response');
                                                assert.equal(attributes.m, 
'GET', 'method');
-                                               
assert.ok(jQuery.isWindow(attributes.c), 'component');
+                                               
assert.ok(isWindow(attributes.c), 'component');

Review Comment:
   ```suggestion
                                                
assert.ok(Wicket.isWindow(attributes.c), 'component');
   ```



##########
wicket-core/src/test/js/form.js:
##########
@@ -187,7 +187,7 @@ jQuery(document).ready(function() {
                });
 
                queryString = jQuery.param(queryString, true);
-               var space = jQuery.fn.jquery.indexOf("3") === 0 ? "%20" : "+";
+               var space = jQuery.fn.jquery.indexOf("4") === 0 ? "%20" : "+";

Review Comment:
   This should be: `if version.startsWith('2') ? "+" : "%20"`



##########
wicket-core/src/test/js/form.js:
##########
@@ -202,7 +202,7 @@ jQuery(document).ready(function() {
                });
 
                queryString = jQuery.param(queryString, true);
-               var space = jQuery.fn.jquery.indexOf("3") === 0 ? "%20" : "+";
+               var space = jQuery.fn.jquery.indexOf("4") === 0 ? "%20" : "+";

Review Comment:
   Same here



##########
wicket-core/src/test/js/ajax.js:
##########
@@ -40,10 +40,12 @@
 jQuery(document).ready(function() {
        "use strict";
 
+    var isWindow = function (obj) { return obj != null && obj === obj.window; 
};

Review Comment:
   Can we use Wicket.isWindow() instead ?





> add support for jQuery 4.0.0
> ----------------------------
>
>                 Key: WICKET-7179
>                 URL: https://issues.apache.org/jira/browse/WICKET-7179
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Ernesto Reinaldo Barreiro
>            Assignee: Ernesto Reinaldo Barreiro
>            Priority: Major
>
> add support for jQuery 4.0.0



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to