pagination
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -73,7 +73,3 @@ (function(module) { | ||
for( keys = Object.keys(options), i = 0, len = keys.length; i < len; i++) { | ||
try { | ||
this.set(keys[i], options[keys[i]]); | ||
} catch(e) { | ||
} | ||
this.set(keys[i], options[keys[i]]); | ||
} | ||
@@ -203,7 +199,5 @@ this._result = null; | ||
SearchPaginator.prototype.render = function() { | ||
var i, len, className; | ||
var i, len, className, prelink; | ||
var result = this.getPaginationData(); | ||
var prelink = this.preparePreLink(result.prelink); | ||
var html = ''; | ||
html += '<div class="paginator">'; | ||
var html = '<div class="paginator">'; | ||
@@ -214,2 +208,5 @@ if(result.pageCount < 2) { | ||
} | ||
prelink = this.preparePreLink(result.prelink); | ||
if(result.previous) { | ||
@@ -264,4 +261,3 @@ html += '<a href="' + prelink + 'page=' + result.previous + '" class="paginator-previous">' + this.options.translator('PREVIOUS') + '</a>'; | ||
var prelink = this.preparePreLink(result.prelink); | ||
var html = ''; | ||
html += '<div class="paginator">'; | ||
var html = '<div class="paginator">'; | ||
html += '<span class="paginator-current-report">'; | ||
@@ -268,0 +264,0 @@ html += this.renderCurrentPageReport(result.fromResult, result.toResult, result.totalResult); |
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"scripts": { | ||
@@ -17,0 +17,0 @@ "test": "vows --spec tests/*" |
@@ -114,4 +114,6 @@ var assert = require('assert'); | ||
assert.equal('<div class="paginator"><span class="paginator-current-report">Results 41 - 50 of 100</span><a href="/?page=1" class="paginator-first">First</a><a href="/?page=4" class="paginator-previous">Previous</a><a href="/?page=6" class="paginator-next">Next</a><a href="/?page=10" class="paginator-last">Last</a></div>', enItem.render()); | ||
// testing if they affect each other on the translations | ||
assert.equal('<div class="paginator"><span class="paginator-current-report">Resulten 41 - 50 van 100</span><a href="/?page=1" class="paginator-first">Eerst</a><a href="/?page=4" class="paginator-previous">Voorgaand</a><a href="/?page=6" class="paginator-next">Volgende</a><a href="/?page=10" class="paginator-last">Laatste</a></div>', item.render()); | ||
assert.equal('<div class="paginator"><span class="paginator-current-report">Results 41 - 50 of 100</span><a href="/?page=1" class="paginator-first">First</a><a href="/?page=4" class="paginator-previous">Previous</a><a href="/?page=6" class="paginator-next">Next</a><a href="/?page=10" class="paginator-last">Last</a></div>', enItem.render()); | ||
} | ||
}).export(module) |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
29004
0
2