The program titles in the weekly schedule grid aren't showing up as links in IE -- they are clickable, but the user doesn't see the mouse pointer change which means there's less chance of them being discovered as links.

This is with Garland theme and IE7.

Comments

joachim’s picture

Status: Active » Needs review
StatusFileSize
new876 bytes

Here's a patch.

Quite simply, the link needs to be created deeper in the table rather than for the whole cell (which is non-valid HTML anyway).

I've only linked the program name.

Do you want the DJ name linking to the user profile?
Alternatively, if your aim is to have the whole table cell for the program clickable, some CSS trickery will be needed.

drewish’s picture

humm, i guess your right, can't put block level elements into inline elements...

the patch seems alright, i think you could simplify it a bit:

+  $output .= l(check_plain($program->title), 'node/'. $program->nid, NULL, NULL, NULL, NULL, TRUE);

to

+  $output .= l($program->title, 'node/'. $program->nid);

since all that extra stuff was so we could stick HTML inside the link.

drewish’s picture

as for the second part of your comment, it was my goal for the whole block to be clickable. i suppose the way to do that would be to use a span instead of a block and then via CSS set 'display: block'.

joachim’s picture

I don't know what check_plain does, I just rearranged the existing code :)

For the clickable block, I've done a bit of playing about with it and got it to work -- yes, some of the DIVs will need to be changed to SPANs and some extra CSS is needed. I'll turn make a patch that adds that -- but it'll probably need testing on all flavours of IE.
Would you like it incremental to my first patch or an alternative patch?

drewish’s picture

which ever you'd like. the span + css alternative would be my favorite though.

joachim’s picture

StatusFileSize
new2.01 KB

Ok, here's a patch (an alternate to my first one rather than incremental, so on 5.x-1.0) that puts spans into the link and makes the whole block clickable.

I've had to rearrange theme_station_schedule_item a bit, to first generate everything that's going into the link, and then make the entire DIV and the link.
The other big change is that height is set in the A element, instead of the DIV.
The CSS is in the schedule stylesheet. I've added a hover background colour that goes ok with Garland, but feel free to change that or remove it entirely if it's not to your taste or you think there's too much risk of clashing with other themes.
I've added an extra SPAN for the program title, with class 'station-sch-title' to match the others.
There's a bit of tweaking so the DJ name *doesn't* underline on hover. I've made this change because the DJ name isn't a link to the DJ's profile page, and underlining always makes me think it is.

drewish’s picture

StatusFileSize
new4.64 KB

sorry to have ignored this for so long. i finally had a chance to play with it. i made a few changes and applied this to the admin side so it was consistent. give it a whirl and let me know how it works for you.

drewish’s picture

Status: Needs review » Fixed
StatusFileSize
new4.65 KB

okay, i finally committed the attached patch to DRUPAL-5.

Anonymous’s picture

Status: Fixed » Closed (fixed)