Skip to content

Commit

Permalink
[upgrade] Upgrade v2.3.0
Browse files Browse the repository at this point in the history
- add isCurrent to paginateJSON
  • Loading branch information
tinybeans committed May 2, 2017
1 parent f1ba750 commit b024b0d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
31 changes: 17 additions & 14 deletions flexibleSearch.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
* flexibleSearch.js
*
* Copyright (c) Tomohiro Okuwaki / bit part LLC (http://bit-part.net/)
*
* Since : 2010-11-12
* Version: 2.2.4
* Update : 2017-04-20
* Comment: Please use this with Movable Type :)
*
* You have to include "mustache.js" before "flexibleSearch.js".
* Maybe... jQuery 1.7.x later
*
*/
* flexibleSearch.js
*
* Copyright (c) Tomohiro Okuwaki / bit part LLC (http://bit-part.net/)
*
* Since : 2010-11-12
* Update : 2017-05-02
* Version: 2.3.0
* Comment: Please use this with Movable Type :)
*
* You have to include "mustache.js" before "flexibleSearch.js".
* Maybe... jQuery 1.7.x later
*
-*/

(function ($) {
$.fn.flexibleSearch = function (options) {
Expand Down Expand Up @@ -584,7 +584,7 @@

// Custom Sort
if (op.customSort !== null && typeof op.customSort === "function") {
cloneItems = op.customSort(cloneItems);
cloneItems = op.customSort(cloneItems, paramObj);
}

resultJSON.items = $.grep(cloneItems, function (item, i) {
Expand Down Expand Up @@ -670,6 +670,9 @@
return "";
}
},
isCurrent: function(){
return this.pageNumber === currentPage;
},
lastPage: function () {
return paginateJSON.page.length;
},
Expand Down
Loading

0 comments on commit b024b0d

Please sign in to comment.