You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2014/04/02 00:10:11 UTC
[1/6] git commit: Correctly build the links used to test activation
context parameters
Repository: tapestry-5
Updated Branches:
refs/heads/master 642bd724e -> 6e3c9413c
Correctly build the links used to test activation context parameters
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/6e3c9413
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/6e3c9413
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/6e3c9413
Branch: refs/heads/master
Commit: 6e3c9413ccfcb6bd47816f65e6b2dfd5dfe66ffb
Parents: 1008eb6
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Apr 1 15:09:26 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Apr 1 15:10:07 2014 -0700
----------------------------------------------------------------------
.../ActivationContextIntegrationTests.java | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/6e3c9413/tapestry-core/src/test/java/org/apache/tapestry5/integration/activationctx/ActivationContextIntegrationTests.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/activationctx/ActivationContextIntegrationTests.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/activationctx/ActivationContextIntegrationTests.java
index 9cb4ef7..d8fc0bf 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/activationctx/ActivationContextIntegrationTests.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/activationctx/ActivationContextIntegrationTests.java
@@ -1,4 +1,4 @@
-// Copyright 2013 The Apache Software Foundation
+// Copyright 2014 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -15,11 +15,13 @@
package org.apache.tapestry5.integration.activationctx;
import org.apache.tapestry5.integration.TapestryCoreTestCase;
+import org.apache.tapestry5.test.TapestryTestConfiguration;
import org.testng.annotations.Test;
/**
* To test TAP5-2070
*/
+@TapestryTestConfiguration(webAppFolder = "src/test/activationctx")
public class ActivationContextIntegrationTests extends TapestryCoreTestCase
{
@@ -89,16 +91,19 @@ public class ActivationContextIntegrationTests extends TapestryCoreTestCase
assertTextPresent("You are able to see me only with two parameters in the activation context");
}
- private void assertLinksAreCorrect(final String suffix, final String expectedText)
+ private void assertLinksAreCorrect(final String label, final String expectedText)
{
- assertNoContextCorrect(suffix, STRING_PARAMETER, expectedText);
- assertNoContextCorrect(suffix, PAGE_CLASS_PARAMETER, expectedText);
- assertNoContextCorrect(suffix, PAGE_INSTANCE_PARAMETER, expectedText);
+ assertNoContextCorrect(label, STRING_PARAMETER, expectedText);
+ assertNoContextCorrect(label, PAGE_CLASS_PARAMETER, expectedText);
+ assertNoContextCorrect(label, PAGE_INSTANCE_PARAMETER, expectedText);
}
- private void assertNoContextCorrect(String linkSuffix, String linkPrefix, String expectedText)
+ private void assertNoContextCorrect(String label, String suffix, String expectedText)
{
- openLinks("No context correct" + linkPrefix != null ? ": " + linkPrefix : "");
+ String fullLabel = suffix == null ? label : label + ": " + suffix;
+
+ openLinks(fullLabel);
+
assertTextPresent(expectedText);
}
[5/6] git commit: Simulate jQuery's stopImmediatePropagation() for in
the Prototype EventWrapper
Posted by hl...@apache.org.
Simulate jQuery's stopImmediatePropagation() for in the Prototype EventWrapper
Fixes issues where Ajax form submissions could occur even after validation errors
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/1008eb60
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/1008eb60
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/1008eb60
Branch: refs/heads/master
Commit: 1008eb60fc66f516f001e47e2ce16c89db76df72
Parents: c35d588
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Apr 1 14:54:56 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Apr 1 15:10:07 2014 -0700
----------------------------------------------------------------------
.../org/apache/tapestry5/t5-core-dom.coffee | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1008eb60/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
index c76a6fe..64bb6cf 100644
--- a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
+++ b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
@@ -120,6 +120,7 @@ define ["underscore", "./utils", "./events", "jquery"],
@nativeEvent.preventDefault()
@nativeEvent.stopImmediatePropagation()
#elseif prototype
+ # There's no equivalent to stopImmediatePropagation() unfortunately.
@nativeEvent.stop()
#endif
@@ -178,7 +179,11 @@ define ["underscore", "./utils", "./events", "jquery"],
elementWrapper = new ElementWrapper prototypeEvent.findElement()
eventWrapper = new EventWrapper prototypeEvent
- result = handler.call elementWrapper, eventWrapper, eventWrapper.memo
+ # Because there's no stopImmediatePropogation() as with jQuery, we detect if the
+ # event was stopped and simply stop calling the handler.
+ result = if prototypeEvent.stopped
+ false
+ else handler.call elementWrapper, eventWrapper, eventWrapper.memo
# If an event handler returns exactly false, then stop the event.
if result is false
[5/6] git commit: Simulate jQuery's stopImmediatePropagation() for in
the Prototype EventWrapper
Posted by hl...@apache.org.
Simulate jQuery's stopImmediatePropagation() for in the Prototype EventWrapper
Fixes issues where Ajax form submissions could occur even after validation errors
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/1008eb60
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/1008eb60
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/1008eb60
Branch: refs/heads/master
Commit: 1008eb60fc66f516f001e47e2ce16c89db76df72
Parents: c35d588
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Apr 1 14:54:56 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Apr 1 15:10:07 2014 -0700
----------------------------------------------------------------------
.../org/apache/tapestry5/t5-core-dom.coffee | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/1008eb60/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
index c76a6fe..64bb6cf 100644
--- a/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
+++ b/tapestry-core/src/main/preprocessed-coffeescript/org/apache/tapestry5/t5-core-dom.coffee
@@ -120,6 +120,7 @@ define ["underscore", "./utils", "./events", "jquery"],
@nativeEvent.preventDefault()
@nativeEvent.stopImmediatePropagation()
#elseif prototype
+ # There's no equivalent to stopImmediatePropagation() unfortunately.
@nativeEvent.stop()
#endif
@@ -178,7 +179,11 @@ define ["underscore", "./utils", "./events", "jquery"],
elementWrapper = new ElementWrapper prototypeEvent.findElement()
eventWrapper = new EventWrapper prototypeEvent
- result = handler.call elementWrapper, eventWrapper, eventWrapper.memo
+ # Because there's no stopImmediatePropogation() as with jQuery, we detect if the
+ # event was stopped and simply stop calling the handler.
+ result = if prototypeEvent.stopped
+ false
+ else handler.call elementWrapper, eventWrapper, eventWrapper.memo
# If an event handler returns exactly false, then stop the event.
if result is false
[6/6] git commit: TAP5-2044: Misleading error message in logs when
accessing classpath assets
Posted by hl...@apache.org.
TAP5-2044: Misleading error message in logs when accessing classpath assets
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/3da4d99d
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/3da4d99d
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/3da4d99d
Branch: refs/heads/master
Commit: 3da4d99d66628fbde08c3fbd092194e63e03956a
Parents: 64d1618
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Apr 1 14:52:53 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Apr 1 15:10:07 2014 -0700
----------------------------------------------------------------------
.../internal/services/AssetSourceImpl.java | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3da4d99d/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
index 2924d5b..cd9b4af 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
@@ -1,4 +1,4 @@
-// Copyright 2006-2013 The Apache Software Foundation
+// Copyright 2006-2014 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -158,9 +158,13 @@ public class AssetSourceImpl extends LockSupport implements AssetSource
// Ends with trailing slash:
String metaRoot = "META-INF/assets/" + toPathPrefix(resources.getComponentModel().getLibraryName());
- String metaPath = metaRoot + (restOfPath.startsWith("/")
- ? restOfPath.substring(1)
- : restOfPath);
+ String trimmedRestOfPath = restOfPath.startsWith("/") ? restOfPath.substring(1) : restOfPath;
+
+
+ // TAP5-2044: Some components specify a full path, starting with META-INF/assets/, and we should just trust them.
+ // The warning logic below is for compnents that specify a relative path. Our bad decisions come back to haunt us;
+ // Resource paths should always had a leading slash to differentiate relative from complete.
+ String metaPath = trimmedRestOfPath.startsWith("META-INF/assets/") ? trimmedRestOfPath : metaRoot + trimmedRestOfPath;
// Based on the path, metaResource is where it should exist in a 5.4 and beyond world ... unless the expanded
// path was a bit too full of ../ sequences, in which case the expanded path is not valid and we adjust the
@@ -236,6 +240,11 @@ public class AssetSourceImpl extends LockSupport implements AssetSource
return getAssetForResource(oldStyle);
}
+ /**
+ * Figure out the relative path, under /META-INF/assets/ for resources for a given library.
+ * The application library is the blank string and goes directly in /assets/; other libraries
+ * are like virtual folders within /assets/.
+ */
private String toPathPrefix(String libraryName)
{
return libraryName.equals("") ? "" : libraryName + "/";
[2/6] git commit: Fix broken indentation (via IntelliJ) that broke
Ajax form submissions
Posted by hl...@apache.org.
Fix broken indentation (via IntelliJ) that broke Ajax form submissions
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/c35d588b
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/c35d588b
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/c35d588b
Branch: refs/heads/master
Commit: c35d588b0fb5d57501086ca4cff4598b8c3f0bf8
Parents: 3da4d99
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Apr 1 14:53:51 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Apr 1 15:10:07 2014 -0700
----------------------------------------------------------------------
.../src/main/coffeescript/META-INF/modules/t5/core/forms.coffee | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c35d588b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/forms.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/forms.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/forms.coffee
index 51c0e03..e148189 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/forms.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/forms.coffee
@@ -78,7 +78,7 @@ define ["./events", "./dom", "underscore"],
value = field.value()
- return if value is null
+ return if value is null
name = field.element.name
[3/6] git commit: Update the z-index of the console and the exception
frame so that the exception frame's close button is clickable
Posted by hl...@apache.org.
Update the z-index of the console and the exception frame so that the exception frame's close button is clickable
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/da6d7f3c
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/da6d7f3c
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/da6d7f3c
Branch: refs/heads/master
Commit: da6d7f3c2aeb23dd2df23a3cf1d0a5c20642e2b6
Parents: 642bd72
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Apr 1 14:32:30 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Apr 1 15:10:07 2014 -0700
----------------------------------------------------------------------
.../main/resources/META-INF/assets/tapestry5/exception-frame.css | 2 +-
.../main/resources/META-INF/assets/tapestry5/tapestry-console.css | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/da6d7f3c/tapestry-core/src/main/resources/META-INF/assets/tapestry5/exception-frame.css
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/exception-frame.css b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/exception-frame.css
index 640d509..da92648 100644
--- a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/exception-frame.css
+++ b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/exception-frame.css
@@ -7,7 +7,7 @@ DIV.exception-container {
left: 5%;
bottom: 5%;
right: 5%;
- z-index: 1100;
+ z-index: 2000;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/da6d7f3c/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry-console.css
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry-console.css b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry-console.css
index de98d34..404cc83 100644
--- a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry-console.css
+++ b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry-console.css
@@ -1,7 +1,7 @@
/* The console is used to show debugging messages. */
.tapestry-console {
position: fixed;
- z-index: 2000;
+ z-index: 1100;
bottom: 0px;
left: 0px;
right: 0px;
[2/6] git commit: Fix broken indentation (via IntelliJ) that broke
Ajax form submissions
Posted by hl...@apache.org.
Fix broken indentation (via IntelliJ) that broke Ajax form submissions
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/c35d588b
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/c35d588b
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/c35d588b
Branch: refs/heads/master
Commit: c35d588b0fb5d57501086ca4cff4598b8c3f0bf8
Parents: 3da4d99
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Apr 1 14:53:51 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Apr 1 15:10:07 2014 -0700
----------------------------------------------------------------------
.../src/main/coffeescript/META-INF/modules/t5/core/forms.coffee | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c35d588b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/forms.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/forms.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/forms.coffee
index 51c0e03..e148189 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/forms.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/forms.coffee
@@ -78,7 +78,7 @@ define ["./events", "./dom", "underscore"],
value = field.value()
- return if value is null
+ return if value is null
name = field.element.name
[4/6] git commit: Add CSS classes to the button
Posted by hl...@apache.org.
Add CSS classes to the button
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/64d16189
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/64d16189
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/64d16189
Branch: refs/heads/master
Commit: 64d16189925cbe839a6646f25b25a310bfd1a187
Parents: da6d7f3
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Apr 1 14:32:46 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Apr 1 15:10:07 2014 -0700
----------------------------------------------------------------------
tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/64d16189/tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml b/tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml
index c5394a8..aa4f56f 100644
--- a/tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml
+++ b/tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml
@@ -23,7 +23,7 @@
<t:errors/>
<t:textfield t:id="value"/>
<br/>
- <t:linksubmit t:id="mySubmit">submit</t:linksubmit>
+ <t:linksubmit t:id="mySubmit" class="btn btn-primary">submit</t:linksubmit>
</t:form>
</t:border>
\ No newline at end of file
[6/6] git commit: TAP5-2044: Misleading error message in logs when
accessing classpath assets
Posted by hl...@apache.org.
TAP5-2044: Misleading error message in logs when accessing classpath assets
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/3da4d99d
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/3da4d99d
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/3da4d99d
Branch: refs/heads/master
Commit: 3da4d99d66628fbde08c3fbd092194e63e03956a
Parents: 64d1618
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Apr 1 14:52:53 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Apr 1 15:10:07 2014 -0700
----------------------------------------------------------------------
.../internal/services/AssetSourceImpl.java | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/3da4d99d/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
index 2924d5b..cd9b4af 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/AssetSourceImpl.java
@@ -1,4 +1,4 @@
-// Copyright 2006-2013 The Apache Software Foundation
+// Copyright 2006-2014 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -158,9 +158,13 @@ public class AssetSourceImpl extends LockSupport implements AssetSource
// Ends with trailing slash:
String metaRoot = "META-INF/assets/" + toPathPrefix(resources.getComponentModel().getLibraryName());
- String metaPath = metaRoot + (restOfPath.startsWith("/")
- ? restOfPath.substring(1)
- : restOfPath);
+ String trimmedRestOfPath = restOfPath.startsWith("/") ? restOfPath.substring(1) : restOfPath;
+
+
+ // TAP5-2044: Some components specify a full path, starting with META-INF/assets/, and we should just trust them.
+ // The warning logic below is for compnents that specify a relative path. Our bad decisions come back to haunt us;
+ // Resource paths should always had a leading slash to differentiate relative from complete.
+ String metaPath = trimmedRestOfPath.startsWith("META-INF/assets/") ? trimmedRestOfPath : metaRoot + trimmedRestOfPath;
// Based on the path, metaResource is where it should exist in a 5.4 and beyond world ... unless the expanded
// path was a bit too full of ../ sequences, in which case the expanded path is not valid and we adjust the
@@ -236,6 +240,11 @@ public class AssetSourceImpl extends LockSupport implements AssetSource
return getAssetForResource(oldStyle);
}
+ /**
+ * Figure out the relative path, under /META-INF/assets/ for resources for a given library.
+ * The application library is the blank string and goes directly in /assets/; other libraries
+ * are like virtual folders within /assets/.
+ */
private String toPathPrefix(String libraryName)
{
return libraryName.equals("") ? "" : libraryName + "/";
[4/6] git commit: Add CSS classes to the button
Posted by hl...@apache.org.
Add CSS classes to the button
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/64d16189
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/64d16189
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/64d16189
Branch: refs/heads/master
Commit: 64d16189925cbe839a6646f25b25a310bfd1a187
Parents: da6d7f3
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Apr 1 14:32:46 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Apr 1 15:10:07 2014 -0700
----------------------------------------------------------------------
tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/64d16189/tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml b/tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml
index c5394a8..aa4f56f 100644
--- a/tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml
+++ b/tapestry-core/src/test/app1/LinkSubmitInZoneDemo.tml
@@ -23,7 +23,7 @@
<t:errors/>
<t:textfield t:id="value"/>
<br/>
- <t:linksubmit t:id="mySubmit">submit</t:linksubmit>
+ <t:linksubmit t:id="mySubmit" class="btn btn-primary">submit</t:linksubmit>
</t:form>
</t:border>
\ No newline at end of file
[3/6] git commit: Update the z-index of the console and the exception
frame so that the exception frame's close button is clickable
Posted by hl...@apache.org.
Update the z-index of the console and the exception frame so that the exception frame's close button is clickable
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/da6d7f3c
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/da6d7f3c
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/da6d7f3c
Branch: refs/heads/master
Commit: da6d7f3c2aeb23dd2df23a3cf1d0a5c20642e2b6
Parents: 642bd72
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Apr 1 14:32:30 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Apr 1 15:10:07 2014 -0700
----------------------------------------------------------------------
.../main/resources/META-INF/assets/tapestry5/exception-frame.css | 2 +-
.../main/resources/META-INF/assets/tapestry5/tapestry-console.css | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/da6d7f3c/tapestry-core/src/main/resources/META-INF/assets/tapestry5/exception-frame.css
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/exception-frame.css b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/exception-frame.css
index 640d509..da92648 100644
--- a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/exception-frame.css
+++ b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/exception-frame.css
@@ -7,7 +7,7 @@ DIV.exception-container {
left: 5%;
bottom: 5%;
right: 5%;
- z-index: 1100;
+ z-index: 2000;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/da6d7f3c/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry-console.css
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry-console.css b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry-console.css
index de98d34..404cc83 100644
--- a/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry-console.css
+++ b/tapestry-core/src/main/resources/META-INF/assets/tapestry5/tapestry-console.css
@@ -1,7 +1,7 @@
/* The console is used to show debugging messages. */
.tapestry-console {
position: fixed;
- z-index: 2000;
+ z-index: 1100;
bottom: 0px;
left: 0px;
right: 0px;