"Use as table row CSS class"

Status
Not open for further replies.

sergio

New Member
Hi guys,
Can someone tell me wha can I do if I select in an element the new option "Use as table row CSS class" ?? How I use it in the css..??
???

tnxxx
 
I added that as a paid feature (someone wanted it badly enough to pay a few bucks for it). Basically, it just adds whatever the element value is (well, the value rendered on the table for the element) as a CSS class for either the whole row, or the individual cell. It replaces any spaces with underscore, and converts to lower case.

Lets say you have an invoicing system, with a dropdown for "Paid", "Invoiced", "Yet To Bill" (or whatever). You could have any "Yet To Bill" lines in the table show up in some other background color by adding the class yet_to_bill to the form CSS, with whatever styling you want. Or you could add all three options as classes, and style each type of line differently.

It's not super useful for everyone, but I'm sure some folk will find a use for it.

-- hugh
 
Hi,

I'm the guy who requested this feature, and this is how I used it:

It's a sign in/out board that is used to locate people and see what they're up to. The user fills in their status, schedule, return date/time, etc. Depending on the status they select, the row is colored and styled differently.
 

Attachments

  • Screenshot.jpg
    Screenshot.jpg
    17.4 KB · Views: 262
To get this to work properly in IE6 I had to replace the PHP that generates the table row class to put a hyphen instead of a space between the template class and the class generated by the table data:

Code:
<tr class="oddrow<?php echo $c . '-' . implode(' ',$row_classes);?>">

I configured my template to highlight the row in a different color when hovered over with the mouse:

Code:
<tr class="upoddrow<?php echo $c . '-' . implode(' ',$row_classes);?>" onMouseOver="this.className='dnoddrow<?php echo $c . '-' . implode(' ',$row_classes);?>'" onMouseOut="this.className='upoddrow<?php echo $c . '-' . implode(' ',$row_classes);?>'">




Cheers,

-n8
 
One of the many, many (many many many many) (many) reasons I haven't run IE6 since the day FireFox came out!

I can just about live with IE8 now it has an (almost) (semi) decent debugger.

FYI, I'm under orders from Rob to move the actual logic out of the templates and into view.html.php. So pretty soon those templates will change, so they just use a simple variable name, rather than building the style array and exploding the array in situ.

I might even put some browser detection code in it, and do that IE6 fix.

-- hugh
 
One of the many, many (many many many many) (many) reasons I haven't run IE6 since the day FireFox came out.

-- hugh

Believe me, I'd love to stop support for IE6, but then I'd have to kill 35% of the people who visit my sites... ;)

I think it would be cool to move the code out of the templates, might even be cool if you could preview the class name in the admin pages to make for easier template building....

I wonder if anyone else has started using this feature yet. I like it a lot, tho it does complicate the CSS, especially in my case with different declarations for onMouseOver, onMouseOut, etc... But it sure does look purdy!

Cheerio,

-n8
 
I like it as well. Neat little feature.

Main problem of course is only being able to use elements which are visible on the table row.

We're pretty sure we can work round this, though. We'll probably put the same feature in 2.0, but with a workaround so you can use any row data, regardless of visibility or access levels. Mainly because it will also help construct 'detail links', being able to use placeholders for non-visible elements. At the moment, you can point the details link to (say) profile.php&user={foo.userid}, but of course that means the userid element has to be visible.

In 2.0, you can specify a different 'detail link' for each element on the row. Which is a very useful feature - so you can (say) point one cell to a profile page with userid, and another to an email form with {email}. It'll be even more useful if you aren't restricted to visible data.

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top