You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by sv...@apache.org on 2019/05/09 06:32:53 UTC

[wicket] branch wicket-js-cleanup created (now 234666a)

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

svenmeier pushed a change to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git.


      at 234666a  JS simplified structure

This branch includes the following new commits:

     new ae3e68d  JS removed debug window and use browser console instead
     new 6283d49  JS removed Wicket.Browser.isKHTML()
     new 454afca  JS removed Wicket.Browser.isGecko()
     new 9943d7a  JS removed Wicket.Browser.isOpera()
     new ef121c5  JS removed Wicket.Browser.isSafari()
     new 5d94a73  JS removed Wicket.Browser.isChrome()
     new 5e2adc3  JS removed Wicket.Browser.isIELess..()
     new 3662374  JS removed Wicket.Browser.isIE..()
     new 2950153  JS remove IE quirks support htmlToDomDocument()
     new 0ddb3bd  JS removed toggleClass()
     new 234666a  JS simplified structure

The 11 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



Re: [wicket] 10/11: JS removed toggleClass()

Posted by Martin Grigorov <mg...@apache.org>.
Hi Sven,

Wicket.DOM.toggleClass() is a public API.
One cannot say whether it is used or not in the applications.

On Thu, May 9, 2019 at 9:32 AM <sv...@apache.org> wrote:

> This is an automated email from the ASF dual-hosted git repository.
>
> svenmeier pushed a commit to branch wicket-js-cleanup
> in repository https://gitbox.apache.org/repos/asf/wicket.git
>
> commit 0ddb3bd2f66d6b2cb4ef67c05914447a54405ce7
> Author: Sven Meier <sv...@apache.org>
> AuthorDate: Wed May 8 16:02:49 2019 +0200
>
>     JS removed toggleClass()
>
>     was not used
> ---
>  .../wicket/ajax/res/js/wicket-ajax-jquery.js       | 21 --------------
>  wicket-core/src/test/js/dom.js                     | 32
> ----------------------
>  2 files changed, 53 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 401468d..fddc251 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
> @@ -38,18 +38,12 @@
>
>         var getAjaxBaseUrl,
>                 isUndef,
> -               replaceAll,
>                 nodeListToArray;
>
>         isUndef = function (target) {
>                 return (typeof(target) === 'undefined' || target === null);
>         };
>
> -       replaceAll = function (str, from, to) {
> -               var regex = new RegExp(from.replace( /\W/g ,'\\$&' ), 'g');
> -               return str.replace(regex,to);
> -       };
> -
>         /**
>          * A safe getter for Wicket's Ajax base URL.
>          * If the value is not defined or is empty string then
> @@ -1442,21 +1436,6 @@
>                                 }
>                         },
>
> -                       /**
> -                        * Add or remove one or more classes from each
> element in the
> -                        * set of matched elements, depending on either
> the class's presence
> -                        * or the value of the switch argument.
> -                        *
> -                        * @param {String} elementId The markup id of the
> element that will be manipulated.
> -                        * @param {String} cssClass One or more class
> names (separated by spaces)
> -                        *        to be toggled for each element in the
> matched set.
> -                        * @param {Boolean} Switch A Boolean (not just
> truthy/falsy) value to
> -                        *        determine whether the class should be
> added or removed.
> -                        */
> -                       toggleClass: function(elementId, cssClass, Switch)
> {
> -
>  jQuery('#'+elementId).toggleClass(cssClass, Switch);
> -                       },
> -
>                         /** call-counting implementation of
> Wicket.DOM.show() */
>                         showIncrementally: function (e) {
>                                 e = Wicket.$(e);
> diff --git a/wicket-core/src/test/js/dom.js
> b/wicket-core/src/test/js/dom.js
> index aa6be0a..86e3b2f 100644
> --- a/wicket-core/src/test/js/dom.js
> +++ b/wicket-core/src/test/js/dom.js
> @@ -112,38 +112,6 @@ jQuery(document).ready(function() {
>                 equal( el.style.display, '', "Wicket.DOM.show should set
> .style.display to ''." );
>         });
>
> -       test("toggleClass() - single CSS class", function() {
> -               var cssClass = 'testCssClass';
> -               var element = jQuery('#' + existingId);
> -               equal(false, element.hasClass(cssClass), "The element
> doesn't have the CSS class");
> -               Wicket.DOM.toggleClass(existingId, cssClass);
> -               equal(true, element.hasClass(cssClass), "The element does
> have the CSS class");
> -               Wicket.DOM.toggleClass(existingId, cssClass);
> -               equal(false, element.hasClass(cssClass), "The element
> doesn't have the CSS class");
> -       });
> -
> -       test("toggleClass() - multiple CSS classes", function() {
> -               var cssClass1 = 'testCssClass1';
> -               var cssClass2 = 'testCssClass2';
> -               var cssClass = cssClass1 + ' ' + cssClass2;
> -               var element = jQuery('#' + existingId);
> -               equal(false, element.hasClass(cssClass1), "The element
> doesn't have the CSS class");
> -               Wicket.DOM.toggleClass(existingId, cssClass);
> -               equal(true, element.hasClass(cssClass1), "The element does
> have the CSS class");
> -               Wicket.DOM.toggleClass(existingId, cssClass);
> -               equal(false, element.hasClass(cssClass1), "The element
> doesn't have the CSS class");
> -       });
> -
> -       test("toggleClass() - switch argument", function() {
> -               var cssClass = 'testCssClass';
> -               var element = jQuery('#' + existingId);
> -               equal(false, element.hasClass(cssClass), "The element
> doesn't have the CSS class");
> -               Wicket.DOM.toggleClass(existingId, cssClass, true);
> -               equal(true, element.hasClass(cssClass), "The element does
> have the CSS class");
> -               Wicket.DOM.toggleClass(existingId, cssClass, false);
> -               equal(false, element.hasClass(cssClass), "The element
> doesn't have the CSS class");
> -       });
> -
>         test("(show|hide)Incrementally() an element", function() {
>                 var el = Wicket.$(existingId);
>                 Wicket.DOM.hideIncrementally(el);
>
>

[wicket] 10/11: JS removed toggleClass()

Posted by sv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 0ddb3bd2f66d6b2cb4ef67c05914447a54405ce7
Author: Sven Meier <sv...@apache.org>
AuthorDate: Wed May 8 16:02:49 2019 +0200

    JS removed toggleClass()
    
    was not used
---
 .../wicket/ajax/res/js/wicket-ajax-jquery.js       | 21 --------------
 wicket-core/src/test/js/dom.js                     | 32 ----------------------
 2 files changed, 53 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 401468d..fddc251 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
@@ -38,18 +38,12 @@
 
 	var getAjaxBaseUrl,
 		isUndef,
-		replaceAll,
 		nodeListToArray;
 
 	isUndef = function (target) {
 		return (typeof(target) === 'undefined' || target === null);
 	};
 
-	replaceAll = function (str, from, to) {
-		var regex = new RegExp(from.replace( /\W/g ,'\\$&' ), 'g');
-		return str.replace(regex,to);
-	};
-
 	/**
 	 * A safe getter for Wicket's Ajax base URL.
 	 * If the value is not defined or is empty string then
@@ -1442,21 +1436,6 @@
 				}
 			},
 
-			/**
-			 * Add or remove one or more classes from each element in the
-			 * set of matched elements, depending on either the class's presence
-			 * or the value of the switch argument.
-			 *
-			 * @param {String} elementId The markup id of the element that will be manipulated.
-			 * @param {String} cssClass One or more class names (separated by spaces)
-			 *        to be toggled for each element in the matched set.
-			 * @param {Boolean} Switch A Boolean (not just truthy/falsy) value to
-			 *        determine whether the class should be added or removed.
-			 */
-			toggleClass: function(elementId, cssClass, Switch) {
-				jQuery('#'+elementId).toggleClass(cssClass, Switch);
-			},
-
 			/** call-counting implementation of Wicket.DOM.show() */
 			showIncrementally: function (e) {
 				e = Wicket.$(e);
diff --git a/wicket-core/src/test/js/dom.js b/wicket-core/src/test/js/dom.js
index aa6be0a..86e3b2f 100644
--- a/wicket-core/src/test/js/dom.js
+++ b/wicket-core/src/test/js/dom.js
@@ -112,38 +112,6 @@ jQuery(document).ready(function() {
 		equal( el.style.display, '', "Wicket.DOM.show should set .style.display to ''." );
 	});
 
-	test("toggleClass() - single CSS class", function() {
-		var cssClass = 'testCssClass';
-		var element = jQuery('#' + existingId);
-		equal(false, element.hasClass(cssClass), "The element doesn't have the CSS class");
-		Wicket.DOM.toggleClass(existingId, cssClass);
-		equal(true, element.hasClass(cssClass), "The element does have the CSS class");
-		Wicket.DOM.toggleClass(existingId, cssClass);
-		equal(false, element.hasClass(cssClass), "The element doesn't have the CSS class");
-	});
-
-	test("toggleClass() - multiple CSS classes", function() {
-		var cssClass1 = 'testCssClass1';
-		var cssClass2 = 'testCssClass2';
-		var cssClass = cssClass1 + ' ' + cssClass2;
-		var element = jQuery('#' + existingId);
-		equal(false, element.hasClass(cssClass1), "The element doesn't have the CSS class");
-		Wicket.DOM.toggleClass(existingId, cssClass);
-		equal(true, element.hasClass(cssClass1), "The element does have the CSS class");
-		Wicket.DOM.toggleClass(existingId, cssClass);
-		equal(false, element.hasClass(cssClass1), "The element doesn't have the CSS class");
-	});
-
-	test("toggleClass() - switch argument", function() {
-		var cssClass = 'testCssClass';
-		var element = jQuery('#' + existingId);
-		equal(false, element.hasClass(cssClass), "The element doesn't have the CSS class");
-		Wicket.DOM.toggleClass(existingId, cssClass, true);
-		equal(true, element.hasClass(cssClass), "The element does have the CSS class");
-		Wicket.DOM.toggleClass(existingId, cssClass, false);
-		equal(false, element.hasClass(cssClass), "The element doesn't have the CSS class");
-	});
-
 	test("(show|hide)Incrementally() an element", function() {
 		var el = Wicket.$(existingId);
 		Wicket.DOM.hideIncrementally(el);


[wicket] 01/11: JS removed debug window and use browser console instead

Posted by sv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit ae3e68d38ced8e2acc1f32d484766a4cee7af5cc
Author: Sven Meier <sv...@apache.org>
AuthorDate: Fri May 3 09:26:28 2019 +0200

    JS removed debug window and use browser console instead
    
    let debugbar indicate ajax errors; moved drag support to modal.js
---
 .../WicketAjaxDebugJQueryResourceReference.java    |  65 -----
 .../wicket/ajax/res/js/wicket-ajax-jquery-debug.js | 270 ---------------------
 .../wicket/ajax/res/js/wicket-ajax-jquery.js       | 219 +++--------------
 .../wicket/resource/CoreLibrariesContributor.java  |  12 +-
 .../wicket/settings/JavaScriptLibrarySettings.java |  27 +--
 .../apache/wicket/TestDetachPageAjaxResult.html    |   3 +-
 .../wicket/TestDetachPageExpectedResult.html       |   3 +-
 .../wicket/ajax/AjaxBehaviorEnabled_expected.html  |   3 +-
 .../ajax/AjaxHeaderContributionPage2_expected.html |   3 +-
 .../ajax/AjaxHeaderContributionPage_expected.html  |   3 +-
 .../ajax/DomReadyOrderPage_ajax_expected.html      |   3 +-
 .../wicket/ajax/DomReadyOrderPage_expected.html    |   3 +-
 .../ajax/form/AjaxFormSubmitTestPage_expected.html |   3 +-
 .../OnChangeAjaxBehaviorTestPage_expected.html     |   3 +-
 .../html/ajaxLink/AjaxLinkPageExpectedResult.html  |   3 +-
 .../AjaxLinkWithBorderPageExpectedResult.html      |   3 +-
 .../html/ajaxLink/AjaxPage2_ExpectedResult.html    |   3 +-
 .../SimpleTestPageExpectedResult-1.html            |   3 +-
 .../componentMap/SimpleTestPageExpectedResult.html |   3 +-
 .../markup/head/filter/DeferredPageExpected.html   |   3 +-
 .../html/basic/SimplePageExpectedResult_13.html    |   3 +-
 .../border/HideableBorderPage_ExpectedResult.html  |   3 +-
 .../panel/InlinePanelPageExpectedResult_7.html     |   3 +-
 .../panel/InlinePanelPageExpectedResult_8.html     |   3 +-
 .../locator/CachingResourceStreamLocatorTest.java  |   6 +-
 wicket-core/src/test/js/ajax.js                    |   2 +-
 .../apache/wicket/devutils/debugbar/DebugBar.html  |   4 +-
 .../apache/wicket/devutils/debugbar/DebugBar.java  |   5 +-
 .../wicket/devutils/debugbar/wicket-debugbar.css   |  11 +-
 .../wicket/devutils/debugbar/wicket-debugbar.js    | 104 ++++----
 .../examples/ajax/builtin/AjaxApplication.java     |   2 -
 .../extensions/ajax/markup/html/modal/res/modal.js | 164 +++++++++++++
 32 files changed, 295 insertions(+), 653 deletions(-)

diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/WicketAjaxDebugJQueryResourceReference.java b/wicket-core/src/main/java/org/apache/wicket/ajax/WicketAjaxDebugJQueryResourceReference.java
deleted file mode 100644
index b881502..0000000
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/WicketAjaxDebugJQueryResourceReference.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * 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.ajax;
-
-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;
-
-/**
- * @author hoeve
- */
-public class WicketAjaxDebugJQueryResourceReference extends JavaScriptResourceReference
-{
-	private static final long serialVersionUID = 1L;
-
-	private static final WicketAjaxDebugJQueryResourceReference INSTANCE = new WicketAjaxDebugJQueryResourceReference();
-
-	/**
-	 * @return the singleton INSTANCE
-	 */
-	public static WicketAjaxDebugJQueryResourceReference get()
-	{
-		return INSTANCE;
-	}
-
-	private WicketAjaxDebugJQueryResourceReference()
-	{
-		super(AbstractDefaultAjaxBehavior.class, "res/js/wicket-ajax-jquery-debug.js");
-	}
-
-	@Override
-	public List<HeaderItem> getDependencies()
-	{
-		final ResourceReference wicketAjaxReference;
-		if (Application.exists())
-		{
-			wicketAjaxReference = Application.get().getJavaScriptLibrarySettings().getWicketAjaxReference();
-		}
-		else
-		{
-			wicketAjaxReference = WicketAjaxJQueryResourceReference.get();
-		}
-		List<HeaderItem> dependencies = super.getDependencies();
-		dependencies.add(JavaScriptHeaderItem.forReference(wicketAjaxReference));
-		return dependencies;
-	}
-}
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js
deleted file mode 100644
index 58425c3..0000000
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * 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.
- */
-
-/*jshint maxlen: 430 */
-/*global console: true */
-
-
-/*
- * Wicket Ajax Debug Window
- */
-
-;(function (undefined) {
-
-	'use strict';
-
-	if (typeof(Wicket) === 'undefined') {
-		window.Wicket = {};
-	}
-
-	if (typeof(Wicket.Ajax) === 'undefined') {
-		Wicket.Ajax = {};
-	}
-
-	if (typeof(Wicket.Ajax.DebugWindow) === 'object') {
-		return;
-	}
-
-	Wicket.Ajax.DebugWindow = {
-
-		/**
-		 * A flag indicating whether the ajax debug window is enabled. Switched on by AbstractDefaultAjaxBehavior.java
-		 */
-		enabled: false,
-
-		scrollLock : false,
-
-		debugWindowId : 'wicketAjaxDebugWindow',
-
-		debugWindowScrollLockLinkId : 'wicketAjaxDebugScrollLock',
-
-		debugWindowDragHandleId : 'wicketAjaxDebugWindowDragHandle',
-
-		debugWindowResizeHandleId : 'wicketAjaxDebugWindowResizeHandle',
-
-		debugWindowLogId : 'wicketAjaxDebugWindowLogId',
-
-		wicketDebugLink: 'wicketDebugLink',
-
-		throttler: new Wicket.Throttler(true),
-
-		showDebugWindow : function() {
-			var self = Wicket.Ajax.DebugWindow;
-			self.init();
-
-			jQuery('#'+self.wicketDebugLink)
-				.css('backgroundColor', 'white')
-				.css('color', 'blue');
-
-			jQuery('#'+self.debugWindowId).slideToggle("fast", "swing");
-		},
-
-		hideDebugWindow : function() {
-			var self = Wicket.Ajax.DebugWindow;
-			self.init();
-			jQuery('#'+self.debugWindowId).slideToggle("fast", "swing");
-		},
-
-		log : function(msg, label) {
-			var self = Wicket.Ajax.DebugWindow;
-			self.init();
-			var $log = jQuery('#'+self.debugWindowLogId);
-			var $child = jQuery("<div>");
-
-			msg = "" + msg;
-			msg = msg.replace(/&/g, "&amp;");
-			msg = msg.replace(/</g, "&lt;");
-			msg = msg.replace(/>/g, "&gt;");
-			msg = msg.replace(/\n/g, "<br/>");
-			// WICKET-6340 do not use nbsp, it may not be defined in XHTML markup
-			msg = msg.replace(/ /g, "&#160;");
-			msg = msg.replace(/\t/g, "&#160;&#160;&#160;&#160;");
-
-			if (typeof(label) !== "undefined") {
-				msg = "<b>" + label + "</b>" + msg;
-			}
-
-			$child.html(msg);
-			$child
-				.css('fontSize','82%')
-				.css('margin', '0px')
-				.css('padding', '0px');
-			$log.append($child);
-
-			if (self.scrollLock === false) {
-				$log.scrollTop($log[0].scrollHeight);
-			}
-		},
-
-		logError : function (msg) {
-			var self = Wicket.Ajax.DebugWindow;
-			self.init();
-			self.log(msg, "<span style='color: red'>ERROR</span>: ");
-
-			if (jQuery('#'+self.debugWindowId).css('display') === 'none') {
-				jQuery('#'+self.wicketDebugLink)
-					.css('backgroundColor', 'crimson')
-					.css('color', 'aliceBlue');
-
-				self.throttler.throttle("Wicket.Ajax.DebugWindow", 300, function() {
-					jQuery('#'+self.wicketDebugLink)
-						// poor man's animation to get developer's attention
-						.hide(150).show(150).hide(150).show(150);
-				});
-			}
-
-			if (typeof(console) !== "undefined" && typeof(console.error) === 'function') {
-				console.error('Wicket.Ajax: ', msg);
-			}
-		},
-
-		logInfo : function(msg) {
-			var self = Wicket.Ajax.DebugWindow;
-			self.init();
-			self.log(msg, "<span style='color: blue'>INFO</span>: ");
-		},
-
-		clearLog : function() {
-			var self = Wicket.Ajax.DebugWindow;
-			self.init();
-			jQuery('#'+self.debugWindowLogId).empty();
-		},
-
-		init : function() {
-
-			if ( Wicket.Ajax.DebugWindow.enabled) {
-				var self = Wicket.Ajax.DebugWindow;
-				var $window = jQuery('#'+self.debugWindowId);
-				var dwdhid = self.debugWindowDragHandleId;
-				var dwrhid = self.debugWindowResizeHandleId;
-
-				if ($window.length === 0) {
-
-					var html =
-						"<div style='width: 450px; display: none; position: absolute; left: 200px; top: 300px; z-index: 1000000;' id='"+self.debugWindowId+"'>"+
-						"	<div style='border: 1px solid black; padding: 1px; background-color: #eee'>"+
-						"		<div style='overflow: auto; width: 100%'>"+
-						"			<div style='float: right; padding: 0.2em; padding-right: 1em; color: black;'>"+
-						"               <a href='javascript:Wicket.Ajax.DebugWindow.switchScrollLock()' id='"+self.debugWindowScrollLockLinkId+
-											"' style='color:blue' onfocus='this.blur();'>scroll lock</a> |"+
-						"				<a href='javascript:Wicket.Ajax.DebugWindow.clearLog()' style='color:blue'>clear</a> | "+
-						"				<a href='javascript:Wicket.Ajax.DebugWindow.hideDebugWindow()' style='color:blue'>close</a>"+
-						"			</div>"+
-						"			<div id='"+dwdhid+
-										"' style='padding: 0.2em; background-color: gray; color: white; padding-left: 1em; margin-right: 14em; cursor: move;'>"+
-						"				Wicket Ajax Debug Window (drag me here)"+
-						"			</div>"+
-						"			<div id='"+self.debugWindowLogId+"' style='width: 100%; height: 200px; background-color: white; color: black; overflow: auto; white-space: nowrap; text-align:left;'>"+
-						"			</div>"+
-						"           <div style='height: 10px; margin:0px; padding:0px;overflow:hidden;'>"+
-						"              <div style='height: 10px; width: 10px; background-color: gray; margin:0px; padding: 0px;overflow:hidden; float:right; cursor: nw-resize' id='" + self.debugWindowResizeHandleId + "'>"+
-						"              </div>"+
-						"           </div>"+
-						"		</div>"+
-						"	</div>" +
-						"</div>";
-
-
-					// Special style for Internet 6 and 7 in quirks mode
-					if (Wicket.Browser.isIELessThan11() && Wicket.Browser.isIEQuirks()) {
-						html +=
-							"<a id='"+self.wicketDebugLink+"' style='position:absolute; right: 10px; bottom: 10px; z-index:1000000; padding-top: 0.3em; padding-bottom: 0.3em; line-height: normal ; _padding-top: 0em; width: 12em; border: 1px solid black; background-color: white; text-align: center; opacity: 0.7; filter: alpha(opacity=70); color: blue; " +
-							"                                  left: expression(-10 - wicketDebugLink.offsetWidth + eval(document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) +(document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth));"+
-							"                                  top: expression(-10 - wicketDebugLink.offsetHeight + eval(document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight));'";
-					} else {
-						html +=
-							"<a id='"+self.wicketDebugLink+"' style='position:fixed; right: 10px; bottom: 10px; z-index:1000000; padding-top: 0.3em; padding-bottom: 0.3em; line-height: normal ; _padding-top: 0em; width: 12em; border: 1px solid black; background-color: white; text-align: center; opacity: 0.7;  color: blue;'";
-					}
-
-					html += "  href='javascript:Wicket.Ajax.DebugWindow.showDebugWindow()'>WICKET AJAX DEBUG</a>";
-
-					jQuery(html).appendTo(document.body);
-					Wicket.$(self.debugWindowScrollLockLinkId).focusSet = true;
-					Wicket.Drag.init(Wicket.$(dwdhid), jQuery.noop, jQuery.noop, self.onDrag);
-					Wicket.Drag.init(Wicket.$(dwrhid), jQuery.noop, jQuery.noop, self.onResize);
-				}
-			}
-		},
-
-		switchScrollLock: function() {
-			var self = Wicket.Ajax.DebugWindow;
-			self.scrollLock = !self.scrollLock;
-			var $link = jQuery('#'+self.debugWindowScrollLockLinkId),
-				color;
-			if (self.scrollLock) {
-				color = 'red';
-			} else {
-				color = 'blue';
-			}
-			$link.css('color', color);
-		},
-
-		onResize: function(element, deltaX, deltaY) {
-			var self = Wicket.Ajax.DebugWindow;
-
-			var $window = jQuery('#'+self.debugWindowId),
-				$log = jQuery('#'+self.debugWindowLogId);
-
-			var width = parseInt($window.css('width'), 10) + deltaX;
-			var height = parseInt($log.css('height'), 10) + deltaY;
-
-			var res = [0, 0];
-
-			if (width < 300) {
-				res[0] = 300 - width;
-				width = 300;
-			}
-
-			if (height < 100) {
-				res[1] = 100 - height;
-				height = 100;
-			}
-
-			$window.css('width', width + "px");
-			$log.css('height',  height + "px");
-
-			return res;
-		},
-
-		onDrag: function(element, deltaX, deltaY) {
-			var self = Wicket.Ajax.DebugWindow;
-			var $window = jQuery('#'+self.debugWindowId);
-
-			var x = parseInt($window.css('left'), 10) + deltaX;
-			var y = parseInt($window.css('top'), 10) + deltaY;
-
-			var res = [0, 0];
-
-			if (x < 0) {
-				res[0] = -deltaX;
-				x = 0;
-			}
-			if (y < 0) {
-				res[1] = -deltaY;
-				y = 0;
-			}
-
-			$window.css('left', x + "px");
-			$window.css('top', y + "px");
-
-			return res;
-		}
-	};
-
-	jQuery(window).on('load', Wicket.Ajax.DebugWindow.init);
-
-})();
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 92c5ef4..7d441ea 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
@@ -225,28 +225,36 @@
 	 * Logging functionality.
 	 */
 	Wicket.Log = {
+			
+		enabled: false,
+
+		log: function (msg) {
+			if (Wicket.Log.enabled && typeof(console) !== "undefined" && typeof(console.log) === 'function') {
+				console.log('Wicket: ', msg);
+			}
+		},
 
-		enabled: function () {
-			return Wicket.Ajax.DebugWindow && Wicket.Ajax.DebugWindow.enabled;
+		debug: function (msg) {
+			if (Wicket.Log.enabled && typeof(console) !== "undefined" && typeof(console.debug) === 'function') {
+				console.debug('Wicket: ', msg);
+			}
 		},
 
 		info: function (msg) {
-			if (Wicket.Log.enabled()) {
-				Wicket.Ajax.DebugWindow.logInfo(msg);
+			if (Wicket.Log.enabled && typeof(console) !== "undefined" && typeof(console.info) === 'function') {
+				console.info('Wicket: ', msg);
 			}
 		},
 
-		error: function (msg) {
-			if (Wicket.Log.enabled()) {
-				Wicket.Ajax.DebugWindow.logError(msg);
-			} else if (typeof(console) !== "undefined" && typeof(console.error) === 'function') {
-				console.error('Wicket.Ajax: ', msg);
+		warn: function (msg) {
+			if (Wicket.Log.enabled && typeof(console) !== "undefined" && typeof(console.warn) === 'function') {
+				console.warn('Wicket: ', msg);
 			}
 		},
 
-		log: function (msg) {
-			if (Wicket.Log.enabled()) {
-				Wicket.Ajax.DebugWindow.log(msg);
+		error: function (msg) {
+			if (Wicket.Log.enabled && typeof(console) !== "undefined" && typeof(console.error) === 'function') {
+				console.error('Wicket: ', msg);
 			}
 		}
 	};
@@ -688,6 +696,9 @@
 				}
 			}
 
+			Wicket.Log.info("Executing Ajax request");
+			Wicket.Log.debug(attrs);
+
 			// execute the request
 			var jqXHR = jQuery.ajax({
 				url: url,
@@ -829,11 +840,9 @@
 				}
 				else {
 					// no redirect, just regular response
-					if (Wicket.Log.enabled()) {
-						var responseAsText = jqXHR.responseText;
-						Wicket.Log.info("Received ajax response (" + responseAsText.length + " characters)");
-						Wicket.Log.info("\n" + responseAsText);
-					}
+					var responseAsText = jqXHR.responseText;
+					Wicket.Log.info("Received ajax response (" + responseAsText.length + " characters)");
+					Wicket.Log.debug(jqXHR.responseXML);
 
 					// invoke the loaded callback with an xml document
 					return this.loadedCallback(data, context);
@@ -926,7 +935,7 @@
 		failure: function (context, jqXHR, errorMessage, textStatus) {
 			context.steps.push(jQuery.proxy(function (notify) {
 				if (errorMessage) {
-					Wicket.Log.error("Wicket.Ajax.Call.failure: Error while parsing response: " + errorMessage);
+					Wicket.Log.error("Ajax.Call.failure: Error while parsing response: " + errorMessage);
 				}
 				var attrs = context.attrs;
 				this._executeHandlers(attrs.fh, attrs, jqXHR, errorMessage, textStatus);
@@ -953,7 +962,7 @@
 				var element = Wicket.$(compId);
 
 				if (isUndef(element)) {
-					Wicket.Log.error("Wicket.Ajax.Call.processComponent: Component with id [[" +
+					Wicket.Log.error("Ajax.Call.processComponent: Component with id [[" +
 						compId + "]] was not found while trying to perform markup update. " +
 						"Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update.");
 				} else {
@@ -1000,7 +1009,7 @@
 						var f = window.eval(toExecute);
 						f(notify);
 					} catch (exception) {
-						log.error("Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: " + exception + ", text: " + text);
+						log.error("Ajax.Call.processEvaluation: Exception evaluating javascript: " + exception + ", text: " + text);
 					}
 					return FunctionsExecuter.ASYNC;
 				};
@@ -1013,7 +1022,7 @@
 						// do the evaluation in global scope
 						window.eval(script);
 					} catch (exception) {
-						log.error("Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: " + exception + ", text: " + text);
+						log.error("Ajax.Call.processEvaluation: Exception evaluating javascript: " + exception + ", text: " + text);
 					}
 					// continue to next step
 					return FunctionsExecuter.DONE;
@@ -1993,7 +2002,7 @@
 										document.createStyleSheet().cssText = content;
 									}
 									catch(e) {
-										Wicket.Log.error("Wicket.Head.Contributor.processStyle: " + e);
+										Wicket.Log.error("Head.Contributor.processStyle: " + e);
 									}
 									notify();
 								};
@@ -2093,7 +2102,7 @@
 									// do the evaluation in global scope
 									window.eval(text);
 								} catch (e) {
-									Wicket.Log.error("Wicket.Head.Contributor.processScript: " + e + ": eval -> " + text);
+									Wicket.Log.error("Head.Contributor.processScript: " + e + ": eval -> " + text);
 								}
 							}
 
@@ -2284,170 +2293,6 @@
 			}
 		},
 
-		/**
-		 * Flexible dragging support.
-		 */
-		Drag: {
-
-			/**
-			 * Initializes dragging on the specified element.
-			 * 
-			 * @param element {Element}
-			 *            element clicking on which
-			 *            the drag should begin
-			 * @param onDragBegin {Function}
-			 *            called at the begin of dragging - passed element and event as parameters,
-			 *            may return false to prevent the start
-			 * @param onDragEnd {Function}
-			 *            handler called at the end of dragging - passed element as parameter
-			 * @param onDrag {Function}
-			 *            handler called during dragging - passed element and mouse deltas as parameters
-			 */
-			init: function(element, onDragBegin, onDragEnd, onDrag) {
-
-				if (typeof(onDragBegin) === "undefined") {
-					onDragBegin = jQuery.noop;
-				}
-
-				if (typeof(onDragEnd) === "undefined") {
-					onDragEnd = jQuery.noop;
-				}
-
-				if (typeof(onDrag) === "undefined") {
-					onDrag = jQuery.noop;
-				}
-
-				element.wicketOnDragBegin = onDragBegin;
-				element.wicketOnDrag = onDrag;
-				element.wicketOnDragEnd = onDragEnd;
-
-
-				// set the mousedown handler
-				Wicket.Event.add(element, "mousedown", Wicket.Drag.mouseDownHandler);
-			},
-
-			mouseDownHandler: function (e) {
-				e = Wicket.Event.fix(e);
-
-				var element = this;
-
-				if (element.wicketOnDragBegin(element, e) === false) {
-					return;
-				}
-
-				if (e.preventDefault) {
-					e.preventDefault();
-				}
-
-				element.lastMouseX = e.clientX;
-				element.lastMouseY = e.clientY;
-
-				element.old_onmousemove = document.onmousemove;
-				element.old_onmouseup = document.onmouseup;
-				element.old_onselectstart = document.onselectstart;
-				element.old_onmouseout = document.onmouseout;
-
-				document.onselectstart = function () {
-					return false;
-				};
-				document.onmousemove = Wicket.Drag.mouseMove;
-				document.onmouseup = Wicket.Drag.mouseUp;
-				document.onmouseout = Wicket.Drag.mouseOut;
-
-				Wicket.Drag.current = element;
-			},
-
-			/**
-			 * Deinitializes the dragging support on given element.
-			 */
-			clean: function (element) {
-				element.onmousedown = null;
-			},
-
-			/**
-			 * Called when mouse is moved. This method fires the onDrag event
-			 * with element instance, deltaX and deltaY (the distance
-			 * between this call and the previous one).
-
-			 * The onDrag handler can optionally return an array of two integers
-			 * - the delta correction. This is used, for example, if there is
-			 * element being resized and the size limit has been reached (but the
-			 * mouse can still move).
-			 *
-			 * @param {Event} e
-			 */
-			mouseMove: function (e) {
-				e = Wicket.Event.fix(e);
-				var o = Wicket.Drag.current;
-
-				// this happens sometimes in Safari
-				if (e.clientX < 0 || e.clientY < 0) {
-					return;
-				}
-
-				if (o !== null) {
-					var deltaX = e.clientX - o.lastMouseX;
-					var deltaY = e.clientY - o.lastMouseY;
-
-					var res = o.wicketOnDrag(o, deltaX, deltaY, e);
-
-					if (isUndef(res)) {
-						res = [0, 0];
-					}
-
-					o.lastMouseX = e.clientX + res[0];
-					o.lastMouseY = e.clientY + res[1];
-				}
-
-				return false;
-			},
-
-			/**
-			 * Called when the mouse button is released.
-			 * Cleans all temporary variables and callback methods.
-			 */
-			mouseUp: function () {
-				var o = Wicket.Drag.current;
-
-				if (o) {
-					o.wicketOnDragEnd(o);
-
-					o.lastMouseX = null;
-					o.lastMouseY = null;
-
-					document.onmousemove = o.old_onmousemove;
-					document.onmouseup = o.old_onmouseup;
-					document.onselectstart = o.old_onselectstart;
-
-					document.onmouseout = o.old_onmouseout;
-
-					o.old_mousemove = null;
-					o.old_mouseup = null;
-					o.old_onselectstart = null;
-					o.old_onmouseout = null;
-
-					Wicket.Drag.current = null;
-				}
-			},
-
-			/**
-			 * Called when mouse leaves an element. We need this for firefox, as otherwise
-			 * the dragging would continue after mouse leaves the document.
-			 * Unfortunately this break dragging in firefox immediately after the mouse leaves
-			 * page.
-			 */
-			mouseOut: function (e) {
-				if (false && Wicket.Browser.isGecko()) {
-					// other browsers handle this more gracefully
-					e = Wicket.Event.fix(e);
-
-					if (e.target.tagName === "HTML") {
-						Wicket.Drag.mouseUp(e);
-					}
-				}
-			}
-		},
-
 		// FOCUS FUNCTIONS
 
 		Focus: {
diff --git a/wicket-core/src/main/java/org/apache/wicket/resource/CoreLibrariesContributor.java b/wicket-core/src/main/java/org/apache/wicket/resource/CoreLibrariesContributor.java
index 49da713..60cfabc 100644
--- a/wicket-core/src/main/java/org/apache/wicket/resource/CoreLibrariesContributor.java
+++ b/wicket-core/src/main/java/org/apache/wicket/resource/CoreLibrariesContributor.java
@@ -59,17 +59,13 @@ public class CoreLibrariesContributor
 	{
 		JavaScriptLibrarySettings jsLibrarySettings = application.getJavaScriptLibrarySettings();
 
+		ResourceReference wicketAjaxReference = jsLibrarySettings.getWicketAjaxReference();
+		response.render(JavaScriptHeaderItem.forReference(wicketAjaxReference));
+		
 		final DebugSettings debugSettings = application.getDebugSettings();
 		if (debugSettings.isAjaxDebugModeEnabled())
 		{
-			response.render(JavaScriptHeaderItem.forReference(jsLibrarySettings.getWicketAjaxDebugReference()));
-			response.render(JavaScriptHeaderItem.forScript("Wicket.Ajax.DebugWindow.enabled=true;",
-				"wicket-ajax-debug-enable"));
-		}
-		else
-		{
-			ResourceReference wicketAjaxReference = jsLibrarySettings.getWicketAjaxReference();
-			response.render(JavaScriptHeaderItem.forReference(wicketAjaxReference));
+			response.render(JavaScriptHeaderItem.forScript("Wicket.Log.enabled=true;", "wicket-ajax-debug-enable"));
 		}
 	}
 }
diff --git a/wicket-core/src/main/java/org/apache/wicket/settings/JavaScriptLibrarySettings.java b/wicket-core/src/main/java/org/apache/wicket/settings/JavaScriptLibrarySettings.java
index 195c573..6ec43dc1 100644
--- a/wicket-core/src/main/java/org/apache/wicket/settings/JavaScriptLibrarySettings.java
+++ b/wicket-core/src/main/java/org/apache/wicket/settings/JavaScriptLibrarySettings.java
@@ -16,7 +16,6 @@
  */
 package org.apache.wicket.settings;
 
-import org.apache.wicket.ajax.WicketAjaxDebugJQueryResourceReference;
 import org.apache.wicket.ajax.WicketAjaxJQueryResourceReference;
 import org.apache.wicket.request.resource.ResourceReference;
 import org.apache.wicket.resource.JQueryResourceReference;
@@ -40,8 +39,6 @@ public class JavaScriptLibrarySettings
 
 	private ResourceReference wicketAjaxReference = WicketAjaxJQueryResourceReference.get();
 
-	private ResourceReference wicketAjaxDebugReference = WicketAjaxDebugJQueryResourceReference.get();
-
 	/**
 	 * @return the reference to the JQuery JavaScript library used as backing library for
 	 *         wicket-event and wicket-ajax
@@ -81,26 +78,4 @@ public class JavaScriptLibrarySettings
 		this.wicketAjaxReference = Args.notNull(wicketAjaxReference, "wicketAjaxReference");
 		return this;
 	}
-
-	/**
-	 * The Wicket Ajax Debug Window.
-	 *
-	 * @return the reference to the implementation of wicket-ajax-debug.js
-	 */
-	public ResourceReference getWicketAjaxDebugReference()
-	{
-		return wicketAjaxDebugReference;
-	}
-
-	/**
-	 * @param wicketAjaxDebugReference
-	 *            a reference to the implementation of wicket-ajax-debug.js
-	 * @return {@code this} object for chaining
-	 */
-	public JavaScriptLibrarySettings setWicketAjaxDebugReference(ResourceReference wicketAjaxDebugReference)
-	{
-		this.wicketAjaxDebugReference = Args.notNull(wicketAjaxDebugReference,
-			"wicketAjaxDebugReference");
-		return this;
-	}
-}
+}
\ No newline at end of file
diff --git a/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html b/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html
index 2d737ec..973720e 100644
--- a/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html
+++ b/wicket-core/src/test/java/org/apache/wicket/TestDetachPageAjaxResult.html
@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?><ajax-response><component id="comp1" ><![CDATA[<span wicket:id="comp" id="comp1">body</span>]]></component><header-contribution><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]]]><![CDATA[>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html b/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html
index 837c10d..c4b5850 100644
--- a/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html
+++ b/wicket-core/src/test/java/org/apache/wicket/TestDetachPageExpectedResult.html
@@ -1,10 +1,9 @@
 <html xmlns:wicket>
 <head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxBehaviorEnabled_expected.html b/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxBehaviorEnabled_expected.html
index cfbfd37..0d62464 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxBehaviorEnabled_expected.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxBehaviorEnabled_expected.html
@@ -2,10 +2,9 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html b/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html
index 6bab591..f0c0400 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage2_expected.html
@@ -7,10 +7,9 @@
 
 <link href="../../test2"/>
 <script type="text/javascript" src="../../javascripturlB"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html b/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html
index 6ad9cd4..84f795a 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/AjaxHeaderContributionPage_expected.html
@@ -4,10 +4,9 @@
 <script type="text/javascript" src="../../javascripturl"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html b/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
index ecf2d89..9791e9c 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_ajax_expected.html
@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?><ajax-response><component id="test1" ><![CDATA[<a href="./org.apache.wicket.ajax.DomReadyOrderPage?0-1.-test" wicket:id="test" id="test1">Test</a>]]></component><header-contribution><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]]]><![CDATA[>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html b/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
index 6ab6893..f127d71 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/DomReadyOrderPage_expected.html
@@ -1,10 +1,9 @@
 <html>
 <head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html b/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html
index 1e39106..cd1987a 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/form/AjaxFormSubmitTestPage_expected.html
@@ -1,10 +1,9 @@
 <html>
 	<head><script type="text/javascript" src="./resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="./resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="./resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html b/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html
index 857d72a..e5ced2e 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html
@@ -1,10 +1,9 @@
 <html>
 	<head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html b/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html
index b4e45cc..ce36c3b 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkPageExpectedResult.html
@@ -1,10 +1,9 @@
 <html>
 <head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html b/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html
index 8a634dd..77e9996 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxLinkWithBorderPageExpectedResult.html
@@ -1,10 +1,9 @@
 <html>
 <head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html b/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html
index bf9d782..8163e78 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/ajaxLink/AjaxPage2_ExpectedResult.html
@@ -1,10 +1,9 @@
 <html>
 <head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html b/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html
index 68aa9f8..279ac72 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult-1.html
@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?><ajax-response><component id="linja11" ><![CDATA[<span wicket:id="linja1" id="linja11">1</span>]]></component><header-contribution><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]]]><![CDATA[>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html b/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html
index e65d62b..6a70125 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/markup/html/componentMap/SimpleTestPageExpectedResult.html
@@ -1,10 +1,9 @@
 <html>
 <head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/head/filter/DeferredPageExpected.html b/wicket-core/src/test/java/org/apache/wicket/markup/head/filter/DeferredPageExpected.html
index a0f33bf..be0f042 100644
--- a/wicket-core/src/test/java/org/apache/wicket/markup/head/filter/DeferredPageExpected.html
+++ b/wicket-core/src/test/java/org/apache/wicket/markup/head/filter/DeferredPageExpected.html
@@ -1,10 +1,9 @@
 <html xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd" >
     <head><script type="text/javascript" defer="defer" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" defer="defer" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" defer="defer" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" >
 /*<![CDATA[*/
-document.addEventListener('DOMContentLoaded', function() { Wicket.Ajax.DebugWindow.enabled=true;; });
+document.addEventListener('DOMContentLoaded', function() { Wicket.Log.enabled=true;; });
 /*]]>*/
 </script>
 <script type="text/javascript" >
diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html b/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html
index 17213e5..28588f0 100644
--- a/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html
+++ b/wicket-core/src/test/java/org/apache/wicket/markup/html/basic/SimplePageExpectedResult_13.html
@@ -4,10 +4,9 @@
 <html wicket:id="html" xmlns:wicket="" xmlns="http://www.w3.org/1999/xhtml" xmlns:lang="[current language]" lang="de" id="html1">
   <head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html
index d526446..080bead 100644
--- a/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html
+++ b/wicket-core/src/test/java/org/apache/wicket/markup/html/border/HideableBorderPage_ExpectedResult.html
@@ -1,10 +1,9 @@
 <html xmlns:wicket>
 <head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html b/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html
index 92b45a7..365ba0f 100644
--- a/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html
+++ b/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_7.html
@@ -1,10 +1,9 @@
 <html xmlns:wicket>
 <head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html b/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html
index 8d73eb8..34ad3cc9 100644
--- a/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html
+++ b/wicket-core/src/test/java/org/apache/wicket/markup/html/panel/InlinePanelPageExpectedResult_8.html
@@ -1,10 +1,9 @@
 <html xmlns:wicket>
 <head><script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-3.4.1.js"></script>
 <script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-debug.js"></script>
 <script type="text/javascript" id="wicket-ajax-debug-enable">
 /*<![CDATA[*/
-Wicket.Ajax.DebugWindow.enabled=true;
+Wicket.Log.enabled=true;
 /*]]>*/
 </script>
 <script type="text/javascript" id="wicket-ajax-base-url">
diff --git a/wicket-core/src/test/java/org/apache/wicket/util/resource/locator/CachingResourceStreamLocatorTest.java b/wicket-core/src/test/java/org/apache/wicket/util/resource/locator/CachingResourceStreamLocatorTest.java
index 21b4cf5..825d92a 100644
--- a/wicket-core/src/test/java/org/apache/wicket/util/resource/locator/CachingResourceStreamLocatorTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/util/resource/locator/CachingResourceStreamLocatorTest.java
@@ -82,7 +82,7 @@ class CachingResourceStreamLocatorTest
 		Locale locale = null;
 		String extension = null;
 
-		String filename = "org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js";
+		String filename = "org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js";
 
 		// a strict lookup for the resource with no specific locale results in a match
 		IResourceStream strictLocate = cachingLocator.locate(AbstractDefaultAjaxBehavior.class,
@@ -113,7 +113,7 @@ class CachingResourceStreamLocatorTest
 		Locale locale = new Locale("nl", "NL");
 		String extension = null;
 
-		String filename = "org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js";
+		String filename = "org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js";
 
 		// a strict lookup of a localized resource should not find the non-localized resource
 		IResourceStream strictLocate = cachingLocator.locate(AbstractDefaultAjaxBehavior.class,
@@ -143,7 +143,7 @@ class CachingResourceStreamLocatorTest
 		Locale locale = new Locale("nl", "NL");
 		String extension = null;
 
-		String filename = "org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js";
+		String filename = "org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js";
 
 		// a non-strict lookup with a specific locale should find the non-localized resource
 		IResourceStream nonStrictLocate = cachingLocator.locate(AbstractDefaultAjaxBehavior.class,
diff --git a/wicket-core/src/test/js/ajax.js b/wicket-core/src/test/js/ajax.js
index 3863f2b..95078ea 100644
--- a/wicket-core/src/test/js/ajax.js
+++ b/wicket-core/src/test/js/ajax.js
@@ -151,7 +151,7 @@ jQuery(document).ready(function() {
 			var oldWicketLogError = Wicket.Log.error;
 
 			Wicket.Log.error = function(msg) {
-				equal(msg, 'Wicket.Ajax.Call.processComponent: Component with id [[componentToReplaceDoesNotExist]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update.');
+				equal(msg, 'Ajax.Call.processComponent: Component with id [[componentToReplaceDoesNotExist]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update.');
 
 				// restore the original method
 				Wicket.Log.error = oldWicketLogError;
diff --git a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.html b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.html
index f6db5d2..0ff4fdf 100644
--- a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.html
+++ b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.html
@@ -21,10 +21,10 @@
 <body>
  
 	<wicket:panel>
-		<a id="wicketDebugBarCollapse" onclick="wicketDebugBarCollapse();"><img wicket:id="logo" src="wicket.png" alt="Wicket" /></a>
+		<a id="wicketDebugBarCollapse"><img wicket:id="logo" src="wicket.png" alt="Wicket" /></a>
 		<span id="wicketDebugBarContents" wicket:id="content">
 			<span wicket:id="contributors"><span wicket:id="contrib" class="contributor"></span></span>
-			<a id="wicketDebugBarRemove" onclick="wicketDebugBarRemove();"><img wicket:id="removeImg" src="remove.png" alt="Remove" /></a>
+			<a id="wicketDebugBarRemove"><img wicket:id="removeImg" src="remove.png" alt="Remove" /></a>
 		</span>
 	</wicket:panel>
 
diff --git a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.java b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.java
index c1f6a69..8c9e1c6 100644
--- a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.java
+++ b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/DebugBar.java
@@ -36,6 +36,7 @@ import org.apache.wicket.model.IModel;
 import org.apache.wicket.request.resource.CssResourceReference;
 import org.apache.wicket.request.resource.JavaScriptResourceReference;
 import org.apache.wicket.request.resource.PackageResourceReference;
+import org.apache.wicket.resource.CoreLibrariesContributor;
 import org.apache.wicket.util.lang.Args;
 
 /**
@@ -177,11 +178,13 @@ public class DebugBar extends DevUtilsPanel
 	@Override
 	public void renderHead(final IHeaderResponse response)
 	{
+		CoreLibrariesContributor.contributeAjax(getApplication(), response);
+		
 		response.render(CssHeaderItem.forReference(new CssResourceReference(DebugBar.class,
 			"wicket-debugbar.css")));
 		response.render(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(
 			DebugBar.class, "wicket-debugbar.js")));
-		response.render(OnDomReadyHeaderItem.forScript("wicketDebugBarCheckState()"));
+		response.render(OnDomReadyHeaderItem.forScript("Wicket.debugBar();"));
 	}
 
 	/**
diff --git a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.css b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.css
index b5cb09a..282835b 100644
--- a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.css
+++ b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.css
@@ -55,14 +55,17 @@
 	so that if there is an error, we can simply change 
 	the class and it will use the error colors instead.
 */
-.wicketDebugBarError {
-	background-color: red;
-	opacity: 0.8;
-}
 .wicketDebugBar {
 	background-color: #DDDDDD;
 	opacity: 0.8;
 }
+.wicketDebugBarError {
+	animation: wicketDebugBarFlicker 1s;
+}
+@keyframes wicketDebugBarFlicker {
+	25%, 75% {background-color: red;}
+	0%, 50%, 100% {background-color: #DDDDDD;}	
+}
 
 #wicketDebugBarCollapse {
 	cursor: pointer;
diff --git a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.js b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.js
index 443c286..c87ec8a 100644
--- a/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.js
+++ b/wicket-devutils/src/main/java/org/apache/wicket/devutils/debugbar/wicket-debugbar.js
@@ -14,57 +14,69 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-function wicketDebugBarCollapse() {
-	wicketDebugBarToggleVisibility('wicketDebugBarContents');
-}
+;(function (jQuery, undefined) {
 
-function wicketDebugBarRemove() {
-	wicketDebugBarToggleVisibility('wicketDebugBar');
-}
+	'use strict';
 
-function wicketDebugBarToggleVisibility(elemID) {
-	var elem = document.getElementById(elemID);
-	var vis  = elem.style.display != 'none';
-	elem.style.display = (vis ? 'none' : '');
-    // alter the state cookie so we can initialize it properly on domReady
-	wicketDebugBarSetExpandedCookie(vis ? 'collapsed' : 'expanded')
-}
+	if (typeof(Wicket) === 'undefined') {
+		window.Wicket = {};
+	}
 
-function wicketDebugBarSetExpandedCookie(value) {
-	document.cookie =  "wicketDebugBarState=" + window.escape(value);
-}
+	if (typeof(Wicket.debugBar) === 'object') {
+		return;
+	}
 
-function wicketDebugBarGetExpandedCookie() {
-	var name = 'wicketDebugBarState';
-	if (document.cookie.length > 0) {
-		var start = document.cookie.indexOf (name + "=");
-		if (start !== -1) {
-			start = start + name.length + 1;
-			var end = document.cookie.indexOf(";", start);
-			if (end === -1) {
-				end = document.cookie.length;
+	Wicket.debugBar = function() {
+		
+		function setExpandedCookie(value) {
+			document.cookie =  "wicketDebugBarState=" + window.escape(value);
+		}
+		
+		function getExpandedCookie() {
+			var name = 'wicketDebugBarState';
+			if (document.cookie.length > 0) {
+				var start = document.cookie.indexOf (name + "=");
+				if (start !== -1) {
+					start = start + name.length + 1;
+					var end = document.cookie.indexOf(";", start);
+					if (end === -1) {
+						end = document.cookie.length;
+					}
+					return window.unescape(document.cookie.substring(start,end));
+				} else {
+					return null;
+				}
+			} else {
+				return null;
 			}
-			return window.unescape(document.cookie.substring(start,end));
-		} else {
-			return null;
 		}
-	} else {
-		return null;
-	}
-}
 
-function wicketDebugBarCheckState() {
-	var state = wicketDebugBarGetExpandedCookie();
-    // state cookie has not been set. determine state and set it
-	if (state === null) {
-		var isVisible = jQuery('#wicketDebugBarContents').is(':visible');
-		wicketDebugBarSetExpandedCookie(isVisible ? 'expanded' : 'collapsed');
-    // set state of debug bar according to cookie
-	} else {
-		if (state === 'expanded') {
-			jQuery('#wicketDebugBarContents').css('display', '');
-		} else {
-			jQuery('#wicketDebugBarContents').css('display', 'none');
+		jQuery('#wicketDebugBarCollapse').on("click", function() {
+			var content = jQuery('#wicketDebugBarContents');
+			setExpandedCookie(!content.is(':visible'));
+			content.toggle(400);
+		});
+
+		jQuery('#wicketDebugBarRemove').on("click", function() {
+			var bar = jQuery('#wicketDebugBar');
+			setExpandedCookie(!bar.is(':visible'));
+			bar.hide();
+		});
+
+	    // determine state and set it
+		if (getExpandedCookie() === 'false') {
+			jQuery('#wicketDebugBarContents').hide();
 		}
-	}
-}
+		
+		var original = Wicket.Log.error;
+		Wicket.Log.error = function(msg) {
+			original(msg);
+			
+			jQuery('#wicketDebugBar')
+				.addClass('wicketDebugBarError')
+				.one('animationend', function() {
+					jQuery(this).removeClass('wicketDebugBarError');
+				});
+		};
+	};
+})(jQuery);
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java
index 82caa41..b43828e 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/AjaxApplication.java
@@ -42,8 +42,6 @@ public class AjaxApplication extends WicketExampleApplication
 
 		getRequestCycleSettings().addResponseFilter(new AjaxServerAndClientTimeFilter());
 
-		getDebugSettings().setAjaxDebugModeEnabled(true);
-		
 		getComponentInitializationListeners().add(new IComponentInitializationListener()
 		{
 			@Override
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index b4293c5..d5800e0 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -1548,4 +1548,168 @@
 		}
 	};
 
+	/**
+	 * Flexible dragging support.
+	 */
+	Wicket.Drag = {
+
+		/**
+		 * Initializes dragging on the specified element.
+		 * 
+		 * @param element {Element}
+		 *            element clicking on which
+		 *            the drag should begin
+		 * @param onDragBegin {Function}
+		 *            called at the begin of dragging - passed element and event as parameters,
+		 *            may return false to prevent the start
+		 * @param onDragEnd {Function}
+		 *            handler called at the end of dragging - passed element as parameter
+		 * @param onDrag {Function}
+		 *            handler called during dragging - passed element and mouse deltas as parameters
+		 */
+		init: function(element, onDragBegin, onDragEnd, onDrag) {
+
+			if (typeof(onDragBegin) === "undefined") {
+				onDragBegin = jQuery.noop;
+			}
+
+			if (typeof(onDragEnd) === "undefined") {
+				onDragEnd = jQuery.noop;
+			}
+
+			if (typeof(onDrag) === "undefined") {
+				onDrag = jQuery.noop;
+			}
+
+			element.wicketOnDragBegin = onDragBegin;
+			element.wicketOnDrag = onDrag;
+			element.wicketOnDragEnd = onDragEnd;
+
+
+			// set the mousedown handler
+			Wicket.Event.add(element, "mousedown", Wicket.Drag.mouseDownHandler);
+		},
+
+		mouseDownHandler: function (e) {
+			e = Wicket.Event.fix(e);
+
+			var element = this;
+
+			if (element.wicketOnDragBegin(element, e) === false) {
+				return;
+			}
+
+			if (e.preventDefault) {
+				e.preventDefault();
+			}
+
+			element.lastMouseX = e.clientX;
+			element.lastMouseY = e.clientY;
+
+			element.old_onmousemove = document.onmousemove;
+			element.old_onmouseup = document.onmouseup;
+			element.old_onselectstart = document.onselectstart;
+			element.old_onmouseout = document.onmouseout;
+
+			document.onselectstart = function () {
+				return false;
+			};
+			document.onmousemove = Wicket.Drag.mouseMove;
+			document.onmouseup = Wicket.Drag.mouseUp;
+			document.onmouseout = Wicket.Drag.mouseOut;
+
+			Wicket.Drag.current = element;
+		},
+
+		/**
+		 * Deinitializes the dragging support on given element.
+		 */
+		clean: function (element) {
+			element.onmousedown = null;
+		},
+
+		/**
+		 * Called when mouse is moved. This method fires the onDrag event
+		 * with element instance, deltaX and deltaY (the distance
+		 * between this call and the previous one).
+
+		 * The onDrag handler can optionally return an array of two integers
+		 * - the delta correction. This is used, for example, if there is
+		 * element being resized and the size limit has been reached (but the
+		 * mouse can still move).
+		 *
+		 * @param {Event} e
+		 */
+		mouseMove: function (e) {
+			e = Wicket.Event.fix(e);
+			var o = Wicket.Drag.current;
+
+			// this happens sometimes in Safari
+			if (e.clientX < 0 || e.clientY < 0) {
+				return;
+			}
+
+			if (o !== null) {
+				var deltaX = e.clientX - o.lastMouseX;
+				var deltaY = e.clientY - o.lastMouseY;
+
+				var res = o.wicketOnDrag(o, deltaX, deltaY, e);
+
+				if (res !== "undefined") {
+					res = [0, 0];
+				}
+
+				o.lastMouseX = e.clientX + res[0];
+				o.lastMouseY = e.clientY + res[1];
+			}
+
+			return false;
+		},
+
+		/**
+		 * Called when the mouse button is released.
+		 * Cleans all temporary variables and callback methods.
+		 */
+		mouseUp: function () {
+			var o = Wicket.Drag.current;
+
+			if (o) {
+				o.wicketOnDragEnd(o);
+
+				o.lastMouseX = null;
+				o.lastMouseY = null;
+
+				document.onmousemove = o.old_onmousemove;
+				document.onmouseup = o.old_onmouseup;
+				document.onselectstart = o.old_onselectstart;
+
+				document.onmouseout = o.old_onmouseout;
+
+				o.old_mousemove = null;
+				o.old_mouseup = null;
+				o.old_onselectstart = null;
+				o.old_onmouseout = null;
+
+				Wicket.Drag.current = null;
+			}
+		},
+
+		/**
+		 * Called when mouse leaves an element. We need this for firefox, as otherwise
+		 * the dragging would continue after mouse leaves the document.
+		 * Unfortunately this break dragging in firefox immediately after the mouse leaves
+		 * page.
+		 */
+		mouseOut: function (e) {
+			if (false && Wicket.Browser.isGecko()) {
+				// other browsers handle this more gracefully
+				e = Wicket.Event.fix(e);
+
+				if (e.target.tagName === "HTML") {
+					Wicket.Drag.mouseUp(e);
+				}
+			}
+		}
+	};
+	
 })();


[wicket] 03/11: JS removed Wicket.Browser.isGecko()

Posted by sv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 454afca7cd42c178a4d2b360051d5a3b21a0b260
Author: Sven Meier <sv...@apache.org>
AuthorDate: Mon May 6 14:35:55 2019 +0200

    JS removed Wicket.Browser.isGecko()
    
    was used in modal.js only; changed example to use autocomplete instead
    of LocalDateTimeField, because the latter doesn't contribute JS any more
    since switch to LocalDate
---
 .../wicket/ajax/res/js/wicket-ajax-jquery.js       | 19 -----------------
 .../ajax/builtin/modal/ModalContent1Page.html      |  4 ----
 .../ajax/builtin/modal/ModalContent1Page.java      |  2 --
 .../examples/ajax/builtin/modal/ModalPanel1.html   |  2 +-
 .../examples/ajax/builtin/modal/ModalPanel1.java   | 20 ++++++++++++++++--
 .../extensions/ajax/markup/html/modal/res/modal.js | 24 ++++------------------
 6 files changed, 23 insertions(+), 48 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 3b631bd..79337d9 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
@@ -829,11 +829,6 @@
 						}
 						calculatedRedirect += "/" + redirectUrl;
 
-						if (Wicket.Browser.isGecko()) {
-							// firefox 3 has problem with window.location setting relative url
-							calculatedRedirect = window.location.protocol + "//" + window.location.host + calculatedRedirect;
-						}
-
 						context.isRedirecting = true;
 						Wicket.Ajax.redirect(calculatedRedirect);
 					}
@@ -2067,9 +2062,6 @@
 										onScriptReady();
 									}
 								};
-							} else if (Wicket.Browser.isGecko()) {
-								// Firefox doesn't react on the checks above but still supports 'onload'
-								scriptDomNode.onload = onScriptReady;
 							} else {
 								// as a final resort notify after the current function execution
 								window.setTimeout(onScriptReady, 10);
@@ -2551,15 +2543,6 @@
 					wb._isIE11 = isTrident && is11;
 				}
 				return wb._isIE11;
-			},
-
-			_isGecko: null,
-			isGecko: function () {
-				var wb = Wicket.Browser;
-				if (wb._isGecko === null) {
-					wb._isGecko = (/Gecko/).test(window.navigator.userAgent) && !Wicket.Browser.isSafari();
-				}
-				return wb._isGecko;
 			}
 		},
 
@@ -2611,7 +2594,6 @@
 			},
 
 			fire: function (element, event) {
-				event = (event === 'mousewheel' && Wicket.Browser.isGecko()) ? 'DOMMouseScroll' : event;
 				jQuery(element).trigger(event);
 			},
 
@@ -2638,7 +2620,6 @@
 						jQuery(fn);
 					});
 				} else {
-					type = (type === 'mousewheel' && Wicket.Browser.isGecko()) ? 'DOMMouseScroll' : type;
 					var el = element;
 					if (typeof(element) === 'string') {
 						el = document.getElementById(element);
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.html
index 528940e..d8b4dc5 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.html
@@ -20,9 +20,5 @@
 			<div wicket:id="modal"></div>
 			<a wicket:id="open">Open another modal dialog</a>
 		</p>
-		<p>
-			<div>An example of a component that uses header contributions</div>
-			<div wicket:id="dateTimeField" />
-		</p>
 	</body>
 </html>
\ No newline at end of file
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
index 94ba192..5cf8277 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
@@ -65,8 +65,6 @@ public class ModalContent1Page extends WebPage
 			}
 		});
 
-		add(new LocalDateTimeField("dateTimeField"));
-
 		final ModalWindow modal;
 		add(modal = new ModalWindow("modal"));
 
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.html
index ecaee62..6ae319e 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.html
@@ -3,7 +3,7 @@
 	<div style="margin: 1em">
 		This is panel content! 
 		<p>
-			Date text field to demonstrate AJAX header contribution <span wicket:id="dateTimeField"></span>
+			Ajax autocomplete to demonstrate AJAX header contribution -> <input wicket:id="edit" />
 		</p>
 	</div>
 </wicket:panel>
\ No newline at end of file
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java
index 884077c..ba23e97 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java
@@ -16,8 +16,13 @@
  */
 package org.apache.wicket.examples.ajax.builtin.modal;
 
-import org.apache.wicket.extensions.markup.html.form.datetime.LocalDateTimeField;
+import java.util.Arrays;
+import java.util.Iterator;
+
+import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteSettings;
+import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
 import org.apache.wicket.markup.html.panel.Panel;
+import org.apache.wicket.model.Model;
 
 /**
  * @author Matej Knopp
@@ -32,6 +37,17 @@ public class ModalPanel1 extends Panel
 	public ModalPanel1(String id)
 	{
 		super(id);
-		add(new LocalDateTimeField("dateTimeField"));
+		
+		AutoCompleteSettings settings = new AutoCompleteSettings();
+		settings.setShowListOnEmptyInput(true);
+		
+		add(new AutoCompleteTextField<String>("edit", new Model<>(), settings)
+		{
+			@Override
+			protected Iterator<String> getChoices(String input)
+			{
+				return Arrays.asList("A", "B", "C").iterator();
+			}
+		});
 	}
 }
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index 845391b..2b476bb 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -253,7 +253,7 @@
 			// HACK - IE doesn't support position:fixed. Gecko does, however for a reason
 			// we need to have background position: absolute, which makes the movement of
 			// the window really jerky if the window stays position: fixed
-			if (Wicket.Browser.isIELessThan11() || Wicket.Browser.isGecko()) {
+			if (Wicket.Browser.isIELessThan11()) {
 				this.window.style.position = "absolute";
 			}
 
@@ -350,7 +350,7 @@
 			var scTop = 0;
 			var scLeft = 0;
 
-			if (Wicket.Browser.isIELessThan11() || Wicket.Browser.isGecko()) {
+			if (Wicket.Browser.isIELessThan11()) {
 				scLeft = Wicket.Window.getScrollX();
 				scTop = Wicket.Window.getScrollY();
 			}
@@ -575,15 +575,7 @@
 
 			this.adjustOpenWindowsStatusOnShow();
 
-			// show the window
-			if (false && Wicket.Browser.isGecko() && this.isIframe()) {
-				// HACK
-				// gecko flickers when showing the window
-				// unless the showing is postponed a little
-				window.setTimeout(function() { doShow(); }, 0);
-			} else {
-				doShow();
-			}
+			doShow();
 
 			// if the content supports focus and blur it, which means
 			// that the already focused element will lose it's focus
@@ -1144,7 +1136,7 @@
 				// HACK - it really sucks that we have to set this to absolute even for gecko.
 				// however background with position:fixed makes the text cursor in textfieds
 				// in modal window disappear
-				if (Wicket.Browser.isIELessThan11() || Wicket.Browser.isGecko()) {
+				if (Wicket.Browser.isIELessThan11()) {
 					e.style.position = "absolute";
 				}
 
@@ -1687,14 +1679,6 @@
 		 * page.
 		 */
 		mouseOut: function (e) {
-			if (false && Wicket.Browser.isGecko()) {
-				// other browsers handle this more gracefully
-				e = Wicket.Event.fix(e);
-
-				if (e.target.tagName === "HTML") {
-					Wicket.Drag.mouseUp(e);
-				}
-			}
 		}
 	};
 	


[wicket] 09/11: JS remove IE quirks support htmlToDomDocument()

Posted by sv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 295015393b591e46b199eb7468a36a81095ebd64
Author: Sven Meier <sv...@apache.org>
AuthorDate: Wed May 8 10:42:55 2019 +0200

    JS remove IE quirks support htmlToDomDocument()
---
 .../apache/wicket/ajax/res/js/wicket-ajax-jquery.js  | 20 --------------------
 1 file changed, 20 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 66319bf..401468d 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
@@ -39,7 +39,6 @@
 	var getAjaxBaseUrl,
 		isUndef,
 		replaceAll,
-		htmlToDomDocument,
 		nodeListToArray;
 
 	isUndef = function (target) {
@@ -63,20 +62,6 @@
 	};
 
 	/**
-	 * Helper method that serializes HtmlDocument to string and then
-	 * creates a DOMDocument by parsing this string.
-	 * It is used as a workaround for the problem described at https://issues.apache.org/jira/browse/WICKET-4332
-	 * @param htmlDocument (DispHtmlDocument) the document object created by IE from the XML response in the iframe
-	 */
-	htmlToDomDocument = function (htmlDocument) {
-		var xmlAsString = htmlDocument.body.outerText;
-		xmlAsString = xmlAsString.replace(/^\s+|\s+$/g, ''); // trim
-		xmlAsString = xmlAsString.replace(/(\n|\r)-*/g, ''); // remove '\r\n-'. The dash is optional.
-		var xmldoc = Wicket.Xml.parse(xmlAsString);
-		return xmldoc;
-	};
-
-	/**
 	 * Converts a NodeList to an Array
 	 *
 	 * @param nodeList The NodeList to convert
@@ -843,11 +828,6 @@
 			try {
 				var root = envelope.getElementsByTagName("ajax-response")[0];
 
-				if (isUndef(root) && envelope.compatMode === 'BackCompat') {
-					envelope = htmlToDomDocument(envelope);
-					root = envelope.getElementsByTagName("ajax-response")[0];
-				}
-
 				// the root element must be <ajax-response
 				if (isUndef(root) || root.tagName !== "ajax-response") {
 					this.failure(context, null, "Could not find root <ajax-response> element", null);


[wicket] 05/11: JS removed Wicket.Browser.isSafari()

Posted by sv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit ef121c5c6ccc6d3dd31b117b9152723fe990a22a
Author: Sven Meier <sv...@apache.org>
AuthorDate: Mon May 6 14:49:12 2019 +0200

    JS removed Wicket.Browser.isSafari()
    
    was used in wicket-autocomplete.js for obscure reasons
---
 .../wicket/ajax/res/js/wicket-ajax-jquery.js       | 26 ++--------------------
 .../html/autocomplete/wicket-autocomplete.js       |  6 -----
 2 files changed, 2 insertions(+), 30 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 dc52310..c20b86a 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
@@ -36,19 +36,6 @@
 		return;
 	}
 
-	/**
-	 * Add a check for old Safari. It should not be our responsibility to check the
-	 * browser's version, but it's a minor version that makes a difference here,
-	 * so we try to be at least user friendly.
-	 */
-	if (typeof(DOMParser) === "undefined" && Wicket.Browser.isSafari()) {
-		DOMParser = function () {};
-
-		DOMParser.prototype.parseFromString = function () {
-			window.alert('You are using an old version of Safari.\nTo be able to use this page you need at least version 2.0.1.');
-		};
-	}
-
 	var getAjaxBaseUrl,
 		isUndef,
 		replaceAll,
@@ -2467,15 +2454,6 @@
 	jQuery.extend(true, Wicket, {
 
 		Browser: {
-			_isSafari: null,
-			isSafari: function () {
-				var wb = Wicket.Browser;
-				if (wb._isSafari === null) {
-					wb._isSafari = !/Chrome/.test(window.navigator.userAgent) && /KHTML/.test(window.navigator.userAgent) && /Apple/.test(window.navigator.userAgent);
-				}
-				return wb._isSafari;
-			},
-
 			_isChrome: null,
 			isChrome: function () {
 				var wb = Wicket.Browser;
@@ -2489,7 +2467,7 @@
 			isIE: function () {
 				var wb = Wicket.Browser;
 				if (wb._isIE === null) {
-					wb._isIE = !Wicket.Browser.isSafari() && (typeof(document.all) !== "undefined" || window.navigator.userAgent.indexOf("Trident/")>-1) && typeof(window.opera) === "undefined";
+					wb._isIE = (typeof(document.all) !== "undefined" || window.navigator.userAgent.indexOf("Trident/")>-1) && typeof(window.opera) === "undefined";
 				}
 				return wb._isIE;
 			},
@@ -2519,7 +2497,7 @@
 			isIELessThan11: function () {
 				var wb = Wicket.Browser;
 				if (wb._isIELessThan11 === null) {
-					wb._isIELessThan11 = !Wicket.Browser.isSafari() && typeof(document.all) !== "undefined" && typeof(window.opera) === "undefined";
+					wb._isIELessThan11 = typeof(document.all) !== "undefined" && typeof(window.opera) === "undefined";
 				}
 				return wb._isIELessThan11;
 			},
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
index 26f4b8d..2610beb 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
@@ -128,9 +128,6 @@
 						}
 						render(true, false);
 
-						if (Wicket.Browser.isSafari()) {
-							return jqEvent.stopPropagation();
-						}
 						break;
 					case KEY_DOWN:
 						if (selected < elementCount-1) {
@@ -145,9 +142,6 @@
 							render(true, false);
 							showAutoComplete();
 						}
-						if (Wicket.Browser.isSafari()) {
-							return jqEvent.stopPropagation();
-						}
 						break;
 					case KEY_ESC:
 						if (visible === 1) {


[wicket] 07/11: JS removed Wicket.Browser.isIELess..()

Posted by sv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 5e2adc3049614ca4fbd6b15d69318ec8a3d6d813
Author: Sven Meier <sv...@apache.org>
AuthorDate: Mon May 6 15:01:02 2019 +0200

    JS removed Wicket.Browser.isIELess..()
    
    was used win wicket-autocomplete.js and modal.js for obscure reasons,
    anything lower ie 11 is no longer supported
---
 .../wicket/ajax/res/js/wicket-ajax-jquery.js       | 55 ++-----------
 wicket-core/src/test/js/event.js                   | 16 +---
 .../html/autocomplete/wicket-autocomplete.js       |  8 --
 .../extensions/ajax/markup/html/modal/res/modal.js | 92 ++--------------------
 4 files changed, 16 insertions(+), 155 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 6eaf581..dab6b21 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
@@ -1966,37 +1966,16 @@
 						// serialize the style to string
 						var content = Wicket.DOM.serializeNodeChildren(node);
 
-						// create stylesheet
-						if (Wicket.Browser.isIELessThan11()) {
-							try  {
-								document.createStyleSheet().cssText = content;
-								return FunctionsExecuter.DONE;
-							}
-							catch (ignore) {
-								var run = function() {
-									try {
-										document.createStyleSheet().cssText = content;
-									}
-									catch(e) {
-										Wicket.Log.error("Head.Contributor.processStyle: " + e);
-									}
-									notify();
-								};
-								window.setTimeout(run, 1);
-								return FunctionsExecuter.ASYNC;
-							}
-						} else {
-							// create style element
-							var style = Wicket.Head.createElement("style");
+						// create style element
+						var style = Wicket.Head.createElement("style");
 
-							// copy id attribute
-							style.id = node.getAttribute("id");
+						// copy id attribute
+						style.id = node.getAttribute("id");
 
-							var textNode = document.createTextNode(content);
-							style.appendChild(textNode);
+						var textNode = document.createTextNode(content);
+						style.appendChild(textNode);
 
-							Wicket.Head.addElement(style);
-						}
+						Wicket.Head.addElement(style);
 
 						// continue to next step
 						return FunctionsExecuter.DONE;
@@ -2473,26 +2452,6 @@
 				return wb._isIEQuirks;
 			},
 
-			_isIELessThan9: null,
-			isIELessThan9: function () {
-				var wb = Wicket.Browser;
-				if (wb._isIELessThan9 === null) {
-					var index = window.navigator.userAgent.indexOf("MSIE");
-					var version = parseFloat(window.navigator.userAgent.substring(index + 5));
-					wb._isIELessThan9 = Wicket.Browser.isIE() && version < 9;
-				}
-				return wb._isIELessThan9;
-			},
-
-			_isIELessThan11: null,
-			isIELessThan11: function () {
-				var wb = Wicket.Browser;
-				if (wb._isIELessThan11 === null) {
-					wb._isIELessThan11 = typeof(document.all) !== "undefined" && typeof(window.opera) === "undefined";
-				}
-				return wb._isIELessThan11;
-			},
-
 			_isIE11: null,
 			isIE11: function () {
 				var wb = Wicket.Browser;
diff --git a/wicket-core/src/test/js/event.js b/wicket-core/src/test/js/event.js
index c29ebf4..25bb050 100644
--- a/wicket-core/src/test/js/event.js
+++ b/wicket-core/src/test/js/event.js
@@ -329,25 +329,15 @@ jQuery(document).ready(function() {
 
 		stop();
 
-		if (Wicket.Browser.isIELessThan11()) {
-			expect(3);
-		} else {
-			expect(1);
-		}
+		expect(1);
 
 		var $input = jQuery("#inputChangeInput");
 		$input.on("inputchange", function() {
 			ok(true, "inputchange event is triggered!");
 		});
 
-		if (Wicket.Browser.isIELessThan11()) {
-			$input.trigger("paste");
-			$input.trigger("keyup");
-			$input.trigger("cut");
-		} else {
-			$input.trigger("input");
-		}
+		$input.trigger("input");
+		
 		start();
-
 	});
 });
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
index 2610beb..4093cab 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/autocomplete/wicket-autocomplete.js
@@ -668,14 +668,6 @@
 
 			Wicket.Log.info("Response processed successfully.");
 			hideIndicator();
-
-			// hack for a focus issue in IE, WICKET-2279
-			if (Wicket.Browser.isIELessThan11()) {
-				var range = document.selection.createRange();
-				if (range !== null) {
-					range.select();
-				}
-			}
 		}
 
 		function scheduleEmptyCheck() {
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index 2b2eddf..2e8ad15 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -240,23 +240,6 @@
 			this.bottom = _(idBottom);
 			this.captionText = _(idCaptionText);
 
-			if (Wicket.Browser.isIELessThan11()) {
-				// IE stupid 3px bug - not fixed even in IE7 quirks!
-				if (Wicket.Browser.isIEQuirks()) {
-					this.topLeft.style.marginRight = "-3px";
-					this.topRight.style.marginLeft = "-3px";
-					this.bottomLeft.style.marginRight = "-3px";
-					this.bottomRight.style.marginLeft = "-3px";
-				}
-			}
-
-			// HACK - IE doesn't support position:fixed. Gecko does, however for a reason
-			// we need to have background position: absolute, which makes the movement of
-			// the window really jerky if the window stays position: fixed
-			if (Wicket.Browser.isIELessThan11()) {
-				this.window.style.position = "absolute";
-			}
-
 			// fix the cursors
 			if (this.settings.resizable === false) {
 				this.top.style.cursor =  this.topLeft.style.cursor = this.topRight.style.cursor =
@@ -350,11 +333,6 @@
 			var scTop = 0;
 			var scLeft = 0;
 
-			if (Wicket.Browser.isIELessThan11()) {
-				scLeft = Wicket.Window.getScrollX();
-				scTop = Wicket.Window.getScrollY();
-			}
-
 			var width = Wicket.Window.getViewportWidth();
 			var height = Wicket.Window.getViewportHeight();
 
@@ -695,20 +673,6 @@
 			}
 
 			this.adjustOpenWindowsStatusAndZIndexesOnClose();
-
-			if (Wicket.Browser.isIELessThan11()) {
-				// There's a strange focus problem in IE that disables focus on entire page,
-				// unless something focuses an input
-				var e = document.createElement("input");
-				var x = Wicket.Window.getScrollX();
-				var y = Wicket.Window.getScrollY();
-				e.style.position = "absolute";
-				e.style.left = x + "px";
-				e.style.top = y + "px";
-				document.body.appendChild(e);
-				e.focus();
-				document.body.removeChild(e);
-			}
 		},
 
 		adjustOpenWindowsStatusAndZIndexesOnClose: function() {
@@ -1126,13 +1090,6 @@
 					e.style.backgroundImage = "none";
 				}
 
-				// HACK - it really sucks that we have to set this to absolute even for gecko.
-				// however background with position:fixed makes the text cursor in textfieds
-				// in modal window disappear
-				if (Wicket.Browser.isIELessThan11()) {
-					e.style.position = "absolute";
-				}
-
 				// set the element
 				this.element = e;
 
@@ -1288,25 +1245,6 @@
 			if (!this.shown) {
 				return;
 			}
-
-			if (Wicket.Browser.isIELessThan11()) {
-				this.boxes = [];
-				var selects = doc.getElementsByTagName("select");
-				for (var i = 0; i < selects.length; i++) {
-					var element = selects[i];
-
-					// if this is not an iframe window and the select is child of window content,
-					// don't hide it
-					if (win.isIframe() === false && this.isParent(element, win.content)) {
-						continue;
-					}
-
-					if (element.style.visibility !== "hidden") {
-						element.style.visibility = "hidden";
-						this.boxes.push(element);
-					}
-				}
-			}
 		},
 
 		/**
@@ -1345,15 +1283,13 @@
 			if (!this.shown) {
 				return;
 			}
-			// explorer doesn't need this, because for IE disableTabs() is called.
-			// plus in IE this causes problems because it scrolls document		);
-			if (Wicket.Browser.isIELessThan11() === false) {
-				this.focusRevertList = [];
-				var body = doc.getElementsByTagName("body")[0];
-				for (var i = 0; i < body.childNodes.length; ++i) {
-					this.disableFocusElement(body.childNodes[i], this.focusRevertList, win);
-				}
+			
+			this.focusRevertList = [];
+			var body = doc.getElementsByTagName("body")[0];
+			for (var i = 0; i < body.childNodes.length; ++i) {
+				this.disableFocusElement(body.childNodes[i], this.focusRevertList, win);
 			}
+			
 			this.focusDisabled=true;
 		},
 
@@ -1385,22 +1321,6 @@
 			if (typeof (this.tabbableTags) === "undefined") {
 				this.tabbableTags = ["A", "BUTTON", "TEXTAREA", "INPUT", "IFRAME", "SELECT"];
 			}
-			if (Wicket.Browser.isIELessThan11()) {
-				this.disabledTabsRevertList = [];
-				for (var j = 0; j < this.tabbableTags.length; j++) {
-					var tagElements = doc.getElementsByTagName(this.tabbableTags[j]);
-					for (var k = 0 ; k < tagElements.length; k++) {
-						// if this is not an iframe window and the element is child of modal window,
-						// don't disable tab on it
-						if (win.isIframe() === true || this.isParent(tagElements[k], win.window) === false) {
-							var element = tagElements[k];
-							element.hiddenTabIndex = element.tabIndex;
-							element.tabIndex="-1";
-							this.disabledTabsRevertList.push(element);
-						}
-					}
-				}
-			}
 		},
 
 		/**


[wicket] 08/11: JS removed Wicket.Browser.isIE..()

Posted by sv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 36623746f761d19204e7700a0d93fabd5bfe30d1
Author: Sven Meier <sv...@apache.org>
AuthorDate: Tue May 7 07:47:38 2019 +0200

    JS removed Wicket.Browser.isIE..()
    
    was used for special event "inputchange" only, which seems to work fine
    in IE >=11
---
 .../wicket/ajax/form/OnChangeAjaxBehavior.java     |  13 +--
 .../wicket/ajax/res/js/wicket-ajax-jquery.js       | 118 ---------------------
 .../wicket/ajax/form/OnChangeAjaxBehaviorTest.java |   2 +-
 .../OnChangeAjaxBehaviorTestPage_expected.html     |   2 +-
 wicket-core/src/test/js/all.html                   |   2 -
 wicket-core/src/test/js/event.js                   |  18 ----
 6 files changed, 7 insertions(+), 148 deletions(-)

diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavior.java b/wicket-core/src/main/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavior.java
index f960d29..a730455 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavior.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavior.java
@@ -30,9 +30,8 @@ import org.danekja.java.util.function.serializable.SerializableConsumer;
  * changed.
  * <p>
  * This behavior uses best available method to track changes on different types of form components.
- * To accomplish this for text input form components it uses a custom event, named 'inputchange',
- * that is handled in the best way for the specific browser. For other form component types the
- * 'change' event is used.
+ * For text input form components it uses event 'input', for other form component types the 'change'
+ * event is used.
  * </p>
  * 
  * @author Janne Hietam&auml;ki (janne)
@@ -46,11 +45,9 @@ public abstract class OnChangeAjaxBehavior extends AjaxFormComponentUpdatingBeha
 	private static final long serialVersionUID = 1L;
 
 	/**
-	 * 'inputchange' event delegates to 'input', 'keyup', 'cut' and 'paste' events
-	 * for text input form component depending on the browser.
-	 * 'change' is used as a fallback for all other form component types.
+	 * 'input' and 'change' used as a fallback for all other form component types.
 	 */
-	public static final String EVENT_NAME = "inputchange change";
+	public static final String EVENT_NAME = "input change";
 
 	/**
 	 * the change event
@@ -72,7 +69,7 @@ public abstract class OnChangeAjaxBehavior extends AjaxFormComponentUpdatingBeha
 
 		Component component = getComponent();
 
-		// textfiels and textareas will trigger this behavior with either 'inputchange' or 'change' events
+		// textfiels and textareas will trigger this behavior with either 'input' or 'change' events
 		// all the other components will use just 'change'
 		if (!(component instanceof TextField || component instanceof TextArea))
 		{
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 dab6b21..66319bf 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
@@ -2432,39 +2432,6 @@
 
 	jQuery.extend(true, Wicket, {
 
-		Browser: {
-			_isIE: null,
-			isIE: function () {
-				var wb = Wicket.Browser;
-				if (wb._isIE === null) {
-					wb._isIE = (typeof(document.all) !== "undefined" || window.navigator.userAgent.indexOf("Trident/")>-1) && typeof(window.opera) === "undefined";
-				}
-				return wb._isIE;
-			},
-
-			_isIEQuirks: null,
-			isIEQuirks: function () {
-				var wb = Wicket.Browser;
-				if (wb._isIEQuirks === null) {
-					// is the browser internet explorer in quirks mode (we could use document.compatMode too)
-					wb._isIEQuirks = Wicket.Browser.isIE() && window.document.documentElement.clientHeight === 0;
-				}
-				return wb._isIEQuirks;
-			},
-
-			_isIE11: null,
-			isIE11: function () {
-				var wb = Wicket.Browser;
-				if (wb._isIE11 === null) {
-					var userAgent = window.navigator.userAgent;
-					var isTrident = userAgent.indexOf("Trident") > -1;
-					var is11 = userAgent.indexOf("rv:11") > -1;
-					wb._isIE11 = isTrident && is11;
-				}
-				return wb._isIE11;
-			}
-		},
-
 		/**
 		 * Events related code
 		 * Based on code from Mootools (http://mootools.net)
@@ -2634,91 +2601,6 @@
 			}
 		}
 	});
-	/**
-	 * A special event that is used to listen for immediate changes in input fields.
-	 */
-	jQuery.event.special.inputchange = {
-
-		keys : {
-			BACKSPACE	: 8,
-			TAB			: 9,
-			ENTER		: 13,
-			ESC			: 27,
-			LEFT		: 37,
-			UP			: 38,
-			RIGHT		: 39,
-			DOWN		: 40,
-			SHIFT		: 16,
-			CTRL		: 17,
-			ALT			: 18,
-			END			: 35,
-			HOME		: 36
-		},
-
-		keyDownPressed : false,
-
-		setup: function () {
-
-			if (Wicket.Browser.isIE()) {
-				// WICKET-5959: IE >= 11 supports "input" events, but triggers too often
-				// to be reliable
-
-				jQuery(this).on('keydown', function (event) {
-					jQuery.event.special.inputchange.keyDownPressed = true;
-				});
-
-				jQuery(this).on("cut paste", function (evt) {
-
-					var self = this;
-
-					if (false === jQuery.event.special.inputchange.keyDownPressed) {
-						window.setTimeout(function() {
-							jQuery.event.special.inputchange.handler.call(self, evt);
-						}, 10);
-					}
-				});
-
-				jQuery(this).on("keyup", function (evt) {
-					jQuery.event.special.inputchange.keyDownPressed = false; // reset
-					jQuery.event.special.inputchange.handler.call(this, evt);
-				});
-
-			} else {
-
-				jQuery(this).on("input", jQuery.event.special.inputchange.handler);
-			}
-		},
-
-		teardown: function() {
-			jQuery(this).off("input keyup cut paste", jQuery.event.special.inputchange.handler);
-		},
-
-		handler: function( evt ) {
-			var WE = Wicket.Event;
-			var k = jQuery.event.special.inputchange.keys;
-
-			var kc = WE.keyCode(WE.fix(evt));
-			switch (kc) {
-				case k.ENTER:
-				case k.UP:
-				case k.DOWN:
-				case k.ESC:
-				case k.TAB:
-				case k.RIGHT:
-				case k.LEFT:
-				case k.SHIFT:
-				case k.ALT:
-				case k.CTRL:
-				case k.HOME:
-				case k.END:
-					return WE.stop(evt);
-				default:
-					evt.type = "inputchange";
-					var args = Array.prototype.slice.call( arguments, 0 );
-					return jQuery(this).trigger(evt.type, args);
-			}
-		}
-	};
 
 	// MISC FUNCTIONS
 
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTest.java b/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTest.java
index 61ac5cb..b3bc3c1 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTest.java
@@ -54,7 +54,7 @@ class OnChangeAjaxBehaviorTest extends WicketTestCase
 		tester.assertLabel("message",
 			"If you see this message wicket is properly configured and running");
 
-		tester.executeAjaxEvent("form:select", "inputchange change");
+		tester.executeAjaxEvent("form:select", "input change");
 
 		// assert rendered page class
 		tester.assertRenderedPage(ThirdPage.class);
diff --git a/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html b/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html
index e5ced2e..dd634cd 100644
--- a/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html
+++ b/wicket-core/src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehaviorTestPage_expected.html
@@ -14,7 +14,7 @@ Wicket.Ajax.baseUrl="wicket/bookmarkable/org.apache.wicket.ajax.form.OnChangeAja
 <script type="text/javascript" >
 /*<![CDATA[*/
 Wicket.Event.add(window, "domready", function(event) { 
-Wicket.Ajax.ajax({"u":"./org.apache.wicket.ajax.form.OnChangeAjaxBehaviorTestPage?0-1.0-form-field","m":"POST","c":"field1","e":"inputchange change"});;
+Wicket.Ajax.ajax({"u":"./org.apache.wicket.ajax.form.OnChangeAjaxBehaviorTestPage?0-1.0-form-field","m":"POST","c":"field1","e":"input change"});;
 Wicket.Ajax.ajax({"u":"./org.apache.wicket.ajax.form.OnChangeAjaxBehaviorTestPage?0-1.0-form-dropDown","m":"POST","c":"dropDown2","e":"change"});;
 Wicket.Event.publish(Wicket.Event.Topic.AJAX_HANDLERS_BOUND);
 ;});
diff --git a/wicket-core/src/test/js/all.html b/wicket-core/src/test/js/all.html
index f80bf89..d22e5a9 100644
--- a/wicket-core/src/test/js/all.html
+++ b/wicket-core/src/test/js/all.html
@@ -181,8 +181,6 @@
 
 		<div id="usedAsContextWicket5025"></div>
 
-		<input type="text" id="inputChangeInput">
-
 		<div id="ajaxIndicator"></div>
 	</div>
 </body>
diff --git a/wicket-core/src/test/js/event.js b/wicket-core/src/test/js/event.js
index 25bb050..f611310 100644
--- a/wicket-core/src/test/js/event.js
+++ b/wicket-core/src/test/js/event.js
@@ -322,22 +322,4 @@ jQuery(document).ready(function() {
 		Wicket.Event.publish('topicName1', "arg1", "arg2");
 		Wicket.Event.publish('topicName2', "arg1", "arg2");
 	});
-
-	module("Custom events");
-
-	test('inputchange', function() {
-
-		stop();
-
-		expect(1);
-
-		var $input = jQuery("#inputChangeInput");
-		$input.on("inputchange", function() {
-			ok(true, "inputchange event is triggered!");
-		});
-
-		$input.trigger("input");
-		
-		start();
-	});
 });


[wicket] 02/11: JS removed Wicket.Browser.isKHTML()

Posted by sv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 6283d49c4d1732baf9fbd0be4293e5b8fed75f5b
Author: Sven Meier <sv...@apache.org>
AuthorDate: Mon May 6 13:52:38 2019 +0200

    JS removed Wicket.Browser.isKHTML()
    
    was used in model.js only
---
 .../wicket/ajax/res/js/wicket-ajax-jquery.js       | 15 ---------------
 .../extensions/ajax/markup/html/modal/res/modal.js | 22 ++++------------------
 2 files changed, 4 insertions(+), 33 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 7d441ea..3b631bd 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
@@ -1854,12 +1854,6 @@
 					// get the header contribution text and unescape it if necessary
 					var text = Wicket.DOM.text(headerNode);
 
-					if (Wicket.Browser.isKHTML()) {
-						// konqueror crashes if there is a <script element in the xml, but <SCRIPT is fine.
-						text = text.replace(/<script/g, "<SCRIPT");
-						text = text.replace(/<\/script>/g, "</SCRIPT>");
-					}
-
 					// build a DOM tree of the contribution
 					var xmldoc = Wicket.Xml.parse(text);
 					return xmldoc;
@@ -2481,15 +2475,6 @@
 	jQuery.extend(true, Wicket, {
 
 		Browser: {
-			_isKHTML: null,
-			isKHTML: function () {
-				var wb = Wicket.Browser;
-				if (wb._isKHTML === null) {
-					wb._isKHTML = (/Konqueror|KHTML/).test(window.navigator.userAgent) && !/Apple/.test(window.navigator.userAgent);
-				}
-				return wb._isKHTML;
-			},
-
 			_isSafari: null,
 			isSafari: function () {
 				var wb = Wicket.Browser;
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index d5800e0..845391b 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -71,7 +71,7 @@
 		var Win;
 
 		// if it is an iframe window...
-		if (typeof(settings.src) !== "undefined" && Wicket.Browser.isKHTML() === false) {
+		if (typeof(settings.src) !== "undefined") {
 			// attempt to get class from parent
 			try {
 				Win = window.parent.Wicket.Window;
@@ -757,13 +757,6 @@
 						this.captionText.innerHTML = this.content.contentWindow.document.title;
 						// http://www.w3.org/TR/wai-aria/states_and_properties#aria-labelledby
 						this.window.setAttribute('aria-labelledBy', this.content.contentWindow.document.title);
-
-						// konqueror doesn't refresh caption text properly
-						if (Wicket.Browser.isKHTML()) {
-							this.captionText.style.display = 'none';
-							window.setTimeout(Wicket.bind(function() { this.captionText.style.display="block";}, this), 0);
-						}
-
 					}
 				}
 			} catch (ignore) {
@@ -791,7 +784,7 @@
 		onEnd: function(object) {
 			jQuery(this.window).find('iframe').css('pointer-events', 'auto');
 
-			if (Wicket.Browser.isKHTML() || this.content.style.visibility==='hidden') {
+			if (this.content.style.visibility==='hidden') {
 				this.content.style.visibility='hidden';
 				window.setTimeout(Wicket.bind(function() { this.content.style.visibility='visible'; }, this),  0 );
 			}
@@ -1143,16 +1136,9 @@
 
 				e.style.zIndex = Wicket.Window.Mask.zIndex;
 
-				// HACK - KHTML doesn't support colors with alpha transparency
-				// if the mask is not transparent we have to either
-				// make the background image visible (setting color to transparent) - for KHTML
-				// or make the background-image invisible (setting it to null) - for other browsers
+				// if the mask is not transparent we have to make the background-image invisible (setting it to null)
 				if (this.transparent === false) {
-					if (Wicket.Browser.isKHTML() === false) {
-						e.style.backgroundImage = "none";
-					} else {
-						e.style.backgroundColor = "transparent";
-					}
+					e.style.backgroundImage = "none";
 				}
 
 				// HACK - it really sucks that we have to set this to absolute even for gecko.


[wicket] 04/11: JS removed Wicket.Browser.isOpera()

Posted by sv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 9943d7ac897ee92d27fb15b110088ae89058781b
Author: Sven Meier <sv...@apache.org>
AuthorDate: Mon May 6 14:40:22 2019 +0200

    JS removed Wicket.Browser.isOpera()
    
    was used in MultiFileUploadField.js and modal.js for obscure reasons
---
 .../java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js     | 9 ---------
 .../wicket/markup/html/form/upload/MultiFileUploadField.js       | 5 -----
 .../apache/wicket/extensions/ajax/markup/html/modal/res/modal.js | 9 +--------
 3 files changed, 1 insertion(+), 22 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 79337d9..dc52310 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
@@ -2485,15 +2485,6 @@
 				return wb._isChrome;
 			},
 
-			_isOpera: null,
-			isOpera: function () {
-				var wb = Wicket.Browser;
-				if (wb._isOpera === null) {
-					wb._isOpera = !Wicket.Browser.isSafari() && typeof(window.opera) !== "undefined";
-				}
-				return wb._isOpera;
-			},
-
 			_isIE: null,
 			isIE: function () {
 				var wb = Wicket.Browser;
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js
index 114f37c..aa46600 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/upload/MultiFileUploadField.js
@@ -71,11 +71,6 @@ function MultiSelector( eprefix, list_target, max, useMultipleAttr, del_label ){
 
 			if (this.useMultipleAttr) {
 				element.multiple = this.useMultipleAttr;
-				if (Wicket.Browser.isOpera()) {
-					// in Opera 12.02, changing 'multiple' this way does not update the field
-					element.type = 'button';
-					element.type = 'file';
-				}
 			}
 
 			// Element name -- what number am I?
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
index 2b476bb..2b2eddf 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
@@ -488,14 +488,7 @@
 				this.update = window.setInterval(Wicket.bind(this.updateTitle, this), 100);
 			}
 
-			// opera seems to have problem accessing contentWindow here
-			if (Wicket.Browser.isOpera()) {
-				this.content.onload = Wicket.bind(function() {
-					this.content.contentWindow.name = this.settings.iframeName;
-				}, this);
-			} else {
-				this.content.contentWindow.name = this.settings.iframeName;
-			}
+			this.content.contentWindow.name = this.settings.iframeName;
 
 			try
 			{


[wicket] 06/11: JS removed Wicket.Browser.isChrome()

Posted by sv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 5d94a73381b63fea26eacd83e8b6d9dc952d61ef
Author: Sven Meier <sv...@apache.org>
AuthorDate: Mon May 6 14:50:31 2019 +0200

    JS removed Wicket.Browser.isChrome()
    
    wasn't used at all
---
 .../java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js     | 9 ---------
 wicket-core/src/test/js/amd.js                                   | 3 +--
 2 files changed, 1 insertion(+), 11 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 c20b86a..6eaf581 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
@@ -2454,15 +2454,6 @@
 	jQuery.extend(true, Wicket, {
 
 		Browser: {
-			_isChrome: null,
-			isChrome: function () {
-				var wb = Wicket.Browser;
-				if (wb._isChrome === null) {
-					wb._isChrome = (/KHTML/).test(window.navigator.userAgent) && /Apple/.test(window.navigator.userAgent) && /Chrome/.test(window.navigator.userAgent);
-				}
-				return wb._isChrome;
-			},
-
 			_isIE: null,
 			isIE: function () {
 				var wb = Wicket.Browser;
diff --git a/wicket-core/src/test/js/amd.js b/wicket-core/src/test/js/amd.js
index d2617d2..8756d65 100644
--- a/wicket-core/src/test/js/amd.js
+++ b/wicket-core/src/test/js/amd.js
@@ -32,10 +32,9 @@ define(
 			runTests: function () {
 				qunit.test("Wicket object is successfully loaded via RequireJs", function () {
 
-					qunit.expect(15);
+					qunit.expect(14);
 
 					// test for one member for each Wicket.** module
-					qunit.ok($.isFunction(w.Browser.isChrome), "Wicket Browser (from wicket-ajax-jquery.js) is imported");
 					qunit.ok($.isFunction(w.Event.fix), "Wicket Event (from wicket-ajax-jquery.js) is imported");
 					qunit.ok($.isFunction(w.Ajax.ajax), "Wicket Ajax (from wicket-ajax-jquery.js) is imported");
 					qunit.ok($.isFunction(w.DOM.get), "Wicket DOM (from wicket-ajax-jquery.js) is imported");


[wicket] 11/11: JS simplified structure

Posted by sv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

svenmeier pushed a commit to branch wicket-js-cleanup
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit 234666aac381c1ce21e4b700204ed022c2b93992
Author: Sven Meier <sv...@apache.org>
AuthorDate: Thu May 9 07:57:23 2019 +0200

    JS simplified structure
    
    leftover from merger with wicket-event
---
 .../apache/wicket/ajax/res/js/wicket-ajax-jquery.js    | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 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 fddc251..4d03f21 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
@@ -36,11 +36,7 @@
 		return;
 	}
 
-	var getAjaxBaseUrl,
-		isUndef,
-		nodeListToArray;
-
-	isUndef = function (target) {
+	var isUndef = function (target) {
 		return (typeof(target) === 'undefined' || target === null);
 	};
 
@@ -50,7 +46,7 @@
 	 * return '.' (current folder) as base URL.
 	 * Used for request header and parameter
 	 */
-	getAjaxBaseUrl = function () {
+	var getAjaxBaseUrl = function () {
 		var baseUrl = Wicket.Ajax.baseUrl || '.';
 		return baseUrl;
 	};
@@ -61,7 +57,7 @@
 	 * @param nodeList The NodeList to convert
 	 * @returns {Array} The array with document nodes
 	 */
-	nodeListToArray = function (nodeList) {
+	var nodeListToArray = function (nodeList) {
 		var arr = [],
 			nodeId;
 		if (nodeList && nodeList.length) {
@@ -2385,12 +2381,8 @@
 					}
 				}
 			}
-		}
-	});
-
-
-	jQuery.extend(true, Wicket, {
-
+		},
+		
 		/**
 		 * Events related code
 		 * Based on code from Mootools (http://mootools.net)