File tree 2 files changed +1
-17
lines changed
2 files changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -92,14 +92,6 @@ describe('Pagination', function() {
92
92
expect ( $ ( pagination . find ( 'li' ) . get ( 2 ) ) . hasClass ( 'active' ) ) . toEqual ( false ) ;
93
93
expect ( $ ( pagination . find ( 'li' ) . get ( 3 ) ) . hasClass ( 'active' ) ) . toEqual ( true ) ;
94
94
} ) ;
95
-
96
- it ( 'should handle page = 0' , function ( ) {
97
- expect ( pagination . is ( ':visible' ) ) . toBe ( true ) ;
98
- list . show ( 0 , 0 ) ;
99
- expect ( pagination . is ( ':visible' ) ) . toBe ( false ) ;
100
- list . show ( 1 , 1 ) ;
101
- expect ( pagination . is ( ':visible' ) ) . toBe ( true ) ;
102
- } ) ;
103
95
} ) ;
104
96
105
97
Original file line number Diff line number Diff line change @@ -3,17 +3,8 @@ var classes = require('./utils/classes'),
3
3
List = require ( './index' ) ;
4
4
5
5
module . exports = function ( list ) {
6
- var isHidden = false ;
7
6
8
7
var refresh = function ( pagingList , options ) {
9
- if ( list . page < 1 ) {
10
- list . listContainer . style . display = 'none' ;
11
- isHidden = true ;
12
- return ;
13
- } else if ( isHidden ) {
14
- list . listContainer . style . display = 'block' ;
15
- }
16
-
17
8
var item ,
18
9
l = list . matchingItems . length ,
19
10
index = list . i ,
@@ -25,6 +16,7 @@ module.exports = function(list) {
25
16
right = options . right || options . outerWindow || 0 ;
26
17
27
18
right = pages - right ;
19
+
28
20
pagingList . clear ( ) ;
29
21
for ( var i = 1 ; i <= pages ; i ++ ) {
30
22
var className = ( currentPage === i ) ? "active" : "" ;
You can’t perform that action at this time.
0 commit comments