Commit 09628212 authored by nkoth's avatar nkoth

[FIX] Usability: Put a circle around the star that is the user's rating...

[FIX] Usability: Put a circle around the star that is the user's rating otherwise it is confusing to user
parent 29bf93d3
......@@ -1370,6 +1370,7 @@ img/icons/star_green_2.gif -text
img/icons/star_grey.gif -text
img/icons/star_grey.png -text
img/icons/star_grey_2.gif -text
img/icons/star_grey_selected.png -text
img/icons/star_half.png -text
img/icons/star_orange.gif -text
img/icons/star_orange_2.gif -text
......@@ -1377,6 +1378,7 @@ img/icons/star_purple.gif -text
img/icons/star_purple_2.gif -text
img/icons/star_red.gif -text
img/icons/star_red_2.gif -text
img/icons/star_selected.png -text
img/icons/star_yellow.gif -text
img/icons/star_yellow_2.gif -text
img/icons/status_closed.gif -text
......
......@@ -1963,9 +1963,17 @@ function adjustRating(element, data) {
if (v && v.length === 2) {
v = v[1];
if (v <= data[0].voteavg && data[0].numvotes > 0) {
$("img", $sibs[i]).attr("src", "img/icons/star.png");
if (data[0].result && data[0].my_rate == v) {
$("img", $sibs[i]).attr("src", "img/icons/star_selected.png");
} else {
$("img", $sibs[i]).attr("src", "img/icons/star.png");
}
} else {
$("img", $sibs[i]).attr("src", "img/icons/star_grey.png");
if (data[0].result && data[0].my_rate == v) {
$("img", $sibs[i]).attr("src", "img/icons/star_grey_selected.png");
} else {
$("img", $sibs[i]).attr("src", "img/icons/star_grey.png");
}
}
}
}
......
......@@ -24,9 +24,27 @@
<a href="{$smarty.server.REQUEST_URI}" onclick="sendVote(this,{$item.itemId},{$field.fieldId},{$field.rating_options[i]});return false;">
{/if}
{if $field.numvotes && $field.voteavg >= $field.rating_options[i]}
{if $field.mode eq 'radio'}{tr}{$field.labels[i]}{/tr}: {/if}{if $field.mode eq 'radio'}{icon _id='star_grey' alt=$field.rating_options[i] title=$smarty.capture.thisvote}{else}{icon _id='star' alt=$field.rating_options[i] title=$smarty.capture.thisvote}{/if}
{if $field.mode eq 'radio'}{tr}{$field.labels[i]}{/tr}: {/if}
{if $field.mode eq 'radio'}
{if $field.my_rate !== false && $field.my_rate == $field.rating_options[i]}
{icon _id='star_grey_selected' alt=$field.rating_options[i] title=$smarty.capture.thisvote}
{else}
{icon _id='star_grey' alt=$field.rating_options[i] title=$smarty.capture.thisvote}
{/if}
{else}
{if $field.my_rate !== false && $field.my_rate == $field.rating_options[i]}
{icon _id='star_selected' alt=$field.rating_options[i] title=$smarty.capture.thisvote}
{else}
{icon _id='star' alt=$field.rating_options[i] title=$smarty.capture.thisvote}
{/if}
{/if}
{else}
{if $field.mode eq 'radio'}{tr}{$field.labels[i]}{/tr}: {/if}{icon _id='star_grey' alt=$field.rating_options[i] title=$smarty.capture.thisvote}
{if $field.mode eq 'radio'}{tr}{$field.labels[i]}{/tr}: {/if}
{if $field.my_rate !== false && $field.my_rate == $field.rating_options[i]}
{icon _id='star_grey_selected' alt=$field.rating_options[i] title=$smarty.capture.thisvote}
{else}
{icon _id='star_grey' alt=$field.rating_options[i] title=$smarty.capture.thisvote}
{/if}
{/if}
{if ($tiki_p_tracker_vote_ratings eq 'y' && (!isset($field.my_rate) || $field.my_rate === false)) ||
($tiki_p_tracker_revote_ratings eq 'y' && isset($field.my_rate) && $field.my_rate !== false)}
......
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