OFBiz
  1. OFBiz
  2. OFBIZ-4259

Add famfamfam icons has generic and add possibility to surchage

    Details

    • Type: Improvement Improvement
    • Status: Patch Available
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Trunk
    • Fix Version/s: None
    • Component/s: framework, themes
    • Labels:

      Description

      I add possibility to use famfamfam icons contains in framework/images/webapp/images/icons.
      If you want use specific icon, it's possible to define a attribute VT_ICONS_LOC that contains the way to themes icons directory to use

      I improve form renderer to passe a flexible string on image-location attribute and screen and form renderer to display an image with a text.

      To try it, deploy famfamfam.zip on framework/images/webapp/images directory, apply the patch and go to exemple component (see screenshot )

      1. OFBIZ-4259-POC.patch
        32 kB
        Nicolas Malin
      2. PurposePOC.png
        27 kB
        Nicolas Malin
      3. remove-img-OFBIZ-4259.patch
        6 kB
        Nicolas Malin
      4. OFBIZ-4259.patch
        36 kB
        Nicolas Malin
      5. Icons.jpg
        79 kB
        Nicolas Malin
      6. OFBIZ-4259.patch
        22 kB
        Nicolas Malin
      7. famfamfam.zip
        763 kB
        Nicolas Malin

        Issue Links

          Activity

          Hide
          Jacques Le Roux added a comment -

          Hi Nicolas,

          OK, we still need to

          Could you please take care of that?

          Icons.jpg looks great Small change big effect

          TIA

          Show
          Jacques Le Roux added a comment - Hi Nicolas, OK, we still need to Put info from FAMFAMFAM.license.txt in NOTICE file and put a mention about CREATIVE COMMONS in LICENSE, see why here I suggest to put the famfamfam icons in a famfamfam folder under images Could you please take care of that? Icons.jpg looks great Small change big effect TIA
          Hide
          Nicolas Malin added a comment -

          Licence and Notice done

          Jacques if you want put image in images/icons/famfamfam directory, I change defautl icons location on globalDecorator.

          Nicolas

          Show
          Nicolas Malin added a comment - Licence and Notice done Jacques if you want put image in images/icons/famfamfam directory, I change defautl icons location on globalDecorator. Nicolas
          Hide
          Jacques Le Roux added a comment -

          Nicolas,

          Yes I think it's better to isolate them. Also did you see Erwan's message in dev ML?

          Show
          Jacques Le Roux added a comment - Nicolas, Yes I think it's better to isolate them. Also did you see Erwan's message in dev ML?
          Hide
          Jacques Le Roux added a comment -

          Thanks Nicolas,

          Your (slightly modified) patch is in trunk at r1095984

          I have just added a &nbps; before the text in menus.

          After Erwan's remark I wondered If I should remove the CSS on buttons. But I finally found that it was complementary. Because when no image is used on a specific button you still have the default CSS style applied (typical for Add buttons as Erwan outlined). And when no default CSS style is applied you can have an image like now shown OTTB on print button when editing an Example. So I see these 2 features as complementary for now. Maybe one day, one will replace the other, but at this stage both are welcome IMO.

          BTW the famfamfam (strange name ;o) icons lib is well done and really full of possibilities...

          Show
          Jacques Le Roux added a comment - Thanks Nicolas, Your (slightly modified) patch is in trunk at r1095984 I have just added a &nbps; before the text in menus. After Erwan's remark I wondered If I should remove the CSS on buttons. But I finally found that it was complementary. Because when no image is used on a specific button you still have the default CSS style applied (typical for Add buttons as Erwan outlined). And when no default CSS style is applied you can have an image like now shown OTTB on print button when editing an Example. So I see these 2 features as complementary for now. Maybe one day, one will replace the other, but at this stage both are welcome IMO. BTW the famfamfam (strange name ;o) icons lib is well done and really full of possibilities...
          Hide
          Jacques Le Roux added a comment -
          Show
          Jacques Le Roux added a comment - Reopened because it should follow https://cwiki.apache.org/OFBADMIN/html-and-css-best-practices.html
          Hide
          Nicolas Malin added a comment - - edited

          Jacques,

          First quick step, I remove img on menu, I submit asap a patch.
          Second step, I begin a reflexion to improve my enchancement

          Nicolas

          Show
          Nicolas Malin added a comment - - edited Jacques, First quick step, I remove img on menu, I submit asap a patch. Second step, I begin a reflexion to improve my enchancement Nicolas
          Hide
          Jacques Le Roux added a comment -

          Thanks Nicolas,

          Committed in trunk at r1096457.

          Here is a quote of your proposition in dev ML:

          Icons is at once of the most visual but also a help user. We could
          associated directly to a themes but the reality is more complex. If I
          take the GTK project, every user can define if he wants icons, icons and
          text or only text independently of the themes.

          On issue OFBIZ-4259 I do an error to use icons through img because
          although they are images, they are a more complex management.

          I'm not for their exploitation only through css or style because
          although they results from it. We limit their display rendering on one
          technology et style don't allow user preference managment.

          I propose to continue icons integration, add a new element in screen
          renderer that indicates what icons use on menu and form field. Thence
          following the user preference and then the themes we display icons or
          not. Whether rendering css by then or treatment with an image, it will
          be template renderer are made ​their work.

          Nicolas

          Show
          Jacques Le Roux added a comment - Thanks Nicolas, Committed in trunk at r1096457. Here is a quote of your proposition in dev ML: Icons is at once of the most visual but also a help user. We could associated directly to a themes but the reality is more complex. If I take the GTK project, every user can define if he wants icons, icons and text or only text independently of the themes. On issue OFBIZ-4259 I do an error to use icons through img because although they are images, they are a more complex management. I'm not for their exploitation only through css or style because although they results from it. We limit their display rendering on one technology et style don't allow user preference managment. I propose to continue icons integration, add a new element in screen renderer that indicates what icons use on menu and form field. Thence following the user preference and then the themes we display icons or not. Whether rendering css by then or treatment with an image, it will be template renderer are made ​their work. Nicolas
          Hide
          Jacques Le Roux added a comment -

          Hi Nicolas,

          It's maybe too early, but don't we need to clean much things if we go the CSS way?

          Show
          Jacques Le Roux added a comment - Hi Nicolas, It's maybe too early, but don't we need to clean much things if we go the CSS way?
          Hide
          Nicolas Malin added a comment -

          To continue on the icons subject, I created a little POC on form field with purpose.

          The idea, if a field have a purpose, the ModelFormField take given attribute if present on definition form or try to found information on site properties (widget-field-purposes.properties).

          This method give the possibility for a button submit, a link or other field to set many generic information : title, style (for icons or other ) and different attributes that list not actualy fixed.

          Show
          Nicolas Malin added a comment - To continue on the icons subject, I created a little POC on form field with purpose. The idea, if a field have a purpose, the ModelFormField take given attribute if present on definition form or try to found information on site properties (widget-field-purposes.properties). This method give the possibility for a button submit, a link or other field to set many generic information : title, style (for icons or other ) and different attributes that list not actualy fixed.

            People

            • Assignee:
              Jacques Le Roux
              Reporter:
              Nicolas Malin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development