| Index
» Projekty
» phpMyEdit
» Fórum
» jsCalendar - want to use image for the trigger |
 |
ryanhart
Založený: 08.04.2004
Príspevky: 12
Zaslal: 2005-06-24 22:29
Návrat hore
Odpovedať s citátom
|
I cannot figure out how to use the "img.gif" for the trigger instead of the default setting of a button with 3 periods on it "..." on it.
I know the calendar-setup.js has all the parameters, but by default the "button" parameter is set to "null". What should I change it to, to achieve the results I want.
Thanks,
Ryan-
|
ajh
Založený: 17.12.2003
Príspevky: 236
Zaslal: 2005-06-27 20:17
Návrat hore
Odpovedať s citátom
|
The trigger button is part of PME, not jsCalendar. Set the 'label' parameter for that field to the HTMLto include your image. Note that this will make the image appear on the button. I haven't got round to allowing the button to be replaced, although it's on the list of things to do. It should be easy enough to work out howto do it (hint: last line of the CalPopup_helper function)
|
guardian46
Založený: 31.05.2005
Príspevky: 34
Zaslal: 2005-07-15 22:42
Návrat hore
Odpovedať s citátom
|
Hi AJH,
I wanted to use this as well, but am having trouble making it work. Can you give an example of the correct syntax of the lable option? As in:
| Kód: |
$opts['fdd']['date'] = array(
'name' => 'Date',
'select' => 'N',
'calendar' => array (
'singleClick' => 'true',
'showsTime' => 'false',
'label' => '<img="img.gif">',
)
); |
Doesn't work. I've tried several variations of this with no luck. It actually makes the button a very thin bar instead of a square shape. Any help would be appreciated. THX
|
ajh
Založený: 17.12.2003
Príspevky: 236
Zaslal: 2005-07-16 23:02
Návrat hore
Odpovedať s citátom
|
The following works:
| Kód: |
'calendar' => array(
'button' => false,
'label' => '<img src=images/pme-view.png height="15" width="16" border="0" alt="..." title="Calendar"> '
) |
Obviously use whatever image you want in the img tag.
Note that I have just added a new option into the CVS version of mce_cal that displays the label/image without using a button. Use as per the code above. Default is to put the label into a button.
|
guardian46
Založený: 31.05.2005
Príspevky: 34
Zaslal: 2005-07-19 17:06
Návrat hore
Odpovedať s citátom
|
THX! ajh, it works now!
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|