Pager: Fix filtered regex

This commit is contained in:
Rob Garrison 2016-06-28 04:28:35 -05:00
parent a02d264e2d
commit 7328732525
No known key found for this signature in database
GPG Key ID: 0A42D160D71978E1
4 changed files with 8 additions and 8 deletions

View File

@ -341,12 +341,11 @@
sz = p.size === 'all' ? p.totalRows : p.size,
s = ( p.page * sz ),
e = s + sz,
f = c.widgetOptions && c.widgetOptions.filter_filteredRow || 'filtered',
last = 0, // for cache indexing
j = 0; // size counter
p.cacheIndex = [];
for ( i = 0; i < l; i++ ){
if ( !rows[i].className.match(f) ) {
if ( !p.regexFiltered.test(rows[i].className) ) {
if (j === s && rows[i].className.match(c.cssChildRow)) {
// hide child rows @ start of pager (if already visible)
rows[i].style.display = 'none';
@ -636,7 +635,7 @@
count = f ? 0 : s;
added = 0;
while (added < e && index < rows.length) {
if (!f || !/filtered/.test(rows[index][0].className)){
if (!f || !p.regexFiltered.test(rows[index][0].className)){
count++;
if (count > s && added <= e) {
added++;
@ -940,6 +939,7 @@
}
// skipped rows
p.regexRows = new RegExp('(' + (wo.filter_filteredRow || 'filtered') + '|' + c.selectorRemove.slice(1) + '|' + c.cssChildRow + ')');
p.regexFiltered = new RegExp(wo.filter_filteredRow || 'filtered');
$t
// .unbind( namespace ) adding in jQuery 1.4.3 ( I think )

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -190,6 +190,7 @@
// skipped rows
p.regexRows = new RegExp( '(' + ( wo.filter_filteredRow || 'filtered' ) + '|' +
c.selectorRemove.slice( 1 ) + '|' + c.cssChildRow + ')' );
p.regexFiltered = new RegExp( wo.filter_filteredRow || 'filtered' );
// clear initialized flag
p.initialized = false;
@ -637,7 +638,6 @@
sz = p.size === 'all' ? p.totalRows : p.size,
start = ( p.page * sz ),
end = start + sz,
filtr = wo && wo.filter_filteredRow || 'filtered',
last = 0, // for cache indexing
size = 0; // size counter
p.cacheIndex = [];
@ -648,7 +648,7 @@
last = 0; // for cache indexing
size = 0; // size counter
for ( rowIndex = 0; rowIndex < len; rowIndex++ ) {
if ( !$rows[ rowIndex ].className.match( filtr ) ) {
if ( !p.regexFiltered.test( $rows[ rowIndex ].className ) ) {
if ( size === start && $rows[ rowIndex ].className.match( c.cssChildRow ) ) {
// hide child rows @ start of pager (if already visible)
$rows[ rowIndex ].style.display = 'none';
@ -949,7 +949,7 @@
count = f ? 0 : s;
added = 0;
while ( added < e && index < rows.length ) {
if ( !f || !/filtered/.test( rows[ index ][ 0 ].className ) ) {
if ( !f || !p.regexFiltered.test( rows[ index ][ 0 ].className ) ) {
count++;
if ( count > s && added <= e ) {
added++;