Skip to main content

Integration package for using zc.datetimewidget in Zope 2

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

Changes

1.0 (2009-05-20)

  • initial revision

How to use zc.datetimewidget with Zope2

1. Add gocept.datetimewidget egg to your instance

This should automatically install the following dependencies:

  • zc.datetimewidget, zc.i18n and zc.resourcelibrary

2. Make sure the correct set of zcml gets loaded.

If you use a custom site.zcml, Include the following IN THIS ORDER:

<!-- Enable zc.datetimewidget to load its zcml.
     Do not include zc.resourcelibrarys configure.zcml, as this
     will not work in z2. -->
<include package="zc.resourcelibrary" file="meta.zcml" />
<!-- Contains a copy of the resource directory of zc.datetimewidget
     registered as a browser:resourceDirectory.
     Also contains a viewlet manager with viewlets providing html
     snippets for including the javascripts in your templates (see below). -->
<include package="gocept.datetimewidget" />
<include package="zc.datetimewidget" />
<!-- Replace the formlib datetimewidget with the zc one. -->
<includeOverrides package="zc.datetimewidget" />
<!-- Overwrite the zc.resourcelibrary resourcedirectory
     of zc.datetimewidget with a browser:resourceDirectory. -->
<includeOverrides package="gocept.datetimewidget" />

If you use the zcml parameter of plone.recipe.zope2instance you can just set:

zcml = zc.resourcelibrary-meta
       gocept.datetimewidget
       zc.datetimewidget
       zc.datetimewidget-overrides
       gocept.datetimewidget-overrides

3. Add javascript resources to your templates.

Place a line like this in a template where your forms will be displayed:

<tal:jsviewlets replace="structure provider:zc.datetimewidget.resources" />

Or make sure the following resources are loaded (i.e. using plone portal_javascript/portal_css):

/++resource++zc.datetimewidget/calendar-system.css
/++resource++zc.datetimewidget/calendar.js
/++resource++zc.datetimewidget/datetimewidget.js
/++resource++zc.datetimewidget/languages/calendar-en.js
/++resource++zc.datetimewidget/calendar-setup.js

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gocept.datetimewidget-1.0.tar.gz (38.7 kB view details)

Uploaded Source

File details

Details for the file gocept.datetimewidget-1.0.tar.gz.

File metadata

File hashes

Hashes for gocept.datetimewidget-1.0.tar.gz
Algorithm Hash digest
SHA256 42ca9c4b77bce97facd9feccc680247ed89d4425716305a6c1274532a16b7232
MD5 b3001272ee66f4d0ed520a0cb4fce765
BLAKE2b-256 99fda817dc074ee6cfebdfb1ba117469aa51e180a31f9c9ec72e718d9bc207ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page