pagination
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -5,3 +5,3 @@ (function(module) { | ||
/* Check if clientside or serverside */ | ||
if( typeof module == "undefined") { | ||
if( typeof module === 'undefined') { | ||
window.pagination = {}; | ||
@@ -22,3 +22,3 @@ module = { | ||
subc.superclass = superc.prototype; | ||
if(superc.prototype.constructor == Object.prototype.constructor) { | ||
if(superc.prototype.constructor === Object.prototype.constructor) { | ||
superc.prototype.constructor = superc; | ||
@@ -97,3 +97,3 @@ } | ||
var startPage, endPage, pageCount; | ||
var oldPageLinks = (pageLinks % 2 == 0) ? 1 : 0, i, half; | ||
var oldPageLinks = (pageLinks % 2 === 0) ? 1 : 0, i, half; | ||
var result = { | ||
@@ -163,3 +163,3 @@ prelink : this.options.prelink, | ||
result.fromResult = (current - 1) * rowsPerPage + 1; | ||
if(current == pageCount) { | ||
if(current === pageCount) { | ||
result.toResult = totalResult; | ||
@@ -180,3 +180,3 @@ } else { | ||
if (this.options.slashSeparator) { | ||
if (prelink[prelink.length - 1] != '/') { | ||
if (prelink[prelink.length - 1] !== '/') { | ||
prelink += '/'; | ||
@@ -186,4 +186,4 @@ } | ||
} | ||
if(prelink.indexOf('?') != -1) { | ||
if(prelink[prelink.length - 1] != '?' && prelink[prelink.length - 1] != '&') { | ||
if(prelink.indexOf('?') !== -1) { | ||
if(prelink[prelink.length - 1] !== '?' && prelink[prelink.length - 1] !== '&') { | ||
prelink += '&'; | ||
@@ -231,8 +231,8 @@ } | ||
if(result.range[i] == result.current) { | ||
if(result.range[i] === result.current) { | ||
className = 'paginator-current'; | ||
} | ||
if(i == 0) { | ||
if(i === 0) { | ||
className += ' paginator-page-first'; | ||
} else if(i == len - 1) { | ||
} else if(i === len - 1) { | ||
className += ' paginator-page-last'; | ||
@@ -239,0 +239,0 @@ } |
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"scripts": { | ||
@@ -17,0 +17,0 @@ "test": "vows --spec tests/*" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31700