Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 14, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  jsCalendar - want to use image for the trigger

phpMyEdit Features     jsCalendar - want to use image for the trigger
Post new topic   Reply to topic    
 
ryanhart     Joined: 08 Apr 2004   Posts: 12  
Post Posted: 2005-06-24 22:29
Back to top  Reply with quote     

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     Joined: 17 Dec 2003   Posts: 236  
Post Posted: 2005-06-27 20:17
Back to top  Reply with quote     

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     Joined: 31 May 2005   Posts: 34  
Post Posted: 2005-07-15 22:42
Back to top  Reply with quote     

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:


Code:
$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     Joined: 17 Dec 2003   Posts: 236  
Post Posted: 2005-07-16 23:02
Back to top  Reply with quote     

The following works:

Code:

  '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     Joined: 31 May 2005   Posts: 34  
Post Posted: 2005-07-19 17:06
Back to top  Reply with quote     

THX! ajh, it works now!

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy