collective / .recurrenceinput.js Watch 179 Star 158 Fork 33

Code Issues 9 Pull requests 0 Pulse Graphs jQuery recurrence widget based on the icalendar RFC5545 standard

374 commits 3 branches 11 releases 13 contributors

master New pull request New file Find file HTTPS https://github.com/collective / jqDueorwyn.lroeacdu rZrIPenceinput.js.git

mauritsvanrees Added New/Fixes headers to changelog. … Latest commit f6728bd on Oct 30, 2015

demo forgot to fix these a year ago

lib Include optimized base64 encoded image data in CSS files to avoid to … a year ago

src Merge branch 'recurrance_field_styles' 10 months ago

tests Change Add, Edit and Delete to be buttons instead of links 10 months ago

.gitattributes Allowed union merge strategy in CHANGES.rst. 7 months ago

.gitignore Now saves to field. 5 years ago

CHANGES.rst Added New/Fixes headers to changelog. 6 months ago

LICENSE.txt Added license. 4 years ago

README.rst formating 3 years ago

Screenshot.png New screenshots. 4 years ago

Screenshot_thumb.png New screenshots. 4 years ago

bower.json jquery 1.7+ compatibility a year ago

test_server.py typos, white space 4 years ago

README.rst

jQuery recurrenceinput widget

jQuery plugin widget which support the definition of complex recurrence rulesets based on RFC5545, the iCalendar standard.

The recurrence rule string, generated by this package, should be directly usable in ics calendar files. It was developed for the Plone, but is completely independent of the web-framework. This widget is production ready and used in several sites.

http://github.com/collective/jquery.recurrenceinput.js/raw/master/Screenshot_thumb.png

Features

The recurrence widget supports most of the options of the iCalendar RRULE as well as EXDATE and RDATE. It supports internationalization. It supports predetermined recurrence rules, so called "templates".

Non-Features

This widget does not support all features of RRULE's. For example:

It does not support recurrence on smaller than daily basis. In RRULE's end-dates can end either be in local time or in UTC. This widget only supports UTC, which means the start and end dates of the event as a whole, when exported may not be in local time. They must either specify a timezone or be in UTC. If the RRULE fed to the widget is in local time, this will be made into UTC with no timezone translation. Any parameters will be ignored and stripped on saving the rule.

Requirements

Requires jQuery and jQuery Tools datetime widget and overlay support. It is currently being tested with jQuery 1.4, because that's what plone uses, and jQuery 1.7, because that is the last version supported by jQuery Tools.

jQuery 1.5 may work but is untested. Bugs in jQuery 1.6.4 means it does not work. jQuery Tools doesn't support jQuery 1.8 yet.

It's tested on Chromium 20 (), Firefox 16 (Linux), IE 8 and IE 9 (Windows).

To Do

High priority:

100% code coverage from tests (currently 95%).

Medium priority:

Make it possible to change the order of the fields as a part of the i18n. (jQuery templates)? The human readable output should probably be done directly from the RRULE and not by using the form i18n, to improve the grammar and rule support.

Low priority:

Support more obscure RFC5545 options, either in the form or by providing warnings that the option is unsupported.

Developer information

To test, demo or develop jquery.recurrenceinput locally you need to run a local server, provided in the test_server.py script.

This server requires the dateutil module, so you must install it first. Here are some examples of how to do this, depending on your platform:

Debian/Ubuntu:

$ sudo apt-get install python-dateutil

A non-system Python 2 with setuptools or distribute installed:

$ /easy_install python-dateutil

Then start the tests server like so:

$ python ./test_server.py

Open the demo pages http://localhost:8000/demo/input.html and http://localhost:8000/demo/localized.html

And Open the tests: http://localhost:8000/tests/tests.html

The demo/input.html document contains basic usecases and can be used when developing on this widget.

You also need to run the tests. These are located in tests/tests.js, and use the QUnit test framework. You run them by opening tests/test.html in the browser. The same issue with allowing Ajax from the local hard drive is in effect for the tests as well.

In the tests directory there is also a copy of jslint.js, for easy access. To run these you need to install a JavaScript engine, such as Rhino or SpiderMonkey. You then run it with:

$ js tests/jslint.js

The following files should be jslinted:

src/jquery.recurrenceinput.js src/tests.js

To keep the Coverage tests updated you need to install jscoverage ( http://siliconforks.com/jscoverage/ ). You then keep the coverage code updated by running:

jscoverage src/ coverage/

To run the coverage tests you go to http://localhost:8000/coverage/jscoverage.html?/tests/coveragetest.html

Contributors

This project was originally started by Rok Garbas.

Authors: Lennart Regebro Rok Garbas Vilmos Somogyi Johannes Raggam Mike Rhodes Kai Lautaportti

Thanks to Hexagon IT, http://www.hexagonit.fi/, who funded the main body of work, done by Lennart Regebro.

© 2016 GitHub, Inc. Terms Privacy Security Contact Help Status API Training Shop Blog About