Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

Commit

Permalink
v1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobius1 committed Mar 27, 2017
1 parent 751497c commit c1fb0c2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vanilla-datatables",
"version": "1.0.5",
"version": "1.0.6",
"ignore": [
".gitattributes",
"README.md"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vanilla-datatables",
"version": "1.0.5",
"version": "1.0.6",
"description": "A lightweight, dependency-free javascript HTML table plugin.",
"main": "vanilla-dataTables.min.js",
"scripts": {
Expand Down
19 changes: 13 additions & 6 deletions vanilla-dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (c) 2015-2017 Karl Saunders (http://mobiuswebdesign.co.uk)
* Licensed under MIT (http://www.opensource.org/licenses/mit-license.php)
*
* Version: 1.0.5
* Version: 1.0.6
*
*/
(function(root, factory) {
Expand All @@ -27,7 +27,7 @@
var p;
for (p in props) {
if (props.hasOwnProperty(p)) {
if ( typeof src[p] === "object") {
if ("[object Object]" === Object.prototype.toString.call(src[p])) {
util.extend(src[p], props[p]);
} else {
src[p] = props[p];
Expand Down Expand Up @@ -421,9 +421,16 @@
items = !!_.searching ? _.searchData.length : _.rows.length;
}

var string = _.options.labels.info.replace("{page}", f).replace("{current}", t).replace("{pages}", items);
if ( _.options.labels.info.length ) {

_.label.innerHTML = items ? string : "";
var string = _.options.labels.info.replace("{start}", f)
.replace("{end}", t)
.replace("{page}", _.currentPage)
.replace("{pages}", _.totalPages)
.replace("{rows}", items);

_.label.innerHTML = items ? string : "";
}

if (_.options.fixedHeight && _.currentPage == 1) {
fixHeight.call(_);
Expand Down Expand Up @@ -675,8 +682,8 @@
labels: {
placeholder: "Search...", // The search input placeholder
perPage: "{select} entries per page", // per-page dropdown label
noRows: "No entries to found", // Message shown when there are no search results
info: "Showing {page} to {current} of {pages} entries", //
noRows: "No entries found", // Message shown when there are no search results
info: "Showing {start} to {end} of {rows} entries", //
}
};

Expand Down
Loading

0 comments on commit c1fb0c2

Please sign in to comment.