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/02/07 09:24:05 UTC
[1/2] git commit: Small optimization - do not read the 's
text if the old HTML element is not in the DOM
Updated Branches:
refs/heads/master 825da3055 -> 2c2df2efe
Small optimization - do not read the <component>'s text if the old HTML element is not in the DOM
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ce837c4b
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ce837c4b
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ce837c4b
Branch: refs/heads/master
Commit: ce837c4b26f905a17f4b75bf7973a65c017c74ef
Parents: 825da30
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Fri Feb 7 09:20:44 2014 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Fri Feb 7 09:20:44 2014 +0100
----------------------------------------------------------------------
.../wicket/ajax/res/js/wicket-ajax-jquery.js | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/ce837c4b/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 225b6f1..0d35929 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
@@ -1027,16 +1027,6 @@
context.steps.push(function (notify) {
// get the component id
var compId = node.getAttribute("id");
- var text = jQuery(node).text();
-
- // if the text was escaped, unascape it
- // (escaping is done when the component body contains a CDATA section)
- var encoding = node.getAttribute("encoding");
- if (encoding) {
- text = Wicket.Head.Contributor.decode(encoding, text);
- }
-
- // get existing component
var element = Wicket.$(compId);
if (isUndef(element)) {
@@ -1044,6 +1034,15 @@
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 {
+ var text = jQuery(node).text();
+
+ // if the text was escaped, unescape it
+ // (escaping is done when the component body contains a CDATA section)
+ var encoding = node.getAttribute("encoding");
+ if (encoding) {
+ text = Wicket.Head.Contributor.decode(encoding, text);
+ }
+
// replace the component
Wicket.DOM.replace(element, text);
}
[2/2] git commit: Fix the path to jquery for the tests
Posted by mg...@apache.org.
Fix the path to jquery for the tests
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2c2df2ef
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2c2df2ef
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2c2df2ef
Branch: refs/heads/master
Commit: 2c2df2efecdefe7f602063234bf25fece246b1b0
Parents: ce837c4
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Fri Feb 7 09:21:28 2014 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Fri Feb 7 09:21:28 2014 +0100
----------------------------------------------------------------------
wicket-core/src/test/js/all.html | 2 +-
wicket-core/src/test/js/amd.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/2c2df2ef/wicket-core/src/test/js/all.html
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/js/all.html b/wicket-core/src/test/js/all.html
index 09f01bf..be9af61 100644
--- a/wicket-core/src/test/js/all.html
+++ b/wicket-core/src/test/js/all.html
@@ -5,7 +5,7 @@
<title id="titleId">All tests</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="qunit/qunit.css" type="text/css" media="screen" />
- <script src="../../main/java/org/apache/wicket/resource/jquery/jquery-1.10.2.js"></script>
+ <script src="../../main/java/org/apache/wicket/resource/jquery/jquery-1.11.0.js"></script>
<script src="../../main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery.js"></script>
<script src="../../main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js"></script>
<script src="../../main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug.js"></script>
http://git-wip-us.apache.org/repos/asf/wicket/blob/2c2df2ef/wicket-core/src/test/js/amd.html
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/js/amd.html b/wicket-core/src/test/js/amd.html
index 50b88c6..73a9376 100644
--- a/wicket-core/src/test/js/amd.html
+++ b/wicket-core/src/test/js/amd.html
@@ -9,7 +9,7 @@
<script type="text/javascript">
var require = {
paths: {
- 'jquery': '../../main/java/org/apache/wicket/resource/jquery/jquery-1.10.2', // no .js extension
+ 'jquery': '../../main/java/org/apache/wicket/resource/jquery/jquery-1.11.0', // no .js extension
'wicket-event': '../../main/java/org/apache/wicket/ajax/res/js/wicket-event-jquery',
'Wicket': '../../main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery',
'WicketDebugWindow': '../../main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery-debug'