r99557 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99556‎ | r99557 | r99558 >
Date:20:13, 11 October 2011
Author:kaldari
Status:deferred
Tags:
Comment:
fixing sloppy js errors, follow-up to r99454 and r99549
Modified paths:
  • /trunk/extensions/PageTriage/ext.pageTriage.core.js (modified) (history)

Diff [purge]

Index: trunk/extensions/PageTriage/ext.pageTriage.core.js
@@ -1,29 +1,38 @@
22 ( function( $ ) {
33
4 -var $currentArticle = null, // the title of the current article being reviewed
 4+var $currentArticle = null; // the title of the current article being reviewed
55
66 $.pageTriage = {
77 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+
815 var sendData = {
916 'action': 'edit',
1017 'title': $currentArticle,
1118 'text' : $newText,
1219 'token': $token,
13 - 'summary': 'Triaging the page,
14 - 'notminor': true,
 20+ 'summary': 'Triaging the page',
 21+ 'notminor': true
1522 };
1623
1724 $.ajax( {
18 - url: mw.config.get( 'wgScriptPath' ) + '/api.php',
 25+ url: mw.util.wikiScript( 'api' ),
1926 data: sendData,
2027 dataType: 'json',
21 - type: 'POST',
 28+ type: 'POST'
2229 } );
2330 },
2431
25 - loadArticle: function() {
 32+ loadPage: function() {
 33+ $( '#ptr-stuff' ).append( "Article goes here!" );
2634 // Load in an article
2735 }
 36+};
2837
29 - $( document ).ready( $.pageTriage.loadArticle );
30 -}
 38+$( document ).ready( $.pageTriage.loadPage );
 39+} ) ( jQuery );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99454adding the javascript to PageTriagekaldari00:46, 11 October 2011
r99549registering resource module, etc.kaldari19:58, 11 October 2011

Status & tagging log