You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2016/04/05 10:14:25 UTC
[jira] [Comment Edited] (OFBIZ-6152) Add a label element into menu
widgets for menu entries separation
[ https://issues.apache.org/jira/browse/OFBIZ-6152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14999279#comment-14999279 ]
Jacques Le Roux edited comment on OFBIZ-6152 at 4/5/16 8:14 AM:
----------------------------------------------------------------
Doesn't this impact how styles elements in widgets are defined? Currently various (all?) style elements are hard coded, e.g. widget-style="buttontext". In order to allow flexibility in this matter, style definitions in widgets should be variables, like {code}widget-style="${buttontext}"{code}. Or am I mistaken?
Anyway, mistaken or not, having this we (as a community) are going to facilitate theme development more, as we should do more below the line (widget style flexibility) in stead of above the line (as in theme *macroLibrary.ftl and js/css fixes).
was (Author: pfm.smits):
Doesn't this impact how styles elements in widgets are defined? Currently various (all?) style elements are hard coded, e.g. widget-style="buttontext". In order to allow flexibility in this matter, style definitions in widgets should be variables, like {code]widget-style="${buttontext}"{code]. Or am I mistaken?
Anyway, mistaken or not, having this we (as a community) are going to facilitate theme development more, as we should do more below the line (widget style flexibility) in stead of above the line (as in theme *macroLibrary.ftl and js/css fixes).
> Add a label element into menu widgets for menu entries separation
> -----------------------------------------------------------------
>
> Key: OFBIZ-6152
> URL: https://issues.apache.org/jira/browse/OFBIZ-6152
> Project: OFBiz
> Issue Type: Sub-task
> Components: framework, themes
> Reporter: Jacques Le Roux
> Priority: Minor
> Labels: menu, separation
> Attachments: Image 059.png
>
>
> This could be usefull to separate and "group" menu entries. Something like !Image 059.png!
> An alternative is to modify htmlMenuMacroLibrary.ftl as below
> {code}
> Index: framework/widget/templates/htmlMenuMacroLibrary.ftl
> ===================================================================
> --- framework/widget/templates/htmlMenuMacroLibrary.ftl (revision 1634839)
> +++ framework/widget/templates/htmlMenuMacroLibrary.ftl (working copy)
> @@ -28,7 +28,7 @@
> </#if>
> <ul>
> <li>
> - <ul>
> + <ul <#if "app-navigation"== id>class="sb-slidebar sb-left sb-style-overlay"</#if>>
> </#macro>
> <#macro renderMenuEnd boundaryComment="">
> @@ -62,7 +62,12 @@
> </#macro>
> <#macro renderMenuItemBegin style toolTip linkStr containsNestedMenus>
> - <li<#if style?has_content> class="${style}"</#if><#if toolTip?has_content> title="${toolTip}"</#if>><#if linkStr?has_content>${linkStr}</#if><#if containsNestedMenus><ul></#if><#rt/>
> + <#if style?has_content && style == "h3">
> + <ul class="task-menu">
> + <li><h3><#if linkStr?has_content>${linkStr}</#if></h3><#rt/>
> + <#else>
> + <li<#if style?has_content> class="${style}"</#if><#if toolTip?has_content> title="${toolTip}"</#if>><#if linkStr?has_content>${linkStr}</#if><#if containsNestedMenus><ul></#if><#rt/>
> + </#if>
> </#macro>
> <#macro renderMenuItemEnd containsNestedMenus>
> {code}
> The CSS classes used come from http://plugins.adchsm.me/slidebars/. The result is simple and quite good, but all that is more hackish, though maybe enough? After all menus don't need much more...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)