So, I'm trying to override the default background color of a column,
but have that color be different depending on if the column is odd or
even.

I start by creating list_row_class, as follows:

module ClientsHelper
  def list_row_class(record)
    if record.is_a?(Client)
      return record.client_status.status
    end
  end
end

Now, I notice that this adds the following class to the rows:
<tr id="clients-list-18353-row" class="record status_1">
<tr id="clients-list-18315-row" class="record even-record status_1">

In by CSS override file, I've declared the colors as follows:
.active-scaffold tr[class="record status_1"] td.client_status-column {
background-color: #FFEE00;
}
.active-scaffold tr[class="record status_1"] td.client_status-column
a.disabled {
color: black;
font-weight: bold;
}
.active-scaffold tr[class="record even-record status_1"]
td.client_status-column {
background-color: #FFFF88;
}
.active-scaffold tr[class="record even-record status_1"]
td.client_status-column a.disabled {
color: black;
font-weight: bold;
}

This CSS works fine... until I render a nested form, in which case,
ALL these customizations are lost.  I believe the core problem is that
I'm using:
tr[class="record status_1"]
instead of:
tr.status_1

AND
tr[class="record even-record status_1"]
instead of:
??? - I have no idea what I can use here... tr."even-record status_1"
doesn't work... how can I logically AND together the presence of two
class types?

Any help would be useful.
-- Darien

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to