Index: trunk/extensions/PageTriage/SpecialPageTriage.php |
— | — | @@ -176,7 +176,14 @@ |
177 | 177 | <span class="mwe-pt-control-label"><b><%= gM( 'pagetriage-filter-namespace-heading' ) %></b></span> |
178 | 178 | <div class="mwe-pt-control-options"> |
179 | 179 | <select id="mwe-pt-filter-namespace"> |
180 | | - <option>(namespaces)</option> |
| 180 | + <% |
| 181 | + var wgFormattedNamespaces = mw.config.get( 'wgFormattedNamespaces' ); |
| 182 | + var nsOptions = ''; |
| 183 | + for ( var key in wgFormattedNamespaces ) { |
| 184 | + nsOptions += String('<option value=' + String(key) + '>' + wgFormattedNamespaces[key] + '</option>'); |
| 185 | + } |
| 186 | + print(nsOptions); |
| 187 | + %> |
181 | 188 | </select> |
182 | 189 | </div> |
183 | 190 | <span class="mwe-pt-control-label"><b><%= gM( 'pagetriage-filter-user-heading' ) %></b></span> |
— | — | @@ -202,7 +209,7 @@ |
203 | 210 | </script> |
204 | 211 | |
205 | 212 | <script type="text/template" id="listStatsNavTemplate"> |
206 | | - <% if ( ptrAverage ) { %> <%= gM( 'pagetriage-stats-untriaged-age', ptrAverage, ptrOldest ) %> <% } %> |
| 213 | + stats navbar |
207 | 214 | </script> |
208 | 215 | |
209 | 216 | HTML; |
Index: trunk/extensions/PageTriage/modules/ext.pageTriage.views/ext.pageTriage.listControlNav.js |
— | — | @@ -40,15 +40,13 @@ |
41 | 41 | // render and return the template. fill with the current model. |
42 | 42 | $( "#mwe-pt-list-control-nav").html( this.template( this.model.toJSON() ) ); |
43 | 43 | |
| 44 | + // now that the template's been inserted, set up some events for controlling it |
| 45 | + |
44 | 46 | // make a button |
45 | 47 | $( ".mwe-pt-filter-set-button" ).button( { |
46 | 48 | label: mw.msg( 'pagetriage-filter-set-button' ) + ' ▸' |
47 | 49 | }); |
48 | 50 | |
49 | | - |
50 | | - |
51 | | - // now that the template's been inserted, set up some events for controlling it |
52 | | - |
53 | 51 | // the filter dropdown menu control |
54 | 52 | $( '#mwe-pt-filter-dropdown-control' ).click( function( e ) { |
55 | 53 | // close the meny when the user clicks away |
Index: trunk/extensions/PageTriage/modules/ext.pageTriage.models/ext.pageTriage.article.js |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | } else { |
26 | 26 | article.set( 'user_creation_date_pretty', ''); |
27 | 27 | } |
28 | | - |
| 28 | + |
29 | 29 | var userName = article.get( 'user_name' ); |
30 | 30 | if( userName ) { |
31 | 31 | article.set( 'user_title', new mw.Title( userName, mw.config.get('wgNamespaceIds')['user'] ) ); |
— | — | @@ -41,7 +41,30 @@ |
42 | 42 | // object created therein. |
43 | 43 | mw.pageTriage.ArticleList = Backbone.Collection.extend( { |
44 | 44 | model: mw.pageTriage.Article, |
45 | | - url: mw.util.wikiScript( 'api' ) + '?action=pagetriagelist&format=json', |
| 45 | + |
| 46 | + apiParams: { |
| 47 | + namespace: 0, |
| 48 | + /* |
| 49 | + showbots: null, |
| 50 | + showredirs: null, |
| 51 | + showtriaged: null, |
| 52 | + limit: 10, |
| 53 | + namespace: 0, |
| 54 | + no_category: 1, |
| 55 | + no_inbound_links: 1, |
| 56 | + non_autoconfirmed_users: 1, |
| 57 | + blocked_users: 1, |
| 58 | + */ |
| 59 | + }, |
| 60 | + |
| 61 | + url: function() { |
| 62 | + var paramString = ''; |
| 63 | + for ( var key in this.apiParams ) { |
| 64 | + paramString += '&' + key + '=' + this.apiParams[key]; |
| 65 | + } |
| 66 | + var url = mw.util.wikiScript( 'api' ) + '?action=pagetriagelist&format=json' + paramString; |
| 67 | + return url; |
| 68 | + }, |
46 | 69 | |
47 | 70 | parse: function( response ) { |
48 | 71 | // extract the useful bits of json. |