http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99557

Revision: 99557
Author:   kaldari
Date:     2011-10-11 20:13:37 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
fixing sloppy js errors, follow-up to r99454 and r99549

Modified Paths:
--------------
    trunk/extensions/PageTriage/ext.pageTriage.core.js

Modified: trunk/extensions/PageTriage/ext.pageTriage.core.js
===================================================================
--- trunk/extensions/PageTriage/ext.pageTriage.core.js  2011-10-11 20:11:49 UTC 
(rev 99556)
+++ trunk/extensions/PageTriage/ext.pageTriage.core.js  2011-10-11 20:13:37 UTC 
(rev 99557)
@@ -1,29 +1,38 @@
 ( function( $ ) { 
 
-var    $currentArticle = null, // the title of the current article being 
reviewed
+var    $currentArticle = null; // the title of the current article being 
reviewed
        
 $.pageTriage = {
        tagArticle: function() {
+               var tagsToApply = new Array;
+               $.each( $( '#ptr-checkboxes input:checkbox' ), function( index, 
value ) {
+                       if ( $( this ).is( ':checked' ) ) {
+                               // Add it to the list
+                       }
+               } );
+               
                var sendData = {
                        'action': 'edit',
                        'title': $currentArticle,
                        'text' : $newText,
                        'token': $token,
-                       'summary': 'Triaging the page,
-                       'notminor': true,
+                       'summary': 'Triaging the page',
+                       'notminor': true
                };
 
                $.ajax( {
-                       url: mw.config.get( 'wgScriptPath' ) + '/api.php',
+                       url: mw.util.wikiScript( 'api' ),
                        data: sendData,
                        dataType: 'json',
-                       type: 'POST',
+                       type: 'POST'
                } );
        },
 
-       loadArticle: function() {
+       loadPage: function() {
+               $( '#ptr-stuff' ).append( "Article goes here!" );
                // Load in an article
        }
+};
 
-       $( document ).ready( $.pageTriage.loadArticle );
-}
+$( document ).ready( $.pageTriage.loadPage );
+} ) ( jQuery );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to