...
You can create custom icons that can then be referred to in the client configuration by creating an 'an icons
' directory within the 'workspace' ...\weave\platform\workspace
directory, then any any .gif
or or .png
files within there will be available to use anywhere an 'an iconCls
' attribute can be set.
The icons aren't available directly, instead Weave will create a CSS rule to reference the image, and it's the CSS rule that you reference in the config. The name of the rule is based on the file name, but is given an 'an icon-
' prefix, so for example 'example test.png
' would create a rule named 'named .icon-test
' and which can then be referenced as 'as icon-test
' in the config file.
Note |
---|
It's assumed that if there are two icons with the name name, and one a .png and the other .gif, then the .gif will be used for Internet Explorer and the .png for other browsers, this is because of the poor support for .png images in earlier IE versions. Note that this is no longer strictly true and Internet Explorer has improved the level of support for .png images, so you should always use .png images rather than .gif |
To see what current icons are available for use, open the HTML page /weave/styles/core.css
on the Weave instance
e.g. http://localhost:8080/weave/styles/core.css
and any line starting with 'with .icon-
' will be an icon available for use.
...
Pretty much any component can have its icon set by setting the 'the iconCls
' property to one of these icons, e.g. to use 'use .icon-edit
' in a toolbar:
Code Block | ||||
---|---|---|---|---|
| ||||
<item action="weave.toggleToolbar" text="Edit" iconCls="icon-edit"> ... </item> |
...