<commit_before>grails-fatcow-icons [![Build Status](https://travis-ci.org/davidecavestro/grails-fatcow-icons.png?branch=master)](https://travis-ci.org/davidecavestro/grails-fatcow-icons)
==================

A simple plugin that bundles the Fatcow Free icons set from http://www.fatcow.com/free-icons and provides some convenient taglibs to expose the icons as simple images or as potentially asynchronous clickable links.

# Icons
The icons themselves are located in the plugin's web-app/images directory, bundled exactly as they would be unzipped had you downloaded the zip file directly from FATCOWICONS. The free bundle includes the free icons set at 16x16 and 32x32 size, located in images/FatCow_Icons16x16 and images/FatCow_Icons32x32 respectively.

## Designating An Icon
The plugin takes care of most of the excessive typing for you, allowing you to include ONLY the main part of the filename and not the extension. For example, the icon with the /images/FatCow_Icons16x16/accept.png path would require iconName="accept".

## Size
The Size merely controls the 'set' of icons you wish to use, currently only '16x16' and '16x16'. The FATCOWICONS release distributes the '16x16' set of icons and the '16x16' set of icons.

#Taglib
## fatcow:icon
Generates an `<img/>` tag that will load the icon on the page.

For example, the following will produce an <img/> tag on the page, loading the 16x16 accept.png icon:
    `<fatcow:icon iconName="accept"/>`

### iconName
The file name of the plugin without the .png extension. For example, `iconName="accept"` would load the resource from /images/FatCow_Icons16x16/accept.png.
### size
Currently either '16x16' or '32x32'. Size is optional and will default to '16x16'
### alt
Creates the HTML alt attribute in the `<img/>` tag. The taglib doesn't require this attribute, although HTML standard does. If you leave this blank, the plugin will place the iconName in there instead.
### width
Generates an HTML width attribute in the `<img/>` tag.
### height
Generates an HTML height attribute in the `<img/>` tag.

## fatcow:action
Uses an icon as a link to a remote uri that can be invoked via ajax. This tag is a thin wrapper above the remoteLink tag built into grails. The attributes for the action tag are exactly the same as icon, adding all the attributes from remoteLink.

For example, the following will produce an async link using the the accept.png icon, calling the mycontroller/list and updating the content element with the results:
`<fatcow:action controller="mycontroller" action="list" update="content" iconName="accept" alt="Accept Icon" />`

Given the action tag leverages the remoteLink tag, here are some examples taken from http://grails.org/doc/latest/ref/Tags/remoteLink.html redone for fatcow:

`<fatcow:action iconName="accept" alt="Accept Icon" action="show" id="1">Test 1</fatcow:action>`<commit_msg>documentation fixes<commit_after>grails-fatcow-icons [![Build Status](https://travis-ci.org/davidecavestro/grails-fatcow-icons.png?branch=master)](https://travis-ci.org/davidecavestro/grails-fatcow-icons)
==================

A simple plugin that bundles the Fatcow Free icons set from http://www.fatcow.com/free-icons and provides some convenient taglibs to expose the icons as simple images or as potentially asynchronous clickable links.

# Icons
The icons themselves are located in the plugin's `web-app/images` directory, bundled exactly as they would be unzipped had you downloaded the zip file directly from FATCOWICONS. The free bundle includes the free icons set at `16x16` and `32x32` size, located in `images/FatCow_Icons16x16` and `images/FatCow_Icons32x32` respectively.

## Designating An Icon
The plugin takes care of most of the excessive typing for you, allowing you to include ONLY the main part of the filename and not the extension. For example, the icon with the `/images/FatCow_Icons16x16/accept.png` path would require `iconName="accept"`.

## Size
The Size merely controls the 'set' of icons you wish to use, currently only `16x16` and `32x32`. The FATCOWICONS release distributes the `16x16` set of icons and the `16x16` set of icons.

#Taglib
## fatcow:icon
Generates an `<img/>` tag that will load the icon on the page.

For example, the following will produce an <img/> tag on the page, loading the `16x16` `accept.png` icon:
    `<fatcow:icon iconName="accept"/>`

### iconName
The file name of the plugin without the .png extension. For example, `iconName="accept"` would load the resource from `/images/FatCow_Icons16x16/accept.png`.
### size
Currently either `16x16` or `32x32`. Size is optional and will default to `16x16`
### alt
Creates the HTML alt attribute in the `<img/>` tag. The taglib doesn't require this attribute, although HTML standard does. If you leave this blank, the plugin will place the iconName in there instead.
### width
Generates an HTML width attribute in the `<img/>` tag.
### height
Generates an HTML height attribute in the `<img/>` tag.

## fatcow:action
Uses an icon as a link to a remote uri that can be invoked via ajax. This tag is a thin wrapper above the remoteLink tag built into grails. The attributes for the action tag are exactly the same as icon, adding all the attributes from remoteLink.

For example, the following will produce an async link using the the accept.png icon, calling the mycontroller/list and updating the content element with the results:
`<fatcow:action controller="mycontroller" action="list" update="content" iconName="accept" alt="Accept Icon" />`

Given the action tag leverages the remoteLink tag, here are some examples taken from http://grails.org/doc/latest/ref/Tags/remoteLink.html redone for fatcow:

`<fatcow:action iconName="accept" alt="Accept Icon" action="show" id="1">Test 1</fatcow:action>`
{'fraction_non_alphanumeric': 0.08977469670710572, 'fraction_numerical': 0.020103986135181974, 'mean_word_length': 4.974120082815735, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3120679', 'n_tokens_mistral': 1730, 'n_tokens_neox': 1622, 'n_words': 758}