Skip to content

Commit

Permalink
Item13460: JQICON fails to render FontAwesome icons
Browse files Browse the repository at this point in the history
Thanks to MichaelDaum for the fix.
  • Loading branch information
gac410 committed Jun 16, 2015
1 parent 6231fce commit 52de18f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
3 changes: 2 additions & 1 deletion JQueryPlugin/data/System/JQueryPlugin.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1430403240" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1434468639" format="1.1" version="1"}%
---+!! %TOPIC%
<!--
* Set SHORTDESCRIPTION = jQuery <nop>JavaScript library for Foswiki
Expand Down Expand Up @@ -122,6 +122,7 @@ reduce bandwidth and speed up interactive performance.
---++ Plugin Info
| Maintainer(s): | Michael Daum |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 16 Jun 2015: | (6.13) - Item13460: JQICON fails to render !FontAwesome icons. |
| 30 Apr 2015: | (6.11) - Item13389: datepicker initializaiton problem; datepicker z-index problem; pushy tooltips not hidden when typing into an input field; error in jquery.foswiki api getPubUrlPath |
| 23 Feb 2015: | (6.10) - Item13272: upgraded superfish and hoverintent, deprecated subpersubs |
| 12 Jan 2015: | (6.01) - Item13205: added jquery-1.11.2 and jquery-2.1.3 |
Expand Down
16 changes: 8 additions & 8 deletions JQueryPlugin/data/System/VarJQICON.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1422977767" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1434468639" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
#VarJQICON
---+++ JQICON{"name" ...} -- render an image
Expand All @@ -25,13 +25,13 @@
<li> =$iconTitle=: title attribute-value; if the =title= parameter to JQICON is set, this expands to =title='...'= </li> \
</ul> | =&lt;img src='$iconPath' class='$iconClass' $iconAlt$iconTitle/>= |
* Example for famfamfam icons:<verbatim class="tml">
JQICON{"tick" alt="alternative content" title="this is a tick icon"}%
JQICON{"cross"}%
JQICON{"disk"}%
JQICON{"star"}%
JQICON{"lightbulb"}%
JQICON{"camera"}%
JQICON{"date"}%
%JQICON{"tick" alt="alternative content" title="this is a tick icon"}%
%JQICON{"cross"}%
%JQICON{"disk"}%
%JQICON{"star"}%
%JQICON{"lightbulb"}%
%JQICON{"camera"}%
%JQICON{"date"}%
</verbatim> Produces:
%JQICON{"tick" alt="alternative content" title="this is a tick icon"}%
%JQICON{"cross"}%
Expand Down
7 changes: 4 additions & 3 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ BEGIN {
}
}

our $VERSION = '6.12';
our $RELEASE = '30 Apr 2015';
our $VERSION = '6.13';
our $RELEASE = '16 Jun 2015';
our $SHORTDESCRIPTION = 'jQuery <nop>JavaScript library for Foswiki';
our $NO_PREFS_IN_TOPIC = 1;

Expand Down Expand Up @@ -368,12 +368,13 @@ sub handleJQueryIcon {
$iconFormat = '<i class=\'$iconClass\' $iconStyle $iconTitle></i>';
$iconPath = '';
$iconClass = "foswikiIcon jqIcon fa $iconName";
createPlugin("fontawesome");
}

# default img based
else {
$iconFormat =
'<img src=\'$iconPath\' class=\'$iconClass\' $iconStyle $iconAlt$iconTitle/>'
'<img src=\'$iconPath\' class=\'$iconClass $iconName\' $iconStyle $iconAlt$iconTitle/>'
unless $iconFormat;
$iconPath =
Foswiki::Plugins::JQueryPlugin::Plugins::getIconUrlPath($iconName);
Expand Down

0 comments on commit 52de18f

Please sign in to comment.