Commit 0b568ced authored by Robert Lyon's avatar Robert Lyon

Bug 1838915: Fixing problem with comment ratings and fontawesome 5

Places to check
- the Extensions -> Plugins -> Comment configuration
- adding a Comment to a page/artefact and how it displays

Change-Id: I6d0945ee0d54492b65ff285d98bd65bc14d6e723
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 04fc0678
...@@ -122,6 +122,7 @@ $string['star'] = 'Star'; ...@@ -122,6 +122,7 @@ $string['star'] = 'Star';
$string['heart'] = 'Heart'; $string['heart'] = 'Heart';
$string['thumbsup'] = 'Thumbs up'; $string['thumbsup'] = 'Thumbs up';
$string['ok'] = 'Tick'; $string['ok'] = 'Tick';
$string['smile'] = 'Smile';
$string['ratingexample'] = 'Generated example'; $string['ratingexample'] = 'Generated example';
$string['removerating'] = 'Clear ratings'; $string['removerating'] = 'Clear ratings';
$string['ratingoption'] = "Set rating %s out of %s"; $string['ratingoption'] = "Set rating %s out of %s";
...@@ -1123,6 +1123,7 @@ class ArtefactTypeComment extends ArtefactType { ...@@ -1123,6 +1123,7 @@ class ArtefactTypeComment extends ArtefactType {
'heart' => get_string('heart', 'artefact.comment'), 'heart' => get_string('heart', 'artefact.comment'),
'thumbs-up' => get_string('thumbsup', 'artefact.comment'), 'thumbs-up' => get_string('thumbsup', 'artefact.comment'),
'check-circle' => get_string('ok', 'artefact.comment'), 'check-circle' => get_string('ok', 'artefact.comment'),
'smile' => get_string('smile', 'artefact.comment'),
), ),
), ),
'ratinglength' => array( 'ratinglength' => array(
......
...@@ -80,13 +80,8 @@ ...@@ -80,13 +80,8 @@
$(this).css('color',settings.coloroff); $(this).css('color',settings.coloroff);
if (settings.emptyglyph) { if (settings.emptyglyph) {
if ($(this).hasClass(settings.glyph)) { if ($(this).hasClass(settings.glyph)) {
// need to add the '-o' before the end for thumbs // need to set any font type difference for the 'not selected' ratings
if (settings.glyph == 'icon-thumbs-up') { $(this).addClass('icon-regular');
$(this).removeClass(settings.glyph).addClass('icon-thumbs-o-up');
}
else {
$(this).removeClass(settings.glyph).addClass(settings.glyph + '-o');
}
} }
} }
} }
......
...@@ -32,7 +32,9 @@ ...@@ -32,7 +32,9 @@
<span class="star-comment-rating"> <span class="star-comment-rating">
{for i $item->ratingdata->min_rating $item->ratingdata->max_rating} {for i $item->ratingdata->min_rating $item->ratingdata->max_rating}
<div class="star-rating star star-rating-applied star-rating-readonly {$star}-rating{if $i <= $item->ratingdata->value}-on{else}-off{/if}"><a {if $colour}style="color: {$colour}"{/if}>&nbsp;</a></div> <div class="star-rating star-rating-readonly">
<a class="icon icon-{$star} {if $i <= $item->ratingdata->value}icon-solid{else}icon-regular{/if}" {if $colour}style="color: {$colour}"{/if}>&nbsp;</a>
</div>
{/for} {/for}
</span> </span>
{/if} {/if}
......
...@@ -98,7 +98,6 @@ ...@@ -98,7 +98,6 @@
} }
.star-rating-readonly { .star-rating-readonly {
width: 15px;
a { a {
font-size: 15px; font-size: 15px;
&:hover { &:hover {
...@@ -108,9 +107,8 @@ ...@@ -108,9 +107,8 @@
} }
.star-comment-rating { .star-comment-rating {
float:right; display: block;
margin: -10px 40% 0 0; padding: 6px 0 6px 0;
padding: 10px 0 0 10px;
} }
.ratingicon:hover { .ratingicon:hover {
color: theme-color("success") !important; color: theme-color("success") !important;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment