It would be great if this worked with Icon API... does it?

Comments

d34dman’s picture

I have not tested it with Icon API. I would be interested in providing support if required. But i think its Icon API that would need to use this module.

pedrosp’s picture

I was using icon API so far to choose an icon, but there was a poor UI (no icon preview). I welcome this module precisely because of this fix.
Icon API provide his own field type "icon" and widget "icon", but this module use a "font awesome picker" widget that you can use on a standard textfield.
So for now it is one or another.

Data differences on database:
Icon API:
VARCHAR 64 field_example_bundle: fontawesome
VARCHAR 64 field_example_icon: empire

Fontawesome picker:
VARCHAR 255 field_example_pick_value: fa-empire
VARCHAR 255 field_example_pick_format: NULL

d34dman’s picture

I had a quick look at Icon API module. I will upload a patch shortly for testing.

d34dman’s picture

Assigned: Unassigned » d34dman
Status: Active » Needs review
StatusFileSize
new583 bytes

The provided patch would expose "Font Awesome iconpicker" for icon_api fields. Be known that this widget only work with one provider (fontawesome). Please test and provide feedback.

pedrosp’s picture

The patch expose the widget on an icon field, and you can pick and choose an icon. No saving/updating errors apparently.
However, it doesn't expose a previous value (a font awesome one), and it doesn't save anything on the database.
Thanks.

  • D34dMan committed aa90042 on 7.x-1.x
    Issue #2545272 by tchopshop: Support to Icon API fields. Introduced...
d34dman’s picture

Please check the latest development snapshot. Should support icon api fields now.

pmusaraj’s picture

StatusFileSize
new1.12 KB

Attached is an updated patch against dev, that should fix the issues noted in comment #7. It's not entirely great though, because I can't seem to figure out how to reset the field altogether (it keeps 'fa-' if emptied).

pianomansam’s picture

I can verify that patch in #8 fixes this issue for me.

d34dman’s picture

@pmusaraj what issue does patchi n #8 solve? How could i test it?

pmusaraj’s picture

@D34dMan it fixes the issue mentioned by pedrosp in #5. Without the patch, the iconapi field doesn't maintain the stored value. With the patch, it does.

  • D34dMan committed 80571b3 on 7.x-1.x authored by pmusaraj
    Issue #2545272 by D34dMan, pmusaraj, pedrosp: Does this work with Icon...
d34dman’s picture

Status: Needs review » Closed (fixed)

Thanks for the patch, it does work as desired. I did a small coding style fix and committed it under your name pmusaraj. Closing this issue as integration is now live.

Please create a new issue to address any enhancements. Especially i feel the prefix "fa-" should be kept as is, since it would be possible to enter some other classes in the future. However this has to be discussed in a separate thread and agreed upon.