aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-10-07 14:18:50 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-10-07 14:18:50 +0200
commitebb3169d56975e29571acba6488e627fa221cd0e (patch)
tree4aaf63233efff2ef7e84cefd6d8cc4a3338c0ae7 /phpBB/styles
parent64641f9b1f2043884898cd6eef3d358ef4c1c575 (diff)
parent3fd1fa5492b96715f3bfbd16fcbe416e07ebb6e7 (diff)
downloadforums-ebb3169d56975e29571acba6488e627fa221cd0e.tar
forums-ebb3169d56975e29571acba6488e627fa221cd0e.tar.gz
forums-ebb3169d56975e29571acba6488e627fa221cd0e.tar.bz2
forums-ebb3169d56975e29571acba6488e627fa221cd0e.tar.xz
forums-ebb3169d56975e29571acba6488e627fa221cd0e.zip
Merge branch '3.1.x'
Diffstat (limited to 'phpBB/styles')
-rw-r--r--phpBB/styles/prosilver/template/ajax.js9
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html2
2 files changed, 9 insertions, 2 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index 76c605dd19..e3780f024a 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -242,7 +242,14 @@ phpbb.addAjaxCallback('vote_poll', function(res) {
var mostVoted = (res.vote_counts[optionId] === mostVotes);
var percent = (!res.total_votes) ? 0 : Math.round((res.vote_counts[optionId] / res.total_votes) * 100);
var percentRel = (mostVotes === 0) ? 0 : Math.round((res.vote_counts[optionId] / mostVotes) * 100);
-
+ var altText;
+
+ altText = $this.attr('data-alt-text');
+ if (voted) {
+ $this.attr('title', $.trim(altText));
+ } else {
+ $this.attr('title', '');
+ };
$this.toggleClass('voted', voted);
$this.toggleClass('most-votes', mostVoted);
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 8d7af4e434..d6291f8ff3 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -88,7 +88,7 @@
<fieldset class="polls">
<!-- BEGIN poll_option -->
<!-- EVENT viewtopic_body_poll_option_before -->
- <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF --><!-- IF poll_option.POLL_OPTION_MOST_VOTES --> most-votes<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-poll-option-id="{poll_option.POLL_OPTION_ID}">
+ <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF --><!-- IF poll_option.POLL_OPTION_MOST_VOTES --> most-votes<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-alt-text="{L_POLL_VOTED_OPTION}" data-poll-option-id="{poll_option.POLL_OPTION_ID}">
<dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt>
<!-- IF S_CAN_VOTE --><dd style="width: auto;" class="poll_option_select"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
<dd class="resultbar<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT_REL};">{poll_option.POLL_OPTION_RESULT}</div></dd>