You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2013/06/21 09:20:36 UTC

git commit: WICKET-5246 Use ModalWindow settings for unloadConfirmation

Updated Branches:
  refs/heads/master 2f0cd3324 -> 4eca43fd1


WICKET-5246 Use ModalWindow settings for unloadConfirmation


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/4eca43fd
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/4eca43fd
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/4eca43fd

Branch: refs/heads/master
Commit: 4eca43fd13b0275064cfc68992b82037db55cc29
Parents: 2f0cd33
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Fri Jun 21 09:19:42 2013 +0200
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Fri Jun 21 09:19:42 2013 +0200

----------------------------------------------------------------------
 .../extensions/ajax/markup/html/modal/res/modal.js    | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/4eca43fd/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
----------------------------------------------------------------------
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 9e3e85a..bf039a9 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
@@ -198,12 +198,6 @@
 	Wicket.Window = Wicket.Class.create();
 
 	/**
-	 * Display confirmation dialog if the user is about to leave a page (IE and FF).
-	 * @deprecated Use the settings instead. TODO Remove for/after Wicket 7.0
-	 */
-	Wicket.Window.unloadConfirmation = true;
-
-	/**
 	 * Creates a wicket window instance. The advantage of using this is
 	 * that in case an iframe modal window is opened in an already displayed
 	 * iframe modal window, the new window is created as a top-level window.
@@ -317,7 +311,9 @@
 
 				onClose: function() { }, /* called when window is closed */
 
-				mask: "semi-transparent" /* or "transparent" */
+				mask: "semi-transparent", /* or "transparent" */
+
+				unloadConfirmation : true /* Display confirmation dialog if the user is about to leave a page (IE and FF) */
 
 			}, settings || { });
 
@@ -738,9 +734,7 @@
 			// preserve old beforeunload handler
 			this.old_onbeforeunload = window.onbeforeunload;
 
-			// Wicket.Window.unloadConfirmation is deprecated but we need to check it
-			// for backward compatibility. Remove it after Wicket 7.0
-			if (this.settings.unloadConfirmation && Wicket.Window.unloadConfirmation) {
+			if (this.settings.unloadConfirmation) {
 				// new beforeunload handler - ask user before reloading window
 				window.onbeforeunload = function() {
 					return "Reloading this page will cause the modal window to disappear.";