Posted by
Jacopo Cappellato on
URL: http://ofbiz.116.s1.nabble.com/Dev-configurable-custom-views-tp167905p167909.html
Adrian,
about the styleSheet LIST issue: some time ago, David told me how to
create lists inside a screen action tag:
<set field="styleSheets[]" value="/images/customstyles.css"/>
<set field="styleSheets[]" value="/images/specialcustomstyles.css"/>
So this is no more an issue; it's ok for me to commit your changes.
However, what do you (all) think of the attached patch?
Jacopo
Adrian Crum wrote:
> It would be nice if - while you're mulling this over - someone could at least
> commit the change to header.ftl
> (
http://jira.undersunconsulting.com/browse/OFBIZ-880 ). Just that small change
> will enable a number of users to easily customize the UI.
>
> If that gets committed, there may be an issue with some of Jacopo's work - since
> he had originally modified header.ftl for a single alternative css file. The css
> file LIST that I proposed is preferable, but Jacopo was unable to create a list
> in the screen widget (see the notes on
>
http://jira.undersunconsulting.com/browse/OFBIZ-174 ). In a nutshell, whatever
> components use Jacopo's alternative css file will have to be corrected to use a
> css file list.
>
> I would also like to thank Jacopo and anyone else who worked on Jira 174 to get
> the GlobalDecorator idea implemented. Without that work, a user-selected UI
> theme would require a lot more modification.
>
> -Adrian
>
Index: framework/common/webcommon/includes/header.ftl
===================================================================
--- framework/common/webcommon/includes/header.ftl (revision 7592)
+++ framework/common/webcommon/includes/header.ftl (working copy)
@@ -41,8 +41,15 @@
<script language="javascript" src="<@ofbizContentUrl>/images/calendar1.js</@ofbizContentUrl>" type="text/javascript"></script>
<script language="javascript" src="<@ofbizContentUrl>/images/selectall.js</@ofbizContentUrl>" type="text/javascript"></script>
<script language="javascript" src="<@ofbizContentUrl>/images/fieldlookup.js</@ofbizContentUrl>" type="text/javascript"></script>
- <link rel="stylesheet" href="<@ofbizContentUrl>/images/maincss.css</@ofbizContentUrl>" type="text/css"/>
- <link rel="stylesheet" href="<@ofbizContentUrl>/images/tabstyles.css</@ofbizContentUrl>" type="text/css"/>
+ <#if layoutSettings.styleSheets?has_content>
+ <#--layoutSettings.styleSheets is a list of style sheets. So, you can have a user-specified "main" style sheet, AND a component style sheet.-->
+ <#list layoutSettings.styleSheets as styleSheet>
+ <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css">
+ </#list>
+ <#else>
+ <link rel="stylesheet" href="<@ofbizContentUrl>/images/maincss.css</@ofbizContentUrl>" type="text/css"/>
+ <link rel="stylesheet" href="<@ofbizContentUrl>/images/tabstyles.css</@ofbizContentUrl>" type="text/css"/>
+ </#if>
<#if layoutSettings.extraStyleSheet?exists>
<#-- Component-specified style sheet -->
<link rel="stylesheet" href="${layoutSettings.extraStyleSheet}" type="text/css"/>
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev