Index: trunk/extensions/PageTriage/SpecialPageTriage.php |
— | — | @@ -215,13 +215,6 @@ |
216 | 216 | <span class="mwe-pt-control-label-right"><b><%= gM( 'pagetriage-viewing' ) %></b> Sort Controls</span> |
217 | 217 | </script> |
218 | 218 | |
219 | | - <!-- load more link template --> |
220 | | - <script type="text/template" id="listMoreLinkTemplate"> |
221 | | - <div id="mwe-pt-list-more"> |
222 | | - <a href="#" style="display: none;"> <%= gM( 'pagetriage-more' ) %> </a> |
223 | | - </div> |
224 | | - </script> |
225 | | - |
226 | 219 | <!-- bottom nav template --> |
227 | 220 | <script type="text/template" id="listStatsNavTemplate"> |
228 | 221 | <div id="mwe-pt-top-triager"> |
Index: trunk/extensions/PageTriage/modules/ext.pageTriage.views/ext.pageTriage.listView.js |
— | — | @@ -37,8 +37,24 @@ |
38 | 38 | |
39 | 39 | var controlNav = new mw.pageTriage.ListControlNav( { eventBus: this.eventBus, model: articles } ); |
40 | 40 | controlNav.render(); |
| 41 | + |
| 42 | + // create the more link |
| 43 | + _this = this; |
| 44 | + $( '#mwe-pt-list-view' ).after( $( '<div id="mwe-pt-list-more"></div>' ) |
| 45 | + .append( $( '<a></a>' ).msg( 'pagetriage-more' ) |
| 46 | + .click( function() { |
| 47 | + _this.loadMore(); |
| 48 | + } ) |
| 49 | + ) |
| 50 | + ); |
41 | 51 | }, |
42 | 52 | |
| 53 | + loadMore: function() { |
| 54 | + var lastArticle = articles.last(1); |
| 55 | + articles.apiParams.offset = lastArticle[0].attributes.creation_date; |
| 56 | + articles.fetch( {add: true} ); |
| 57 | + }, |
| 58 | + |
43 | 59 | // add stats data to the navigation |
44 | 60 | addStats: function( stats ) { |
45 | 61 | var statsNav = new mw.pageTriage.ListStatsNav( { eventBus: this.eventBus, model: stats } ); |
— | — | @@ -53,11 +69,10 @@ |
54 | 70 | this.position = 0; |
55 | 71 | } |
56 | 72 | article.set( 'position', this.position++ ); |
57 | | - |
58 | 73 | // pass in the specific article instance |
59 | 74 | var view = new mw.pageTriage.ListItem( { eventBus: this.eventBus, model: article } ); |
60 | | - this.$( "#mwe-pt-list-view" ).append( view.render().el ); |
61 | | - this.$( ".mwe-pt-list-triage-button" ).button({ |
| 75 | + $( "#mwe-pt-list-view" ).append( view.render().el ); |
| 76 | + $( ".mwe-pt-list-triage-button" ).button({ |
62 | 77 | label: mw.msg( 'pagetriage-triage' ), |
63 | 78 | icons: { primary:'ui-icon-search' } |
64 | 79 | }); |
— | — | @@ -66,7 +81,7 @@ |
67 | 82 | // add all the items in the articles collection |
68 | 83 | addAll: function() { |
69 | 84 | $("#mwe-pt-list-view").empty(); // remove the spinner before displaying. |
70 | | - articles.each( this.addOne ); |
| 85 | + articles.forEach( this.addOne, this ); |
71 | 86 | this.eventBus.trigger( 'listAddAll' ); |
72 | 87 | } |
73 | 88 | |
Index: trunk/extensions/PageTriage/modules/ext.pageTriage.views/ext.pageTriage.listStatsNav.css |
— | — | @@ -1,5 +1,4 @@ |
2 | 2 | #mwe-pt-list-stats-nav { |
3 | | - border-top: none; |
4 | 3 | } |
5 | 4 | |
6 | 5 | .stickyBottom #mwe-pt-list-stats-nav { |
Index: trunk/extensions/PageTriage/modules/ext.pageTriage.models/ext.pageTriage.article.js |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | apiParams: { |
50 | 50 | namespace: 0, |
51 | 51 | limit: 50, |
52 | | - dir: 'oldestfirst', |
| 52 | + dir: 'newestfirst', |
53 | 53 | /* |
54 | 54 | showbots: null, |
55 | 55 | showredirs: null, |
Index: trunk/extensions/PageTriage/api/ApiPageTriageList.php |
— | — | @@ -148,7 +148,7 @@ |
149 | 149 | 'limit' => array( |
150 | 150 | ApiBase::PARAM_MAX => '200', |
151 | 151 | ApiBase::PARAM_DFLT => '20', |
152 | | - ApiBase::PARAM_MIN => '10', |
| 152 | + ApiBase::PARAM_MIN => '1', |
153 | 153 | ApiBase::PARAM_TYPE => 'integer', |
154 | 154 | ), |
155 | 155 | 'offset' => array( |