Nagarjunatelaprolu / jquery-jtps

Automatically exported from code.google.com/p/jquery-jtps
0 stars 0 forks source link

When first page is selected, cannot select page 2 #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Copy demo code to new file and save as html file
2. Display in browser
3. Pagination selectors displays 1 .. .. 9

What is the expected output? What do you see instead?
   The ability to at least be able to select page 2.

What version of the product are you using? On what operating system?
   Using latest version available on 7/31/2014.  Using Latest version of Firefox on Win8.1.

Please provide any additional information below.
    Made following change in drawPageSelectors function:

var lt = ( ( page > ( pageCount - 4 ) ) ? ( pageCount - 5 ) : ( page - 2 ) );
if (lt < 0)
    lt = 0;
var gt = ( ( page < 4 ) ? 4 : page );

$('.pageSelector:lt(' + lt + '):not(:first)', this).addClass('hidePageSelector')
     .eq(0).after( '<div class="pageSelectorSeperator">' + $(target).data('tableSettings').perPageSeperator + '</div>' );
$('.pageSelector:gt(' + gt + '):not(:last)', this).addClass('hidePageSelector')
     .eq(0).after( '<div class="pageSelectorSeperator">' + $(target).data('tableSettings').perPageSeperator + '</div>' );
$('.pageSelector:eq(' + ( page - 1 ) + ')', 
this).addClass('hilightPageSelector');

Original issue reported on code.google.com by rlinh...@gmail.com on 31 Jul 2014 at 1:03