Index: trunk/extensions/Push/includes/Push_Tab.php |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | |
81 | 81 | efPushAddJSLocalisation(); |
82 | 82 | |
83 | | - // TODO: jquery |
| 83 | + $wgOut->includeJQuery(); |
84 | 84 | |
85 | 85 | $wgOut->addHeadItem( |
86 | 86 | 'ext.push.tab', |
Index: trunk/extensions/Push/includes/ext.push.tab.js |
— | — | @@ -5,9 +5,17 @@ |
6 | 6 | * @author Jeroen De Dauw <jeroendedauw at gmail dot com> |
7 | 7 | */ |
8 | 8 | |
9 | | -$( document ).ready( function() { |
| 9 | +(function($) { $( document ).ready( function() { |
10 | 10 | |
11 | | - // TODO: message b/c |
| 11 | + // Compatibility with pre-RL code. |
| 12 | + // Messages will have been loaded into wgPushMessages. |
| 13 | + if ( typeof mediaWiki === 'undefined' ) { |
| 14 | + mediaWiki = new Object(); |
| 15 | + |
| 16 | + mediaWiki.msg = function( message ) { |
| 17 | + return window.wgPushMessages[message]; |
| 18 | + } |
| 19 | + } |
12 | 20 | |
13 | 21 | $('.push-button').click(function() { |
14 | 22 | this.disabled = true; |
— | — | @@ -100,4 +108,4 @@ |
101 | 109 | sender.innerHTML = mediaWiki.msg( 'push-button-failed' ); |
102 | 110 | } |
103 | 111 | |
104 | | -} ); |
| 112 | +} ); })(jQuery); |
\ No newline at end of file |