-
New Feature
-
Resolution: Fixed
-
Major
-
2.1 Final
-
None
-
all
-
-
Empty show more show less
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("") )
+
if (setDefaultSelected && n.getNodeData("selected").getBoolean())
@@ -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); }