Great to see these developed further. The customization options are really appreciated!
This new greyHiddenRecords only works for CMSBuilder v.3+. For those of us still working with some v.2 sites, is there a way to limit the styling to a particular table? I've tried variations on the following with no luck:
// register callbacks
addFilter('listRow_trStyle', 'style_certain_records_listRow_trStyle', null, 3);
// **** KEY LINE FOLLOWS ****
function style_certain_records_listRow_trStyle($trStyle, $tableName = "cms_sc_orders", $record) {
if (!@$record['hidden']) { // All non-hidden records are scanned for new rules.
// Not locked, but no other checks - should highlight odd situations.
if(!@$record['locked'] AND !@$record['paid'] AND @$record['order_id'])
{ return "color: rgb(200,200,200);".$trStyle; }
// pale grey, Order_ID added only to limit styling to Orders table.
} // end rules for non-hidden fields
return "color: #CCC;"; // default hidden style
}
and...
function style_certain_records_listRow_trStyle($trStyle, "cms_sc_orders", $record) {
if (!@$record['hidden']) { // All non-hidden records are scanned for new rules.
// ... styling rules here...
}
return "color: #CCC;"; // default hidden style
}
In both these cases we're trying to limit these styling rules to affect only the _sc_orders table.
Any ideas?
Jayme