python-toscawidgets-0.9.7.2/0000755000175000017500000000000011230574134014350 5ustar zackzackpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/0000755000175000017500000000000011224437421017561 5ustar zackzackpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/README.txt0000644000175000017500000000306711175375026021274 0ustar zackzackToscaWidgets ============ TW is a web widget toolkit for Python to aid in the creation, packaging and distribution of common view elements normally used in the web. These widgets are portable among any Python web-application framework or application that supports the WSGI standard. Several widget libraries exist which build on top of Toscawidgets to provide form controls, sortable grids, maps, charts, etc. Credits ------- ToscaWidgets was originally developed by `Alberto Valverde Gonzalez`_ based on the work of the many people involved in developing, testing and designing TurboGears' Widgets. TG Widget's original design was made by TurboGears' author, `Kevin Dangoor`_ . **Michele Cella** and Alberto worked hard to push TG's implementation to where it now stands. Several people have contributed to ToscaWidgets itself and external widget packages. Community --------- ToscaWidgets' community interacts in the `toscawidgets-discuss`_ Google Group. It's not rare to see discussion in Turbogears and Pylons lists too. ToscaWidgets documentation, repository and Trac lives at http://toscawidgets.org/ Running the tests ----------------- The test suite can be executed by running the `test` `setuptools` command:: $ python setup.py test .. warning:: The tests cannot be executed with `nosetests` ATM. This issue is not trivial to fix but will be fixed before 1.0 .. _Alberto Valverde Gonzalez: mailto:alberto@toscat._nospam_.net .. _Kevin Dangoor: http://www.blueskyonmars.com/ .. _toscawidgets-discuss: http://groups.google.com/group/toscawidgets-discuss python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/ToscaWidgets.egg-info/0000755000175000017500000000000011224437421023653 5ustar zackzackpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/ToscaWidgets.egg-info/requires.txt0000644000175000017500000000027011224437420026251 0ustar zackzackWebOb simplejson >= 2.0 [mako] Mako >= 0.1.1 [cheetah] Cheetah>=1.0 TurboCheetah>=0.9.5 [build_docs] Sphinx WidgetBrowser [genshi] Genshi >= 0.3.5 [kid] kid>=0.9.5 TurboKid>=0.9.9python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/ToscaWidgets.egg-info/namespace_packages.txt0000644000175000017500000000001311224437420030177 0ustar zackzacktw tw.mods python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/ToscaWidgets.egg-info/dependency_links.txt0000644000175000017500000000000111224437420027720 0ustar zackzack python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/ToscaWidgets.egg-info/PKG-INFO0000644000175000017500000000536311224437420024756 0ustar zackzackMetadata-Version: 1.0 Name: ToscaWidgets Version: 0.9.7.2 Summary: Web widget creation toolkit based on TurboGears widgets Home-page: http://toscawidgets.org/ Author: Alberto Valverde Gonzalez Author-email: alberto@toscat.net License: MIT Download-URL: http://toscawidgets.org/download/ Description: TW is a web widget toolkit for Python to aid in the creation, packaging and distribution of common view elements normally used in the web. These widgets are portable among any Python web-application framework or application that supports the WSGI standard. Several widget libraries exist which build on top of Toscawidgets to provide form controls, sortable grids, maps, charts, etc. Credits ------- ToscaWidgets was originally developed by `Alberto Valverde Gonzalez`_ based on the work of the many people involved in developing, testing and designing TurboGears' Widgets. TG Widget's original design was made by TurboGears' author, `Kevin Dangoor`_ . **Michele Cella** and Alberto worked hard to push TG's implementation to where it now stands. Several people have contributed to ToscaWidgets itself and external widget packages. Community --------- ToscaWidgets' community interacts in the `toscawidgets-discuss`_ Google Group. It's not rare to see discussion in Turbogears and Pylons lists too. ToscaWidgets documentation, repository and Trac lives at http://toscawidgets.org/ Running the tests ----------------- The test suite can be executed by running the `test` `setuptools` command:: $ python setup.py test .. warning:: The tests cannot be executed with `nosetests` ATM. This issue is not trivial to fix but will be fixed before 1.0 .. _Alberto Valverde Gonzalez: mailto:alberto@toscat._nospam_.net .. _Kevin Dangoor: http://www.blueskyonmars.com/ .. _toscawidgets-discuss: http://groups.google.com/group/toscawidgets-discuss Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Web Environment Classifier: Environment :: Web Environment :: ToscaWidgets Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Internet :: WWW/HTTP :: WSGI Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware Classifier: Topic :: Software Development :: Widget Sets Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/ToscaWidgets.egg-info/entry_points.txt0000644000175000017500000000121711224437420027151 0ustar zackzack [distutils.commands] archive_tw_resources = tw.core.command:archive_tw_resources [python.templating.engines] toscawidgets = tw.core.engine_plugin:ToscaWidgetsTemplatePlugin [toscawidgets.host_frameworks] wsgi = tw.mods.wsgi:WSGIHostFramework pylons = tw.mods.pylonshf:PylonsHostFramework turbogears = tw.mods.tg:Turbogears [toscawidgets.widgets] widgets = tw.api resources = tw.api [paste.paster_create_template] toscawidgets=tw.paste_template:ToscaWidgetsTemplate [turbogears.extensions] toscawidgets=tw.mods.tg [paste.filter_app_factory] middleware = tw.api:make_middleware python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/ToscaWidgets.egg-info/top_level.txt0000644000175000017500000000000311224437420026375 0ustar zackzacktw python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/ToscaWidgets.egg-info/not-zip-safe0000644000175000017500000000000111175375042026106 0ustar zackzack python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/ToscaWidgets.egg-info/SOURCES.txt0000644000175000017500000000314211224437421025537 0ustar zackzackMANIFEST.in README.txt setup.cfg setup.py ToscaWidgets.egg-info/PKG-INFO ToscaWidgets.egg-info/SOURCES.txt ToscaWidgets.egg-info/dependency_links.txt ToscaWidgets.egg-info/entry_points.txt ToscaWidgets.egg-info/namespace_packages.txt ToscaWidgets.egg-info/not-zip-safe ToscaWidgets.egg-info/requires.txt ToscaWidgets.egg-info/top_level.txt tw/__init__.py tw/api.py tw/paste_template.py tw/release.py tw/core/__init__.py tw/core/base.py tw/core/command.py tw/core/engine_plugin.py tw/core/exceptions.py tw/core/js.py tw/core/mako_util.py tw/core/meta.py tw/core/middleware.py tw/core/registry.py tw/core/resource_injector.py tw/core/resources.py tw/core/testutil.py tw/core/util.py tw/core/view.py tw/mods/__init__.py tw/mods/base.py tw/mods/cp2.py tw/mods/cp3.py tw/mods/pylonshf.py tw/mods/tg.py tw/mods/wsgi.py tw/paste_templates/__init__.py tw/paste_templates/__init__.pyc tw/paste_templates/widget_template/MANIFEST.in_tmpl tw/paste_templates/widget_template/setup.cfg_tmpl tw/paste_templates/widget_template/setup.py_tmpl tw/paste_templates/widget_template/+egg+.egg-info/paster_plugins.txt tw/paste_templates/widget_template/docs/conf.py_tmpl tw/paste_templates/widget_template/docs/index.rst_tmpl tw/paste_templates/widget_template/tests/__init__.py_tmpl tw/paste_templates/widget_template/tests/test_widget.py_tmpl tw/paste_templates/widget_template/tw/__init__.py_tmpl tw/paste_templates/widget_template/tw/+package+/__init__.py_tmpl tw/paste_templates/widget_template/tw/+package+/release.py_tmpl tw/paste_templates/widget_template/tw/+package+/samples.py_tmpl tw/paste_templates/widget_template/tw/+package+/widgets.py_tmplpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/PKG-INFO0000644000175000017500000000536311224437421020665 0ustar zackzackMetadata-Version: 1.0 Name: ToscaWidgets Version: 0.9.7.2 Summary: Web widget creation toolkit based on TurboGears widgets Home-page: http://toscawidgets.org/ Author: Alberto Valverde Gonzalez Author-email: alberto@toscat.net License: MIT Download-URL: http://toscawidgets.org/download/ Description: TW is a web widget toolkit for Python to aid in the creation, packaging and distribution of common view elements normally used in the web. These widgets are portable among any Python web-application framework or application that supports the WSGI standard. Several widget libraries exist which build on top of Toscawidgets to provide form controls, sortable grids, maps, charts, etc. Credits ------- ToscaWidgets was originally developed by `Alberto Valverde Gonzalez`_ based on the work of the many people involved in developing, testing and designing TurboGears' Widgets. TG Widget's original design was made by TurboGears' author, `Kevin Dangoor`_ . **Michele Cella** and Alberto worked hard to push TG's implementation to where it now stands. Several people have contributed to ToscaWidgets itself and external widget packages. Community --------- ToscaWidgets' community interacts in the `toscawidgets-discuss`_ Google Group. It's not rare to see discussion in Turbogears and Pylons lists too. ToscaWidgets documentation, repository and Trac lives at http://toscawidgets.org/ Running the tests ----------------- The test suite can be executed by running the `test` `setuptools` command:: $ python setup.py test .. warning:: The tests cannot be executed with `nosetests` ATM. This issue is not trivial to fix but will be fixed before 1.0 .. _Alberto Valverde Gonzalez: mailto:alberto@toscat._nospam_.net .. _Kevin Dangoor: http://www.blueskyonmars.com/ .. _toscawidgets-discuss: http://groups.google.com/group/toscawidgets-discuss Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Web Environment Classifier: Environment :: Web Environment :: ToscaWidgets Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Internet :: WWW/HTTP :: WSGI Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware Classifier: Topic :: Software Development :: Widget Sets Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/0000755000175000017500000000000011224437421020213 5ustar zackzackpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_template.py0000644000175000017500000000205111175375027023602 0ustar zackzackimport os import datetime from pkg_resources import get_distribution, require require("PasteScript") from paste.script.templates import Template, var class ToscaWidgetsTemplate(Template): _template_dir = os.path.join(get_distribution('ToscaWidgets').location, 'tw', 'paste_templates', 'widget_template') summary = "ToscaWidgets widget" vars = [ var('widget_name', 'Name of the widget package (tw.XXX)'), var('version', 'Version', default='0.1a0'), var('description', 'One-line description of the widget'), var('long_description', 'Multi-line description (in reST)'), var('author', 'Author name'), var('author_email', 'Author email'), var('url', 'URL of homepage'), var('license_name', 'License name'), ] def run(self, command, output_dir, vars): vars['year'] = str(datetime.datetime.now().year) vars['package'] = vars['widget_name'] or vars['package'] super(ToscaWidgetsTemplate, self).run(command, output_dir, vars) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/0000755000175000017500000000000011224437421021143 5ustar zackzackpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/resources.py0000644000175000017500000003411311175375027023541 0ustar zackzackimport threading import logging import os import errno import string import heapq import mimetypes from operator import itemgetter from itertools import izip, chain, imap from pkg_resources import resource_filename, working_set, Requirement, \ resource_stream import tw from tw.core.base import Widget from tw.core.util import Enum, OrderedSet, RequestLocalDescriptor __all__ = [ "Resource", "Link", "JSLink", "CSSLink", "Source", "JSSource", "CSSSource", "locations", "merge_resources", "retrieve_resources", "JSFunctionCalls", "IECSSLink", "IECSSSource", "IEJSLink", "IEJSSource", "JSMixin", "CSSMixin" ] log = logging.getLogger(__name__) from webob import Request, Response class ResourcesApp(object): def __init__(self, prefix='/resources', bufsize=4*1024): self._lock = threading.Lock() self._dirs = [] self.prefix = prefix self.bufsize = bufsize def _is_registered(self, webdir, dirname): for old_wd, old_dn in self: if webdir == old_wd: if dirname != old_dn: raise ValueError("%s is already regsitered for %s" % (webdir, old_dn)) else: return True return False def register(self, modname, filename): if isinstance(modname, Requirement): modname = os.path.basename(working_set.find(modname).location) basename = os.path.basename(filename) dirname = os.path.dirname(filename) parts = ['', modname] + filter(None, dirname.split('/')) webdir = '/'.join(parts) self._lock.acquire() try: if not self._is_registered(webdir, dirname): heapq.heappush(self._dirs, (len(webdir), (webdir, dirname))) log.debug("Regsitered %s at %s", dirname, webdir) finally: self._lock.release() url = '/'.join([self.prefix, webdir.strip('/'), basename]) return webdir, dirname, url def get_prefixed(self): return tuple((self.prefix + k, v) for k,v in self) def __iter__(self): return imap(itemgetter(1), heapq.nlargest(len(self._dirs), self._dirs)) def __call__(self, environ, start_response): req = Request(environ) path_info = req.path_info resp = self.serve_file(req) resp = resp or Response(status="404 Not Found") return resp(environ, start_response) def serve_file(self, req): stream, ct, enc = self.get_stream_type_encoding(req.path_info) if stream: resp = Response(request=req, app_iter=stream, content_type=ct) if enc: resp.content_type_params['charset'] = enc expires = int(req.environ.get('toscawidgets.resources_expire', 0)) resp.cache_expires(expires) return resp else: return Response(status="404 Not Found") def is_resource(self, path_info): for webdir, dirname in self: if path_info.startswith(webdir): return True return False def get_stream_type_encoding(self, path_info): if not self.is_resource(path_info): return None, None, None parts = filter(None, path_info.split('/')) modname, relative_path = parts[0], '/'.join(parts[1:]) try: stream = resource_stream(modname, relative_path) ct, enc = mimetypes.guess_type(os.path.basename(relative_path)) stream = _FileIter(stream, self.bufsize) except IOError, e: # For some reason pkg_resources sometimes sets errno to 0 # when resource can't be found if e.errno != 0 and e.errno != errno.ENOENT: raise stream, ct, enc = None, None, None return stream, ct, enc class _FileIter(object): def __init__(self, fileobj, bufsize): self.fileobj = fileobj self.bufsize = bufsize def __iter__(self): return self def next(self): buf = self.fileobj.read(self.bufsize) if not buf: raise StopIteration return buf def close(self): self.fileobj.close() registry = ResourcesApp() #------------------------------------------------------------------------------ # Base class for all resources #------------------------------------------------------------------------------ class Resource(Widget): """ A resource for your widget, like a link to external JS/CSS or inline source to include at the page the widget is displayed. It has the following parameters: `location` Location on the page where the resource should be placed. Available locations can be queried at ``Resource.valid_locations`` """ valid_locations = Enum('head','headbottom', 'bodytop', 'bodybottom') location = valid_locations.head def add_for_location(self, location): return location == self.location def inject(self): """ Push this resource into request-local so it is injected to the page """ tw.framework.register_resources(self.retrieve_resources()) def register_resources(self): # A Resource is registered by other widgets, not by itself. pass locations = Resource.valid_locations #------------------------------------------------------------------------------ # Utility Mixins #------------------------------------------------------------------------------ class CSSMixin: params = ["media"] media = "all" def post_init(self, *args, **kw): self._resources.add(self) class JSMixin: def post_init(self, *args, **kw): self._resources.add(self) class IEMixin: params = ["version"] version = '' _trans_table = ( ('>=', '>', '<=', '<'), ('gte ', 'gt ', 'lte ', 'lt ')) def _extend_template(self, d): d.version = str(d.version) for i, s in enumerate(self._trans_table[0]): d.version = d.version.replace(s, self._trans_table[1][i]) s = ('', ' ')[int(bool(d.version))] d.template = ""%(s,self.template) #------------------------------------------------------------------------------ # Links #------------------------------------------------------------------------------ class Link(Resource): """ A link to an external resource, like a a JS or CSS file stored in the filesystem. Widgets automatically use the framework to register the directory where the resource is located so be careful that those directories contains no private data! """ params = { 'link': 'Use this to specify an external link. If provided this will '\ 'be used as-is as the resources URL. modname and filename '\ 'will be ignored.', 'filename': "The relative path (from the module's or distribution's "\ "path) of the file the Link should link to.", 'modname': "The module that contains the Widget declaration. "\ "If not given, it defaults to the name of the module where "\ "the Link is declared. Must be an existent module name. "\ "You can also pass a pkg_resources.Requirement instance to "\ "point to the root of an egg distribution." } _link = None filename = None modname = None def __init__(self, *args, **kw): super(Link, self).__init__(*args, **kw) if not self.is_external: modname = self.modname or self.__module__ self.webdir, self.dirname, self.link = registry.register( modname, self.filename ) else: self.link = kw.get('link') @property def is_external(self): return not bool(self.filename and self.modname) def _get_link(self): if self.is_external: return self._link return tw.framework.url(self._link or '') def _set_link(self, link): self._link = link link = property(_get_link, _set_link) def __hash__(self): return hash(self.link) def __eq__(self, other): return getattr(other, "link", None) == self.link class CSSLink(Link,CSSMixin): """ A link to an external CSS file. """ template = """\ """ class IECSSLink(CSSLink, IEMixin): def update_params(self, d): CSSLink.update_params(self, d) self._extend_template(d) class JSLink(Link, JSMixin): template = """""" class IEJSLink(JSLink, IEMixin): def update_params(self, d): JSLink.update_params(self, d) self._extend_template(d) #------------------------------------------------------------------------------ # Raw source Resources #------------------------------------------------------------------------------ class Source(Resource): """ An inlined chunk of source code Examples:: >>> class MySource(Source): ... template = "$src" ... src = "foo=$foo" ... source_vars = ["foo"] ... foo = "bar" ... >>> s = MySource() >>> s.render() u'foo=bar' >>> s = MySource(foo='zoo') >>> s.render() u'foo=zoo' >>> s.render(foo='foo') u'foo=foo' The whole source can also be overriden >>> s.render(src='foo') u'foo' """ params = { 'src': "A string with the source to include between the resource's "\ "tags. Can also be a template for string.Template. Any "\ "attribute listed at ``source_vars`` will be fetched from the "\ "instance or from the kw args to ``display`` or ``render`` "\ "into a dictionary to provide values to fill in." } def __new__(cls, *args, **kw): """Support positional params. (src)""" src = None parent = None if len(args) > 0: src = args[0] kw.setdefault('src', src or getattr(cls, 'src', None)) if len(args) > 1: parent = args[1] return Resource.__new__(cls, None, parent, [], **kw) def update_params(self,d): super(Source, self).update_params(d) src = d.get('src') if src: source_vars = dict( v for v in [(k, getattr(self,k,None)) for k in self.source_vars] ) source_vars.update( v for v in d.iteritems() if v[0] in self.source_vars ) d['src'] = string.Template(src).safe_substitute(**source_vars) def __hash__(self): return hash(self.src) def __eq__(self, other): return self.src == getattr(other, "src", None) class CSSSource(Source, CSSMixin): """ An inlined chunk of CSS source code. """ template = """""" class IECSSSource(CSSSource, IEMixin): def update_params(self, d): super(IECSSSource, self).update_params(d) self._extend_template(d) class JSSource(Source, JSMixin): """ An inlined chunk of JS source code. """ template = """""" class IEJSSource(JSSource, IEMixin): def update_params(self, d): JSSource.update_params(self, d) self._extend_template(d) class JSFunctionCalls(JSSource): params = ["function_calls"] function_calls = [] def __init__(self, id=None, parent=None, children=[], **kw): super(JSFunctionCalls, self).__init__(id, parent, children, **kw) self.src = "\n%s\n" % "\n".join(map(str, self.function_calls)) class JSDynamicFunctionCalls(JSFunctionCalls): params = ["call_getter"] call_getter = lambda s, location: [] def update_params(self,d): super(JSDynamicFunctionCalls,self).update_params(d) # Keep in mind self._calls_for_request has calls for *all* widgets d.src = "\n%s\n" % "\n".join( map(str, chain(self.call_getter(self.location), d.function_calls)) ) # Since our src is generated dynamically base hash and equality on id def __hash__(self): return id(self) def __eq__(self, other): return id(self) == id(other) # Utilities to retrieve resources def merge_resources(to, from_): """ In-place merge all resources from ``from_`` into ``to``. Resources from ``to_`` will come first in each resulting OrderedSet. """ for k in locations: from_location = from_.get(k) if from_location: to.setdefault(k, OrderedSet()).add_all(from_location) return to def retrieve_resources(obj): """Recursively retrieve resources from obj""" ret = {} if getattr(obj, 'retrieve_resources', None): ret = obj.retrieve_resources() elif getattr(obj, 'itervalues', None): ret = retrieve_resources(obj.itervalues()) elif getattr(obj, '__iter__', None): ret = reduce(merge_resources, imap(retrieve_resources, iter(obj)), {}) return ret class DynamicCalls(object): _calls_for_request = RequestLocalDescriptor('_calls_for_request') def __init__(self): self.call_widgets = {} for l in locations: #XXX A circular-ref is probably created here with 'call_getter' but # since we're a module-level singleton we don't care much w = JSDynamicFunctionCalls('dynamic_js_calls_for_'+l, location=l, call_getter=self._get_calls_for_request) self.call_widgets[l] = w def reset(self): del self._calls_for_request def inject_call(self, call, location="bodybottom"): self._get_calls_for_request(location).append(call) self.call_widgets[location].inject() def _get_calls_for_request(self, location): try: self._calls_for_request except AttributeError: log.debug("Initializing calls for request") self._calls_for_request = dict((l,[]) for l in locations) return self._calls_for_request[location] dynamic_js_calls = DynamicCalls() python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/testutil.py0000644000175000017500000001115411175375027023404 0ustar zackzackimport sys import doctest from new import instancemethod from glob import glob from unittest import TestCase from itertools import imap, chain from tw.core.util import install_framework import pkg_resources __all__ = [ "RequireMixin", "WidgetMixin", "WidgetTestCase", "WidgetRequireTestCase", "get_doctest_suite", ] class RequireMixin(object): """ Doesn't run the tests in the TestCases that inherit from this mixin class if the package requisites in 'require' are not met. """ require = [] def __init__(self, *args, **kw): try: pkg_resources.require(*self.require) except pkg_resources.DistributionNotFound: name = ':'.join([self.__class__.__module__, self.__class__.__name__]) reqs = self.require self._message_displayed = False def dummy_run(self, result=None): if not self._message_displayed: print >> sys.stderr, "Skipping all tests in %s due to missing " \ "requirements: %r" % (name, reqs) self._message_displayed = True self.run = instancemethod(dummy_run, self, self.__class__) TestCase.__init__(self, *args, **kw) class WidgetMixin(object): widget_kw = {} def setUp(self): install_framework(force=True) if hasattr(self, 'TestWidget'): self.widget = self.TestWidget('test', **self.widget_kw) def tearDown(self): if hasattr(self, 'TestWidget'): del self.widget def assertInOutput(self, strings, *args, **kw): output = self.widget.render(*args, **kw) if isinstance(strings, basestring): strings = [strings] for s in strings: self.failUnless(s in output, "%s\n\n%r not in output" %(output,s)) def assertInOutputIC(self, strings, *args, **kw): output = self.widget.render(*args, **kw).lower() if isinstance(strings, basestring): strings = [strings] for s in strings: s = s.lower() self.failUnless(s in output, "%s\n\n%r not in output" %(output,s)) def assertNotInOutput(self, strings, *args, **kw): output = self.widget.render(*args, **kw) if isinstance(strings, basestring): strings = [strings] for s in strings: self.failUnless( s not in output, "%s\n\n%r in output" %(output,s) ) def assertNotInOutputIC(self, strings, *args, **kw): output = self.widget.render(*args, **kw).lower() if isinstance(strings, basestring): strings = [strings] for s in strings: s = s.lower() self.failUnless( s not in output, "%s\n\n%r in output" %(output,s) ) def assertInStaticCalls(self, strings): """Asserts given strings are included in the widget's static js calls.""" from tw.core.resources import JSFunctionCalls calls = JSFunctionCalls(function_calls=self.widget._js_calls) output = calls.render() if isinstance(strings, basestring): strings = [strings] for s in strings: self.failUnless( s in output, "%s\n\n%r not in static calls" %(output,s) ) def assertInDynamicCalls(self, strings, *args, **kw): """Asserts given strings are included in the widget's dynamic js calls.""" from tw.core.resources import dynamic_js_calls location = kw.pop('location', 'bodybottom') self.widget.render(*args, **kw) output = dynamic_js_calls.call_widgets[location].render() if isinstance(strings, basestring): strings = [strings] for s in strings: self.failUnless( s in output, "%s\n\n%r not in dynamic calls" %(output,s) ) class WidgetTestCase(WidgetMixin, TestCase): pass class WidgetRequireTestCase(RequireMixin, WidgetTestCase): pass def get_doctest_suite(doctest_files, doctest_modules): doctest_files = chain(*(imap(glob, doctest_files))) suite = doctest.DocFileSuite( *tuple(doctest_files), **{'optionflags':doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE, 'module_relative':False, } ) for mod in doctest_modules: try: suite.addTests(doctest.DocTestSuite( mod, **{'optionflags':doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE} )) except ValueError: pass # Mod has probably no doctests... ignore it return suite python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/js.py0000644000175000017500000001624111175375027022145 0ustar zackzack""" Python-JS interface to dynamically create JS function calls from your widgets. This moudle doesn't aim to serve as a Python-JS "translator". You should code your client-side code in JavaScript and make it available in static files which you include as JSLinks or inline using JSSources. This module is only intended as a "bridge" or interface between Python and JavaScript so JS function **calls** can be generated programatically. """ import sys import logging from itertools import imap import simplejson.encoder __all__ = ["js_callback", "js_function", "js_symbol", "encode"] log = logging.getLogger(__name__) class TWEncoder(simplejson.encoder.JSONEncoder): """A JSON encoder that can encode Widgets, js_calls, js_symbols and js_callbacks. Example:: >>> encode = TWEncoder().encode >>> print encode({'onLoad': js_function("do_something")(js_symbol("this"))}) {"onLoad": do_something(this)} >>> from tw.api import Widget >>> w = Widget("foo") >>> args = {'onLoad': js_callback(js_function('jQuery')(w).click(js_symbol('onClick')))} >>> print encode(args) {"onLoad": function(){jQuery(\\"foo\\").click(onClick)}} >>> print encode({'args':args}) {"args": {"onLoad": function(){jQuery(\\"foo\\").click(onClick)}}} """ def __init__(self, *args, **kw): self.pass_through = (_js_call, js_callback, js_symbol, js_function) super(TWEncoder, self).__init__(*args, **kw) def default(self, obj): if isinstance(obj, self.pass_through): return self.mark_for_escape(obj) elif hasattr(obj, '_id'): return str(obj.id) return super(TWEncoder, self).default(obj) def encode(self, obj): encoded = super(TWEncoder, self).encode(obj) return self.unescape_marked(encoded) def mark_for_escape(self, obj): return '*#*%s*#*' % obj def unescape_marked(self, encoded): return encoded.replace('"*#*','').replace('*#*"', '') class js_symbol(object): def __init__(self, name): self._name = name def __str__(self): return str(self._name) class js_callback(object): """A js function that can be passed as a callback to be called by another JS function Examples: .. sourcecode:: python >>> str(js_callback("update_div")) 'update_div' >>> str(js_callback("function (event) { .... }")) 'function (event) { .... }' # Can also create callbacks for deferred js calls >>> str(js_callback(js_function('foo')(1,2,3))) 'function(){foo(1, 2, 3)}' # Or equivalently >>> str(js_callback(js_function('foo'), 1,2,3)) 'function(){foo(1, 2, 3)}' # A more realistic example >>> jQuery = js_function('jQuery') >>> my_cb = js_callback('function() { alert(this.text)}') >>> on_doc_load = jQuery('#foo').bind('click', my_cb) >>> call = jQuery(js_callback(on_doc_load)) >>> print call jQuery(function(){jQuery(\\"#foo\\").bind(\\"click\\", function() { alert(this.text)})}) """ def __init__(self, cb, *args): if isinstance(cb, basestring): self.cb = cb elif isinstance(cb, js_function): self.cb = "function(){%s}" % cb(*args) elif isinstance(cb, _js_call): self.cb = "function(){%s}" % cb else: self.cb = '' def __call__(self, *args): raise TypeError("A js_callback cannot be called from Python") def __str__(self): return self.cb class js_function(object): """A JS function that can be "called" from python and and added to a widget by widget.add_call() so it get's called every time the widget is rendered. Used to create a callable object that can be called from your widgets to trigger actions in the browser. It's used primarily to initialize JS code programatically. Calls can be chained and parameters are automatically json-encoded into something JavaScript undersrtands. Example:: .. sourcecode:: python >>> jQuery = js_function('jQuery') >>> call = jQuery('#foo').datePicker({'option1': 'value1'}) >>> str(call) 'jQuery("#foo").datePicker({"option1": "value1"})' Calls are added to the widget call stack with the ``add_call`` method. If made at Widget initialization those calls will be placed in the template for every request that renders the widget. .. sourcecode:: python >>> from tw.api import Widget >>> class SomeWidget(Widget): ... params = ["pickerOptions"] ... pickerOptions = {} ... def __init__(self, *args, **kw): ... super(SomeWidget, self).__init__(*args, **kw) ... self.add_call( ... jQuery('#%s' % self.id).datePicker(self.pickerOptions) ... ) If we want to dynamically make calls on every request, we ca also add_calls inside the ``update_params`` method. .. sourcecode:: python >>> class SomeWidget(Widget): ... params = ["pickerOptions"] ... pickerOptions = {} ... def update_params(self, d): ... super(SomeWidget, self).update_params(d) ... self.add_call( ... jQuery('#%s' % d.id).datePicker(d.pickerOptions) ... ) This would allow to pass different options to the datePicker on every display. JS calls are rendered by the same mechanisms that render required css and js for a widget and places those calls at bodybottom so DOM elements which we might target are available. Examples: .. sourcecode:: python >>> call = js_function('jQuery')("a .async") >>> str(call) 'jQuery("a .async")' # js_function calls can be chained: >>> call = js_function('jQuery')("a .async").foo().bar() >>> str(call) 'jQuery("a .async").foo().bar()' """ def __init__(self, name): self.__name = name def __call__(self, *args): return _js_call(self.__name, [], args, called=True) class _js_call(object): __slots__ = ('__name', '__call_list', '__args', '__called') def __init__(self, name, call_list, args=None, called=False): self.__name = name self.__args = args call_list.append(self) self.__call_list = call_list self.__called = called def __getattr__(self, name): return self.__class__(name, self.__call_list) def __call__(self, *args): self.__args = args self.__called = True return self def __get_js_repr(self): if self.__called: args = self.__args return '%s(%s)' % (self.__name, ', '.join(imap(encode, args))) else: return self.__name def __str__(self): if not self.__called: raise TypeError('Last element in the chain has to be called') return '.'.join(c.__get_js_repr() for c in self.__call_list) def __unicode__(self): return str(self).decode(sys.getdefaultencoding()) encode = TWEncoder().encode python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/meta.py0000644000175000017500000001075011175375027022456 0ustar zackzackimport inspect from pkg_resources import iter_entry_points from tw.core.util import pre_post_hooks from tw.core.exceptions import * __all__ = [ "WidgetType", "WidgetsList"] class WidgetType(type): def __new__(meta,name,bases,dct): dct['_cls_children'] = dct.pop('children',_children_from_bases(bases)) if isinstance(dct.get('params'), dict): for param_name, doc in dct['params'].iteritems(): dct[param_name+'__doc'] = doc params = frozenset_from_all_bases(dct,bases,'params') frozenset_from_all_bases(dct,bases,'source_vars') __init__ = dct.pop('__init__', None) if __init__: dct['__init__'] = pre_post_hooks(None, 'post_init')(__init__) new = type.__new__(meta,name,bases,dct) return new @classmethod def iter_classes(meta): """Iterates over all the Widget subclasses in the modules that are declared as `toscawidgets.widgets` entrypoints >>> from tw.api import Widget >>> len(list(Widget.iter_classes())) > 0 True """ seen = set() for ep in iter_entry_points('toscawidgets.widgets'): try: mod = ep.load(False) except ImportError, e: continue for name in dir(mod): obj = getattr(mod, name) if isinstance(obj, meta) and obj not in seen: seen.add(obj) yield obj def _children_from_bases(bases): for base in bases: if hasattr(base, '_cls_children'): return base._cls_children return [] def frozenset_from_all_bases(clsdct, bases, name): _set = set(clsdct.pop(name,[])) [_set.update(getattr(b,name)) for b in bases if hasattr(b, name)] fs = clsdct[name] = frozenset(_set) return fs class WidgetsListType(type): def __new__(meta,name,bases,dct): clones = [] for id, w in dct.items(): if hasattr(w,'_serial') and hasattr(w, 'clone'): dct.pop(id) clones.append((w._serial, id, w.clone) ) clones.sort() def __init__(self, clones=clones): # we instantiate the clones on initialization widgets = [w[2](id=w[1]) for w in clones] self.extend(widgets) dct.update({'__slots__':[], '__init__':__init__}) return type.__new__(meta,name,bases,dct) def __add__(self, other): if isinstance(self, list) and isinstance(other,list): return list.__add__(self,other) elif isinstance(self, list) and inspect.isclass(other): return list.__add__(self,other()) elif inspect.isclass(self) and isinstance(other,list): return list.__add__(self(),other) elif inspect.isclass(self) and inspect.isclass(other): return list.__add__(self(),other()) def __radd__(self, other): if isinstance(self, list) and isinstance(other,list): return list.__add__(other,self) elif isinstance(self, list) and inspect.isclass(other): return list.__add__(other(),self) elif inspect.isclass(self) and isinstance(other,list): return list.__add__(other,self()) elif inspect.isclass(self) and inspect.isclass(other): return list.__add__(other(),self()) class WidgetsList(list): """ Syntactic sugar for declaring a list of widgets. >>> from tw.api import Widget >>> class Widgets(WidgetsList): ... a = Widget() ... b = Widget() ... c = Widget() ... >>> widgets = Widgets() >>> [w.id for w in widgets] ['a', 'b', 'c'] WidgetsLists can be passed to another widget as children by the instance or the class. >>> w = Widget('foo', children=widgets) >>> [c.id for c in w.children] ['foo_a', 'foo_b', 'foo_c'] >>> w = Widget('foo', children=Widgets) >>> [c.id for c in w.children] ['foo_a', 'foo_b', 'foo_c'] WidgetsLists subclasses can also be added to reuse common widgets >>> class Widgets2(WidgetsList): ... d = Widget() ... >>> widgets = Widgets + Widgets2 >>> [w.id for w in widgets] ['a', 'b', 'c', 'd'] >>> widgets = Widgets2 + Widgets >>> [w.id for w in widgets] ['d', 'a', 'b', 'c'] """ __metaclass__ = WidgetsListType if __name__ == "__main__": import doctest doctest.testmod() python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/mako_util.py0000644000175000017500000000244611217773107023515 0ustar zackzackimport unicodedata from mako.runtime import Undefined from cgi import escape #from mako.filters import xml_escape __all__ = ["attrs", "content"] _BOOLEAN_ATTRS = frozenset(['selected', 'checked', 'compact', 'declare', 'defer', 'disabled', 'ismap', 'multiple', 'nohref', 'noresize', 'noshade', 'nowrap']) def attrs(context, args=None, attrs=None): # Emulates Genshi's AttrsDirective (poorly) if isinstance(args, dict): args = args.items() if not args: args = [] else: args = args[:] if attrs: args.extend(attrs.items()) bools = _BOOLEAN_ATTRS return u" ".join([u'%s="%s"' % (k, escape(unicode(k in bools and k or v), True)) for k,v in args if (k not in bools and v is not None) or (k in bools and v)]) def content(context, value): if value is None: return "" else: return escape(unicode(value)) def safe_str(context, value): """Converts value to its string representation, if unicode it makes it ascii safe by converting characters above 128 to their <128 equivalents.""" if isinstance(value, unicode): return ''.join(unicodedata.normalize("NFD",c)[0] for c in value) else: return str(value) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/command.py0000644000175000017500000002631611175375027023153 0ustar zackzackimport errno import re import operator import shutil import sys import os import tempfile import subprocess try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import pkg_resources from setuptools import Command from tw.core.resources import registry class archive_tw_resources(Command): """Setuptools command to copy and optionally compress all static resources from a series of distributions and their dependencies into a directory where they can be served by a fast web server. To enable compression of CSS and JS files you will need to have installed a Java Runtime Environment and YUICompressor (http://www.julienlecomte.net/yuicompressor) In order for resources from widget eggs to be properly collected these need to have a 'toscawidgets.widgets' 'widgets' entry-point which points to a module which, when imported, instantiates all needed JS and CSS Links. The result is laid out in the output directory in such a way that when a a web server such as Apache or Nginx is configured to map URLS that begin with /toscawidgets to that directory static files will be served from there bypassing python completely. To integrate this command into your build process you can add these lines to ``setup.cfg``:: [archive_tw_resources] output = /home/someuser/public_html/toscawidgets/ compresslevel = 2 distributions = MyProject yuicompressor = /home/someuser/bin/yuicompressor.jar onepass = true [aliases] deploy = archive_tw_resources --force install This way you can run:: $ python setup.py deploy To install a new version of your app and copy/compress resources. """ description = "Copies ToscaWidgets static resources into a directory where"\ " a fast web-server can serve them." user_options = [ ("output=", "o", "Output directory. If it doesn't exist it will be created."), ("force", "f", "If output dir exists, it will be ovewritten"), ("onepass", None, "If given, yuicompressor will only be called once "\ "for each kind of file with a all files "\ "together and then separated back into smaller "\ "files"), ("compresslevel=", "c", "Compression level: 0) for no compression (default). "\ "1) for js-minification. "\ "2) for js & css compression"), ("yuicompressor=", None, "Name of the yuicompressor jar."), ("distributions=", "d", "List of widget dists. to include resources from " "(dependencies will be handled recursively). Note that " "these distributions need to define a 'toscawidgets.widgets' " "'widgets' entrypoint pointing to a a module where " "resources are located."), ] def initialize_options(self): self.output = '' self.force = False self.onepass = False self.compresslevel = 0 self.distributions = [] self.yuicompressor = 'yuicompressor.jar' def finalize_options(self): self.ensure_string("output") self.ensure_string("yuicompressor") self.ensure_string_list("distributions") self.compresslevel = int(self.compresslevel) self.yuicompressor = os.path.abspath(self.yuicompressor) def run(self): if not self.output: print >> sys.stderr, "Need to specify an output directory" return if not self.distributions: print >> sys.stderr, "Need to specify at least one distribution" return if os.path.exists(self.output) and not self.force: print >> sys.stderr, ("Destination dir %s exists. " % self.output)+\ "Use -f to ovewrite" return if self.compresslevel > 0 and not os.path.exists(self.yuicompressor): print >> sys.stderr, "Could not find YUICompressor at " + \ self.yuicompressor return tempdir = tempfile.mktemp() self.execute(os.makedirs, (tempdir,), "Creating temp dir %s" % tempdir) if self.compresslevel > 0: if self.onepass: self.writer = OnePassCompressingWriter(self, tempdir) else: self.writer = CompressingWriter(self, tempdir) else: self.writer = FileWriter(self, tempdir) self.execute(self._copy_resources, tuple(), "Extracting resources") self.writer.finalize() if os.path.exists(self.output): self.execute(shutil.rmtree, (self.output,), "Deleting old output dir %s" % self.output) self.execute(os.makedirs, (self.output,), "Creating output dir") final_dest = os.path.join(self.output, registry.prefix.strip('/')) self.execute(shutil.move, (tempdir, final_dest), "Moving build to %s" % final_dest) def _load_widgets(self, distribution): try: requires = [r.project_name for r in pkg_resources.get_distribution(distribution).requires()] map(self._load_widgets, requires) mod = pkg_resources.load_entry_point(distribution, 'toscawidgets.widgets', 'widgets') self.announce("Loaded %s" % mod.__name__) except ImportError: self.announce("%s has no widgets entrypoint" % distribution) def _copy_resources(self): map(self._load_widgets, self.distributions) for webdir, dirname in registry: parts = filter(None, webdir.split('/')) modname = parts[0] fname = '/'.join(parts[1:]) self.execute(self._copy_resource_tree, (modname, fname), "Copying %s recursively into %s" % (dirname, self.writer.base)) def _copy_resource_tree(self, modname, fname): try: for name in pkg_resources.resource_listdir(modname, fname): name = '/'.join((fname, name)) rel_name = '/'.join((modname, name)) if pkg_resources.resource_isdir(modname, name): self.execute(self._copy_resource_tree, (modname, name), "Recursing into " + rel_name) else: stream = pkg_resources.resource_stream(modname, name) filename = '/'.join((modname, name)) self.execute(self.writer.write_file, (stream, filename), "Processing " + filename) stream.close() except OSError, e: if e.errno == errno.ENOENT: self.warn("Could not copy %s" % repr((modname, fname, e))) class FileWriter(object): def __init__(self, cmd, base): self.base = base self.cmd = cmd def finalize(self): pass def write_file(self, stream, path): final = os.path.join(self.base, path) if not os.path.exists(os.path.dirname(final)): os.makedirs(os.path.dirname(final)) dest = open(final, 'wb') self.announce("Writting %s" % path) shutil.copyfileobj(stream, dest) dest.close() # Delegate methods to Command for name in "warn announce error execute".split(): exec """\ def %(name)s(self, *args, **kw): return self.cmd.%(name)s(*args, **kw) """ % locals() class CompressingWriter(FileWriter): def __init__(self, *args, **kw): super(CompressingWriter, self).__init__(*args, **kw) self.counters = 0, 0 def finalize(self): try: avg = reduce(operator.truediv, self.counters) * 100 msg = "Total JS&CSS compressed size is %.2f%% of original" % avg self.announce(msg) except ZeroDivisionError: # No files were compressed pass def compress(self, stream, path): typ = path.split('.')[-1] if typ not in ('css', 'js'): return stream args = ['java', '-jar', self.cmd.yuicompressor, '--type', typ] if self.cmd.compresslevel < 2: args.append('--nomunge') args.append('--charset=utf8') p = subprocess.Popen(args, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) self.announce("Compressing %s" % path) buffer = StringIO() shutil.copyfileobj(stream, buffer) data = buffer.getvalue() if not data: return buffer stdout, stderr = p.communicate(data) if p.returncode != 0: self.warn("Failed to compress %s: %d" % (path, p.returncode)) self.warn("File will be copied untouched") sys.stderr.write(stderr) sys.stderr.write(stdout) stream.seek(0) else: count = len(stdout), len(data) ratio = reduce(operator.truediv, count) self.counters = map(sum, zip(self.counters, count)) msg = "Compressed %s (New size: %.2f%%)" % (path, ratio*100) self.announce(msg) stream = StringIO(stdout) return stream def write_file(self, stream, path): stream = self.compress(stream, path) return super(CompressingWriter, self).write_file(stream, path) class OnePassCompressingWriter(CompressingWriter): def __init__(self, *args, **kw): super(OnePassCompressingWriter, self).__init__(*args, **kw) #XXX This comment trick only works with JS as of YUICompressor 2.3.5 self._caches = {'js': StringIO()} self._marker = "/*! MARKER #### %(path)s #### MARKER */" regexp = r"^\/\* MARKER #### (?P.*?) #### MARKER \*\/$" self._re = re.compile(regexp) def _demultiplex(self, stream): cur_file = None buffer = StringIO() stream.seek(0) for line in stream: m = self._re.match(line) if m: if cur_file: buffer.seek(0) FileWriter.write_file(self, buffer, cur_file) buffer.truncate(0) cur_file = m.group('path') else: buffer.write(line) def finalize(self): self.announce("Compressing all defered files") for typ, cache in self._caches.iteritems(): cache.seek(0) # self.compress only wants to know the file extension to see # what kind of file it is, we pass a dummy one compressed = self.compress(cache, '__defered__.'+typ) self._demultiplex(compressed) super(OnePassCompressingWriter, self).finalize() def write_file(self, stream, path): typ = path.split('.')[-1] cache = self._caches.get(typ) if not cache: self.announce("Will not consider %s for onepass" % path) return CompressingWriter.write_file(self, stream, path) print >> cache, self._marker % locals() self.announce("Defering %s for compression in one pass" % path) shutil.copyfileobj(stream, cache) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/util.py0000644000175000017500000004006511211320500022460 0ustar zackzackimport inspect import re import sys import warnings import time import weakref from itertools import count, izip __all__ = [ "OrderedSet", "RequestLocalDescriptor", "lazystring", "asbool", "LRUCache", "disable_runtime_checks", ] # Stolen from PasteDeploy def asbool(obj): if isinstance(obj, (str, unicode)): obj = obj.strip().lower() if obj in ['true', 'yes', 'on', 'y', 't', '1']: return True elif obj in ['false', 'no', 'off', 'n', 'f', '0']: return False else: raise ValueError( "String is not true/false: %r" % obj) return bool(obj) def assert_bool_attr(name, state, exc): """ Raises 'exc' if given flag is not equal to 'state'. """ def entangle(func): def wrapper(self, *args, **kw): if getattr(self,name) == state: return func(self, *args, **kw) raise exc wrapper.func_name = func.func_name wrapper.__dict__ = func.__dict__.copy() return wrapper return entangle def pre_post_wrapper(pre=None, post=None, lock=None): """ Decorates a method excecuting pre and post methods around it. Can be used to decorate the same method in different subclasses and takes care that pre is executed only once at the first cooperative call and post once at the end of the cooperative call-chain. >>> entries = 0 >>> exits = 0 >>> def pre(*args, **kw): global entries; entries += 1 >>> def post(*args, **kw): global exits; exits += 1 >>> class A(object): ... @pre_post_wrapper(pre, post) ... def say_name(self, name): ... print name >>> class B(A): ... @pre_post_wrapper(pre, post) ... def say_name(self, name): ... super(B, self).say_name(name) ... print name >>> class C(B): ... @pre_post_wrapper(pre, post) ... def say_name(self, name): ... super(C, self).say_name(name) ... print name >>> c = C() >>> c.say_name('foo') foo foo foo >>> entries 1 >>> exits 1 A reentrant lock can be passed to syncronize the wrapped method. It is a must if the instance is shared among several threads. """ def entangle(func): def wrapper(self, *args, **kw): counter_name = '__%s_wrapper_counter' % func.func_name if lock: lock.aquire() try: counter = getattr(self, counter_name, 0) + 1 setattr(self, counter_name, counter) if counter == 1 and pre: pre(self, *args, **kw) output = func(self, *args, **kw) counter = getattr(self, counter_name) setattr(self, counter_name, counter - 1) if counter == 1: delattr(self, counter_name) if post: post(self, *args, **kw) finally: if lock: lock.release() return output wrapper.func_name = func.func_name wrapper.__dict__ = func.__dict__.copy() return wrapper return entangle def pre_post_hooks(pre_name=None, post_name=None, lock=None): def entangle(func): def wrapper(self, *args, **kw): counter_name = '__%s_wrapper_counter' % func.func_name bases = list(inspect.getmro(self.__class__)) if lock: lock.aquire() try: counter = getattr(self, counter_name, 0) + 1 setattr(self, counter_name, counter) if counter == 1 and pre_name: for base in bases: try: # make sure we use the hook defined in base base.__dict__[pre_name](self, *args, **kw) except KeyError: pass output = func(self, *args, **kw) counter = getattr(self, counter_name) setattr(self, counter_name, counter - 1) if counter == 1: delattr(self, counter_name) if post_name: for base in bases: try: base.__dict__[post_name](self, *args, **kw) except KeyError: pass finally: if lock: lock.release() return output wrapper.func_name = func.func_name wrapper.__dict__ = func.__dict__.copy() return wrapper return entangle class CachedInspect(object): """ In general "inspect" calls are extremely expensive. However, if we cache them on an object by object basis, we should be able to speed things up a """ def __init__(self): self.functions = weakref.WeakKeyDictionary() self.methods = weakref.WeakKeyDictionary() self.argspec = weakref.WeakKeyDictionary() def is_function(self, obj): truth = self.functions.get(obj, None) if truth is None: truth = self.functions[obj] = inspect.isfunction(obj) return truth def is_method(self, obj): truth = self.methods.get(obj, None) if truth is None: truth = self.methods[obj] = inspect.ismethod(obj) return truth def getargspec(self, obj): spec = self.argspec.get(obj, None) if spec is None: spec = self.argspec[obj] = inspect.getargspec(obj) return spec callable_cache = CachedInspect() def callable_wo_args(obj): if callable(obj) and (callable_cache.is_function(obj) or callable_cache.is_method(obj)): argspec = callable_cache.getargspec(obj) args = argspec[0] defaults = argspec[3] arg_length = callable_cache.is_method(obj) and 1 or 0 return ( (args is not None and (len(args) == arg_length)) or (defaults is not None and len(args) == len(defaults)) ) return False _id_RE = re.compile(r'(\w+)+(?:-(\d))*') def unflatten_args(child_args): new = {} for k,v in child_args.iteritems(): splitted = k.split('.',1) id = splitted[0] if len(splitted) == 2: rest = splitted[1] if not id: new[rest] = v continue for_id = new.setdefault(id, {}) for_id.setdefault('child_args', {})[rest] = v else: for_id = new.setdefault(id,{}) for key, val in v.iteritems(): for_id.setdefault(key,val) convert = set() for k,v in new.items(): m = _id_RE.match(k) if not m: raise ValueError( "%r is not a valid id to reference a child" % k ) id, n = m.groups() if n is not None: new.pop(k,None) convert.add(id) for_id = new.setdefault(id, {}) for_id[int(n)] = v for k in convert: for_k = new[k] l = [] for n in count(): l.append(for_k.pop(n, {})) if not for_k: break new[k] = {'child_args':l} return new class OrderedSet(list): """Set preserving item order.""" def add(self, item): if item not in self: self.append(item) def add_all(self, iterable): for item in iterable: self.add(item) class _RaiseAttributeError: pass class ThreadSafeDescriptor(object): """Base class for threadsafe widget descriptors.""" class RequestLocalDescriptor(ThreadSafeDescriptor): """A descriptor that proxies to tw.framework.request_local for passing state among widgets in a thread-safe manner for the current request. Do not abuse this or code can become increasingly unmantainable! """ def __init__(self, name, default=_RaiseAttributeError, __doc__=None, qualify_with_id=False): """Proxy to request local storage attribute named by ``name``. If ``default`` is provided no AttributeError will be raised if attribute does not exist ar request local storage when getting or deleting. """ self.name = name self.default = default self.qualify_with_id = qualify_with_id self.__doc__ = __doc__ or "'%s' at request-local storage" % name def __get__(self, obj, typ=None): if obj is None: # If called on Widget class return descriptor return self import tw request_local = tw.framework.request_local name = self.name if self.qualify_with_id: name += "_%i" % id(obj) try: return getattr(request_local, name ) except AttributeError: if self.default is _RaiseAttributeError: raise else: try: value = self.default() except TypeError: value = self.default setattr(request_local, name, value) return value def __set__(self, obj, value): import tw request_local = tw.framework.request_local name = self.name if self.qualify_with_id: name += "_%i" % id(obj) setattr(request_local, name, value) def __delete__(self, obj): import tw request_local = tw.framework.request_local name = self.name if self.qualify_with_id: name += "_%i" % id(obj) try: delattr(request_local, name) except AttributeError: if self.default is _RaiseAttributeError: raise def install_framework(force=False): import tw if not hasattr(tw, 'framework') or force: from tw.core.registry import StackedObjectProxy, Registry from tw.mods import base dummy_framework = base.HostFramework() # start up a dummy request with dummy environ dummy_registry = Registry() dummy_registry.prepare() dummy_framework.start_request({ 'SCRIPT_NAME': '', 'toscawidgets.prefix': '/toscawidgets', 'paste.registry' : dummy_registry, }) tw.framework = StackedObjectProxy( dummy_framework, name='ToscaWidgetsFramework', ) class Enum(dict): """Less strict Enum than the one provided by TG""" def __init__(self, *args): for arg in args: self[arg]= arg def __getattr__(self, name): try: return self[name] except KeyError: raise AttributeError(name) class Bunch(dict): __setattr__ = dict.__setitem__ def __delattr__(self, name): try: del self[name] except KeyError: raise AttributeError(name) def __getattr__(self, name): try: return self[name] except KeyError: raise AttributeError(name) def make_bunch(d): """Converts a dict instance into a Bunch""" return Bunch(d) # Adapted form turbogears' class lazystring(object): """Has a number of lazily evaluated functions replicating a string. """ def __init__(self, string): self.string = string def eval(self): from tw import framework return framework.translator(self.string) def __unicode__(self): return unicode(self.eval()) def __str__(self): return str(self.eval()) def __mod__(self, other): return self.eval() % other def __cmp__(self, other): return cmp(self.eval(), other) def __eq__(self, other): return self.eval() == other class MultipleReplacer(object): """Performs several regexp substitutions on a string with a single pass. ``dct`` is a dictionary keyed by a regular expression string and with a callable as value that will get called to produce a subsituted value. The callable takes the matched text as first argument and may take any number of positional and keyword arguments. These arguments are any extra args passed when calling the instance. For performance, a single regular expression is built. Example:: >>> string = "aaaabbbcc" >>> replacer = MultipleReplacer({ ... 'a+':lambda g, context: g + context['after_a'], ... 'b+':lambda g, context: g + context['after_b'], ... 'c+':lambda g, context: context['before_c'] + g, ... }) >>> replacer("aaaabbbcc", dict( ... after_a = "1", ... after_b = "2", ... before_c = "3" ... )) 'aaaa1bbb23cc' """ def __init__(self, dct, options=0): self._raw_regexp = r"|".join("(%s)" % k for k in dct.keys()) self._substitutors = dct.values() self._regexp = re.compile(self._raw_regexp, options) def __repr__(self): return "<%s at %d (%r)>" % (self.__class__.__name__, id(self), self._raw_regexp) def _subsitutor(self, *args, **kw): def substitutor(match): for substitutor, group in izip(self._substitutors, match.groups()): if group is not None: return substitutor(group, *args, **kw) return substitutor def __call__(self, string, *args, **kw): return self._regexp.sub(self._subsitutor(*args, **kw), string) def iwarn(iterable, message, category=None, stacklevel=1): """Make an iterator that run warnings.warn(message, category, stacklevel) right before the first value from iterator is returned. """ warnings.warn(message, category, stacklevel) for x in iterable: yield x # Stolen from Mako class LRUCache(dict): """A dictionary-like object that stores a limited number of items, discarding lesser used items periodically. this is a rewrite of LRUCache from Myghty to use a periodic timestamp-based paradigm so that synchronization is not really needed. the size management is inexact. """ class _Item(object): def __init__(self, key, value): self.key = key self.value = value self.timestamp = time.time() def __repr__(self): return repr(self.value) def __init__(self, capacity, threshold=.5): self.capacity = capacity self.threshold = threshold def __getitem__(self, key): item = dict.__getitem__(self, key) item.timestamp = time.time() return item.value def values(self): return [i.value for i in dict.values(self)] def setdefault(self, key, value): if key in self: return self[key] else: self[key] = value return value def __setitem__(self, key, value): item = dict.get(self, key) if item is None: item = self._Item(key, value) dict.__setitem__(self, key, item) else: item.value = value self._manage_size() def _manage_size(self): while len(self) > self.capacity + self.capacity * self.threshold: bytime = dict.values(self) bytime.sort(lambda a, b: cmp(b.timestamp, a.timestamp)) for item in bytime[self.capacity:]: try: del self[item.key] except KeyError: # if we couldnt find a key, most likely some other thread broke in # on us. loop around and try again break def disable_runtime_checks(): """ Disables runtime checks for possible programming errors regarding modifying widget attributes once a widget has been initialized. This option can significantly reduce Widget initialization time. NOTE: This operation modifies the Widget class and will affect any application using ToscaWidgets in the same process. """ from tw.api import Widget del Widget.__setattr__ del Widget.__delattr__ if __name__ == "__main__": import doctest doctest.testmod() python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/middleware.py0000644000175000017500000001175011175375027023646 0ustar zackzackfrom urllib import unquote import pkg_resources from webob import Request import tw from tw.mods import base from tw.core import resources from tw.core.util import asbool __all__ = ["ToscaWidgetsMiddleware", "make_middleware"] class ToscaWidgetsMiddleware(object): """ This WSGI middleware piece takes care of creating a per-request context for ToscaWidgets and injecting resource links into html responses. It can also take care of serving those resources if `serve_resources` is True (default). """ def __init__(self, application, host_framework, prefix='/toscawidgets', inject_resources=True, serve_resources=True): self.host_framework = host_framework self.prefix = prefix self.serve_resources = serve_resources self.inject_resources = inject_resources self.application = application if self.inject_resources: from tw.core.resource_injector import injector_middleware self.application = injector_middleware(self.application) def __call__(self, environ, start_response): return self.wsgi_app(environ, start_response) def wsgi_app(self, environ, start_response): self.host_framework.start_request(environ) environ['paste.registry'].register(tw.framework, self.host_framework) #XXX Do we really need to stuff these in environ? environ['toscawidgets.prefix'] = self.prefix environ.setdefault('toscawidgets.framework', self.host_framework) req = Request(environ) try: if self.serve_resources and req.path_info.startswith(self.prefix): # Intercept request to possibly serve a static resource req.path_info = req.path_info[len(self.prefix):] req.script_name += self.prefix resources_app = resources.registry if req.path_info.startswith(resources_app.prefix): req.path_info = req.path_info[len(resources_app.prefix):] req.script_name += resources_app.prefix resp = req.get_response(resources_app) return resp(environ, start_response) else: # Pass request downstream resp = req.get_response(self.application) return resp(environ, start_response) finally: self.host_framework.end_request(environ) #TODO: Wrap to issue deprecation warnings TGWidgetsMiddleware = ToscaWidgetsMiddleware def _load_from_entry_point(name): for ep in pkg_resources.iter_entry_points('toscawidgets.host_frameworks'): if ep.name == name: return ep def _extract_args(args, prefix, adapters={}): l = len(prefix) nop = lambda v: v return dict((k[l:], adapters.get(k[l:], nop)(v)) for k,v in args.iteritems() if k.startswith(prefix)) def _load_host_framework(host_framework): if ':' not in host_framework: ep = _load_from_entry_point(host_framework) else: ep = pkg_resources.EntryPoint.parse("hf="+host_framework) if ep: hf = ep.load(False) else: hf = None if not hf: raise LookupError("Could not load %s" % host_framework) return hf def make_middleware(app, config=None, **kw): """ Initializes :class:`tw.core.middleware.ToscaWidgetsMiddleware` and a :class:`tw.mods.base.HostFramework` and wraps the WSGI application ``app`` with it. Configuration can be passed in a dict as the ``config`` parameter. **Available options:** toscawidgets.middleware.* These parameters will be passed to :class:`tw.core.middleware.ToscaWidgetsMiddleware` when instatntiating it. See its docstrings for details. toscawidgets.framework Name of the ``toscawidgets.host_frameworks`` entry point or :class:`tw.mods.base.HostFramework` subclass which shall interface with the framework. ``wsgi``, ``pylons`` are available. Default is ``wsgi`` toscawidgets.framework.* Parameters for the :class:`tw.modes.base.HostFramework`. See their respective docstrings for accepted parameters. This is the ToscaWidgets#middleware paste.filter_app_factory entrypoint. """ config = (config or {}).copy() config.update(kw) host_framework = config.pop('toscawidgets.framework', 'wsgi') if isinstance(host_framework, basestring): host_framework = _load_host_framework(host_framework) middleware_args = _extract_args(config, 'toscawidgets.middleware.', { 'inject_resources': asbool, 'serve_resources': asbool, }) hf_args = _extract_args(config, 'toscawidgets.framework.', { 'enable_runtime_checks': asbool, }) app = ToscaWidgetsMiddleware(app, host_framework=host_framework(**hf_args), **middleware_args) if config.get('stack_registry', False): from tw.core.registry import RegistryManager app = RegistryManager(app) return app python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/__init__.py0000644000175000017500000000036011175375027023263 0ustar zackzackfrom exceptions import * from meta import * from util import * from view import * from base import * from resources import * from resource_injector import * from js import * from middleware import make_middleware from tw.mods.base import * python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/engine_plugin.py0000644000175000017500000000503511175375027024353 0ustar zackzack""" Default engine plugin for TGWidgets. Based on BuffetString which is Copyright (c) 2006 Christian Wyglendowski """ import string import os from pkg_resources import resource_filename class ToscaWidgetsTemplatePlugin(object): # all template plugins need to define a default file extension extension = ".html" def __init__(self, extra_vars_func=None, config=None): """extra_vars_func == optional callable() that returns a dict config == optional dict() of configuration settings """ self.get_extra_vars = extra_vars_func if config: self.config = config else: self.config = dict() def load_template(self, template_name, template_string=None): """ template_name == dotted.path.to.template (without .ext) template_string == string containing the template The dotted notation is present because many template engines allow templates to be compiled down to Python modules. TurboGears uses that feature to its adavantage, and for ease of integration the python.templating.engines plugin format requires the path to the template to be supplied as a dotted.path.to.template regardless of whether is is a module or not. In the case of string.Template templates, they are just simple text files, so we deal with the dotted notation and translate it into a standard file path to open the text file. """ if template_string is not None: return string.Template(template_string) divider = template_name.rfind('.') if divider >= 0: package = template_name[:divider] basename = template_name[divider + 1:] + self.extension template_name = resource_filename(package, basename) template_file = open(template_name) template_obj = string.Template(template_file.read()) template_file.close() return template_obj def render(self, info, format="html", fragment=False, template=None): """ info == dict() of variables to stick into the template namespace format == output format if applicable fragment == special rules about rendering part of a page template == compiled template as returned by `load_template` """ # check to see if we were passed a function get extra vars if callable(self.get_extra_vars): info.update(self.get_extra_vars()) return template.safe_substitute(**info) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/resource_injector.py0000644000175000017500000001167111175375027025257 0ustar zackzack""" .. testoutput:: :hide: >>> # This is so the doctests start from a clean state >>> from tw.core.util import install_framework; install_framework(True) ToscaWidgets can inject resources that have been registered for injection in the current request. Usually widgets register them when they're displayed and they have instances of :class:`tw.api.Resource` declared at their :attr:`tw.api.Widget.javascript` or :attr:`tw.api.Widget.css` attributes. Resources can also be registered manually from a controller or template by calling their :meth:`tw.api.Resource.inject` method. When a page including widgets is rendered, Resources that are registered for injection arre collected in request-local storage area (this means any thing stored here is only visible to one single thread of execution and that its contents are freed when the request is finished) where they can be rendered and injected in the resulting html. ToscaWidgets' middleware can take care of injecting them automatically (default) but they can also be injected explicitly, example:: >>> from tw.api import JSLink, inject_resources >>> JSLink(link="http://example.com").inject() >>> html = "" >>> inject_resources(html) '' Once resources have been injected they are popped from request local and cannot be injected again (in the same request). This is useful in case :class:`injector_middleware` is stacked so it doesn't inject them again. Injecting them explicitly is neccesary if the response's body is being cached before the middleware has a chance to inject them because when the cached version is served no widgets are being rendered so they will not have a chance to register their resources. """ import re import logging from webob import Request from tw import framework from tw.core.util import MultipleReplacer log = logging.getLogger(__name__) __all__ = ["inject_resources", "injector_middleware"] def injector_middleware(app): """ Middleware that injects resources (if any) into the page whenever the output is html (peeks into Content-Type header). Normally you don't have to stack thi yourself because :class:`tw.core.middleware.ToscaWidgetsMiddleware` does it when it is passed the ``inject_resources`` flag as True (default). """ def _injector(environ, start_response): req = Request(environ) resp = req.get_response(app) content_type = resp.headers.get('Content-Type','text/plain').lower() if 'html' in content_type: resources = framework.pop_resources() if resources: resp.body = inject_resources(resp.body, resources, resp.charset) return resp(environ, start_response) return _injector class _ResourceInjector(MultipleReplacer): def __init__(self): return MultipleReplacer.__init__(self, { r'': self._injector_for_location('head'), r'': self._injector_for_location('headbottom', False), r'': self._injector_for_location('bodytop'), r'': self._injector_for_location('bodybottom', False) }, re.I|re.M) def _injector_for_location(self, key, after=True): def inject(group, resources, encoding): inj = u'\n'.join([r.render() for r in resources.get(key, [])]) inj = inj.encode(encoding) if after: return group + inj return inj + group return inject def __call__(self, html, resources=None, encoding=None): """Injects resources, if any, into html string when called. .. note:: Ignore the ``self`` parameter if seeing this as :func:`tw.core.resource_injector.inject_resources` docstring since it is an alias for an instance method of a private class. ``html`` must be a ``encoding`` encoded string. If ``encoding`` is not given it will be tried to be derived from a . Resources for current request can be obtained by calling ``tw.framework.pop_resources()``. This will remove resources from request and a further call to ``pop_resources()`` will return an empty dict. """ if resources is None: resources = framework.pop_resources() if resources: # Only inject if there are resources registered for injection encoding = encoding or find_charset(html) or 'ascii' html = MultipleReplacer.__call__(self, html, resources, encoding) return html # Bind __call__ directly so docstring is included in docs inject_resources = _ResourceInjector().__call__ _charset_re = re.compile(r"charset\s*=\s*(?P[\w-]+)([^\>])*", re.I|re.M) def find_charset(string): m = _charset_re.search(string) if m: return m.group('charset').lower() python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/view.py0000644000175000017500000002023211217766155022501 0ustar zackzackimport sys import logging import re import threading from pkg_resources import iter_entry_points, load_entry_point import tw from tw.core.exceptions import WidgetException from tw.core.util import LRUCache __all__ = ["EngineManager", "Renderable", "EngineException", "display", "render"] log = logging.getLogger(__name__) class EngineException(WidgetException): pass #XXX: This make_renderer/get_render_method/etc... is a mess which should be # cleaned sometime def make_renderer(method, doc=None): def _renderer(self, renderable, **kw): template = kw.pop('template', renderable.template) if template is None: return origin = dynamic_best_engine(renderable, kw) destination = kw.get('displays_on', renderable.displays_on) if origin != 'cheetah': template = self.load_template(template, origin) renderer = self.get_render_method(origin, destination, method) output = renderer(info=kw, template=template) if method == 'display': output = self.adapt_output(output, destination) # Make sure string output is always unicode if isinstance(output, str): output = unicode(output, 'utf-8') return output _renderer.func_name = method _renderer.__doc__ = doc return _renderer class EngineManager(dict): """ Manages availble templating engines. """ default_view = 'toscawidgets' def __init__(self, extra_vars_func=None, options=None, load_all=False): self.extra_vars_func = extra_vars_func self.options = options self._cache = LRUCache(50) self._lock = threading.Lock() if load_all: self.load_all() def __repr__(self): return "< %s >" % self.__class__.__name__ def load_engine(self, name, options=None, extra_vars_func=None, distribution=None): factory = None if distribution: factory = load_entry_point( distribution, "python.templating.engines", name) else: for entrypoint in iter_entry_points("python.templating.engines"): if entrypoint.name == name: factory = entrypoint.load() if factory is None: raise EngineException("No plugin available for engine '%s'" % name) options = options or self.options or {} options = options.copy() # emulate Kid and Genshi's dotted-path notation lookup options.setdefault('mako.directories', []).extend(sys.path) # make sure mako produces utf-8 output so we can decode it and use # unicode internally options['mako.output_encoding'] = 'utf-8' extra_vars_func = extra_vars_func or self.extra_vars_func self._lock.acquire() try: self[name] = factory(extra_vars_func, options) finally: self._lock.release() def __getitem__(self, name): """ Return a Buffet plugin by name. If the plugin is not loaded it will try to load it with default arguments. """ try: return dict.__getitem__(self, name) except KeyError: self.load_engine(name) return dict.__getitem__(self, name) def load_all(self, engine_options=None, stdvars=None, raise_error=False): for ep in iter_entry_points("python.templating.engines"): try: self.load_engine(ep.name, engine_options, stdvars) except: log.warn("Failed to load '%s' template engine: %r", ep.name, sys.exc_info()) if raise_error: raise def load_template(self, template, engine_name): """Return's a compiled template and it's enginename""" output = None if isinstance(template, basestring) and _is_inline_template(template): # Assume inline template, try to fetch from cache key = (template, engine_name) try: output = self._cache[key] #log.debug("Cache hit for: %s", `key`) except KeyError: #log.debug("Cache miss for: %s", `key`) output = self._cache[key] = self[engine_name].load_template( None, template_string = template ) elif isinstance(template, basestring): # Assume template path output = self[engine_name].load_template(template) else: # Assume compiled template output = template return output display = make_renderer('display', doc=\ """ Displays the renderable. Returns appropiate output for target template engine """) render = make_renderer('render', doc=\ """ Returns the serialized output in a string. Useful for debugging or to return to the browser as-is. """) def get_render_method(self, origin, destination, method): engine = self[origin] # Only pass-through Element/Stream output if rendering on the same # template engine as the one producing output if method == 'display' and \ origin == destination and origin in ['kid', 'genshi']: return engine.transform # In any other case render as a string def _render_xhtml(**kw): kw.update(format='xhtml') return engine.render(**kw) return _render_xhtml def adapt_output(self, output, destination): # Handle rendering strings on Genshi so they're not escaped if isinstance(output, basestring) and destination == 'genshi': from genshi.input import HTML output = HTML(output) # Handle rendering strings on Kid so they're not escaped elif isinstance(output, basestring) and destination == 'kid': from kid import XML output = XML(output) return output # Available as a public symbol for easier extension with PEAK-Rules for # backwards compatibility display = EngineManager.display.im_func render = EngineManager.render.im_func def choose_engine(obj, engine_name=None): tpl = obj.template if isinstance(tpl, basestring) and not _is_inline_template(tpl): colon = tpl.find(":") if colon > -1: engine_name = tpl[:colon] tpl = tpl[colon+1:] return engine_name, tpl def dynamic_best_engine(renderable, params): try: ideal_engine = params['displays_on'] except KeyError: ideal_engine = renderable.displays_on if ideal_engine not in renderable.available_engines: try: best_engine = params['engine_name'] except KeyError: best_engine = renderable.engine_name else: best_engine = ideal_engine assert best_engine is not None return best_engine _is_inline_template = re.compile(r'(<|\n|\$)').search class Renderable(object): """Base class for all objects that the EngineManager can render""" engine_name = 'toscawidgets' available_engines = [] template = None def displays_on(self): return tw.framework.default_view displays_on = property(displays_on, doc="""\ Where the Renderable is being displayed on """) def __new__(cls, *args, **kw): obj = object.__new__(cls, *args, **kw) obj.template = kw.pop("template", obj.template) engine_name = kw.pop("engine_name", None) if obj.template is not None: colon_based_engine_name, obj.template = choose_engine(obj) # if there is a colon in the engine name, the available engines should be narrowed # to that engine. if colon_based_engine_name: obj.available_engines = [colon_based_engine_name,] engine_name = colon_based_engine_name if engine_name: obj.engine_name = engine_name return obj def render(self, **kw): kw.setdefault('_', tw.framework.translator) return tw.framework.engines.render(self, **kw) def display(self, **kw): kw.setdefault('_', tw.framework.translator) return tw.framework.engines.display(self, **kw) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/exceptions.py0000644000175000017500000000144711175375027023714 0ustar zackzackclass WidgetException(RuntimeError): msg = "Widget error" def __init__(self, msg=None): self.msg = msg or self.msg def __str__(self): return self.msg class WidgetUnlocked(WidgetException, AttributeError): msg = ("The widget is not locked. This method needs to wait until the " "widget is fully locked in order to function properly") class WidgetLocked(WidgetException, AttributeError): msg = ("The widget is locked. It's unthread-safe to alter it's attributes " "after initialization.") class WidgetInitialized(WidgetException, AttributeError): msg = ("The widget is already initialized, try doing it at the " "constructor.") class WidgetUninitialized(WidgetException, AttributeError): msg = ("The widget is uninitialized.") python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/base.py0000644000175000017500000010245211217751256022442 0ustar zackzackimport re, weakref, logging from copy import copy from warnings import warn from itertools import ifilter, count, chain, izip, islice, ifilterfalse from inspect import isclass import tw from util import (assert_bool_attr, callable_wo_args, unflatten_args, OrderedSet, make_bunch, install_framework, ThreadSafeDescriptor, RequestLocalDescriptor, LRUCache) install_framework() import view from exceptions import * from meta import WidgetType, WidgetsList __all__ = [ "Widget", "WidgetsList", "WidgetRepeater", "RepeatedWidget", "WidgetBunch", "RepeatingWidgetBunch", "Child", "valid_id", "adapt_value", ] log = logging.getLogger(__name__) only_if_initialized = assert_bool_attr( '_is_initialized', True, WidgetUninitialized ) only_if_uninitialized = assert_bool_attr( '_is_initialized', False, WidgetInitialized ) def only_if_unlocked(func): def __setattr__(self, k, *args): descriptor = getattr(self.__class__, k, None) if not isinstance(descriptor, ThreadSafeDescriptor) and self._is_locked: raise WidgetLocked func(self, k, *args) return __setattr__ valid_id_re = re.compile(r'^[a-zA-Z][\w\-\_\:\.]*$') _deprecated_id_re = re.compile(r'^\w+$') def valid_id(s): if valid_id_re.match(s): return True elif s == '_method': #ignore this one small hack to help pages use HTTP verbs return True elif _deprecated_id_re.match(s): warn("The id %s will no longer be supported since it doesn't conform " "to the W3C Spec: http://www.w3.org/TR/xhtml1/#C_8" % s, DeprecationWarning, 3) return True else: return False serial_generator = count() class Widget(view.Renderable): """ Base class for all widgets. Example: .. sourcecode:: python >>> w = Widget('foo') >>> w.id 'foo' >>> w = Widget('foo', children=[Widget('c1'), Widget('c2')]) >>> [c.id for c in w.children] ['foo_c1', 'foo_c2'] >>> [c.parent.id for c in w.children] ['foo', 'foo'] It is a **must** that all initial state is entirely determined by the arguments to this function. This means that two widgets (of the same class) that receive the same parameters must behave in exactly the same way. You should not rely on external sources inside __init__ to set initial state. If you need to fetch data from external sources, do it at :meth:`update_params` instead. Essential pre, and post initialization is done in :meth:`__new__` and :meth:`post_init` respectively. :meth:`post_init` is guaranteed to run after the instance finishes initialization and it's behavior is rather special as all post_init's in mro will be called to have a chance to set final state in the instance. Basic pre-initialization consists of binding all kw arguments to the widget instance, attaching the widget to it's parent (if given), attaching the children and copying mutable arguments listed at :attr:`params` from the class to the instance to avoid accidental manipulation. .. sourcecode:: python >>> w = Widget('foo', a=1, b=2) >>> w.id 'foo' >>> w.a 1 >>> w.b 2 Basic post-initialization consists of caching required CSS and JS resources and setting the widget as initialized preventing further modification of it's attributes. .. sourcecode:: python >>> w = Widget('foo', a='1', b='2') >>> w.a = 'bar' Traceback (most recent call last): ... WidgetLocked: The widget is locked. It's unthread-safe to alter it's attributes after initialization. Widget attributes can only be modified in this method because widgets should behave in a state-less way as they are shared among threads for multiple requests. Per request modification of variables sent to the template should be done inside :meth:`update_params` and all state flowing from parent to children should occur inside that dict. Widgets should be instantiated at import time and reused among requests, most widgets allow overriding most of their parameters (not neccesarily all of them) at display time to change behavior. You should try avoiding instantiating widgets for every request as their initialization could be quite expensive for heavily nested widgets. Request-local storage provided by the hosting framework in ``tw.framework.request`` can be used to pass state among widgets which don't share the same root. """ __metaclass__ = WidgetType parent = None default = None params = { 'id': ('The id of this widget. This id is used to reference a widget ' 'from its parent ``children`` attribute and is usually the ' 'DOM id of outermost HTML tag of the widget.'), 'css_class': 'Main CSS class for this widget', 'css_classes': 'A list with extra css classes for the widget.' } css = [] javascript = [] css_classes = [] _is_initialized = False _is_locked = False def displays_on(self): if self.is_root: return tw.framework.default_view else: return self.parent.engine_name displays_on = property(displays_on, doc="""\ Where the widget is being displayed on """) #XXX: Some of these properties could be implemented as static attributes def id(self): return '_'.join(reversed( [w.id_path_elem for w in self.path if w.id_path_elem] )) or None id = property(id, doc="""\ The calculated id of the widget. This string will provide a unique id for each widget in the tree in a format which allows to re-recreate the nested structure. Example:: >>> A = Widget("A", children=[ ... Widget("B", children=[ ... Widget("C") ... ]) ... ]) ... >>> C = A.c.B.c.C >>> C.id 'A_B_C' """) def key(self): return '.' + '.'.join(reversed( [w.id_path_elem for w in self.path if w.id_path_elem][:-1] )) or None key = property(key, doc="""\ A string that can be used as a key to index the dictionary of parameters sent to the root widget so it reaches this widget when displaying. Example:: >>> A = Widget("A", children=[ ... Widget("B", children=[ ... Widget("C") ... ]) ... ]) ... >>> C = A.c.B.c.C >>> C.key '.B.C' """) def path(self): item = self while item: yield item item = item.parent path = property(path, doc="""\ Iterates a walk from this widget to the root of the tree """) @property def id_path_elem(self): return self._id def root(self): return list(self.path)[-1] root = property(root, doc="The root of this widget tree") def is_root(self): return self.parent is None is_root = property(is_root, doc="True if the widget doesn't have a parent") def __new__(cls, id=None, parent=None, children=[], **kw): """ Takes care of Widget instances creation. Should not need to be overrien likely. """ obj = view.Renderable.__new__(cls,id,parent,children,**kw) # The previous version of this used the __dict__ attribute to update # things, but that doesn't fire any fset properties, and can actually # lose data if a property is set, the following will not behave like # that for k,v in kw.iteritems(): if not k.startswith('_'): try: setattr(obj, k, v) except AttributeError, e: #skip setting the value of a read only property pass obj.orig_kw = kw.copy() if id is not None and not valid_id(id): raise ValueError("%r is not a valid id for a Widget"%id) obj._id = id obj._serial = serial_generator.next() # Attach the widget to its parent if parent is not None: if parent._is_initialized: raise WidgetInitialized obj.parent = weakref.proxy(parent) obj.parent.children.append(obj) # Append children passed as args or defined in the class, former # override later obj.c = obj.children = WidgetBunch() if isclass(children) and issubclass(children, WidgetsList): children = children() if not [obj._append_child(c) for c in children]: cls_children = cls._cls_children if isclass(cls_children) and issubclass(cls_children, WidgetsList): cls_children = cls_children() [obj._append_child(c) for c in cls_children] # Copy mutable attrs from __class__ into self, if not found in self # set to None for name in chain(cls.params, ['css', 'javascript']): try: attr = getattr(obj, name, None) if isinstance(attr, (list,dict)): attr = copy(attr) setattr(obj, name, attr) except AttributeError: # In case we try to set a read-only property pass # Initialize the static js calls list obj._js_calls = [] # Initialize resources OrderedSet obj._resources = OrderedSet() # Set default css class for the widget if not getattr(obj, 'css_class', None): obj.css_class = obj.__class__.__name__.lower() return obj @only_if_initialized def clone(self, *args, **kw): """ Returns a cloned version of the widget instance, optionally overriding initialization parameters. This is the only way to safely "modify" a widget instance. Example:: >>> w = Widget('foo', a=2) >>> w.id, w.a ('foo', 2) >>> w2 = w.clone(a=3) >>> w2.id, w2.a ('foo', 3) """ #log.debug("Cloning %r", self) return Child( self.__class__, self._id, children=self.children, **self.orig_kw )(*args, **kw) @only_if_initialized def _as_repeated(self, *args, **kw): cls = self.__class__ new_name = 'Repeated'+cls.__name__ new_class = type(new_name, (RepeatedWidget, cls), {}) #log.debug("Generating %r for repeating %r", new_class, self) return Child( new_class, self._id, children=self.children, **self.orig_kw )(*args, **kw) def __init__(self, id=None, parent=None, children=[], **kw): """Initializes a Widget instance. `id` The widget's id. All widgets in the same level of nested widgets trees should have distinct ids. `parent` A reference to the widget's parent. This parent needs to be in an uninitialized state which means it can only be passed to a child inside the parent's __init__ method. `children` A list, or WidgetsList (instance or class) or any other iterable with a reference to the children this widget should have. `\*\*kw` Any other extra keyword arguments for the widget. All of these will get bound to the Widget instance. """ # we need a dummy init here for the metaclass to wrap pass def _collect_resources(self): """picks up resources from self and all children""" oset = self._resources oset.add_all(chain(*[c._resources for c in self.css])) oset.add_all(chain(*[c._resources for c in self.javascript])) oset.add_all(chain(*[c._resources for c in self.children])) def post_init(self, *args, **kw): """ This method is called for all :class:`tw.api.Widget` base classes to perform final setup after the widget is initialized but before it is locked. """ if len(self._js_calls) > 0: from tw.core.resources import JSFunctionCalls #log.debug("Creating JSFunctionCalls for %r. Functions: %s", #self, self._js_calls, #) self.javascript.append( JSFunctionCalls(function_calls=self._js_calls) ) self._collect_resources() #log.debug("Finished initializing %r", self) assert not self._is_initialized self._is_initialized = True assert not self._is_locked self._is_locked = True def walk(self, filter=None, recur_if_filtered=True): """ Does a pre-order walk on widget tree rooted at self optionally applying a filter on them. Example:: >>> W = Widget >>> w = W('a', children=[W('b', children=[W('c')]), W('d')]) >>> ''.join(i._id for i in w.walk()) 'abcd' >>> ''.join(i._id for i in w.walk(lambda x: not x.is_root)) 'bcd' >>> ''.join(i._id for i in w.walk(lambda x: x._id == 'c')) 'c' Recursion can be prevented on children that not match filter. >>> ''.join(i._id for i in w.walk(lambda x: x._id == 'c', False)) '' """ def _walk(): yield self iterator = iter(self.children) if filter and not recur_if_filtered: iterator = self.ifilter_children(filter) for c in iterator: for w in c.walk(filter, recur_if_filtered): yield w if filter: return ifilter(filter, _walk()) return _walk() def add_call(self, call, location="bodybottom"): """ Adds a :func:`tw.api.js_function` call that will be made when the widget is rendered. """ if self._is_initialized: #log.debug("Adding call <%s> for %r dynamically.", call, self) from tw.core.resources import dynamic_js_calls dynamic_js_calls.inject_call(call, location) else: #log.debug("Adding call <%s> for %r statically.", call, self) self._js_calls.append(str(call)) @only_if_initialized def retrieve_css(self): warn("retrieve_css is deprecated. Please use retrieve_resources " "instead and filter them yourself", DeprecationWarning, 2) return [] @only_if_initialized def retrieve_javascript(self): warn("retrieve_javascript is deprecated. Please use retrieve_resources " "instead and filter them yourself", DeprecationWarning, 2) return [] @only_if_initialized def retrieve_resources(self): """ Returns a dict keyed by location with ordered collections of resources from this widget and its children as values. """ from tw.api import locations resources = dict((k, OrderedSet()) for k in locations) for r in self._resources: resources[r.location].add(r) return resources def adapt_value(self, value): """ Adapt object *value* for rendering in this widget. Should return one of: * A list of objects for repeated widgets. * A dict for widgets with children, keyed by the children's ids. * Any other object the widget understands. """ # Handle MultiDict instances if hasattr(value, 'dict_of_lists'): for k, v in value.dict_of_lists().items(): if len(v) == 1: value[k] = v[0] else: value[k] = v # If we have children, create a dict from the attributes of value elif len(self.children_deep) > 0 and not isinstance(value, (dict,list)): value = dict([ (w._id, getattr(value, w._id)) for w in self.children_deep if w._id and hasattr(value, w._id) ]) return value def register_resources(self): """ Register the resources required by this Widget with :attr:`tw.framework` for inclusion in the page. This method is called whenever a :class:`Widget` is rendered """ if self.is_root: tw.framework.register_resources(self.retrieve_resources()) def render(self, value=None, **kw): """ Renders a widget as an unicode string. """ kw = self.prepare_dict(value, kw) self.register_resources() return super(Widget, self).render(**kw) def display(self, value=None, **kw): """ Renders a widget and adapts the output. This method **must** be used to display child widgets inside their parent's template so output is adapted. Unlike :meth:`tw.api.Widget.render`, :meth:`tw.api.Widget.display` returns adapted output compatible with the template the widget is being rendered on. For example, this is needed so Genshi doesn't autoescape string output from mako and to serialize Genshi output on the other way around. """ kw = self.prepare_dict(value, kw) self.register_resources() return super(Widget, self).display(**kw) def __call__(self, value=None, **kw): return self.display(value, **kw) def get_default(self): """Returns the default value for the widget. If the default is a funtion that it can be called without arguments it will be called on each render to retrieve a value""" if callable_wo_args(self.default): value = self.default() else: value = self.default return value @property def children_deep(self): return self.children def prepare_dict(self, value, d, adapt=True): """ Prepares the all kw arguments sent to `display` or `render` before passing the kw argument's dict to `update_params`. """ if value is None: value = self.get_default() if adapt: d['value'] = self.adapt_value(value) else: d['value'] = value # Move args passed to child widgets into child_args child_args = d.setdefault('child_args', {}) for k in d.keys(): if '.' in k:# or '-' in k: child_args[k.lstrip('.')] = d.pop(k) d['args_for'] = self._get_child_args_getter(child_args) d['value_for'] = self._get_child_value_getter(d['value']) d['c'] = d['children'] = self.children d = make_bunch(d) self.update_params(d) s = set([d['css_class'],]) classes = d['css_classes'] for item in classes: s.add(item) # Compute the final css_class string d['css_class']= ' '.join(s) # reset the getters here so update_params has a chance to alter # the arguments to children and the value d['args_for'] = self._get_child_args_getter(d['child_args']) d['value_for'] = self._get_child_value_getter(d.get('value')) # Provide a shortcut to display a child field in the template d['display_child'] = self._child_displayer(self.children, d['value_for'], d['args_for']) return d def update_params(self, d): """ Updates the dict sent to the template for the current request. It is called when displaying or rendering a widget with all keyword arguments passed stuffed inside dict. Widget subclasses can call super cooperatively to avoid boiler-plate code as `Widget.update_params` takes care of pre-populating this dict with all attributes from self listed at `params` (copying them if mutable) and preparing arguments for child widgets. Any parameter sent to `display` or `render` will override those fetched from the instance or the class. Any function listed at `params` which can be called without arguments will be automatically called to fetch fresh results on every request. Parameters not found either on the class, the instance or the keyword args to `display` or `render` will be set to None. .. sourcecode:: python >>> class MyWidget(Widget): ... params = ["foo", "bar", "null"] ... foo = "foo" ... >>> w = MyWidget('test', bar=lambda: "bar") >>> d = {} >>> w.update_params(d) >>> d['bar'] 'bar' >>> d['foo'] 'foo' >>> d['null'] is None True >>> d = {'foo':'overriden'} >>> w.update_params(d) >>> d['foo'] 'overriden' """ # Populate dict with attrs from self listed at params for k in ifilterfalse(d.__contains__, self.params): attr = getattr(self, k, None) if attr is not None: if isinstance(attr, (list, dict)): attr = copy(attr) # Variables that are callable with no args are automatically # called here elif not isinstance(attr, Widget) and callable_wo_args(attr): log.debug("Autocalling param '%s'", k) attr = attr() d[k] = attr def ifilter_children(self, filter): """ Returns an iterator for all children applying a filter to them. .. sourcecode:: python >>> class Widgets(WidgetsList): ... aa = Widget() ... ab = Widget() ... ba = Widget() ... bb = Widget() ... >>> w = Widget(children=Widgets) >>> [c.id for c in w.ifilter_children(lambda w: w.id.startswith('a'))] ['aa', 'ab'] """ return ifilter(filter, self.children) def _get_child_value_getter(self, value): def value_getter(child_id): if value: if (hasattr(child_id, 'repetition') and isinstance(value,list) ): child_id = child_id.repetition elif isinstance(child_id, Widget) and isinstance(value,dict): child_id = child_id._id try: return value[child_id] except (IndexError,KeyError,TypeError): None return value_getter def _get_child_args_getter(self, child_args): if isinstance(child_args, dict): child_args = unflatten_args(child_args) def args_getter(child_id): if (hasattr(child_id, 'repetition') and isinstance(child_args, list) ): child_id = child_id.repetition elif (isinstance(child_id, Widget) and isinstance(child_args, dict) ): child_id = child_id._id try: return child_args[child_id] except (IndexError,KeyError,TypeError): return {} return args_getter @only_if_uninitialized def _append_child(self,obj): """Append an object as a child""" if isinstance(obj, Widget): obj._append_to(self) elif isinstance(obj, Child): obj(self) else: raise ValueError("Can only append Widgets or Childs, not %r" % obj) @only_if_initialized def _append_to(self, parent=None): return self.clone(parent) @only_if_unlocked def __setattr__(self,k,v): object.__setattr__(self,k,v) @only_if_unlocked def __delattr__(self,k): object.__delattr__(self,k) def __repr__(self): name = self.__class__.__name__ return "%s(%r, children=%r, **%r)" % ( name, self._id, self.children, self.orig_kw ) def __str__(self): return self.render() def __ne__(self, other): return not (self == other) def __eq__(self, other): return ( (getattr(other, '__class__', None) is self.__class__) and # Check _id so ancestors are not taken into account (other._id == self._id) and (other.children == self.children) and (other.orig_kw == self.orig_kw) ) @staticmethod def _child_displayer(children, value_for, args_for): def display_child(widget, **kw): if isinstance(widget, (basestring,int)): widget = children[widget] child_kw = args_for(widget) child_kw.update(kw) return widget.display(value_for(widget), **child_kw) return display_child # Available as a public symbol for easier extension with PEAK-Rules for # backwards compatibility adapt_value = Widget.adapt_value.im_func class Child(object): """ Prepares a Widget to being attached to a parent Widget. Creates a Widget instance with supplied arguments to the constructor when called (optionally overriding default arguments). >>> c = Child(Widget, 'foo') >>> w = c() >>> w.id 'foo' Parameters can be overriden when called. >>> w = c(id='bar') >>> w.id 'bar' """ __slots__ = ("widget_class", "id", "children", "kw") def __init__(self, widget_class, id=None, children=[], **kw): self.widget_class, self.id = widget_class, id, self.children, self.kw = children, kw def __call__(self, parent=None, **kw): kw_ = self.kw.copy() kw_.update(id=self.id, parent=parent, children=self.children) kw_.update(kw) return self.widget_class(**kw_) #XXX: Should enhance and clean up so setting widgets is not allowed if the # WidgetBunch is used as a widget's 'children' attribute and the widget # is already initialized. BTW, this WidgetBunch_attrs thingie is becomming # ugly ... should re-implement properly someday... _WidgetBunch_attrs = frozenset(['_widget_lst', '_widget_dct', '_widget', '_repetitions', '_parent', '_repetition_cache']) class WidgetBunch(object): """ An ordered collection of widgets. >>> from tw.core import Widget >>> wb = WidgetBunch(Widget('foo'), Widget('bar')) >>> wb[0].id == 'foo' True >>> wb[1].id == 'bar' True Exposes a mixed dict/list interface which permits indexing both by widget id and position. >>> wb['foo'] == wb[0] True >>> wb['bar'] == wb[1] True Also permits attribute access as long as the attribute doesn't conflict with an internal attribute, in case of conflict the internal attrbute will prevail. >>> wb.foo.id == 'foo' True >>> wb.append(Widget('append')) >>> wb.append.id Traceback (most recent call last): ... AttributeError: 'function' object has no attribute 'id' >>> wb['append'].id == 'append' True Iteration is also supported >>> [w.id for w in wb] ['foo', 'bar', 'append'] Some dict-like iterators too >>> [id for id in wb.iterkeys()] ['foo', 'bar', 'append'] >>> [id for id in wb.keys()] ['foo', 'bar', 'append'] >>> [w.id for w in wb.itervalues()] ['foo', 'bar', 'append'] >>> [w.id for w in wb.values()] ['foo', 'bar', 'append'] """ def __init__(self, *args): self._widget_lst = [] self._widget_dct = {} for wid in args: self.append(wid) def append(self,wid): self.__setattr__(wid._id, wid) def retrieve_css(self): oset = OrderedSet() for child in self: oset.add_all(child.retrieve_css()) return oset def retrieve_javascript(self): oset = OrderedSet() for child in self: oset.add_all(child.retrieve_javascript()) return oset def retrieve_resources(self): from tw.core.resources import merge_resources, locations resources = dict((k, OrderedSet()) for k in locations) for w in self: merge_resources(resources, w.retrieve_resources()) return resources def __getitem__(self, item): if isinstance(item, basestring): return self._widget_dct[item] elif isinstance(item, int): return self._widget_lst[item] raise KeyError, "No widget by %r" % item def __getattr__(self, name): if name in _WidgetBunch_attrs: return object.__getattribute__(self,name) try: return self[name] except KeyError: raise AttributeError, "No widget by %r" % name def __setattr__(self, name, value): # Note that this setattr allows name = None so append can use it. if name in _WidgetBunch_attrs: return object.__setattr__(self,name,value) self._widget_lst.append(value) self._widget_dct[name] = value def __iter__(self): for wid in self._widget_lst: yield wid def __ne__(self, other): return not (self==other) def __eq__(self, other): try: if len(self) == len(other): for a,b in izip(other,self): if a!=b: return False return True except TypeError: pass return False def __getslice__(self,start=0,stop=-1,step=1): return islice(self,start,stop,step) def __len__(self): return len(self._widget_lst) def __nonzero__(self): return bool(len(self)) def __contains__(self,item): dct = self._widget_dct try: return dct[item._id] == item except KeyError: return False def keys(self): return list(self.iterkeys()) def iterkeys(self): for w in self: yield w._id def values(self): return list(self.itervalues()) itervalues = __iter__ def __repr__(self): return `self._widget_lst` class RepeatingWidgetBunch(WidgetBunch): _repetitions = 0 _widget = None def __init__(self, *args, **kw): super(RepeatingWidgetBunch, self).__init__(*args, **kw) self._repetition_cache = LRUCache(100) def __len__(self): return self._repetitions def __iter__(self, reps=None): if reps is None: reps = self._repetitions for i in xrange(reps): yield self[i] def __getitem__(self, item): if not isinstance(item, int): raise KeyError("Must specify an integer") try: rep = self._repetition_cache[item] except KeyError: rep = self._widget.clone(repetition=item) # Work around widget's locking mechanism since it is thread-safe # to do it *here*. Note that the parent is not directly aware that # it has this repeated widget as a child and it doesn't care # really since I create those children on the fly object.__setattr__(rep, 'parent', self._parent) self._repetition_cache[item] = rep return rep class WidgetRepeater(Widget): params = ["repetitions", "extra"] widget = None repetitions = 3 max_repetitions = None extra = 0 id_path_elem = None template = "$output" @property def key(self): raise AttributeError("A WidgetRepeater has no meaningful key") def __new__(cls, id=None, parent=None, children=[], **kw): widget = kw.get('widget', getattr(cls, 'widget', None)) if widget is None: warn("No repeated widget specified in %s" % cls.__name__) widget = Widget() if isclass(widget) and issubclass(widget, Widget): widget = widget() obj = super(WidgetRepeater, cls).__new__(cls, id,parent,**kw) obj.c = obj.children = RepeatingWidgetBunch() obj.c._parent = weakref.proxy(obj) obj.c._repetitions = kw.get('repetitions', cls.repetitions) obj.c._widget = widget._as_repeated(obj, id=obj._id) return obj def update_params(self, d): super(WidgetRepeater,self).update_params(d) if d.get('max_repetitions', self.max_repetitions) is not None: warn("max_repetitions is deperecated and no longer has any effect", DeprecationWarning, 3) v_f = d['value_for'] a_f = d['args_for'] outputs = [ w.render(v_f(w), isextra=(w.repetition >= len(d['value'])), **a_f(w)) for w in d['children'].__iter__( max(d['repetitions'], len(d['value']) + d.extra)) ] d["output"] = '\n'.join(o for o in outputs if o) class RepeatedWidget(Widget): params = ["repetition"] repetition = 0 @property def id_path_elem(self): return '%s-%d' % (self._id, self.repetition or 0) @only_if_initialized def _as_repeated(self, *args, **kw): return self.clone(*args, **kw) if __name__ == "__main__": import doctest doctest.testmod(optionflags = doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/core/registry.py0000644000175000017500000005545011175375027023406 0ustar zackzack# (c) 2005 Ben Bangert # This module is part of the Python Paste Project and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Registry for handling request-local module globals sanely Dealing with module globals in a thread-safe way is good if your application is the sole responder in a thread, however that approach fails to properly account for various scenarios that occur with WSGI applications and middleware. What is actually needed in the case where a module global is desired that is always set properly depending on the current request, is a stacked thread-local object. Such an object is popped or pushed during the request cycle so that it properly represents the object that should be active for the current request. To make it easy to deal with such variables, this module provides a special StackedObjectProxy class which you can instantiate and attach to your module where you'd like others to access it. The object you'd like this to actually "be" during the request is then registered with the RegistryManager middleware, which ensures that for the scope of the current WSGI application everything will work properly. Example: .. code-block:: python #yourpackage/__init__.py from tw.core.registry import RegistryManager, StackedObjectProxy myglobal = StackedObjectProxy() #wsgi app stack app = RegistryManager(yourapp) #inside your wsgi app class yourapp(object): def __call__(self, environ, start_response): obj = someobject # The request-local object you want to access # via yourpackage.myglobal if environ.has_key('paste.registry'): environ['paste.registry'].register(myglobal, obj) You will then be able to import yourpackage anywhere in your WSGI app or in the calling stack below it and be assured that it is using the object you registered with Registry. RegistryManager can be in the WSGI stack multiple times, each time it appears it registers a new request context. Performance =========== The overhead of the proxy object is very minimal, however if you are using proxy objects extensively (Thousands of accesses per request or more), there are some ways to avoid them. A proxy object runs approximately 3-20x slower than direct access to the object, this is rarely your performance bottleneck when developing web applications. Should you be developing a system which may be accessing the proxy object thousands of times per request, the performance of the proxy will start to become more noticeable. In that circumstance, the problem can be avoided by getting at the actual object via the proxy with the ``_current_obj`` function: .. code-block:: python #sessions.py Session = StackedObjectProxy() # ... initialization code, etc. # somemodule.py import sessions def somefunc(): session = sessions.Session._current_obj() # ... tons of session access This way the proxy is used only once to retrieve the object for the current context and the overhead is minimized while still making it easy to access the underlying object. The ``_current_obj`` function is preceded by an underscore to more likely avoid clashing with the contained object's attributes. **NOTE:** This is *highly* unlikely to be an issue in the vast majority of cases, and requires incredibly large amounts of proxy object access before one should consider the proxy object to be causing slow-downs. This section is provided solely in the extremely rare case that it is an issue so that a quick way to work around it is documented. """ import sys import threading as threadinglocal __all__ = ['StackedObjectProxy', 'RegistryManager', 'StackedObjectRestorer', 'restorer', 'Registry'] try: from paste.registry import StackedObjectProxy, RegistryManager, StackedObjectRestorer, restorer, Registry except ImportError: class NoDefault(object): pass class StackedObjectProxy(object): """Track an object instance internally using a stack The StackedObjectProxy proxies access to an object internally using a stacked thread-local. This makes it safe for complex WSGI environments where access to the object may be desired in multiple places without having to pass the actual object around. New objects are added to the top of the stack with _push_object while objects can be removed with _pop_object. """ def __init__(self, default=NoDefault, name="Default"): """Create a new StackedObjectProxy If a default is given, its used in every thread if no other object has been pushed on. """ self.__dict__['____name__'] = name self.__dict__['____local__'] = threadinglocal.local() if default is not NoDefault: self.__dict__['____default_object__'] = default def __dir__(self): """Return a list of the StackedObjectProxy's and proxied object's (if one exists) names. """ dir_list = dir(self.__class__) + self.__dict__.keys() try: dir_list.extend(dir(self._current_obj())) except TypeError: pass dir_list.sort() return dir_list def __getattr__(self, attr): return getattr(self._current_obj(), attr) def __setattr__(self, attr, value): setattr(self._current_obj(), attr, value) def __delattr__(self, name): delattr(self._current_obj(), name) def __getitem__(self, key): return self._current_obj()[key] def __setitem__(self, key, value): self._current_obj()[key] = value def __delitem__(self, key): del self._current_obj()[key] def __call__(self, *args, **kw): return self._current_obj()(*args, **kw) def __repr__(self): try: return repr(self._current_obj()) except (TypeError, AttributeError): return '<%s.%s object at 0x%x>' % (self.__class__.__module__, self.__class__.__name__, id(self)) def __iter__(self): return iter(self._current_obj()) def __len__(self): return len(self._current_obj()) def __contains__(self, key): return key in self._current_obj() def __nonzero__(self): return bool(self._current_obj()) def _current_obj(self): """Returns the current active object being proxied to In the event that no object was pushed, the default object if provided will be used. Otherwise, a TypeError will be raised. """ objects = getattr(self.____local__, 'objects', None) if objects: return objects[-1] else: obj = self.__dict__.get('____default_object__', NoDefault) if obj is not NoDefault: return obj else: raise TypeError( 'No object (name: %s) has been registered for this ' 'thread' % self.____name__) def _push_object(self, obj): """Make ``obj`` the active object for this thread-local. This should be used like: .. code-block:: python obj = yourobject() module.glob = StackedObjectProxy() module.glob._push_object(obj) try: ... do stuff ... finally: module.glob._pop_object(conf) """ if not hasattr(self.____local__, 'objects'): self.____local__.objects = [] self.____local__.objects.append(obj) def _pop_object(self, obj=None): """Remove a thread-local object. If ``obj`` is given, it is checked against the popped object and an error is emitted if they don't match. """ if not hasattr(self.____local__, 'objects'): raise AssertionError('No object has been registered for this thread') popped = self.____local__.objects.pop() if obj: if popped is not obj: raise AssertionError( 'The object popped (%s) is not the same as the object ' 'expected (%s)' % (popped, obj)) def _object_stack(self): """Returns all of the objects stacked in this container (Might return [] if there are none) """ try: return self.____local__.objects[:] except AssertionError: return [] # The following methods will be swapped for their original versions by # StackedObjectRestorer when restoration is enabled. The original # functions (e.g. _current_obj) will be available at _current_obj_orig def _current_obj_restoration(self): request_id = restorer.in_restoration() if request_id: return restorer.get_saved_proxied_obj(self, request_id) return self._current_obj_orig() _current_obj_restoration.__doc__ = \ ('%s\n(StackedObjectRestorer restoration enabled)' % \ _current_obj.__doc__) def _push_object_restoration(self, obj): if not restorer.in_restoration(): self._push_object_orig(obj) _push_object_restoration.__doc__ = \ ('%s\n(StackedObjectRestorer restoration enabled)' % \ _push_object.__doc__) def _pop_object_restoration(self, obj=None): if not restorer.in_restoration(): self._pop_object_orig(obj) _pop_object_restoration.__doc__ = \ ('%s\n(StackedObjectRestorer restoration enabled)' % \ _pop_object.__doc__) class Registry(object): """Track objects and stacked object proxies for removal The Registry object is instantiated a single time for the request no matter how many times the RegistryManager is used in a WSGI stack. Each RegistryManager must call ``prepare`` before continuing the call to start a new context for object registering. Each context is tracked with a dict inside a list. The last list element is the currently executing context. Each context dict is keyed by the id of the StackedObjectProxy instance being proxied, the value is a tuple of the StackedObjectProxy instance and the object being tracked. """ def __init__(self): """Create a new Registry object ``prepare`` must still be called before this Registry object can be used to register objects. """ self.reglist = [] def prepare(self): """Used to create a new registry context Anytime a new RegistryManager is called, ``prepare`` needs to be called on the existing Registry object. This sets up a new context for registering objects. """ self.reglist.append({}) def register(self, stacked, obj): """Register an object with a StackedObjectProxy""" myreglist = self.reglist[-1] stacked_id = id(stacked) if stacked_id in myreglist: stacked._pop_object(myreglist[stacked_id][1]) del myreglist[stacked_id] stacked._push_object(obj) myreglist[stacked_id] = (stacked, obj) # Replace now does the same thing as register replace = register def cleanup(self): """Remove all objects from all StackedObjectProxy instances that were tracked at this Registry context""" for stacked, obj in self.reglist[-1].itervalues(): stacked._pop_object(obj) self.reglist.pop() class RegistryManager(object): """Creates and maintains a Registry context RegistryManager creates a new registry context for the registration of StackedObjectProxy instances. Multiple RegistryManager's can be in a WSGI stack and will manage the context so that the StackedObjectProxies always proxy to the proper object. The object being registered can be any object sub-class, list, or dict. Registering objects is done inside a WSGI application under the RegistryManager instance, using the ``environ['paste.registry']`` object which is a Registry instance. """ def __init__(self, application, streaming=False): self.application = application self.streaming = streaming def __call__(self, environ, start_response): app_iter = None reg = environ.setdefault('paste.registry', Registry()) reg.prepare() if self.streaming: return self.streaming_iter(reg, environ, start_response) try: app_iter = self.application(environ, start_response) except Exception, e: # Regardless of if the content is an iterable, generator, list # or tuple, we clean-up right now. If its an iterable/generator # care should be used to ensure the generator has its own ref # to the actual object if environ.get('paste.evalexception'): # EvalException is present in the WSGI stack expected = False for expect in environ.get('paste.expected_exceptions', []): if isinstance(e, expect): expected = True if not expected: # An unexpected exception: save state for EvalException restorer.save_registry_state(environ) reg.cleanup() raise except: # Save state for EvalException if it's present if environ.get('paste.evalexception'): restorer.save_registry_state(environ) reg.cleanup() raise else: reg.cleanup() return app_iter def streaming_iter(self, reg, environ, start_response): try: for item in self.application(environ, start_response): yield item except Exception, e: # Regardless of if the content is an iterable, generator, list # or tuple, we clean-up right now. If its an iterable/generator # care should be used to ensure the generator has its own ref # to the actual object if environ.get('paste.evalexception'): # EvalException is present in the WSGI stack expected = False for expect in environ.get('paste.expected_exceptions', []): if isinstance(e, expect): expected = True if not expected: # An unexpected exception: save state for EvalException restorer.save_registry_state(environ) reg.cleanup() raise except: # Save state for EvalException if it's present if environ.get('paste.evalexception'): restorer.save_registry_state(environ) reg.cleanup() raise else: reg.cleanup() class StackedObjectRestorer(object): """Track StackedObjectProxies and their proxied objects for automatic restoration within EvalException's interactive debugger. An instance of this class tracks all StackedObjectProxy state in existence when unexpected exceptions are raised by WSGI applications housed by EvalException and RegistryManager. Like EvalException, this information is stored for the life of the process. When an unexpected exception occurs and EvalException is present in the WSGI stack, save_registry_state is intended to be called to store the Registry state and enable automatic restoration on all currently registered StackedObjectProxies. With restoration enabled, those StackedObjectProxies' _current_obj (overwritten by _current_obj_restoration) method's strategy is modified: it will return its appropriate proxied object from the restorer when a restoration context is active in the current thread. The StackedObjectProxies' _push/pop_object methods strategies are also changed: they no-op when a restoration context is active in the current thread (because the pushing/popping work is all handled by the Registry/restorer). The request's Registry objects' reglists are restored from the restorer when a restoration context begins, enabling the Registry methods to work while their changes are tracked by the restorer. The overhead of enabling restoration is negligible (another threadlocal access for the changed StackedObjectProxy methods) for normal use outside of a restoration context, but worth mentioning when combined with StackedObjectProxies normal overhead. Once enabled it does not turn off, however: o Enabling restoration only occurs after an unexpected exception is detected. The server is likely to be restarted shortly after the exception is raised to fix the cause o StackedObjectRestorer is only enabled when EvalException is enabled (not on a production server) and RegistryManager exists in the middleware stack""" def __init__(self): # Registries and their saved reglists by request_id self.saved_registry_states = {} self.restoration_context_id = threadinglocal.local() def save_registry_state(self, environ): """Save the state of this request's Registry (if it hasn't already been saved) to the saved_registry_states dict, keyed by the request's unique identifier""" registry = environ.get('paste.registry') if not registry or not len(registry.reglist) or \ self.get_request_id(environ) in self.saved_registry_states: # No Registry, no state to save, or this request's state has # already been saved return self.saved_registry_states[self.get_request_id(environ)] = \ (registry, registry.reglist[:]) # Tweak the StackedObjectProxies we want to save state for -- change # their methods to act differently when a restoration context is active # in the current thread for reglist in registry.reglist: for stacked, obj in reglist.itervalues(): self.enable_restoration(stacked) def get_saved_proxied_obj(self, stacked, request_id): """Retrieve the saved object proxied by the specified StackedObjectProxy for the request identified by request_id""" # All state for the request identified by request_id reglist = self.saved_registry_states[request_id][1] # The top of the stack was current when the exception occurred stack_level = len(reglist) - 1 stacked_id = id(stacked) while True: if stack_level < 0: # Nothing registered: Call _current_obj_orig to raise a # TypeError return stacked._current_obj_orig() context = reglist[stack_level] if stacked_id in context: break # This StackedObjectProxy may not have been registered by the # RegistryManager that was active when the exception was raised -- # continue searching down the stack until it's found stack_level -= 1 return context[stacked_id][1] def enable_restoration(self, stacked): """Replace the specified StackedObjectProxy's methods with their respective restoration versions. _current_obj_restoration forces recovery of the saved proxied object when a restoration context is active in the current thread. _push/pop_object_restoration avoid pushing/popping data (pushing/popping is only done at the Registry level) when a restoration context is active in the current thread""" if '_current_obj_orig' in stacked.__dict__: # Restoration already enabled return for func_name in ('_current_obj', '_push_object', '_pop_object'): orig_func = getattr(stacked, func_name) restoration_func = getattr(stacked, func_name + '_restoration') stacked.__dict__[func_name + '_orig'] = orig_func stacked.__dict__[func_name] = restoration_func def get_request_id(self, environ): """Return a unique identifier for the current request""" return id(environ) def restoration_begin(self, request_id): """Enable a restoration context in the current thread for the specified request_id""" if request_id in self.saved_registry_states: # Restore the old Registry object's state registry, reglist = self.saved_registry_states[request_id] registry.reglist = reglist self.restoration_context_id.request_id = request_id def restoration_end(self): """Register a restoration context as finished, if one exists""" try: del self.restoration_context_id.request_id except AttributeError: pass def in_restoration(self): """Determine if a restoration context is active for the current thread. Returns the request_id it's active for if so, otherwise False""" return getattr(self.restoration_context_id, 'request_id', False) restorer = StackedObjectRestorer() # Paste Deploy entry point def make_registry_manager(app, global_conf): return RegistryManager(app) make_registry_manager.__doc__ = RegistryManager.__doc__ python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/api.py0000644000175000017500000000002611175375027021344 0ustar zackzackfrom tw.core import * python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/__init__.py0000644000175000017500000000007011175375027022331 0ustar zackzack__import__('pkg_resources').declare_namespace(__name__) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/0000755000175000017500000000000011224437421023405 5ustar zackzackpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/__init__.py0000644000175000017500000000000011175375027025514 0ustar zackzackpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/0000755000175000017500000000000011224437421026563 5ustar zackzackpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tests/0000755000175000017500000000000011224437421027725 5ustar zackzack././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tests/test_widget.py_tmplpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tests/test_widge0000644000175000017500000000116011175375027032014 0ustar zackzackfrom tw.core.testutil import WidgetTestCase from tw.${package} import * class TestWidget(WidgetTestCase): # place your widget at the TestWidget attribute TestWidget = ${package.capitalize()} # Initilization args. go here widget_kw = {} def test_render(self): # Asserts 'foo' and 'test' (the test widget's id) appear in rendered # string when 'foo' is passed as value to render self.assertInOutput(['foo', 'test'], "foo") # Asserts 'ohlalala' does not appear in rendered string when render # is called without args self.assertNotInOutput(['ohlalala']) ././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tests/__init__.py_tmplpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tests/__init__.p0000644000175000017500000000000011175375027031643 0ustar zackzackpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/setup.cfg_tmpl0000644000175000017500000000010611175375027031445 0ustar zackzack[egg_info] tag_build = dev tag_date = true [nosetests] where = tests ././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/MANIFEST.in_tmplpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/MANIFEST.in_tmpl0000644000175000017500000000012511175375027031363 0ustar zackzackrecursive-include tw/${package}/templates * recursive-include tw/${package}/static * python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/+egg+.egg-info/0000755000175000017500000000000011224437421031145 5ustar zackzack././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/+egg+.egg-info/paster_plugins.txtpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/+egg+.egg-info/p0000644000175000017500000000000011175375027031325 0ustar zackzackpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/0000755000175000017500000000000011224437421027215 5ustar zackzack././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/__init__.py_tmplpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/__init__.py_t0000644000175000017500000000007011175375027031656 0ustar zackzack__import__('pkg_resources').declare_namespace(__name__) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/+package+/0000755000175000017500000000000011224437421030736 5ustar zackzack././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/+package+/release.py_tmplpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/+package+/rel0000644000175000017500000000064111175375027031454 0ustar zackzack# Metadata for the widget EGG. Should leave it for the (unimplemented) widget # tracker to track it __DISTRIBUTION__ = ${repr(project)|empty} __DESCRIPTION__ = ${repr(description)|empty} __URL__ = ${repr(url)|empty} __VERSION__ = ${repr(version)|empty} __AUTHOR__ = ${repr(author)|empty} __EMAIL__ = ${repr(author_email)|empty} __COPYRIGHT__ = "Copyright ${year} ${author}" __LICENSE__ = ${repr(license_name)|empty} ././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/+package+/__init__.py_tmplpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/+package+/__i0000644000175000017500000000002611175375027031415 0ustar zackzackfrom widgets import * ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/+package+/samples.py_tmplpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/+package+/sam0000644000175000017500000000076211175375027031456 0ustar zackzack""" Here you can create samples of your widgets by providing default parameters, inserting them in a container widget, mixing them with other widgets, etc... These samples will appear in the WidgetBrowser See http://toscawidgets.org/documentation/WidgetBrowser for more information """ from tw.${package} import ${package.capitalize()} class Demo${package.capitalize()}(${package.capitalize()}): # Provide default parameters, value, etc... here # default = pass ././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/+package+/widgets.py_tmplpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/tw/+package+/wid0000644000175000017500000000266111175375027031461 0ustar zackzackfrom tw.api import Widget, JSLink, CSSLink __all__ = ["${package.capitalize()}"] # declare your static resources here ## JS dependencies can be listed at 'javascript' so they'll get included ## before # my_js = JSLink(modname=__name__, # filename='static/${package}.js', javascript=[]) # my_css = CSSLink(modname=__name__, filename='static/${package}.css') class ${package.capitalize()}(Widget): template = """
$${value}
""" ## You can also define the template in a separate package and refer to it ## using Buffet style uris #template = "tw.${package}.templates.${package}" #javascript = [my_js] #css = [my_css] def __init__(self, id=None, parent=None, children=[], **kw): """Initialize the widget here. The widget's initial state shall be determined solely by the arguments passed to this function; two widgets initialized with the same args. should behave in *exactly* the same way. You should *not* rely on any external source to determine initial state.""" super(${package.capitalize()}, self).__init__(id, parent, children, **kw) def update_params(self, d): """This method is called every time the widget is displayed. It's task is to prepare all variables that are sent to the template. Those variables can accessed as attributes of d.""" super(${package.capitalize()}, self).update_params(d) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/setup.py_tmpl0000644000175000017500000000237311175375027031346 0ustar zackzackimport os import sys from setuptools import setup, find_packages execfile(os.path.join("tw", "${package}", "release.py")) setup( name=__DISTRIBUTION__, version=__VERSION__, description=__DESCRIPTION__, author=__AUTHOR__, author_email=__EMAIL__, url=__URL__, install_requires=[ "ToscaWidgets", ## Add other requirements here # "Genshi", ], packages=find_packages(exclude=['ez_setup', 'tests']), namespace_packages = ['tw'], zip_safe=False, include_package_data=True, test_suite = 'nose.collector', entry_points=""" [toscawidgets.widgets] # Register your widgets so they can be listed in the WidgetBrowser widgets = tw.${package} samples = tw.${package}.samples """, keywords = [ 'toscawidgets.widgets', ], classifiers = [ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Environment :: Web Environment :: ToscaWidgets', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Widget Sets', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', ], ) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/docs/0000755000175000017500000000000011224437421027513 5ustar zackzack././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/docs/conf.py_tmplpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/docs/conf.py_tmp0000644000175000017500000001173411175375027031710 0ustar zackzack# -*- coding: utf-8 -*- # # Fooo documentation build configuration file, created by # sphinx-quickstart on Wed May 14 19:27:33 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (module imports are okay, they're removed automatically). # # All configuration values have a default value; values that are commented out # serve to show the default value. import sys, os import pkg_resources execfile(os.path.join("..", "tw", "${package}", "release.py")) # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. #sys.path.append(os.path.abspath('some/directory')) # General configuration # --------------------- # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc'] # Try to add WidgetBrowser's extension if installed try: from widgetbrowser import sphinx_ext extensions.append('widgetbrowser.sphinx_ext') except ImportError: print >> sys.stderr, "WidgetBrowser is not available..." # Add any paths that contain templates here, relative to this directory. templates_path = [] # The suffix of source filenames. source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General substitutions. project = __DISTRIBUTION__ copyright = __COPYRIGHT__ # The default replacements for |version| and |release|, also used in various # other places throughout the built documents. # # The short X.Y version. version = __VERSION__ # The full version, including alpha/beta/rc tags. release = pkg_resources.get_distribution(__DISTRIBUTION__).version # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. today_fmt = '%B %d, %Y' # List of documents that shouldn't be included in the build. #unused_docs = [] # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # Options for HTML output # ----------------------- # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path. html_style = 'default.css' # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # The name of an image file (within the static path) to place at the top of # the sidebar. #html_logo = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_use_modindex = True # If true, the reST sources are included in the HTML build as _sources/. #html_copy_source = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. #html_use_opensearch = False # Output file base name for HTML help builder. htmlhelp_basename = __DISTRIBUTION__ + 'doc' # Options for LaTeX output # ------------------------ # The paper size ('letter' or 'a4'). #latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). #latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, document class [howto/manual]). latex_documents = [ ('index', __DISTRIBUTION__+ '.tex', __DISTRIBUTION__ + ' Documentation', __AUTHOR__, 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # Additional stuff for the LaTeX preamble. #latex_preamble = '' # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_use_modindex = True ././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/docs/index.rst_tmplpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/widget_template/docs/index.rst_t0000644000175000017500000000135611175375027031714 0ustar zackzack.. ${project} documentation master file. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. Welcome to ${project} documentation! ========================================================= Contents -------- .. toctree:: :maxdepth: 2 :class:`tw.${package}.${package.capitalize()}` ---------------------------------------------------------- .. autoclass:: tw.${package}.${package.capitalize()} .. widgetbrowser:: tw.${package}.${package.capitalize()} .. note:: See http://toscawidgets.org/documentation/WidgetBrowser to learn how to customize the ``widgetbrowser`` directive. Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/paste_templates/__init__.pyc0000644000175000017500000000022711203375526025666 0ustar zackzack³ò úõIc@sdS(N((((s@/Users/cperkins1/nrel/pdil/src/tw/tw/paste_templates/__init__.pysspython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/release.py0000644000175000017500000000060311224437176022213 0ustar zackzackfrom datetime import date __all__ = [ '__VERSION__', '__COPYRIGHT__', '__AUTHOR__', '__LICENSE__', '__PACKAGE_NAME__', ] __PACKAGE_NAME__ = "ToscaWidgets" __VERSION__ = "0.9.7.2" __AUTHOR__ = "Alberto Valverde Gonzalez" __EMAIL__ = "alberto@toscat.net" __COPYRIGHT__ = "2006-%d Alberto Valverde Gonzalez and contributors" % date.today().year __LICENSE__ = "MIT" python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/mods/0000755000175000017500000000000011224437421021155 5ustar zackzackpython-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/mods/cp2.py0000644000175000017500000000652011175375027022226 0ustar zackzackfrom pkg_resources import require require("CherryPy <3.0") import os, logging import pprint import cherrypy from cherrypy.filters.basefilter import BaseFilter import tw from tw.core import resource_injector, resources from tw.core.registry import Registry log = logging.getLogger(__name__) def _extract_config(): from cherrypy.config import configs c = configs.get('global', {}).copy() c.update(configs['/']) return c class TWInitFilter(BaseFilter): """Sort-of-emulates TWWidgetsMiddleware + Paste's RegsitryManager. Takes care of preparing the hostframework for a request.""" def __init__(self, host_framework, prefix='/toscawidgets', serve_files=True): self.serve_files = serve_files self.prefix = prefix self.host_framework = host_framework def on_start_resource(self): log.debug("TWFilter: on_start_resource") environ = cherrypy.request.wsgi_environ registry = environ.setdefault('paste.registry', Registry()) environ['toscawidgets.prefix'] = self.prefix registry.prepare() registry.register(tw.framework, self.host_framework) self.host_framework.start_request(environ) def before_main(self): """Intercepts requests for static files and serves them.""" if not self.serve_files: return req, resp = cherrypy.request, cherrypy.response path = req.path if path.startswith(self.host_framework.webpath): path = path[len(self.host_framework.webpath):] if path.startswith(self.prefix): reg = resources.registry path = path[len(self.prefix)+len(reg.prefix):] stream, ct, enc = reg.get_stream_type_encoding(path) if stream: resp.body = stream if ct: if enc: ct += '; charset=' + enc resp.headers['Content-Type'] = ct req.execute_main = False def before_finalize(self): # Injects resources log.debug("TWFilter: before_finalize") response = cherrypy.response ct = response.headers.get('content-type', 'text/html').lower() if 'html' in ct: cs = resource_injector.find_charset(ct) html = ''.join(response.body) resources = tw.framework.pop_resources() log.debug("Injecting Resources:") map(log.debug, pprint.pformat(resources).split('\n')) html = resource_injector.inject_resources(html=html, resources=resources, encoding=cs) response.body = [html] # Delete Content-Length header so finalize() recalcs it. response.headers.pop("Content-Length", None) def on_end_resource(self): log.debug("TWFilter: on_end_resource") try: environ = cherrypy.request.wsgi_environ self.host_framework.end_request(environ) finally: registry = environ['paste.registry'] registry.cleanup() def start_extension(host_framework, **filter_args): cherrypy.root._cp_filters.append(TWInitFilter(host_framework, **filter_args)) log.info("Added TWInitFilter") python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/mods/__init__.py0000644000175000017500000000007011175375027023273 0ustar zackzack__import__('pkg_resources').declare_namespace(__name__) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/mods/pylonshf.py0000644000175000017500000001402711175375027023405 0ustar zackzackimport logging from decorator import decorator from tw.api import retrieve_resources from tw.mods.base import HostFramework from tw.core.view import EngineManager import pylons from pylons.util import AttribSafeContextObj, ContextObj from pylons.i18n import ugettext from pylons.templating import render from formencode import Invalid __all__ = ["PylonsHostFramework", "validate", "render_response", "render", "valid"] log = logging.getLogger(__name__) class PylonsHostFramework(HostFramework): """HostFramework object for Pylons. Based on customization done in: http://wiki.pylonshq.com/display/pylonscookbook/An+Alternative+ToscaWidgets+Setup+with+Mako """ def __init__(self, engines=None, default_view='mako', translator=ugettext, template_paths=[], engine_options=None): if engines is None: opts = engine_options or {} opts.setdefault('mako.directories', template_paths) evf = opts.pop('extra_vars_func', None) engines = EngineManager(extra_vars_func=evf, options=opts) super(PylonsHostFramework, self).__init__(engines, default_view, translator) def validate(form=None, validators=None, error_handler=None, post_only=True, state_factory=None): """This decorator will use valid() to automatically validate input. If validation is successful the decorated function will be called and the valid result dict will be saved as ``self.form_result``. Otherwise, the action will be re-run as if it was a GET without setting ``form_result`` and if the form is redisplayed it will display errors and previous input values. If the decorated method did not originally display the form, then ``error_handler`` should be the name of the method (in the same controller) that originally displayed it. If you'd like validate to also check GET (query) variables during its validation, set the ``post_only`` keyword argument to False. """ def wrapper(func, self, *args, **kwargs): """Decorator Wrapper function""" if not valid(self, form=form, validators=validators, post_only=post_only, state_factory=state_factory): if error_handler: environ = pylons.request.environ environ['REQUEST_METHOD'] = 'GET' environ['pylons.routes_dict']['action'] = error_handler return self._dispatch_call() return func(self, *args, **kwargs) return decorator(wrapper) def valid(controller, form=None, validators=None, post_only=True, state_factory=None): """Validate input using a ToscaWidgetsForms form. Given a TW form or dict of validators, valid() will attempt to validate the form or validator dict as long as a POST request is made. No validation is performed on GET requests unless post_only is False. If validation was succesfull, the valid result dict will be saved as ``controller.form_result`` and valid() will return True. Otherwise the invalid exception will be stored at ``controller.validation_exception`` and valid() will return False. If you'd like validate to also check GET (query) variables during its validation, set the ``post_only`` keyword argument to False. """ request = pylons.request._current_obj() if post_only: params = request.POST.copy() else: params = request.params.copy() errors = {} if state_factory: state = state_factory() else: from tw import framework # Pass registered translator for formencode state = type('State', (object,), {'_':staticmethod(framework.translator)}) if form: try: controller.form_result = form.validate(params, state=state) except Invalid, e: log.debug("Validation failed with:\n%s", e) controller.validation_exception = e errors = e.error_dict or e if validators: if isinstance(validators, dict): if not hasattr(controller, 'form_result'): controller.form_result = {} for field, validator in validators.iteritems(): try: controller.form_result[field] = \ validator.to_python(decoded[field] or None, state) except Invalid, error: errors[field] = error if errors: controller.errors = errors return False return True # Note: render and render_response are DEPRECATED def _render_func_wrapper(func): def wrapper(*args, **kargs): import warnings warnings.warn(("%s is deprecated since collecting resources from " "widgets at pylons.c.w is no longer needed to inject " "them in the page.") % func.func_name, DeprecationWarning, 2) from tw import framework if len(args) > 1 and args[0] in framework.engines: framework.default_view = args[0] global_widgets = getattr(pylons.g, 'w', None) request_widgets = getattr(pylons.c, 'w', None) other_resources = kargs.pop('resources', None) pylons.c.resources = retrieve_resources( [global_widgets, request_widgets, other_resources] ) return func(*args, **kargs) try: wrapper.func_name = func.func_name except TypeError: # support 2.3 pass tw_extra_doc = """\ This version is a ToscaWidgets wrapper which collects resources in pylons.g.w and pylons.g.c and makies them available at pylons.c.resources so the base template can render them. It also sets the default_view if the engine name is overrided when calling me. """ wrapper.__doc__ = func.__doc__ + "\n\n" + tw_extra_doc wrapper.__dict__ = func.__dict__ return wrapper render_response = _render_func_wrapper(pylons.templating.render_response) render = _render_func_wrapper(pylons.templating.render) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/mods/tg.py0000644000175000017500000000440511175375027022154 0ustar zackzackfrom pkg_resources import require, VersionConflict import os, logging # TurboGears-1.0 uses CherryPy-2.3 while TurboGears-1.5 uses CherryPy-3.1. # CherryPy-2.3 uses Filters while CherryPy-3.1 uses Tools. We put the CherryPy # specific code in separate files which makes it possible for CherryPy users # that are not using TurboGears to use them directly. try: require("TurboGears>=1.0, <=1.5") import cp2 as cp default_view = 'kid' except VersionConflict: require("TurboGears>=1.5a1dev, <=2.0") import cp3 as cp default_view = 'genshi' import turbogears from turbogears.i18n.tg_gettext import gettext from turbogears.view import stdvars import cherrypy import tw from tw.core import view from tw.core.util import install_framework from tw.mods.base import HostFramework install_framework() log = logging.getLogger(__name__) class TurboGears(HostFramework): @property def request_local(self): try: rl = cherrypy.request.tw_request_local except AttributeError: rl = self.request_local_class(cherrypy.request.wsgi_environ) cherrypy.request.tw_request_local = rl return rl def start_request(self, environ): self.request_local.default_view = self._default_view def url(self, url): """ Returns the absolute path for the given url. """ prefix = self.request_local.environ['toscawidgets.prefix'] return '/' + turbogears.url(prefix+url).lstrip('/') def start_extension(): if not cherrypy.config.get('toscawidgets.on', False): return engines = view.EngineManager() engines.load_all(cp._extract_config(), stdvars) host_framework = TurboGears( engines = engines, default_view = cherrypy.config.get('tg.defaultview', default_view), translator = gettext, ) prefix = cherrypy.config.get('toscawidgets.prefix', '/toscawidgets') host_framework.prefix = prefix host_framework.webpath = cherrypy.config.get('server.webpath', '') log.info("Loaded TW TurboGears HostFramework") filter_args = dict( prefix = prefix, serve_files = cherrypy.config.get('toscawidgets.serve_files', 1) ) cp.start_extension(host_framework, **filter_args) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/mods/cp3.py0000644000175000017500000000752211175375027022232 0ustar zackzackfrom pkg_resources import require require("CherryPy >=3.0") import os, logging import pprint import cherrypy import tw from tw.core import resource_injector, resources from tw.core.registry import Registry log = logging.getLogger(__name__) def _extract_config(): c = cherrypy.config.copy() return c class TWTool(cherrypy.Tool): """Sort-of-emulates TWWidgetsMiddleware + Paste's RegsitryManager. Takes care of preparing the hostframework for a request.""" def __init__(self, host_framework, prefix='/toscawidgets', serve_files=True): self.serve_files = serve_files self.prefix = prefix self.host_framework = host_framework return super(TWTool, self).__init__("on_start_resource", self.on_start_resource) def on_start_resource(self): log.debug("TWTool: on_start_resource") environ = cherrypy.request.wsgi_environ registry = environ.setdefault('paste.registry', Registry()) environ['toscawidgets.prefix'] = self.prefix registry.prepare() registry.register(tw.framework, self.host_framework) self.host_framework.start_request(environ) def before_request_body(self): """Intercepts requests for static files and serves them.""" if not self.serve_files: return req, resp = cherrypy.request, cherrypy.response path = req.path_info if path.startswith(self.host_framework.webpath): path = path[len(self.host_framework.webpath):] if path.startswith(self.prefix): reg = resources.registry path = path[len(self.prefix)+len(reg.prefix):] stream, ct, enc = reg.get_stream_type_encoding(path) if stream: resp.body = stream if ct: if enc: ct += '; charset=' + enc resp.headers['Content-Type'] = ct req.process_request_body = False req.handler = None def before_finalize(self): # Injects resources log.debug("TWTool: before_finalize") response = cherrypy.response ct = response.headers.get('content-type', 'text/html').lower() if 'html' in ct: cs = resource_injector.find_charset(ct) html = ''.join(response.body) resources = tw.framework.pop_resources() log.debug("Injecting Resources:") map(log.debug, pprint.pformat(resources).split('\n')) html = resource_injector.inject_resources(html=html, resources=resources, encoding=cs) response.body = [html] # Delete Content-Length header so finalize() recalcs it. response.headers.pop("Content-Length", None) def on_end_request(self): log.debug("TWTool: on_end_request") try: environ = cherrypy.request.wsgi_environ self.host_framework.end_request(environ) finally: registry = environ.get('paste.registry', None) if registry: registry.cleanup() def _setup(self): conf = self._merged_args() p = conf.pop("priority", None) if p is None: p = getattr(self.callable, "priority", self._priority) cherrypy.request.hooks.attach(self._point, self.callable, priority=p, **conf) cherrypy.request.hooks.attach('on_end_request', self.on_end_request) cherrypy.request.hooks.attach('before_request_body', self.before_request_body) cherrypy.request.hooks.attach('before_finalize', self.before_finalize) def start_extension(host_framework, **filter_args): cherrypy.tools.toscawidgets = TWTool(host_framework=host_framework, **filter_args) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/mods/base.py0000644000175000017500000000745011175653301022451 0ustar zackzackfrom tw.core.view import EngineManager from tw.core.util import RequestLocalDescriptor, disable_runtime_checks from tw.core.registry import StackedObjectProxy, Registry __all__ = ["HostFramework"] class RequestLocal(object): def __init__(self, environ): self.environ = environ self.resources = {} class HostFramework(object): """ This class is the interface between ToscaWidgets and the framework or web application that's using them. The an instance of this class should be passed as second argument to :class:`tw.core.middleware.ToscaWidgetsMiddleware` which will call its :meth:`start_request` method at the beginning of every request and :meth:`end_request` when the request is over so I have a chance to register our per-request context. A request-local proxy to a configured instance is placed at the beginning of the request at :attr:`tw.framework` **Constructor's arguments:** engines An instance of :class:`tw.core.viewEngineManager`. default_view The name of the template engine used by default in the container app's templates. It's used to determine what conversion is neccesary when displaying root widgets on a template. translator Function used to translate strings. enable_runtime_checks Enables runtime checks for possible programming errors regarding modifying widget attributes once a widget has been initialized. Disabling this option can significantly reduce Widget initializatio time. .. note:: This operation modifies the Widget class and will affect any application using ToscaWidgets in the same process. """ request_local = StackedObjectProxy(name="ToscaWidgets per-request storage") request_local_class = RequestLocal default_view = RequestLocalDescriptor('default_view', 'toscawidgets') def __init__(self, engines=None, default_view='toscawidgets', translator=lambda s: s, enable_runtime_checks=True, default_engine=None): if engines is None: engines = EngineManager() self.engines = engines self._default_view = default_view self._default_engine = default_engine if default_engine is None: self._default_engine = default_view self.translator = translator if not enable_runtime_checks: disable_runtime_checks() def start_request(self, environ): """ Called by the middleware when a request has just begun so I have a chance to register the request context Widgets will use for various things. """ registry = environ['paste.registry'] registry.register(self.request_local, self.request_local_class(environ)) self.request_local.default_view = self._default_view def end_request(self, environ): """ Called by the middleware when a request has just finished so I can clean up. """ pass def url(self, url): """ Returns the absolute path for the given url. """ prefix = self.request_local.environ['toscawidgets.prefix'] script_name = self.request_local.environ['SCRIPT_NAME'] return ''.join([script_name, prefix, url]) def register_resources(self, resources): """ Registers resources for injection in the current request. """ from tw.api import merge_resources merge_resources(self.request_local.resources, resources) def pop_resources(self): """ Returns returns the resources that have been registered for this request and removes them from request-local storage area. """ resources = self.request_local.resources self.request_local.resources = {} return resources python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/tw/mods/wsgi.py0000644000175000017500000000021611175375027022507 0ustar zackzackfrom tw.mods.base import HostFramework __all__ = ["WSGIHostFramework"] #TODO: Deprecate WSGIHostFramework WSGIHostFramework = HostFramework python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/MANIFEST.in0000644000175000017500000000004711175375026021327 0ustar zackzackrecursive-include tw/paste_templates * python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/setup.py0000644000175000017500000000632011175375026021303 0ustar zackzack"""Setuptools setup file""" import sys, os from setuptools import setup if sys.version_info < (2, 4): raise SystemExit("Python 2.4 or later is required ATM") execfile(os.path.join("tw", "release.py")) def get_description(fname='README.txt'): # Adapted from PEAK-Rules' setup.py # Get our long description from the documentation f = file(fname) lines = [] for line in f: if not line.strip(): break # skip to first blank line for line in f: if line.startswith('Documentation contents'): break # read to "Documentation contents..." lines.append(line) f.close() return ''.join(lines) PACKAGES = [ 'tw', 'tw.core', 'tw.mods', ] # Requirements to install buffet plugins and engines _extra_cheetah = ["Cheetah>=1.0", "TurboCheetah>=0.9.5"] _extra_genshi = ["Genshi >= 0.3.5"] _extra_kid = ["kid>=0.9.5", "TurboKid>=0.9.9"] _extra_mako = ["Mako >= 0.1.1"] # Requierements to run all tests _extra_tests = _extra_cheetah + _extra_genshi + _extra_kid + _extra_mako + ['BeautifulSoup', 'WebTest'] setup( name=__PACKAGE_NAME__, version=__VERSION__, description="Web widget creation toolkit based on TurboGears widgets", long_description = get_description(), install_requires=[ 'WebOb', 'simplejson >= 2.0', ], extras_require = { 'cheetah': _extra_cheetah, 'kid': _extra_kid, 'genshi': _extra_genshi, 'mako': _extra_mako, 'build_docs': [ "Sphinx", "WidgetBrowser", ], }, tests_require = _extra_tests, url = "http://toscawidgets.org/", download_url = "http://toscawidgets.org/download/", author=__AUTHOR__, author_email=__EMAIL__, license=__LICENSE__, test_suite = 'tests', packages = PACKAGES, namespace_packages = ['tw', 'tw.mods'], include_package_data=True, exclude_package_data={"thirdparty" : ["*"]}, entry_points=""" [distutils.commands] archive_tw_resources = tw.core.command:archive_tw_resources [python.templating.engines] toscawidgets = tw.core.engine_plugin:ToscaWidgetsTemplatePlugin [toscawidgets.host_frameworks] wsgi = tw.mods.wsgi:WSGIHostFramework pylons = tw.mods.pylonshf:PylonsHostFramework turbogears = tw.mods.tg:Turbogears [toscawidgets.widgets] widgets = tw.api resources = tw.api [paste.paster_create_template] toscawidgets=tw.paste_template:ToscaWidgetsTemplate [turbogears.extensions] toscawidgets=tw.mods.tg [paste.filter_app_factory] middleware = tw.api:make_middleware """, zip_safe=False, classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Environment :: Web Environment :: ToscaWidgets', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Internet :: WWW/HTTP :: WSGI', 'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware', 'Topic :: Software Development :: Widget Sets', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', ], ) python-toscawidgets-0.9.7.2/ToscaWidgets-0.9.7.2/setup.cfg0000644000175000017500000000014111224437421021376 0ustar zackzack[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 [aliases] release = egg_info -rDb "" python-toscawidgets-0.9.7.2/toscawidgets0000777000175000017500000000000011230574132022201 2ToscaWidgets-0.9.7.2/ustar zackzackpython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/0000755000175000017500000000000011224440166016740 5ustar zackzackpython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/PKG-INFO0000644000175000017500000000135311224440166020037 0ustar zackzackMetadata-Version: 1.0 Name: tw.forms Version: 0.9.7.2 Summary: Web Widgets for building and validating forms. (former ToscaWidgetsForms) Home-page: http://toscawidgets.org Author: Alberto Valverde Gonzalez Author-email: alberto@toscat.net License: MIT Download-URL: http://toscawidgets.org/download Description: UNKNOWN Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Web Environment Classifier: Environment :: Web Environment :: ToscaWidgets Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Software Development :: Widget Sets Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/0000755000175000017500000000000011224440166017372 5ustar zackzackpython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/__init__.py0000644000175000017500000000007011120001754021467 0ustar zackzack__import__('pkg_resources').declare_namespace(__name__) python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/0000755000175000017500000000000011224440166020520 5ustar zackzackpython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/__init__.py0000644000175000017500000000110211120001754022612 0ustar zackzack""" Form widgets for ToscaWidgets. To download and install:: easy_install twForms """ from tw.api import Widget from tw.forms.core import * from tw.forms.fields import * from tw.forms.datagrid import * from tw.forms.calendars import * # build all so doc tools introspect me properly from tw.forms.core import __all__ as __core_all from tw.forms.fields import __all__ as __fields_all from tw.forms.datagrid import __all__ as __datagrid_all from tw.forms.calendars import __all__ as __calendars_all __all__ = __core_all + __fields_all + __datagrid_all + __calendars_all python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/0000755000175000017500000000000011224440166022516 5ustar zackzackpython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/select_field.html0000644000175000017500000000076411120001754026024 0ustar zackzack python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/table_fieldset.html0000644000175000017500000000431611211333703026350 0ustar zackzack
${field.display(value_for(field), **args_for(field))}
python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/spacer.html0000644000175000017500000000014711120001754024652 0ustar zackzack
 
python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/input_field.html0000644000175000017500000000032211120001754025672 0ustar zackzack python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/textarea.html0000644000175000017500000000035111120001754025207 0ustar zackzack\ python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/form.mak0000644000175000017500000000104311217762142024154 0ustar zackzack
% for field in hidden_fields: ${field.display(value_for(field), displays_on='mako', **args_for(field))} % endfor % for field in fields: ${field.display(value_for(field), displays_on='mako', **args_for(field))}
% endfor
\ python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/datagrid.html0000644000175000017500000000132711174146376025200 0ustar zackzack
python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/form.html0000644000175000017500000000075511224436763024366 0ustar zackzack
${Markup(field.display(value_for(field), **args_for(field)))} ${Markup(field.display(value_for(field), **args_for(field)))}
python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/calendar.html0000644000175000017500000000050311120001754025142 0ustar zackzack
python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/list_fieldset.mak0000644000175000017500000000413711120001754026036 0ustar zackzack<%namespace name="tw" module="tw.core.mako_util"/>\ <% error = context.get('error') %>\
${tw.content(legend)} % if error and show_error:
${tw.content(error)}
% endif % if hidden_fields:
% for field in hidden_fields: <% error = error_for(field) %> ${field.display(value_for(field), **args_for(field))} % if show_children_errors and error and not field.show_error: ${tw.content(error)} % endif % endfor
% endif
    % for i, field in enumerate(fields):
  • \ <% required = ['',' required'][int(field.is_required)] error = error_for(field) label_text = field.label_text help_text = field.help_text %> % if show_labels and label_text and not field.suppress_label: % endif ${field.display(value_for(field), **args_for(field))} % if help_text and not hover_help: ${tw.content(help_text)} % endif % if show_children_errors and error and not field.show_error: ${tw.content(error)} % endif
  • % endfor
% if error and not error.error_dict: ${tw.content(error)} % endif
\ python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/label_hidden.mak0000644000175000017500000000040011120001754025563 0ustar zackzack<%namespace name="tw" module="tw.core.mako_util"/>\
\ ${value} \
\ python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/table_form.html.orig0000644000175000017500000000403511217742673026471 0ustar zackzack
${XML(field.display(value_for(field), **args_for(field)))}
python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/list_fieldset.html0000644000175000017500000000353011120001754026226 0ustar zackzack
python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/fieldset.html0000644000175000017500000000066211120001754025176 0ustar zackzack
${field.display(value_for(field), **args_for(field))} ${field.display(value_for(field), **args_for(field))}
python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/table_fieldset.mak0000644000175000017500000000502011211334163026146 0ustar zackzack<%namespace name="tw" module="tw.core.mako_util"/>\ <% error = context.get('error') %>\
% if legend: ${tw.content(legend)} % endif % if error and show_error:
${tw.content(error)}
% endif % if hidden_fields:
% for field in hidden_fields: <% field_error = error_for(field) %> ${field.display(value_for(field), **args_for(field))} % if show_children_errors and field_error and not field.show_error: ${tw.content(field_error)} % endif % endfor
% endif % for i, field in enumerate(fields): \ <% required = ['',' required'][int(field.is_required)] field_error = error_for(field) label_text = field.label_text help_text = field.help_text %> % if show_labels and not field.suppress_label: % endif % endfor
% if label_text: % endif ${field.display(value_for(field), **args_for(field))} % if help_text and not hover_help: ${tw.content(help_text)} % endif % if show_children_errors and field_error and not field.show_error: ${tw.content(field_error)} % endif
% if error and not error.error_dict: ${tw.content(error)} % endif
\ python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/label.mak0000644000175000017500000000025211120001754024255 0ustar zackzack<%namespace name="tw" module="tw.core.mako_util"/>\
\ ${text}
\ python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/selection_list.html0000644000175000017500000000077511120001754026424 0ustar zackzack
python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/label.html0000644000175000017500000000024511120001754024453 0ustar zackzack
$text
python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/templates/__init__.pyc0000644000175000017500000000023511120002011024744 0ustar zackzack³ò ì@Ic@sdS(N((((sF/Users/cperkins1/nrel/pdil/src/tw.forms/tw/forms/templates/__init__.pysspython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/calendars.py0000644000175000017500000000551311174146375023043 0ustar zackzackfrom datetime import datetime import logging import errno import tw from tw.api import CSSLink, JSLink, js_function from tw.forms import FormField, validators __all__ = ["CalendarDatePicker", "CalendarDateTimePicker"] setup_calendar = js_function("Calendar.setup") log = logging.getLogger(__name__) calendar_css = CSSLink( modname='tw.forms', filename='static/calendar/calendar-system.css') calendar_js = JSLink( modname='tw.forms', filename='static/calendar/calendar.js') calendar_setup = JSLink( modname='tw.forms', filename='static/calendar/calendar-setup.js') class CalendarDatePicker(FormField): """ Uses a javascript calendar system to allow picking of calendar dates. The date_format is in mm/dd/yyyy unless otherwise specified """ css = [calendar_css] javascript = [calendar_js, calendar_setup] template = "tw.forms.templates.calendar" params = [ "calendar_lang", "not_empty", "button_text", "date_format", "picker_shows_time", "tzinfo", ] calendar_lang = 'en' not_empty = True button_text = "Choose" date_format = "%m/%d/%Y" picker_shows_time = False validator = None _default = None def __init__(self, *args, **kw): super(CalendarDatePicker, self).__init__(*args, **kw) if self.default is None and self.not_empty: self.default = lambda: datetime.now() self.validator = self.validator or validators.DateTimeConverter( format=self.date_format, not_empty=self.not_empty, tzinfo=self.tzinfo ) def get_calendar_lang_file_link(self, lang): """ Returns a CalendarLangFileLink containing a list of name patterns to try in turn to find the correct calendar locale file to use. """ fname = 'static/calendar/lang/calendar-%s.js' % lang.lower() return JSLink(modname='tw.forms', filename=fname, javascript=self.javascript) def update_params(self, d): super(CalendarDatePicker, self).update_params(d) log.debug("Value received by Calendar: %r", d.value) try: d.strdate = d.value.strftime(d.date_format) except AttributeError: d.strdate = d.value options = dict( inputField = self.id, ifFormat = d.date_format, button = self.id + '_trigger', showsTime = d.picker_shows_time, ) self.get_calendar_lang_file_link(d.calendar_lang).inject() self.add_call(setup_calendar(options)) class CalendarDateTimePicker(CalendarDatePicker): """ Use a javascript calendar system to allow picking of calendar dates and time. The date_format is in mm/dd/yyyy hh:mm unless otherwise specified """ date_format = "%Y/%m/%d %H:%M" picker_shows_time = True python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/fields.py0000644000175000017500000005255411217014131022342 0ustar zackzackimport math from warnings import warn from inspect import isclass import logging, re from itertools import chain, count import formencode from formencode.foreach import ForEach from formencode import Invalid import tw from tw.api import Widget, lazystring from tw.core.util import iwarn from tw.core import view from tw.forms import (InputWidget, InputWidgetRepeater, validators) log = logging.getLogger(__name__) __all__ = [ "FormField", "FormFieldRepeater", "ContainerMixin", "Form", "FieldSet", "TableMixin", "ListMixin", "ListForm", "ListFieldSet", "TextArea", "InputField", "TextField", "PasswordField", "HiddenField", "FileField", "Button", "SubmitButton", "ResetButton", "ImageButton", "SelectionField", "SingleSelectField", "SelectionList", "SingleSelectionMixin", "MultipleSelectionMixin", "MultipleSelectField", "RadioButtonList", "CheckBoxList", "TableForm", "CheckBox", "RadioButton", "SecureTicketField", "SecureFormMixin", "BooleanRadioButtonList", "TableFieldSet", "CheckBoxTable", "Spacer", "Label", "LabelHiddenField", ] _ = lazystring def name2label(name): """ Convert a column name to a Human Readable name. Yanked from TGFastData """ # Create label from the name: # 1) Convert _ to spaces # 2) Convert CamelCase to Camel Case # 3) Upcase first character of Each Word # Note: I *think* it would be thread-safe to # memoize this thing. return ' '.join([s.capitalize() for s in re.findall(r'([A-Z][a-z0-9]+|[a-z0-9]+|[A-Z0-9]+)', name)]) class FormField(InputWidget): """ Base class for all Widgets that can be attached to a Form or FieldSet. Form and FieldSets are in turn FormFields so they can be arbitrarily nested. These widgets can provide a validator that should validate and coerce the input they generate when submitted. """ params = [ "is_required", "label_text", "help_text", "attrs", "show_error", "disabled", "style", "container_attrs", "suppress_label", ] show_error = False show_error__doc = ("Should the field display it's own errors? Defaults to " "False because normally they're displayed by the " "container widget") disabled = None disabled__doc = ("Should the field be disbaled on render and it's input " "ignored by the validator? UNIMPLEMENTED") attrs = {} attrs__doc = ("Extra attributes for the outermost DOM node") help_text = None help_text__doc = ("Description of the field to aid the user") label_text = None label_text__doc = "The text that should label this field" style = None style__doc = ("Style properties for the field. It's recommended to use " "css classes and stylesheets instead of this parameter") container_attrs = {} container_attrs__doc = ("Extra attributes to include in the container tag " "around this widget") suppress_label = False suppress_label__doc = ("Allows individual widgets to suppress the attached " "label in their container") available_engines = ['mako', 'genshi'] engine_name = 'genshi' @property def is_required(self): try: self.validate('', use_request_local=False) return False except (formencode.Invalid, KeyError): # Catch KeyError too since now FieldsMatch raises it when # one of the fields it should match is missing. This is probably # A FE bug introduced in 1.1... return True is_required__doc = ("Computed flag indicating if input is required from " "this field") file_upload = False def __init__(self, id=None, parent=None, children=[], **kw): super(FormField, self).__init__(id,parent,children, **kw) if self.label_text is None and self.name is not None: pos = self.name.rfind('.') name = self.name[pos+1:] self.label_text = name2label(name) def update_params(self,d): super(FormField, self).update_params(d) if self.is_required: d.css_classes.append('required') if d.disabled: d.attrs['disabled'] = 'disabled' def update_attrs(self, d, *args): """ Fetches values from the dict and inserts the in the attrs dict. This is useful when you want to avoid boiler-place at the template: Instead of:: Do:: And inside update_params: .. code-block:: python self.update_attrs(d, 'bar', 'zoo') ('bar' and 'zoo' need to be listed at ``params``) """ for name in args: d.setdefault('attrs',{}).setdefault(name, d[name]) class ContainerMixin(Widget): """ A mix-in class for FormFields that contain other FormFields The following parameters are available: `show_children_errors` A flag indicating if the container should display it's children's errors It provides the template with these iterators: `fields` A list with all the container's visible FormFields present in `children` `hidden_fields` A list with all the container's hidden FormFields `ifields` (DEPRECATED: use `fields` instead) Iterates over all the container's visible FormFields present in `children` `ihidden_fields` (DEPRECATED: use `hidden_fields` instead) Iterates over all the container's hidden FormFields """ params = ["show_children_errors"] show_error = False show_children_errors = True def __new__(cls, id=None, parent=None, children=[], **kw): fields = kw.pop('fields', None) if fields is not None: children = fields else: children = getattr(cls, 'fields', children) return super(ContainerMixin, cls).__new__(cls, id,parent,children,**kw) @property def ifields(self): return self.ifilter_children( lambda x: isinstance(x,FormField) and not isinstance(x,HiddenField) ) @property def ihidden_fields(self): return self.ifilter_children(lambda x: isinstance(x,HiddenField)) def _has_file_upload(self): for field in self.ifilter_children( lambda x: getattr(x, 'file_upload', False) ): return True return False def post_init(self, *args, **kw): log.debug("Setting 'file_upload' for %r", self) self.file_upload = self._has_file_upload() def update_params(self,d): super(ContainerMixin, self).update_params(d) d.fields = list(self.ifields) d.hidden_fields = list(self.ihidden_fields) d.ifields = iwarn(d.fields, "ifields is deprecated, use fields instead", DeprecationWarning, 2) d.ihidden_fields = iwarn(d.hidden_fields, "ihidden_fields is deprecated, use hidden_fields instead", DeprecationWarning, 2) class FormFieldRepeater(InputWidgetRepeater, ContainerMixin, FormField): show_error = True # Trick containers not to display its errors # Override engine stuff inherited from FormField available_engines = [] engine_name = 'toscawidgets' class Form(ContainerMixin, FormField): """ A base class for all forms. Use this class as a base for your custom form. You should override it's template because it's a dummy one which does not display errors, help text or anything besides it's fields. The form will take care of setting its ``enctype`` if it contains any FileField """ template = "tw.forms.templates.form" params = ["action", "method", "submit_text"] action = '' action__doc = "The url where the form's contents should be submitted" method = 'post' method__doc = "The HTTP request method to be used" submit_text = "Submit" submit_text__doc = ("Text that should appear in the auto-generated Submit " "button. If None then no submit button will be " "autogenerated.") submit_label_text = '' submit_label__doc = ("Label text for the auto-generated submit button. " "If empty then no label will be generated.") def __init__(self, id=None, parent=None, children=[], **kw): super(Form, self).__init__(id, parent, children, **kw) if not hasattr(self.c, 'submit') and self.submit_text is not None: SubmitButton('submit', self, default=self.submit_text, label_text=self.submit_label_text) def post_init(self, *args, **kw): log.debug("Setting 'enctype' for %r", self) if self._has_file_upload(): self.attrs.setdefault('enctype', 'multipart/form-data') self.strip_name = kw.get('strip_name', self.is_root) def update_params(self, d): super(Form, self).update_params(d) d.method = d.method.lower() # Fails W3C validation if present d.attrs.pop('disabled', None) class FieldSet(ContainerMixin, FormField): """ Base class for a fieldset. Use this class for your custom fieldset. You should override it's template because it's a dummy one which does not display errors, help text or anything besides it's fields. """ template = "tw.forms.templates.fieldset" params = ["legend"] legend__doc = ("The legend for the fieldset. If none is provided it will " "use its name") def __init__(self, id=None, parent=None, children=[], **kw): super(FieldSet, self).__init__(id,parent,children, **kw) if self.legend is None: self.legend = self.label_text class TableMixin(object): """ Mix-in class for containers that use a table to render their fields """ params = ["table_attrs", "show_labels", "hover_help"] table_attrs = {} show_labels = True hover_help = False class ListMixin(object): """ Mix-in class for containers that use a list to render their fields """ params = ["list_attrs", "show_labels", "hover_help"] list_attrs = {} show_labels = True hover_help = False class ListForm(Form, ListMixin): """ A form that renders it's fields as an unordered list """ template = "tw.forms.templates.list_form" class TableForm(Form, TableMixin): """ A form that renders it's fields in a table """ template = "tw.forms.templates.table_form" class ListFieldSet(FieldSet, ListMixin): """ A fieldset that renders it's fields as an unordered list """ template = "tw.forms.templates.list_fieldset" class TableFieldSet(FieldSet, TableMixin): """ A fieldset that renders it's fields in a table """ template = "tw.forms.templates.table_fieldset" class TextArea(FormField): """ Displays a textarea. """ params = ["rows", "cols"] rows__doc = "Number of rows to render" cols__doc = "Number of columns to render" template = "tw.forms.templates.textarea" rows = 7 cols = 50 def update_params(self,d): super(TextArea, self).update_params(d) self.update_attrs(d, "rows", "cols") class InputField(FormField): """Base class for fields""" params = ["type"] template = "tw.forms.templates.input_field" class TextField(InputField): """A text field""" params = ["size", "max_size", "maxlength"] size__doc = "The size of the text field." maxlength__doc = "The maximum size of the field" max_size__doc = ("The maximum size of the field (DEPRECATED: use maxlength " "instead)") type = "text" def update_params(self,d): super(TextField, self).update_params(d) if d.max_size is not None: d.maxlength = d.max_size warn("max_size is deprecated, use maxlength instead", DeprecationWarning, 6) self.update_attrs(d, "size", "maxlength") class PasswordField(InputField): """A password field.""" type = "password" class HiddenField(InputField): """A hidden field """ type = "hidden" class FileField(InputField): """A file upload field""" type = "file" file_upload = True def adapt_value(self, value): # This is needed because genshi doesn't seem to like displaying # cgi.FieldStorage instances return None class Button(InputField): """A button field""" type = "button" params = ["named_button"] named_button = False def __init__(self, id=None, parent=None, children=[], **kw): super(Button, self).__init__(id,parent,children, **kw) if not self.named_button: self.validator = None def _full_name(self): if not self.named_button: return None return super(Button, self)._full_name() name = property(_full_name) class SubmitButton(Button): type = "submit" def update_params(self,d): super(SubmitButton, self).update_params(d) # A submit button with and id of 'submit' will make # form.submit == 'object' in JS code. See ticket #1295 if d.id == 'submit': d.id = None class ResetButton(Button): type = "reset" class ImageButton(Button): params = ["src", "width", "height", "alt"] type = "image" def update_params(self,d): super(ImageButton, self).update_params(d) if isinstance(d.get('src', self.src), tw.api.Link): d['src'] = d.get('src', self.src).link self.update_attrs(d, "src", "width", "height", "alt") class CheckBox(InputField): type = "checkbox" validator = validators.Bool def update_params(self, d): super(CheckBox, self).update_params(d) try: checked = self.validator.to_python(d.value) except Invalid: checked = False d.attrs['checked'] = checked or None class RadioButton(InputField): type = "radio" class SelectionField(FormField): selected_verb = None params = ["options"] options = [] def update_params(self, d): super(SelectionField, self).update_params(d) grouped_options = [] options = [] d['options'] = self._iterate_options(d['options']) # Coerce value if possible so _is_options_selected can compare python # values. This is needed when validation fails because FE will send # uncoerced values. value = self.safe_validate(d['value']) for optgroup in d["options"]: if isinstance(optgroup[1], (list,tuple)): group = True optlist = optgroup[1][:] else: group = False optlist = [optgroup] for i, option in enumerate(self._iterate_options(optlist)): if len(option) is 2: option_attrs = {} elif len(option) is 3: option_attrs = dict(option[2]) if self._is_option_selected(option[0], value): option_attrs[self.selected_verb] = self.selected_verb optlist[i] = (self.adjust_value(option[0]), option[1], option_attrs) options.extend(optlist) if group: grouped_options.append((optgroup[0], optlist)) # options provides a list of *flat* options leaving out any eventual # group, useful for backward compatibility and simpler widgets d["options"] = options if grouped_options: d["grouped_options"] = grouped_options else: d["grouped_options"] = [(None, options)] def _iterate_options(self, options): for option in options: if not isinstance(option, (tuple,list)): yield (option, option) else: yield option class SelectionList(ListMixin, SelectionField): params = ["field_type", "id_counter"] selected_verb = "checked" template = "tw.forms.templates.selection_list" def id_counter(self): return count(0) class SingleSelectionMixin(object): def _is_option_selected(self, option_value, value): return option_value == value class MultipleSelectionMixin(object): def _is_option_selected(self, option_value, value): return value is not None and option_value in value def post_init(self, *args, **kw): # Only override the user-provided validator if it's not a ForEach one, # which usually means the user needs to perform validation on the list # as a whole. self._original_validator = self.validator if not (isinstance(self.validator, ForEach) or (isclass(self.validator) and issubclass(self.validator, ForEach))): self.validator = ForEach(self.validator) def adjust_value(self, value, validator=None): # Our ForEach validator will return a single element list. We only # want that single element return SelectionField.adjust_value(self, value, self._original_validator) class SingleSelectField(SingleSelectionMixin, SelectionField): selected_verb = 'selected' template = "tw.forms.templates.select_field" class MultipleSelectField(MultipleSelectionMixin, SelectionField): params = ["size"] size = 5 selected_verb = 'selected' template = "tw.forms.templates.select_field" def update_params(self,d): super(MultipleSelectField, self).update_params(d) self.update_attrs(d, "size") d['attrs']['multiple'] = True class RadioButtonList(SingleSelectionMixin, SelectionList): field_type = "radio" class BooleanRadioButtonList(RadioButtonList): options = [(False, _("No")), (True, _("Yes"))] validator = validators.StringBoolean class CheckBoxList(MultipleSelectionMixin, SelectionList): field_type = "checkbox" class SecureTicketField(HiddenField): """ Hidden form field that offers some protection against Cross-Site Request Forgery: http://en.wikipedia.org/wiki/Cross-site_request_forgery This protection is not complete against XSS or web browser bugs, see http://www.cgisecurity.com/articles/csrf-faq.shtml A per-session per-form authentication key is generated, and injected to this hidden field. They are compared on form validation. On mismatch, validation error is displayed. """ def __init__(self, id=None, parent=None, children=[], session_secret_cb=None, **kw): """Initialize the CSRF form token field. session_secret_cb() should return (session_secret, token) where session_secret is a random per-session secret string, and token some string associated with the current user. """ super(SecureTicketField, self).__init__(id, parent, children, **kw) self.validator = validators.SecureTicketValidator(self, session_secret_cb) def update_params(self, d): super(SecureTicketField, self).update_params(d) d['value'] = self.validator.get_hash() return d class SecureFormMixin(FormField): """ Protect against Cross-site request forgery, by adding SecureTicketField to the form. This can be use like this:: class MyForm(ListForm, SecureFormMixin): ... def session_secret_cb(): "Return session-specific secret data string and some data. Both of them should stay constant per form per user." secret = session['secret'] user_id = c.user.user_name return str(secret), str(user_id) form = MyForm(session_secret_cb=session_secret_cb) or:: class MyForm(ListForm, SecureFormMixin): ... def session_secret_cb(): ... form = MyForm() """ def post_init(self, *args, **kw): session_secret_cb = kw.pop('session_secret_cb', None) #super(SecureFormMixin, self).__init__(id, parent, children, **kw) if hasattr(self, 'session_secret_cb') and session_secret_cb is None: session_secret_cb = self.session_secret_cb SecureTicketField("form_token__", self, session_secret_cb=session_secret_cb) def group(seq, size): if not hasattr(seq, 'next'): seq = iter(seq) while True: chunk = [] try: for i in xrange(size): chunk.append(seq.next()) yield chunk except StopIteration: if chunk: yield chunk break class CheckBoxTable(CheckBoxList): """ A checkboxlist that renders a table of checkboxes of num_cols columns """ template = "tw.forms.templates.check_box_table" params = ["num_cols"] num_cols = 1 def update_params(self, d): super(CheckBoxTable, self).update_params(d) d.options_rows = group(d.options, d.num_cols) d.grouped_options_rows = [(g, group(o, d.num_cols)) for g, o in d.grouped_options] class Spacer(FormField): """ A widget to insert spacing within a form """ template = "tw.forms.templates.spacer" validator = None class Label(FormField): """ A textual label """ params = ['text'] text = '' template = "tw.forms.templates.label" validator = None suppress_label = True class LabelHiddenField(InputField): """A hidden field with a label showing its contents""" template = "tw.forms.templates.label_hidden" python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/release.py0000644000175000017500000000057711224437147022530 0ustar zackzackfrom datetime import date __all__ = [ '__VERSION__', '__COPYRIGHT__', '__AUTHOR__', '__LICENSE__', '__PACKAGE_NAME__', ] __PACKAGE_NAME__ = "tw.forms" __VERSION__ = "0.9.7.2" __AUTHOR__ = "Alberto Valverde Gonzalez" __EMAIL__ = "alberto@toscat.net" __COPYRIGHT__ = "2006-%d Alberto Valverde Gonzalez and contributors" % date.today().year __LICENSE__ = "MIT" python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/validators.py0000644000175000017500000001212211151611007023231 0ustar zackzackimport re import warnings import time import hmac from datetime import datetime, date import weakref import formencode from formencode.validators import * from formencode.foreach import ForEach from formencode.compound import * from formencode.api import Invalid, NoDefault from formencode.schema import Schema class DateTimeConverter(FancyValidator): """ Converts Python date and datetime objects into string representation and back. """ messages = { 'badFormat': 'Invalid datetime format', 'empty': 'Empty values not allowed', } if_missing = None def __init__(self, format = "%Y/%m/%d %H:%M", tzinfo=None, *args, **kwargs): super(FancyValidator, self).__init__(*args, **kwargs) self.format = format self.tzinfo = tzinfo def _to_python(self, value, state): """ parse a string and return a datetime object. """ if value and isinstance(value, (date, datetime)): return value else: try: tpl = time.strptime(value, self.format) except ValueError: raise Invalid(self.message('badFormat', state), value, state) # shoudn't use time.mktime() because it can give OverflowError, # depending on the date (e.g. pre 1970) and underlying C library return datetime(year=tpl.tm_year, month=tpl.tm_mon, day=tpl.tm_mday, hour=tpl.tm_hour, minute=tpl.tm_min, second=tpl.tm_sec, tzinfo=self.tzinfo) def _from_python(self, value, state): if not value: return None elif isinstance(value, datetime): # Python stdlib can only handle dates with year greater than 1900 if value.year <= 1900: return strftime_before1900(value, self.format) else: return value.strftime(self.format) else: return value _illegal_s = re.compile(r"((^|[^%])(%%)*%s)") def _findall(text, substr): # Also finds overlaps sites = [] i = 0 while 1: j = text.find(substr, i) if j == -1: break sites.append(j) i = j+1 return sites def strftime_before1900(dt, fmt): """ A strftime implementation that supports proleptic Gregorian dates before 1900. @see: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/306860 """ import datetime if _illegal_s.search(fmt): raise TypeError("This strftime implementation does not handle %s") if dt.year > 1900: return dt.strftime(fmt) year = dt.year # For every non-leap year century, advance by # 6 years to get into the 28-year repeat cycle delta = 2000 - year off = 6*(delta // 100 + delta // 400) year = year + off # Move to around the year 2000 year = year + ((2000 - year)//28)*28 timetuple = dt.timetuple() s1 = time.strftime(fmt, (year,) + timetuple[1:]) sites1 = _findall(s1, str(year)) s2 = time.strftime(fmt, (year+28,) + timetuple[1:]) sites2 = _findall(s2, str(year+28)) sites = [] for site in sites1: if site in sites2: sites.append(site) s = s1 syear = "%4d" % (dt.year,) for site in sites: s = s[:site] + syear + s[site+4:] return s class UnicodeString(UnicodeString): """The FormEncode UnicodeString validator encodes strings as utf-8 for display. However, this is not desired behaviour in tw.forms, as Genshi will fail when it receives such strings. Instead, this validator renders Python unicode objects where possible, strings otherwise.""" def _from_python(self, value, state): if isinstance(value, basestring): return value elif hasattr(value, '__unicode__'): return unicode(value) else: return str(value) class SecureTicketValidator(FancyValidator): """This validator helps you avoid cross-site request forgeries (CSRF) - a kind of web application security vulnerability.""" def __init__(self, widget=None, session_secret_cb=None, **kw): # Weakref to container widget to avoid memory leaks widget = widget and weakref.proxy(widget) or widget self.widget = widget self.session_secret_cb = session_secret_cb def get_form_info(self): widgets = self.widget.root.walk() return '/'.join(["%s:%s" % (type(obj).__name__, obj.id) for obj in widgets]) def get_hash(self): """ Generate a hash that is associated with - Current user - Current session - The form """ secret, stuff = map(str, self.session_secret_cb()) stuff += self.get_form_info() return hmac.new(secret, stuff).hexdigest() def _to_python(self, value, state): if value != self.get_hash(): msg = "Form token mismatch! Please try resubmitting the form." raise Invalid(msg, value, state) return None __all__ = ["Invalid", "NoDefault"] for name, value in locals().items(): if isinstance(value, type) and issubclass(value, Validator): __all__.append(name) python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/0000755000175000017500000000000011224440166022007 5ustar zackzackpython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/0000755000175000017500000000000011224440166023560 5ustar zackzackpython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar-win2k-cold-1.css0000644000175000017500000001324511217014131030144 0ustar zackzack/* The main calendar widget. DIV containing a table. */ .calendar { position: relative; display: none; border-top: 2px solid #fff; border-right: 2px solid #000; border-bottom: 2px solid #000; border-left: 2px solid #fff; font-size: 11px; color: #000; cursor: default; background: #c8d0d4; font-family: tahoma,verdana,sans-serif; z-index: 99; } .calendar table { border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; font-size: 11px; color: #000; cursor: default; background: #c8d0d4; font-family: tahoma,verdana,sans-serif; } /* Header part -- contains navigation buttons and day names. */ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ text-align: center; padding: 1px; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; } .calendar .nav { background: transparent url(menuarrow.gif) no-repeat 100% 100%; } .calendar thead .title { /* This holds the current "month, year" */ font-weight: bold; padding: 1px; border: 1px solid #000; background: #788084; color: #fff; text-align: center; } .calendar thead .headrow { /* Row containing navigation buttons */ } .calendar thead .daynames { /* Row containing the day names */ } .calendar thead .name { /* Cells containing the day names */ border-bottom: 1px solid #000; padding: 2px; text-align: center; background: #e8f0f4; } .calendar thead .weekend { /* How a weekend day name shows in header */ color: #f00; } .calendar thead .hilite { /* How do the buttons in header appear when hover */ border-top: 2px solid #fff; border-right: 2px solid #000; border-bottom: 2px solid #000; border-left: 2px solid #fff; padding: 0px; background-color: #d8e0e4; } .calendar thead .active { /* Active (pressed) buttons in header */ padding: 2px 0px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; background-color: #b8c0c4; } /* The body part -- contains all the days in month. */ .calendar tbody .day { /* Cells containing month days dates */ width: 2em; text-align: right; padding: 2px 4px 2px 2px; } .calendar tbody .day.othermonth { font-size: 80%; color: #aaa; } .calendar tbody .day.othermonth.oweekend { color: #faa; } .calendar table .wn { padding: 2px 3px 2px 2px; border-right: 1px solid #000; background: #e8f4f0; } .calendar tbody .rowhilite td { background: #d8e4e0; } .calendar tbody .rowhilite td.wn { background: #c8d4d0; } .calendar tbody td.hilite { /* Hovered cells */ padding: 1px 3px 1px 1px; border: 1px solid; border-color: #fff #000 #000 #fff; } .calendar tbody td.active { /* Active (pressed) cells */ padding: 2px 2px 0px 2px; border: 1px solid; border-color: #000 #fff #fff #000; } .calendar tbody td.selected { /* Cell showing selected date */ font-weight: bold; padding: 2px 2px 0px 2px; border: 1px solid; border-color: #000 #fff #fff #000; background: #d8e0e4; } .calendar tbody td.weekend { /* Cells showing weekend days */ color: #f00; } .calendar tbody td.today { /* Cell showing today date */ font-weight: bold; color: #00f; } .calendar tbody .disabled { color: #999; } .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ visibility: hidden; } .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ display: none; } /* The footer part -- status bar and "Close" button */ .calendar tfoot .footrow { /* The in footer (only one right now) */ } .calendar tfoot .ttip { /* Tooltip (status bar) cell */ background: #e8f0f4; padding: 1px; border: 1px solid #000; background: #788084; color: #fff; text-align: center; } .calendar tfoot .hilite { /* Hover style for buttons in footer */ border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; padding: 1px; background: #d8e0e4; } .calendar tfoot .active { /* Active (pressed) style for buttons in footer */ padding: 2px 0px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } /* Combo boxes (menus that display months/years for direct selection) */ .calendar .combo { position: absolute; display: none; width: 4em; top: 0px; left: 0px; cursor: default; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; background: #d8e0e4; font-size: 90%; padding: 1px; z-index: 100; } .calendar .combo .label, .calendar .combo .label-IEfix { text-align: center; padding: 1px; } .calendar .combo .label-IEfix { width: 4em; } .calendar .combo .active { background: #c8d0d4; padding: 0px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } .calendar .combo .hilite { background: #048; color: #aef; } .calendar td.time { border-top: 1px solid #000; padding: 1px 0px; text-align: center; background-color: #e8f0f4; } .calendar td.time .hour, .calendar td.time .minute, .calendar td.time .ampm { padding: 0px 3px 0px 4px; border: 1px solid #889; font-weight: bold; background-color: #fff; } .calendar td.time .ampm { text-align: center; } .calendar td.time .colon { padding: 0px 2px 0px 3px; font-weight: bold; } .calendar td.time span.hilite { border-color: #000; background-color: #667; color: #fff; } .calendar td.time span.active { border-color: #f00; background-color: #000; color: #0f0; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/menuarrow.gif0000644000175000017500000000010411120001754026250 0ustar zackzackGIF89añ€€€îîæÿÿÿ!ù,¢D€%J„(Q¢D‰%J”¨;python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar.js0000644000175000017500000010304111174146375025677 0ustar zackzack/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo * ----------------------------------------------------------- * * The DHTML Calendar, version 1.0 "It is happening again" * * Details and latest version at: * www.dynarch.com/projects/calendar * * This script is developed by Dynarch.com. Visit us at www.dynarch.com. * * This script is distributed under the GNU Lesser General Public License. * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html */ Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined")Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);}Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined")Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);}Calendar._SMN=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))f=f.parentNode;return f;};Calendar.getTargetElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)f=f.parentNode;return f;};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}if(show){var s=yc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)if(range[i]==current)break;while(count-->0)if(decrease){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.innerHTML=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)return false;removeClass(el,"hilite");if(el.caldate)removeClass(el.parentNode,"rowhilite");if(el.calendar)el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}}cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl)cal._toggleMultipleDate(new Date(date));else newdate=!el.disabled;if(other_month)cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=new Date(cal.date);if(el.navtype==0)date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to to get it into the distribution ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year=0;)if(range[i]==current)break;if(ev&&ev.shiftKey){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}break;}if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)newdate=closing=true;}if(newdate){ev&&cal.callHandler();}if(closing){Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";}div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="
"+text+"
";return cell;};row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("×",1,200).ttip=Calendar._TT["CLOSE"];}row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("«",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("‹",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("›",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("»",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"];}for(var i=7;i>0;--i){cell=Calendar.createElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell);}}if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||" ";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number")part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else cell.innerHTML=" ";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.test(AP.innerHTML)&&h<12)h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)h=0;}var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i0;--i){var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){var cal=window._dynarch_popupCalendar;if(!cal||cal.multiple)return false;(Calendar.is_ie)&&(ev=window.event);var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.getDate()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)ne=cal.ar_days[y][x];else{x=6;K=38;continue;}break;case 38:if(--y>=0)ne=cal.ar_days[y][x];else{prevMonth();setVars();}break;case 39:if(++x<7)ne=cal.ar_days[y][x];else{x=0;K=40;continue;}break;case 40:if(++ythis.maxYear){year=this.maxYear;date.setFullYear(year);}this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML=" ";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip)cell.title=toolTip;}if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))cell.disabled=true;cell.className+=" "+status;}}if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&¤t_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(weekend.indexOf(wday.toString())!=-1)cell.className+=cell.otherMonth?" oweekend":" weekend";}}if(!(hasdays||this.showsOtherMonths))row.className="emptyrow";}this.title.innerHTML=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates();};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)continue;if(cell)cell.className+=" selected";}}};Calendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){Calendar.addClass(cell,"selected");this.multiple[ds]=date;}else{Calendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};Calendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){var calendar=window._dynarch_popupCalendar;if(!calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}function fixPosition(box){if(box.x<0)box.x=0;if(box.y<0)box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);if(Calendar.is_ie){br.y+=document.documentElement.scrollTop;br.x+=document.documentElement.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){case "T":p.y-=h;break;case "B":p.y+=el.offsetHeight;break;case "C":p.y+=(el.offsetHeight-h)/2;break;case "t":p.y+=el.offsetHeight-h;break;case "b":break;}switch(halign){case "L":p.x-=w;break;case "R":p.x+=el.offsetWidth;break;case "C":p.x+=(el.offsetWidth-w)/2;break;case "l":p.x+=el.offsetWidth-w;break;case "r":break;}p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(Calendar.is_khtml)setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10);else Calendar.continuation_for_the_fucking_khtml_browser();};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){if(!fmt)fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera)return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml)value=document.defaultView. getComputedStyle(obj,"").getPropertyValue("visibility");else value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else value='';}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2EY2)||(CY229)?1900:2000);break;case "%b":case "%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}break;case "%H":case "%I":case "%k":case "%l":hr=parseInt(a[i],10);break;case "%P":case "%p":if(/pm/i.test(a[i])&&hr<12)hr+=12;else if(/am/i.test(a[i])&&hr>=12)hr-=12;break;case "%M":min=parseInt(a[i],10);break;}}if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0)y=today.getFullYear();if(m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml)return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte", "Diumenge"); // short day names Calendar._SDN = new Array ("Diu", "Dil", "Dmt", "Dmc", "Dij", "Div", "Dis", "Diu"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Gener", "Febrer", "Mar\xe7", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"); // short month names Calendar._SMN = new Array ("Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Sobre el calendari"; Calendar._TT["ABOUT"] = "DHTML Selector de Data/Hora\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Sel.lecci\xf3 de Dates:\n" + "- Fes servir els botons \xab, \xbb per sel.leccionar l'any\n" + "- Fes servir els botons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per se.lecciconar el mes\n" + "- Mant\xe9 el ratol\xed apretat en qualsevol dels anteriors per sel.lecci\xf3 r\xe0pida."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Time selection:\n" + "- claca en qualsevol de les parts de la hora per augmentar-les\n" + "- o Shift-click per decrementar-la\n" + "- or click and arrastra per sel.lecci\xf3 r\xe0pida."; Calendar._TT["PREV_YEAR"] = "Any anterior (Mantenir per menu)"; Calendar._TT["PREV_MONTH"] = "Mes anterior (Mantenir per menu)"; Calendar._TT["GO_TODAY"] = "Anar a avui"; Calendar._TT["NEXT_MONTH"] = "Mes seg\xfcent (Mantenir per menu)"; Calendar._TT["NEXT_YEAR"] = "Any seg\xfcent (Mantenir per menu)"; Calendar._TT["SEL_DATE"] = "Sel.leccionar data"; Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar per moure"; Calendar._TT["PART_TODAY"] = " (avui)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Mostra %s primer"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Tanca"; Calendar._TT["TODAY"] = "Avui"; Calendar._TT["TIME_PART"] = "(Shift-)Click a arrastra per canviar el valor"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "st"; Calendar._TT["TIME"] = "Hora:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-zh_cn-gbk.js0000644000175000017500000000522211174146376030463 0ustar zackzack// Calendar i18n // Language: zh-cn (Chinese, China) // Encoding: gbk // Author: muziq, , nEO // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("ÐÇÆÚÈÕ", "ÐÇÆÚÒ»", "ÐÇÆÚ¶þ", "ÐÇÆÚÈý", "ÐÇÆÚËÄ", "ÐÇÆÚÎå", "ÐÇÆÚÁù", "ÐÇÆÚÈÕ"); // short day names Calendar._SDN = new Array ("ÈÕ", "Ò»", "¶þ", "Èý", "ËÄ", "Îå", "Áù", "ÈÕ"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Ò»ÔÂ", "¶þÔÂ", "ÈýÔÂ", "ËÄÔÂ", "ÎåÔÂ", "ÁùÔÂ", "ÆßÔÂ", "°ËÔÂ", "¾ÅÔÂ", "Ê®ÔÂ", "ʮһÔÂ", "Ê®¶þÔÂ"); // short month names Calendar._SMN = new Array ("Ò»ÔÂ", "¶þÔÂ", "ÈýÔÂ", "ËÄÔÂ", "ÎåÔÂ", "ÁùÔÂ", "ÆßÔÂ", "°ËÔÂ", "¾ÅÔÂ", "Ê®ÔÂ", "ʮһÔÂ", "Ê®¶þÔÂ"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "°ïÖú"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Ñ¡ÔñÈÕÆÚ:\n" + "- µã»÷ \xab, \xbb °´Å¥Ñ¡ÔñÄê·Ý\n" + "- µã»÷ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " °´Å¥Ñ¡ÔñÔ·Ý\n" + "- ³¤°´ÒÔÉϰ´Å¥¿É´Ó²Ëµ¥ÖпìËÙÑ¡ÔñÄê·Ý»òÔ·Ý"; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Ñ¡Ôñʱ¼ä:\n" + "- µã»÷Сʱ»ò·ÖÖÓ¿Éʹ¸ÄÊýÖµ¼ÓÒ»\n" + "- °´×¡Shift¼üµã»÷Сʱ»ò·ÖÖÓ¿Éʹ¸ÄÊýÖµ¼õÒ»\n" + "- µã»÷Í϶¯Êó±ê¿É½øÐпìËÙÑ¡Ôñ"; Calendar._TT["PREV_YEAR"] = "ÉÏÒ»Äê (°´×¡³ö²Ëµ¥)"; Calendar._TT["PREV_MONTH"] = "ÉÏÒ»Ô (°´×¡³ö²Ëµ¥)"; Calendar._TT["GO_TODAY"] = "תµ½½ñÈÕ"; Calendar._TT["NEXT_MONTH"] = "ÏÂÒ»Ô (°´×¡³ö²Ëµ¥)"; Calendar._TT["NEXT_YEAR"] = "ÏÂÒ»Äê (°´×¡³ö²Ëµ¥)"; Calendar._TT["SEL_DATE"] = "Ñ¡ÔñÈÕÆÚ"; Calendar._TT["DRAG_TO_MOVE"] = "Í϶¯"; Calendar._TT["PART_TODAY"] = " (½ñÈÕ)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "×î×ó±ßÏÔʾ%s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "¹Ø±Õ"; Calendar._TT["TODAY"] = "½ñÈÕ"; Calendar._TT["TIME_PART"] = "(Shift-)µã»÷Êó±ê»òÍ϶¯¸Ä±äÖµ"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%A, %b %eÈÕ"; Calendar._TT["WK"] = "ÖÜ"; Calendar._TT["TIME"] = "ʱ¼ä:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-ro-cp1250.js0000644000175000017500000000436011174146376030153 0ustar zackzack// Calendar i18n // Language: ro (Romanian) // Encoding: cp1250 // Author: Mihai Bazon, // Distributed under the same terms as the calendar itself. Calendar._DN = new Array ("Duminicã", "Luni", "Marþi", "Miercuri", "Joi", "Vineri", "Sâmbãtã", "Duminicã"); Calendar._SDN_len = 2; Calendar._FD = 0; Calendar._MN = new Array ("Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Despre calendar"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "Pentru ultima versiune vizitaþi: http://www.dynarch.com/projects/calendar/\n" + "Distribuit sub GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Selecþia datei:\n" + "- Folosiþi butoanele \xab, \xbb pentru a selecta anul\n" + "- Folosiþi butoanele " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pentru a selecta luna\n" + "- Tineþi butonul mouse-ului apãsat pentru selecþie mai rapidã."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Selecþia orei:\n" + "- Click pe ora sau minut pentru a mãri valoarea cu 1\n" + "- Sau Shift-Click pentru a micºora valoarea cu 1\n" + "- Sau Click ºi drag pentru a selecta mai repede."; Calendar._TT["PREV_YEAR"] = "Anul precedent (lung pt menu)"; Calendar._TT["PREV_MONTH"] = "Luna precedentã (lung pt menu)"; Calendar._TT["GO_TODAY"] = "Data de azi"; Calendar._TT["NEXT_MONTH"] = "Luna urmãtoare (lung pt menu)"; Calendar._TT["NEXT_YEAR"] = "Anul urmãtor (lung pt menu)"; Calendar._TT["SEL_DATE"] = "Selecteazã data"; Calendar._TT["DRAG_TO_MOVE"] = "Trage pentru a miºca"; Calendar._TT["PART_TODAY"] = " (astãzi)"; Calendar._TT["DAY_FIRST"] = "Afiºeazã %s prima zi"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Închide"; Calendar._TT["TODAY"] = "Astãzi"; Calendar._TT["TIME_PART"] = "(Shift-)Click sau drag pentru a selecta"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%A, %d %B"; Calendar._TT["WK"] = "spt"; Calendar._TT["TIME"] = "Ora:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-lv.js0000644000175000017500000000573711174146376027255 0ustar zackzack// Calendar i18n // Language: lv (Latvian) // Encoding: utf-8 // Author: Juris Valdovskis, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Svçtdiena", "Pirmdiena", "Otrdiena", "Treðdiena", "Ceturdiena", "Piektdiena", "Sestdiena", "Svçtdiena"); // short day names Calendar._SDN = new Array ("Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "Se", "Sv"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Janvâris", "Februâris", "Marts", "Aprîlis", "Maijs", "Jûnijs", "Jûlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"); // short month names Calendar._SMN = new Array ("Jan", "Feb", "Mar", "Apr", "Mai", "Jûn", "Jûl", "Aug", "Sep", "Okt", "Nov", "Dec"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Par kalendâru"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Datuma izvçle:\n" + "- Izmanto \xab, \xbb pogas, lai izvçlçtos gadu\n" + "- Izmanto " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "pogas, lai izvçlçtos mçnesi\n" + "- Turi nospiestu peles pogu uz jebkuru no augstâk minçtajâm pogâm, lai paâtrinâtu izvçli."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Laika izvçle:\n" + "- Uzklikðíini uz jebkuru no laika daïâm, lai palielinâtu to\n" + "- vai Shift-klikðíis, lai samazinâtu to\n" + "- vai noklikðíini un velc uz attiecîgo virzienu lai mainîtu âtrâk."; Calendar._TT["PREV_YEAR"] = "Iepr. gads (turi izvçlnei)"; Calendar._TT["PREV_MONTH"] = "Iepr. mçnesis (turi izvçlnei)"; Calendar._TT["GO_TODAY"] = "Ãodien"; Calendar._TT["NEXT_MONTH"] = "Nâkoðais mçnesis (turi izvçlnei)"; Calendar._TT["NEXT_YEAR"] = "Nâkoðais gads (turi izvçlnei)"; Calendar._TT["SEL_DATE"] = "Izvçlies datumu"; Calendar._TT["DRAG_TO_MOVE"] = "Velc, lai pârvietotu"; Calendar._TT["PART_TODAY"] = " (ðodien)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Attçlot %s kâ pirmo"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "1,7"; Calendar._TT["CLOSE"] = "Aizvçrt"; Calendar._TT["TODAY"] = "Ãodien"; Calendar._TT["TIME_PART"] = "(Shift-)Klikðíis vai pârvieto, lai mainîtu"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; Calendar._TT["WK"] = "wk"; Calendar._TT["TIME"] = "Laiks:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-hu.js0000644000175000017500000000576111174146375027244 0ustar zackzack// Calendar i18n // Language: hu (Hungarian) // Encoding: utf-8 // Author: Karaszi Istvan, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Vasárnap", "Hétfõ", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat", "Vasárnap"); // short day names Calendar._SDN = new Array ("v", "h", "k", "sze", "cs", "p", "szo", "v"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"); // short month names Calendar._SMN = new Array ("jan", "feb", "már", "ápr", "máj", "jún", "júl", "aug", "sze", "okt", "nov", "dec"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "A kalendáriumról"; Calendar._TT["ABOUT"] = "DHTML dátum/idõ kiválasztó\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "a legfrissebb verzió megtalálható: http://www.dynarch.com/projects/calendar/\n" + "GNU LGPL alatt terjesztve. Lásd a http://gnu.org/licenses/lgpl.html oldalt a részletekhez." + "\n\n" + "Dátum választás:\n" + "- használja a \xab, \xbb gombokat az év kiválasztásához\n" + "- használja a " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gombokat a hónap kiválasztásához\n" + "- tartsa lenyomva az egérgombot a gyors választáshoz."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Idõ választás:\n" + "- kattintva növelheti az idõt\n" + "- shift-tel kattintva csökkentheti\n" + "- lenyomva tartva és húzva gyorsabban kiválaszthatja."; Calendar._TT["PREV_YEAR"] = "Elõzõ év (tartsa nyomva a menühöz)"; Calendar._TT["PREV_MONTH"] = "Elõzõ hónap (tartsa nyomva a menühöz)"; Calendar._TT["GO_TODAY"] = "Mai napra ugrás"; Calendar._TT["NEXT_MONTH"] = "Köv. hónap (tartsa nyomva a menühöz)"; Calendar._TT["NEXT_YEAR"] = "Köv. év (tartsa nyomva a menühöz)"; Calendar._TT["SEL_DATE"] = "Válasszon dátumot"; Calendar._TT["DRAG_TO_MOVE"] = "Húzza a mozgatáshoz"; Calendar._TT["PART_TODAY"] = " (ma)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "%s legyen a hét elsõ napja"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Bezár"; Calendar._TT["TODAY"] = "Ma"; Calendar._TT["TIME_PART"] = "(Shift-)Klikk vagy húzás az érték változtatásához"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%b %e, %a"; Calendar._TT["WK"] = "hét"; Calendar._TT["TIME"] = "idõ:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-de_de.js0000644000175000017500000000614311174146375027663 0ustar zackzack// Calendar i18n // Language: de-de (German, Germany) // Encoding: any // Author: Jack (tR), // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"); // short day names Calendar._SDN = new Array ("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Januar", "Februar", "M\xe4rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"); // short month names Calendar._SMN = new Array ("Jan", "Feb", "M\xe4r", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "\xDCber dieses Kalendermodul"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Datum ausw\xe4hlen:\n" + "- Benutzen Sie die Kn\xf6pfe \xab und \xbb, um das Jahr auszuw\xe4hlen.\n" + "- Benutzen Sie die Kn\xf6pfe \u2039 und \u203a, um den Monat auszuw\xe4hlen.\n" + "- Zur Schnellauswahl halten Sie die Maustaste \xfcber diesen Kn\xf6pfen gedr\xfcckt."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Zeit ausw\xe4hlen:\n" + "- Klicken Sie auf die Teile der Uhrzeit, um diese zu erh\xF6hen,\n" + "- oder klicken Sie mit festgehaltener Umschalttaste, um diese zu verringern,\n" + "- oder klicken und gedr\xfcckt halten zur Schnellauswahl."; Calendar._TT["TOGGLE"] = "Ersten Tag der Woche w\xe4hlen"; Calendar._TT["PREV_YEAR"] = "Voriges Jahr (Auswahl: l\xe4nger klicken)"; Calendar._TT["PREV_MONTH"] = "Voriger Monat (Auswahl: l\xe4nger klicken)"; Calendar._TT["GO_TODAY"] = "Heute ausw\xe4hlen"; Calendar._TT["NEXT_MONTH"] = "N\xe4chster Monat (Auswahl: l\xe4nger klicken)"; Calendar._TT["NEXT_YEAR"] = "N\xe4chstes Jahr (Auswahl: l\xe4nger klicken)"; Calendar._TT["SEL_DATE"] = "Datum ausw\xe4hlen"; Calendar._TT["DRAG_TO_MOVE"] = "Zum Bewegen gedr\xfcckt halten"; Calendar._TT["PART_TODAY"] = " (Heute)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Woche beginnt mit %s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Schlie\xdfen"; Calendar._TT["TODAY"] = "Heute"; Calendar._TT["TIME_PART"] = "(Umschalt-)Klick oder Festhalten und Ziehen, um den Wert zu \xe4ndern"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b"; Calendar._TT["WK"] = "KW"; Calendar._TT["TIME"] = "Uhrzeit:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-nl.js0000644000175000017500000000506611174146376027240 0ustar zackzack// Calendar i18n // Language: nl (Dutch) // Encoding: any // Author: Mihai Bazon, // Distributed under the same terms as the calendar itself. Calendar._DN = new Array ("Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag", "Zondag"); Calendar._SDN = new Array ("Zo.", "Ma.", "Di.", "Wo.", "Do.", "Vr.", "Za.", "Zo."); Calendar._FD = 1; Calendar._MN = new Array ("Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"); Calendar._SMN = new Array ("Jan.", "Feb.", "Mrt.", "Apr.", "Mei", "Jun.", "Jul.", "Aug.", "Sept.", "Okt.", "Nov.", "Dec."); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Info"; Calendar._TT["ABOUT"] = "DHTML Datum/Tijd Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + "Ga voor de meest recente versie naar: http://www.dynarch.com/projects/calendar/\n" + "Verspreid onder de GNU LGPL. Zie http://gnu.org/licenses/lgpl.html voor details." + "\n\n" + "Datum selectie:\n" + "- Gebruik de \xab \xbb knoppen om een jaar te selecteren\n" + "- Gebruik de " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knoppen om een maand te selecteren\n" + "- Houd de muis ingedrukt op de genoemde knoppen voor een snellere selectie."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Tijd selectie:\n" + "- Klik op een willekeurig onderdeel van het tijd gedeelte om het te verhogen\n" + "- of Shift-klik om het te verlagen\n" + "- of klik en sleep voor een snellere selectie."; //Calendar._TT["TOGGLE"] = "Selecteer de eerste week-dag"; Calendar._TT["PREV_YEAR"] = "Vorig jaar (ingedrukt voor menu)"; Calendar._TT["PREV_MONTH"] = "Vorige maand (ingedrukt voor menu)"; Calendar._TT["GO_TODAY"] = "Ga naar Vandaag"; Calendar._TT["NEXT_MONTH"] = "Volgende maand (ingedrukt voor menu)"; Calendar._TT["NEXT_YEAR"] = "Volgend jaar (ingedrukt voor menu)"; Calendar._TT["SEL_DATE"] = "Selecteer datum"; Calendar._TT["DRAG_TO_MOVE"] = "Klik en sleep om te verplaatsen"; Calendar._TT["PART_TODAY"] = " (vandaag)"; //Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; //Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; Calendar._TT["DAY_FIRST"] = "Toon %s eerst"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Sluiten"; Calendar._TT["TODAY"] = "(vandaag)"; Calendar._TT["TIME_PART"] = "(Shift-)Klik of sleep om de waarde te veranderen"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b %Y"; Calendar._TT["WK"] = "wk"; Calendar._TT["TIME"] = "Tijd:";python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-cs-cp1250.js0000644000175000017500000000531111174146375030134 0ustar zackzack// Calendar i18n // Language: cs (Czech) // Encoding: cp1250 // Author: Lubos Jerabek , Jan Uhlir // Distributed under the same terms as the calendar itself. Calendar._DN = new Array('Nedìle','Pondìlí','Úterý','Støeda','Ètvrtek','Pátek','Sobota','Nedìle'); Calendar._SDN = new Array('Ne','Po','Út','St','Èt','Pá','So','Ne'); Calendar._FD = 1; Calendar._MN = new Array('Leden','Únor','Bøezen','Duben','Kvìten','Èerven','Èervenec','Srpen','Záøí','Øíjen','Listopad','Prosinec'); Calendar._SMN = new Array('Led','Úno','Bøe','Dub','Kvì','Èrv','Èvc','Srp','Záø','Øíj','Lis','Pro'); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "O komponentì kalendáø"; Calendar._TT["TOGGLE"] = "Zmìna prvního dne v týdnu"; Calendar._TT["PREV_YEAR"] = "Pøedchozí rok (pøidrž pro menu)"; Calendar._TT["PREV_MONTH"] = "Pøedchozí mìsíc (pøidrž pro menu)"; Calendar._TT["GO_TODAY"] = "Dnešní datum"; Calendar._TT["NEXT_MONTH"] = "Další mìsíc (pøidrž pro menu)"; Calendar._TT["NEXT_YEAR"] = "Další rok (pøidrž pro menu)"; Calendar._TT["SEL_DATE"] = "Vyber datum"; Calendar._TT["DRAG_TO_MOVE"] = "Chy a táhni, pro pøesun"; Calendar._TT["PART_TODAY"] = " (dnes)"; //Calendar._TT["MON_FIRST"] = "Ukaž jako první Pondìlí"; //Calendar._TT["SUN_FIRST"] = "Ukaž jako první Nedìli"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Výbìr datumu:\n" + "- Use the \xab, \xbb buttons to select year\n" + "- Použijte tlaèítka " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " k výbìru mìsíce\n" + "- Podržte tlaèítko myši na jakémkoliv z tìch tlaèítek pro rychlejší výbìr."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Výbìr èasu:\n" + "- Kliknìte na jakoukoliv z èástí výbìru èasu pro zvýšení.\n" + "- nebo Shift-click pro snížení\n" + "- nebo kliknìte a táhnìte pro rychlejší výbìr."; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Zobraz %s první"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Zavøít"; Calendar._TT["TODAY"] = "Dnes"; Calendar._TT["TIME_PART"] = "(Shift-)Klikni nebo táhni pro zmìnu hodnoty"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "wk"; Calendar._TT["TIME"] = "Èas:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-tr.js0000644000175000017500000000273411174146376027253 0ustar zackzack// Calendar i18n // Language: tr (Turkish) // Encoding: utf-8 // Author: Nuri Akman // Distributed under the same terms as the calendar itself. Calendar._DN = new Array ("Pazar", "Pazartesi", "Salı", "ÇarÅŸamba", "PerÅŸembe", "Cuma", "Cumartesi", "Pazar"); // First day of the week. "6" means display Saturday first. Calendar._FD = 6; Calendar._MN = new Array ("Ocak", "Åžubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "AÄŸustos", "Eylül", "Ekim", "Kasım", "Aralık"); // tooltips Calendar._TT = {}; Calendar._TT["TOGGLE"] = "Haftanın ilk gününü kaydır"; Calendar._TT["PREV_YEAR"] = "Önceki Yıl (Menü için basılı tutunuz)"; Calendar._TT["PREV_MONTH"] = "Önceki Ay (Menü için basılı tutunuz)"; Calendar._TT["GO_TODAY"] = "Bugün'e git"; Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Menü için basılı tutunuz)"; Calendar._TT["NEXT_YEAR"] = "Sonraki Yıl (Menü için basılı tutunuz)"; Calendar._TT["SEL_DATE"] = "Tarih seçiniz"; Calendar._TT["DRAG_TO_MOVE"] = "Taşımak için sürükleyiniz"; Calendar._TT["PART_TODAY"] = " (bugün)"; Calendar._TT["DAY_FIRST"] = "Takvim %s gününden baÅŸlasın"; Calendar._TT["WEEKEND"] = "5"; Calendar._TT["CLOSE"] = "Kapat"; Calendar._TT["TODAY"] = "Bugün"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "Hafta"; Calendar._TT["TIME"] = "Saat:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-lt.js0000644000175000017500000000605211174146376027242 0ustar zackzack// Calendar i18n // Language: lt (Lithuanian) // Encoding: utf-8 // Author: Dalius Dobravolskas // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Sekmadienis", "Pirmadienis", "Antradienis", "TreÄiadienis", "Ketvirtadienis", "Penktadienis", "Å eÅ¡tadienis", "Sekmadienis"); // short day names Calendar._SDN = new Array ("Sk", "Pr", "An", "Tr", "Ke", "Pn", "Å e", "Sk"); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 1; // full month names Calendar._MN = new Array ("Sausis", "Vasaris", "Kovas", "Balandis", "Gegužė", "Birželis", "Liepa", "RugpjÅ«tis", "RugsÄ—jis", "Spalis", "Lapkritis", "Gruodis"); // short month names Calendar._SMN = new Array ("Sau", "Vas", "Kov", "Bal", "Geg", "Bir", "Lie", "Rgp", "Rus", "Spa", "Lap", "Grd"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Apie kalendorių"; Calendar._TT["ABOUT"] = "DHTML Datos/Laiko ParinkÄ—jas\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "Naujausia versija: http://www.dynarch.com/projects/calendar/\n" + "Platinama pagal GNU LGPL. Daugiau informacijos http://gnu.org/licenses/lgpl.html." + "\n\n" + "Datos parinkimas:\n" + "- Naudokite \xab, \xbb mygtukus metų parinkimui\n" + "- Naudokite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " mygtukus mÄ—nesių parinkimui\n" + "- Užlaikykite pelÄ—s mygtukÄ… greitesniam parinkimui."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Laiko parinkimas:\n" + "- Spauskite ant bet kurios laiko dalies norÄ—dami jÄ… padidinti.\n" + "- Jei laikysite paspaudÄ™ Shift ji mažės.\n" + "- Arba paspauskite ir tempkite greitam parinkimui."; Calendar._TT["PREV_YEAR"] = "Praeiti metai (palaikykite paspaudÄ™, jei norite meniu)"; Calendar._TT["PREV_MONTH"] = "Praeitas mÄ—nuo (palaikykite paspaudÄ™, jei norite meniu)"; Calendar._TT["GO_TODAY"] = "Å iandiena"; Calendar._TT["NEXT_MONTH"] = "Kitas mÄ—nuo (palaikykite paspaudÄ™, jei norite meniu)"; Calendar._TT["NEXT_YEAR"] = "Kiti metai (palaikykite paspaudÄ™, jei norite meniu)"; Calendar._TT["SEL_DATE"] = "IÅ¡sirinkite datÄ…"; Calendar._TT["DRAG_TO_MOVE"] = "Tempkite norÄ—dami pajudinti"; Calendar._TT["PART_TODAY"] = " (Å¡iandiena)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Rodyti %s kaip pirmÄ… savaitÄ—s dienÄ…."; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "6,0"; Calendar._TT["CLOSE"] = "Uždaryti"; Calendar._TT["TODAY"] = "Å iandiena"; Calendar._TT["TIME_PART"] = "(Shift-)pelÄ—s mygtuko spustelÄ—jimas arba tempimas norint pakeisti reikÅ¡mÄ™"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "Sa"; Calendar._TT["TIME"] = "Laikas:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-ru-koi8_r.js0000644000175000017500000000567311174146376030452 0ustar zackzack// Calendar i18n // Language: ru (Russian) // Encoding: koi8-r // Author: Sly Golovanov, http://golovanov.net, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("×ÏÓËÒÅÓÅÎØÅ", "ÐÏÎÅÄÅÌØÎÉË", "×ÔÏÒÎÉË", "ÓÒÅÄÁ", "ÞÅÔ×ÅÒÇ", "ÐÑÔÎÉÃÁ", "ÓÕÂÂÏÔÁ", "×ÏÓËÒÅÓÅÎØÅ"); // short day names Calendar._SDN = new Array ("×ÓË", "ÐÏÎ", "×ÔÒ", "ÓÒÄ", "ÞÅÔ", "ÐÑÔ", "ÓÕÂ", "×ÓË"); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 1; // full month names Calendar._MN = new Array ("ÑÎ×ÁÒØ", "ÆÅ×ÒÁÌØ", "ÍÁÒÔ", "ÁÐÒÅÌØ", "ÍÁÊ", "ÉÀÎØ", "ÉÀÌØ", "Á×ÇÕÓÔ", "ÓÅÎÔÑÂÒØ", "ÏËÔÑÂÒØ", "ÎÏÑÂÒØ", "ÄÅËÁÂÒØ"); // short month names Calendar._SMN = new Array ("ÑÎ×", "ÆÅ×", "ÍÁÒ", "ÁÐÒ", "ÍÁÊ", "ÉÀÎ", "ÉÀÌ", "Á×Ç", "ÓÅÎ", "ÏËÔ", "ÎÏÑ", "ÄÅË"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "ï ËÁÌÅÎÄÁÒÅ..."; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "ëÁË ×ÙÂÒÁÔØ ÄÁÔÕ:\n" + "- ðÒÉ ÐÏÍÏÝÉ ËÎÏÐÏË \xab, \xbb ÍÏÖÎÏ ×ÙÂÒÁÔØ ÇÏÄ.\n" + "- ðÒÉ ÐÏÍÏÝÉ ËÎÏÐÏË \u2039, \u203a ÍÏÖÎÏ ×ÙÂÒÁÔØ ÍÅÓÑÃ.\n" + "- ðÏÄÅÒÖÉÔÅ ÜÔÉ ËÎÏÐËÉ ÎÁÖÁÔÙÍÉ, ÞÔÏÂÙ ÐÏÑ×ÉÌÏÓØ ÍÅÎÀ ÂÙÓÔÒÏÇÏ ×ÙÂÏÒÁ."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "ëÁË ×ÙÂÒÁÔØ ×ÒÅÍÑ:\n" + "- ðÒÉ ËÌÉËÅ ÎÁ ÞÁÓÁÈ ÉÌÉ ÍÉÎÕÔÁÈ ÏÎÉ Õ×ÅÌÉÞÉ×ÁÀÔÓÑ.\n" + "- ðÒÉ ËÌÉËÅ Ó ÎÁÖÁÔÏÊ ËÌÁ×ÉÛÅÊ Shift ÏÎÉ ÕÍÅÎØÛÁÀÔÓÑ.\n" + "- åÓÌÉ ÎÁÖÁÔØ É Ä×ÉÇÁÔØ ÍÙÛËÏÊ ×ÌÅ×Ï/×ÐÒÁ×Ï, ÏÎÉ ÂÕÄÕÔ ÍÅÎÑÔØÓÑ ÂÙÓÔÒÅÅ."; Calendar._TT["PREV_YEAR"] = "îÁ ÇÏÄ ÎÁÚÁÄ (ÕÄÅÒÖÉ×ÁÔØ ÄÌÑ ÍÅÎÀ)"; Calendar._TT["PREV_MONTH"] = "îÁ ÍÅÓÑà ÎÁÚÁÄ (ÕÄÅÒÖÉ×ÁÔØ ÄÌÑ ÍÅÎÀ)"; Calendar._TT["GO_TODAY"] = "óÅÇÏÄÎÑ"; Calendar._TT["NEXT_MONTH"] = "îÁ ÍÅÓÑà ×ÐÅÒÅÄ (ÕÄÅÒÖÉ×ÁÔØ ÄÌÑ ÍÅÎÀ)"; Calendar._TT["NEXT_YEAR"] = "îÁ ÇÏÄ ×ÐÅÒÅÄ (ÕÄÅÒÖÉ×ÁÔØ ÄÌÑ ÍÅÎÀ)"; Calendar._TT["SEL_DATE"] = "÷ÙÂÅÒÉÔÅ ÄÁÔÕ"; Calendar._TT["DRAG_TO_MOVE"] = "ðÅÒÅÔÁÓËÉ×ÁÊÔÅ ÍÙÛËÏÊ"; Calendar._TT["PART_TODAY"] = " (ÓÅÇÏÄÎÑ)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "ðÅÒ×ÙÊ ÄÅÎØ ÎÅÄÅÌÉ ÂÕÄÅÔ %s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "úÁËÒÙÔØ"; Calendar._TT["TODAY"] = "óÅÇÏÄÎÑ"; Calendar._TT["TIME_PART"] = "(Shift-)ËÌÉË ÉÌÉ ÎÁÖÁÔØ É Ä×ÉÇÁÔØ"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; Calendar._TT["WK"] = "ÎÅÄ"; Calendar._TT["TIME"] = "÷ÒÅÍÑ:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-af.js0000644000175000017500000000275011174146375027211 0ustar zackzack// Calendar i18n file // Language: af (Afrikaans) // Encoding: Any // Distributed under the same terms as the calendar itself. Calendar._DN = new Array ("Sondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrydag", "Saterdag", "Sondag"); Calendar._SDN = new Array ("Son", "Maan", "Dins", "Woen", "Dond", "Vry", "Sat", "Son"); Calendar._FD = 0; Calendar._MN = new Array ("Januarie", "Februarie", "Maart", "April", "Mei", "Junie", "Julie", "Augustus", "September", "Oktober", "November", "Desember"); Calendar._SMN = new Array ("Jan", "Feb", "Mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"); // tooltips Calendar._TT = {}; Calendar._TT["PREV_YEAR"] = "Vorige jaar (hou vir keuselys)"; Calendar._TT["PREV_MONTH"] = "Vorige maand (hou vir keuselys)"; Calendar._TT["GO_TODAY"] = "Gaan na vandag"; Calendar._TT["NEXT_MONTH"] = "Volgende maand (hou vir keuselys)"; Calendar._TT["NEXT_YEAR"] = "Volgende jaar (hou vir keuselys)"; Calendar._TT["SEL_DATE"] = "Kies datum"; Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te skuif"; Calendar._TT["PART_TODAY"] = " (vandag)"; Calendar._TT["DAY_FIRST"] = "Vertoon %s eerste dag van die week"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Toemaak"; Calendar._TT["TODAY"] = "Vandag"; Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value"; Calendar._TT["DEF_DATE_FORMAT"] = "%Y/%m/%d"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "wk"; Calendar._TT["TIME"] = "Uur:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-es.js0000644000175000017500000000603511174146375027232 0ustar zackzack// Calendar i18n // Language: es (Spanish) // Encoding: any // Author: Servilio Afre Puentes // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Domingo", "Lunes", "Martes", "Mi\xe9rcoles", "Jueves", "Viernes", "S\xe1bado", "Domingo"); // short day names Calendar._SDN = new Array ("Dom", "Lun", "Mar", "Mi\xe9", "Jue", "Vie", "S\xe1b", "Dom"); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 1; // full month names Calendar._MN = new Array ("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"); // short month names Calendar._SMN = new Array ("Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Acerca del calendario"; Calendar._TT["ABOUT"] = "Selector DHTML de Fecha/Hora\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "Para conseguir la \xfaltima versi\xf3n visite: http://www.dynarch.com/projects/calendar/\n" + "Distribuido bajo licencia GNU LGPL. Visite http://gnu.org/licenses/lgpl.html para m\xe1s detalles." + "\n\n" + "Selecci\xf3n de fecha:\n" + "- Use los botones \xab, \xbb para seleccionar el a\xf1o\n" + "- Use los botones " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" + "- Mantenga pulsado el rat\xf3n en cualquiera de estos botones para una selecci\xf3n r\xe1pida."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Selecci\xf3n de hora:\n" + "- Pulse en cualquiera de las partes de la hora para incrementarla\n" + "- o pulse las may\xfasculas mientras hace clic para decrementarla\n" + "- o haga clic y arrastre el rat\xf3n para una selecci\xf3n m\xe1s r\xe1pida."; Calendar._TT["PREV_YEAR"] = "A\xf1o anterior (mantener para men\xfa)"; Calendar._TT["PREV_MONTH"] = "Mes anterior (mantener para men\xfa)"; Calendar._TT["GO_TODAY"] = "Ir a hoy"; Calendar._TT["NEXT_MONTH"] = "Mes siguiente (mantener para men\xfa)"; Calendar._TT["NEXT_YEAR"] = "A\xf1o siguiente (mantener para men\xfa)"; Calendar._TT["SEL_DATE"] = "Seleccionar fecha"; Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar para mover"; Calendar._TT["PART_TODAY"] = " (hoy)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Hacer %s primer d\xeda de la semana"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Cerrar"; Calendar._TT["TODAY"] = "Hoy"; Calendar._TT["TIME_PART"] = "(May\xfascula-)Clic o arrastre para cambiar valor"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y"; Calendar._TT["WK"] = "sem"; Calendar._TT["TIME"] = "Hora:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-it.js0000644000175000017500000000544011174146375027236 0ustar zackzack// Calendar i18n // Language: it (Italian) // Encoding: utf-8 // Author: Fabio Di Bernardini, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato", "Domenica"); // short day names Calendar._SDN = new Array ("Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab", "Dom"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"); // short month names Calendar._SMN = new Array ("Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Informazioni sul calendario"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "Per gli aggiornamenti: http://www.dynarch.com/projects/calendar/\n" + "Distribuito sotto licenza GNU LGPL. Vedi http://gnu.org/licenses/lgpl.html per i dettagli." + "\n\n" + "Selezione data:\n" + "- Usa \xab, \xbb per selezionare l'anno\n" + "- Usa " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per i mesi\n" + "- Tieni premuto a lungo il mouse per accedere alle funzioni di selezione veloce."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Selezione orario:\n" + "- Clicca sul numero per incrementarlo\n" + "- o Shift+click per decrementarlo\n" + "- o click e sinistra o destra per variarlo."; Calendar._TT["PREV_YEAR"] = "Anno prec.(clicca a lungo per il menù)"; Calendar._TT["PREV_MONTH"] = "Mese prec. (clicca a lungo per il menù)"; Calendar._TT["GO_TODAY"] = "Oggi"; Calendar._TT["NEXT_MONTH"] = "Pross. mese (clicca a lungo per il menù)"; Calendar._TT["NEXT_YEAR"] = "Pross. anno (clicca a lungo per il menù)"; Calendar._TT["SEL_DATE"] = "Seleziona data"; Calendar._TT["DRAG_TO_MOVE"] = "Trascina per spostarlo"; Calendar._TT["PART_TODAY"] = " (oggi)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Mostra prima %s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Chiudi"; Calendar._TT["TODAY"] = "Oggi"; Calendar._TT["TIME_PART"] = "(Shift-)Click o trascina per cambiare il valore"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a:%b:%e"; Calendar._TT["WK"] = "set"; Calendar._TT["TIME"] = "Ora:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-uk-koi8_u.js0000644000175000017500000000563111174146376030440 0ustar zackzack// Calendar i18n // Language: uk (Ukrainian) // Encoding: koi8-u // Author: óhristoph Zwerschke // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("îÅĦÌÑ", "ðÏÎÅĦÌÏË", "÷¦×ÔÏÒÏË", "óÅÒÅÄÁ", "þÅÔ×ÅÒ", "ð'ÑÔÎÉÃÑ", "óÕÂÏÔÁ", "îÅĦÌÑ"); // short day names Calendar._SDN = new Array ("îÄ", "ðÎ", "÷Ô", "óÒ", "þÔ", "ðÔ", "óÂ", "îÄ"); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 1; // full month names Calendar._MN = new Array ("ó¦ÞÅÎØ", "ìÀÔÉÊ", "âÅÒÅÚÅÎØ", "ëצÔÅÎØ", "ôÒÁ×ÅÎØ", "þÅÒ×ÅÎØ", "ìÉÐÅÎØ", "óÅÒÐÅÎØ", "÷ÅÒÅÓÅÎØ", "öÏ×ÔÅÎØ", "ìÉÓÔÏÐÁÄ", "çÒÕÄÅÎØ"); // short month names Calendar._SMN = new Array ("ó¦Þ", "ìÀÔ", "âÅÒ", "ëצ", "ôÒÁ", "þÅÒ", "ìÉÐ", "óÅÒ", "÷ÅÒ", "öÏ×", "ìÉÓ", "çÒÕ"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "ðÒÏ ËÁÌÅÎÄÁÒ..."; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "÷ÉÂ¦Ò ÄÁÔÉ:\n" + "- ÷ÉÂÅÒ¦ÔØ Ò¦Ë ÚÁ ÄÏÐÏÍÏÇÏÀ ËÎÏÐÏË \xab ÔÁ \xbb.\n" + "- ÷ÉÂÅÒ¦ÔØ ͦÓÑÃØ ÚÁ ÄÏÐÏÍÏÇÏÀ ËÎÏÐÏË \u2039 ÔÁ \u203a.\n" + "- äÌÑ ÍÅÎÀ Û×ÉÄËÏÇÏ ×ÉÂÏÒÕ ÔÒÉÍÁÊÔÅ ËÎÏÐËÕ ÎÁÖÁÔÏÀ."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "÷ÉÂ¦Ò ÞÁÓÕ:\n" + "- ðÒÉ Ë̦ËÕ ÎÁ ÇÏÄÉÎÉ ÞÉ È×ÉÌÉÎÉ ×ÏÎÉ ÚÂ¦ÌØÛÕÀÔØÓÑ.\n" + "- ðÒÉ Ë̦ËÕ Ú ÎÁÖÁÔÏÀ ËÌÁצÛÏÀ Shift ×ÏÎÉ ÚÍÅÎÛÕÀÔØÓÑ.\n" + "- ñËÝÏ ÎÁÖÁÔÉ ÍÉÛËÕ ¦ ×ÏÒÕÈÁÔÉ ÎÅÀ ×ÐÒÁ×Ï ÞÉ ×̦×Ï, ×ÏÎÉ ÂÕÄÕÔØ ÚͦÎÀ×ÁÔÉÓÑ ÓËÏÒ¦ÛÅ."; Calendar._TT["PREV_YEAR"] = "îÁ Ò¦Ë ÎÁÚÁÄ (ÔÒÉÍÁÔÉ ÎÁÖÁÔÏÀ ÎÁ ÍÅÎÀ)"; Calendar._TT["PREV_MONTH"] = "îÁ ͦÓÑÃØ ÎÁÚÁÄ (ÔÒÉÍÁÔÉ ÎÁÖÁÔÏÀ ÎÁ ÍÅÎÀ)"; Calendar._TT["GO_TODAY"] = "óØÏÇÏÄΦ"; Calendar._TT["NEXT_MONTH"] = "îÁ ͦÓÑÃØ ×ÐÅÒÅÄ (ÔÒÉÍÁÔÉ ÎÁÖÁÔÏÀ ÎÁ ÍÅÎÀ)"; Calendar._TT["NEXT_YEAR"] = "îÁ Ò¦Ë ×ÐÅÒÅÄ (ÔÒÉÍÁÔÉ ÎÁÖÁÔÏÀ ÎÁ ÍÅÎÀ)"; Calendar._TT["SEL_DATE"] = "÷ÉÂ¦Ò ÄÁÔÉ"; Calendar._TT["DRAG_TO_MOVE"] = "ðÅÒÅÎ¦Ó ÍÉÛËÏÀ"; Calendar._TT["PART_TODAY"] = " (ÓØÏÇÏÄΦ)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "ðÅÒÛÉÊ ÄÅÎØ ÔÉÖÎÑ ÂÕÄÅ %s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "úÁËÒÉÔÉ"; Calendar._TT["TODAY"] = "óØÏÇÏÄΦ"; Calendar._TT["TIME_PART"] = "(Shift-)ËÌ¦Ë ÞÉ ÎÁÖÁÔÉ ¦ ×ÏÒÕÈÁÔÉ"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; Calendar._TT["WK"] = "ÔÉÖ"; Calendar._TT["TIME"] = "þÁÓ:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-bg-cp1251.js0000644000175000017500000000537111174146375030126 0ustar zackzack// Calendar i18n // Language: bg (Bulgarian) // Encoding: cp1251 // Author: Valentin Sheiretsky, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Íåäåëÿ", "Ïîíåäåëíèê", "Âòîðíèê", "Ñðÿäà", "×åòâúðòúê", "Ïåòúê", "Ñúáîòà", "Íåäåëÿ"); // short day names Calendar._SDN = new Array ("Íåä", "Ïîí", "Âòî", "Ñðÿ", "×åò", "Ïåò", "Ñúá", "Íåä"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("ßíóàðè", "Ôåâðóàðè", "Ìàðò", "Àïðèë", "Ìàé", "Þíè", "Þëè", "Àâãóñò", "Ñåïòåìâðè", "Îêòîìâðè", "Íîåìâðè", "Äåêåìâðè"); // short month names Calendar._SMN = new Array ("ßíó", "Ôåâ", "Ìàð", "Àïð", "Ìàé", "Þíè", "Þëè", "Àâã", "Ñåï", "Îêò", "Íîå", "Äåê"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Èíôîðìàöèÿ çà êàëåíäàðà"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Date selection:\n" + "- Use the \xab, \xbb buttons to select year\n" + "- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + "- Hold mouse button on any of the above buttons for faster selection."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Time selection:\n" + "- Click on any of the time parts to increase it\n" + "- or Shift-click to decrease it\n" + "- or click and drag for faster selection."; Calendar._TT["PREV_YEAR"] = "Ïðåäíà ãîäèíà (çàäðúæòå çà ìåíþ)"; Calendar._TT["PREV_MONTH"] = "Ïðåäåí ìåñåö (çàäðúæòå çà ìåíþ)"; Calendar._TT["GO_TODAY"] = "Èçáåðåòå äíåñ"; Calendar._TT["NEXT_MONTH"] = "Ñëåäâàù ìåñåö (çàäðúæòå çà ìåíþ)"; Calendar._TT["NEXT_YEAR"] = "Ñëåäâàùà ãîäèíà (çàäðúæòå çà ìåíþ)"; Calendar._TT["SEL_DATE"] = "Èçáåðåòå äàòà"; Calendar._TT["DRAG_TO_MOVE"] = "Ïðåìåñòâàíå"; Calendar._TT["PART_TODAY"] = " (äíåñ)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "%s êàòî ïúðâè äåí"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Çàòâîðåòå"; Calendar._TT["TODAY"] = "Äíåñ"; Calendar._TT["TIME_PART"] = "(Shift-)Click èëè drag çà äà ïðîìåíèòå ñòîéíîñòòà"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%A - %e %B %Y"; Calendar._TT["WK"] = "Ñåäì"; Calendar._TT["TIME"] = "×àñ:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-ru.js0000644000175000017500000000717211174146376027255 0ustar zackzack// Calendar i18n // Language: ru (Russian) // Encoding: utf-8 // Author: Sly Golovanov, http://golovanov.net, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("воÑкреÑенье", "понедельник", "вторник", "Ñреда", "четверг", "пÑтница", "Ñуббота", "воÑкреÑенье"); // short day names Calendar._SDN = new Array ("вÑк", "пон", "втр", "Ñрд", "чет", "пÑÑ‚", "Ñуб", "вÑк"); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 1; // full month names Calendar._MN = new Array ("Ñнварь", "февраль", "март", "апрель", "май", "июнь", "июль", "авгуÑÑ‚", "ÑентÑбрь", "октÑбрь", "ноÑбрь", "декабрь"); // short month names Calendar._SMN = new Array ("Ñнв", "фев", "мар", "апр", "май", "июн", "июл", "авг", "Ñен", "окт", "ноÑ", "дек"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "О календаре..."; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Как выбрать дату:\n" + "- При помощи кнопок ‹, › можно выбрать год.\n" + "- При помощи кнопок «, » можно выбрать меÑÑц.\n" + "- Подержите Ñти кнопки нажатыми, чтобы поÑвилоÑÑŒ меню быÑтрого выбора."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Как выбрать времÑ:\n" + "- При клике на чаÑах или минутах они увеличиваютÑÑ.\n" + "- При клике Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¾Ð¹ клавишей Shift они уменьшаютÑÑ.\n" + "- ЕÑли нажать и двигать мышкой влево/вправо, они будут менÑтьÑÑ Ð±Ñ‹Ñтрее."; Calendar._TT["PREV_YEAR"] = "Ðа год назад (удерживать Ð´Ð»Ñ Ð¼ÐµÐ½ÑŽ)"; Calendar._TT["PREV_MONTH"] = "Ðа меÑÑц назад (удерживать Ð´Ð»Ñ Ð¼ÐµÐ½ÑŽ)"; Calendar._TT["GO_TODAY"] = "СегоднÑ"; Calendar._TT["NEXT_MONTH"] = "Ðа меÑÑц вперед (удерживать Ð´Ð»Ñ Ð¼ÐµÐ½ÑŽ)"; Calendar._TT["NEXT_YEAR"] = "Ðа год вперед (удерживать Ð´Ð»Ñ Ð¼ÐµÐ½ÑŽ)"; Calendar._TT["SEL_DATE"] = "Выберите дату"; Calendar._TT["DRAG_TO_MOVE"] = "ПеретаÑкивайте мышкой"; Calendar._TT["PART_TODAY"] = " (ÑегоднÑ)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Первый день недели будет %s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Закрыть"; Calendar._TT["TODAY"] = "СегоднÑ"; Calendar._TT["TIME_PART"] = "(Shift-)клик или нажать и двигать"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; Calendar._TT["WK"] = "нед"; Calendar._TT["TIME"] = "ВремÑ:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-ro.js0000644000175000017500000000430011174146376027235 0ustar zackzack// Calendar i18n // Language: ro (Romanian) // Encoding: utf-8 // Author: Mihai Bazon, // Distributed under the same terms as the calendar itself. Calendar._DN = new Array ("Duminică", "Luni", "MarÅ£i", "Miercuri", "Joi", "Vineri", "Sâmbătă", "Duminică"); Calendar._SDN_len = 2; Calendar._FD = 0; Calendar._MN = new Array ("Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Despre calendar"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "Pentru ultima versiune vizitaÅ£i: http://www.dynarch.com/projects/calendar/\n" + "Distribuit sub GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "SelecÅ£ia datei:\n" + "- FolosiÅ£i butoanele \xab, \xbb pentru a selecta anul\n" + "- FolosiÅ£i butoanele " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pentru a selecta luna\n" + "- TineÅ£i butonul mouse-ului apăsat pentru selecÅ£ie mai rapidă."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "SelecÅ£ia orei:\n" + "- Click pe ora sau minut pentru a mări valoarea cu 1\n" + "- Sau Shift-Click pentru a micÅŸora valoarea cu 1\n" + "- Sau Click ÅŸi drag pentru a selecta mai repede."; Calendar._TT["PREV_YEAR"] = "Anul precedent (lung pt menu)"; Calendar._TT["PREV_MONTH"] = "Luna precedentă (lung pt menu)"; Calendar._TT["GO_TODAY"] = "Data de azi"; Calendar._TT["NEXT_MONTH"] = "Luna următoare (lung pt menu)"; Calendar._TT["NEXT_YEAR"] = "Anul următor (lung pt menu)"; Calendar._TT["SEL_DATE"] = "Selectează data"; Calendar._TT["DRAG_TO_MOVE"] = "Trage pentru a miÅŸca"; Calendar._TT["PART_TODAY"] = " (astăzi)"; Calendar._TT["DAY_FIRST"] = "AfiÅŸează %s prima zi"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "ÃŽnchide"; Calendar._TT["TODAY"] = "Astăzi"; Calendar._TT["TIME_PART"] = "(Shift-)Click sau drag pentru a selecta"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%A, %d %B"; Calendar._TT["WK"] = "spt"; Calendar._TT["TIME"] = "Ora:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-ja.js0000644000175000017500000000533711174146376027222 0ustar zackzack// Calendar i18n // Language: ja (Japanese) // Encoding: utf-8 // Distributed under the same terms as the calendar itself. Calendar._DN = new Array ("日曜", "月曜", "ç«æ›œ", "水曜", "木曜", "金曜", "土曜", "日曜"); Calendar._SDN = new Array ("æ—¥", "月", "ç«", "æ°´", "木", "金", "土", "æ—¥"); Calendar._FD = 0; Calendar._MN = new Array ("1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"); Calendar._SMN = new Array ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "カレンダーã«ã¤ã„ã¦"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "日付ã®é¸ã³æ–¹:\n" + "- å¹´ã‚’é¸ã¶ã«ã¯ \xab, \xbb ã®ãƒœã‚¿ãƒ³ã‚’使ã„ã¾ã™ã€‚\n" + "- 月をé¸ã¶ã«ã¯ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ã®ãƒœã‚¿ãƒ³ã‚’使ã„ã¾ã™ã€‚\n" + "- マウスã®ãƒœã‚¿ãƒ³ã‚’押ã—ã¤ã¥ã‘ã‚‹ã¨ã•ã‚‰ã«æ—©ãé¸æŠžã§ãã¾ã™ã€‚"; Calendar._TT["ABOUT_TIME"] = "\n\n" + "時間ã®é¸ã³æ–¹:\n" + "- 時間をクリックã™ã‚‹ã¨å¢—ã‚„ã›ã¾ã™ã€‚\n" + "- シフト + ã‚¯ãƒªãƒƒã‚¯ã§æ¸›ã‚‰ã›ã¾ã™ã€‚\n" + "- ドラッグã™ã‚‹ã¨ã•ã‚‰ã«æ—©ãé¸æŠžã§ãã¾ã™ã€‚"; Calendar._TT["PREV_YEAR"] = "å‰ã®å¹´(ホールドã§ãƒ¡ãƒ‹ãƒ¥ãƒ¼)"; Calendar._TT["PREV_MONTH"] = "å‰ã®æœˆ(ホールドã§ãƒ¡ãƒ‹ãƒ¥ãƒ¼)"; Calendar._TT["GO_TODAY"] = "本日ã¸"; Calendar._TT["NEXT_MONTH"] = "æ¬¡ã®æœˆ(ホールドã§ãƒ¡ãƒ‹ãƒ¥ãƒ¼)"; Calendar._TT["NEXT_YEAR"] = "次ã®å¹´(ホールドã§ãƒ¡ãƒ‹ãƒ¥ãƒ¼)"; Calendar._TT["SEL_DATE"] = "æ—¥ä»˜ã‚’é¸æŠžã—ã¾ã™"; Calendar._TT["DRAG_TO_MOVE"] = "ドラッグã§ç§»å‹•"; Calendar._TT["PART_TODAY"] = " (本日)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "%s ã‚’å§‹ã‚ã«è¡¨ç¤ºã™ã‚‹"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "é–‰ã˜ã‚‹"; Calendar._TT["TODAY"] = "æœ¬æ—¥ã‚’é¸æŠž"; Calendar._TT["TIME_PART"] = "クリックåˆã¯ãƒ‰ãƒ©ãƒƒã‚°ã§å¢—ãˆã¾ã™ã€‚シフトキーを使ã†ã¨æ¸›ã‚‰ã›ã¾ã™ã€‚"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; Calendar._TT["TT_DATE_FORMAT"] = "%m月 %dæ—¥ (%a)"; Calendar._TT["WK"] = "週"; Calendar._TT["TIME"] = "時間:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-lv-cp1252.js0000644000175000017500000000546511174146376030165 0ustar zackzack// Calendar i18n // Language: lv (Latvian) // Encoding: cp1252 // Author: Juris Valdovskis, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Svçtdiena", "Pirmdiena", "Otrdiena", "Treðdiena", "Ceturdiena", "Piektdiena", "Sestdiena", "Svçtdiena"); // short day names Calendar._SDN = new Array ("Sv", "Pr", "Ot", "Tr", "Ce", "Pk", "Se", "Sv"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Janvâris", "Februâris", "Marts", "Aprîlis", "Maijs", "Jûnijs", "Jûlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"); // short month names Calendar._SMN = new Array ("Jan", "Feb", "Mar", "Apr", "Mai", "Jûn", "Jûl", "Aug", "Sep", "Okt", "Nov", "Dec"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Par kalendâru"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Datuma izvçle:\n" + "- Izmanto \xab, \xbb pogas, lai izvçlçtos gadu\n" + "- Izmanto " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "pogas, lai izvçlçtos mçnesi\n" + "- Turi nospiestu peles pogu uz jebkuru no augstâk minçtajâm pogâm, lai paâtrinâtu izvçli."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Laika izvçle:\n" + "- Uzklikðíini uz jebkuru no laika daïâm, lai palielinâtu to\n" + "- vai Shift-klikðíis, lai samazinâtu to\n" + "- vai noklikðíini un velc uz attiecîgo virzienu lai mainîtu âtrâk."; Calendar._TT["PREV_YEAR"] = "Iepr. gads (turi izvçlnei)"; Calendar._TT["PREV_MONTH"] = "Iepr. mçnesis (turi izvçlnei)"; Calendar._TT["GO_TODAY"] = "Ðodien"; Calendar._TT["NEXT_MONTH"] = "Nâkoðais mçnesis (turi izvçlnei)"; Calendar._TT["NEXT_YEAR"] = "Nâkoðais gads (turi izvçlnei)"; Calendar._TT["SEL_DATE"] = "Izvçlies datumu"; Calendar._TT["DRAG_TO_MOVE"] = "Velc, lai pârvietotu"; Calendar._TT["PART_TODAY"] = " (ðodien)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Attçlot %s kâ pirmo"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "1,7"; Calendar._TT["CLOSE"] = "Aizvçrt"; Calendar._TT["TODAY"] = "Ðodien"; Calendar._TT["TIME_PART"] = "(Shift-)Klikðíis vai pârvieto, lai mainîtu"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; Calendar._TT["WK"] = "wk"; Calendar._TT["TIME"] = "Laiks:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-pl.js0000644000175000017500000000516011174146376027235 0ustar zackzack// Calendar i18n // Language: pl (Polish) // Encoding: utf-8 // Author: Dariusz Pietrzak, , Janusz Piwowarski, // Distributed under the same terms as the calendar itself. Calendar._DN = new Array ("Niedziela", "PoniedziaÅ‚ek", "Wtorek", "Åšroda", "Czwartek", "PiÄ…tek", "Sobota", "Niedziela"); Calendar._SDN = new Array ("Nie", "Pn", "Wt", "Åšr", "Cz", "Pt", "So", "Nie"); Calendar._FD = 1; Calendar._MN = new Array ("StyczeÅ„", "Luty", "Marzec", "KwiecieÅ„", "Maj", "Czerwiec", "Lipiec", "SierpieÅ„", "WrzesieÅ„", "Październik", "Listopad", "GrudzieÅ„"); Calendar._SMN = new Array ("Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "O kalendarzu"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "Aby pobrać najnowszÄ… wersjÄ™, odwiedź: http://www.dynarch.com/projects/calendar/\n" + "DostÄ™pny na licencji GNU LGPL. Zobacz szczegóły na http://gnu.org/licenses/lgpl.html." + "\n\n" + "Wybór daty:\n" + "- Użyj przycisków \xab, \xbb by wybrać rok\n" + "- Użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " by wybrać miesiÄ…c\n" + "- Przytrzymaj klawisz myszy nad jednym z powyższych przycisków dla szybszego wyboru."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Wybór czasu:\n" + "- Kliknij na jednym z pól czasu by zwiÄ™kszyć jego wartość\n" + "- lub kliknij trzymajÄ…c Shift by zmiejszyć jego wartość\n" + "- lub kliknij i przeciÄ…gnij dla szybszego wyboru."; Calendar._TT["PREV_YEAR"] = "Poprzedni rok (przytrzymaj dla menu)"; Calendar._TT["PREV_MONTH"] = "Poprzedni miesiÄ…c (przytrzymaj dla menu)"; Calendar._TT["GO_TODAY"] = "Idź do dzisiaj"; Calendar._TT["NEXT_MONTH"] = "NastÄ™pny miesiÄ…c (przytrzymaj dla menu)"; Calendar._TT["NEXT_YEAR"] = "NastÄ™pny rok (przytrzymaj dla menu)"; Calendar._TT["SEL_DATE"] = "Wybierz datÄ™"; Calendar._TT["DRAG_TO_MOVE"] = "PrzeciÄ…gnij by przesunąć"; Calendar._TT["PART_TODAY"] = " (dzisiaj)"; Calendar._TT["MON_FIRST"] = "WyÅ›wietl poniedziaÅ‚ek jako pierwszy"; Calendar._TT["SUN_FIRST"] = "WyÅ›wietl niedzielÄ™ jako pierwszÄ…"; Calendar._TT["CLOSE"] = "Zamknij"; Calendar._TT["TODAY"] = "Dzisiaj"; Calendar._TT["TIME_PART"] = "(Shift-)Kliknij lub przeciÄ…gnij by zmienić wartość"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%e %B, %A"; Calendar._TT["WK"] = "ty"; Calendar._TT["DAY_FIRST"] = "Pokazuj %s najpierw"; Calendar._TT["WEEKEND"] = "0,6"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-sk.js0000644000175000017500000000476611174146376027252 0ustar zackzack// Calendar i18n // Language: sk (Slovak) // Encoding: utf-8 // Author: Peter Valach // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Nedeľa", "Pondelok", "Utorok", "Streda", "Å tvrtok", "Piatok", "Sobota", "Nedeľa"); // short day names Calendar._SDN = new Array ("Ned", "Pon", "Uto", "Str", "Å tv", "Pia", "Sob", "Ned"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"); // short month names Calendar._SMN = new Array ("Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "O kalendári"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + "Poslednú verziu nájdete na: http://www.dynarch.com/projects/calendar/\n" + "Distribuované pod GNU LGPL. ViÄ http://gnu.org/licenses/lgpl.html pre detaily." + "\n\n" + "Výber dátumu:\n" + "- Použite tlaÄidlá \xab, \xbb pre výber roku\n" + "- Použite tlaÄidlá " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pre výber mesiaca\n" + "- Ak ktorékoľvek z týchto tlaÄidiel podržíte dlhÅ¡ie, zobrazí sa rýchly výber."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Výber Äasu:\n" + "- Kliknutie na niektorú položku Äasu ju zvýši\n" + "- Shift-klik ju zníži\n" + "- Ak podržíte tlaÄítko stlaÄené, posúvaním meníte hodnotu."; Calendar._TT["PREV_YEAR"] = "PredoÅ¡lý rok (podržte pre menu)"; Calendar._TT["PREV_MONTH"] = "PredoÅ¡lý mesiac (podržte pre menu)"; Calendar._TT["GO_TODAY"] = "PrejsÅ¥ na dneÅ¡ok"; Calendar._TT["NEXT_MONTH"] = "Nasl. mesiac (podržte pre menu)"; Calendar._TT["NEXT_YEAR"] = "Nasl. rok (podržte pre menu)"; Calendar._TT["SEL_DATE"] = "Zvoľte dátum"; Calendar._TT["DRAG_TO_MOVE"] = "Podržaním tlaÄítka zmeníte polohu"; Calendar._TT["PART_TODAY"] = " (dnes)"; Calendar._TT["DAY_FIRST"] = "ZobraziÅ¥ %s ako prvý"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "ZavrieÅ¥"; Calendar._TT["TODAY"] = "Dnes"; Calendar._TT["TIME_PART"] = "(Shift-)klik/Å¥ahanie zmení hodnotu"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "$d. %m. %Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b"; Calendar._TT["WK"] = "týž"; Calendar._TT["TIME"] = "ÄŒas:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-he.js0000644000175000017500000000616311174146375027221 0ustar zackzack// Calendar i18n // Language: he (Hebrew) // Encoding: utf-8 // Author: Idan Sofer, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("ר×שון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ר×שון"); // short day names Calendar._SDN = new Array ("×", "ב", "×’", "ד", "×”", "ו", "ש", "×"); // First day of the week. "6" means display Saturday first. Calendar._FD = 6; // full month names Calendar._MN = new Array ("ינו×ר", "פברו×ר", "מרץ", "×פריל", "מ××™", "יוני", "יולי", "×וגוסט", "ספטמבר", "×וקטובר", "נובמבר", "דצמבר"); // short month names Calendar._SMN = new Array ("×™× ×", "פבר", "מרץ", "×פר", "מ××™", "יונ", "יול", "×וג", "ספט", "×וק", "נוב", "דצמ"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "×ודות השנתון"; Calendar._TT["ABOUT"] = "בחרן ת×ריך/שעה DHTML\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "×”×’×™×¨×¡× ×”×חרונה זמינה ב: http://www.dynarch.com/projects/calendar/\n" + "מופץ תחת זיכיון ×” GNU LGPL. עיין ב http://gnu.org/licenses/lgpl.html ×œ×¤×¨×˜×™× × ×•×¡×¤×™×." + "\n\n" + "בחירת ת×ריך:\n" + "- השתמש ×‘×›×¤×ª×•×¨×™× \xab, \xbb לבחירת שנה\n" + "- השתמש ×‘×›×¤×ª×•×¨×™× " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " לבחירת חודש\n" + "- ×”×—×–×§ העכבר לחוץ מעל ×”×›×¤×ª×•×¨×™× ×”×ž×•×–×›×¨×™× ×œ×¢×™×œ לבחירה מהירה יותר."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "בחירת זמן:\n" + "- לחץ על כל ×חד מחלקי הזמן כדי להוסיף\n" + "- ×ו shift בשילוב ×¢× ×œ×—×™×¦×” כדי להחסיר\n" + "- ×ו לחץ וגרור לפעולה מהירה יותר."; Calendar._TT["PREV_YEAR"] = "שנה קודמת - ×”×—×–×§ לקבלת תפריט"; Calendar._TT["PREV_MONTH"] = "חודש ×§×•×“× - ×”×—×–×§ לקבלת תפריט"; Calendar._TT["GO_TODAY"] = "עבור להיו×"; Calendar._TT["NEXT_MONTH"] = "חודש ×”×‘× - ×”×—×–×§ לתפריט"; Calendar._TT["NEXT_YEAR"] = "שנה הב××” - ×”×—×–×§ לתפריט"; Calendar._TT["SEL_DATE"] = "בחר ת×ריך"; Calendar._TT["DRAG_TO_MOVE"] = "גרור להזזה"; Calendar._TT["PART_TODAY"] = " )היו×("; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "הצג %s קוד×"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "6"; Calendar._TT["CLOSE"] = "סגור"; Calendar._TT["TODAY"] = "היו×"; Calendar._TT["TIME_PART"] = "(שיפט-)לחץ וגרור כדי לשנות ערך"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "wk"; Calendar._TT["TIME"] = "שעה::"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-tr-cp1254.js0000644000175000017500000000256611174146376030172 0ustar zackzack// Calendar i18n // Language: tr (Turkish) // Encoding: cp1254 // Author: Nuri Akman // Distributed under the same terms as the calendar itself. Calendar._DN = new Array ("Pazar", "Pazartesi", "Salý", "Çarþamba", "Perþembe", "Cuma", "Cumartesi", "Pazar"); // First day of the week. "6" means display Saturday first. Calendar._FD = 6; Calendar._MN = new Array ("Ocak", "Þubat", "Mart", "Nisan", "Mayýs", "Haziran", "Temmuz", "Aðustos", "Eylül", "Ekim", "Kasým", "Aralýk"); // tooltips Calendar._TT = {}; Calendar._TT["TOGGLE"] = "Haftanýn ilk gününü kaydýr"; Calendar._TT["PREV_YEAR"] = "Önceki Yýl (Menü için basýlý tutunuz)"; Calendar._TT["PREV_MONTH"] = "Önceki Ay (Menü için basýlý tutunuz)"; Calendar._TT["GO_TODAY"] = "Bugün'e git"; Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Menü için basýlý tutunuz)"; Calendar._TT["NEXT_YEAR"] = "Sonraki Yýl (Menü için basýlý tutunuz)"; Calendar._TT["SEL_DATE"] = "Tarih seçiniz"; Calendar._TT["DRAG_TO_MOVE"] = "Taþýmak için sürükleyiniz"; Calendar._TT["PART_TODAY"] = " (bugün)"; Calendar._TT["DAY_FIRST"] = "Takvim %s gününden baþlasýn"; Calendar._TT["WEEKEND"] = "5"; Calendar._TT["CLOSE"] = "Kapat"; Calendar._TT["TODAY"] = "Bugün"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD"; Calendar._TT["WK"] = "Hafta"; Calendar._TT["TIME"] = "Saat:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-zh.js0000644000175000017500000000541411174146376027245 0ustar zackzack// Calendar i18n // Language: zh (Chinese) // Encoding: any // Author: muziq, , nEO // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"); // short day names Calendar._SDN = new Array ("æ—¥", "一", "二", "三", "å››", "五", "å…­", "æ—¥"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "乿œˆ", "åæœˆ", "å一月", "å二月"); // short month names Calendar._SMN = new Array ("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "乿œˆ", "åæœˆ", "å一月", "å二月"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "帮助"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "选择日期:\n" + "- 点击 \xab, \xbb 按钮选择年份\n" + "- 点击 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 按钮选择月份\n" + "- 长按以上按钮å¯ä»Žèœå•中快速选择年份或月份"; Calendar._TT["ABOUT_TIME"] = "\n\n" + "选择时间:\n" + "- ç‚¹å‡»å°æ—¶æˆ–分钟å¯ä½¿æ”¹æ•°å€¼åР䏀\n" + "- 按ä½Shifté”®ç‚¹å‡»å°æ—¶æˆ–分钟å¯ä½¿æ”¹æ•°å€¼å‡ä¸€\n" + "- 点击拖动鼠标å¯è¿›è¡Œå¿«é€Ÿé€‰æ‹©"; Calendar._TT["PREV_YEAR"] = "上一年 (按ä½å‡ºèœå•)"; Calendar._TT["PREV_MONTH"] = "上一月 (按ä½å‡ºèœå•)"; Calendar._TT["GO_TODAY"] = "转到今日"; Calendar._TT["NEXT_MONTH"] = "下一月 (按ä½å‡ºèœå•)"; Calendar._TT["NEXT_YEAR"] = "下一年 (按ä½å‡ºèœå•)"; Calendar._TT["SEL_DATE"] = "选择日期"; Calendar._TT["DRAG_TO_MOVE"] = "拖动"; Calendar._TT["PART_TODAY"] = " (今日)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "最左边显示%s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "关闭"; Calendar._TT["TODAY"] = "今日"; Calendar._TT["TIME_PART"] = "(Shift-)点击鼠标或拖动改å˜å€¼"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%A, %b %eæ—¥"; Calendar._TT["WK"] = "周"; Calendar._TT["TIME"] = "æ—¶é—´:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-sl.js0000644000175000017500000000474511174146376027250 0ustar zackzack// Calendar i18n // Language: sl (Slovenian) // Encoding: any // Author: David Milost // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Nedelja", "Ponedeljek", "Torek", "Sreda", "\u010cetrtek", "Petek", "Sobota", "Nedelja"); // short day names Calendar._SDN = new Array ("Ned", "Pon", "Tor", "Sre", "\u010cet", "Pet", "Sob", "Ned"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // short month names Calendar._SMN = new Array ("Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"); // full month names Calendar._MN = new Array ("Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"); // tooltips // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "O koledarju"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "Za zadnjo verzijo pojdine na naslov: http://www.dynarch.com/projects/calendar/\n" + "Distribuirano pod GNU LGPL. Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." + "\n\n" + "Izbor datuma:\n" + "- Uporabite \xab, \xbb gumbe za izbor leta\n" + "- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" + "- Zadr\u017eite klik na kateremkoli od zgornjih gumbov za hiter izbor."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Izbor \u0107asa:\n" + "- Kliknite na katerikoli del \u0107asa za pove\u0107. le-tega\n" + "- ali Shift-click za zmanj. le-tega\n" + "- ali kliknite in povlecite za hiter izbor."; Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)"; Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)"; Calendar._TT["GO_TODAY"] = "Pojdi na teko\u0107i dan"; Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)"; Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)"; Calendar._TT["SEL_DATE"] = "Izberite datum"; Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije"; Calendar._TT["PART_TODAY"] = " (danes)"; Calendar._TT["DAY_FIRST"] = "Prika\u017ei %s kot prvi dan"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Zapri"; Calendar._TT["TODAY"] = "Danes"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "Ted"; Calendar._TT["TIME"] = "\u0106as:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-el.js0000644000175000017500000000634611174146375027230 0ustar zackzack// Calendar i18n // Language: el (Greek) // Encoding: utf-8 // Author: Mihai Bazon, // Distributed under the same terms as the calendar itself. Calendar._DN = new Array ("ΚυÏιακή", "ΔευτέÏα", "ΤÏίτη", "ΤετάÏτη", "Πέμπτη", "ΠαÏασκευή", "Σάββατο", "ΚυÏιακή"); Calendar._SDN = new Array ("Κυ", "Δε", "TÏ", "Τε", "Πε", "Πα", "Σα", "Κυ"); Calendar._FD = 0; Calendar._MN = new Array ("ΙανουάÏιος", "ΦεβÏουάÏιος", "ΜάÏτιος", "ΑπÏίλιος", "Μάϊος", "ΙοÏνιος", "ΙοÏλιος", "ΑÏγουστος", "ΣεπτέμβÏιος", "ΟκτώβÏιος", "ÎοέμβÏιος", "ΔεκέμβÏιος"); Calendar._SMN = new Array ("Ιαν", "Φεβ", "ΜαÏ", "ΑπÏ", "Μαι", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Îοε", "Δεκ"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Για το ημεÏολόγιο"; Calendar._TT["ABOUT"] = "Επιλογέας ημεÏομηνίας/ÏŽÏας σε DHTML\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "Για τελευταία έκδοση: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Επιλογή ημεÏομηνίας:\n" + "- ΧÏησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" + "- ΧÏησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" + "- ΚÏατήστε κουμπί Ï€Î¿Î½Ï„Î¹ÎºÎ¿Ï Ï€Î±Ï„Î·Î¼Î­Î½Î¿ στα παÏαπάνω κουμπιά για πιο γÏήγοÏη επιλογή."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Επιλογή ÏŽÏας:\n" + "- Κάντε κλικ σε ένα από τα μέÏη της ÏŽÏας για αÏξηση\n" + "- ή Shift-κλικ για μείωση\n" + "- ή κλικ και μετακίνηση για πιο γÏήγοÏη επιλογή."; Calendar._TT["TOGGLE"] = "ΜπάÏα Ï€Ïώτης ημέÏας της εβδομάδας"; Calendar._TT["PREV_YEAR"] = "ΠÏοηγ. έτος (κÏατήστε για το μενοÏ)"; Calendar._TT["PREV_MONTH"] = "ΠÏοηγ. μήνας (κÏατήστε για το μενοÏ)"; Calendar._TT["GO_TODAY"] = "ΣήμεÏα"; Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κÏατήστε για το μενοÏ)"; Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κÏατήστε για το μενοÏ)"; Calendar._TT["SEL_DATE"] = "Επιλέξτε ημεÏομηνία"; Calendar._TT["DRAG_TO_MOVE"] = "ΣÏÏτε για να μετακινήσετε"; Calendar._TT["PART_TODAY"] = " (σήμεÏα)"; Calendar._TT["DAY_FIRST"] = "Εμφάνιση %s Ï€Ïώτα"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Κλείσιμο"; Calendar._TT["TODAY"] = "ΣήμεÏα"; Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; Calendar._TT["TT_DATE_FORMAT"] = "D, d M"; Calendar._TT["WK"] = "εβδ"; Calendar._TT["TIME"] = "ÎÏα:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-zh_cn.js0000644000175000017500000000542611174146376027730 0ustar zackzack// Calendar i18n // Language: zh-cn (Chinese, China) // Encoding: any // Author: muziq, , nEO // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"); // short day names Calendar._SDN = new Array ("æ—¥", "一", "二", "三", "å››", "五", "å…­", "æ—¥"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "乿œˆ", "åæœˆ", "å一月", "å二月"); // short month names Calendar._SMN = new Array ("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "乿œˆ", "åæœˆ", "å一月", "å二月"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "帮助"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "选择日期:\n" + "- 点击 \xab, \xbb 按钮选择年份\n" + "- 点击 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 按钮选择月份\n" + "- 长按以上按钮å¯ä»Žèœå•中快速选择年份或月份"; Calendar._TT["ABOUT_TIME"] = "\n\n" + "选择时间:\n" + "- ç‚¹å‡»å°æ—¶æˆ–分钟å¯ä½¿æ”¹æ•°å€¼åР䏀\n" + "- 按ä½Shifté”®ç‚¹å‡»å°æ—¶æˆ–分钟å¯ä½¿æ”¹æ•°å€¼å‡ä¸€\n" + "- 点击拖动鼠标å¯è¿›è¡Œå¿«é€Ÿé€‰æ‹©"; Calendar._TT["PREV_YEAR"] = "上一年 (按ä½å‡ºèœå•)"; Calendar._TT["PREV_MONTH"] = "上一月 (按ä½å‡ºèœå•)"; Calendar._TT["GO_TODAY"] = "转到今日"; Calendar._TT["NEXT_MONTH"] = "下一月 (按ä½å‡ºèœå•)"; Calendar._TT["NEXT_YEAR"] = "下一年 (按ä½å‡ºèœå•)"; Calendar._TT["SEL_DATE"] = "选择日期"; Calendar._TT["DRAG_TO_MOVE"] = "拖动"; Calendar._TT["PART_TODAY"] = " (今日)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "最左边显示%s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "关闭"; Calendar._TT["TODAY"] = "今日"; Calendar._TT["TIME_PART"] = "(Shift-)点击鼠标或拖动改å˜å€¼"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%A, %b %eæ—¥"; Calendar._TT["WK"] = "周"; Calendar._TT["TIME"] = "æ—¶é—´:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-ko-euc_kr.js0000644000175000017500000000501211174146376030475 0ustar zackzack// Calendar i18n // Language: ko (Korean) // Encoding: euc_kr // Author: Yourim Yi // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("ÀÏ¿äÀÏ", "¿ù¿äÀÏ", "È­¿äÀÏ", "¼ö¿äÀÏ", "¸ñ¿äÀÏ", "±Ý¿äÀÏ", "Åä¿äÀÏ", "ÀÏ¿äÀÏ"); // short day names Calendar._SDN = new Array ("ÀÏ", "¿ù", "È­", "¼ö", "¸ñ", "±Ý", "Åä", "ÀÏ"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("1¿ù", "2¿ù", "3¿ù", "4¿ù", "5¿ù", "6¿ù", "7¿ù", "8¿ù", "9¿ù", "10¿ù", "11¿ù", "12¿ù"); // short month names Calendar._SMN = new Array ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "calendar ¿¡ ´ëÇØ¼­"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "\n"+ "ÃֽйöÀüÀ» ¹ÞÀ¸½Ã·Á¸é http://www.dynarch.com/projects/calendar/ ¿¡ ¹æ¹®Çϼ¼¿ä\n" + "\n"+ "GNU LGPL ¶óÀ̼¾½º·Î ¹èÆ÷µË´Ï´Ù. \n"+ "¶óÀ̼¾½º¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ³»¿ëÀº http://gnu.org/licenses/lgpl.html À» ÀÐÀ¸¼¼¿ä." + "\n\n" + "³¯Â¥ ¼±ÅÃ:\n" + "- ¿¬µµ¸¦ ¼±ÅÃÇÏ·Á¸é \xab, \xbb ¹öưÀ» »ç¿ëÇÕ´Ï´Ù\n" + "- ´ÞÀ» ¼±ÅÃÇÏ·Á¸é " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ¹öưÀ» ´©¸£¼¼¿ä\n" + "- °è¼Ó ´©¸£°í ÀÖÀ¸¸é À§ °ªµéÀ» ºü¸£°Ô ¼±ÅÃÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "½Ã°£ ¼±ÅÃ:\n" + "- ¸¶¿ì½º·Î ´©¸£¸é ½Ã°£ÀÌ Áõ°¡ÇÕ´Ï´Ù\n" + "- Shift Ű¿Í ÇÔ²² ´©¸£¸é °¨¼ÒÇÕ´Ï´Ù\n" + "- ´©¸¥ »óÅ¿¡¼­ ¸¶¿ì½º¸¦ ¿òÁ÷À̸é Á» ´õ ºü¸£°Ô °ªÀÌ º¯ÇÕ´Ï´Ù.\n"; Calendar._TT["PREV_YEAR"] = "Áö³­ ÇØ (±æ°Ô ´©¸£¸é ¸ñ·Ï)"; Calendar._TT["PREV_MONTH"] = "Áö³­ ´Þ (±æ°Ô ´©¸£¸é ¸ñ·Ï)"; Calendar._TT["GO_TODAY"] = "¿À´Ã ³¯Â¥·Î"; Calendar._TT["NEXT_MONTH"] = "´ÙÀ½ ´Þ (±æ°Ô ´©¸£¸é ¸ñ·Ï)"; Calendar._TT["NEXT_YEAR"] = "´ÙÀ½ ÇØ (±æ°Ô ´©¸£¸é ¸ñ·Ï)"; Calendar._TT["SEL_DATE"] = "³¯Â¥¸¦ ¼±ÅÃÇϼ¼¿ä"; Calendar._TT["DRAG_TO_MOVE"] = "¸¶¿ì½º µå·¡±×·Î À̵¿ Çϼ¼¿ä"; Calendar._TT["PART_TODAY"] = " (¿À´Ã)"; Calendar._TT["DAY_FIRST"] = "ÇÑ ÁÖÀÇ ½ÃÀÛ ¿äÀÏ·Î"; Calendar._TT["MON_FIRST"] = "¿ù¿äÀÏÀ» ÇÑ ÁÖÀÇ ½ÃÀÛ ¿äÀÏ·Î"; Calendar._TT["SUN_FIRST"] = "ÀÏ¿äÀÏÀ» ÇÑ ÁÖÀÇ ½ÃÀÛ ¿äÀÏ·Î"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "´Ý±â"; Calendar._TT["TODAY"] = "¿À´Ã"; Calendar._TT["TIME_PART"] = "(Shift-)Ŭ¸¯ ¶Ç´Â µå·¡±× Çϼ¼¿ä"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]"; Calendar._TT["WK"] = "ÁÖ"; Calendar._TT["TIME"] = "½Ã°£"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-fr.js0000644000175000017500000000564211174146375027235 0ustar zackzack// Calendar i18n // Language: fr (French) // Encoding: utf-8 // Author: David Duret, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"); // short day names Calendar._SDN = new Array ("Dim", "Lun", "Mar", "Mar", "Jeu", "Ven", "Sam", "Dim"); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 1; // full month names Calendar._MN = new Array ("Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"); // short month names Calendar._SMN = new Array ("Jan", "Fev", "Mar", "Avr", "Mai", "Juin", "Juil", "Aout", "Sep", "Oct", "Nov", "Dec"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "A propos du calendrier"; Calendar._TT["ABOUT"] = "DHTML Date/Heure Selecteur\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "Pour la derniere version visitez : http://www.dynarch.com/projects/calendar/\n" + "Distribué par GNU LGPL. Voir http://gnu.org/licenses/lgpl.html pour les details." + "\n\n" + "Selection de la date :\n" + "- Utiliser les bouttons \xab, \xbb pour selectionner l\'annee\n" + "- Utiliser les bouttons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pour selectionner les mois\n" + "- Garder la souris sur n'importe quels boutons pour une selection plus rapide"; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Selection de l\'heure :\n" + "- Cliquer sur heures ou minutes pour incrementer\n" + "- ou Maj-clic pour decrementer\n" + "- ou clic et glisser-deplacer pour une selection plus rapide"; Calendar._TT["PREV_YEAR"] = "Année préc. (maintenir pour menu)"; Calendar._TT["PREV_MONTH"] = "Mois préc. (maintenir pour menu)"; Calendar._TT["GO_TODAY"] = "Atteindre la date du jour"; Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)"; Calendar._TT["NEXT_YEAR"] = "Année suiv. (maintenir pour menu)"; Calendar._TT["SEL_DATE"] = "Sélectionner une date"; Calendar._TT["DRAG_TO_MOVE"] = "Déplacer"; Calendar._TT["PART_TODAY"] = " (Aujourd'hui)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Afficher %s en premier"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Fermer"; Calendar._TT["TODAY"] = "Aujourd'hui"; Calendar._TT["TIME_PART"] = "(Maj-)Clic ou glisser pour modifier la valeur"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "Sem."; Calendar._TT["TIME"] = "Heure :"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-sv.js0000644000175000017500000000521611174146376027254 0ustar zackzack// Calendar i18n // Language: sv (Swedish) // Encoding: utf-8 // Author: Leonard NorrgÃ¥rd // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("söndag", "mÃ¥ndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag", "söndag"); // short month names Calendar._SDN_len = 2; // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 1; // full month names Calendar._MN = new Array ("januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"); // short day names Calendar._SMN_len = 3; // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Om kalendern"; Calendar._TT["ABOUT"] = "DHTML Datum/tid-väljare\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "För senaste version gÃ¥ till: http://www.dynarch.com/projects/calendar/\n" + "Distribueras under GNU LGPL. Se http://gnu.org/licenses/lgpl.html för detaljer." + "\n\n" + "Val av datum:\n" + "- Använd knapparna \xab, \xbb för att välja Ã¥r\n" + "- Använd knapparna " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " för att välja mÃ¥nad\n" + "- HÃ¥ll musknappen nedtryckt pÃ¥ nÃ¥gon av ovanstÃ¥ende knappar för snabbare val."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Val av tid:\n" + "- Klicka pÃ¥ en del av tiden för att öka den delen\n" + "- eller skift-klicka för att minska den\n" + "- eller klicka och drag för snabbare val."; Calendar._TT["PREV_YEAR"] = "FöregÃ¥ende Ã¥r (hÃ¥ll för menu)"; Calendar._TT["PREV_MONTH"] = "FöregÃ¥ende mÃ¥nad (hÃ¥ll för menu)"; Calendar._TT["GO_TODAY"] = "GÃ¥ till dagens datum"; Calendar._TT["NEXT_MONTH"] = "Följande mÃ¥nad (hÃ¥ll för menu)"; Calendar._TT["NEXT_YEAR"] = "Följande Ã¥r (hÃ¥ll för menu)"; Calendar._TT["SEL_DATE"] = "Välj datum"; Calendar._TT["DRAG_TO_MOVE"] = "Drag för att flytta"; Calendar._TT["PART_TODAY"] = " (idag)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Visa %s först"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Stäng"; Calendar._TT["TODAY"] = "Idag"; Calendar._TT["TIME_PART"] = "(Skift-)klicka eller drag för att ändra tid"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%A %d %b %Y"; Calendar._TT["WK"] = "vecka"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-uk-cp1251.js0000644000175000017500000000561111174146376030153 0ustar zackzack// Calendar i18n // Language: uk (Ukrainian) // Encoding: ñp1251 // Author: Ñhristoph Zwerschke // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Íåä³ëÿ", "Ïîíåä³ëîê", "³âòîðîê", "Ñåðåäà", "×åòâåð", "Ï'ÿòíèöÿ", "Ñóáîòà", "Íåä³ëÿ"); // short day names Calendar._SDN = new Array ("Íä", "Ïí", "Âò", "Ñð", "×ò", "Ïò", "Ñá", "Íä"); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 1; // full month names Calendar._MN = new Array ("ѳ÷åíü", "Ëþòèé", "Áåðåçåíü", "Êâ³òåíü", "Òðàâåíü", "×åðâåíü", "Ëèïåíü", "Ñåðïåíü", "Âåðåñåíü", "Æîâòåíü", "Ëèñòîïàä", "Ãðóäåíü"); // short month names Calendar._SMN = new Array ("ѳ÷", "Ëþò", "Áåð", "Êâ³", "Òðà", "×åð", "Ëèï", "Ñåð", "Âåð", "Æîâ", "Ëèñ", "Ãðó"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Ïðî êàëåíäàð..."; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Âèá³ð äàòè:\n" + "- Âèáåð³òü ð³ê çà äîïîìîãîþ êíîïîê ‹ òà ›.\n" + "- Âèáåð³òü ì³ñÿöü çà äîïîìîãîþ êíîïîê « òà ».\n" + "- Äëÿ ìåíþ øâèäêîãî âèáîðó òðèìàéòå êíîïêó íàæàòîþ."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Âèá³ð ÷àñó:\n" + "- Ïðè êë³êó íà ãîäèíè ÷è õâèëèíè âîíè çá³ëüøóþòüñÿ.\n" + "- Ïðè êë³êó ç íàæàòîþ êëàâ³øîþ Shift âîíè çìåíøóþòüñÿ.\n" + "- ßêùî íàæàòè ìèøêó ³ âîðóõàòè íåþ âïðàâî ÷è âë³âî, âîíè áóäóòü çì³íþâàòèñÿ ñêîð³øå."; Calendar._TT["PREV_YEAR"] = "Íà ð³ê íàçàä (òðèìàòè íàæàòîþ íà ìåíþ)"; Calendar._TT["PREV_MONTH"] = "Íà ì³ñÿöü íàçàä (òðèìàòè íàæàòîþ íà ìåíþ)"; Calendar._TT["GO_TODAY"] = "Ñüîãîäí³"; Calendar._TT["NEXT_MONTH"] = "Íà ì³ñÿöü âïåðåä (òðèìàòè íàæàòîþ íà ìåíþ)"; Calendar._TT["NEXT_YEAR"] = "Íà ð³ê âïåðåä (òðèìàòè íàæàòîþ íà ìåíþ)"; Calendar._TT["SEL_DATE"] = "Âèá³ð äàòè"; Calendar._TT["DRAG_TO_MOVE"] = "Ïåðåí³ñ ìèøêîþ"; Calendar._TT["PART_TODAY"] = " (ñüîãîäí³)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Ïåðøèé äåíü òèæíÿ áóäå %s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Çàêðèòè"; Calendar._TT["TODAY"] = "Ñüîãîäí³"; Calendar._TT["TIME_PART"] = "(Shift-)êë³ê ÷è íàæàòè ³ âîðóõàòè"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; Calendar._TT["WK"] = "òèæ"; Calendar._TT["TIME"] = "×àñ:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-ru-cp1251.js0000644000175000017500000000565311174146376030170 0ustar zackzack// Calendar i18n // Language: ru (Russian) // Encoding: cp1251 // Author: Sly Golovanov, http://golovanov.net, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("âîñêðåñåíüå", "ïîíåäåëüíèê", "âòîðíèê", "ñðåäà", "÷åòâåðã", "ïÿòíèöà", "ñóááîòà", "âîñêðåñåíüå"); // short day names Calendar._SDN = new Array ("âñê", "ïîí", "âòð", "ñðä", "÷åò", "ïÿò", "ñóá", "âñê"); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 1; // full month names Calendar._MN = new Array ("ÿíâàðü", "ôåâðàëü", "ìàðò", "àïðåëü", "ìàé", "èþíü", "èþëü", "àâãóñò", "ñåíòÿáðü", "îêòÿáðü", "íîÿáðü", "äåêàáðü"); // short month names Calendar._SMN = new Array ("ÿíâ", "ôåâ", "ìàð", "àïð", "ìàé", "èþí", "èþë", "àâã", "ñåí", "îêò", "íîÿ", "äåê"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Î êàëåíäàðå..."; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Êàê âûáðàòü äàòó:\n" + "- Ïðè ïîìîùè êíîïîê ‹, › ìîæíî âûáðàòü ãîä.\n" + "- Ïðè ïîìîùè êíîïîê «, » ìîæíî âûáðàòü ìåñÿö.\n" + "- Ïîäåðæèòå ýòè êíîïêè íàæàòûìè, ÷òîáû ïîÿâèëîñü ìåíþ áûñòðîãî âûáîðà."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Êàê âûáðàòü âðåìÿ:\n" + "- Ïðè êëèêå íà ÷àñàõ èëè ìèíóòàõ îíè óâåëè÷èâàþòñÿ.\n" + "- Ïðè êëèêå ñ íàæàòîé êëàâèøåé Shift îíè óìåíüøàþòñÿ.\n" + "- Åñëè íàæàòü è äâèãàòü ìûøêîé âëåâî/âïðàâî, îíè áóäóò ìåíÿòüñÿ áûñòðåå."; Calendar._TT["PREV_YEAR"] = "Íà ãîä íàçàä (óäåðæèâàòü äëÿ ìåíþ)"; Calendar._TT["PREV_MONTH"] = "Íà ìåñÿö íàçàä (óäåðæèâàòü äëÿ ìåíþ)"; Calendar._TT["GO_TODAY"] = "Ñåãîäíÿ"; Calendar._TT["NEXT_MONTH"] = "Íà ìåñÿö âïåðåä (óäåðæèâàòü äëÿ ìåíþ)"; Calendar._TT["NEXT_YEAR"] = "Íà ãîä âïåðåä (óäåðæèâàòü äëÿ ìåíþ)"; Calendar._TT["SEL_DATE"] = "Âûáåðèòå äàòó"; Calendar._TT["DRAG_TO_MOVE"] = "Ïåðåòàñêèâàéòå ìûøêîé"; Calendar._TT["PART_TODAY"] = " (ñåãîäíÿ)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Ïåðâûé äåíü íåäåëè áóäåò %s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Çàêðûòü"; Calendar._TT["TODAY"] = "Ñåãîäíÿ"; Calendar._TT["TIME_PART"] = "(Shift-)êëèê èëè íàæàòü è äâèãàòü"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; Calendar._TT["WK"] = "íåä"; Calendar._TT["TIME"] = "Âðåìÿ:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-no.js0000644000175000017500000000463111174146376027240 0ustar zackzack// Calendar i18n // Language: no (Norwegian) // Encoding: utf-8 // Author: Daniel Holmen, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"); // short day names Calendar._SDN = new Array ("Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"); // short month names Calendar._SMN = new Array ("Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Om kalenderen"; Calendar._TT["ABOUT"] = "DHTML Dato-/Tidsvelger\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For nyeste versjon, gÃ¥ til: http://www.dynarch.com/projects/calendar/\n" + "Distribuert under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detaljer." + "\n\n" + "Datovalg:\n" + "- Bruk knappene \xab og \xbb for Ã¥ velge Ã¥r\n" + "- Bruk knappene " + String.fromCharCode(0x2039) + " og " + String.fromCharCode(0x203a) + " for Ã¥ velge mÃ¥ned\n" + "- Hold inne musknappen eller knappene over for raskere valg."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Tidsvalg:\n" + "- Klikk pÃ¥ en av tidsdelene for Ã¥ øke den\n" + "- eller Shift-klikk for Ã¥ senke verdien\n" + "- eller klikk-og-dra for raskere valg.."; Calendar._TT["PREV_YEAR"] = "Forrige. Ã¥r (hold for meny)"; Calendar._TT["PREV_MONTH"] = "Forrige. mÃ¥ned (hold for meny)"; Calendar._TT["GO_TODAY"] = "GÃ¥ til idag"; Calendar._TT["NEXT_MONTH"] = "Neste mÃ¥ned (hold for meny)"; Calendar._TT["NEXT_YEAR"] = "Neste Ã¥r (hold for meny)"; Calendar._TT["SEL_DATE"] = "Velg dato"; Calendar._TT["DRAG_TO_MOVE"] = "Dra for Ã¥ flytte"; Calendar._TT["PART_TODAY"] = " (idag)"; Calendar._TT["DAY_FIRST"] = "Vis %s først"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Lukk"; Calendar._TT["TODAY"] = "Idag"; Calendar._TT["TIME_PART"] = "(Shift-)Klikk eller dra for Ã¥ endre verdi"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "uke"; Calendar._TT["TIME"] = "Tid:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-zh_tw-big5.js0000644000175000017500000000500411174146376030576 0ustar zackzack// Calendar i18n // Language: zh-tw (Chinese, Taiwan) // Encoding: big5 // Author: Gary Fu, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("¬P´Á¤é", "¬P´Á¤@", "¬P´Á¤G", "¬P´Á¤T", "¬P´Á¥|", "¬P´Á¤­", "¬P´Á¤»", "¬P´Á¤é"); // short day names Calendar._SDN = new Array ("¤é", "¤@", "¤G", "¤T", "¥|", "¤­", "¤»", "¤é"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("¤@¤ë", "¤G¤ë", "¤T¤ë", "¥|¤ë", "¤­¤ë", "¤»¤ë", "¤C¤ë", "¤K¤ë", "¤E¤ë", "¤Q¤ë", "¤Q¤@¤ë", "¤Q¤G¤ë"); // short month names Calendar._SMN = new Array ("¤@¤ë", "¤G¤ë", "¤T¤ë", "¥|¤ë", "¤­¤ë", "¤»¤ë", "¤C¤ë", "¤K¤ë", "¤E¤ë", "¤Q¤ë", "¤Q¤@¤ë", "¤Q¤G¤ë"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Ãö©ó"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "¤é´Á¿ï¾Ü¤èªk:\n" + "- ¨Ï¥Î \xab, \xbb «ö¶s¥i¿ï¾Ü¦~¥÷\n" + "- ¨Ï¥Î " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " «ö¶s¥i¿ï¾Ü¤ë¥÷\n" + "- «ö¦í¤W­±ªº«ö¶s¥i¥H¥[§Ö¿ï¨ú"; Calendar._TT["ABOUT_TIME"] = "\n\n" + "®É¶¡¿ï¾Ü¤èªk:\n" + "- ÂIÀ»¥ô¦óªº®É¶¡³¡¥÷¥i¼W¥[¨ä­È\n" + "- ¦P®É«öShiftÁä¦AÂIÀ»¥i´î¤Ö¨ä­È\n" + "- ÂIÀ»¨Ã©ì¦²¥i¥[§Ö§ïÅܪº­È"; Calendar._TT["PREV_YEAR"] = "¤W¤@¦~ («ö¦í¿ï³æ)"; Calendar._TT["PREV_MONTH"] = "¤U¤@¦~ («ö¦í¿ï³æ)"; Calendar._TT["GO_TODAY"] = "¨ì¤µ¤é"; Calendar._TT["NEXT_MONTH"] = "¤W¤@¤ë («ö¦í¿ï³æ)"; Calendar._TT["NEXT_YEAR"] = "¤U¤@¤ë («ö¦í¿ï³æ)"; Calendar._TT["SEL_DATE"] = "¿ï¾Ü¤é´Á"; Calendar._TT["DRAG_TO_MOVE"] = "©ì¦²"; Calendar._TT["PART_TODAY"] = " (¤µ¤é)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "±N %s Åã¥Ü¦b«e"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Ãö³¬"; Calendar._TT["TODAY"] = "¤µ¤é"; Calendar._TT["TIME_PART"] = "ÂIÀ»or©ì¦²¥i§ïÅܮɶ¡(¦P®É«öShift¬°´î)"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "¶g"; Calendar._TT["TIME"] = "®É¶¡:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-uk.js0000644000175000017500000000711411174146376027242 0ustar zackzack// Calendar i18n // Language: uk (Ukrainian) // Encoding: utf-8 // Author: Сhristoph Zwerschke // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("ÐеділÑ", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ÑтницÑ", "Субота", "ÐеділÑ"); // short day names Calendar._SDN = new Array ("Ðд", "Пн", "Ð’Ñ‚", "Ср", "Чт", "Пт", "Сб", "Ðд"); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 1; // full month names Calendar._MN = new Array ("Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "ВереÑень", "Жовтень", "ЛиÑтопад", "Грудень"); // short month names Calendar._SMN = new Array ("Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "ЛиÑ", "Гру"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Про календар..."; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Вибір дати:\n" + "- Виберіть рік за допомогою кнопок ‹ та ›.\n" + "- Виберіть міÑÑць за допомогою кнопок « та ».\n" + "- Ð”Ð»Ñ Ð¼ÐµÐ½ÑŽ швидкого вибору тримайте кнопку нажатою."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Вибір чаÑу:\n" + "- При кліку на години чи хвилини вони збільшуютьÑÑ.\n" + "- При кліку з нажатою клавішою Shift вони зменшуютьÑÑ.\n" + "- Якщо нажати мишку Ñ– ворухати нею вправо чи вліво, вони будуть змінюватиÑÑ Ñкоріше."; Calendar._TT["PREV_YEAR"] = "Ðа рік назад (тримати нажатою на меню)"; Calendar._TT["PREV_MONTH"] = "Ðа міÑÑць назад (тримати нажатою на меню)"; Calendar._TT["GO_TODAY"] = "Сьогодні"; Calendar._TT["NEXT_MONTH"] = "Ðа міÑÑць вперед (тримати нажатою на меню)"; Calendar._TT["NEXT_YEAR"] = "Ðа рік вперед (тримати нажатою на меню)"; Calendar._TT["SEL_DATE"] = "Вибір дати"; Calendar._TT["DRAG_TO_MOVE"] = "ÐŸÐµÑ€ÐµÐ½Ñ–Ñ Ð¼Ð¸ÑˆÐºÐ¾ÑŽ"; Calendar._TT["PART_TODAY"] = " (Ñьогодні)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Перший день Ñ‚Ð¸Ð¶Ð½Ñ Ð±ÑƒÐ´Ðµ %s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Закрити"; Calendar._TT["TODAY"] = "Сьогодні"; Calendar._TT["TIME_PART"] = "(Shift-)клік чи нажати Ñ– ворухати"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; Calendar._TT["WK"] = "тиж"; Calendar._TT["TIME"] = "ЧаÑ:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-hu-cp1252.js0000644000175000017500000000545111174146375030152 0ustar zackzack// Calendar i18n // Language: hu (Hungarian) // Encoding: cp1252 // Author: Karaszi Istvan, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Vasárnap", "Hétfõ", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat", "Vasárnap"); // short day names Calendar._SDN = new Array ("v", "h", "k", "sze", "cs", "p", "szo", "v"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"); // short month names Calendar._SMN = new Array ("jan", "feb", "már", "ápr", "máj", "jún", "júl", "aug", "sze", "okt", "nov", "dec"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "A kalendáriumról"; Calendar._TT["ABOUT"] = "DHTML dátum/idõ kiválasztó\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "a legfrissebb verzió megtalálható: http://www.dynarch.com/projects/calendar/\n" + "GNU LGPL alatt terjesztve. Lásd a http://gnu.org/licenses/lgpl.html oldalt a részletekhez." + "\n\n" + "Dátum választás:\n" + "- használja a \xab, \xbb gombokat az év kiválasztásához\n" + "- használja a " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gombokat a hónap kiválasztásához\n" + "- tartsa lenyomva az egérgombot a gyors választáshoz."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Idõ választás:\n" + "- kattintva növelheti az idõt\n" + "- shift-tel kattintva csökkentheti\n" + "- lenyomva tartva és húzva gyorsabban kiválaszthatja."; Calendar._TT["PREV_YEAR"] = "Elõzõ év (tartsa nyomva a menühöz)"; Calendar._TT["PREV_MONTH"] = "Elõzõ hónap (tartsa nyomva a menühöz)"; Calendar._TT["GO_TODAY"] = "Mai napra ugrás"; Calendar._TT["NEXT_MONTH"] = "Köv. hónap (tartsa nyomva a menühöz)"; Calendar._TT["NEXT_YEAR"] = "Köv. év (tartsa nyomva a menühöz)"; Calendar._TT["SEL_DATE"] = "Válasszon dátumot"; Calendar._TT["DRAG_TO_MOVE"] = "Húzza a mozgatáshoz"; Calendar._TT["PART_TODAY"] = " (ma)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "%s legyen a hét elsõ napja"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Bezár"; Calendar._TT["TODAY"] = "Ma"; Calendar._TT["TIME_PART"] = "(Shift-)Klikk vagy húzás az érték változtatásához"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%b %e, %a"; Calendar._TT["WK"] = "hét"; Calendar._TT["TIME"] = "idõ:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-ko.js0000644000175000017500000000551411174146376027236 0ustar zackzack// Calendar i18n // Language: ko (Korean) // Encoding: utf-8 // Author: Yourim Yi // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("ì¼ìš”ì¼", "월요ì¼", "화요ì¼", "수요ì¼", "목요ì¼", "금요ì¼", "토요ì¼", "ì¼ìš”ì¼"); // short day names Calendar._SDN = new Array ("ì¼", "ì›”", "í™”", "수", "목", "금", "토", "ì¼"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("1ì›”", "2ì›”", "3ì›”", "4ì›”", "5ì›”", "6ì›”", "7ì›”", "8ì›”", "9ì›”", "10ì›”", "11ì›”", "12ì›”"); // short month names Calendar._SMN = new Array ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "calendar ì— ëŒ€í•´ì„œ"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "\n"+ "최신 ë²„ì „ì„ ë°›ìœ¼ì‹œë ¤ë©´ http://www.dynarch.com/projects/calendar/ ì— ë°©ë¬¸í•˜ì„¸ìš”\n" + "\n"+ "GNU LGPL ë¼ì´ì„¼ìŠ¤ë¡œ ë°°í¬ë©ë‹ˆë‹¤. \n"+ "ë¼ì´ì„¼ìŠ¤ì— ëŒ€í•œ ìžì„¸í•œ ë‚´ìš©ì€ http://gnu.org/licenses/lgpl.html ì„ ì½ìœ¼ì„¸ìš”." + "\n\n" + "ë‚ ì§œ ì„ íƒ:\n" + "- ì—°ë„를 ì„ íƒí•˜ë ¤ë©´ \xab, \xbb ë²„íŠ¼ì„ ì‚¬ìš©í•©ë‹ˆë‹¤\n" + "- ë‹¬ì„ ì„ íƒí•˜ë ¤ë©´ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ë²„íŠ¼ì„ ëˆ„ë¥´ì„¸ìš”\n" + "- ê³„ì† ëˆ„ë¥´ê³  있으면 위 ê°’ë“¤ì„ ë¹ ë¥´ê²Œ ì„ íƒí•˜ì‹¤ 수 있습니다."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "시간 ì„ íƒ:\n" + "- 마우스로 누르면 ì‹œê°„ì´ ì¦ê°€í•©ë‹ˆë‹¤\n" + "- Shift 키와 함께 누르면 ê°ì†Œí•©ë‹ˆë‹¤\n" + "- 누른 ìƒíƒœì—서 마우스를 움ì§ì´ë©´ 좀 ë” ë¹ ë¥´ê²Œ ê°’ì´ ë³€í•©ë‹ˆë‹¤.\n"; Calendar._TT["PREV_YEAR"] = "지난 í•´ (길게 누르면 목ë¡)"; Calendar._TT["PREV_MONTH"] = "지난 달 (길게 누르면 목ë¡)"; Calendar._TT["GO_TODAY"] = "오늘 날짜로"; Calendar._TT["NEXT_MONTH"] = "ë‹¤ìŒ ë‹¬ (길게 누르면 목ë¡)"; Calendar._TT["NEXT_YEAR"] = "ë‹¤ìŒ í•´ (길게 누르면 목ë¡)"; Calendar._TT["SEL_DATE"] = "날짜를 ì„ íƒí•˜ì„¸ìš”"; Calendar._TT["DRAG_TO_MOVE"] = "마우스 드래그로 ì´ë™ 하세요"; Calendar._TT["PART_TODAY"] = " (오늘)"; Calendar._TT["DAY_FIRST"] = "한 ì£¼ì˜ ì‹œìž‘ ìš”ì¼ë¡œ"; Calendar._TT["MON_FIRST"] = "월요ì¼ì„ 한 ì£¼ì˜ ì‹œìž‘ ìš”ì¼ë¡œ"; Calendar._TT["SUN_FIRST"] = "ì¼ìš”ì¼ì„ 한 ì£¼ì˜ ì‹œìž‘ ìš”ì¼ë¡œ"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "닫기"; Calendar._TT["TODAY"] = "오늘"; Calendar._TT["TIME_PART"] = "(Shift-)í´ë¦­ ë˜ëŠ” 드래그 하세요"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]"; Calendar._TT["WK"] = "주"; Calendar._TT["TIME"] = "시간:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-fi.js0000644000175000017500000000543711174146375027226 0ustar zackzack// Calendar i18n // Language: fi (Finnish, Suomi) // Encoding: utf-8 // Author: Jarno Käyhkö, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Sunnuntai", "Maanantai", "Tiistai", "Keskiviikko", "Torstai", "Perjantai", "Lauantai", "Sunnuntai"); // short day names Calendar._SDN = new Array ("Su", "Ma", "Ti", "Ke", "To", "Pe", "La", "Su"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"); // short month names Calendar._SMN = new Array ("Tam", "Hel", "Maa", "Huh", "Tou", "Kes", "Hei", "Elo", "Syy", "Lok", "Mar", "Jou"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Tietoja kalenterista"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "Uusin versio osoitteessa: http://www.dynarch.com/projects/calendar/\n" + "Julkaistu GNU LGPL lisenssin alaisuudessa. Lisätietoja osoitteessa http://gnu.org/licenses/lgpl.html" + "\n\n" + "Päivämäärä valinta:\n" + "- Käytä \xab, \xbb painikkeita valitaksesi vuosi\n" + "- Käytä " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " painikkeita valitaksesi kuukausi\n" + "- Pitämällä hiiren painiketta minkä tahansa yllä olevan painikkeen kohdalla, saat näkyviin valikon nopeampaan siirtymiseen."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Ajan valinta:\n" + "- Klikkaa kellonajan numeroita lisätäksesi aikaa\n" + "- tai pitämällä Shift-näppäintä pohjassa saat aikaa taaksepäin\n" + "- tai klikkaa ja pidä hiiren painike pohjassa sekä liikuta hiirtä muuttaaksesi aikaa nopeasti eteen- ja taaksepäin."; Calendar._TT["PREV_YEAR"] = "Edell. vuosi (paina hetki, näet valikon)"; Calendar._TT["PREV_MONTH"] = "Edell. kuukausi (paina hetki, näet valikon)"; Calendar._TT["GO_TODAY"] = "Siirry tähän päivään"; Calendar._TT["NEXT_MONTH"] = "Seur. kuukausi (paina hetki, näet valikon)"; Calendar._TT["NEXT_YEAR"] = "Seur. vuosi (paina hetki, näet valikon)"; Calendar._TT["SEL_DATE"] = "Valitse päivämäärä"; Calendar._TT["DRAG_TO_MOVE"] = "Siirrä kalenterin paikkaa"; Calendar._TT["PART_TODAY"] = " (tänään)"; Calendar._TT["DAY_FIRST"] = "Näytä %s ensimmäisenä"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Sulje"; Calendar._TT["TODAY"] = "Tänään"; Calendar._TT["TIME_PART"] = "(Shift-) Klikkaa tai liikuta muuttaaksesi aikaa"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%d.%m.%Y"; Calendar._TT["WK"] = "Vko"; Calendar._TT["TIME"] = "Ajan:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-pt_br.js0000644000175000017500000000545711174146376027741 0ustar zackzack// Calendar i18n // Language: pt-br (Portuguese, Brazil) // Encoding: utf-8 // Author: Adalberto Machado , Jorge Godoy // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"); // short day names Calendar._SDN = new Array ("Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb", "Dom"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"); // short month names Calendar._SMN = new Array ("Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Sobre o calendário"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "Ultima versão visite: http://www.dynarch.com/projects/calendar/\n" + "Distribuído sobre GNU LGPL. Veja http://gnu.org/licenses/lgpl.html para detalhes." + "\n\n" + "Seleção de data:\n" + "- Use os botões \xab, \xbb para selecionar o ano\n" + "- Use os botões " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para selecionar o mes\n" + "- Segure o botão do mouse em qualquer um desses botões para seleção rápida."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Seleção de hora:\n" + "- Clique em qualquer parte da hora para incrementar\n" + "- ou Shift-click para decrementar\n" + "- ou clique e segure para seleção rápida."; Calendar._TT["PREV_YEAR"] = "Ano ant. (segure para menu)"; Calendar._TT["PREV_MONTH"] = "Mês ant. (segure para menu)"; Calendar._TT["GO_TODAY"] = "Hoje"; Calendar._TT["NEXT_MONTH"] = "Próx. mes (segure para menu)"; Calendar._TT["NEXT_YEAR"] = "Próx. ano (segure para menu)"; Calendar._TT["SEL_DATE"] = "Selecione a data"; Calendar._TT["DRAG_TO_MOVE"] = "Arraste para mover"; Calendar._TT["PART_TODAY"] = " (hoje)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Mostre %s primeiro"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Fechar"; Calendar._TT["TODAY"] = "Hoje"; Calendar._TT["TIME_PART"] = "(Shift-)Click ou arraste para mudar valor"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; Calendar._TT["WK"] = "sem."; Calendar._TT["TIME"] = "Hora:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-zh_tw.js0000644000175000017500000000535511174146376027763 0ustar zackzack// Calendar i18n // Language: zh-tw (Chinese, Taiwan) // Encoding: utf-8 // Author: Gary Fu, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"); // short day names Calendar._SDN = new Array ("æ—¥", "一", "二", "三", "å››", "五", "å…­", "æ—¥"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "乿œˆ", "åæœˆ", "å一月", "å二月"); // short month names Calendar._SMN = new Array ("一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "乿œˆ", "åæœˆ", "å一月", "å二月"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "關於"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "æ—¥æœŸé¸æ“‡æ–¹æ³•:\n" + "- 使用 \xab, \xbb 按鈕å¯é¸æ“‡å¹´ä»½\n" + "- 使用 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 按鈕å¯é¸æ“‡æœˆä»½\n" + "- 按ä½ä¸Šé¢çš„æŒ‰éˆ•å¯ä»¥åŠ å¿«é¸å–"; Calendar._TT["ABOUT_TIME"] = "\n\n" + "æ™‚é–“é¸æ“‡æ–¹æ³•:\n" + "- 點擊任何的時間部份å¯å¢žåР其值\n" + "- åŒæ™‚按Shiftéµå†é»žæ“Šå¯æ¸›å°‘其值\n" + "- 點擊並拖曳å¯åŠ å¿«æ”¹è®Šçš„å€¼"; Calendar._TT["PREV_YEAR"] = "上一年 (按ä½é¸å–®)"; Calendar._TT["PREV_MONTH"] = "上一月 (按ä½é¸å–®)"; Calendar._TT["GO_TODAY"] = "到今日"; Calendar._TT["NEXT_MONTH"] = "下一月 (按ä½é¸å–®)"; Calendar._TT["NEXT_YEAR"] = "下一年 (按ä½é¸å–®)"; Calendar._TT["SEL_DATE"] = "鏿“‡æ—¥æœŸ"; Calendar._TT["DRAG_TO_MOVE"] = "拖曳"; Calendar._TT["PART_TODAY"] = " (今日)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "å°‡ %s 顯示在å‰"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "關閉"; Calendar._TT["TODAY"] = "今日"; Calendar._TT["TIME_PART"] = "點擊oræ‹–æ›³å¯æ”¹è®Šæ™‚é–“(åŒæ™‚按Shift為減)"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "週"; Calendar._TT["TIME"] = "時間:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-en.js0000644000175000017500000000702011120001754027176 0ustar zackzack// ** I18N // Calendar EN language // Author: Mihai Bazon, // Encoding: any // Distributed under the same terms as the calendar itself. // For translators: please use UTF-8 if possible. We strongly believe that // Unicode is the answer to a real internationalized world. Also please // include your contact information in the header, as can be seen above. // full day names Calendar._DN = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"); // Please note that the following array of short day names (and the same goes // for short month names, _SMN) isn't absolutely necessary. We give it here // for exemplification on how one can customize the short day names, but if // they are simply the first N letters of the full name you can simply say: // // Calendar._SDN_len = N; // short day name length // Calendar._SMN_len = N; // short month name length // // If N = 3 then this is not needed either since we assume a value of 3 if not // present, to be compatible with translation files that were written before // this feature. // short day names Calendar._SDN = new Array ("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 0; // full month names Calendar._MN = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); // short month names Calendar._SMN = new Array ("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "About the calendar"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Date selection:\n" + "- Use the \xab, \xbb buttons to select year\n" + "- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + "- Hold mouse button on any of the above buttons for faster selection."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Time selection:\n" + "- Click on any of the time parts to increase it\n" + "- or Shift-click to decrease it\n" + "- or click and drag for faster selection."; Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)"; Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)"; Calendar._TT["GO_TODAY"] = "Go Today"; Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)"; Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)"; Calendar._TT["SEL_DATE"] = "Select date"; Calendar._TT["DRAG_TO_MOVE"] = "Drag to move"; Calendar._TT["PART_TODAY"] = " (today)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Display %s first"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Close"; Calendar._TT["TODAY"] = "Today"; Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "wk"; Calendar._TT["TIME"] = "Time:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-de_at.js0000644000175000017500000000614611174146375027702 0ustar zackzack// Calendar i18n // Language: de-at (German, Austria) // Encoding: any // Author: Jack (tR), // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"); // short day names Calendar._SDN = new Array ("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("J\xe4nner", "Februar", "M\xe4rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"); // short month names Calendar._SMN = new Array ("Jan", "Feb", "M\xe4r", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "\xDCber dieses Kalendermodul"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Datum ausw\xe4hlen:\n" + "- Benutzen Sie die Kn\xf6pfe \xab und \xbb, um das Jahr auszuw\xe4hlen.\n" + "- Benutzen Sie die Kn\xf6pfe \u2039 und \u203a, um den Monat auszuw\xe4hlen.\n" + "- Zur Schnellauswahl halten Sie die Maustaste \xfcber diesen Kn\xf6pfen gedr\xfcckt."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Zeit ausw\xe4hlen:\n" + "- Klicken Sie auf die Teile der Uhrzeit, um diese zu erh\xF6hen,\n" + "- oder klicken Sie mit festgehaltener Umschalttaste, um diese zu verringern,\n" + "- oder klicken und gedr\xfcckt halten zur Schnellauswahl."; Calendar._TT["TOGGLE"] = "Ersten Tag der Woche w\xe4hlen"; Calendar._TT["PREV_YEAR"] = "Voriges Jahr (Auswahl: l\xe4nger klicken)"; Calendar._TT["PREV_MONTH"] = "Voriger Monat (Auswahl: l\xe4nger klicken)"; Calendar._TT["GO_TODAY"] = "Heute ausw\xe4hlen"; Calendar._TT["NEXT_MONTH"] = "N\xe4chster Monat (Auswahl: l\xe4nger klicken)"; Calendar._TT["NEXT_YEAR"] = "N\xe4chstes Jahr (Auswahl: l\xe4nger klicken)"; Calendar._TT["SEL_DATE"] = "Datum ausw\xe4hlen"; Calendar._TT["DRAG_TO_MOVE"] = "Zum Bewegen gedr\xfcckt halten"; Calendar._TT["PART_TODAY"] = " (Heute)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Woche beginnt mit %s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Schlie\xdfen"; Calendar._TT["TODAY"] = "Heute"; Calendar._TT["TIME_PART"] = "(Umschalt-)Klick oder Festhalten und Ziehen, um den Wert zu \xe4ndern"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b"; Calendar._TT["WK"] = "KW"; Calendar._TT["TIME"] = "Uhrzeit:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-de.js0000644000175000017500000000575111174146375027217 0ustar zackzack// Calendar i18n // Language: de (German) // Encoding: any // Author: Jack (tR), // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"); // short day names Calendar._SDN = new Array ("So", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Januar", "Februar", "M\xe4rz", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"); // short month names Calendar._SMN = new Array ("Jan", "Feb", "M\xe4r", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "\xDCber dieses Kalendermodul"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Datum ausw\xe4hlen:\n" + "- Benutzen Sie die Kn\xf6pfe \xab und \xbb, um das Jahr auszuw\xe4hlen.\n" + "- Benutzen Sie die Kn\xf6pfe \u2039 und \u203a, um den Monat auszuw\xe4hlen.\n" + "- Zur Schnellauswahl halten Sie die Maustaste \xfcber diesen Kn\xf6pfen gedr\xfcckt."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Zeit ausw\xe4hlen:\n" + "- Klicken Sie auf die Teile der Uhrzeit, um diese zu erh\xF6hen,\n" + "- oder klicken Sie mit festgehaltener Umschalttaste, um diese zu verringern,\n" + "- oder klicken und gedr\xfcckt halten zur Schnellauswahl."; Calendar._TT["TOGGLE"] = "Ersten Tag der Woche w\xe4hlen"; Calendar._TT["PREV_YEAR"] = "Voriges Jahr (Auswahl: l\xe4nger klicken)"; Calendar._TT["PREV_MONTH"] = "Voriger Monat (Auswahl: l\xe4nger klicken)"; Calendar._TT["GO_TODAY"] = "Heute ausw\xe4hlen"; Calendar._TT["NEXT_MONTH"] = "N\xe4chster Monat (Auswahl: l\xe4nger klicken)"; Calendar._TT["NEXT_YEAR"] = "N\xe4chstes Jahr (Auswahl: l\xe4nger klicken)"; Calendar._TT["SEL_DATE"] = "Datum ausw\xe4hlen"; Calendar._TT["DRAG_TO_MOVE"] = "Zum Bewegen gedr\xfcckt halten"; Calendar._TT["PART_TODAY"] = " (Heute)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Woche beginnt mit %s"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Schlie\xdfen"; Calendar._TT["TODAY"] = "Heute"; Calendar._TT["TIME_PART"] = "(Umschalt-)Klick oder Festhalten und Ziehen, um den Wert zu \xe4ndern"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b"; Calendar._TT["WK"] = "KW"; Calendar._TT["TIME"] = "Uhrzeit:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-cs.js0000644000175000017500000000547511174146375027237 0ustar zackzack// Calendar i18n // Language: cs (Czech) // Encoding: utf-8 // Author: Lubos Jerabek , Jan Uhlir // Distributed under the same terms as the calendar itself. Calendar._DN = new Array('NedÄ›le','PondÄ›lí','Úterý','StÅ™eda','ÄŒtvrtek','Pátek','Sobota','NedÄ›le'); Calendar._SDN = new Array('Ne','Po','Út','St','ÄŒt','Pá','So','Ne'); Calendar._FD = 1; Calendar._MN = new Array('Leden','Únor','BÅ™ezen','Duben','KvÄ›ten','ÄŒerven','ÄŒervenec','Srpen','Září','Říjen','Listopad','Prosinec'); Calendar._SMN = new Array('Led','Úno','BÅ™e','Dub','KvÄ›','ÄŒrv','ÄŒvc','Srp','Zář','Říj','Lis','Pro'); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "O komponentÄ› kalendář"; Calendar._TT["TOGGLE"] = "ZmÄ›na prvního dne v týdnu"; Calendar._TT["PREV_YEAR"] = "PÅ™edchozí rok (pÅ™idrž pro menu)"; Calendar._TT["PREV_MONTH"] = "PÅ™edchozí mÄ›síc (pÅ™idrž pro menu)"; Calendar._TT["GO_TODAY"] = "DneÅ¡ní datum"; Calendar._TT["NEXT_MONTH"] = "Další mÄ›síc (pÅ™idrž pro menu)"; Calendar._TT["NEXT_YEAR"] = "Další rok (pÅ™idrž pro menu)"; Calendar._TT["SEL_DATE"] = "Vyber datum"; Calendar._TT["DRAG_TO_MOVE"] = "ChyÅ¥ a táhni, pro pÅ™esun"; Calendar._TT["PART_TODAY"] = " (dnes)"; Calendar._TT["MON_FIRST"] = "Ukaž jako první PondÄ›lí"; //Calendar._TT["SUN_FIRST"] = "Ukaž jako první NedÄ›li"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "VýbÄ›r datumu:\n" + "- Use the \xab, \xbb buttons to select year\n" + "- Použijte tlaÄítka " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " k výbÄ›ru mÄ›síce\n" + "- Podržte tlaÄítko myÅ¡i na jakémkoliv z tÄ›ch tlaÄítek pro rychlejší výbÄ›r."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "VýbÄ›r Äasu:\n" + "- KliknÄ›te na jakoukoliv z Äástí výbÄ›ru Äasu pro zvýšení.\n" + "- nebo Shift-click pro snížení\n" + "- nebo kliknÄ›te a táhnÄ›te pro rychlejší výbÄ›r."; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Zobraz %s první"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Zavřít"; Calendar._TT["TODAY"] = "Dnes"; Calendar._TT["TIME_PART"] = "(Shift-)Klikni nebo táhni pro zmÄ›nu hodnoty"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "wk"; Calendar._TT["TIME"] = "ÄŒas:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-sq.js0000644000175000017500000000440011174146376027241 0ustar zackzack// Calendar i18n // Language: sq (Albanian) // Encoding: Any // Author: Rigels Gordani, // Distributed under the same terms as the calendar itself. // ditet Calendar._DN = new Array ("E Diele", "E Hene", "E Marte", "E Merkure", "E Enjte", "E Premte", "E Shtune", "E Diele"); //ditet shkurt Calendar._SDN = new Array ("Die", "Hen", "Mar", "Mer", "Enj", "Pre", "Sht", "Die"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // muajt Calendar._MN = new Array ("Janar", "Shkurt", "Mars", "Prill", "Maj", "Qeshor", "Korrik", "Gusht", "Shtator", "Tetor", "Nentor", "Dhjetor"); // muajte shkurt Calendar._SMN = new Array ("Jan", "Shk", "Mar", "Pri", "Maj", "Qes", "Kor", "Gus", "Sht", "Tet", "Nen", "Dhj"); // ndihmesa Calendar._TT = {}; Calendar._TT["INFO"] = "Per kalendarin"; Calendar._TT["ABOUT"] = "Zgjedhes i ores/dates ne DHTML \n" + "\n\n" +"Zgjedhja e Dates:\n" + "- Perdor butonat \xab, \xbb per te zgjedhur vitin\n" + "- Perdor butonat" + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per te zgjedhur muajin\n" + "- Mbani shtypur butonin e mousit per nje zgjedje me te shpejte."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Zgjedhja e kohes:\n" + "- Kliko tek ndonje nga pjeset e ores per ta rritur ate\n" + "- ose kliko me Shift per ta zvogeluar ate\n" + "- ose cliko dhe terhiq per zgjedhje me te shpejte."; Calendar._TT["PREV_YEAR"] = "Viti i shkuar (prit per menune)"; Calendar._TT["PREV_MONTH"] = "Muaji i shkuar (prit per menune)"; Calendar._TT["GO_TODAY"] = "Sot"; Calendar._TT["NEXT_MONTH"] = "Muaji i ardhshem (prit per menune)"; Calendar._TT["NEXT_YEAR"] = "Viti i ardhshem (prit per menune)"; Calendar._TT["SEL_DATE"] = "Zgjidh daten"; Calendar._TT["DRAG_TO_MOVE"] = "Terhiqe per te levizur"; Calendar._TT["PART_TODAY"] = " (sot)"; // "%s" eshte dita e pare e javes // %s do te zevendesohet me emrin e dite Calendar._TT["DAY_FIRST"] = "Trego te %s te paren"; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Mbyll"; Calendar._TT["TODAY"] = "Sot"; Calendar._TT["TIME_PART"] = "Kliko me (Shift-)ose terhiqe per te ndryshuar vleren"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "Java"; Calendar._TT["TIME"] = "Koha:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-hr.js0000644000175000017500000000553511174146375027240 0ustar zackzack// Calendar i18n // Language: hr (Croatian) // Encoding: utf-8 // Author: Krunoslav Zubrinic , Dejan Rodiger // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "ÄŒetvrtak", "Petak", "Subota", "Nedjelja"); // short day names Calendar._SDN = new Array ("Ned", "Pon", "Uto", "Sri", "ÄŒet", "Pet", "Sub", "Ned"); // First day of the week. "0" means display Sunday first, "1" means display // Monday first, etc. Calendar._FD = 1; Calendar._MN = new Array ("SijeÄanj", "VeljaÄa", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"); Calendar._SMN = new Array ("Sij", "Vel", "Ožu", "Tra", "Svi", "Lip", "Srp", "Kol", "Ruj", "Lis", "Stu", "Pro"); // tooltips Calendar._TT = {}; Calendar._TT["TOGGLE"] = "Promjeni dan s kojim poÄinje tjedan"; Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)"; Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)"; Calendar._TT["GO_TODAY"] = "Idi na tekući dan"; Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)"; Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)"; Calendar._TT["SEL_DATE"] = "Izaberite datum"; Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije"; Calendar._TT["PART_TODAY"] = " (today)"; Calendar._TT["MON_FIRST"] = "Postavi ponedjeljak kao prvi dan"; Calendar._TT["SUN_FIRST"] = "Postavi nedjelju kao prvi dan"; Calendar._TT["CLOSE"] = "Zatvori"; Calendar._TT["TODAY"] = "Danas"; // Added by Dejan Rodiger Calendar._TT["INFO"] = "O kalendaru"; Calendar._TT["ABOUT"] = "DHTML Date/Time Izbornik\n" + "(c) dynarch.com 2002-2005 / Autor: Mihai Bazon\n" + // don't translate this this ;-) "Za zadnju verziju posjetite: http://www.dynarch.com/projects/calendar/\n" + "Distribuirano pod GNU LGPL. Vidite http://gnu.org/licenses/lgpl.html za detalje oko licence." + "\n\n" + "Odabir datuma:\n" + "- Koristite gumbe \xab, \xbb za odabir godine\n" + "- Koristite gumbe " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " za odabir mjeseca\n" + "- Kliknite miÅ¡em na bilo koju tpiku za brzi odabir."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Odabir vremena:\n" + "- Kliknite na bilo koji dio vremena da bi ga poveÄali\n" + "- ili Shift-klik da bi ga smanjili\n" + "- ili kliknite i povucite za brži odabir."; Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["TIME"] = "Vrijeme:"; Calendar._TT["DAY_FIRST"] = "Postavi %s kao prvi dan"; Calendar._TT["TIME_PART"] = "(Shift-)klik ili kliknite i vucite da primijenite vrijednost"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "Tje"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-da.js0000644000175000017500000000532611174146375027211 0ustar zackzack// Calendar i18n // Language: da (Danish) // Encoding: utf-8 // Author: Michael Thingmand Henriksen, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag", "Søndag"); // short day names Calendar._SDN = new Array ("Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"); // short month names Calendar._SMN = new Array ("Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Om Kalenderen"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For den seneste version besøg: http://www.dynarch.com/projects/calendar/\n"; + "Distribueret under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detajler." + "\n\n" + "Valg af dato:\n" + "- Brug \xab, \xbb knapperne for at vælge Ã¥r\n" + "- Brug " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knapperne for at vælge mÃ¥ned\n" + "- Hold knappen pÃ¥ musen nede pÃ¥ knapperne ovenfor for hurtigere valg."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Valg af tid:\n" + "- Klik pÃ¥ en vilkÃ¥rlig del for større værdi\n" + "- eller Shift-klik for for mindre værdi\n" + "- eller klik og træk for hurtigere valg."; Calendar._TT["PREV_YEAR"] = "Ét Ã¥r tilbage (hold for menu)"; Calendar._TT["PREV_MONTH"] = "Én mÃ¥ned tilbage (hold for menu)"; Calendar._TT["GO_TODAY"] = "GÃ¥ til i dag"; Calendar._TT["NEXT_MONTH"] = "Én mÃ¥ned frem (hold for menu)"; Calendar._TT["NEXT_YEAR"] = "Ét Ã¥r frem (hold for menu)"; Calendar._TT["SEL_DATE"] = "Vælg dag"; Calendar._TT["DRAG_TO_MOVE"] = "Træk vinduet"; Calendar._TT["PART_TODAY"] = " (i dag)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "Vis %s først"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Luk"; Calendar._TT["TODAY"] = "I dag"; Calendar._TT["TIME_PART"] = "(Shift-)klik eller træk for at ændre værdi"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; Calendar._TT["WK"] = "Uge"; Calendar._TT["TIME"] = "Tid:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/lang/calendar-bg.js0000644000175000017500000000637411174146375027221 0ustar zackzack// Calendar i18n // Language: bg (Bulgarian) // Encoding: utf-8 // Author: Valentin Sheiretsky, // Distributed under the same terms as the calendar itself. // full day names Calendar._DN = new Array ("ÐеделÑ", "Понеделник", "Вторник", "СрÑда", "Четвъртък", "Петък", "Събота", "ÐеделÑ"); // short day names Calendar._SDN = new Array ("Ðед", "Пон", "Вто", "СрÑ", "Чет", "Пет", "Съб", "Ðед"); // First day of the week. "0" means display Sunday first. Calendar._FD = 0; // full month names Calendar._MN = new Array ("Януари", "Февруари", "Март", "Ðприл", "Май", "Юни", "Юли", "ÐвгуÑÑ‚", "Септември", "Октомври", "Ðоември", "Декември"); // short month names Calendar._SMN = new Array ("Яну", "Фев", "Мар", "Ðпр", "Май", "Юни", "Юли", "Ðвг", "Сеп", "Окт", "Ðое", "Дек"); // tooltips Calendar._TT = {}; Calendar._TT["INFO"] = "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° календара"; Calendar._TT["ABOUT"] = "DHTML Date/Time Selector\n" + "(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) "For latest version visit: http://www.dynarch.com/projects/calendar/\n" + "Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + "\n\n" + "Date selection:\n" + "- Use the \xab, \xbb buttons to select year\n" + "- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + "- Hold mouse button on any of the above buttons for faster selection."; Calendar._TT["ABOUT_TIME"] = "\n\n" + "Time selection:\n" + "- Click on any of the time parts to increase it\n" + "- or Shift-click to decrease it\n" + "- or click and drag for faster selection."; Calendar._TT["PREV_YEAR"] = "Предна година (задръжте за меню)"; Calendar._TT["PREV_MONTH"] = "Преден меÑец (задръжте за меню)"; Calendar._TT["GO_TODAY"] = "Изберете днеÑ"; Calendar._TT["NEXT_MONTH"] = "Следващ меÑец (задръжте за меню)"; Calendar._TT["NEXT_YEAR"] = "Следваща година (задръжте за меню)"; Calendar._TT["SEL_DATE"] = "Изберете дата"; Calendar._TT["DRAG_TO_MOVE"] = "ПремеÑтване"; Calendar._TT["PART_TODAY"] = " (днеÑ)"; // the following is to inform that "%s" is to be the first day of week // %s will be replaced with the day name. Calendar._TT["DAY_FIRST"] = "%s като първи ден"; // This may be locale-dependent. It specifies the week-end days, as an array // of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 // means Monday, etc. Calendar._TT["WEEKEND"] = "0,6"; Calendar._TT["CLOSE"] = "Затворете"; Calendar._TT["TODAY"] = "ДнеÑ"; Calendar._TT["TIME_PART"] = "(Shift-)Click или drag за да промените ÑтойноÑтта"; // date formats Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; Calendar._TT["TT_DATE_FORMAT"] = "%A - %e %B %Y"; Calendar._TT["WK"] = "Седм"; Calendar._TT["TIME"] = "ЧаÑ:"; python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar-win2k-2.css0000644000175000017500000001356111217014131027227 0ustar zackzack/* The main calendar widget. DIV containing a table. */ .calendar { position: relative; display: none; border-top: 2px solid #fff; border-right: 2px solid #000; border-bottom: 2px solid #000; border-left: 2px solid #fff; font-size: 11px; color: #000; cursor: default; background: #d4c8d0; font-family: tahoma,verdana,sans-serif; z-index: 99; } .calendar table { border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; font-size: 11px; color: #000; cursor: default; background: #d4c8d0; font-family: tahoma,verdana,sans-serif; } /* Header part -- contains navigation buttons and day names. */ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ text-align: center; padding: 1px; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; } .calendar .nav { background: transparent url(menuarrow.gif) no-repeat 100% 100%; } .calendar thead .title { /* This holds the current "month, year" */ font-weight: bold; padding: 1px; border: 1px solid #000; background: #847880; color: #fff; text-align: center; } .calendar thead .headrow { /* Row containing navigation buttons */ } .calendar thead .daynames { /* Row containing the day names */ } .calendar thead .name { /* Cells containing the day names */ border-bottom: 1px solid #000; padding: 2px; text-align: center; background: #f4e8f0; } .calendar thead .weekend { /* How a weekend day name shows in header */ color: #f00; } .calendar thead .hilite { /* How do the buttons in header appear when hover */ border-top: 2px solid #fff; border-right: 2px solid #000; border-bottom: 2px solid #000; border-left: 2px solid #fff; padding: 0px; background-color: #e4d8e0; } .calendar thead .active { /* Active (pressed) buttons in header */ padding: 2px 0px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; background-color: #c4b8c0; } /* The body part -- contains all the days in month. */ .calendar tbody .day { /* Cells containing month days dates */ width: 2em; text-align: right; padding: 2px 4px 2px 2px; } .calendar tbody .day.othermonth { font-size: 80%; color: #aaa; } .calendar tbody .day.othermonth.oweekend { color: #faa; } .calendar table .wn { padding: 2px 3px 2px 2px; border-right: 1px solid #000; background: #f4e8f0; } .calendar tbody .rowhilite td { background: #e4d8e0; } .calendar tbody .rowhilite td.wn { background: #d4c8d0; } .calendar tbody td.hilite { /* Hovered cells */ padding: 1px 3px 1px 1px; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; } .calendar tbody td.active { /* Active (pressed) cells */ padding: 2px 2px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } .calendar tbody td.selected { /* Cell showing selected date */ font-weight: bold; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; padding: 2px 2px 0px 2px; background: #e4d8e0; } .calendar tbody td.weekend { /* Cells showing weekend days */ color: #f00; } .calendar tbody td.today { /* Cell showing today date */ font-weight: bold; color: #00f; } .calendar tbody .disabled { color: #999; } .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ visibility: hidden; } .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ display: none; } /* The footer part -- status bar and "Close" button */ .calendar tfoot .footrow { /* The in footer (only one right now) */ } .calendar tfoot .ttip { /* Tooltip (status bar) cell */ background: #f4e8f0; padding: 1px; border: 1px solid #000; background: #847880; color: #fff; text-align: center; } .calendar tfoot .hilite { /* Hover style for buttons in footer */ border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; padding: 1px; background: #e4d8e0; } .calendar tfoot .active { /* Active (pressed) style for buttons in footer */ padding: 2px 0px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } /* Combo boxes (menus that display months/years for direct selection) */ .calendar .combo { position: absolute; display: none; width: 4em; top: 0px; left: 0px; cursor: default; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; background: #e4d8e0; font-size: 90%; padding: 1px; z-index: 100; } .calendar .combo .label, .calendar .combo .label-IEfix { text-align: center; padding: 1px; } .calendar .combo .label-IEfix { width: 4em; } .calendar .combo .active { background: #d4c8d0; padding: 0px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } .calendar .combo .hilite { background: #408; color: #fea; } .calendar td.time { border-top: 1px solid #000; padding: 1px 0px; text-align: center; background-color: #f4f0e8; } .calendar td.time .hour, .calendar td.time .minute, .calendar td.time .ampm { padding: 0px 3px 0px 4px; border: 1px solid #889; font-weight: bold; background-color: #fff; } .calendar td.time .ampm { text-align: center; } .calendar td.time .colon { padding: 0px 2px 0px 3px; font-weight: bold; } .calendar td.time span.hilite { border-color: #000; background-color: #766; color: #fff; } .calendar td.time span.active { border-color: #f00; background-color: #000; color: #0f0; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar-system.css0000644000175000017500000001313211217014131027354 0ustar zackzack/* The main calendar widget. DIV containing a table. */ .calendar { position: relative; display: none; border: 1px solid; border-color: #fff #000 #000 #fff; font-size: 11px; cursor: default; background: Window; color: WindowText; font-family: tahoma,verdana,sans-serif; z-index: 99; } .calendar table { border: 1px solid; border-color: #fff #000 #000 #fff; font-size: 11px; cursor: default; background: Window; color: WindowText; font-family: tahoma,verdana,sans-serif; } /* Header part -- contains navigation buttons and day names. */ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ text-align: center; padding: 1px; border: 1px solid; border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; background: ButtonFace; } .calendar .nav { background: ButtonFace url(menuarrow.gif) no-repeat 100% 100%; } .calendar thead .title { /* This holds the current "month, year" */ font-weight: bold; padding: 1px; border: 1px solid #000; background: ActiveCaption; color: CaptionText; text-align: center; } .calendar thead .headrow { /* Row containing navigation buttons */ } .calendar thead .daynames { /* Row containing the day names */ } .calendar thead .name { /* Cells containing the day names */ border-bottom: 1px solid ButtonShadow; padding: 2px; text-align: center; background: ButtonFace; color: ButtonText; } .calendar thead .weekend { /* How a weekend day name shows in header */ color: #f00; } .calendar thead .hilite { /* How do the buttons in header appear when hover */ border: 2px solid; padding: 0px; border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; } .calendar thead .active { /* Active (pressed) buttons in header */ border-width: 1px; padding: 2px 0px 0px 2px; border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; } /* The body part -- contains all the days in month. */ .calendar tbody .day { /* Cells containing month days dates */ width: 2em; text-align: right; padding: 2px 4px 2px 2px; } .calendar tbody .day.othermonth { font-size: 80%; color: #aaa; } .calendar tbody .day.othermonth.oweekend { color: #faa; } .calendar table .wn { padding: 2px 3px 2px 2px; border-right: 1px solid ButtonShadow; background: ButtonFace; color: ButtonText; } .calendar tbody .rowhilite td { background: Highlight; color: HighlightText; } .calendar tbody td.hilite { /* Hovered cells */ padding: 1px 3px 1px 1px; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; } .calendar tbody td.active { /* Active (pressed) cells */ padding: 2px 2px 0px 2px; border: 1px solid; border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; } .calendar tbody td.selected { /* Cell showing selected date */ font-weight: bold; border: 1px solid; border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; padding: 2px 2px 0px 2px; background: ButtonFace; color: ButtonText; } .calendar tbody td.weekend { /* Cells showing weekend days */ color: #f00; } .calendar tbody td.today { /* Cell showing today date */ font-weight: bold; color: #00f; } .calendar tbody td.disabled { color: GrayText; } .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ visibility: hidden; } .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ display: none; } /* The footer part -- status bar and "Close" button */ .calendar tfoot .footrow { /* The in footer (only one right now) */ } .calendar tfoot .ttip { /* Tooltip (status bar) cell */ background: ButtonFace; padding: 1px; border: 1px solid; border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; color: ButtonText; text-align: center; } .calendar tfoot .hilite { /* Hover style for buttons in footer */ border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; padding: 1px; background: #e4e0d8; } .calendar tfoot .active { /* Active (pressed) style for buttons in footer */ padding: 2px 0px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } /* Combo boxes (menus that display months/years for direct selection) */ .calendar .combo { position: absolute; display: none; width: 4em; top: 0px; left: 0px; cursor: default; border: 1px solid; border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; background: Menu; color: MenuText; font-size: 90%; padding: 1px; z-index: 100; } .calendar .combo .label, .calendar .combo .label-IEfix { text-align: center; padding: 1px; } .calendar .combo .label-IEfix { width: 4em; } .calendar .combo .active { padding: 0px; border: 1px solid #000; } .calendar .combo .hilite { background: Highlight; color: HighlightText; } .calendar td.time { border-top: 1px solid ButtonShadow; padding: 1px 0px; text-align: center; background-color: ButtonFace; } .calendar td.time .hour, .calendar td.time .minute, .calendar td.time .ampm { padding: 0px 3px 0px 4px; border: 1px solid #889; font-weight: bold; background-color: Menu; } .calendar td.time .ampm { text-align: center; } .calendar td.time .colon { padding: 0px 2px 0px 3px; font-weight: bold; } .calendar td.time span.hilite { border-color: #000; background-color: Highlight; color: HighlightText; } .calendar td.time span.active { border-color: #f00; background-color: #000; color: #0f0; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar-green.css0000644000175000017500000001127411217014131027135 0ustar zackzack/* The main calendar widget. DIV containing a table. */ div.calendar { position: relative; } .calendar, .calendar table { border: 1px solid #565; font-size: 11px; color: #000; cursor: default; background: #efe; font-family: tahoma,verdana,sans-serif; z-index: 99; } /* Header part -- contains navigation buttons and day names. */ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ text-align: center; /* They are the navigation buttons */ padding: 2px; /* Make the buttons seem like they're pressing */ background: #676; color: #fff; font-size: 90%; } .calendar .nav { background: #676 url(menuarrow.gif) no-repeat 100% 100%; } .calendar thead .title { /* This holds the current "month, year" */ font-weight: bold; /* Pressing it will take you to the current date */ text-align: center; padding: 2px; background: #250; color: #efa; } .calendar thead .headrow { /* Row containing navigation buttons */ } .calendar thead .name { /* Cells containing the day names */ border-bottom: 1px solid #565; padding: 2px; text-align: center; color: #000; } .calendar thead .weekend { /* How a weekend day name shows in header */ color: #a66; } .calendar thead .hilite { /* How do the buttons in header appear when hover */ background-color: #afa; color: #000; border: 1px solid #084; padding: 1px; } .calendar thead .active { /* Active (pressed) buttons in header */ background-color: #7c7; padding: 2px 0px 0px 2px; } .calendar thead .daynames { /* Row containing the day names */ background: #dfb; } /* The body part -- contains all the days in month. */ .calendar tbody .day { /* Cells containing month days dates */ width: 2em; color: #564; text-align: right; padding: 2px 4px 2px 2px; } .calendar tbody .day.othermonth { font-size: 80%; color: #bbb; } .calendar tbody .day.othermonth.oweekend { color: #fbb; } .calendar table .wn { padding: 2px 3px 2px 2px; border-right: 1px solid #8a8; background: #dfb; } .calendar tbody .rowhilite td { background: #dfd; } .calendar tbody .rowhilite td.wn { background: #efe; } .calendar tbody td.hilite { /* Hovered cells */ background: #efd; padding: 1px 3px 1px 1px; border: 1px solid #bbb; } .calendar tbody td.active { /* Active (pressed) cells */ background: #dec; padding: 2px 2px 0px 2px; } .calendar tbody td.selected { /* Cell showing today date */ font-weight: bold; border: 1px solid #000; padding: 1px 3px 1px 1px; background: #f8fff8; color: #000; } .calendar tbody td.weekend { /* Cells showing weekend days */ color: #a66; } .calendar tbody td.today { font-weight: bold; color: #0a0; } .calendar tbody .disabled { color: #999; } .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ visibility: hidden; } .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ display: none; } /* The footer part -- status bar and "Close" button */ .calendar tfoot .footrow { /* The in footer (only one right now) */ text-align: center; background: #565; color: #fff; } .calendar tfoot .ttip { /* Tooltip (status bar) cell */ padding: 2px; background: #250; color: #efa; } .calendar tfoot .hilite { /* Hover style for buttons in footer */ background: #afa; border: 1px solid #084; color: #000; padding: 1px; } .calendar tfoot .active { /* Active (pressed) style for buttons in footer */ background: #7c7; padding: 2px 0px 0px 2px; } /* Combo boxes (menus that display months/years for direct selection) */ .calendar .combo { position: absolute; display: none; top: 0px; left: 0px; width: 4em; cursor: default; border: 1px solid #565; background: #efd; color: #000; font-size: 90%; z-index: 100; } .calendar .combo .label, .calendar .combo .label-IEfix { text-align: center; padding: 1px; } .calendar .combo .label-IEfix { width: 4em; } .calendar .combo .hilite { background: #af8; } .calendar .combo .active { border-top: 1px solid #6a4; border-bottom: 1px solid #6a4; background: #efe; font-weight: bold; } .calendar td.time { border-top: 1px solid #8a8; padding: 1px 0px; text-align: center; background-color: #dfb; } .calendar td.time .hour, .calendar td.time .minute, .calendar td.time .ampm { padding: 0px 3px 0px 4px; border: 1px solid #898; font-weight: bold; background-color: #fff; } .calendar td.time .ampm { text-align: center; } .calendar td.time .colon { padding: 0px 2px 0px 3px; font-weight: bold; } .calendar td.time span.hilite { border-color: #000; background-color: #686; color: #fff; } .calendar td.time span.active { border-color: #f00; background-color: #000; color: #0f0; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar-win2k-1.css0000644000175000017500000001356111217014131027226 0ustar zackzack/* The main calendar widget. DIV containing a table. */ .calendar { position: relative; display: none; border-top: 2px solid #fff; border-right: 2px solid #000; border-bottom: 2px solid #000; border-left: 2px solid #fff; font-size: 11px; color: #000; cursor: default; background: #d4d0c8; font-family: tahoma,verdana,sans-serif; z-index: 99; } .calendar table { border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; font-size: 11px; color: #000; cursor: default; background: #d4d0c8; font-family: tahoma,verdana,sans-serif; } /* Header part -- contains navigation buttons and day names. */ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ text-align: center; padding: 1px; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; } .calendar .nav { background: transparent url(menuarrow.gif) no-repeat 100% 100%; } .calendar thead .title { /* This holds the current "month, year" */ font-weight: bold; padding: 1px; border: 1px solid #000; background: #848078; color: #fff; text-align: center; } .calendar thead .headrow { /* Row containing navigation buttons */ } .calendar thead .daynames { /* Row containing the day names */ } .calendar thead .name { /* Cells containing the day names */ border-bottom: 1px solid #000; padding: 2px; text-align: center; background: #f4f0e8; } .calendar thead .weekend { /* How a weekend day name shows in header */ color: #f00; } .calendar thead .hilite { /* How do the buttons in header appear when hover */ border-top: 2px solid #fff; border-right: 2px solid #000; border-bottom: 2px solid #000; border-left: 2px solid #fff; padding: 0px; background-color: #e4e0d8; } .calendar thead .active { /* Active (pressed) buttons in header */ padding: 2px 0px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; background-color: #c4c0b8; } /* The body part -- contains all the days in month. */ .calendar tbody .day { /* Cells containing month days dates */ width: 2em; text-align: right; padding: 2px 4px 2px 2px; } .calendar tbody .day.othermonth { font-size: 80%; color: #aaa; } .calendar tbody .day.othermonth.oweekend { color: #faa; } .calendar table .wn { padding: 2px 3px 2px 2px; border-right: 1px solid #000; background: #f4f0e8; } .calendar tbody .rowhilite td { background: #e4e0d8; } .calendar tbody .rowhilite td.wn { background: #d4d0c8; } .calendar tbody td.hilite { /* Hovered cells */ padding: 1px 3px 1px 1px; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; } .calendar tbody td.active { /* Active (pressed) cells */ padding: 2px 2px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } .calendar tbody td.selected { /* Cell showing selected date */ font-weight: bold; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; padding: 2px 2px 0px 2px; background: #e4e0d8; } .calendar tbody td.weekend { /* Cells showing weekend days */ color: #f00; } .calendar tbody td.today { /* Cell showing today date */ font-weight: bold; color: #00f; } .calendar tbody .disabled { color: #999; } .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ visibility: hidden; } .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ display: none; } /* The footer part -- status bar and "Close" button */ .calendar tfoot .footrow { /* The in footer (only one right now) */ } .calendar tfoot .ttip { /* Tooltip (status bar) cell */ background: #f4f0e8; padding: 1px; border: 1px solid #000; background: #848078; color: #fff; text-align: center; } .calendar tfoot .hilite { /* Hover style for buttons in footer */ border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; padding: 1px; background: #e4e0d8; } .calendar tfoot .active { /* Active (pressed) style for buttons in footer */ padding: 2px 0px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } /* Combo boxes (menus that display months/years for direct selection) */ .calendar .combo { position: absolute; display: none; width: 4em; top: 0px; left: 0px; cursor: default; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; background: #e4e0d8; font-size: 90%; padding: 1px; z-index: 100; } .calendar .combo .label, .calendar .combo .label-IEfix { text-align: center; padding: 1px; } .calendar .combo .label-IEfix { width: 4em; } .calendar .combo .active { background: #c4c0b8; padding: 0px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } .calendar .combo .hilite { background: #048; color: #fea; } .calendar td.time { border-top: 1px solid #000; padding: 1px 0px; text-align: center; background-color: #f4f0e8; } .calendar td.time .hour, .calendar td.time .minute, .calendar td.time .ampm { padding: 0px 3px 0px 4px; border: 1px solid #889; font-weight: bold; background-color: #fff; } .calendar td.time .ampm { text-align: center; } .calendar td.time .colon { padding: 0px 2px 0px 3px; font-weight: bold; } .calendar td.time span.hilite { border-color: #000; background-color: #766; color: #fff; } .calendar td.time span.active { border-color: #f00; background-color: #000; color: #0f0; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar-blue2.css0000644000175000017500000001163511217014131027047 0ustar zackzack/* The main calendar widget. DIV containing a table. */ div.calendar { position: relative; } .calendar, .calendar table { border: 1px solid #206A9B; font-size: 11px; color: #000; cursor: default; background: #F1F8FC; font-family: tahoma,verdana,sans-serif; z-index: 99; } /* Header part -- contains navigation buttons and day names. */ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ text-align: center; /* They are the navigation buttons */ padding: 2px; /* Make the buttons seem like they're pressing */ } .calendar .nav { background: #007ED1 url(menuarrow2.gif) no-repeat 100% 100%; } .calendar thead .title { /* This holds the current "month, year" */ font-weight: bold; /* Pressing it will take you to the current date */ text-align: center; background: #000; color: #fff; padding: 2px; } .calendar thead tr { /* Row containing navigation buttons */ background: #007ED1; color: #fff; } .calendar thead .daynames { /* Row containing the day names */ background: #C7E1F3; } .calendar thead .name { /* Cells containing the day names */ border-bottom: 1px solid #206A9B; padding: 2px; text-align: center; color: #000; } .calendar thead .weekend { /* How a weekend day name shows in header */ color: #a66; } .calendar thead .hilite { /* How do the buttons in header appear when hover */ background-color: #34ABFA; color: #000; border: 1px solid #016DC5; padding: 1px; } .calendar thead .active { /* Active (pressed) buttons in header */ background-color: #006AA9; border: 1px solid #008AFF; padding: 2px 0px 0px 2px; } /* The body part -- contains all the days in month. */ .calendar tbody .day { /* Cells containing month days dates */ width: 2em; color: #456; text-align: right; padding: 2px 4px 2px 2px; } .calendar tbody .day.othermonth { font-size: 80%; color: #bbb; } .calendar tbody .day.othermonth.oweekend { color: #fbb; } .calendar table .wn { padding: 2px 3px 2px 2px; border-right: 1px solid #000; background: #C7E1F3; } .calendar tbody .rowhilite td { background: #def; } .calendar tbody .rowhilite td.wn { background: #F1F8FC; } .calendar tbody td.hilite { /* Hovered cells */ background: #def; padding: 1px 3px 1px 1px; border: 1px solid #8FC4E8; } .calendar tbody td.active { /* Active (pressed) cells */ background: #cde; padding: 2px 2px 0px 2px; } .calendar tbody td.selected { /* Cell showing today date */ font-weight: bold; border: 1px solid #000; padding: 1px 3px 1px 1px; background: #fff; color: #000; } .calendar tbody td.weekend { /* Cells showing weekend days */ color: #a66; } .calendar tbody td.today { /* Cell showing selected date */ font-weight: bold; color: #D50000; } .calendar tbody .disabled { color: #999; } .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ visibility: hidden; } .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ display: none; } /* The footer part -- status bar and "Close" button */ .calendar tfoot .footrow { /* The in footer (only one right now) */ text-align: center; background: #206A9B; color: #fff; } .calendar tfoot .ttip { /* Tooltip (status bar) cell */ background: #000; color: #fff; border-top: 1px solid #206A9B; padding: 1px; } .calendar tfoot .hilite { /* Hover style for buttons in footer */ background: #B8DAF0; border: 1px solid #178AEB; color: #000; padding: 1px; } .calendar tfoot .active { /* Active (pressed) style for buttons in footer */ background: #006AA9; padding: 2px 0px 0px 2px; } /* Combo boxes (menus that display months/years for direct selection) */ .calendar .combo { position: absolute; display: none; top: 0px; left: 0px; width: 4em; cursor: default; border: 1px solid #655; background: #def; color: #000; font-size: 90%; z-index: 100; } .calendar .combo .label, .calendar .combo .label-IEfix { text-align: center; padding: 1px; } .calendar .combo .label-IEfix { width: 4em; } .calendar .combo .hilite { background: #34ABFA; border-top: 1px solid #46a; border-bottom: 1px solid #46a; font-weight: bold; } .calendar .combo .active { border-top: 1px solid #46a; border-bottom: 1px solid #46a; background: #F1F8FC; font-weight: bold; } .calendar td.time { border-top: 1px solid #000; padding: 1px 0px; text-align: center; background-color: #E3F0F9; } .calendar td.time .hour, .calendar td.time .minute, .calendar td.time .ampm { padding: 0px 3px 0px 4px; border: 1px solid #889; font-weight: bold; background-color: #F1F8FC; } .calendar td.time .ampm { text-align: center; } .calendar td.time .colon { padding: 0px 2px 0px 3px; font-weight: bold; } .calendar td.time span.hilite { border-color: #000; background-color: #267DB7; color: #fff; } .calendar td.time span.active { border-color: red; background-color: #000; color: #A5FF00; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar-win2k-cold-2.css0000644000175000017500000001356111217014131030146 0ustar zackzack/* The main calendar widget. DIV containing a table. */ .calendar { position: relative; display: none; border-top: 2px solid #fff; border-right: 2px solid #000; border-bottom: 2px solid #000; border-left: 2px solid #fff; font-size: 11px; color: #000; cursor: default; background: #c8d4d0; font-family: tahoma,verdana,sans-serif; z-index: 99; } .calendar table { border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; font-size: 11px; color: #000; cursor: default; background: #c8d4d0; font-family: tahoma,verdana,sans-serif; } /* Header part -- contains navigation buttons and day names. */ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ text-align: center; padding: 1px; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; } .calendar .nav { background: transparent url(menuarrow.gif) no-repeat 100% 100%; } .calendar thead .title { /* This holds the current "month, year" */ font-weight: bold; padding: 1px; border: 1px solid #000; background: #788480; color: #fff; text-align: center; } .calendar thead .headrow { /* Row containing navigation buttons */ } .calendar thead .daynames { /* Row containing the day names */ } .calendar thead .name { /* Cells containing the day names */ border-bottom: 1px solid #000; padding: 2px; text-align: center; background: #e8f4f0; } .calendar thead .weekend { /* How a weekend day name shows in header */ color: #f00; } .calendar thead .hilite { /* How do the buttons in header appear when hover */ border-top: 2px solid #fff; border-right: 2px solid #000; border-bottom: 2px solid #000; border-left: 2px solid #fff; padding: 0px; background-color: #d8e4e0; } .calendar thead .active { /* Active (pressed) buttons in header */ padding: 2px 0px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; background-color: #b8c4c0; } /* The body part -- contains all the days in month. */ .calendar tbody .day { /* Cells containing month days dates */ width: 2em; text-align: right; padding: 2px 4px 2px 2px; } .calendar tbody .day.othermonth { font-size: 80%; color: #aaa; } .calendar tbody .day.othermonth.oweekend { color: #faa; } .calendar table .wn { padding: 2px 3px 2px 2px; border-right: 1px solid #000; background: #e8f4f0; } .calendar tbody .rowhilite td { background: #d8e4e0; } .calendar tbody .rowhilite td.wn { background: #c8d4d0; } .calendar tbody td.hilite { /* Hovered cells */ padding: 1px 3px 1px 1px; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; } .calendar tbody td.active { /* Active (pressed) cells */ padding: 2px 2px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } .calendar tbody td.selected { /* Cell showing selected date */ font-weight: bold; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; padding: 2px 2px 0px 2px; background: #d8e4e0; } .calendar tbody td.weekend { /* Cells showing weekend days */ color: #f00; } .calendar tbody td.today { /* Cell showing today date */ font-weight: bold; color: #00f; } .calendar tbody .disabled { color: #999; } .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ visibility: hidden; } .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ display: none; } /* The footer part -- status bar and "Close" button */ .calendar tfoot .footrow { /* The in footer (only one right now) */ } .calendar tfoot .ttip { /* Tooltip (status bar) cell */ background: #e8f4f0; padding: 1px; border: 1px solid #000; background: #788480; color: #fff; text-align: center; } .calendar tfoot .hilite { /* Hover style for buttons in footer */ border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; padding: 1px; background: #d8e4e0; } .calendar tfoot .active { /* Active (pressed) style for buttons in footer */ padding: 2px 0px 0px 2px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } /* Combo boxes (menus that display months/years for direct selection) */ .calendar .combo { position: absolute; display: none; width: 4em; top: 0px; left: 0px; cursor: default; border-top: 1px solid #fff; border-right: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #fff; background: #d8e4e0; font-size: 90%; padding: 1px; z-index: 100; } .calendar .combo .label, .calendar .combo .label-IEfix { text-align: center; padding: 1px; } .calendar .combo .label-IEfix { width: 4em; } .calendar .combo .active { background: #c8d4d0; padding: 0px; border-top: 1px solid #000; border-right: 1px solid #fff; border-bottom: 1px solid #fff; border-left: 1px solid #000; } .calendar .combo .hilite { background: #048; color: #aef; } .calendar td.time { border-top: 1px solid #000; padding: 1px 0px; text-align: center; background-color: #e8f0f4; } .calendar td.time .hour, .calendar td.time .minute, .calendar td.time .ampm { padding: 0px 3px 0px 4px; border: 1px solid #889; font-weight: bold; background-color: #fff; } .calendar td.time .ampm { text-align: center; } .calendar td.time .colon { padding: 0px 2px 0px 3px; font-weight: bold; } .calendar td.time span.hilite { border-color: #000; background-color: #667; color: #fff; } .calendar td.time span.active { border-color: #f00; background-color: #000; color: #0f0; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar-tas.css0000644000175000017500000001230711217014131026622 0ustar zackzack/* The main calendar widget. DIV containing a table. */ div.calendar { position: relative; } .calendar, .calendar table { border: 1px solid #655; font-size: 11px; color: #000; cursor: default; background: #ffd; font-family: tahoma,verdana,sans-serif; z-index: 99; filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#DDDCCC,EndColorStr=#FFFFFF); } /* Header part -- contains navigation buttons and day names. */ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ text-align: center; /* They are the navigation buttons */ padding: 2px; /* Make the buttons seem like they're pressing */ color:#363636; } .calendar .nav { background: #edc url(menuarrow.gif) no-repeat 100% 100%; } .calendar thead .title { /* This holds the current "month, year" */ font-weight: bold; /* Pressing it will take you to the current date */ text-align: center; background: #654; color: #363636; padding: 2px; filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#ffffff,EndColorStr=#dddccc); } .calendar thead .headrow { /* Row containing navigation buttons */ /*background: #3B86A0;*/ color: #363636; font-weight: bold; filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#ffffff,EndColorStr=#3b86a0); } .calendar thead .name { /* Cells containing the day names */ border-bottom: 1px solid #655; padding: 2px; text-align: center; color: #363636; filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#DDDCCC,EndColorStr=#FFFFFF); } .calendar thead .weekend { /* How a weekend day name shows in header */ color: #f00; } .calendar thead .hilite { /* How do the buttons in header appear when hover */ background-color: #ffcc86; color: #000; border: 1px solid #b59345; padding: 1px; } .calendar thead .active { /* Active (pressed) buttons in header */ background-color: #c77; padding: 2px 0px 0px 2px; } .calendar thead .daynames { /* Row containing the day names */ background: #fed; } /* The body part -- contains all the days in month. */ .calendar tbody .day { /* Cells containing month days dates */ width: 2em; text-align: right; padding: 2px 4px 2px 2px; } .calendar tbody .day.othermonth { font-size: 80%; color: #aaa; } .calendar tbody .day.othermonth.oweekend { color: #faa; } .calendar table .wn { padding: 2px 3px 2px 2px; border-right: 1px solid #000; background: #fed; } .calendar tbody .rowhilite td { background: #ddf; } .calendar tbody .rowhilite td.wn { background: #efe; } .calendar tbody td.hilite { /* Hovered cells */ background: #ffe; padding: 1px 3px 1px 1px; border: 1px solid #bbb; } .calendar tbody td.active { /* Active (pressed) cells */ background: #ddc; padding: 2px 2px 0px 2px; } .calendar tbody td.selected { /* Cell showing today date */ font-weight: bold; border: 1px solid #000; padding: 1px 3px 1px 1px; background: #fea; } .calendar tbody td.weekend { /* Cells showing weekend days */ color: #f00; } .calendar tbody td.today { font-weight: bold; } .calendar tbody .disabled { color: #999; } .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ visibility: hidden; } .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ display: none; } /* The footer part -- status bar and "Close" button */ .calendar tfoot .footrow { /* The in footer (only one right now) */ text-align: center; background: #988; color: #000; } .calendar tfoot .ttip { /* Tooltip (status bar) cell */ border-top: 1px solid #655; background: #dcb; color: #363636; font-weight: bold; filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#FFFFFF,EndColorStr=#DDDCCC); } .calendar tfoot .hilite { /* Hover style for buttons in footer */ background: #faa; border: 1px solid #f40; padding: 1px; } .calendar tfoot .active { /* Active (pressed) style for buttons in footer */ background: #c77; padding: 2px 0px 0px 2px; } /* Combo boxes (menus that display months/years for direct selection) */ .combo { position: absolute; display: none; top: 0px; left: 0px; width: 4em; cursor: default; border: 1px solid #655; background: #ffe; color: #000; font-size: smaller; z-index: 100; } .combo .label, .combo .label-IEfix { text-align: center; padding: 1px; } .combo .label-IEfix { width: 4em; } .combo .hilite { background: #fc8; } .combo .active { border-top: 1px solid #a64; border-bottom: 1px solid #a64; background: #fee; font-weight: bold; } .calendar td.time { border-top: 1px solid #a88; padding: 1px 0px; text-align: center; background-color: #fed; } .calendar td.time .hour, .calendar td.time .minute, .calendar td.time .ampm { padding: 0px 3px 0px 4px; border: 1px solid #988; font-weight: bold; background-color: #fff; } .calendar td.time .ampm { text-align: center; } .calendar td.time .colon { padding: 0px 2px 0px 3px; font-weight: bold; } .calendar td.time span.hilite { border-color: #000; background-color: #866; color: #fff; } .calendar td.time span.active { border-color: #f00; background-color: #000; color: #0f0; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/skins/0000755000175000017500000000000011224440166024707 5ustar zackzackpython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/skins/aqua/0000755000175000017500000000000011224440166025636 5ustar zackzackpython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/skins/aqua/menuarrow.gif0000644000175000017500000000006111120001754030330 0ustar zackzackGIF89a€BBBÿÿÿ!ù,„yÉÀc;python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/skins/aqua/active-bg.gif0000644000175000017500000000013111120001754030150 0ustar zackzackGIF89añ(S¹4l¿", ">>" buttons have this class */ text-align: center; /* They are the navigation buttons */ padding: 2px; /* Make the buttons seem like they're pressing */ background: url("title-bg.gif") repeat-x 0 100%; color: #000; font-weight: bold; } .calendar .nav { font-family: verdana,tahoma,sans-serif; } .calendar .nav div { background: transparent url("menuarrow.gif") no-repeat 100% 100%; } .calendar thead tr { background: url("title-bg.gif") repeat-x 0 100%; color: #000; } .calendar thead .title { /* This holds the current "month, year" */ font-weight: bold; /* Pressing it will take you to the current date */ text-align: center; padding: 2px; background: url("title-bg.gif") repeat-x 0 100%; color: #000; } .calendar thead .headrow { /* Row containing navigation buttons */ } .calendar thead .name { /* Cells containing the day names */ border-bottom: 1px solid #797979; padding: 2px; text-align: center; color: #000; } .calendar thead .weekend { /* How a weekend day name shows in header */ color: #c44; } .calendar thead .hilite { /* How do the buttons in header appear when hover */ background: url("hover-bg.gif"); border-bottom: 1px solid #797979; padding: 2px 2px 1px 2px; } .calendar thead .active { /* Active (pressed) buttons in header */ background: url("active-bg.gif"); color: #fff; padding: 3px 1px 0px 3px; border-bottom: 1px solid #797979; } .calendar thead .daynames { /* Row containing the day names */ background: url("dark-bg.gif"); } /* The body part -- contains all the days in month. */ .calendar tbody .day { /* Cells containing month days dates */ font-family: verdana,tahoma,sans-serif; width: 2em; color: #000; text-align: right; padding: 2px 4px 2px 2px; } .calendar tbody .day.othermonth { font-size: 80%; color: #999; } .calendar tbody .day.othermonth.oweekend { color: #f99; } .calendar table .wn { padding: 2px 3px 2px 2px; border-right: 1px solid #797979; background: url("dark-bg.gif"); } .calendar tbody .rowhilite td, .calendar tbody .rowhilite td.wn { background: url("rowhover-bg.gif"); } .calendar tbody td.today { font-weight: bold; /* background: url("today-bg.gif") no-repeat 70% 50%; */ } .calendar tbody td.hilite { /* Hovered cells */ background: url("hover-bg.gif"); padding: 1px 3px 1px 1px; border: 1px solid #bbb; } .calendar tbody td.active { /* Active (pressed) cells */ padding: 2px 2px 0px 2px; } .calendar tbody td.weekend { /* Cells showing weekend days */ color: #c44; } .calendar tbody td.selected { /* Cell showing selected date */ font-weight: bold; border: 1px solid #797979; padding: 1px 3px 1px 1px; background: url("active-bg.gif"); color: #fff; } .calendar tbody .disabled { color: #999; } .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ visibility: hidden; } .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ display: none; } /* The footer part -- status bar and "Close" button */ .calendar tfoot .footrow { /* The in footer (only one right now) */ text-align: center; background: #565; color: #fff; } .calendar tfoot .ttip { /* Tooltip (status bar) cell */ padding: 2px; background: url("status-bg.gif") repeat-x 0 0; color: #000; } .calendar tfoot .hilite { /* Hover style for buttons in footer */ background: #afa; border: 1px solid #084; color: #000; padding: 1px; } .calendar tfoot .active { /* Active (pressed) style for buttons in footer */ background: #7c7; padding: 2px 0px 0px 2px; } /* Combo boxes (menus that display months/years for direct selection) */ .calendar .combo { position: absolute; display: none; top: 0px; left: 0px; width: 4em; cursor: default; border-width: 0 1px 1px 1px; border-style: solid; border-color: #797979; background: url("normal-bg.gif"); color: #000; z-index: 100; font-size: 90%; } .calendar .combo .label, .calendar .combo .label-IEfix { text-align: center; padding: 1px; } .calendar .combo .label-IEfix { width: 4em; } .calendar .combo .hilite { background: url("hover-bg.gif"); color: #000; } .calendar .combo .active { background: url("active-bg.gif"); color: #fff; font-weight: bold; } .calendar td.time { border-top: 1px solid #797979; padding: 1px 0px; text-align: center; background: url("dark-bg.gif"); } .calendar td.time .hour, .calendar td.time .minute, .calendar td.time .ampm { padding: 0px 5px 0px 6px; font-weight: bold; background: url("normal-bg.gif"); color: #000; } .calendar td.time .hour, .calendar td.time .minute { font-family: monospace; } .calendar td.time .ampm { text-align: center; } .calendar td.time .colon { padding: 0px 2px 0px 3px; font-weight: bold; } .calendar td.time span.hilite { background: url("hover-bg.gif"); color: #000; } .calendar td.time span.active { background: url("active-bg.gif"); color: #fff; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/skins/aqua/rowhover-bg.gif0000644000175000017500000000015611120001754030557 0ustar zackzackGIF89aÂÝÝÝèèèèéçèéèéééïïïÿÿÿÿÿÿ!þCreated with The GIMP!ù,ºÜñ0ÊB«½$ëÍ›g\¸]¤ g ¨ìº&;python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/skins/aqua/today-bg.gif0000644000175000017500000000214211120001754030021 0ustar zackzackGIF89açŽþäþäþäÿäþäÿäþäþäÿäþäþäÿäþäþä ÿäþä ýä ÿäþä ÿä þä ýäþå þåþåÿåÿåþåüå"üå#þæÿæþæýæ"þæ!ûå/ûå1ýç,ýç-ùæ?ùæCýè4øæNøæSÿé0ÿé1ÿé5ÿé6ýé?üéDÿê9üéMÿêAýêHÿëCüêUüêVóèˆÿìTôèˆóè‘üìdûìgûìhÿí^òéòé ÿîbñé¤ÿîfûíwüíuûíxñé©úí€ûî€ïê¼ûî‡ÿðsîêÇûïŠîêÌîêÍúï”ÿñ~îëÏÿñíëØíëÛìëàìëâìëäùð¦ÿòŒùð¨ìëèìëëìììùñ®ùò±úò±øòºøò»ÿô úó¹ÿõ¤øóÆøóÈúôÁúôÈúôÉøôÔúõÊøôÕ÷ôØùõÒøõÚùöØ÷õä÷õå÷õæÿøÄ÷öï÷öóù÷ê÷öö÷øî÷÷÷ùøíùøòøøø÷ùö÷ùøùøøÿûÚùùùÿûàÿýîÿþöÿþøÿþüÿþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ!ù ÿ,þÃH° ˜-X¶€ÉEŠ–‚"J”¸'5zúࣤŒ/?Œ¬™øÇ‘IG%RÄ(Œ -Τ¡òÁ'/2¸(ÒÅÐÉC@ ñA…L›xÀÀÀ€°!À@ Ô„Ä+ K¶,d9ðx&+€(Q¶îXIÇ PãÐI+Æfø`·n» "$ȇÓžLVŸ9 < –òäI$ÊÁAa^Ï“Ì8鑨)’¨±'‹€S0Œ ¦ËJÈ[W€ˆ|© БeÀ°PØ 9uùem d @Ø`Q÷Åè 4YKš -‚Žúû½fÙQÀ‰+U¨ÐÀ(0½‘D’)ÜðFDr Ãw(Q@;python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/skins/aqua/title-bg.gif0000644000175000017500000000016411120001754030024 0ustar zackzackGIF89aãyyyÛÛÛàààæææçççèèèíííîîîïïïóóóôôô÷÷÷øøøþþþÿÿÿÿÿÿ!þCreated with The GIMP,°5v˜[(5CPCÄ D;python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/skins/aqua/normal-bg.gif0000644000175000017500000000015611120001754030174 0ustar zackzackGIF89aòììì÷÷÷÷ùö÷ùøøøøùùùÿÿÿ!ù!þCreated with The GIMP,ºÜñ0JC«½%ëÍ›g\¸]¤E '!¨ìº&;python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar-brown.css0000644000175000017500000001117311217014131027162 0ustar zackzack/* The main calendar widget. DIV containing a table. */ div.calendar { position: relative; } .calendar, .calendar table { border: 1px solid #655; font-size: 11px; color: #000; cursor: default; background: #ffd; font-family: tahoma,verdana,sans-serif; z-index: 99; } /* Header part -- contains navigation buttons and day names. */ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ text-align: center; /* They are the navigation buttons */ padding: 2px; /* Make the buttons seem like they're pressing */ } .calendar .nav { background: #edc url(menuarrow.gif) no-repeat 100% 100%; } .calendar thead .title { /* This holds the current "month, year" */ font-weight: bold; /* Pressing it will take you to the current date */ text-align: center; background: #654; color: #fed; padding: 2px; } .calendar thead .headrow { /* Row containing navigation buttons */ background: #edc; color: #000; } .calendar thead .name { /* Cells containing the day names */ border-bottom: 1px solid #655; padding: 2px; text-align: center; color: #000; } .calendar thead .weekend { /* How a weekend day name shows in header */ color: #f00; } .calendar thead .hilite { /* How do the buttons in header appear when hover */ background-color: #faa; color: #000; border: 1px solid #f40; padding: 1px; } .calendar thead .active { /* Active (pressed) buttons in header */ background-color: #c77; padding: 2px 0px 0px 2px; } .calendar thead .daynames { /* Row containing the day names */ background: #fed; } /* The body part -- contains all the days in month. */ .calendar tbody .day { /* Cells containing month days dates */ width: 2em; text-align: right; padding: 2px 4px 2px 2px; } .calendar tbody .day.othermonth { font-size: 80%; color: #bbb; } .calendar tbody .day.othermonth.oweekend { color: #fbb; } .calendar table .wn { padding: 2px 3px 2px 2px; border-right: 1px solid #000; background: #fed; } .calendar tbody .rowhilite td { background: #ddf; } .calendar tbody .rowhilite td.wn { background: #efe; } .calendar tbody td.hilite { /* Hovered cells */ background: #ffe; padding: 1px 3px 1px 1px; border: 1px solid #bbb; } .calendar tbody td.active { /* Active (pressed) cells */ background: #ddc; padding: 2px 2px 0px 2px; } .calendar tbody td.selected { /* Cell showing today date */ font-weight: bold; border: 1px solid #000; padding: 1px 3px 1px 1px; background: #fea; } .calendar tbody td.weekend { /* Cells showing weekend days */ color: #f00; } .calendar tbody td.today { font-weight: bold; } .calendar tbody .disabled { color: #999; } .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ visibility: hidden; } .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ display: none; } /* The footer part -- status bar and "Close" button */ .calendar tfoot .footrow { /* The in footer (only one right now) */ text-align: center; background: #988; color: #000; } .calendar tfoot .ttip { /* Tooltip (status bar) cell */ border-top: 1px solid #655; background: #dcb; color: #840; } .calendar tfoot .hilite { /* Hover style for buttons in footer */ background: #faa; border: 1px solid #f40; padding: 1px; } .calendar tfoot .active { /* Active (pressed) style for buttons in footer */ background: #c77; padding: 2px 0px 0px 2px; } /* Combo boxes (menus that display months/years for direct selection) */ .calendar .combo { position: absolute; display: none; top: 0px; left: 0px; width: 4em; cursor: default; border: 1px solid #655; background: #ffe; color: #000; font-size: 90%; z-index: 100; } .calendar .combo .label, .calendar .combo .label-IEfix { text-align: center; padding: 1px; } .calendar .combo .label-IEfix { width: 4em; } .calendar .combo .hilite { background: #fc8; } .calendar .combo .active { border-top: 1px solid #a64; border-bottom: 1px solid #a64; background: #fee; font-weight: bold; } .calendar td.time { border-top: 1px solid #a88; padding: 1px 0px; text-align: center; background-color: #fed; } .calendar td.time .hour, .calendar td.time .minute, .calendar td.time .ampm { padding: 0px 3px 0px 4px; border: 1px solid #988; font-weight: bold; background-color: #fff; } .calendar td.time .ampm { text-align: center; } .calendar td.time .colon { padding: 0px 2px 0px 3px; font-weight: bold; } .calendar td.time span.hilite { border-color: #000; background-color: #866; color: #fff; } .calendar td.time span.active { border-color: #f00; background-color: #000; color: #0f0; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar-setup.js0000644000175000017500000001146711120001754027025 0ustar zackzack/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/ * --------------------------------------------------------------------------- * * The DHTML Calendar * * Details and latest version at: * http://dynarch.com/mishoo/calendar.epl * * This script is distributed under the GNU Lesser General Public License. * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html * * This file defines helper functions for setting up the calendar. They are * intended to help non-programmers get a working calendar on their site * quickly. This script should not be seen as part of the calendar. It just * shows you what one can do with the calendar, while in the same time * providing a quick and simple method for setting it up. If you need * exhaustive customization of the calendar creation process feel free to * modify this code to suit your needs (this is recommended and much better * than modifying calendar.js itself). */ Calendar.setup=function(params){function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}};param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","%Y/%m/%d");param_default("daFormat","%Y/%m/%d");param_default("singleClick",true);param_default("disableFunc",null);param_default("dateStatusFunc",params["disableFunc"]);param_default("dateText",null);param_default("firstDay",null);param_default("align","Br");param_default("range",[1900,2999]);param_default("weekNumbers",true);param_default("flat",null);param_default("flatCallback",null);param_default("onSelect",null);param_default("onClose",null);param_default("onUpdate",null);param_default("date",null);param_default("showsTime",false);param_default("timeFormat","24");param_default("electric",true);param_default("step",2);param_default("position",null);param_default("cache",false);param_default("showOthers",false);param_default("multiple",null);var tmp=["inputField","displayArea","button"];for(var i in tmp){if(typeof params[tmp[i]]=="string"){params[tmp[i]]=document.getElementById(params[tmp[i]]);}}if(!(params.flat||params.multiple||params.inputField||params.displayArea||params.button)){alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code");return false;}function onSelect(cal){var p=cal.params;var update=(cal.dateClicked||p.electric);if(update&&p.inputField){p.inputField.value=cal.date.print(p.ifFormat);if(typeof p.inputField.onchange=="function")p.inputField.onchange();}if(update&&p.displayArea)p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&typeof p.onUpdate=="function")p.onUpdate(cal);if(update&&p.flat){if(typeof p.flatCallback=="function")p.flatCallback(cal);}if(update&&p.singleClick&&cal.dateClicked)cal.callCloseHandler();};if(params.flat!=null){if(typeof params.flat=="string")params.flat=document.getElementById(params.flat);if(!params.flat){alert("Calendar.setup:\n Flat specified but can't find parent.");return false;}var cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect);cal.showsOtherMonths=params.showOthers;cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;if(params.ifFormat){cal.setDateFormat(params.ifFormat);}if(params.inputField&&typeof params.inputField.value=="string"){cal.parseDate(params.inputField.value);}cal.create(params.flat);cal.show();return false;}var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){var dateEl=params.inputField||params.displayArea;var dateFmt=params.inputField?params.ifFormat:params.daFormat;var mustCreate=false;var cal=window.calendar;if(dateEl)params.date=Date.parseDate(dateEl.value||dateEl.innerHTML,dateFmt);if(!(cal&¶ms.cache)){window.calendar=cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect,params.onClose||function(cal){cal.hide();});cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.weekNumbers=params.weekNumbers;mustCreate=true;}else{if(params.date)cal.setDate(params.date);cal.hide();}if(params.multiple){cal.multiple={};for(var i=params.multiple.length;--i>=0;){var d=params.multiple[i];var ds=d.print("%Y%m%d");cal.multiple[ds]=d;}}cal.showsOtherMonths=params.showOthers;cal.yearStep=params.step;cal.setRange(params.range[0],params.range[1]);cal.params=params;cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;cal.setDateFormat(dateFmt);if(mustCreate)cal.create();cal.refresh();if(!params.position)cal.showAtElement(params.button||params.displayArea||params.inputField,params.align);else cal.showAt(params.position[0],params.position[1]);return false;};return cal;};python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/calendar-blue.css0000644000175000017500000001135511217014131026764 0ustar zackzack/* The main calendar widget. DIV containing a table. */ div.calendar { position: relative; } .calendar, .calendar table { border: 1px solid #556; font-size: 11px; color: #000; cursor: default; background: #eef; font-family: tahoma,verdana,sans-serif; z-index: 99; } /* Header part -- contains navigation buttons and day names. */ .calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ text-align: center; /* They are the navigation buttons */ padding: 2px; /* Make the buttons seem like they're pressing */ } .calendar .nav { background: #778 url(menuarrow.gif) no-repeat 100% 100%; } .calendar thead .title { /* This holds the current "month, year" */ font-weight: bold; /* Pressing it will take you to the current date */ text-align: center; background: #fff; color: #000; padding: 2px; } .calendar thead .headrow { /* Row containing navigation buttons */ background: #778; color: #fff; } .calendar thead .daynames { /* Row containing the day names */ background: #bdf; } .calendar thead .name { /* Cells containing the day names */ border-bottom: 1px solid #556; padding: 2px; text-align: center; color: #000; } .calendar thead .weekend { /* How a weekend day name shows in header */ color: #a66; } .calendar thead .hilite { /* How do the buttons in header appear when hover */ background-color: #aaf; color: #000; border: 1px solid #04f; padding: 1px; } .calendar thead .active { /* Active (pressed) buttons in header */ background-color: #77c; padding: 2px 0px 0px 2px; } /* The body part -- contains all the days in month. */ .calendar tbody .day { /* Cells containing month days dates */ width: 2em; color: #456; text-align: right; padding: 2px 4px 2px 2px; } .calendar tbody .day.othermonth { font-size: 80%; color: #bbb; } .calendar tbody .day.othermonth.oweekend { color: #fbb; } .calendar table .wn { padding: 2px 3px 2px 2px; border-right: 1px solid #000; background: #bdf; } .calendar tbody .rowhilite td { background: #def; } .calendar tbody .rowhilite td.wn { background: #eef; } .calendar tbody td.hilite { /* Hovered cells */ background: #def; padding: 1px 3px 1px 1px; border: 1px solid #bbb; } .calendar tbody td.active { /* Active (pressed) cells */ background: #cde; padding: 2px 2px 0px 2px; } .calendar tbody td.selected { /* Cell showing today date */ font-weight: bold; border: 1px solid #000; padding: 1px 3px 1px 1px; background: #fff; color: #000; } .calendar tbody td.weekend { /* Cells showing weekend days */ color: #a66; } .calendar tbody td.today { /* Cell showing selected date */ font-weight: bold; color: #00f; } .calendar tbody .disabled { color: #999; } .calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ visibility: hidden; } .calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ display: none; } /* The footer part -- status bar and "Close" button */ .calendar tfoot .footrow { /* The in footer (only one right now) */ text-align: center; background: #556; color: #fff; } .calendar tfoot .ttip { /* Tooltip (status bar) cell */ background: #fff; color: #445; border-top: 1px solid #556; padding: 1px; } .calendar tfoot .hilite { /* Hover style for buttons in footer */ background: #aaf; border: 1px solid #04f; color: #000; padding: 1px; } .calendar tfoot .active { /* Active (pressed) style for buttons in footer */ background: #77c; padding: 2px 0px 0px 2px; } /* Combo boxes (menus that display months/years for direct selection) */ .calendar .combo { position: absolute; display: none; top: 0px; left: 0px; width: 4em; cursor: default; border: 1px solid #655; background: #def; color: #000; font-size: 90%; z-index: 100; } .calendar .combo .label, .calendar .combo .label-IEfix { text-align: center; padding: 1px; } .calendar .combo .label-IEfix { width: 4em; } .calendar .combo .hilite { background: #acf; } .calendar .combo .active { border-top: 1px solid #46a; border-bottom: 1px solid #46a; background: #eef; font-weight: bold; } .calendar td.time { border-top: 1px solid #000; padding: 1px 0px; text-align: center; background-color: #f4f0e8; } .calendar td.time .hour, .calendar td.time .minute, .calendar td.time .ampm { padding: 0px 3px 0px 4px; border: 1px solid #889; font-weight: bold; background-color: #fff; } .calendar td.time .ampm { text-align: center; } .calendar td.time .colon { padding: 0px 2px 0px 3px; font-weight: bold; } .calendar td.time span.hilite { border-color: #000; background-color: #667; color: #fff; } .calendar td.time span.active { border-color: #f00; background-color: #000; color: #0f0; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/calendar/menuarrow2.gif0000644000175000017500000000006111120001754026334 0ustar zackzackGIF89a€BBBÿÿÿ!ù,„yÉÀc;python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/static/grid.css0000755000175000017500000000167311120001754023447 0ustar zackzack.grid { background-color:#e3e3e3;font-size:12px;font-family:verdana,sans-serif;border:none;width:100%;} .grid td, .grid th {padding:3px;border:none;} .grid .action_cell { text-align:right; } .grid THEAD { text-align:left;background-color:#f0f0f0;color:#333;} .grid .heading img { float:right;margin-left:2px;margin-right:3px; } .grid .heading a { text-decoration:none;color:#333; } .grid td a { text-decoration:none;color:#333} .grid .odd{background-color:#edf3fe} .grid .even{background-color:#fff} .grid .pointer {cursor:pointer} .grid .column_chooser_link {position:relative;background-color:#e3e3e3;} .grid .column_chooser_link ul {position:absolute;display:none;top:0px;right:-20px;} .grid .column_chooser_list a {width:200px;display:block;padding:3px;background-color:#e3e3e3;} .grid .column_chooser_list a:hover {background-color:#cdcdcd;} .grid .column_chooser_list { padding:0;margin:0;list-style:none;background-color:#e3e3e3; } python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/core.py0000644000175000017500000004577611211303305022032 0ustar zackzackimport re import logging from inspect import isclass from copy import copy from itertools import ifilter from formencode import Invalid, FancyValidator from formencode.schema import Schema from formencode.foreach import ForEach from formencode.variabledecode import NestedVariables, variable_decode from tw.api import (Widget, WidgetRepeater, RequestLocalDescriptor, RepeatedWidget, RepeatingWidgetBunch) from tw.core.base import only_if_initialized, Child __all__ = ["InputWidget", "InputWidgetRepeater", "merge_schemas"] log = logging.getLogger(__name__) class DefaultValidator(FancyValidator): pass #------------------------------------------------------------------------------ # Base class for all widgets that can generate input for the app #------------------------------------------------------------------------------ valid_name = re.compile(r'^[\w\_\:]*$').match class InputWidget(Widget): params = dict( name = "Name for this input Widget. This is the name of the variable "\ "that will reach the controller. This parameter can only be "\ "set during widget initialization", strip_name = "If this flag is True then "\ "the name of this widget will not be included in the "\ "fully-qualified names of the widgets in this subtree. "\ "This is useful to 'flatten-out' nested structures. "\ "This parameter can only be set during initialization." ) validator = DefaultValidator # If this is True, validator's which are Schema subclasses/instances will # be called to adjust value with from_python. # This is off by default because it's usually not the desired behavior # since Schemas usually call their subvalidators' from_python recursively # and that will convert the whole form causing errors when the widgets' # children try to adjust the value themselves. Activate only if you know # what you're doing. force_conversion = False strip_name = False def __new__(cls, id=None, parent=None, children=[], **kw): obj = super(InputWidget, cls).__new__(cls, id, parent, children, **kw) obj._name = kw.pop('name', id) if obj._name and not valid_name(obj._name): raise ValueError("%s is not a valid name for an InputWidget" % obj._name) return obj @only_if_initialized def _as_repeated(self, *args, **kw): cls = self.__class__ new_name = 'Repeated'+cls.__name__ new_class = type(new_name, (RepeatedInputWidget, cls), {}) log.debug("Generating %r for repeating %r", new_class, self) return Child( new_class, self._id, children=self.children, **self.orig_kw )(*args, **kw) @property def name_path_elem(self): if self.strip_name: return None else: return self._name def _full_name(self): return '.'.join(reversed([w.name_path_elem for w in self.path if getattr(w, 'name_path_elem', None)])) or None name = property(_full_name) error_at_request = RequestLocalDescriptor('error', __doc__ = """Validation error for current request.""", default = None, qualify_with_id=True, ) value_at_request = RequestLocalDescriptor('value', __doc__ = """Value being validated in current request.""", default = None, qualify_with_id=True, ) def adapt_value(self, value): value = super(InputWidget, self).adapt_value(value) if value == '': # This is needed when an ancestor's Schema has converted blank input # for us into a blank string. value = None # Work around formencode.schema.Schema which doesn't # run UnicodeString sub-validators on encoded strings when # validation fails. This causes Genshi to choke when redisplaying # a failed form. elif isinstance(value, str): if getattr(self.validator, 'inputEncoding', None) \ and isinstance(self.validator.inputEncoding, str): value = unicode(value, self.validator.inputEncoding) elif getattr(self.validator, 'encoding', None) \ and isinstance(self.validator.encoding, str): value = unicode(value, self.validator.encoding) return value #XXX: use_request_local should default to False but that needs patching # TG 1.0. If implementing this for the first time do not depend on this # default and provide it explicitly so your code won't break when this # changes. def validate(self, value, state=None, use_request_local=True): """Validate value using validator if widget has one. If validation fails a formencode.Invalid exception will be raised. If ``use_request_local`` is True and validation fails the exception and value will be placed at request local storage so if the widget is redisplayed in the same request ``error`` and ``value`` don't have to be passed explicitly to ``display``. """ if self.validator: try: value = self.validator.to_python(value, state) except Invalid, error: if use_request_local: self.error_at_request = error # Check for 'items' to support MultiDicts et al. if hasattr(value, 'items'): value = variable_decode(value) self.value_at_request = value raise return value def adjust_value(self,value, validator=None): """ Adjusts the python value sent to :meth:`InputWidget.display` with the validator so it can be rendered in the template. """ validator = validator or self.validator if validator and ((not isinstance(self.validator, Schema)) or self.force_conversion): # Does not adjust_value with Schema because it will recursively # call from_python on all sub-validators and that will send # strings through their update_params methods which expect # python values. adjust_value is called just before sending the # value to the template, not before. # This behaviour can be overriden with the force_conversion flag try: value = validator.from_python(value) except Invalid: # Ignore conversion errors so bad-input is redisplayed # properly pass if value is None: # A None will skip renderingthe value attribute altogether in # Genshi templates and that's not what we want. Worse still, # String templates will render a "None", yuck! Convert it # into an empty string if the validator hasn't done it already. value = "" return value def safe_validate(self, value): """Tries to coerce the value to python using the validator. If validation fails the original value will be returned unmodified.""" try: value = self.validate(value, use_request_local=False) except Exception: pass return value @property def children_deep(self): out = [] for c in self.children: if getattr(c, 'strip_name', False): out += c.children_deep else: out.append(c) return out def prepare_dict(self, value, kw, adapt=True): """ Prepares the dict sent to the template with functions to access the children's errors if any. """ if value is None: value = self.get_default() if adapt: value = self.adapt_value(value) if self.is_root: error = kw.setdefault('error', self.error_at_request) else: error = kw.setdefault('error', None) if error: if self.children: self.propagate_errors(kw, error) if self.is_root: value_at_request = self.value_at_request if isinstance(value, dict) and isinstance(value_at_request, dict): value.update(value_at_request) else: value = value_at_request if not isinstance(self.validator, (ForEach,Schema)): # Need to coerce value in case the form is being redisplayed with # uncoereced value so update_params always deals with python # values. Skip this step if validator will recursively validate # because that step will be handled by child widgets. value = self.safe_validate(value) # Propagate values to grand-children with a name stripping parent for c in self.children: if getattr(c, 'strip_name', False): for subc in c.children_deep: if hasattr(subc, '_name'): try: v = value.pop(subc._name) except KeyError: pass else: value.setdefault(c._name, {})[subc._name] = v kw['error_for'] = self._get_child_error_getter(kw['error']) kw = super(InputWidget, self).prepare_dict(value, kw, adapt=False) kw['field_for'] = _field_getter(self.c) # Provide backwards compat. for display_field_for. should deprecate kw['display_field_for'] = kw['display_child'] # Adjust the value with the validator if present and the form is not # being redisplayed because of errors *just before* sending it to the # template. if not error: kw['value'] = self.adjust_value(kw['value']) # Rebind these getters with the adjusted value kw['value_for'] = self._get_child_value_getter(kw.get('value')) # Provide a shortcut to display a child field in the template kw['display_child'] = self._child_displayer(self.children, kw['value_for'], kw['args_for']) return kw def update_params(self, d): super(InputWidget, self).update_params(d) if d.error: d.css_classes.append("has_error") def propagate_errors(self, parent_kw, parent_error): child_args = parent_kw.setdefault('child_args',{}) if parent_error.error_dict: if self.strip_name: for c in self.children: for subc in c.children: if hasattr(subc, '_name'): try: e = parent_error.error_dict.pop(subc._name) except KeyError: continue if c._name not in parent_error.error_dict: inv = Invalid("some error", {}, e.state, error_dict={}) parent_error.error_dict[c._name] = inv child_errors = parent_error.error_dict[c._name].error_dict child_errors[subc._name] = e for k,v in parent_error.error_dict.iteritems(): child_args.setdefault(k, {})['error'] = v def _get_child_error_getter(self, error): def error_getter(child_id): try: if error and error.error_list: if (isinstance(child_id, Widget) and hasattr(child_id, 'repetition') ): child_id = child_id.repetition return error.error_list[child_id] elif error and error.error_dict: if isinstance(child_id, Widget): child_id = child_id._id return error.error_dict[child_id] except (IndexError,KeyError): pass return None return error_getter def post_init(self, *args, **kw): """ Takes care of post-initialization of InputWidgets. """ self.generate_schema() def generate_schema(self): """ If the widget has children this method generates a `Schema` to validate including the validators from all children once these are all known. """ if _has_child_validators(self) and not isinstance(self, WidgetRepeater): if isinstance(self.validator, Schema): log.debug("Extending Schema for %r", self) self.validator = _update_schema(_copy_schema(self.validator), self.children) elif isclass(self.validator) and issubclass(self.validator, Schema): log.debug("Instantiating Schema class for %r", self) self.validator = _update_schema(self.validator(), self.children) elif self.validator is DefaultValidator: self.validator = _update_schema(Schema(), self.children) if self.is_root and hasattr(self.validator, 'pre_validators'): #XXX: Maybe add VariableDecoder to every Schema?? log.debug("Appending decoder to %r", self) self.validator.pre_validators.insert(0, VariableDecoder) for c in self.children: if c.strip_name: v = self.validator.fields.pop(c._id) merge_schemas(self.validator, v, True) class InputWidgetRepeater(WidgetRepeater, InputWidget): name_path_elem = None def propagate_errors(self, parent_kw, parent_error): child_args = parent_kw.setdefault('child_args',[]) # The error we get at this point doesn't have an error_list, it's # buried a few levels deep, so recurse until we find it, or at least # until we've inspected it all. if parent_error.error_dict and not parent_error.error_list: for k, v in parent_error.error_dict.iteritems(): self.propagate_errors(parent_kw, v) return if parent_error.error_list: for i,e in enumerate(parent_error.error_list): try: child_args[i]['error'] = e except IndexError: child_args.append({'error':e}) def post_init(self, *args, **kw): if self.validator is DefaultValidator and _has_child_validators(self): log.debug("Generating a ForEach validator for %r", self) self.validator = ForEach(self.children[0].validator) def adjust_value(self, value, validator=None): # no-op as value will be adjusted by repeated widgets return value class RepeatedInputWidget(RepeatedWidget): _label_text = None @property def name_path_elem(self): return "%s-%d" % (self._name, self.repetition or 0) def set_label_text(self, val): # jtate- I'm not really proud of this, I'd much rather pass a template # in, but since the only parameter sent from the repeater to the # repeated widget on instantiation is the repetition count, this will # have to do for now rep = self.repetition or 0 label = val.replace(str(rep), '#%d' % (rep+1)) self._label_text = label return self._label_text def get_label_text(self): # self.__dict__ can have a label_text set, via Widget.__new__ kw args, # but the property is not used to set it, sync it on first access #if self._label_text is None: # if self.__dict__.get('label_text') is not None: # self._label_text = self.__dict__.pop('label_text') return self._label_text label_text = property(get_label_text, set_label_text) #------------------------------------------------------------------------------ # Automatic validator generation functions. #------------------------------------------------------------------------------ def _has_validator(w): try: return w.validator is not None except AttributeError: return False def _has_child_validators(widget): for w in widget.children: if _has_validator(w): return True return False def _copy_schema(schema): """ Does a deep copy of a Schema instance """ new_schema = copy(schema) new_schema.pre_validators = copy(schema.pre_validators) new_schema.chained_validators = copy(schema.chained_validators) new_schema.order = copy(schema.order) fields = {} for k, v in schema.fields.iteritems(): if isinstance(v, Schema): v = _copy_schema(v) fields[k] = v new_schema.fields = fields return new_schema def _update_schema(schema, children): """ Extends a Schema with validators from children. Does not clobber the ones declared in the Schema. """ for w in ifilter(_has_validator, children): _add_field_to_schema(schema, w._name, w.validator) return schema def _add_field_to_schema(schema, name, validator): """ Adds a validator if any to the given schema """ if validator is not None: if isinstance(validator, Schema): # Schema instance, might need to merge 'em... if name in schema.fields: assert (isinstance(schema.fields[name], Schema), "Validator for '%s' should be a Schema subclass" % name) validator = merge_schemas(schema.fields[name], validator) schema.add_field(name, validator) elif _can_add_field(schema, name): # Non-schema validator, add it if we can... schema.add_field(name, validator) elif _can_add_field(schema, name): schema.add_field(name, DefaultValidator) def _can_add_field(schema, field_name): """ Checks if we can safely add a field. Makes sure we're not overriding any field in the Schema. DefaultValidators are ok to override. """ current_field = schema.fields.get(field_name) return bool(current_field is None or isinstance(current_field, DefaultValidator)) def merge_schemas(to_schema, from_schema, inplace=False): """ Recursively merges from_schema into to_schema taking care of leaving to_schema intact if inplace is False (default). """ if not inplace: to_schema = _copy_schema(to_schema) # Recursively merge child schemas is_schema = lambda f: isinstance(f[1], Schema) seen = set() for k, v in ifilter(is_schema, to_schema.fields.iteritems()): seen.add(k) from_field = from_schema.fields.get(k) if from_field: v = merge_schemas(v, from_field) to_schema.add_field(k, v) # Add remaining fields if we can can_add = lambda f: f[0] not in seen and _can_add_field(to_schema, f[0]) for field in ifilter(can_add, from_schema.fields.iteritems()): to_schema.add_field(*field) return to_schema class VariableDecoder(NestedVariables): pass def _field_getter(children): return lambda name: children[name] python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/datagrid.py0000644000175000017500000001171611203064545022657 0ustar zackzack"""Generic widget to present and manipulate data in a grid (tabular) form. Adapted from turbogears.widgets.datagrid """ from tw.api import Widget, CSSLink NoDefault = object() __all__ = ["DataGrid"] class attrwrapper(object): """Helper class that returns an object's attribute when called. This allows to access 'dynamic' attributes (properties) as well as simple static ones, and also allows nested access. """ def __init__(self, name): assert isinstance(name, basestring) self.name = name def __call__(self, obj): for name in self.name.split('.'): obj = getattr(obj, name) return obj class Column(object): """Simple struct that describes a single DataGrid column. Column has: - a name, which allows to uniquely identify a column in a DataGrid - a getter, which is used to extract the field's value - a title, which is displayed in the table's header - options, which is a way to carry arbitrary user-defined data """ def __init__(self, name, getter=None, title=None, options=None): if not name: raise ValueError, 'name is required' if getter: if callable(getter): self.getter = getter else: # assume it's an attribute name self.getter = attrwrapper(getter) else: self.getter = attrwrapper(name) self.name = name self.title = title is None and name.capitalize() or title self.options = options or {} def get_option(self, name, default=NoDefault): if name in self.options: return self.options[name] if default is NoDefault: # no such key and no default is given raise KeyError(name) return default def get_field(self, row, displays_on=None): if isinstance(self.getter, Widget): return self.getter(row, displays_on=displays_on) return self.getter(row) def __str__(self): return "" % self.name class DataGrid(Widget): """Generic widget to present and manipulate data in a grid (tabular) form. The columns to build the grid from are specified with fields constructor argument which is a list. An element can be a Column, an accessor (attribute name or function), a tuple (title, accessor) or a tuple (title, accessor, options). You can specify columns' data statically, via fields constructor parameter, or dynamically, via 'fields' key. """ css_class = "grid" css=[CSSLink(modname='tw.forms', filename='static/grid.css')] template = "tw.forms.templates.datagrid" engine_name = "genshi" fields = [] params = ["fields"] def get_column(self, name): """Return Column with specified name. Raises KeyError if no such column exists. """ for col in self.columns: if col.name == name: return col raise KeyError(name) def __getitem__(self, name): """Shortcut to get_column.""" return self.get_column(name) @staticmethod def get_field_getter(columns): """Return a function to access the fields of table by row, col.""" idx = {} # index columns by name for col in columns: idx[col.name] = col def _get_field(row, col): return idx[col].get_field(row) return _get_field def update_params(self, d): super(DataGrid, self).update_params(d) if d.get('fields'): fields = d.pop('fields') columns = self._parse(fields) else: columns = self.columns[:] d['columns'] = columns d['get_field'] = self.get_field_getter(columns) # this is for backward compatibility d['headers'] = [col.title for col in columns] d['collist'] = [col.name for col in columns] def _parse(self, fields): """Parse field specifications into a list of Columns. A specification can be a Column, an accessor (attribute name or function), a tuple (title, accessor) or a tuple (title, accessor, options). """ columns = [] names = {} # keep track of names to ensure there are no dups for n, col in enumerate(fields): if not isinstance(col, Column): if isinstance(col, str) or callable(col): name_or_f = col title = options = None else: title, name_or_f = col[:2] try: options = col[2] except IndexError: options = None # construct name using column index name = 'column-' + str(n) col = Column(name, name_or_f, title, options) if col.name in names: raise ValueError('Duplicate column name: %s' % col.name) columns.append(col) names[col.name] = 1 return columns python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw/forms/samples.py0000644000175000017500000001101411120001754022522 0ustar zackzackfrom tw.api import WidgetsList, CSSSource, JSSource, js_function from tw.forms import * from tw.forms.validators import * from formencode.national import USPostalCode as PostalCode, \ USStateProvince as StateProvince __all__ = ["AddUserForm"] # Lil' chunk o' CSS for tasty eye-candy ;) # External css files can be wrapped with CSSLink css = CSSSource(""" label.required, .fielderror { font-weight: bold; color: red; }; """) # We define the source for some JS functions we're going to interface # External js files can be wrapped with JSLink functions = JSSource(""" var focus_element = function (elem) { var elem = document.getElementById(elem); elem.focus(); elem.select(); }; """, ) alert = js_function('alert') focus_element = js_function('focus_element') # This is needed because of the way TurboGears validates as it adds # spurious variables to the value being validated. class FilteringSchema(Schema): filter_extra_fields = True allow_extra_fields = True # Now the form widgets.... class AddressFieldset(ListFieldSet): class fields(WidgetsList): street = TextField(validator=UnicodeString) number = TextField(validator=Int, size=4) zip_code = TextField(validator=PostalCode()) state = TextField(default='NY',validator=StateProvince()) validator = FilteringSchema class AddUserForm(ListForm): class fields(WidgetsList): id = HiddenField(default="I'm hidden!") name = TextField( validator = UnicodeString(not_empty=True), default = "Your name here" ) gender = RadioButtonList( options = "Male Female".split(), ) age = SingleSelectField( validator = Int, options = range(100) ) email = TextField( validator = Email() ) date = CalendarDateTimePicker() roles = CheckBoxList( options = "Manager Admin Editor User".split(), ) groups = MultipleSelectField( options = "Group1 Group2 Group3".split(), ) password = PasswordField( validator = String(not_empty=True), max_size = 10 ) password_confirm = PasswordField( validator = String(not_empty=True), max_size=10 ) # We wrap the address fieldset with a FormFieldRepeater to handle # repetitions. This can be done with *any* FormField. address = FormFieldRepeater( widget = AddressFieldset(), repetitions = 2, max_repetitions = 5 ) # allow adding js calls dynamically for a request include_dynamic_js_calls = True css = [css] javascript = [functions] validator = FilteringSchema( chained_validators = [FieldsMatch('password','password_confirm')], ) def update_params(self, d): super(AddUserForm, self).update_params(d) # Focus and select the 'name' field on the form # The adapter we just wrote lets us pass formfields as parameters and # the right thing will be done. if not d.error: self.add_call(focus_element(d.c.name)) else: self.add_call( alert('The form contains invalid data\n%s'% unicode(d.error)) ) class DemoSingleSelect(SingleSelectField): options = [ "Python", "Haskell", "Java", "Ruby", "Erlang", "Javascript" ] class DemoMultipleSelect(MultipleSelectField): options = [ "Python", "Haskell", "Java", "Ruby", "Erlang", "Javascript" ] class DemoCheckBoxList(CheckBoxList): options = [ "Python", "Haskell", "Java", "Ruby", "Erlang", "Javascript" ] class DemoRadioButtonList(RadioButtonList): options = [ "Python", "Haskell", "Java", "Ruby", "Erlang", "Javascript" ] class DemoCheckBoxTable(CheckBoxTable): num_cols = 2 options = [ "Python", "Haskell", "Java", "Ruby", "Erlang", "Javascript" ] class Person(object): def __init__(self, name, age): self.__dict__.update(locals()) class DemoDataGrid(DataGrid): fields = [("Name", "name"), ("Age","age")] default = [ Person('Lucy', 29), Person('Peter', 15), Person('Tiffany', 17), ] python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw.forms.egg-info/0000755000175000017500000000000011224440166022211 5ustar zackzackpython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw.forms.egg-info/requires.txt0000644000175000017500000000012011224440165024601 0ustar zackzackToscaWidgets >= 0.9.7.2 FormEncode >= 1.1 [mako] Mako [genshi] Genshi >= 0.3.6python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw.forms.egg-info/namespace_packages.txt0000644000175000017500000000000311224440165026534 0ustar zackzacktw python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw.forms.egg-info/dependency_links.txt0000644000175000017500000000000111224440165026256 0ustar zackzack python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw.forms.egg-info/PKG-INFO0000644000175000017500000000135311224440165023307 0ustar zackzackMetadata-Version: 1.0 Name: tw.forms Version: 0.9.7.2 Summary: Web Widgets for building and validating forms. (former ToscaWidgetsForms) Home-page: http://toscawidgets.org Author: Alberto Valverde Gonzalez Author-email: alberto@toscat.net License: MIT Download-URL: http://toscawidgets.org/download Description: UNKNOWN Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Environment :: Web Environment Classifier: Environment :: Web Environment :: ToscaWidgets Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Software Development :: Widget Sets Classifier: Intended Audience :: Developers Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw.forms.egg-info/entry_points.txt0000644000175000017500000000012611224440165025505 0ustar zackzack [toscawidgets.widgets] widgets = tw.forms samples = tw.forms.samples python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw.forms.egg-info/top_level.txt0000644000175000017500000000000311224440165024733 0ustar zackzacktw python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw.forms.egg-info/not-zip-safe0000644000175000017500000000000111120001766024431 0ustar zackzack python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/tw.forms.egg-info/SOURCES.txt0000644000175000017500000001204711224440166024101 0ustar zackzackMANIFEST.in setup.cfg setup.py tw/__init__.py tw.forms.egg-info/PKG-INFO tw.forms.egg-info/SOURCES.txt tw.forms.egg-info/dependency_links.txt tw.forms.egg-info/entry_points.txt tw.forms.egg-info/namespace_packages.txt tw.forms.egg-info/not-zip-safe tw.forms.egg-info/requires.txt tw.forms.egg-info/top_level.txt tw/forms/__init__.py tw/forms/calendars.py tw/forms/core.py tw/forms/datagrid.py tw/forms/fields.py tw/forms/release.py tw/forms/samples.py tw/forms/validators.py tw/forms/static/grid.css tw/forms/static/calendar/calendar-blue.css tw/forms/static/calendar/calendar-blue2.css tw/forms/static/calendar/calendar-brown.css tw/forms/static/calendar/calendar-green.css tw/forms/static/calendar/calendar-setup.js tw/forms/static/calendar/calendar-system.css tw/forms/static/calendar/calendar-tas.css tw/forms/static/calendar/calendar-win2k-1.css tw/forms/static/calendar/calendar-win2k-2.css tw/forms/static/calendar/calendar-win2k-cold-1.css tw/forms/static/calendar/calendar-win2k-cold-2.css tw/forms/static/calendar/calendar.js tw/forms/static/calendar/menuarrow.gif tw/forms/static/calendar/menuarrow2.gif tw/forms/static/calendar/lang/calendar-af.js tw/forms/static/calendar/lang/calendar-bg-cp1251.js tw/forms/static/calendar/lang/calendar-bg.js tw/forms/static/calendar/lang/calendar-ca.js tw/forms/static/calendar/lang/calendar-cs-cp1250.js tw/forms/static/calendar/lang/calendar-cs.js tw/forms/static/calendar/lang/calendar-da.js tw/forms/static/calendar/lang/calendar-de.js tw/forms/static/calendar/lang/calendar-de_at.js tw/forms/static/calendar/lang/calendar-de_de.js tw/forms/static/calendar/lang/calendar-el.js tw/forms/static/calendar/lang/calendar-en.js tw/forms/static/calendar/lang/calendar-es.js tw/forms/static/calendar/lang/calendar-fi.js tw/forms/static/calendar/lang/calendar-fr.js tw/forms/static/calendar/lang/calendar-he.js tw/forms/static/calendar/lang/calendar-hr.js tw/forms/static/calendar/lang/calendar-hu-cp1252.js tw/forms/static/calendar/lang/calendar-hu.js tw/forms/static/calendar/lang/calendar-it.js tw/forms/static/calendar/lang/calendar-ja.js tw/forms/static/calendar/lang/calendar-ko-euc_kr.js tw/forms/static/calendar/lang/calendar-ko.js tw/forms/static/calendar/lang/calendar-lt.js tw/forms/static/calendar/lang/calendar-lv-cp1252.js tw/forms/static/calendar/lang/calendar-lv.js tw/forms/static/calendar/lang/calendar-nl.js tw/forms/static/calendar/lang/calendar-no.js tw/forms/static/calendar/lang/calendar-pl.js tw/forms/static/calendar/lang/calendar-pt_br.js tw/forms/static/calendar/lang/calendar-ro-cp1250.js tw/forms/static/calendar/lang/calendar-ro.js tw/forms/static/calendar/lang/calendar-ru-cp1251.js tw/forms/static/calendar/lang/calendar-ru-koi8_r.js tw/forms/static/calendar/lang/calendar-ru.js tw/forms/static/calendar/lang/calendar-sk.js tw/forms/static/calendar/lang/calendar-sl.js tw/forms/static/calendar/lang/calendar-sq.js tw/forms/static/calendar/lang/calendar-sv.js tw/forms/static/calendar/lang/calendar-tr-cp1254.js tw/forms/static/calendar/lang/calendar-tr.js tw/forms/static/calendar/lang/calendar-uk-cp1251.js tw/forms/static/calendar/lang/calendar-uk-koi8_u.js tw/forms/static/calendar/lang/calendar-uk.js tw/forms/static/calendar/lang/calendar-zh.js tw/forms/static/calendar/lang/calendar-zh_cn-gbk.js tw/forms/static/calendar/lang/calendar-zh_cn.js tw/forms/static/calendar/lang/calendar-zh_tw-big5.js tw/forms/static/calendar/lang/calendar-zh_tw.js tw/forms/static/calendar/skins/aqua/active-bg.gif tw/forms/static/calendar/skins/aqua/dark-bg.gif tw/forms/static/calendar/skins/aqua/hover-bg.gif tw/forms/static/calendar/skins/aqua/menuarrow.gif tw/forms/static/calendar/skins/aqua/normal-bg.gif tw/forms/static/calendar/skins/aqua/rowhover-bg.gif tw/forms/static/calendar/skins/aqua/status-bg.gif tw/forms/static/calendar/skins/aqua/theme.css tw/forms/static/calendar/skins/aqua/title-bg.gif tw/forms/static/calendar/skins/aqua/today-bg.gif tw/forms/templates/__init__.py tw/forms/templates/__init__.pyc tw/forms/templates/calendar.html tw/forms/templates/calendar.mak tw/forms/templates/check_box_table.html tw/forms/templates/check_box_table.mak tw/forms/templates/datagrid.html tw/forms/templates/datagrid.mak tw/forms/templates/fieldset.html tw/forms/templates/fieldset.mak tw/forms/templates/form.html tw/forms/templates/form.mak tw/forms/templates/input_field.html tw/forms/templates/input_field.mak tw/forms/templates/label.html tw/forms/templates/label.mak tw/forms/templates/label_hidden.html tw/forms/templates/label_hidden.mak tw/forms/templates/list_fieldset.html tw/forms/templates/list_fieldset.mak tw/forms/templates/list_form.html tw/forms/templates/list_form.mak tw/forms/templates/select_field.html tw/forms/templates/select_field.mak tw/forms/templates/selection_list.html tw/forms/templates/selection_list.mak tw/forms/templates/spacer.html tw/forms/templates/spacer.mak tw/forms/templates/table_fieldset.html tw/forms/templates/table_fieldset.mak tw/forms/templates/table_form.html tw/forms/templates/table_form.html.orig tw/forms/templates/table_form.mak tw/forms/templates/table_form.mak.orig tw/forms/templates/textarea.html tw/forms/templates/textarea.makpython-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/MANIFEST.in0000644000175000017500000000011311120001754020460 0ustar zackzackrecursive-include tw/forms/templates * recursive-include tw/forms/static * python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/setup.py0000644000175000017500000000276011224437744020467 0ustar zackzack#!/usr/bin/env python2.4 """Setuptools setup file""" import sys, os from setuptools import setup, find_packages if sys.version_info < (2, 4): raise SystemExit("Python 2.4 or later is required ATM") execfile(os.path.join("tw", "forms", "release.py")) setup( name=__PACKAGE_NAME__, version=__VERSION__, description="Web Widgets for building and validating forms. (former ToscaWidgetsForms)", #long_description = "", install_requires=[ 'ToscaWidgets >= 0.9.7.2', 'FormEncode >= 1.1', ], extras_require = dict( mako = ['Mako'], genshi = ['Genshi >= 0.3.6'], ), url = "http://toscawidgets.org", download_url = "http://toscawidgets.org/download", author=__AUTHOR__, author_email=__EMAIL__, license=__LICENSE__, test_suite = 'tests', packages=find_packages(exclude=['ez_setup', 'tests']), namespace_packages = ['tw'], include_package_data=True, zip_safe=False, entry_points=""" [toscawidgets.widgets] widgets = tw.forms samples = tw.forms.samples """, classifiers = [ 'Development Status :: 4 - Beta', 'Environment :: Web Environment', 'Environment :: Web Environment :: ToscaWidgets', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Widget Sets', 'Intended Audience :: Developers', 'Operating System :: OS Independent', 'Programming Language :: Python', ], ) python-toscawidgets-0.9.7.2/tw.forms-0.9.7.2/setup.cfg0000644000175000017500000000027211224440166020562 0ustar zackzack[archive_tw_resources] compresslevel = 2 distributions = tw.forms output = build/static [egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 [aliases] release = egg_info -rDb "" python-toscawidgets-0.9.7.2/tw.forms0000777000175000017500000000000011230574134020441 2tw.forms-0.9.7.2/ustar zackzack