Commit 4a7ab3e4 authored by alexpott's avatar alexpott

Issue #2442999 by idebr: Views dialog filter does not restripe

parent c4286466
......@@ -820,7 +820,7 @@ td.group-title {
border-top: 1px solid #ccc;
}
.views-filterable-options .filterable-option:nth-of-type(even) .form-type-checkbox {
.views-filterable-options .filterable-option.odd .form-type-checkbox {
background-color: #f3f4ee;
}
......
......@@ -358,13 +358,16 @@
* Keyup handler for the search box that hides or shows the relevant options.
*/
handleKeyup: function (event) {
var found, i, j, option, search, words, wordsLength;
var found, i, j, option, zebraClass;
// Determine the user's search query. The search text has been converted to
// lowercase.
search = this.$searchBox.val().toLowerCase();
words = search.split(' ');
wordsLength = words.length;
var search = this.$searchBox.val().toLowerCase();
var words = search.split(' ');
var wordsLength = words.length;
// Start the counter for restriping rows.
var zebraCounter = 0;
// Search through the search texts in the form for matching text.
var length = this.options.length;
......@@ -380,9 +383,12 @@
}
}
if (found) {
zebraClass = (zebraCounter % 2) ? 'odd' : 'even';
// Show the checkbox row, and restripe it.
option.$div.show();
option.$div.removeClass('even odd');
option.$div.addClass(zebraClass);
option.$div.show();
zebraCounter++;
}
else {
// The search string wasn't found; hide this item.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment