key Log In or Register to edit

JS Calendar Contrib

Mishoo JSCalendar, packaged for use by plugins, skins and add-ons.

Summary of Contents

This module packages the Mishoo JSCalendar Javascript in a form suitable for use with TWiki.

Detailed Documentation

Read the Mishoo documentation or visit the demo page.

This package also includes a small Perl module to make using the calendar easier from TWiki plugins. This module includes the function:

addHEAD( $setup )
that can automatically add the required headers to the page being rendered. $setup is the name of the calendar setup module; it can either be ommitted, in which case the method described in the Mishoo documentation can be used to create calendars, or it can be 'twiki', in which case a helper function is added that simplifies using calendars to set a value in a text field. For example,
    # Add styles and javascript for the calendar
    require TWiki::Contrib::JSCalendarContrib;
    if( $@ || !$TWiki::Contrib::JSCalendarContrib::VERSION ||
        $TWiki::Contrib::JSCalendarContrib::VERSION < 0.961 ) {
        TWiki::Func::writeWarning('JSCalendarContrib >=0.961 not found '.$@);
    } else {
        TWiki::Contrib::JSCalendarContrib::addHEAD( 'twiki' );
    }

    $html .= CGI::textfield(
        { name => 'datefield',
          id => "id_datefield" });
    $html .=
          CGI::image_button(
                      -name => 'datefield_calendar',
                      -onclick =>
                          "return showCalendar('id_datefield','%e %B %Y')",
                      -src=> TWiki::Func::getPubUrlPath() . '/' .
                        TWiki::Func::getTwikiWebname() .
                            '/JSCalendarContrib/img.gif',
                      -alt => 'Calendar',
                      -align => 'MIDDLE' );
            }
        }
The first parameter to showCalendar is the id of the textfield. See the Mishoo documentation for details of the '$e %B %Y' parameter.

Note that the header will only be added once, regardless of the number of times that addHEAD is called.

addHEAD can be called from commonTagsHandler for adding the header to all pages, or to beforeEditHandler just for edit pages etc.

Settings

  • Name of the perl package
    • Set STUB = %$STUB%
  • What do I do
    • Set SHORTDESCRIPTION = Mishoo JSCalendar, packaged for use by plugins, skins and add-ons.

Installation Instructions

  • Download the archive from the Plugins web (see below)
  • Unpack it in your twiki installation directory. Content:
    File: Description:
%$MANIFEST%
  • Make sure that all files are readable by the web server user

Contrib Info

Author: TWiki:Main/CrawfordCurrie http://www.c-dot.co.uk
Version: %$VERSION% of the Mishoo calendar
Copyright ©: See the Mishoo documentation
License: GPL (GNU General Public License)
|
Dependencies: %$DEPENDENCIES%
Change History:  
10247 Item2054 put the calendar at z-index 2000, way above pattern skin divs.
6634 Item453 removed Edit Table Plugins private copy of the Mishoo JS calendar, and made sure it works with JS Calendar Contrib. Improved the documentation of the JSCalendar while I was there.
6626 Item468 updated docs for Dakar release
5048 Cairo readiness
5039 Split from Shared Code?
27 Dec 2005 updated to calendar version 1.0; set style for Safari to win2k-1
14 Aug 2004 Separated out from Shared Code? module
Home: http://TWiki.org/cgi-bin/view/Plugins/JSCalendarContrib
Feedback: http://TWiki.org/cgi-bin/view/Plugins/JSCalendarContribDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/JSCalendarContribAppraisal

Related Topics: T Wiki Preferences

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
elseEXT skins manage 4.0 K 05 Jul 2006 - 03:42 Unknown User  
elsecss calendar-blue.css manage 4.7 K 05 Jul 2006 - 03:42 Unknown User  
htmlhtml simple-1.html manage 9.2 K 05 Jul 2006 - 03:42 Unknown User  
jsjs calendar-setup_stripped.js manage 4.8 K 05 Jul 2006 - 03:42 Unknown User  
htmlhtml multiple-dates.html manage 2.9 K 05 Jul 2006 - 03:42 Unknown User  
jsjs calendar.js manage 48.1 K 05 Jul 2006 - 03:42 Unknown User  
elsecss calendar-tas.css manage 5.2 K 05 Jul 2006 - 03:42 Unknown User  
jsjs calendar-setup.js manage 8.6 K 05 Jul 2006 - 03:42 Unknown User  
elsecss calendar-green.css manage 4.7 K 05 Jul 2006 - 03:42 Unknown User  
jsjs calendar_stripped.js manage 33.5 K 05 Jul 2006 - 03:42 Unknown User  
elsecss calendar-system.css manage 5.6 K 05 Jul 2006 - 03:42 Unknown User  
htmlhtml test-position.html manage 1.5 K 05 Jul 2006 - 03:42 Unknown User  
gifgif menuarrow.gif manage 0.1 K 05 Jul 2006 - 03:42 Unknown User  
htmlhtml simple-3.html manage 4.4 K 05 Jul 2006 - 03:42 Unknown User  
elsecss calendar-blue2.css manage 4.9 K 05 Jul 2006 - 03:42 Unknown User  
jsjs twiki.js manage 0.8 K 05 Jul 2006 - 03:42 Unknown User  
htmlhtml index.html manage 12.4 K 05 Jul 2006 - 03:42 Unknown User  
elsecss calendar-win2k-cold-2.css manage 5.8 K 05 Jul 2006 - 03:42 Unknown User  
htmlhtml simple-2.html manage 3.7 K 05 Jul 2006 - 03:42 Unknown User  
elseEXT ChangeLog manage 24.5 K 05 Jul 2006 - 03:42 Unknown User  
gifgif img.gif manage 0.2 K 05 Jul 2006 - 03:42 Unknown User  
htmlhtml bugtest-hidden-selects.html manage 3.9 K 05 Jul 2006 - 03:42 Unknown User  
elsephp calendar.php manage 4.4 K 05 Jul 2006 - 03:42 Unknown User  
htmlhtml release-notes.html manage 18.0 K 05 Jul 2006 - 03:42 Unknown User  
elsecss calendar-win2k-2.css manage 5.8 K 05 Jul 2006 - 03:42 Unknown User  
elsecss calendar-brown.css manage 4.6 K 05 Jul 2006 - 03:42 Unknown User  
elsecss calendar-win2k-cold-1.css manage 5.6 K 05 Jul 2006 - 03:42 Unknown User  
htmlhtml dayinfo.html manage 3.0 K 05 Jul 2006 - 03:42 Unknown User  
gifgif menuarrow2.gif manage 0.1 K 05 Jul 2006 - 03:42 Unknown User  
elsephp test.php manage 3.2 K 05 Jul 2006 - 03:42 Unknown User  
elsecss calendar-win2k-1.css manage 5.8 K 05 Jul 2006 - 03:42 Unknown User  
elseEXT README manage 0.9 K 05 Jul 2006 - 03:42 Unknown User  
docEXT doc manage 4.0 K 26 Mar 2007 - 14:01 Unknown User  
elseEXT lang manage 4.0 K 26 Mar 2007 - 14:01 Unknown User  
 
Ad Sponsor
Back to Redbourn
Copyright © We make no guarantee of the correctness of the content of this site. All material on this collaboration platform is the property of Martin Cleaver and the contributing authors.