Index: main/waeup.sirp/trunk/src/waeup/sirp/browser/resources.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/browser/resources.py	(revision 5835)
+++ main/waeup.sirp/trunk/src/waeup/sirp/browser/resources.py	(revision 5835)
@@ -0,0 +1,62 @@
+##
+## resources.py
+## Login : <uli@pu.smp.net>
+## Started on  Fri Mar 11 10:49:59 2011 Uli Fouquet
+## $Id$
+## 
+## Copyright (C) 2011 Uli Fouquet
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+## 
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+## 
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+"""Special JavaScript and CSS resources provided by waeup.sirp.
+"""
+from hurry.resource import Library, ResourceInclusion
+from hurry.jqueryui import jqueryui
+
+#: All local resources are registered under the name ``waeup_sirp``.
+waeup_sirp = Library('waeup_sirp', 'static')
+
+#: A resource that binds a jQueryUI datepicker widget to each
+#: <div> or <input> tag with class ``datepicker``.
+#: If you want to let a JavaScript datepicker appear when
+#: clicking into some input field, then you have to perform
+#: two steps:
+#:
+#: * In the `update()` method of the responsible view/page/form
+#:   require the JavaScript code to be rendered into the page:
+#:
+#:     from waeup.sirp.browser.resources import datepicker
+#:     ...
+#:     class MyPage(...):
+#:       ...
+#:       def update(self):
+#:         datepicker.need()
+#:
+#:   This way all required JavaScripts will be rendered correctly
+#:   into the HTML page generated.
+#:
+#: * In your HTML code add some ``<input>`` or ``<div>`` tag with
+#:   ``class`` set to ``datepicker``, like this::
+#:
+#:     <input type="text" name="entrydate" class="datepicker" />
+#:
+#: When the HTML is rendered, clicking into the field will open
+#: a datepicker widget. The datepicker functionality will be
+#: delivered by jQueryUI for every ``<div>/<input>`` field with class
+#: ``datepicker`` set.
+#:
+#: That means, you can also have several date input fields on a
+#: single page as long as each one has class ``datepicker``.
+datepicker = ResourceInclusion(waeup_sirp, 'datepicker.js',
+                               depends=[jqueryui])
