|
Using decorator sections to control the left-bar
------------------------------------------------ Key: OFBIZ-3274 URL: https://issues.apache.org/jira/browse/OFBIZ-3274 Project: OFBiz Issue Type: Improvement Reporter: Bruno Busco Attachments: OFBIZ-3274 DecoratorSectionLayout.patch Hi, at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. This must be done in the screen itself or an application decorator. With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). In the patch I updated all catalog application screens to use this new method. If there are no problems with you with this, I will commit in the next days. Thank you for sharing your thoughts about. -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-3274: ------------------------------- Attachment: OFBIZ-3274 DecoratorSectionLayout.patch > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-3274: ------------------------------- Component/s: framework Affects Version/s: SVN trunk > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783416#action_12783416 ] Adrian Crum commented on OFBIZ-3274: ------------------------------------ Where will the left bar appear in right-to-left languages? It would be best to put this sort of thing in an application decorator. The Global Decorator is intended to contain the elements shared by ALL screens. (From my perspective, much of the code in the current Global Decorator doesn't belong there.) > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783473#action_12783473 ] Bruno Busco commented on OFBIZ-3274: ------------------------------------ Adrian, IMO a left bar (or better a left column) should stay on the left even if a right-to-left language is selected. I did a quick check and I found that in the mainrtl.css file the #column-container .left is styled to be on the right; I am not sure to well understand this. So the answer to your question is that this behaviour will not change from the actual. The left column content will be contained in a container with the "left" style. I am not sure to understand the rest of your comment. The idea behind this patch is that application provides content to be placed in sections and the Global decorator put the content into well styled containers (I know that this is not new but is the decorator logic). You can see that the leftbar screen in the CommonScreens.xml file has been purged of the container tag. This has been moved to the Global decorator. Moving forward to change other applications to use this method I came across SFA that as <set field="MainColumnStyle" value="leftonly-larger"/>. Do we really need this "leftonly-larger" style? I would use only one left column size for all applications or we should have both? > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-3274: ------------------------------- Attachment: OFBIZ-3274 DecoratorSectionLayout.patch An updated patch to be used with the latest trunk were the "if-empty-section" ScreenCondition has already been committed. This patch updates all the screens that use a left column. If this is OK I will commit. > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783578#action_12783578 ] Jacques Le Roux commented on OFBIZ-3274: ---------------------------------------- Hi Bruno, About leftonly-larger, yes it is needed (so far) http://svn.apache.org/viewvc?rev=823888&view=rev You could have answered yourself by looking for it into Nabble or MailMarker or svn repo or Fisheye. Did you test your changes in a right-to-left language (Arab, Hebrew, ...) ? > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco reassigned OFBIZ-3274: ---------------------------------- Assignee: Bruno Busco > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784224#action_12784224 ] Bruno Busco commented on OFBIZ-3274: ------------------------------------ Hi Jacques, right-to-left languages are handled at the theme level in an extra css file. At the moment only flatgrey theme includes this extra file. All other themes should be updated to handle this. -Bruno > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784574#action_12784574 ] Jacques Le Roux commented on OFBIZ-3274: ---------------------------------------- Thanks Bruno, I did not review nor test but at least it's clear to me about RTL now > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784575#action_12784575 ] Jacques Le Roux commented on OFBIZ-3274: ---------------------------------------- Bruno, I think taht if you remove "leftonly-larger" you will break the SFA screen. Maybe there are better way, I added it more as an hack... > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784888#action_12784888 ] Adrian Crum commented on OFBIZ-3274: ------------------------------------ Bruno, My previous comment about the GlobalDecorator means this: it should contain only the code needed by ALL screens. Much of the existing GlobalDecorator code, and some of the code in your patch adds things that don't belong there. I have complained about this before, but no one seems to care. Ideally, the GlobalDecorator should have a handful of decorator-section-includes and nothing more. There shouldn't be complicated conditional logic in the GlobalDecorator, like: "if this variable exists, do this, otherwise do that..." - that is a bad design. In effect, the GlobalDecorator is trying to make decisions about the screens that use it. The individual screens should handle that. The GlobalDecorator should just render whatever is handed to it by the screens - it shouldn't care about what the screens contain. I will give a couple of examples: 1. The GlobalDecorator has to determine if an application uses a menu widget or a Freemarker template for its application menu. Why does the GlobalDecorator need to know that? Those thirty lines of code could be replaced with {code} <decorator-section-include name="application-menu"/> {code} and each screen will be responsible for passing an application-menu section to the decorator. Applications are free to render their menus any way they want, and the GlobalDecorator doesn't need to know how they do it. 2. The GlobalDecorator has to determine if an application uses multiple columns in its layout. Why does the GlobalDecorator need to know that? A small percentage of screens use multiple column layouts, so why include that code in the GlobalDecorator? Multi-column screens should use a multi-column decorator that is then passed to the GlobalDecorator's body section. I know these issues are beyond the scope of what you're trying to do here, but at the same time your patch contributes to the problem. > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786738#action_12786738 ] Bruno Busco commented on OFBIZ-3274: ------------------------------------ Hi Adrian, many thanks for the insight. I partially agree with you: I agree about the menus. A decorator-section should be used there. (I have put this on my todo list) But regarding the check on the section content I think the GD can do it if it is necessary to render correctly the layout. What I am trying to do with this patch is to have, at the end, the left-column collapsible clicking on a little icon (disappearing toward left). This should be globally and not only in one application. In order to do this the GD checks the section content to use the right class style for the divs. Whenever an application want to put some content in the collapsible left column simply put it into the "left-column" section and the column appears with the possibility to have it collapsed or not. Following this patters I would even let the VisualTheme to define a different GD to have the greatest flexibility. > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12786998#action_12786998 ] Adrian Crum commented on OFBIZ-3274: ------------------------------------ Bruno, I'm confused. In your initial comment, you said this change could be used in the catalog application - so I thought it was needed for some applications, but not all applications. Now you are saying all applications will use it. If the section you are trying to introduce is not used in every screen, then it should be kept in a separate decorator - not in the GlobalDecorator. > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787011#action_12787011 ] Bruno Busco commented on OFBIZ-3274: ------------------------------------ Adrian, I said "In the patch I updated all catalog application screens to use this new method.". I intended that all the screens in the catalog application were already been updated in the patch, others still need to be updated. All the proposed change wants to do is to replace the leftbarScreenName/leftbarScreenLocation/MainColumnStyle mechanism with a simpler and more OFBiz-standard decorato-section-based one. In the GD there is this piece of code: {code} <container id="column-container"> <!-- by default will render left-bar only if leftbarScreen value not empty --> <include-screen name="${leftbarScreenName}" location="${leftbarScreenLocation}"/> <container id="content-main-section" style="${MainColumnStyle}"> <!-- render messages --> <decorator-section-include name="body"/> </container> <container style="clear"></container> </container> {code} that already tryes to understand if there is a content to be shown as left bar. I do not see the problem to replace it with comething like: {code} <section> <condition> <if-empty-section section-name="left-column"/> </condition> <widgets> <container id="content-main-section"> <decorator-section-include name="body"/> </container> </widgets> <fail-widgets> <container style="left"> <decorator-section-include name="left-column"/> </container> <container id="content-main-section" style="leftonly"> <decorator-section-include name="body"/> </container> </fail-widgets> </section> {code} The change would put the styles leftonly, left, etc away from the application and put them in the GD (that could be even moved to the theme). This is correct because those styles are defined and handled not at the application level but at the layout/theme that is global. Sorry if I confused you. > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787040#action_12787040 ] Adrian Crum commented on OFBIZ-3274: ------------------------------------ I don't agree that multi-column layout is defined at the theme level. If the GlobalDecorator has code like {code} <container style="left"> <decorator-section-include name="left-column"/> </container> {code} then where is the "left-column" decorator-section defined? In the application or in the theme? So, let's consider the approach I suggested, and maybe we can meet in the middle. ;-) The GlobalDecorator: {code} <screen name="GlobalDecorator"> ... <container style="contentarea"> <decorator-section-include name="pre-body"/> <decorator-section-include name="body"/> </container> ... </screen> The MultiColumnDecorator: <screen name="MultiColumnDecorator"> ... <decorator-screen name="GlobalDecorator"> <decorator-section name="body"> <container id="column-container"> <container style="left"> <decorator-section-include name="left-column"/> </container> <container id="content-main-section" style="leftonly"> <decorator-section-include name="body"/> </container> <container style="clear"></container> </container> </decorator-section> </decorator-screen> ... </screen> The multi-column screen: <screen name="MultiColumnScreen"> ... <decorator-screen name="MultiColumnDecorator"> <decorator-section name="left-column"> ... </decorator-section> <decorator-section name="body"> ... </decorator-section> </decorator-screen> ... </screen> {code} > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787040#action_12787040 ] Adrian Crum edited comment on OFBIZ-3274 at 12/7/09 6:39 PM: ------------------------------------------------------------- I don't agree that multi-column layout is defined at the theme level. If the GlobalDecorator has code like {code} <container style="left"> <decorator-section-include name="left-column"/> </container> {code} then where is the "left-column" decorator-section defined? In the application or in the theme? So, let's consider the approach I suggested, and maybe we can meet in the middle. ;-) The GlobalDecorator: {code} <screen name="GlobalDecorator"> ... <container style="contentarea"> <decorator-section-include name="pre-body"/> <decorator-section-include name="body"/> </container> ... </screen> {code} The MultiColumnDecorator: {code} <screen name="MultiColumnDecorator"> ... <decorator-screen name="GlobalDecorator"> <decorator-section name="body"> <container id="column-container"> <container style="left"> <decorator-section-include name="left-column"/> </container> <container id="content-main-section" style="leftonly"> <decorator-section-include name="body"/> </container> <container style="clear"></container> </container> </decorator-section> </decorator-screen> ... </screen> {code} The multi-column screen: {code} <screen name="MultiColumnScreen"> ... <decorator-screen name="MultiColumnDecorator"> <decorator-section name="left-column"> ... </decorator-section> <decorator-section name="body"> ... </decorator-section> </decorator-screen> ... </screen> {code} was (Author: [hidden email]): I don't agree that multi-column layout is defined at the theme level. If the GlobalDecorator has code like {code} <container style="left"> <decorator-section-include name="left-column"/> </container> {code} then where is the "left-column" decorator-section defined? In the application or in the theme? So, let's consider the approach I suggested, and maybe we can meet in the middle. ;-) The GlobalDecorator: {code} <screen name="GlobalDecorator"> ... <container style="contentarea"> <decorator-section-include name="pre-body"/> <decorator-section-include name="body"/> </container> ... </screen> The MultiColumnDecorator: <screen name="MultiColumnDecorator"> ... <decorator-screen name="GlobalDecorator"> <decorator-section name="body"> <container id="column-container"> <container style="left"> <decorator-section-include name="left-column"/> </container> <container id="content-main-section" style="leftonly"> <decorator-section-include name="body"/> </container> <container style="clear"></container> </container> </decorator-section> </decorator-screen> ... </screen> The multi-column screen: <screen name="MultiColumnScreen"> ... <decorator-screen name="MultiColumnDecorator"> <decorator-section name="left-column"> ... </decorator-section> <decorator-section name="body"> ... </decorator-section> </decorator-screen> ... </screen> {code} > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787049#action_12787049 ] Bruno Busco commented on OFBIZ-3274: ------------------------------------ Agreed ! ;-) I assume that: - MultiColumnDecorator is defined along with the GlobalDecorator in the framework/common/widget/CommonScreens.xml - MultiColumnScreen is actually a placeholder for the real application screen name am I correct? > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787058#action_12787058 ] Adrian Crum commented on OFBIZ-3274: ------------------------------------ You are correct. The concept could be expanded further to give applications a "toolbox" of multi-column layouts, like 50-50-Decorator, 25-75-Decorator, 33-33-33-Decorator, etc. > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bruno Busco updated OFBIZ-3274: ------------------------------- Attachment: OFBIZ-3274 DecoratorSectionLayout.patch Adrian, please see if the new patch steps in the agreed direction. Actually I added the new MultiColumnApplicationDecorator in the commonext because it is alternative to the ApplicationDecorator that is a one column only layout. > Using decorator sections to control the left-bar > ------------------------------------------------ > > Key: OFBIZ-3274 > URL: https://issues.apache.org/jira/browse/OFBIZ-3274 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Bruno Busco > Assignee: Bruno Busco > Attachments: OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch, OFBIZ-3274 DecoratorSectionLayout.patch > > > Hi, > at the moment, in order to have a screen rendered with or without a left bar, the variables "leftbarScreenName", "leftbarScreenLocation" and "MainColumnStyle" need to be set to select a screen for the left bar and a main column style. > This must be done in the screen itself or an application decorator. > With the attached patch, submitted for your review, a new GlobalDecorator section named "left-bar" has been added. If a screen must be displayed with a left bar this new decorator section needs to be filled with the selected content. > The main column style is defined in the Global decorator. In order to do this a new screen condition has been added: "if-empty-decorator-section". This condition allows to check if a decorator section has been added content or not. (actually it only checks if the decorator section has been defined). > In the patch I updated all catalog application screens to use this new method. > If there are no problems with you with this, I will commit in the next days. > Thank you for sharing your thoughts about. > -Bruno -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
| Free forum by Nabble | Edit this page |
