aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/prosilver/template/ajax.js
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-05-08 18:43:46 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-05-08 18:43:46 +0200
commit8121f87f084c0e1790dd59105a00de8d4b3c7cdb (patch)
treea9e2d9565cec2c9888390337852c64ab88284e4b /phpBB/styles/prosilver/template/ajax.js
parentbfd66ef2fdc1721ded267b6a0af3883f827840c1 (diff)
parentd4fc060bcd61228fdf78da4f2d290a7a17546c46 (diff)
downloadforums-8121f87f084c0e1790dd59105a00de8d4b3c7cdb.tar
forums-8121f87f084c0e1790dd59105a00de8d4b3c7cdb.tar.gz
forums-8121f87f084c0e1790dd59105a00de8d4b3c7cdb.tar.bz2
forums-8121f87f084c0e1790dd59105a00de8d4b3c7cdb.tar.xz
forums-8121f87f084c0e1790dd59105a00de8d4b3c7cdb.zip
Merge branch 'develop-ascraeus' of github.com:phpbb/phpbb into ticket/12407
* 'develop-ascraeus' of github.com:phpbb/phpbb: (424 commits) [ticket/12428] Use the database to store the original version number [ticket/12493] Add functional test [ticket/12493] Fix sql query for selection of users that have disabled PM [ticket/12513] Add asset include support to simple header/footer in ACP [ticket/12513] Add simple_header head event with support for CSS assets calls [ticket/12511] Add missing titles for profile fields in members group view [ticket/12428] Incorrect from version in database update log entry [ticket/12510] Convert & to &amp; in build_url() when no params are stripped. [ticket/12402] CAPTCHA plugin migration fails to detect missing plugins [ticket/12440] Use a more generic approach for replacing the URL. [ticket/12507] Move the 'require' statement [ticket/12507] Add console command to purge the cache [ticket/12421] Rebase and enable tests [ticket/12421] Don't parse [attachment] tags if user can't view them [ticket/12325] Use \RecursiveDirectoryIterator [ticket/12325] Doc blocks [ticket/12440] Set browser URL to point to specific post when using view=unread [ticket/12357] Support routes in generate_smilies() function. [ticket/12459] Change language strings [ticket/12504] Use local variables where possible ... Conflicts: phpBB/posting.php
Diffstat (limited to 'phpBB/styles/prosilver/template/ajax.js')
-rw-r--r--phpBB/styles/prosilver/template/ajax.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/styles/prosilver/template/ajax.js b/phpBB/styles/prosilver/template/ajax.js
index d2a070d11b..e9f8064b9e 100644
--- a/phpBB/styles/prosilver/template/ajax.js
+++ b/phpBB/styles/prosilver/template/ajax.js
@@ -8,7 +8,7 @@
* @param int Delay in ms until darkenwrapper's click event is triggered
*/
phpbb.closeDarkenWrapper = function(delay) {
- setTimeout(function() {
+ phpbbAlertTimer = setTimeout(function() {
$('#darkenwrapper').trigger('click');
}, delay);
};
@@ -244,10 +244,12 @@ phpbb.addAjaxCallback('vote_poll', function(res) {
var option = $(this);
var option_id = option.attr('data-poll-option-id');
var voted = (typeof res.user_votes[option_id] !== 'undefined') ? true : false;
+ var most_voted = (res.vote_counts[option_id] == most_votes) ? true : false;
var percent = (!res.total_votes) ? 0 : Math.round((res.vote_counts[option_id] / res.total_votes) * 100);
var percent_rel = (most_votes == 0) ? 0 : Math.round((res.vote_counts[option_id] / most_votes) * 100);
option.toggleClass('voted', voted);
+ option.toggleClass('most-votes', most_voted);
// Update the bars
var bar = option.find('.resultbar div');
@@ -313,13 +315,17 @@ $('.poll_view_results a').click(function(e) {
$('[data-ajax]').each(function() {
var $this = $(this),
ajax = $this.attr('data-ajax'),
+ filter = $this.attr('data-filter'),
fn;
if (ajax !== 'false') {
fn = (ajax !== 'true') ? ajax : null;
+ filter = (filter !== undefined) ? phpbb.getFunctionByName(filter) : null;
+
phpbb.ajaxify({
selector: this,
refresh: $this.attr('data-refresh') !== undefined,
+ filter: filter,
callback: fn
});
}