Index: branches/5.2.x/core/admin_templates/js/simple_grid.js =================================================================== diff -u -N -r14572 -r14604 --- branches/5.2.x/core/admin_templates/js/simple_grid.js (.../simple_grid.js) (revision 14572) +++ branches/5.2.x/core/admin_templates/js/simple_grid.js (.../simple_grid.js) (revision 14604) @@ -140,6 +140,7 @@ this.renumberRecords(); this.updateTotals(); + this.processOddEven(); return new_item_number; } @@ -158,10 +159,29 @@ this.renumberRecords(); this.updateTotals(); + this.processOddEven(); return true; } +SimpleGrid.prototype.processOddEven = function () { + var $me = this; + var $class_name = 'odd'; + + $('> div', this.getControl('container')).each( + function () { + var $div_id = $(this).attr('id'); + + if ( !$div_id.match( new RegExp('^' + $me.IDPrefix + '_(.*)') ) ) { + return ; + } + + $me.getControl(RegExp.$1).className = $class_name; + $class_name = $class_name == 'odd' ? 'even' : 'odd'; + } + ); +} + SimpleGrid.prototype.removeRecords = function () { while (this.ItemIDs.length > 0) { var $item_id = this.ItemIDs[this.ItemIDs.length - 1];