Anil,
There was a reason it was set up that way. The widgets render containers as DIVs and labels as SPANs. The H1 and DIV HTML elements are block elements, and SPANs are not. So, to accurately render a label the same as an H1 element, the label needs to be contained in a block element - the DIV styled as H1. -Adrian [hidden email] wrote: > Author: apatel > Date: Wed Oct 7 04:22:19 2009 > New Revision: 822581 > > URL: http://svn.apache.org/viewvc?rev=822581&view=rev > Log: > Removed extra container around labels in FindScreenDecorator. Applied style to label. This will eliminate extra div around text and also renders h1, h2 tags instead of using div with style=h1 (h2). > > Modified: > ofbiz/trunk/framework/common/widget/CommonScreens.xml > > Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=822581&r1=822580&r2=822581&view=diff > ============================================================================== > --- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original) > +++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Wed Oct 7 04:22:19 2009 > @@ -437,23 +437,17 @@ > <if-empty field="titleProperty"/> > </condition> > <widgets> > - <container style="h1"> > - <label text="${title}"/> > - </container> > + <label style="h1" text="${title}"></label> > </widgets> > <fail-widgets> > - <container style="h1"> > - <label text="${uiLabelMap[titleProperty]}"/> > - </container> > + <label style="h1" text="${uiLabelMap[titleProperty]}"/> > </fail-widgets> > </section> > <decorator-section-include name="menu-bar"/> > <container style="clear"/> > <screenlet id="searchOptions" name="findScreenlet" collapsible="true" padded="false"> > <container style="screenlet-body"> > - <container style="h2"> > - <label text="${uiLabelMap.CommonSearchOptions}"/> > - </container> > + <label style="h2" text="${uiLabelMap.CommonSearchOptions}"/> > <container id="search-options"> > <decorator-section-include name="search-options"/> > </container> > @@ -461,9 +455,7 @@ > </screenlet> > <container style="screenlet"> > <container style="screenlet-body"> > - <container style="h2"> > - <label text="${uiLabelMap.CommonSearchResults}"/> > - </container> > + <label style="h2" text="${uiLabelMap.CommonSearchResults}"/> > </container> > <container id="search-results"> > <decorator-section-include name="search-results"/> > > > |
Adrian,
The way labels are used from screen widget, they are block elements in html. Some time ago I updated screen rendering macro library to render block elements for labels. In the macro I also added conditions to check for style value, if its h1, h2 etc then label is rendered as <h1>. I have done good testing and did not notice any issues with screens rendered with these changes in effect. Having no issues in screen after these change in effect also supports my assumption that screen widget <label> defined and used as block element. I am interested in improving quality of html markup rendered by screen, form widgets. These little things are baby steps towards the goal. Thanks and Regards Anil Patel HotWax Media Inc http://www.hotwaxmedia.com On Oct 7, 2009, at 11:03 AM, Adrian Crum wrote: > Anil, > > There was a reason it was set up that way. The widgets render > containers as DIVs and labels as SPANs. The H1 and DIV HTML elements > are block elements, and SPANs are not. So, to accurately render a > label the same as an H1 element, the label needs to be contained in > a block element - the DIV styled as H1. > > -Adrian > > [hidden email] wrote: >> Author: apatel >> Date: Wed Oct 7 04:22:19 2009 >> New Revision: 822581 >> URL: http://svn.apache.org/viewvc?rev=822581&view=rev >> Log: >> Removed extra container around labels in FindScreenDecorator. >> Applied style to label. This will eliminate extra div around text >> and also renders h1, h2 tags instead of using div with style=h1 (h2). >> Modified: >> ofbiz/trunk/framework/common/widget/CommonScreens.xml >> Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=822581&r1=822580&r2=822581&view=diff >> = >> = >> = >> = >> = >> = >> = >> = >> = >> ===================================================================== >> --- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original) >> +++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Wed Oct >> 7 04:22:19 2009 >> @@ -437,23 +437,17 @@ >> <if-empty field="titleProperty"/> >> </condition> >> <widgets> >> - <container style="h1"> >> - <label text="${title}"/> >> - </container> >> + <label style="h1" text="${title}"></label> >> </widgets> >> <fail-widgets> >> - <container style="h1"> >> - <label text="${uiLabelMap >> [titleProperty]}"/> >> - </container> >> + <label style="h1" text="${uiLabelMap >> [titleProperty]}"/> >> </fail-widgets> >> </section> >> <decorator-section-include name="menu-bar"/> >> <container style="clear"/> >> <screenlet id="searchOptions" name="findScreenlet" >> collapsible="true" padded="false"> >> <container style="screenlet-body"> >> - <container style="h2"> >> - <label text="$ >> {uiLabelMap.CommonSearchOptions}"/> >> - </container> >> + <label style="h2" text="$ >> {uiLabelMap.CommonSearchOptions}"/> >> <container id="search-options"> >> <decorator-section-include name="search- >> options"/> >> </container> >> @@ -461,9 +455,7 @@ >> </screenlet> >> <container style="screenlet"> >> <container style="screenlet-body"> >> - <container style="h2"> >> - <label text="$ >> {uiLabelMap.CommonSearchResults}"/> >> - </container> >> + <label style="h2" text="$ >> {uiLabelMap.CommonSearchResults}"/> >> </container> >> <container id="search-results"> >> <decorator-section-include name="search- >> results"/> |
I wasn't aware of those changes. Thank you for the update!
-Adrian Anil Patel wrote: > Adrian, > The way labels are used from screen widget, they are block elements in > html. Some time ago I updated screen rendering macro library to render > block elements for labels. In the macro I also added conditions to check > for style value, if its h1, h2 etc then label is rendered as <h1>. > > I have done good testing and did not notice any issues with screens > rendered with these changes in effect. Having no issues in screen after > these change in effect also supports my assumption that screen widget > <label> defined and used as block element. > > I am interested in improving quality of html markup rendered by screen, > form widgets. These little things are baby steps towards the goal. > > Thanks and Regards > Anil Patel > HotWax Media Inc > http://www.hotwaxmedia.com > > On Oct 7, 2009, at 11:03 AM, Adrian Crum wrote: > >> Anil, >> >> There was a reason it was set up that way. The widgets render >> containers as DIVs and labels as SPANs. The H1 and DIV HTML elements >> are block elements, and SPANs are not. So, to accurately render a >> label the same as an H1 element, the label needs to be contained in a >> block element - the DIV styled as H1. >> >> -Adrian >> >> [hidden email] wrote: >>> Author: apatel >>> Date: Wed Oct 7 04:22:19 2009 >>> New Revision: 822581 >>> URL: http://svn.apache.org/viewvc?rev=822581&view=rev >>> Log: >>> Removed extra container around labels in FindScreenDecorator. Applied >>> style to label. This will eliminate extra div around text and also >>> renders h1, h2 tags instead of using div with style=h1 (h2). >>> Modified: >>> ofbiz/trunk/framework/common/widget/CommonScreens.xml >>> Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=822581&r1=822580&r2=822581&view=diff >>> >>> ============================================================================== >>> >>> --- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original) >>> +++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Wed Oct 7 >>> 04:22:19 2009 >>> @@ -437,23 +437,17 @@ >>> <if-empty field="titleProperty"/> >>> </condition> >>> <widgets> >>> - <container style="h1"> >>> - <label text="${title}"/> >>> - </container> >>> + <label style="h1" text="${title}"></label> >>> </widgets> >>> <fail-widgets> >>> - <container style="h1"> >>> - <label >>> text="${uiLabelMap[titleProperty]}"/> >>> - </container> >>> + <label style="h1" >>> text="${uiLabelMap[titleProperty]}"/> >>> </fail-widgets> >>> </section> >>> <decorator-section-include name="menu-bar"/> >>> <container style="clear"/> >>> <screenlet id="searchOptions" name="findScreenlet" >>> collapsible="true" padded="false"> >>> <container style="screenlet-body"> >>> - <container style="h2"> >>> - <label >>> text="${uiLabelMap.CommonSearchOptions}"/> >>> - </container> >>> + <label style="h2" >>> text="${uiLabelMap.CommonSearchOptions}"/> >>> <container id="search-options"> >>> <decorator-section-include >>> name="search-options"/> >>> </container> >>> @@ -461,9 +455,7 @@ >>> </screenlet> >>> <container style="screenlet"> >>> <container style="screenlet-body"> >>> - <container style="h2"> >>> - <label >>> text="${uiLabelMap.CommonSearchResults}"/> >>> - </container> >>> + <label style="h2" >>> text="${uiLabelMap.CommonSearchResults}"/> >>> </container> >>> <container id="search-results"> >>> <decorator-section-include >>> name="search-results"/> > > |
Free forum by Nabble | Edit this page |