Now that the js calendar is working well (thanks!) is there a way to do something with the button you click on to launch it? Currently I just see a button with the text '...' on it, and it is not particularly clear what the button will do. Ideally, maybe a tiny calendar icon could go there? One option would be the ical icon that the event module uses (assuming it doesn't create any problems to use an image from another module). If not an image, we need to add some kind of explanatory text, I think, or at least give the site admin the option to display something different there.

CommentFileSizeAuthor
#3 icon.diff2.37 KBm3avrck

Comments

nedjo’s picture

Good idea. This would require passing url information to the javascript (since the script can't know what folder it's installed in, and hence what the correct image path is). I'm not sure offhand what the best way to do this is. We could use a hidden form field.

scott_dft’s picture

Best thing to do in this case would be a few clever tricks with CSS. Does each 'calendar popup' button have a class name? If so, easy to hide the text, stick a background image on, change the borders so it doesn't look like a standard button at all, etc.

The image path will be held in the CSS file, no info to pass on each time a form is rendered.

Scott

m3avrck’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new2.37 KB

Here's a patch to use the Tango icon.

Nedjo, I can commit this if you want :-)

nedjo’s picture

Thanks m3averck. this is better than what we have.

I think scott_dft was right, CSS might be a preferable way--less code passed to the client, and easy to override with custom images if desired.

So, please feel free to commit your patch (and add the image file). We can always come back to this and do it the CSS way later.

m3avrck’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in both HEAD and 4.7.

Added new icon and changed logic so CSS controls the icon and width and so forth. Also applied some simple formatting to make the input box narrower and have the icon appear on the right side of the input. Easily overriable with CSS.

karens’s picture

Works great in Firefox, but I see no button in IE 6 (windows xp).

karens’s picture

Status: Fixed » Active

Forgot to change status.

m3avrck’s picture

Hmm don't have IE6 ATM to test, only FF and Safari.

If you remove the float:right, does it appear? What if you remove the widths on the input boxes (not on the jscalendar-icon), that work?

If not, can anyone else debug this?

nedjo’s picture

Status: Active » Fixed

I've tweaked the CSS and js (returned the appended element to a button that's displayed as an image with CSS) and it seems to work now. Pls reopen the issue if not.

Anonymous’s picture

Status: Fixed » Closed (fixed)