View topic | Edit | WYSIWYGAttachPrintable
r3 - 25 Jun 2006 - 16:26:31 - TWikiContributorYou are here: Astrophysics Wiki >  TWiki Web  > JSCalendarContrib
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 = TWiki::Contrib::JSCalendarContrib

Installation Instructions

  • Download the ZIP file from the Plugin web (see below)
  • Unzip JSCalendarContrib.zip in your twiki installation directory. Content:
    File:down Description:
    data/TWiki/JSCalendarContrib.txt  
    lib/TWiki/Contrib/JSCalendarContrib.pm  
    lib/TWiki/Contrib/JSCalendarContrib/build.pl  
    pub/TWiki/JSCalendarContrib/bugtest-hidden-selects.html  
    pub/TWiki/JSCalendarContrib/calendar-blue.css  
    pub/TWiki/JSCalendarContrib/calendar-blue2.css  
    pub/TWiki/JSCalendarContrib/calendar-brown.css  
    pub/TWiki/JSCalendarContrib/calendar-green.css  
    pub/TWiki/JSCalendarContrib/calendar-setup.js  
    pub/TWiki/JSCalendarContrib/calendar-setup_stripped.js  
    pub/TWiki/JSCalendarContrib/calendar-system.css  
    pub/TWiki/JSCalendarContrib/calendar-tas.css  
    pub/TWiki/JSCalendarContrib/calendar-win2k-1.css  
    pub/TWiki/JSCalendarContrib/calendar-win2k-2.css  
    pub/TWiki/JSCalendarContrib/calendar-win2k-cold-1.css  
    pub/TWiki/JSCalendarContrib/calendar-win2k-cold-2.css  
    pub/TWiki/JSCalendarContrib/calendar.js  
    pub/TWiki/JSCalendarContrib/calendar.php  
    pub/TWiki/JSCalendarContrib/calendar_stripped.js  
    pub/TWiki/JSCalendarContrib/ChangeLog  
    pub/TWiki/JSCalendarContrib/dayinfo.html  
    pub/TWiki/JSCalendarContrib/doc/html/field-button.jpg  
    pub/TWiki/JSCalendarContrib/doc/html/reference-Z-S.css  
    pub/TWiki/JSCalendarContrib/doc/html/reference.css  
    pub/TWiki/JSCalendarContrib/doc/html/reference.html  
    pub/TWiki/JSCalendarContrib/doc/reference.pdf  
    pub/TWiki/JSCalendarContrib/img.gif  
    pub/TWiki/JSCalendarContrib/index.html  
    pub/TWiki/JSCalendarContrib/lang/calendar-af.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-al.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-bg.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-big5-utf8.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-big5.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-br.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-ca.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-cs-utf8.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-cs-win.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-da.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-de.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-du.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-el.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-en.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-es.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-fi.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-fr.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-he-utf8.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-hr-utf8.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-hr.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-hu.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-it.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-jp.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-ko-utf8.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-ko.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-lt-utf8.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-lt.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-lv.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-nl.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-no.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-pl-utf8.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-pl.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-pt.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-ro.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-ru.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-ru_win_.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-si.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-sk.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-sp.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-sv.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-tr.js  
    pub/TWiki/JSCalendarContrib/lang/calendar-zh.js  
    pub/TWiki/JSCalendarContrib/lang/cn_utf8.js  
    pub/TWiki/JSCalendarContrib/menuarrow.gif  
    pub/TWiki/JSCalendarContrib/menuarrow2.gif  
    pub/TWiki/JSCalendarContrib/multiple-dates.html  
    pub/TWiki/JSCalendarContrib/README  
    pub/TWiki/JSCalendarContrib/release-notes.html  
    pub/TWiki/JSCalendarContrib/simple-1.html  
    pub/TWiki/JSCalendarContrib/simple-2.html  
    pub/TWiki/JSCalendarContrib/simple-3.html  
    pub/TWiki/JSCalendarContrib/skins/aqua/active-bg.gif  
    pub/TWiki/JSCalendarContrib/skins/aqua/dark-bg.gif  
    pub/TWiki/JSCalendarContrib/skins/aqua/hover-bg.gif  
    pub/TWiki/JSCalendarContrib/skins/aqua/menuarrow.gif  
    pub/TWiki/JSCalendarContrib/skins/aqua/normal-bg.gif  
    pub/TWiki/JSCalendarContrib/skins/aqua/rowhover-bg.gif  
    pub/TWiki/JSCalendarContrib/skins/aqua/status-bg.gif  
    pub/TWiki/JSCalendarContrib/skins/aqua/theme.css  
    pub/TWiki/JSCalendarContrib/skins/aqua/title-bg.gif  
    pub/TWiki/JSCalendarContrib/skins/aqua/today-bg.gif  
    pub/TWiki/JSCalendarContrib/test-position.html  
    pub/TWiki/JSCalendarContrib/test.php  
    pub/TWiki/JSCalendarContrib/twiki.js  

  • 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: 8670 of the Mishoo calendar
Copyright ©: See the Mishoo documentation
License: GNU LGPL
Dependencies: None
27/12/05 updated to calendar version 1.0; set style for Safari to win2k-1
14/08/04 Separated out from SharedCode? module
Home: http://TWiki.org/cgi-bin/view/Plugins/JSCalendarContrib
Feedback: http://TWiki.org/cgi-bin/view/Plugins/JSCalendarContribDev

Related Topics: TWikiPreferences

-- TWiki:Main/CrawfordCurrie - 23:00:11 01 February 2006

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
docEXT doc manage 4.0 K 25 Oct 2006 - 00:16 UnknownUser  
gifgif menuarrow.gif manage 0.1 K 25 Oct 2006 - 00:16 UnknownUser  
htmlhtml index.html manage 12.4 K 25 Oct 2006 - 00:16 UnknownUser  
elsephp calendar.php manage 4.4 K 25 Oct 2006 - 00:16 UnknownUser  
elsecss calendar-win2k-cold-1.css manage 5.6 K 25 Oct 2006 - 00:16 UnknownUser  
elseEXT lang manage 4.0 K 25 Oct 2006 - 00:16 UnknownUser  
htmlhtml test-position.html manage 1.5 K 25 Oct 2006 - 00:16 UnknownUser  
elsephp test.php manage 3.2 K 25 Oct 2006 - 00:16 UnknownUser  
elsecss calendar-win2k-1.css manage 5.8 K 25 Oct 2006 - 00:16 UnknownUser  
elsecss calendar-brown.css manage 4.6 K 25 Oct 2006 - 00:16 UnknownUser  
jsjs calendar_stripped.js manage 33.5 K 25 Oct 2006 - 00:16 UnknownUser  
elseEXT skins manage 4.0 K 25 Oct 2006 - 00:16 UnknownUser  
elsecss calendar-system.css manage 5.6 K 25 Oct 2006 - 00:16 UnknownUser  
elsecss calendar-win2k-2.css manage 5.8 K 25 Oct 2006 - 00:16 UnknownUser  
jsjs calendar-setup_stripped.js manage 4.8 K 25 Oct 2006 - 00:16 UnknownUser  
htmlhtml bugtest-hidden-selects.html manage 3.9 K 25 Oct 2006 - 00:16 UnknownUser  
jsjs calendar-setup.js manage 8.6 K 25 Oct 2006 - 00:16 UnknownUser  
elseEXT ChangeLog manage 24.5 K 25 Oct 2006 - 00:16 UnknownUser  
htmlhtml simple-1.html manage 9.2 K 25 Oct 2006 - 00:16 UnknownUser  
gifgif menuarrow2.gif manage 0.1 K 25 Oct 2006 - 00:16 UnknownUser  
gifgif img.gif manage 0.2 K 25 Oct 2006 - 00:16 UnknownUser  
jsjs twiki.js manage 0.8 K 25 Oct 2006 - 00:16 UnknownUser  
elsecss calendar-blue2.css manage 4.9 K 25 Oct 2006 - 00:16 UnknownUser  
htmlhtml simple-2.html manage 3.7 K 25 Oct 2006 - 00:16 UnknownUser  
jsjs calendar.js manage 48.1 K 25 Oct 2006 - 00:16 UnknownUser  
htmlhtml multiple-dates.html manage 2.9 K 25 Oct 2006 - 00:16 UnknownUser  
elsecss calendar-green.css manage 4.7 K 25 Oct 2006 - 00:16 UnknownUser  
elsecss calendar-tas.css manage 5.2 K 25 Oct 2006 - 00:16 UnknownUser  
elsecss calendar-win2k-cold-2.css manage 5.8 K 25 Oct 2006 - 00:16 UnknownUser  
elsecss calendar-blue.css manage 4.7 K 25 Oct 2006 - 00:16 UnknownUser  
elseEXT README manage 0.9 K 25 Oct 2006 - 00:16 UnknownUser  
htmlhtml dayinfo.html manage 3.0 K 25 Oct 2006 - 00:16 UnknownUser  
htmlhtml simple-3.html manage 4.4 K 25 Oct 2006 - 00:16 UnknownUser  
htmlhtml release-notes.html manage 18.0 K 25 Oct 2006 - 00:16 UnknownUser  
View topic | Edit |  | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions...

key Log In or Register
Information

Main Web Users Groups Index Search Changes Notifications Statistics Preferences


Webs Main Sandbox TWiki Zen Information

Main Web Users Groups Index Search Changes Notifications Statistics Preferences


Webs Main Sandbox TWiki Zen





 
Astrophysics Wiki


Edit Wysiwyg Attach Printable
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Astrophysics Wiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.JSCalendarContrib