[ http://jira.magnolia.info/browse/MAGNOLIA-499?page=all ]
     
Boris Kraft closed MAGNOLIA-499:
--------------------------------

    Fix Version: 2.1 RC 3
                     (was: 2.1 Final)
     Resolution: Fixed

reassigned to RC3

> Allow for images to illustrate options in ButtonSet Controls (Radio buttons, 
> Checkbox buttons)
> ----------------------------------------------------------------------------------------------
>
>          Key: MAGNOLIA-499
>          URL: http://jira.magnolia.info/browse/MAGNOLIA-499
>      Project: magnolia wcm
>         Type: New Feature
>   Components: templating module
>     Versions: 2.1 RC1
>  Environment: all
>     Reporter: Michael Aemisegger
>     Assignee: Philipp Bracher
>      Fix For: 2.1 RC 3

>
> Following patches allow images to be added to dialogs with options, e.g. a 
> radio button list.
> - Each button (radio, checkbox) can have its own image.
> - the image is configured through the property 'iconSrc' in the dialog 
> definition for a particular option.
> - a custom css class can be configured through the property 'iconSrc' in the 
> dialog definition
> --- 
> originals/magnolia-2.1-SNAPSHOT/src/main/info/magnolia/cms/gui/control/Button.java
>   2005-07-13 17:15:01.000000000 +0200
> +++ 
> patched//magnolia-2.1-SNAPSHOT/src/main/info/magnolia/cms/gui/control/Button.java
>    2005-07-24 14:39:42.000000000 +0200
> @@ -181,8 +181,8 @@
>          }
>          html.append("\" " + this.getHtmlCssClass() + ">"); //$NON-NLS-1$ 
> //$NON-NLS-2$
> -        html.append(this.getIconSrc());
>          html.append(this.getLabel());
> +        html.append(this.getIconSrc());
>          html.append("</a>"); //$NON-NLS-1$
>          return html.toString();
>      }
> --- 
> originals/magnolia-2.1-SNAPSHOT/src/main/info/magnolia/cms/gui/dialog/DialogButtonSet.java
>   2005-07-13 17:15:01.000000000 +0200
> +++ 
> patched//magnolia-2.1-SNAPSHOT/src/main/info/magnolia/cms/gui/dialog/DialogButtonSet.java
>    2005-07-24 15:02:18.000000000 +0200
> @@ -71,6 +71,12 @@
>                  Button button = new Button(this.getName(), value);
>                  // if (n.getNodeData("label").isExist()) 
> button.setLabel(n.getNodeData("label").getString());
>                  button.setLabel(label);
> +
> +                String iconSrc = n.getNodeData("iconSrc").getString();
> +                if ( !iconSrc.equals("") ) {
> +                    button.setIconSrc( iconSrc );
> +                }
> +
>                  if (setDefaultSelected && 
> n.getNodeData("selected").getBoolean()) { //$NON-NLS-1$
>                      button.setState(ControlSuper.BUTTONSTATE_PUSHED);
>                  }
> @@ -169,7 +175,10 @@
>              control = new ButtonSet(this.getName(), this.getValue());
>          }
>          control.setButtonType(this.getButtonType());
> -        control.setCssClass(CssConstants.CSSCLASS_BUTTONSETBUTTON);
> +
> +        // maem: extension to allow for fine grained layout control. E.g. 
> radio buttons with picture
> +        control.setCssClass(this.getConfigValue( "cssClass", 
> CssConstants.CSSCLASS_BUTTONSETBUTTON ) );
> +
>          if (this.getConfigValue("saveInfo").equals("false")) { //$NON-NLS-1$ 
> //$NON-NLS-2$
>              control.setSaveInfo(false);
>          }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to