Skip to content
Browse files

Fix things so that the tapx-core.css can use relative URLs to referen…

…ce images stored inside tapestry-core.jar
  • Loading branch information...
1 parent 9cfbcd1 commit 4f1d2e46208e3dc9e298f1ad685e6d3829926cb2 @hlship committed Mar 25, 2011
View
9 tapx-core/src/main/java/com/howardlewisship/tapx/core/services/CoreModule.java
@@ -66,6 +66,15 @@ public static void contributeFactoryDefaults(MappedConfiguration<String, String>
public static void contributeComponentClassResolver(Configuration<LibraryMapping> configuration)
{
configuration.add(new LibraryMapping("tapx", "com.howardlewisship.tapx.core"));
+
+ // What's this about? Because other modules in the TapX project ALSO contribute "tapx"
+ // mapped to other sub-packages of "com.howardlewisship.tapx", there would otherwise
+ // be a difference in how asset URL paths are created dependening on whether it was just
+ // tapx-core or tapx-core plus (for example) tapx-datefield. Since the tapx-core.css file relies
+ // on a particular layout so that it can reference images that are part of tapestry-core.jar,
+ // we need at least two mappings for the tapx virtual folder.
+
+ configuration.add(new LibraryMapping("tapx", "com.howardlewisship.tapx.placeholder"));
}
public static void contributeComponentMessagesSource(OrderedConfiguration<Resource> configuration, @Value(PATH
View
8 tapx-core/src/main/resources/com/howardlewisship/tapx/core/tapx-core.css
@@ -145,10 +145,6 @@ DIV.tx-multiselect .tx-controls {
vertical-align: center;
}
-DIV.tx-multiselect .tx-select {
- background-image: url(../tapestry/corelib/components/select.png);
-}
-
DIV.tx-multiselect .tx-deselect, DIV.tx-multiselect .tx-select {
display: inline-block;
width: 32px;
@@ -158,11 +154,11 @@ DIV.tx-multiselect .tx-deselect, DIV.tx-multiselect .tx-select {
}
DIV.tx-multiselect .tx-select {
- background-image: url(../tapestry/corelib/components/select.png);
+ background-image: url(../../tapestry/corelib/components/select.png);
}
DIV.tx-multiselect .tx-deselect {
- background-image: url(../tapestry/corelib/components/deselect.png);
+ background-image: url(../../tapestry/corelib/components/deselect.png);
}
DIV.tx-multiselect .tx-disabled {

0 comments on commit 4f1d2e4

Please sign in to comment.
Something went wrong with that request. Please try again.