Bug 3750 - Numeric page bar missing links
: Numeric page bar missing links
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 6.5b1
: PC Windows XP
: P2 minor (vote)
: ---
Assigned To: KDF
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-13 16:41 UTC by Jim McAtee
Modified: 2008-09-15 14:39 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
Screen cap (60.88 KB, image/pjpeg)
2006-07-13 16:42 UTC, Jim McAtee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim McAtee 2006-07-13 16:41:06 UTC
r8418, Default skin.  The numeric links on either end of the numeric page bar look like they're being covered up by the first/prev/netx/last buttons.  When on page 1, the last page number isn't visible.  When on one of the 'middle' pages, the first several page links aren't visible.  Maybe not noticed by anyone else, but I have my new music set at 10,000 so that all albums appear in the list.

Also, when you're on one of the middle pages the 'Last' button doesn't appear.
Comment 1 Jim McAtee 2006-07-13 16:42:19 UTC
Created attachment 1342 [details]
Screen cap
Comment 2 Andy Grundman 2006-07-13 17:54:44 UTC
Isn't that how it's supposed to be?  Can't show unlimited pages, so it shows a certain number on each side of the current page.
Comment 3 Jim McAtee 2006-07-14 09:05:12 UTC
> Isn't that how it's supposed to be?  Can't show unlimited pages, so it shows a
> certain number on each side of the current page.

Chris, I think you may be right.  Looking at it some more I think that's what is being done, just that the logic is a little off, so it didn't make sense to me.  Looks like the 'First' and 'Last' buttons only appear when the link to the first or last page isn't displayed.  The bit of logic that's off is in the number of page links that are displayed.  With my 16 pages, I see links for pages 1-15 when I'm on pages 1 to 8, on page 9 I get links for 2-16, 10 is 3-16, 11 is 4-16, 12 is 5-16, 13 is 6-16, 14 is 7-16, 15 is 8-16, 16 is 9-16.  I'm guessing the number of links is supposed to be kept constant, probably at 15.

Comment 4 KDF 2006-07-14 11:03:49 UTC
Default sets pagesperbar at 15.  However, the starting page is only set at pagesperbar/2.  There is no check for where the last page occurs.  I'm testing a possible fix.

adding this line, after line 188 of EN/hreftemplate should solve things:
IF (pagebarstart + pagesperbar) > pageinfo.totalpages; pagebarstart = pageinfo.totalpages - pagesperbar; END;

This checks if the pages displayed will stop before the proper count, and backtracks enough to cover the difference.
Give that a test, it seems to work for me.  I'll commit tonight, unless andy doesn't want to wait :)
Comment 5 Andy Grundman 2006-07-14 11:05:50 UTC
Thanks, go for it.  You know more about that code than I do. :)
Comment 6 Chris Owens 2006-07-14 12:35:00 UTC
That was Andy, not me.  :)
Comment 7 KDF 2006-07-14 17:09:47 UTC
fixxed in change 8448