Skip to content

Commit

Permalink
Merge branch 'hotfix/1.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelthq committed Nov 4, 2015
2 parents ffaf90b + f47c8c7 commit a0ceda4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "twbs-pagination",
"version": "1.3",
"version": "1.3.1",
"homepage": "https://github.com/esimakin/twbs-pagination",
"authors": [
"Eugene Simakin <[email protected]>"
Expand Down
14 changes: 7 additions & 7 deletions jquery.twbsPagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,31 +99,31 @@
},

buildListItems: function (pages) {
var $listItems = $();
var listItems = [];

if (this.options.first) {
$listItems = $listItems.add(this.buildItem('first', 1));
listItems.push(this.buildItem('first', 1));
}

if (this.options.prev) {
var prev = pages.currentPage > 1 ? pages.currentPage - 1 : this.options.loop ? this.options.totalPages : 1;
$listItems = $listItems.add(this.buildItem('prev', prev));
listItems.push(this.buildItem('prev', prev));
}

for (var i = 0; i < pages.numeric.length; i++) {
$listItems = $listItems.add(this.buildItem('page', pages.numeric[i]));
listItems.push(this.buildItem('page', pages.numeric[i]));
}

if (this.options.next) {
var next = pages.currentPage < this.options.totalPages ? pages.currentPage + 1 : this.options.loop ? 1 : this.options.totalPages;
$listItems = $listItems.add(this.buildItem('next', next));
listItems.push(this.buildItem('next', next));
}

if (this.options.last) {
$listItems = $listItems.add(this.buildItem('last', this.options.totalPages));
listItems.push(this.buildItem('last', this.options.totalPages));
}

return $listItems;
return listItems;
},

buildItem: function (type, page) {
Expand Down
4 changes: 2 additions & 2 deletions jquery.twbsPagination.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "twbs-pagination",
"nativeName": "jQuery Bootstrap Pagination",
"version": "1.3",
"version": "1.3.1",
"homepage": "https://github.com/esimakin/twbs-pagination",
"author": "Eugene Simakin <[email protected]>",
"description": "jQuery simple pagination plugin for bootstrap-style webpages",
Expand Down
2 changes: 1 addition & 1 deletion twbs-pagination.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "twbs-pagination",
"version": "1.3",
"version": "1.3.1",
"title": "jQuery Bootstrap Pagination",
"author": {
"name": "Eugene Simakin",
Expand Down

0 comments on commit a0ceda4

Please sign in to comment.