mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-05-23 08:42:18 +02:00
Fixed bug in paging
This commit is contained in:
parent
26e6e01de6
commit
95ff4b6701
|
@ -153,7 +153,7 @@ export class Paging{
|
|||
this.tf = tf;
|
||||
}
|
||||
|
||||
buildUI{
|
||||
buildUI(){
|
||||
|
||||
var slcPages;
|
||||
var tf = this.tf;
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
define(["exports", "../dom", "../string"], function (exports, _dom, _string) {
|
||||
"use strict";
|
||||
|
||||
var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (staticProps) Object.defineProperties(child, staticProps);
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Dom = _dom.Dom;
|
||||
var Str = _string.Str;
|
||||
var HighlightKeyword = (function () {
|
||||
var HighlightKeyword = function HighlightKeyword(tf) {
|
||||
var HighlightKeyword =
|
||||
|
||||
/**
|
||||
* HighlightKeyword, highlight matched keyword
|
||||
* @param {Object} tf TableFilter instance
|
||||
*/
|
||||
function HighlightKeyword(tf) {
|
||||
var f = tf.fObj;
|
||||
//defines css class for highlighting
|
||||
this.highlightCssClass = f.highlight_css_class || "keyword";
|
||||
|
@ -18,10 +19,7 @@ define(["exports", "../dom", "../string"], function (exports, _dom, _string) {
|
|||
this.tf = tf;
|
||||
};
|
||||
|
||||
_classProps(HighlightKeyword, null, {
|
||||
highlight: {
|
||||
writable: true,
|
||||
value: function (node, word, cssClass) {
|
||||
HighlightKeyword.prototype.highlight = function (node, word, cssClass) {
|
||||
// Iterate into this nodes childNodes
|
||||
if (node.hasChildNodes) {
|
||||
var children = node.childNodes;
|
||||
|
@ -50,11 +48,9 @@ define(["exports", "../dom", "../string"], function (exports, _dom, _string) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
unhighlight: {
|
||||
writable: true,
|
||||
value: function (word, cssClass) {
|
||||
};
|
||||
|
||||
HighlightKeyword.prototype.unhighlight = function (word, cssClass) {
|
||||
var arrRemove = [];
|
||||
var highlightedNodes = this.highlightedNodes;
|
||||
for (var i = 0; i < highlightedNodes.length; i++) {
|
||||
|
@ -80,11 +76,9 @@ define(["exports", "../dom", "../string"], function (exports, _dom, _string) {
|
|||
for (var k = 0; k < arrRemove.length; k++) {
|
||||
highlightedNodes.splice(arrRemove[k], 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
unhighlightAll: {
|
||||
writable: true,
|
||||
value: function () {
|
||||
};
|
||||
|
||||
HighlightKeyword.prototype.unhighlightAll = function () {
|
||||
if (!this.tf.highlightKeywords || !this.tf.searchArgs) {
|
||||
return;
|
||||
}
|
||||
|
@ -92,9 +86,7 @@ define(["exports", "../dom", "../string"], function (exports, _dom, _string) {
|
|||
this.unhighlight(this.tf.searchArgs[y], this.highlightCssClass);
|
||||
}
|
||||
this.highlightedNodes = [];
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
return HighlightKeyword;
|
||||
})();
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue