Index: trunk/extensions/AJAXPoll/AJAXPoll.css |
— | — | @@ -1,106 +0,0 @@ |
2 | | -/** |
3 | | - * CSS for AJAX Poll extension |
4 | | - * @file |
5 | | - * @ingroup Extensions |
6 | | - * @author Dariusz Siedlecki |
7 | | - * @author Thomas Gries |
8 | | - */ |
9 | | - |
10 | | -.ajaxpoll { |
11 | | - width: 400px; |
12 | | - border: 1px dashed #999; |
13 | | - background: #FAFAFA; |
14 | | - padding: 10px 20px 10px 10px |
15 | | -} |
16 | | - |
17 | | -.ajaxpoll .ajaxpoll-question { |
18 | | - font-weight: bold; |
19 | | -} |
20 | | - |
21 | | -.ajaxpoll .ajaxpoll-answer-name { |
22 | | - margin-top: 5px; |
23 | | - padding-left: 0px; |
24 | | - font-size: 0.9em; |
25 | | -} |
26 | | - |
27 | | -.ajaxpoll .ajaxpoll-hover-vote { |
28 | | - background: cyan; |
29 | | -} |
30 | | - |
31 | | -.ajaxpoll .ajaxpoll-hover-revoke { |
32 | | - background: gold; |
33 | | -} |
34 | | - |
35 | | -.ajaxpoll .ajaxpoll-answer-vote { |
36 | | - border: 1px solid #CCC; |
37 | | - width: 100%; |
38 | | - margin-left: 0px; |
39 | | - height: 12px; |
40 | | - font-size: 10px; |
41 | | - position: relative; |
42 | | -} |
43 | | - |
44 | | -.ajaxpoll .ajaxpoll-answer-vote div { |
45 | | - border-right: 1px solid #CCC; |
46 | | - background: #E5E5E5; |
47 | | - position: absolute; |
48 | | - top: 0; |
49 | | - left: 0; |
50 | | - height: 12px; |
51 | | - font-size: 1px; |
52 | | - line-height: 12px; |
53 | | - z-index: 2; |
54 | | -} |
55 | | - |
56 | | -.ajaxpoll .ajaxpoll-our-vote div { |
57 | | - border: 1px solid #008000; |
58 | | - top: -1px; |
59 | | - left: -1px; |
60 | | -} |
61 | | - |
62 | | -.ajaxpoll .ajaxpoll-answer-vote span { |
63 | | - position: absolute; |
64 | | - top: -3px; |
65 | | - left: 3px; |
66 | | - z-index: 4; |
67 | | -} |
68 | | - |
69 | | -.ajaxpoll label { |
70 | | - cursor: pointer; |
71 | | -} |
72 | | -.ajaxpoll input { |
73 | | - cursor: pointer; |
74 | | - vertical-align: middle; |
75 | | - margin-top: 0px; |
76 | | - margin-bottom: 0px; |
77 | | - margin-left: 0px; |
78 | | -} |
79 | | - |
80 | | -.ajaxpoll .ajaxpoll-checkevent { |
81 | | - background: cyan; |
82 | | -} |
83 | | - |
84 | | -.ajaxpoll .ajaxpoll-misc { |
85 | | - margin-bottom: 10px; |
86 | | - color: grey; |
87 | | -} |
88 | | - |
89 | | -.ajaxpoll .ajaxpoll-ajax { |
90 | | - background: #FFFFCF; |
91 | | - padding: 1px 4px; |
92 | | - width: 200px; |
93 | | - border-radius: 0.5em; |
94 | | - -moz-border-radius: 0.5em; |
95 | | - display: none; |
96 | | -} |
97 | | - |
98 | | -.ajaxpoll .ajaxpoll-info { |
99 | | - margin-top: 20px; |
100 | | - color: grey; |
101 | | -} |
102 | | - |
103 | | -.ajaxpoll .ajaxpoll-id-info { |
104 | | - color:#FAFAFA; |
105 | | - font-size: 100%; |
106 | | - float: right; |
107 | | -} |
Index: trunk/extensions/AJAXPoll/resources/ajaxpoll.js |
— | — | @@ -0,0 +1,41 @@ |
| 2 | +var ajaxpolltmp; |
| 3 | + |
| 4 | +$(".ajaxpoll-answer-vote").live("mouseover", |
| 5 | + function(){ |
| 6 | + var sp=$(this).find("span"); |
| 7 | + ajaxpolltmp=sp.html(); |
| 8 | + sp.text(sp.attr("title")); |
| 9 | + sp.attr("title",""); |
| 10 | + } |
| 11 | +); |
| 12 | + |
| 13 | +$(".ajaxpoll-answer-vote").live("mouseout", |
| 14 | + function(){ |
| 15 | + var sp=$(this).find("span"); |
| 16 | + sp.attr("title",sp.text()); |
| 17 | + sp.text(ajaxpolltmp); |
| 18 | + } |
| 19 | +); |
| 20 | + |
| 21 | + |
| 22 | +$(".ajaxpoll-answer-name:not(.ajaxpoll-answer-name-revoke)").live("mouseover", |
| 23 | + function(){ |
| 24 | + $(this).addClass("ajaxpoll-hover-vote"); |
| 25 | + } |
| 26 | +); |
| 27 | +$(".ajaxpoll-answer-name:not(.ajaxpoll-answer-name-revoke)").live("mouseout", |
| 28 | + function(){ |
| 29 | + $(this).removeClass("ajaxpoll-hover-vote"); |
| 30 | + } |
| 31 | +); |
| 32 | + |
| 33 | +$(".ajaxpoll-answer-name-revoke").live("mouseover", |
| 34 | + function(){ |
| 35 | + $(this).addClass("ajaxpoll-hover-revoke"); |
| 36 | + } |
| 37 | +); |
| 38 | +$(".ajaxpoll-answer-name-revoke").live("mouseout", |
| 39 | + function(){ |
| 40 | + $(this).removeClass("ajaxpoll-hover-revoke"); |
| 41 | + } |
| 42 | +); |
Property changes on: trunk/extensions/AJAXPoll/resources/ajaxpoll.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 43 | + native |
Index: trunk/extensions/AJAXPoll/resources/ajaxpoll.css |
— | — | @@ -0,0 +1,106 @@ |
| 2 | +/** |
| 3 | + * CSS for AJAX Poll extension |
| 4 | + * @file |
| 5 | + * @ingroup Extensions |
| 6 | + * @author Dariusz Siedlecki |
| 7 | + * @author Thomas Gries |
| 8 | + */ |
| 9 | + |
| 10 | +.ajaxpoll { |
| 11 | + width: 400px; |
| 12 | + border: 1px dashed #999; |
| 13 | + background: #FAFAFA; |
| 14 | + padding: 10px 20px 10px 10px |
| 15 | +} |
| 16 | + |
| 17 | +.ajaxpoll .ajaxpoll-question { |
| 18 | + font-weight: bold; |
| 19 | +} |
| 20 | + |
| 21 | +.ajaxpoll .ajaxpoll-answer-name,.ajaxpoll-answer-name-revoke { |
| 22 | + margin-top: 5px; |
| 23 | + padding-left: 0px; |
| 24 | + font-size: 0.9em; |
| 25 | +} |
| 26 | + |
| 27 | +.ajaxpoll .ajaxpoll-hover-vote { |
| 28 | + background: cyan; |
| 29 | +} |
| 30 | + |
| 31 | +.ajaxpoll .ajaxpoll-hover-revoke { |
| 32 | + background: gold; |
| 33 | +} |
| 34 | + |
| 35 | +.ajaxpoll .ajaxpoll-answer-vote { |
| 36 | + border: 1px solid #CCC; |
| 37 | + width: 100%; |
| 38 | + margin-left: 0px; |
| 39 | + height: 12px; |
| 40 | + font-size: 10px; |
| 41 | + position: relative; |
| 42 | +} |
| 43 | + |
| 44 | +.ajaxpoll .ajaxpoll-answer-vote div { |
| 45 | + border-right: 1px solid #CCC; |
| 46 | + background: #E5E5E5; |
| 47 | + position: absolute; |
| 48 | + top: 0; |
| 49 | + left: 0; |
| 50 | + height: 12px; |
| 51 | + font-size: 1px; |
| 52 | + line-height: 12px; |
| 53 | + z-index: 2; |
| 54 | +} |
| 55 | + |
| 56 | +.ajaxpoll .ajaxpoll-our-vote div { |
| 57 | + border: 1px solid #008000; |
| 58 | + top: -1px; |
| 59 | + left: -1px; |
| 60 | +} |
| 61 | + |
| 62 | +.ajaxpoll .ajaxpoll-answer-vote span { |
| 63 | + position: absolute; |
| 64 | + top: -3px; |
| 65 | + left: 3px; |
| 66 | + z-index: 4; |
| 67 | +} |
| 68 | + |
| 69 | +.ajaxpoll label { |
| 70 | + cursor: pointer; |
| 71 | +} |
| 72 | +.ajaxpoll input { |
| 73 | + cursor: pointer; |
| 74 | + vertical-align: middle; |
| 75 | + margin-top: 0px; |
| 76 | + margin-bottom: 0px; |
| 77 | + margin-left: 0px; |
| 78 | +} |
| 79 | + |
| 80 | +.ajaxpoll .ajaxpoll-checkevent { |
| 81 | + background: cyan; |
| 82 | +} |
| 83 | + |
| 84 | +.ajaxpoll .ajaxpoll-misc { |
| 85 | + margin-bottom: 10px; |
| 86 | + color: grey; |
| 87 | +} |
| 88 | + |
| 89 | +.ajaxpoll .ajaxpoll-ajax { |
| 90 | + background: #FFFFCF; |
| 91 | + padding: 1px 4px; |
| 92 | + width: 200px; |
| 93 | + border-radius: 0.5em; |
| 94 | + -moz-border-radius: 0.5em; |
| 95 | + display: none; |
| 96 | +} |
| 97 | + |
| 98 | +.ajaxpoll .ajaxpoll-info { |
| 99 | + margin-top: 20px; |
| 100 | + color: grey; |
| 101 | +} |
| 102 | + |
| 103 | +.ajaxpoll .ajaxpoll-id-info { |
| 104 | + color:#FAFAFA; |
| 105 | + font-size: 100%; |
| 106 | + float: right; |
| 107 | +} |
Property changes on: trunk/extensions/AJAXPoll/resources/ajaxpoll.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 108 | + native |
Index: trunk/extensions/AJAXPoll/AJAXPoll_body.php |
— | — | @@ -22,7 +22,9 @@ |
23 | 23 | * @return Boolean: true |
24 | 24 | */ |
25 | 25 | static function AJAXPollParserInit( $parser ) { |
| 26 | + global $wgOut; |
26 | 27 | $parser->setHook( 'poll', array( __CLASS__, 'AJAXPollRender' ) ); |
| 28 | + $wgOut->addModules( 'ext.ajaxpoll' ); |
27 | 29 | return true; |
28 | 30 | } |
29 | 31 | |
— | — | @@ -53,11 +55,6 @@ |
54 | 56 | $input = trim( strip_tags( $input->getText() ) ); |
55 | 57 | $lines = explode( "\n", trim( $input ) ); |
56 | 58 | |
57 | | - // Deprecating AJAX |
58 | | - /*if ( isset( $_POST['ajaxpoll-post-id'] ) && isset( $_POST['ajaxpoll-post-answer'] ) && $_POST['ajaxpoll-post-id'] == $id ) { |
59 | | - AJAXPoll::submitVote( $_POST['ajaxpoll-post-id'], intval( $_POST['ajaxpoll-post-answer'] ) ); |
60 | | - }*/ |
61 | | - |
62 | 59 | $dbw = wfGetDB( DB_MASTER ); |
63 | 60 | $dbw->begin( __METHOD__ ); |
64 | 61 | |
— | — | @@ -79,15 +76,13 @@ |
80 | 77 | 'poll_id' => $id, |
81 | 78 | 'poll_txt' => $input, |
82 | 79 | 'poll_date' => wfTimestampNow(), |
83 | | - 'poll_title' => $wgParser->mTitle->getText() |
| 80 | + 'poll_title' => $parser->mTitle->getText() |
84 | 81 | ), |
85 | 82 | __METHOD__ |
86 | 83 | ); |
87 | 84 | } |
88 | 85 | $dbw->commit( __METHOD__ ); |
89 | 86 | |
90 | | - // Add CSS |
91 | | - $wgOut->addExtensionStyle( $wgScriptPath . '/extensions/AJAXPoll/AJAXPoll.css' ); |
92 | 87 | switch( $lines[0] ) { |
93 | 88 | case 'STATS': |
94 | 89 | $retVal = AJAXPoll::buildStats( $id, $user ); |
— | — | @@ -300,19 +295,6 @@ |
301 | 296 | // @see https://bugzilla.wikimedia.org/show_bug.cgi?id=1319 |
302 | 297 | $ret = '<div id="ajaxpoll-id-' . $id . '" class="ajaxpoll"> |
303 | 298 | <div id="ajaxpoll-ajax-' . $id . '" class="ajaxpoll-ajax"' . $attributes . '>' . $ajaxMessage . '</div> |
304 | | -<script>var tmp; |
305 | | -function mover(x){ |
306 | | - var sp=$(x).find("span"); |
307 | | - tmp=sp.html(); |
308 | | - sp.text(sp.attr("title")); |
309 | | - sp.attr("title",""); |
310 | | -} |
311 | | -function mout(x){ |
312 | | - var sp=$(x).find("span"); |
313 | | - sp.attr("title",sp.text()); |
314 | | - sp.text(tmp); |
315 | | -} |
316 | | -</script> |
317 | 299 | <div class="ajaxpoll-question">' . strip_tags( $lines[0] ) . '</div>'; |
318 | 300 | |
319 | 301 | // Different message depending on if the user has already voted or not, or is entitled to vote |
— | — | @@ -343,6 +325,7 @@ |
344 | 326 | $voteValue = ( $vote ) ? $i : 0; |
345 | 327 | |
346 | 328 | $ans_no = $i - 1; |
| 329 | + $xid = "$id-$ans_no"; |
347 | 330 | |
348 | 331 | if ( $amountOfVotes == 0 ) { |
349 | 332 | $percent = 0; |
— | — | @@ -359,7 +342,7 @@ |
360 | 343 | if ( $wgUser->isAllowed( 'ajaxpoll-vote' ) ) { |
361 | 344 | |
362 | 345 | if ( $wgUseAjax ) { |
363 | | - $submitJS = "sajax_do_call(\"AJAXPoll::submitVote\",[\"" . $id . "\",\"" . $voteValue . "\"], $(\"#ajaxpoll-container-" . $id . "\")[0]);"; |
| 346 | + $submitJS = "sajax_do_call(\"AJAXPoll::submitVote\",[\"" . $id . "\",\"" . $voteValue . "\"],$(\"#ajaxpoll-container-" . $id . "\")[0]);"; |
364 | 347 | } else { |
365 | 348 | $submitJS = "$(\"#ajaxpoll-answer-id-" . $id . "\").submit();"; |
366 | 349 | } |
— | — | @@ -370,13 +353,13 @@ |
371 | 354 | |
372 | 355 | if ( $vote ) { |
373 | 356 | $ret .= " |
374 | | -<div id='ajaxpoll-answer-" . $ans_no . "' class='ajaxpoll-answer'><div class='ajaxpoll-answer-name'><label for='ajaxpoll-post-answer-" . $ans_no . "' onmouseover='$(this).addClass(\"ajaxpoll-hover-vote\");' onmouseout='$(this).removeClass(\"ajaxpoll-hover-vote\");' onclick='$(\"#ajaxpoll-ajax-" . $id . "\").html(\"" . wfMsg( 'ajaxpoll-submitting' ) . "\");$(\"#ajaxpoll-ajax-" . $id . "\").css(\"display\",\"block\");$(this).addClass(\"ajaxpoll-checkevent\").prop(\"checked\",true); " . $submitJS . "'><input type='radio' id='ajaxpoll-post-answer-" . $ans_no . "' name='ajaxpoll-post-answer-" . $ans_no . "' value='" . $voteValue . "' " . ( $our ? 'checked=true ' : '' ) . "/>" . strip_tags( $lines[$i] ) . |
375 | | -"</label></div><div class='ajaxpoll-answer-vote" . ( $our ? ' ajaxpoll-our-vote' : '' ) ."' onmouseover='mover(this)' onmouseout='mout(this);'><span title='" . wfMsg( 'ajaxpoll-percent-votes', sprintf( $percent ) ) . "'>" . ( ( isset( $poll_result ) && !empty( $poll_result[$i + 1] ) ) ? $poll_result[$i + 1] : 0 ) . "</span><div style='width: " . $percent . "%;" . ( $percent == 0 ? ' border:0;' : '' ) . "'></div></div> |
| 357 | +<div id='ajaxpoll-answer-$xid' class='ajaxpoll-answer'><div class='ajaxpoll-answer-name'><label for='ajaxpoll-post-answer-$xid' onclick='$(\"#ajaxpoll-ajax-" . $id . "\").html(\"" . wfMsg( 'ajaxpoll-submitting' ) . "\");$(\"#ajaxpoll-ajax-" . $id . "\").css(\"display\",\"block\");$(this).addClass(\"ajaxpoll-checkevent\").prop(\"checked\",true); " . $submitJS . "'><input type='radio' id='ajaxpoll-post-answer-$xid' name='ajaxpoll-post-answer-$xid' value='" . $voteValue . "' " . ( $our ? 'checked=true ' : '' ) . "/>" . strip_tags( $lines[$i] ) . |
| 358 | +"</label></div><div class='ajaxpoll-answer-vote" . ( $our ? ' ajaxpoll-our-vote' : '' ) ."'><span title='" . wfMsg( 'ajaxpoll-percent-votes', sprintf( $percent ) ) . "'>" . ( ( isset( $poll_result ) && !empty( $poll_result[$i + 1] ) ) ? $poll_result[$i + 1] : 0 ) . "</span><div style='width: " . $percent . "%;" . ( $percent == 0 ? ' border:0;' : '' ) . "'></div></div> |
376 | 359 | </div> |
377 | 360 | "; |
378 | 361 | } else { |
379 | 362 | $ret .= " |
380 | | -<div id='ajaxpoll-answer-" . $ans_no . "' class='ajaxpoll-answer'><div class='ajaxpoll-answer-name'><label for='ajaxpoll-post-answer-" . $ans_no . "' onmouseover='$(this).addClass(\"ajaxpoll-hover-revoke\");' onmouseout='$(this).removeClass(\"ajaxpoll-hover-revoke\");' onclick='$(\"#ajaxpoll-ajax-" . $id . "\").html(\"" . wfMsg( 'ajaxpoll-submitting' ) . "\");$(\"#ajaxpoll-ajax-" . $id . "\").css(\"display\",\"block\");$(this).addClass(\"ajaxpoll-checkevent\").prop(\"checked\",true); " . $submitJS . "'><input type='radio' id='ajaxpoll-post-answer-" . $ans_no . "' name='ajaxpoll-post-answer-" . $ans_no . "' value='" . $voteValue . "' " . ( $our ? 'checked=true ' : '' ) . "/>" . strip_tags( $lines[$i] ) . |
| 363 | +<div id='ajaxpoll-answer-$xid' class='ajaxpoll-answer'><div class='ajaxpoll-answer-name ajaxpoll-answer-name-revoke'><label for='ajaxpoll-post-answer-$xid' onclick='$(\"#ajaxpoll-ajax-" . $id . "\").html(\"" . wfMsg( 'ajaxpoll-submitting' ) . "\");$(\"#ajaxpoll-ajax-" . $id . "\").css(\"display\",\"block\");$(this).addClass(\"ajaxpoll-checkevent\").prop(\"checked\",true); " . $submitJS . "'><input type='radio' id='ajaxpoll-post-answer-$xid' name='ajaxpoll-post-answer-$xid' value='" . $voteValue . "' " . ( $our ? 'checked=true ' : '' ) . "/>" . strip_tags( $lines[$i] ) . |
381 | 364 | "</label></div> |
382 | 365 | </div> |
383 | 366 | "; |
— | — | @@ -385,8 +368,8 @@ |
386 | 369 | } else { |
387 | 370 | |
388 | 371 | $ret .= " |
389 | | -<div id='ajaxpoll-answer-" . $ans_no . "' class='ajaxpoll-answer'><div class='ajaxpoll-answer-name'><label for='ajaxpoll-post-answer-" . $ans_no . "' onclick='$(\"#ajaxpoll-ajax-" . $id . "\").html(\"" . wfMsg( 'ajaxpoll-vote-permission' ) . "\");$(\"#ajaxpoll-ajax-" . $id . "\").css(\"display\",\"block\");'><input disabled='disabled' type='radio' id='ajaxpoll-post-answer-" . $ans_no . "' name='ajaxpoll-post-answer-" . $ans_no . "' value='" . $i . "'/>" . strip_tags( $lines[$i] ) . |
390 | | -"</label></div><div class='ajaxpoll-answer-vote" . ( $our ? ' ajaxpoll-our-vote' : '' ) ."' onmouseover='mover(this)' onmouseout='mout(this);'><span title='" . wfMsg( 'ajaxpoll-percent-votes', sprintf( $percent ) ) . "'>" . ( ( isset( $poll_result ) && !empty( $poll_result[$i + 1] ) ) ? $poll_result[$i + 1] : 0 ) . "</span><div style='width: " . $percent . "%;" . ( $percent == 0 ? ' border:0;' : '' ) . "'></div></div> |
| 372 | +<div id='ajaxpoll-answer-" . $id . "' class='ajaxpoll-answer'><div class='ajaxpoll-answer-name'><label for='ajaxpoll-post-answer-" . $id . "' onclick='$(\"#ajaxpoll-ajax-" . $id . "\").html(\"" . wfMsg( 'ajaxpoll-vote-permission' ) . "\");$(\"#ajaxpoll-ajax-" . $id . "\").css(\"display\",\"block\");'><input disabled='disabled' type='radio' id='ajaxpoll-post-answer-" . $id . "' name='ajaxpoll-post-answer-" . $id . "' value='" . $voteValue . "'/>" . strip_tags( $lines[$i] ) . |
| 373 | +"</label></div><div class='ajaxpoll-answer-vote" . ( $our ? ' ajaxpoll-our-vote' : '' ) ."'><span title='" . wfMsg( 'ajaxpoll-percent-votes', sprintf( $percent ) ) . "'>" . ( ( isset( $poll_result ) && !empty( $poll_result[$i + 1] ) ) ? $poll_result[$i + 1] : 0 ) . "</span><div style='width: " . $percent . "%;" . ( $percent == 0 ? ' border:0;' : '' ) . "'></div></div> |
391 | 374 | </div> |
392 | 375 | "; |
393 | 376 | } |
Index: trunk/extensions/AJAXPoll/AJAXPoll.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | * @author Jack Phoenix <jack@countervandalism.net> |
21 | 21 | * @author Thomas Gries |
22 | 22 | * @maintainer Thomas Gries |
23 | | - * @version 1.69 |
| 23 | + * @version 1.70 |
24 | 24 | * @link http://www.mediawiki.org/wiki/Extension:AJAX_Poll Documentation |
25 | 25 | */ |
26 | 26 | |
— | — | @@ -31,19 +31,35 @@ |
32 | 32 | $wgExtensionCredits['parserhook'][] = array( |
33 | 33 | 'path' => __FILE__, |
34 | 34 | 'name' => 'AJAX Poll', |
35 | | - 'version' => '1.69 20120313', |
| 35 | + 'version' => '1.70 20120313', |
36 | 36 | 'author' => array( 'Dariusz Siedlecki', 'Jack Phoenix', 'Thomas Gries' ), |
37 | 37 | 'descriptionmsg' => 'ajaxpoll-desc', |
38 | 38 | 'url' => 'https://www.mediawiki.org/wiki/Extension:AJAX_Poll', |
39 | 39 | ); |
40 | 40 | |
41 | 41 | // Internationalization + AJAX function |
42 | | -$dir = dirname( __FILE__ ) . '/'; |
43 | | -$wgExtensionMessagesFiles['AJAXPoll'] = $dir . 'AJAXPoll.i18n.php'; |
44 | | -$wgAutoloadClasses['AJAXPoll'] = $dir . 'AJAXPoll_body.php'; |
| 42 | +$dir = dirname( __FILE__ ); |
| 43 | +$wgExtensionMessagesFiles['AJAXPoll'] = $dir . '/AJAXPoll.i18n.php'; |
| 44 | +$wgAutoloadClasses['AJAXPoll'] = $dir . '/AJAXPoll_body.php'; |
45 | 45 | $wgAjaxExportList[] = 'AJAXPoll::submitVote'; |
46 | 46 | $wgHooks['ParserFirstCallInit'][] = 'AJAXPoll::AJAXPollParserInit'; |
47 | 47 | |
| 48 | +$myResourceTemplate = array( |
| 49 | + 'localBasePath' => dirname( __FILE__ ) . "/resources", |
| 50 | + 'remoteExtPath' => 'AJAXPoll/resources', |
| 51 | + 'group' => 'ext.ajaxpoll', |
| 52 | +); |
| 53 | +$wgResourceModules['ext.ajaxpoll'] = $myResourceTemplate + array( |
| 54 | + 'scripts' => array( |
| 55 | + 'ajaxpoll.js', |
| 56 | + ), |
| 57 | + 'styles' => array( |
| 58 | + 'ajaxpoll.css', |
| 59 | + ), |
| 60 | + 'dependencies' => array( |
| 61 | + ) |
| 62 | +); |
| 63 | + |
48 | 64 | # new user rights |
49 | 65 | $wgAvailableRights[] = 'ajaxpoll-vote'; |
50 | 66 | |