1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Apply poll result action for public votes to entire row

Discussion in 'Closed Suggestions' started by Brogan, Oct 22, 2011.

  1. Brogan

    Brogan XenForo Moderator Staff Member

    The majority of my members have no idea how to check who voted for which option in a public poll, despite me telling them over and over again.

    Only having the click action on the total votes makes it easy to overlook and difficult to click.

    I've edited the template to apply the action to the results bar too, but it would be great if it applied to the whole row and there was hover css applied, a change of background colour perhaps, as well as a tooltip.

    This is what I've changed in the poll_block_result template to make it slightly easier to find the results.

    <td class="barCell">
        <span class="barContainer">
            <xen:if is="{$poll.public_votes}">
                <a href="{xen:link threads/poll/results, $thread, 'poll_response_id={$pollResponseId}'}" class="concealed OverlayTrigger" title="{xen:phrase cta_click_to_view_who_voted_for_this_option}">
            <xen:if is="{$response.response_vote_count}"><span class="bar" style="width: {xen:calc "200 * {$response.response_vote_count} / {$poll.voter_count}"}px"></span></xen:if>
            <xen:else />
            <xen:if is="{$response.response_vote_count}"><span class="bar" style="width: {xen:calc "200 * {$response.response_vote_count} / {$poll.voter_count}"}px"></span></xen:if>
    I've also added the following to EXTRA.css:
    .pollResult .bar:hover {
    background: @secondaryLight;
    The result:

    That's a bit hackish though and there are a few problems with it, such as the result bar colour changing on hover, even for a private vote and the hover not working along the full length of the bar container.
    Grover, DRE, Fuhrmann and 1 other person like this.
  2. DRE

    DRE Well-Known Member

    Looks great!
  3. 1l1

    1l1 Member

    How to view in-one-click who voted for every option - show all voters at once?

Share This Page