Style - Site
Instead of customising default.stylesheet and default.properties located in the <TOMCAT_HOME>/webapps/openvpms/WEB-INF/classes/style directory, you can place these changes into files named site.stylesheet and site.properties in the same directory, and they will override the default values. For site.stylesheet, enclose all styles in a root <stylesheet> element. For example:
<stylesheet> <style name="SomeLayout" type="nextapp.echo2.app.SplitPane"> <properties> <property name="resizable" value="false"/> <property name="separatorPosition" value="${SomeLayout.separatorPosition}"/> <property name="separatorHeight" value="0px"/> </properties> </style> <style name="SomeOtherLayout" type="nextapp.echo2.app.SplitPane"> <properties> </style> </stylesheet>
However, it is important to understand how the facility works. There are two problems:
1. styles cannot refer to styles defined in different stylesheets
So you can't have a base-name attribute in site.stylesheet that refers to a style defined in default.stylsheet. You need to either:
- incorporate the original style in the custom style
- copy the original style to site.stylesheet
2. styles that have the same name must all be copied
If a style name appears for different classes (e.g. "default" for nextapp.echo2.app.Label, and nextapp.echo2.app.WindowPane), and you want to customise the Label version, you have to copy all other occurences of "default" as well. This is due to a bug/feature in the echo2 framework, that replaces all instances of a style when merging stylesheets.