Commit cc515842 authored by Dries's avatar Dries
Browse files

- Patch #715528 by sun: optimize restripe() AJAX command.

parent fe26a907
......@@ -423,12 +423,11 @@ Drupal.ajax.prototype.commands = {
restripe: function (ajax, response, status) {
// :even and :odd are reversed because jQuery counts from 0 and
// we count from 1, so we're out of sync.
$('tbody tr:not(:hidden)', $(response.selector))
.removeClass('even').removeClass('odd')
.filter(':even')
.addClass('odd').end()
.filter(':odd')
.addClass('even');
// Match immediate children of the parent element to allow nesting.
$('> tbody > tr:visible, > tr:visible', $(response.selector))
.removeClass('odd even')
.filter(':even').addClass('odd').end()
.filter(':odd').addClass('even');
}
};
......
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