Index: trunk/extensions/PageTriage/ext.pageTriage.core.js |
— | — | @@ -1,29 +1,38 @@ |
2 | 2 | ( function( $ ) { |
3 | 3 | |
4 | | -var $currentArticle = null, // the title of the current article being reviewed |
| 4 | +var $currentArticle = null; // the title of the current article being reviewed |
5 | 5 | |
6 | 6 | $.pageTriage = { |
7 | 7 | tagArticle: function() { |
| 8 | + var tagsToApply = new Array; |
| 9 | + $.each( $( '#ptr-checkboxes input:checkbox' ), function( index, value ) { |
| 10 | + if ( $( this ).is( ':checked' ) ) { |
| 11 | + // Add it to the list |
| 12 | + } |
| 13 | + } ); |
| 14 | + |
8 | 15 | var sendData = { |
9 | 16 | 'action': 'edit', |
10 | 17 | 'title': $currentArticle, |
11 | 18 | 'text' : $newText, |
12 | 19 | 'token': $token, |
13 | | - 'summary': 'Triaging the page, |
14 | | - 'notminor': true, |
| 20 | + 'summary': 'Triaging the page', |
| 21 | + 'notminor': true |
15 | 22 | }; |
16 | 23 | |
17 | 24 | $.ajax( { |
18 | | - url: mw.config.get( 'wgScriptPath' ) + '/api.php', |
| 25 | + url: mw.util.wikiScript( 'api' ), |
19 | 26 | data: sendData, |
20 | 27 | dataType: 'json', |
21 | | - type: 'POST', |
| 28 | + type: 'POST' |
22 | 29 | } ); |
23 | 30 | }, |
24 | 31 | |
25 | | - loadArticle: function() { |
| 32 | + loadPage: function() { |
| 33 | + $( '#ptr-stuff' ).append( "Article goes here!" ); |
26 | 34 | // Load in an article |
27 | 35 | } |
| 36 | +}; |
28 | 37 | |
29 | | - $( document ).ready( $.pageTriage.loadArticle ); |
30 | | -} |
| 38 | +$( document ).ready( $.pageTriage.loadPage ); |
| 39 | +} ) ( jQuery ); |