Skip to content

Commit

Permalink
Item14295: fixed counting items in a list
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jan 23, 2017
1 parent 85561c6 commit 6564b9c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
8 changes: 5 additions & 3 deletions data/System/JQSerialPagerContrib.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1342039693" format="1.1" reprev="2" version="2"}%
%META:TOPICINFO{author="ProjectContributor" date="1485185041" format="1.1" version="1"}%
---+!! %TOPIC%
%FORMFIELD{"Description"}%

Expand Down Expand Up @@ -93,14 +93,16 @@ register the serial pager widget to Foswiki.
%$DEPENDENCIES%

---++ Change History
%TABLE{columnwidths="7em" tablewidth="100%"}%
| 23 Jan 2017: | fixed counting items in a list |
| 01 Nov 2016: | added filter feature to search in large lists |
| 02 Sep 2016: | fixed calculation of width of lists items in pager |
| 11 Jul 2012: | initial release |

%META:FILEATTACHMENT{name="JQSerialPagerContribSnap1.png" attachment="JQSerialPagerContribSnap1.png" attr="" comment="" date="1342038356" size="13939" user="ProjectContributor" version="1"}%
%META:FILEATTACHMENT{name="JQSerialPagerContribSnap1.png" attachment="JQSerialPagerContribSnap1.png" attr="" comment="" date="1485185041" size="13939" user="ProjectContributor" version="1"}%
%META:FORM{name="PackageForm"}%
%META:FIELD{name="Author" title="Author" value="Michael Daum"}%
%META:FIELD{name="Copyright" title="Copyright" value="© 2012-2016 Michael Daum http://michaeldaumconsulting.com"}%
%META:FIELD{name="Copyright" title="Copyright" value="© 2012-2017 Michael Daum http://michaeldaumconsulting.com"}%
%META:FIELD{name="Description" title="Description" value="%25$SHORTDESCRIPTION%25"}%
%META:FIELD{name="Home" title="Home" value="Foswiki:Extensions/%TOPIC%"}%
%META:FIELD{name="License" title="License" value="[[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]]"}%
Expand Down
6 changes: 3 additions & 3 deletions lib/Foswiki/Contrib/JQSerialPagerContrib.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# JQSerialPagerContrib is Copyright (C) 2012-2016 Michael Daum http://michaeldaumconsulting.com
# JQSerialPagerContrib is Copyright (C) 2012-2017 Michael Daum http://michaeldaumconsulting.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -18,8 +18,8 @@ package Foswiki::Contrib::JQSerialPagerContrib;
use strict;
use warnings;

our $VERSION = '2.00';
our $RELEASE = '01 Dec 2016';
our $VERSION = '2.01';
our $RELEASE = '23 Jan 2017';
our $SHORTDESCRIPTION = 'Splits up a list and makes it a pager scroller thingy';
our $NO_PREFS_IN_TOPIC = 1;

Expand Down
4 changes: 2 additions & 2 deletions lib/Foswiki/Contrib/JQSerialPagerContrib/Core.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# JQSerialPagerContrib is Copyright (C) 2012-2016 Michael Daum http://michaeldaumconsulting.com
# JQSerialPagerContrib is Copyright (C) 2012-2017 Michael Daum http://michaeldaumconsulting.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -27,7 +27,7 @@ sub new {
my $this = bless(
$class->SUPER::new(
name => 'SerialPager',
version => '2.00',
version => '2.01',
author => 'Michael Daum',
homepage => 'http://foswiki.org/Extensions/JQSerialPagerContrib',
documentation => 'JQSerialPagerContrib',
Expand Down
Expand Up @@ -96,7 +96,7 @@
if(self.opts.counter) {
$counter = $("<div class='jqSerialPagerCounter'>1/"+nrPages+"</div>").appendTo(self.buttons);
}

// init the serial scroll
self.elem.serialScroll({
items:'.jqSerialPagerPage',
Expand All @@ -110,11 +110,10 @@
lock:false,
easing:self.opts.easing,
onBefore:function(e, elem, $pane, items, pos) {
var cycle = $pane.data("cycle");
if (typeof($counter) !== 'undefined') {
if (self.opts.counter) {
$counter.html((pos+1)+"/"+nrPages);
}
if (!cycle) {
if (!self.opts.cycle) {
if (pos === 0) {
$prev.css("visibility", "hidden");
} else {
Expand Down

0 comments on commit 6564b9c

Please sign in to comment.