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 2014/06/16 17:25:34 UTC
[1/2] git commit: Fix JSHint problems
Repository: wicket
Updated Branches:
refs/heads/wicket-6.x d0fd21029 -> 4ffd8f6f4
Fix JSHint problems
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/4a3ee06b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/4a3ee06b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/4a3ee06b
Branch: refs/heads/wicket-6.x
Commit: 4a3ee06b47ff3f21d0cd0ce4cb80fa9284fcbc3d
Parents: d0fd210
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Jun 16 18:23:30 2014 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Jun 16 18:23:30 2014 +0300
----------------------------------------------------------------------
.../java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/4a3ee06b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
index 2f9c360..d8b6825 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
+++ b/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js
@@ -97,7 +97,7 @@
if (wb._isIELessThan7 === null) {
var index = window.navigator.userAgent.indexOf("MSIE");
var version = parseFloat(window.navigator.userAgent.substring(index + 5));
- wb._isIELessThan7 = Wicket.Browser.isIE() && version < 7
+ wb._isIELessThan7 = Wicket.Browser.isIE() && version < 7;
}
return wb._isIELessThan7;
},
@@ -108,7 +108,7 @@
if (wb._isIE7 === null) {
var index = window.navigator.userAgent.indexOf("MSIE");
var version = parseFloat(window.navigator.userAgent.substring(index + 5));
- wb._isIE7 = Wicket.Browser.isIE() && version >= 7
+ wb._isIE7 = Wicket.Browser.isIE() && version >= 7;
}
return wb._isIE7;
},
[2/2] git commit: WICKET-5607 Wicket Ajax fires calls scheduled by
AbstractAjaxTimerBehavior even after unload of the page
Posted by mg...@apache.org.
WICKET-5607 Wicket Ajax fires calls scheduled by AbstractAjaxTimerBehavior even after unload of the page
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/4ffd8f6f
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/4ffd8f6f
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/4ffd8f6f
Branch: refs/heads/wicket-6.x
Commit: 4ffd8f6f4986617caf9a4dcf293c9f59daa263a8
Parents: 4a3ee06
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Jun 16 18:23:42 2014 +0300
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Jun 16 18:23:42 2014 +0300
----------------------------------------------------------------------
.../apache/wicket/ajax/res/js/wicket-ajax-jquery.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/4ffd8f6f/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js
----------------------------------------------------------------------
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 cff2283..9b638a2 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
@@ -2806,6 +2806,21 @@
Wicket.Event.add(window, 'domready', Wicket.Focus.attachFocusEvent);
/**
+ * Clear any scheduled Ajax timers when leaving the current page
+ */
+ Wicket.Event.add(window, "beforeunload", function() {
+ var WTH = Wicket.TimerHandles;
+ if (WTH) {
+ for (var th in WTH) {
+ if (WTH.hasOwnProperty(th)) {
+ window.clearTimeout(WTH[th]);
+ delete WTH[th];
+ }
+ }
+ }
+ });
+
+ /**
* Remove any scheduled timers on the removed element.
* This wont remove the timer for elements which are children of the removed one.
*/