From 970ffb5096e774c018da336a80a5e1a427b92778 Mon Sep 17 00:00:00 2001 From: Brandon King Date: Thu, 12 Mar 2009 23:17:37 +0000 Subject: [PATCH] Import of sampletracker.bzr revno 42! What a great revision number to migrate to svn on! Apparently the question of life is "What revision number should I migrate to svn on?" Maybe not. --- README | 7 + samplebc/__init__.py | 0 samplebc/bcmagic/__init__.py | 0 samplebc/bcmagic/admin.py | 7 + samplebc/bcmagic/forms.py | 8 + samplebc/bcmagic/models.py | 9 + samplebc/bcmagic/urls.py | 7 + samplebc/bcmagic/views.py | 117 + samplebc/manage.py | 11 + samplebc/samples/__init__.py | 0 samplebc/samples/admin.py | 24 + samplebc/samples/containers.py | 34 + samplebc/samples/errors.py | 8 + samplebc/samples/forms.py | 37 + samplebc/samples/models.py | 80 + samplebc/samples/urls.py | 34 + samplebc/samples/util.py | 36 + samplebc/samples/views.py | 606 ++ samplebc/settings.py | 92 + samplebc/urls.py | 24 + templates/app.html | 53 + templates/bcmagic.html | 10 + templates/container_index.html | 23 + templates/container_summary.html | 21 + templates/freezer_index.html | 19 + templates/freezer_summary.html | 36 + templates/generic_form.html | 5 + templates/half_inch_samples.txt | 58 + templates/magic.html | 3 + templates/sample_homeless.html | 21 + templates/sample_index.html | 29 + templates/sample_summary.html | 21 + www/bcmagic.html | 14 + www/css/app.css | 25 + www/js/i18n/jquery.ui.i18n.all.js | 724 ++ www/js/i18n/ui.datepicker-ar.js | 20 + www/js/i18n/ui.datepicker-bg.js | 20 + www/js/i18n/ui.datepicker-ca.js | 19 + www/js/i18n/ui.datepicker-cs.js | 19 + www/js/i18n/ui.datepicker-da.js | 19 + www/js/i18n/ui.datepicker-de.js | 19 + www/js/i18n/ui.datepicker-el.js | 19 + www/js/i18n/ui.datepicker-eo.js | 19 + www/js/i18n/ui.datepicker-es.js | 19 + www/js/i18n/ui.datepicker-fa.js | 19 + www/js/i18n/ui.datepicker-fi.js | 19 + www/js/i18n/ui.datepicker-fr.js | 19 + www/js/i18n/ui.datepicker-he.js | 19 + www/js/i18n/ui.datepicker-hr.js | 19 + www/js/i18n/ui.datepicker-hu.js | 19 + www/js/i18n/ui.datepicker-hy.js | 19 + www/js/i18n/ui.datepicker-id.js | 19 + www/js/i18n/ui.datepicker-is.js | 19 + www/js/i18n/ui.datepicker-it.js | 19 + www/js/i18n/ui.datepicker-ja.js | 20 + www/js/i18n/ui.datepicker-ko.js | 19 + www/js/i18n/ui.datepicker-lt.js | 19 + www/js/i18n/ui.datepicker-lv.js | 19 + www/js/i18n/ui.datepicker-ms.js | 19 + www/js/i18n/ui.datepicker-nl.js | 19 + www/js/i18n/ui.datepicker-no.js | 19 + www/js/i18n/ui.datepicker-pl.js | 19 + www/js/i18n/ui.datepicker-pt-BR.js | 19 + www/js/i18n/ui.datepicker-ro.js | 19 + www/js/i18n/ui.datepicker-ru.js | 19 + www/js/i18n/ui.datepicker-sk.js | 19 + www/js/i18n/ui.datepicker-sl.js | 20 + www/js/i18n/ui.datepicker-sq.js | 19 + www/js/i18n/ui.datepicker-sv.js | 19 + www/js/i18n/ui.datepicker-th.js | 19 + www/js/i18n/ui.datepicker-tr.js | 19 + www/js/i18n/ui.datepicker-uk.js | 19 + www/js/i18n/ui.datepicker-zh-CN.js | 19 + www/js/i18n/ui.datepicker-zh-TW.js | 19 + www/js/jquery-1.3.2.js | 4376 ++++++++ www/js/jquery-1.3.2.min.js | 19 + www/js/jquery-ui-personalized-1.6rc6.js | 8970 +++++++++++++++++ www/js/jquery-ui-personalized-1.6rc6.min.js | 273 + www/js/jquery.timers-1.0.0.js | 151 + www/js/magicbc.js | 116 + www/js/menu.js | 15 + .../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 180 bytes .../images/ui-bg_flat_55_fbec88_40x100.png | Bin 0 -> 182 bytes .../images/ui-bg_glass_75_d0e5f5_1x400.png | Bin 0 -> 124 bytes .../images/ui-bg_glass_85_dfeffc_1x400.png | Bin 0 -> 155 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 119 bytes .../ui-bg_gloss-wave_55_5c9ccc_500x100.png | Bin 0 -> 3457 bytes .../ui-bg_inset-hard_100_f5f8f9_1x100.png | Bin 0 -> 104 bytes .../ui-bg_inset-hard_100_fcfdfd_1x100.png | Bin 0 -> 88 bytes www/theme/images/ui-icons_217bc0_256x240.png | Bin 0 -> 4379 bytes www/theme/images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4379 bytes www/theme/images/ui-icons_469bdd_256x240.png | Bin 0 -> 4379 bytes www/theme/images/ui-icons_6da8d5_256x240.png | Bin 0 -> 4379 bytes www/theme/images/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4379 bytes www/theme/images/ui-icons_d8e7f3_256x240.png | Bin 0 -> 4379 bytes www/theme/images/ui-icons_f9bd01_256x240.png | Bin 0 -> 4379 bytes www/theme/ui.accordion.css | 9 + www/theme/ui.all.css | 2 + www/theme/ui.base.css | 9 + www/theme/ui.core.css | 37 + www/theme/ui.datepicker.css | 62 + www/theme/ui.dialog.css | 13 + www/theme/ui.progressbar.css | 4 + www/theme/ui.resizable.css | 13 + www/theme/ui.slider.css | 17 + www/theme/ui.tabs.css | 9 + www/theme/ui.theme.css | 243 + 107 files changed, 17286 insertions(+) create mode 100644 README create mode 100644 samplebc/__init__.py create mode 100644 samplebc/bcmagic/__init__.py create mode 100644 samplebc/bcmagic/admin.py create mode 100644 samplebc/bcmagic/forms.py create mode 100644 samplebc/bcmagic/models.py create mode 100644 samplebc/bcmagic/urls.py create mode 100644 samplebc/bcmagic/views.py create mode 100755 samplebc/manage.py create mode 100644 samplebc/samples/__init__.py create mode 100644 samplebc/samples/admin.py create mode 100644 samplebc/samples/containers.py create mode 100644 samplebc/samples/errors.py create mode 100644 samplebc/samples/forms.py create mode 100644 samplebc/samples/models.py create mode 100644 samplebc/samples/urls.py create mode 100644 samplebc/samples/util.py create mode 100644 samplebc/samples/views.py create mode 100644 samplebc/settings.py create mode 100644 samplebc/urls.py create mode 100644 templates/app.html create mode 100644 templates/bcmagic.html create mode 100644 templates/container_index.html create mode 100644 templates/container_summary.html create mode 100644 templates/freezer_index.html create mode 100644 templates/freezer_summary.html create mode 100644 templates/generic_form.html create mode 100644 templates/half_inch_samples.txt create mode 100644 templates/magic.html create mode 100644 templates/sample_homeless.html create mode 100644 templates/sample_index.html create mode 100644 templates/sample_summary.html create mode 100644 www/bcmagic.html create mode 100644 www/css/app.css create mode 100755 www/js/i18n/jquery.ui.i18n.all.js create mode 100755 www/js/i18n/ui.datepicker-ar.js create mode 100755 www/js/i18n/ui.datepicker-bg.js create mode 100755 www/js/i18n/ui.datepicker-ca.js create mode 100755 www/js/i18n/ui.datepicker-cs.js create mode 100755 www/js/i18n/ui.datepicker-da.js create mode 100755 www/js/i18n/ui.datepicker-de.js create mode 100755 www/js/i18n/ui.datepicker-el.js create mode 100755 www/js/i18n/ui.datepicker-eo.js create mode 100755 www/js/i18n/ui.datepicker-es.js create mode 100755 www/js/i18n/ui.datepicker-fa.js create mode 100755 www/js/i18n/ui.datepicker-fi.js create mode 100755 www/js/i18n/ui.datepicker-fr.js create mode 100755 www/js/i18n/ui.datepicker-he.js create mode 100755 www/js/i18n/ui.datepicker-hr.js create mode 100755 www/js/i18n/ui.datepicker-hu.js create mode 100755 www/js/i18n/ui.datepicker-hy.js create mode 100755 www/js/i18n/ui.datepicker-id.js create mode 100755 www/js/i18n/ui.datepicker-is.js create mode 100755 www/js/i18n/ui.datepicker-it.js create mode 100755 www/js/i18n/ui.datepicker-ja.js create mode 100755 www/js/i18n/ui.datepicker-ko.js create mode 100755 www/js/i18n/ui.datepicker-lt.js create mode 100755 www/js/i18n/ui.datepicker-lv.js create mode 100755 www/js/i18n/ui.datepicker-ms.js create mode 100755 www/js/i18n/ui.datepicker-nl.js create mode 100755 www/js/i18n/ui.datepicker-no.js create mode 100755 www/js/i18n/ui.datepicker-pl.js create mode 100755 www/js/i18n/ui.datepicker-pt-BR.js create mode 100755 www/js/i18n/ui.datepicker-ro.js create mode 100755 www/js/i18n/ui.datepicker-ru.js create mode 100755 www/js/i18n/ui.datepicker-sk.js create mode 100755 www/js/i18n/ui.datepicker-sl.js create mode 100755 www/js/i18n/ui.datepicker-sq.js create mode 100755 www/js/i18n/ui.datepicker-sv.js create mode 100755 www/js/i18n/ui.datepicker-th.js create mode 100755 www/js/i18n/ui.datepicker-tr.js create mode 100755 www/js/i18n/ui.datepicker-uk.js create mode 100755 www/js/i18n/ui.datepicker-zh-CN.js create mode 100755 www/js/i18n/ui.datepicker-zh-TW.js create mode 100644 www/js/jquery-1.3.2.js create mode 100644 www/js/jquery-1.3.2.min.js create mode 100755 www/js/jquery-ui-personalized-1.6rc6.js create mode 100755 www/js/jquery-ui-personalized-1.6rc6.min.js create mode 100644 www/js/jquery.timers-1.0.0.js create mode 100644 www/js/magicbc.js create mode 100644 www/js/menu.js create mode 100755 www/theme/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100755 www/theme/images/ui-bg_flat_55_fbec88_40x100.png create mode 100755 www/theme/images/ui-bg_glass_75_d0e5f5_1x400.png create mode 100755 www/theme/images/ui-bg_glass_85_dfeffc_1x400.png create mode 100755 www/theme/images/ui-bg_glass_95_fef1ec_1x400.png create mode 100755 www/theme/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png create mode 100755 www/theme/images/ui-bg_inset-hard_100_f5f8f9_1x100.png create mode 100755 www/theme/images/ui-bg_inset-hard_100_fcfdfd_1x100.png create mode 100755 www/theme/images/ui-icons_217bc0_256x240.png create mode 100755 www/theme/images/ui-icons_2e83ff_256x240.png create mode 100755 www/theme/images/ui-icons_469bdd_256x240.png create mode 100755 www/theme/images/ui-icons_6da8d5_256x240.png create mode 100755 www/theme/images/ui-icons_cd0a0a_256x240.png create mode 100755 www/theme/images/ui-icons_d8e7f3_256x240.png create mode 100755 www/theme/images/ui-icons_f9bd01_256x240.png create mode 100755 www/theme/ui.accordion.css create mode 100755 www/theme/ui.all.css create mode 100755 www/theme/ui.base.css create mode 100755 www/theme/ui.core.css create mode 100755 www/theme/ui.datepicker.css create mode 100755 www/theme/ui.dialog.css create mode 100755 www/theme/ui.progressbar.css create mode 100755 www/theme/ui.resizable.css create mode 100755 www/theme/ui.slider.css create mode 100755 www/theme/ui.tabs.css create mode 100755 www/theme/ui.theme.css diff --git a/README b/README new file mode 100644 index 0000000..5f97167 --- /dev/null +++ b/README @@ -0,0 +1,7 @@ +HTSWorkflow: Sample Tracker +Authors: + * Brandon W. King + +Debian Dependencies: + * python-django >= 1.0.x + * python-json diff --git a/samplebc/__init__.py b/samplebc/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/samplebc/bcmagic/__init__.py b/samplebc/bcmagic/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/samplebc/bcmagic/admin.py b/samplebc/bcmagic/admin.py new file mode 100644 index 0000000..9681637 --- /dev/null +++ b/samplebc/bcmagic/admin.py @@ -0,0 +1,7 @@ +from django.contrib import admin +from samplebc.bcmagic.models import KeywordMap + +class KeywordMapAdmin(admin.ModelAdmin): + list_display = ('keyword','regex', 'url_template') + +admin.site.register(KeywordMap, KeywordMapAdmin) \ No newline at end of file diff --git a/samplebc/bcmagic/forms.py b/samplebc/bcmagic/forms.py new file mode 100644 index 0000000..4eb3d83 --- /dev/null +++ b/samplebc/bcmagic/forms.py @@ -0,0 +1,8 @@ +from django import forms + +class BarcodeMagicForm(forms.Form): + magic = forms.CharField(label="Barcode Magic") + + class Media: + js = ('js/jquery.timers-1.0.0.js', + 'js/magicbc.js') diff --git a/samplebc/bcmagic/models.py b/samplebc/bcmagic/models.py new file mode 100644 index 0000000..12d8736 --- /dev/null +++ b/samplebc/bcmagic/models.py @@ -0,0 +1,9 @@ +from django.db import models + +class KeywordMap(models.Model): + """ + Mapper object maps keyword|arg1|arg2|...|argN to REST urls + """ + keyword = models.CharField(max_length=64) + regex = models.CharField(max_length=1024) + url_template = models.TextField() diff --git a/samplebc/bcmagic/urls.py b/samplebc/bcmagic/urls.py new file mode 100644 index 0000000..6c34844 --- /dev/null +++ b/samplebc/bcmagic/urls.py @@ -0,0 +1,7 @@ +from django.conf.urls.defaults import * + +urlpatterns = patterns('', + (r'^json_test/$', 'samplebc.bcmagic.views.json_test'), + (r'^magic/$', 'samplebc.bcmagic.views.magic'), + (r'^$', 'samplebc.bcmagic.views.index'), +) \ No newline at end of file diff --git a/samplebc/bcmagic/views.py b/samplebc/bcmagic/views.py new file mode 100644 index 0000000..21d45a1 --- /dev/null +++ b/samplebc/bcmagic/views.py @@ -0,0 +1,117 @@ +from django.http import HttpResponse +from django.template import RequestContext, Template, Context +from django.shortcuts import render_to_response +from django.core.exceptions import ObjectDoesNotExist + +from samplebc.bcmagic import models + +import json +import re + +from samplebc.bcmagic import forms + +def index(request): + """ + Display a barcode magic input box + """ + form = forms.BarcodeMagicForm() + + return render_to_response('bcmagic.html', {'bcmagic': form}, + context_instance=RequestContext(request)) + + +def __magic_process(text): + """ + Based on scanned text, check to see if there is map object to use + for a useful redirect. + """ + # Split text on | + split_text = text.split('|') + + # There should always be at least one | in a valid scan. + if len(split_text) <= 1: + return {'mode': 'Error', + 'status': 'Invalid text: %s' % (text)} + + # Keyword is the first element in the list + keyword = split_text[0] + + # Attempt to find a KeywordMap based on keyword + try: + keymap = models.KeywordMap.objects.get(keyword=keyword) + except ObjectDoesNotExist, e: + return {'mode': 'Error', + 'status': 'Keyword (%s) is not defined' % (keyword)} + + # Remove keyword and only scan the content + content = '|'.join(split_text[1:]) + + #FIXME: would be faster to cache compiled regex + search = re.compile(keymap.regex) + + mo = search.search(content) + + # if the search was invalid + if not mo: + return {'mode': 'Error', + 'status': '(%s) failed to match (%s)' % (keymap.regex, content)} + + t = Template(keymap.url_template) + c = Context(mo.groupdict()) + + return {'mode': 'redirect', + 'url': str(t.render(c)) } + + + + + +def magic(request): + """ + Let the magic begin + """ + d = {} + + if 'text' in request.POST: + text = request.POST['text'] + else: + text = None + + #return HttpResponse(json.write(request.POST.items()), 'text/plain') + if text is None or text.strip() == '': + d['mode'] = 'Error' + d['status'] = 'Did not recieve text' + return HttpResponse(json.write(d), 'text/plain') + + if text.split('|')[0] == 'url': + d['mode'] = 'redirect' + d['url'] = text.split('|')[1] + else: + d = __magic_process(text) + + return HttpResponse(json.write(d), 'text/plain') + + + +def json_test(request): + d = {} + + if 'text' in request.POST: + text = request.POST['text'] + else: + text = None + + #return HttpResponse(json.write(request.POST.items()), 'text/plain') + if text is None or text.strip() == '': + d['mode'] = 'Error' + d['status'] = 'Did not recieve text' + return HttpResponse(json.write(d), 'text/plain') + + if text.split('|')[0] == 'url': + d['mode'] = 'redirect' + d['url'] = text.split('|')[1] + else: + d['msg'] = 'Recieved text: %s' % (text) + d['mode'] = 'clear' + + return HttpResponse(json.write(d), 'text/plain') diff --git a/samplebc/manage.py b/samplebc/manage.py new file mode 100755 index 0000000..bcdd55e --- /dev/null +++ b/samplebc/manage.py @@ -0,0 +1,11 @@ +#!/usr/bin/python +from django.core.management import execute_manager +try: + import settings # Assumed to be in the same directory. +except ImportError: + import sys + sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) + sys.exit(1) + +if __name__ == "__main__": + execute_manager(settings) diff --git a/samplebc/samples/__init__.py b/samplebc/samples/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/samplebc/samples/admin.py b/samplebc/samples/admin.py new file mode 100644 index 0000000..9a5dae2 --- /dev/null +++ b/samplebc/samples/admin.py @@ -0,0 +1,24 @@ +from django.contrib import admin +from samplebc.samples.models import Owner, Sample, Freezer, Container, SampleType + +class OwnerAdmin(admin.ModelAdmin): + pass + +class SampleAdmin(admin.ModelAdmin): + pass + +class FreezerAdmin(admin.ModelAdmin): + pass + +class ContainerAdmin(admin.ModelAdmin): + pass + +class SampleTypeAdmin(admin.ModelAdmin): + pass + + +admin.site.register(Owner, OwnerAdmin) +admin.site.register(Sample, SampleAdmin) +admin.site.register(Freezer, FreezerAdmin) +admin.site.register(Container, ContainerAdmin) +admin.site.register(SampleType, SampleTypeAdmin) diff --git a/samplebc/samples/containers.py b/samplebc/samples/containers.py new file mode 100644 index 0000000..0c0728f --- /dev/null +++ b/samplebc/samples/containers.py @@ -0,0 +1,34 @@ +from samplebc.samples.models import Container, Sample +import types + +def __get_container(string_or_container): + """ + returns a container object given container object or + container name string. + """ + if isinstance(string_or_container, Container): + return string_or_container + elif isinstance(string_or_container, types.StringType): + return Container.objects.get(name=string_or_container +) + raise ValueError, 'Invalid type: %s' % (string_or_container) + + +def item_count(string_or_container): + """ + Returns the number of items in a container given container + object or string. + """ + container_obj = __get_container(string_or_container) + return len(Sample.objects.filter(container__name=container_obj.name)) + + +def available_space(string_or_container): + """ + Returns the available space in a container by passing in either + the container object or the name of the container. + """ + count = item_count(string_or_container) + container_obj = __get_container(string_or_container) + + return (container_obj.max_items - count) diff --git a/samplebc/samples/errors.py b/samplebc/samples/errors.py new file mode 100644 index 0000000..1e97fd7 --- /dev/null +++ b/samplebc/samples/errors.py @@ -0,0 +1,8 @@ +from exceptions import Exception + +class NoSpaceAvaliable(Exception): + """ + Thrown when a container contains no more available space. + """ + pass + diff --git a/samplebc/samples/forms.py b/samplebc/samples/forms.py new file mode 100644 index 0000000..d86effc --- /dev/null +++ b/samplebc/samples/forms.py @@ -0,0 +1,37 @@ +from django import forms +from samplebc.samples import models + + +class FreezerForm(forms.ModelForm): + + class Meta: + model = models.Freezer + exclude = ('uuid',) + + class Media: + #js = ('js/jquery-1.3.2.js', 'js/uuid.js') + pass + + +class ContainerForm(forms.ModelForm): + + class Meta: + model = models.Container + exclude = ('uuid',) + + class Media: + #js = ('js/jquery-1.3.2.js',) + pass + + +class SampleForm(forms.ModelForm): + assign_container = forms.BooleanField(initial=True, required=False) + + class Meta: + model = models.Sample + exclude = ('container', 'sampleid') + + +#class CmdMoveSampleForm(forms.Form): +# sampleid = form.CharField() +# container_id = form.CharField() \ No newline at end of file diff --git a/samplebc/samples/models.py b/samplebc/samples/models.py new file mode 100644 index 0000000..8d53407 --- /dev/null +++ b/samplebc/samples/models.py @@ -0,0 +1,80 @@ +from django.db import models + +# Create your models here. + +EXP_TYPES = [('RNASeq', 'RNASeq'), + ('ChIPSeq','ChIPSeq'), + ('DeNovoSeq','DeNovoSeq'), + ('MethylSeq','MethylSeq')] +FREEZER_BUILDINGS = [('Kerckhoff', 'Kerckhoff')] + + +class Owner(models.Model): + name = models.CharField(max_length=32) + + def __unicode__(self): + return u'%s' % (self.name) + + +class Freezer(models.Model): + name = models.CharField(max_length=256) + building = models.CharField(max_length=256, choices=FREEZER_BUILDINGS, + default=FREEZER_BUILDINGS[0][0]) + loc_desc = models.CharField(max_length=256, blank=True, null=True) + temperature = models.FloatField(help_text='Celsius') + + uuid = models.CharField(max_length=32, unique=True) + + def __unicode__(self): + return u'%s (%s; %sC)' % (self.name, self.building, self.temperature) + + @models.permalink + def get_absolute_url(self): + return ('samplebc.samples.views.freezer_summary', [str(self.uuid)]) + + +class SampleType(models.Model): + name = models.CharField(max_length=256) + + def __unicode__(self): + return u'%s' % (self.name) + + +class Container(models.Model): + name = models.CharField(max_length=256) + sample_type = models.ManyToManyField(SampleType) + max_items = models.IntegerField() + freezer = models.ForeignKey(Freezer) + + uuid = models.CharField(max_length=32, unique=True) + + def __unicode__(self): + return u'%s (spc: %s)' % (self.name, self.space_available()) + + @models.permalink + def get_absolute_url(self): + return ('samplebc.samples.views.container_summary', [str(self.uuid)]) + + def space_available(self): + """ + returns the space available for the container + """ + return (self.max_items - self.sample_set.count()) + + +class Sample(models.Model): + name = models.CharField(max_length=256) + sampleid = models.CharField(max_length=64, unique=True) + sample_type = models.ForeignKey(SampleType) + owner = models.ForeignKey(Owner) + # Concentration in ng/ul + concentration = models.FloatField(help_text='ng/ul', blank=True, null=True) + volume = models.FloatField(help_text='ul', blank=True, null=True) + container = models.ForeignKey(Container, blank=True, null=True) + + def __unicode__(self): + return u's|%s|%s' % (self.sampleid, self.owner.name) + + @models.permalink + def get_absolute_url(self): + return ('samplebc.samples.views.sample_summary', [str(self.sampleid)]) diff --git a/samplebc/samples/urls.py b/samplebc/samples/urls.py new file mode 100644 index 0000000..e7947fc --- /dev/null +++ b/samplebc/samples/urls.py @@ -0,0 +1,34 @@ +from django.conf.urls.defaults import * + +urlpatterns = patterns('', + # Sample URLs + (r'^sample/$', 'samplebc.samples.views.sample_index'), + (r'^sample/add/$', 'samplebc.samples.views.sample_add'), + (r'^sample/homeless/$', 'samplebc.samples.views.sample_homeless'), + (r'^sample/(?P\d+)/print/$', 'samplebc.samples.views.sample_print'), + (r'^sample/(?P\d+)/$', 'samplebc.samples.views.sample_summary'), + (r'^sample/(?P\d+)/edit/$', 'samplebc.samples.views.sample_edit'), + (r'^sample/(?P\d+)/assign/$', 'samplebc.samples.views.sample_assign_container'), + + # Container URLs + (r'^container/$', + 'samplebc.samples.views.container_index'), + (r'^container/add/$', + 'samplebc.samples.views.container_add'), + (r'^container/(?P[a-fA-F0-9]+)/edit/$', + 'samplebc.samples.views.container_edit'), + (r'^container/(?P[a-fA-F0-9]+)/$', + 'samplebc.samples.views.container_summary'), + + # Freezer URLs + (r'^freezer/$', + 'samplebc.samples.views.freezer_index'), + (r'^freezer/add/$', + 'samplebc.samples.views.freezer_add'), + (r'^freezer/(?P[a-fA-F0-9]+)/edit/$', + 'samplebc.samples.views.freezer_edit'), + (r'^freezer/(?P[a-fA-F0-9]+)/$', + 'samplebc.samples.views.freezer_summary') + + +) diff --git a/samplebc/samples/util.py b/samplebc/samples/util.py new file mode 100644 index 0000000..2ed7a8e --- /dev/null +++ b/samplebc/samples/util.py @@ -0,0 +1,36 @@ +import uuid +import random + +from samplebc.samples import models +from samplebc.samples import errors + +def get_uuid(): + """ + Returns hex version of uuid + """ + return uuid.uuid1().hex + + +def get_sampleid(): + """ + Returns a sample id + """ + return "%06d" % (random.randint(1,9999)) + + +def assign_to_container(sample): + """ + Choose a container to place sample into. + """ + container_list = sample.sample_type.container_set.all() + available_list = [ container for container in container_list if container.space_available() > 0 ] + + if len(available_list) == 0: + raise errors.NoSpaceAvaliable("No container with available space for sample type (%s)" \ + % (sample.sample_type.name)) + + #FIXME: Need to choose a container in a more logical way... for now, take the first one. + container = available_list[0] + sample.container = container + + return diff --git a/samplebc/samples/views.py b/samplebc/samples/views.py new file mode 100644 index 0000000..e8ffb35 --- /dev/null +++ b/samplebc/samples/views.py @@ -0,0 +1,606 @@ +from django.http import HttpResponse, HttpResponseRedirect +from samplebc.samples import models +from django.core.exceptions import ObjectDoesNotExist +from django.template import Context, Template, RequestContext +from django.template.loader import get_template +from django.shortcuts import render_to_response + +from django.utils.safestring import mark_safe + +from samplebc.samples.forms import FreezerForm, ContainerForm, SampleForm +from samplebc.samples.models import Freezer, Container, Sample +from samplebc.samples.util import get_uuid, get_sampleid, assign_to_container +from samplebc.samples.errors import NoSpaceAvaliable +from samplebc import settings + +# Barcode Magic! +from samplebc.bcmagic.forms import BarcodeMagicForm + + +import random +import ftplib +import StringIO + + +################################################ +# Util functions +################################################ + + +def print_zpl(zpl_text): + """ + Sends zpl_text to printer + """ + ftp = ftplib.FTP(host='131.215.54.194', user='blank', passwd='') + ftp.login() + ftp.storlines("STOR printme.txt", StringIO.StringIO(zpl_text)) + + +def __center_line(line, width): + spaces_to_add = width - len(line) + + front_half = spaces_to_add / 2 + back_half = spaces_to_add - front_half + + return (' ' * front_half) + line + (' ' * back_half) + + + + +################################################ +# Container +################################################ + +def container_index(request): + """ + Returns an index of available to containers + """ + container_list = Container.objects.all() + c = Context({'title': 'Container Index', + 'container_list': container_list}) + t = get_template('container_index.html') + + return render_to_response('app.html', { + 'app_name': "HTSW-SampleTracker", + 'page_name': 'Container Index', + 'bcmagic': BarcodeMagicForm(), + 'select': 'container', + 'body': t.render(c) + }) + + + + +def container_summary(request, container_id): + """ + Returns details of a container + """ + # Retrieve container by UUID + try: + container = models.Container.objects.get(uuid=container_id) + except ObjectDoesNotExist, e: + msg = "Container (%s) does not exist." % (container_id) + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Container Summary', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'container', + 'body': msg + }) + + # Retrieve samples from container + sample_list = container.sample_set.all() + + # Prepare a Sample Index of Contained Samples + cs = Context({'title': 'Contained Samples', + 'sample_list': sample_list}) + ts = get_template('sample_index.html') + + # Render prepared samples into container summary + cc = Context({'container': container, + 'rendered_samples': ts.render(cs) }) + tc = get_template('container_summary.html') + + # Render container summary to app html + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Container Summary', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'container', + 'body': tc.render(cc) + }) + + +def container_add(request): + """ + Form for adding a container. + """ + # If user submitted the Container form. + if request.method == 'POST': + # Fill in ContainerForm with POSTed data. + form = ContainerForm(request.POST) + + # If the form is valid, process it. + if form.is_valid(): + # Create new Container object from form data + c_obj = form.save(commit=False) + # Added UUID + c_obj.uuid = get_uuid() + # Save to DB. + c_obj.save() + # Save the many to many link data. + form.save_m2m() + return container_summary(request, c_obj.uuid) + else: + # If users first visit, create empty form. + form = ContainerForm() + + # Load form template + c = Context({'form': form, + 'action_url': '/samples/container/add/'}) + t = get_template('generic_form.html') + + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Container Add', + 'media': form.media, + 'bcmagic': BarcodeMagicForm(), + 'select': 'container', + 'body': t.render(c) + }) + +def container_edit(request, container_id): + """ + Allow editing of a container + """ + try: + container = models.Container.objects.get(uuid=container_id) + except ObjectDoesNotExist, e: + msg = "Container (%s) cannot be edited as it does not exist." % (container_id) + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Container Edit', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'container', + 'body': msg + }) + + # If user submitted the container form. + if request.method == 'POST': + # Fill in ContainerForm with POSTed data. + form = ContainerForm(request.POST, instance=container) + + # If the form is valid, process it. + if form.is_valid(): + # Save Container object from form data + c_obj = form.save(commit=True) + # Save many2many changes as well + #form.save_m2m() #Not needed when form.save(commit=True) + + return container_summary(request, c_obj.uuid) + else: + # If users first visit, create form from Container instance. + form = ContainerForm(instance=container) + + # Load form template + c = Context({'form': form, + 'action_url': '%sedit/' % (container.get_absolute_url())}) + t = get_template('generic_form.html') + + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Container Edit', + 'media': form.media, + 'bcmagic': BarcodeMagicForm(), + 'select': 'container', + 'body': t.render(c) + }) + + + +################################################ +# Freezer +################################################ + +def freezer_index(request): + """ + Returns an index of available freezers + """ + freezer_list = Freezer.objects.all() + c = Context({'freezer_list': freezer_list}) + t = get_template('freezer_index.html') + + return render_to_response('app.html', { + 'app_name': "HTSW-SampleTracker", + 'page_name': 'Freezer Index', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'freezer', + 'body': t.render(c) + }) + + +def freezer_summary(request, freezer_id): + """ + Returns summary of freezer_id + """ + # Retrieve freezer by UUID + try: + freezer = models.Freezer.objects.get(uuid=freezer_id) + except ObjectDoesNotExist, e: + msg = "Freezer (%s) does not exist." % (freezer_id) + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Freezer Summary', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'freezer', + 'body': msg + }) + + # List of contained containers + container_list = freezer.container_set.all() + + + # Render prepared container index into freezer summary + cf = Context({'freezer': freezer }) + tf = get_template('freezer_summary.html') + + # Render Freezer summary to app html + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Freezer Summary', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'freezer', + 'body': tf.render(cf) + }) + + +def freezer_add(request): + """ + Allows you to add a new freezer. + """ + # If user submitted the freezer form. + if request.method == 'POST': + # Fill in FreezerForm with POSTed data. + form = FreezerForm(request.POST) + + # If the form is valid, process it. + if form.is_valid(): + # Create new Freezer object from form data + f_obj = form.save(commit=False) + # Added UUID + f_obj.uuid = get_uuid() + # Save to DB. + f_obj.save() + return freezer_summary(request, f_obj.uuid) + else: + # If users first visit, create empty form. + form = FreezerForm() + + # Load form template + c = Context({'form': form, + 'action_url': '/samples/freezer/add/'}) + t = get_template('generic_form.html') + + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Freezer Add', + 'media': form.media, + 'bcmagic': BarcodeMagicForm(), + 'select': 'freezer', + 'body': t.render(c) + }) + + +def freezer_edit(request, freezer_id): + """ + Allow editing of a freezer + """ + try: + freezer = models.Freezer.objects.get(uuid=freezer_id) + except ObjectDoesNotExist, e: + msg = "Freezer (%s) cannot be edited as it does not exist." % (freezer_id) + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Freezer Summary', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'freezer', + 'body': msg + }) + + # If user submitted the freezer form. + if request.method == 'POST': + # Fill in FreezerForm with POSTed data. + form = FreezerForm(request.POST, instance=freezer) + + # If the form is valid, process it. + if form.is_valid(): + # Save Freezer object from form data + f_obj = form.save(commit=True) + + return freezer_summary(request, f_obj.uuid) + else: + # If users first visit, create form from freezer instance. + form = FreezerForm(instance=freezer) + + # Load form template + c = Context({'form': form, + 'action_url': '%sedit/' % (freezer.get_absolute_url())}) + t = get_template('generic_form.html') + + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Freezer Edit', + 'media': form.media, + 'bcmagic': BarcodeMagicForm(), + 'select': 'freezer', + 'body': t.render(c) + }) + + + +################################################ +# Samples +################################################ + +def sample_index(request): + """ + return a list of samples and what we can do with them. + """ + sample_list = models.Sample.objects.all() + + # Load form template + c = Context({'title': 'Sample Index', + 'sample_list': sample_list}) + t = get_template('sample_index.html') + #html.append('%s (print)' \ + # % (sample, sample.sampleid)) + + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Samples Index', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'samples', + 'body': t.render(c) + }) + + +def sample_homeless(request): + """ + Returns an index of homeless samples + """ + sample_list = Sample.objects.filter(container=None) + c = Context({'title': 'Homeless Samples', + 'sample_list': sample_list}) + t = get_template('sample_homeless.html') + + return render_to_response('app.html', { + 'app_name': "HTSW-SampleTracker", + 'page_name': 'Homeless Samples', + 'bcmagic': BarcodeMagicForm(), + 'select': 'samples', + 'body': t.render(c) + }) + + +def sample_add(request): + """ + Allow adding of a new sample + """ + ASSIGNED_CONTAINER = False + + # If user submitted the sample form. + if request.method == 'POST': + # Fill in SampleForm with POSTed data. + form = SampleForm(request.POST) + + # If the form is valid, process it. + if form.is_valid(): + # Create new Sample object from form data + s_obj = form.save(commit=False) + + # Add sample ID + s_obj.sampleid = get_sampleid() + + # If the user wants us to assign a container. + if form.cleaned_data['assign_container']: + # Choose container + try: + assign_to_container(s_obj) + ASSIGNED_CONTAINER = True + except NoSpaceAvaliable, e: + #return HttpResponse("Error: %s
You will need to prepare a new container before continuing." \ + # % (e)) + ASSIGNED_CONTAINER = False + + # Save to DB. + s_obj.save() + + if not ASSIGNED_CONTAINER: + msg = "NOTE: Sample is homeless" + return sample_summary(request, s_obj.sampleid, msg=msg) + + + msg = "Sample created." + return sample_summary(request, s_obj.sampleid, msg=msg) + else: + # If users first visit, create empty form. + form = SampleForm() + + # Load form template + c = Context({'form': form, + 'action_url': '/samples/sample/add/'}) + t = get_template('generic_form.html') + + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Sample Add', + 'media': form.media, + 'bcmagic': BarcodeMagicForm(), + 'select': 'samples', + 'body': t.render(c) + }) + + +def sample_edit(request, sampleid): + """ + Allow editing of a sample + """ + try: + sample = models.Sample.objects.get(sampleid=sampleid) + except ObjectDoesNotExist, e: + msg = "Sample (%s) cannot be edited as it does not exist." % (sampleid) + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Sample Edit', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'samples', + 'body': msg + }) + + # If user submitted the sample form. + if request.method == 'POST': + # Fill in SampleForm with POSTed data. + form = SampleForm(request.POST, instance=sample) + + # If the form is valid, process it. + if form.is_valid(): + # Save Sample object from form data + s_obj = form.save(commit=True) + + msg = "Sample Update Saved" + return sample_summary(request, s_obj.sampleid, msg) + else: + # If users first visit, create form from sample instance. + form = SampleForm(instance=sample) + + # Load form template + c = Context({'form': form, + 'action_url': '%sedit/' % (sample.get_absolute_url())}) + t = get_template('generic_form.html') + + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Sample Edit', + 'media': form.media, + 'bcmagic': BarcodeMagicForm(), + 'select': 'samples', + 'body': t.render(c) + }) + + +def sample_assign_container(request, sampleid): + """ + Assigns sample to container using the assign to container algorithm + """ + + sample = Sample.objects.get(sampleid=sampleid) + + try: + assign_to_container(sample) + except NoSpaceAvaliable, e: + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Sample Assign', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'samples', + 'body': mark_safe("Error: %s
You will need to prepare a new container before continuing." \ + % (e)) + }) + + sample.save() + + body = 'Sample (%s) assigned to container (%s)' \ + % (sample.get_absolute_url(), str(sample), sample.container.get_absolute_url(), str(sample.container)) + + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Sample Assign', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'samples', + 'body': mark_safe(body), + }) + + +def sample_summary(request, sampleid, msg=None): + """ + Display a summary of a given sample + """ + try: + sample = models.Sample.objects.get(sampleid=sampleid) + except ObjectDoesNotExist, e: + msg = "Sample (%s) does not exist." % (sampleid) + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Sample Summary', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'samples', + 'body': msg + }) + + c = Context({'sample': sample, + 'msg': msg,}) + t = get_template('sample_summary.html') + + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'Sample Summary', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'samples', + 'body': t.render(c) + }) + + +def sample_print(request, sampleid): + """ + prints a sample! + """ + + try: + sample = models.Sample.objects.get(sampleid=sampleid) + except ObjectDoesNotExist: + return HttpResponse('Sample (%s) does not exist!' % (sampleid)) + + params = {} + params['fullid'] = str(sample) + params['sampleid'] = __center_line("s|%s" % (sample.sampleid), 16) + params['line1'] = __center_line(sample.name[0:10], 10) + params['line2'] = __center_line(sample.name[10:25], 14) + params['line3'] = __center_line('ExpType %s' % (sample.sample_type.name[0:8]), 15) + params['slot_num'] = random.randint(1,81) + + c = Context(params) + t = get_template('half_inch_samples.txt') + print_zpl(t.render(c)) + + return HttpResponse('print command for sample %s sent.' % (sample.sampleid)) + + +################################################ +# Barcode Magic Commands +################################################ + +def cmd_move_sample(request): + """ + Moves a sample to a target container + """ + return render_to_response('app.html', { + 'app_name': settings.HTSW_ST_APPNAME, + 'page_name': 'CMD: Move Sample', + 'media': '', + 'bcmagic': BarcodeMagicForm(), + 'select': 'samples', + 'body': "" + }) \ No newline at end of file diff --git a/samplebc/settings.py b/samplebc/settings.py new file mode 100644 index 0000000..daaae8a --- /dev/null +++ b/samplebc/settings.py @@ -0,0 +1,92 @@ +# Django settings for samplebc project. + +import os + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + # ('Your Name', 'your_email@domain.com'), +) + +MANAGERS = ADMINS + +DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. +DATABASE_NAME = os.path.abspath('../sample.db') # Or path to database file if using sqlite3. +DATABASE_USER = '' # Not used with sqlite3. +DATABASE_PASSWORD = '' # Not used with sqlite3. +DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. +DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. + +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# If running in a Windows environment this must be set to the same as your +# system time zone. +TIME_ZONE = 'America/Los_Angeles' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'en-us' + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = '/home/king/proj/barcodes/sampletracker/www' + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash if there is a path component (optional in other cases). +# Examples: "http://media.lawrence.com", "http://example.com/media/" +MEDIA_URL = 'http://localhost:8000/static/' + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +ADMIN_MEDIA_PREFIX = '/media/' + +# Make this unique, and don't share it with anybody. +SECRET_KEY = 'tcn2-(c4(qw5%(_06w!7p4aiqyp!gs(*#fw9h&#y=2j3#k3*fm' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.load_template_source', + 'django.template.loaders.app_directories.load_template_source', +# 'django.template.loaders.eggs.load_template_source', +) + + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', +) + +ROOT_URLCONF = 'samplebc.urls' + +TEMPLATE_DIRS = ( + # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". + # Always use forward slashes, even on Windows. + # Don't forget to use absolute paths, not relative paths. + os.path.abspath('../templates') +) + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.admin', + 'samplebc.samples', + 'samplebc.bcmagic' +) + + +######################### +# App Specific Settings + +HTSW_ST_APPNAME = 'HTSW-SampleTracker' \ No newline at end of file diff --git a/samplebc/urls.py b/samplebc/urls.py new file mode 100644 index 0000000..2d3ce27 --- /dev/null +++ b/samplebc/urls.py @@ -0,0 +1,24 @@ +from django.conf.urls.defaults import * +import os + +# Uncomment the next two lines to enable the admin: +from django.contrib import admin +admin.autodiscover() + +urlpatterns = patterns('', + # Example: + # (r'^samplebc/', include('samplebc.foo.urls')), + + # Uncomment the admin/doc line below and add 'django.contrib.admindocs' + # to INSTALLED_APPS to enable admin documentation: + # (r'^admin/doc/', include('django.contrib.admindocs.urls')), + + # Uncomment the next line to enable the admin: + (r'^admin/(.*)', admin.site.root), + (r'^static/(?P.*)$', 'django.views.static.serve', + {'document_root': os.path.abspath('../www')}), + + (r'^bcmagic/', include('samplebc.bcmagic.urls')), + (r'^samples/', include('samplebc.samples.urls')) +) + diff --git a/templates/app.html b/templates/app.html new file mode 100644 index 0000000..0b73472 --- /dev/null +++ b/templates/app.html @@ -0,0 +1,53 @@ + + + + {{ app_name }} - {{ page_name }} + + + + + + {{ media }} + {{ bcmagic.media }} + {% if select %} + + {% endif %} + + +
+
+
+

Freezers

+
+ Index
+ Add
+
+
+
+

Containers

+
+ Index
+ Add
+
+
+
+

Samples

+
+ Index + Homeless + Add +
+
+
+
+ {% include "magic.html" %} +
+
+ {{ body }} +
+ + diff --git a/templates/bcmagic.html b/templates/bcmagic.html new file mode 100644 index 0000000..c1c5768 --- /dev/null +++ b/templates/bcmagic.html @@ -0,0 +1,10 @@ + + + + Barcode Magic (BCM) + {{ bcmagic.media }} + + + {% include "magic.html" %} + + diff --git a/templates/container_index.html b/templates/container_index.html new file mode 100644 index 0000000..8ba6cce --- /dev/null +++ b/templates/container_index.html @@ -0,0 +1,23 @@ +

{{ title }}

+ + + + + + + + + + {% for container in container_list %} + + + + + + + + + {% endfor %} +
NameType(s)Max ItemsFreezerSample CountSpace Available
{{ container.name }} + {{ container.sample_type.all|join:", " }} + {{ container.max_items }}{{ container.freezer }}{{ container.sample_set.count }}{{ container.space_available }}
diff --git a/templates/container_summary.html b/templates/container_summary.html new file mode 100644 index 0000000..b3a8794 --- /dev/null +++ b/templates/container_summary.html @@ -0,0 +1,21 @@ +

Container Summary

+ +[ Edit ]
+
+ +Name: {{ container.name }}
+Freezer: {{ container.freezer.name }}
+
+uuid: {{ container.uuid }}
+
+Allowed Sample Types:
+{{ container.sample_type.all|join:", " }}
+
+Max Samples: {{ container.max_items }}
+Sample Count: {{ container.sample_set.count }}
+Space Available: {{ container.space_available }}
+
+ +{{ rendered_samples }} + + diff --git a/templates/freezer_index.html b/templates/freezer_index.html new file mode 100644 index 0000000..e27939d --- /dev/null +++ b/templates/freezer_index.html @@ -0,0 +1,19 @@ +

Freezer Index

+ + + + + + + + + {% for freezer in freezer_list %} + + + + + + + + {% endfor %} +
NameBuildingLocation Desc.TemperatureContainers
{{ freezer.name }}{{ freezer.building }}{{ freezer.loc_desc }}{{ freezer.temperature }}C{{ freezer.container_set.all|length }}
diff --git a/templates/freezer_summary.html b/templates/freezer_summary.html new file mode 100644 index 0000000..a0dc5b6 --- /dev/null +++ b/templates/freezer_summary.html @@ -0,0 +1,36 @@ +

Freezer Summary

+ +[ Edit ]
+
+ +Name: {{ freezer.name }}
+Temp. (C): {{ freezer.temperature }}
+
+Building: {{ freezer.building }}
+Loc. Desc.: {{ freezer.loc_desc }}
+
+uuid: {{ freezer.uuid }}
+ +

Containers in Freezer

+ + + + + + + + + {% for container in freezer.container_set.all %} + + + + + + + + {% endfor %} +
NameType(s)Max ItemsSample CountSpace Available
{{ container.name }} + {{ container.sample_type.all|join:", " }} + {{ container.max_items }}{{ container.sample_set.count }}{{ container.space_available }}
+ + diff --git a/templates/generic_form.html b/templates/generic_form.html new file mode 100644 index 0000000..8a5d327 --- /dev/null +++ b/templates/generic_form.html @@ -0,0 +1,5 @@ +
+{{ form.as_p }} + +
+ diff --git a/templates/half_inch_samples.txt b/templates/half_inch_samples.txt new file mode 100644 index 0000000..13b11b9 --- /dev/null +++ b/templates/half_inch_samples.txt @@ -0,0 +1,58 @@ +^FX========================= +^FX 1/2" Tube Label +^FX========================= + +^XA +^FX------------------------- +^FX Sample ID +^FX------------------------- +^FO105,167 +^CF0,24^FD{{ sampleid }}^FS + +^FX------------------------- +^FX Content +^FX------------------------- + +^FX Line 1 (max_length=10) +^FO135,113 +^CF0,16^FD{{ line1 }}^FS + +^FX Line 2 (max_length=14) +^FO120,131 +^CF0,16^FD{{ line2 }}^FS + +^FX Line 3 (max_length=15) +^FO115,149 +^CF0,16^FD{{ line3 }}^FS + +^FX------------------------- +^FX Slot # +^FX +^FX (75 - (54 / 2)) / 2 == 24 +^FX x_center = (175 + 30 + 24) +^FX x = x_center - 24 + 4 +^FX y = x_center - 24 + 4 - (28/2) +^FX------------------------- +^FO209,195 +^CF0,28^FD{{ slot_num }}^FS + +^FX------------------------- +^FX Circle - Temp +^FX------------------------- +^FX FO100,100 +^FX GC150,1^FS + +^FX------------------------- +^FX Datamatrix Barcode +^FX +^FX h=w=<#col>*3 +^FX upper_left_coords=(175-(w/2), 250-6-h) +^FX------------------------- +^FO148,188 +^BXN,3,200 +^FD{{ fullid }}^FS + +^FX------------------------- +^FX End Label +^FX------------------------- +^XZ diff --git a/templates/magic.html b/templates/magic.html new file mode 100644 index 0000000..e1d1061 --- /dev/null +++ b/templates/magic.html @@ -0,0 +1,3 @@ +
+{{ bcmagic }}
+
diff --git a/templates/sample_homeless.html b/templates/sample_homeless.html new file mode 100644 index 0000000..693e34f --- /dev/null +++ b/templates/sample_homeless.html @@ -0,0 +1,21 @@ +

{{ title }}

+ + + + + + + + + {% for sample in sample_list %} + + + + + + + + {% endfor %} +
NameSampleIDSampleTypeOwnerContainer
{{ sample.name }} + {{ sample.sampleid }} + {{ sample.sample_type.name }}{{ sample.owner.name }}Auto-assign
diff --git a/templates/sample_index.html b/templates/sample_index.html new file mode 100644 index 0000000..85522d0 --- /dev/null +++ b/templates/sample_index.html @@ -0,0 +1,29 @@ +

{{ title }}

+ + + + + + + + + + + {% for sample in sample_list %} + + + + + + + + {% if sample.container %} + + {% else %} + + {% endif %} + + {% endfor %} +
NameSampleIDSampleTypeOwnerConc.Vol.Container
{{ sample.name }} + {{ sample.sampleid }} + {{ sample.sample_type.name }}{{ sample.owner.name }}{{ sample.concentration }}{{ sample.volume }}{{ sample.container }}auto-assign
diff --git a/templates/sample_summary.html b/templates/sample_summary.html new file mode 100644 index 0000000..98dd413 --- /dev/null +++ b/templates/sample_summary.html @@ -0,0 +1,21 @@ +

Sample Summary

+ +[ Edit | Print Label ]
+ +{% if msg %} +
+ {{ msg }} +
+{% endif %} + +
+Name: {{ sample.name }}
+SampleID: {{ sample.sampleid }}
+Type: {{ sample.sample_type.name }}
+Owner: {{ sample.owner.name }}
+
+Concentration (ug/ml): {{ sample.concentration }}
+Volume (ml): {{ sample.volume }}
+
+Freezer: {{ sample.container.freezer.name }}
+Container: {{ sample.container.name }}
\ No newline at end of file diff --git a/www/bcmagic.html b/www/bcmagic.html new file mode 100644 index 0000000..607061b --- /dev/null +++ b/www/bcmagic.html @@ -0,0 +1,14 @@ + + + + Hello World! + + + + + +
+ Magic:
+
+ + diff --git a/www/css/app.css b/www/css/app.css new file mode 100644 index 0000000..63e86e1 --- /dev/null +++ b/www/css/app.css @@ -0,0 +1,25 @@ +#left_bar { + position: absolute; + top: 5px; + left: 5px; + width: 172px; + height: auto; + min-height: 600px; + + +} + +#main { + position: relative; + /* background: #BBBBFF; */ + width:auto; + min-width:120px; + padding: 10px; + margin:0px 0px 0px 175px; + min-height:600px; +} + +div.msg { + color: white; + background: #880000; +} \ No newline at end of file diff --git a/www/js/i18n/jquery.ui.i18n.all.js b/www/js/i18n/jquery.ui.i18n.all.js new file mode 100755 index 0000000..044d30f --- /dev/null +++ b/www/js/i18n/jquery.ui.i18n.all.js @@ -0,0 +1,724 @@ +/* Arabic Translation for jQuery UI date picker plugin. */ +/* Khaled Al Horani -- koko.dw@gmail.com */ +/* خالد الحوراني -- koko.dw@gmail.com */ +/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */ +jQuery(function($){ + $.datepicker.regional['ar'] = { + closeText: 'إغلاق', + prevText: '<السابق', + nextText: 'التالي>', + currentText: 'اليوم', + monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران', + 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], + dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'], + dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'], + dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: true}; + $.datepicker.setDefaults($.datepicker.regional['ar']); +});/* Bulgarian initialisation for the jQuery UI date picker plugin. */ +/* Written by Stoyan Kyosev (http://svest.org). */ +jQuery(function($){ + $.datepicker.regional['bg'] = { + closeText: 'затвори', + prevText: '<назад', + nextText: 'напред>', + nextBigText: '>>', + currentText: 'днес', + monthNames: ['Януари','Февруари','Март','Април','Май','Юни', + 'Юли','Август','Септември','Октомври','Ноември','Декември'], + monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни', + 'Юли','Авг','Сеп','Окт','Нов','Дек'], + dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'], + dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'], + dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['bg']); +}); +/* Inicialitzaci� en catal� per a l'extenci� 'calendar' per jQuery. */ +/* Writers: (joan.leon@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['ca'] = { + closeText: 'Tancar', + prevText: '<Ant', + nextText: 'Seg>', + currentText: 'Avui', + monthNames: ['Gener','Febrer','Març','Abril','Maig','Juny', + 'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'], + monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun', + 'Jul','Ago','Set','Oct','Nov','Des'], + dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'], + dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'], + dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'], + dateFormat: 'mm/dd/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['ca']); +});/* Czech initialisation for the jQuery UI date picker plugin. */ +/* Written by Tomas Muller (tomas@tomas-muller.net). */ +jQuery(function($){ + $.datepicker.regional['cs'] = { + closeText: 'Zavřít', + prevText: '<Dříve', + nextText: 'Později>', + currentText: 'Nyní', + monthNames: ['leden','únor','březen','duben','květen','červen', + 'červenec','srpen','září','říjen','listopad','prosinec'], + monthNamesShort: ['led','úno','bře','dub','kvě','čer', + 'čvc','srp','zář','říj','lis','pro'], + dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'], + dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'], + dayNamesMin: ['ne','po','út','st','čt','pá','so'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['cs']); +}); +/* Danish initialisation for the jQuery UI date picker plugin. */ +/* Written by Jan Christensen ( deletestuff@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['da'] = { + closeText: 'Luk', + prevText: '<Forrige', + nextText: 'Næste>', + currentText: 'Idag', + monthNames: ['Januar','Februar','Marts','April','Maj','Juni', + 'Juli','August','September','Oktober','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Aug','Sep','Okt','Nov','Dec'], + dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], + dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], + dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], + dateFormat: 'dd-mm-yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['da']); +}); +/* German initialisation for the jQuery UI date picker plugin. */ +/* Written by Milian Wolff (mail@milianw.de). */ +jQuery(function($){ + $.datepicker.regional['de'] = { + closeText: 'schließen', + prevText: '<zurück', + nextText: 'Vor>', + currentText: 'heute', + monthNames: ['Januar','Februar','März','April','Mai','Juni', + 'Juli','August','September','Oktober','November','Dezember'], + monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', + 'Jul','Aug','Sep','Okt','Nov','Dez'], + dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], + dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], + dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['de']); +}); +/* Greek (el) initialisation for the jQuery UI date picker plugin. */ +/* Written by Alex Cicovic (http://www.alexcicovic.com) */ +jQuery(function($){ + $.datepicker.regional['el'] = { + closeText: 'Κλείσιμο', + prevText: 'Προηγούμενος', + nextText: 'Επόμενος', + currentText: 'Τρέχων Μήνας', + monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος', + 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'], + monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν', + 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'], + dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'], + dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'], + dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'], + dateFormat: 'dd/mm/yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['el']); +});/* Esperanto initialisation for the jQuery UI date picker plugin. */ +/* Written by Olivier M. (olivierweb@ifrance.com). */ +jQuery(function($){ + $.datepicker.regional['eo'] = { + closeText: 'Fermi', + prevText: '<Anta', + nextText: 'Sekv>', + currentText: 'Nuna', + monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio', + 'Julio','AÅ­gusto','Septembro','Oktobro','Novembro','Decembro'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','AÅ­g','Sep','Okt','Nov','Dec'], + dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ä´aÅ­do','Vendredo','Sabato'], + dayNamesShort: ['Dim','Lun','Mar','Mer','Ä´aÅ­','Ven','Sab'], + dayNamesMin: ['Di','Lu','Ma','Me','Ä´a','Ve','Sa'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['eo']); +}); +/* Inicializaci�n en espa�ol para la extensi�n 'UI date picker' para jQuery. */ +/* Traducido por Vester (xvester@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['es'] = { + closeText: 'Cerrar', + prevText: '<Ant', + nextText: 'Sig>', + currentText: 'Hoy', + monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', + 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'], + monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun', + 'Jul','Ago','Sep','Oct','Nov','Dic'], + dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'], + dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], + dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['es']); +});/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */ +/* Javad Mowlanezhad -- jmowla@gmail.com */ +/* Jalali calendar should supported soon! (Its implemented but I have to test it) */ +jQuery(function($) { + $.datepicker.regional['fa'] = { + closeText: 'بستن', + prevText: '<قبلي', + nextText: 'بعدي>', + currentText: 'امروز', + monthNames: ['فروردين','ارديبهشت','خرداد','تير','مرداد','شهريور', + 'مهر','آبان','آذر','دي','بهمن','اسفند'], + monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], + dayNames: ['يکشنبه','دوشنبه','سه‌شنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'], + dayNamesShort: ['ي','د','س','چ','Ù¾','ج', 'Ø´'], + dayNamesMin: ['ي','د','س','چ','Ù¾','ج', 'Ø´'], + dateFormat: 'yy/mm/dd', firstDay: 6, + isRTL: true}; + $.datepicker.setDefaults($.datepicker.regional['fa']); +});/* Finnish initialisation for the jQuery UI date picker plugin. */ +/* Written by Harri Kilpi� (harrikilpio@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['fi'] = { + closeText: 'Sulje', + prevText: '«Edellinen', + nextText: 'Seuraava»', + currentText: 'Tänään', + monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu', + 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'], + monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä', + 'Heinä','Elo','Syys','Loka','Marras','Joulu'], + dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'], + dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'], + dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['fi']); +}); +/* French initialisation for the jQuery UI date picker plugin. */ +/* Written by Keith Wood (kbwood@virginbroadband.com.au) and Stéphane Nahmani (sholby@sholby.net). */ +jQuery(function($){ + $.datepicker.regional['fr'] = { + closeText: 'Fermer', + prevText: '<Préc', + nextText: 'Suiv>', + currentText: 'Courant', + monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin', + 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'], + monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun', + 'Jul','Aoû','Sep','Oct','Nov','Déc'], + dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], + dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'], + dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'], + dateFormat: 'dd/mm/yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['fr']); +});/* Hebrew initialisation for the UI Datepicker extension. */ +/* Written by Amir Hardon (ahardon at gmail dot com). */ +jQuery(function($){ + $.datepicker.regional['he'] = { + closeText: 'סגור', + prevText: '<הקודם', + nextText: 'הבא>', + currentText: 'היום', + monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני', + 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'], + monthNamesShort: ['1','2','3','4','5','6', + '7','8','9','10','11','12'], + dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'], + dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], + dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: true}; + $.datepicker.setDefaults($.datepicker.regional['he']); +}); +/* Croatian i18n for the jQuery UI date picker plugin. */ +/* Written by Vjekoslav Nesek. */ +jQuery(function($){ + $.datepicker.regional['hr'] = { + closeText: 'Zatvori', + prevText: '<', + nextText: '>', + currentText: 'Danas', + monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipani', + 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'], + monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip', + 'Srp','Kol','Ruj','Lis','Stu','Pro'], + dayNames: ['Nedjalja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'], + dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'], + dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], + dateFormat: 'dd.mm.yy.', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['hr']); +});/* Hungarian initialisation for the jQuery UI date picker plugin. */ +/* Written by Istvan Karaszi (jquerycalendar@spam.raszi.hu). */ +jQuery(function($){ + $.datepicker.regional['hu'] = { + closeText: 'bezárás', + prevText: '« vissza', + nextText: 'előre »', + currentText: 'ma', + monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június', + 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'], + monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún', + 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'], + dayNames: ['Vasámap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'], + dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'], + dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'], + dateFormat: 'yy-mm-dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['hu']); +}); +/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/ +jQuery(function($){ + $.datepicker.regional['hy'] = { + closeText: 'Փակել', + prevText: '<Նախ.', + nextText: 'Հաջ.>', + currentText: 'Այսօր', + monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս', + 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'], + monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս', + 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Ô´Õ¥Õ¯'], + dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','Õ°Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«','ուրբաթ','Õ·Õ¡Õ¢Õ¡Õ©'], + dayNamesShort: ['կիր','երկ','երք','չրք','Õ°Õ¶Õ£','ուրբ','Õ·Õ¢Õ©'], + dayNamesMin: ['կիր','երկ','երք','չրք','Õ°Õ¶Õ£','ուրբ','Õ·Õ¢Õ©'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['hy']); +});/* Indonesian initialisation for the jQuery UI date picker plugin. */ +/* Written by Deden Fathurahman (dedenf@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['id'] = { + closeText: 'Tutup', + prevText: '<mundur', + nextText: 'maju>', + currentText: 'hari ini', + monthNames: ['Januari','Februari','Maret','April','Mei','Juni', + 'Juli','Agustus','September','Oktober','Nopember','Desember'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun', + 'Jul','Agus','Sep','Okt','Nop','Des'], + dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'], + dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'], + dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['id']); +});/* Icelandic initialisation for the jQuery UI date picker plugin. */ +/* Written by Haukur H. Thorsson (haukur@eskill.is). */ +jQuery(function($){ + $.datepicker.regional['is'] = { + closeText: 'Loka', + prevText: '< Fyrri', + nextText: 'Næsti >', + currentText: 'Í dag', + monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní', + 'Júlí','Ágúst','September','Október','Nóvember','Desember'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún', + 'Júl','Ágú','Sep','Okt','Nóv','Des'], + dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'], + dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'], + dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['is']); +});/* Italian initialisation for the jQuery UI date picker plugin. */ +/* Written by Apaella (apaella@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['it'] = { + closeText: 'Chiudi', + prevText: '<Prec', + nextText: 'Succ>', + currentText: 'Oggi', + monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno', + 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'], + monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu', + 'Lug','Ago','Set','Ott','Nov','Dic'], + dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'], + dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'], + dayNamesMin: ['Do','Lu','Ma','Me','Gio','Ve','Sa'], + dateFormat: 'dd/mm/yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['it']); +}); +/* Japanese initialisation for the jQuery UI date picker plugin. */ +/* Written by Kentaro SATO (kentaro@ranvis.com). */ +jQuery(function($){ + $.datepicker.regional['ja'] = { + closeText: '閉じる', + prevText: '<前', + nextText: '次>', + currentText: '今日', + monthNames: ['1月','2月','3月','4月','5月','6月', + '7月','8月','9月','10月','11月','12月'], + monthNamesShort: ['1月','2月','3月','4月','5月','6月', + '7月','8月','9月','10月','11月','12月'], + dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'], + dayNamesShort: ['日','月','火','æ°´','木','金','土'], + dayNamesMin: ['日','月','火','æ°´','木','金','土'], + dateFormat: 'yy/mm/dd', firstDay: 0, + isRTL: false, + showMonthAfterYear: true}; + $.datepicker.setDefaults($.datepicker.regional['ja']); +});/* Korean initialisation for the jQuery calendar extension. */ +/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['ko'] = { + closeText: '닫기', + prevText: '이전달', + nextText: '다음달', + currentText: '오늘', + monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)', + '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'], + monthNamesShort: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)', + '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'], + dayNames: ['일','월','화','수','목','금','토'], + dayNamesShort: ['일','월','화','수','목','금','토'], + dayNamesMin: ['일','월','화','수','목','금','토'], + dateFormat: 'yy-mm-dd', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['ko']); +});/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* @author Arturas Paleicikas */ +jQuery(function($){ + $.datepicker.regional['lt'] = { + closeText: 'Uždaryti', + prevText: '<Atgal', + nextText: 'Pirmyn>', + currentText: 'Å iandien', + monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis', + 'Liepa','RugpjÅ«tis','Rugsėjis','Spalis','Lapkritis','Gruodis'], + monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir', + 'Lie','Rugp','Rugs','Spa','Lap','Gru'], + dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','Å¡eÅ¡tadienis'], + dayNamesShort: ['sek','pir','ant','tre','ket','pen','Å¡eÅ¡'], + dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Å e'], + dateFormat: 'yy-mm-dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['lt']); +});/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* @author Arturas Paleicikas */ +jQuery(function($){ + $.datepicker.regional['lv'] = { + closeText: 'Aizvērt', + prevText: 'Iepr', + nextText: 'Nāka', + currentText: 'Å odien', + monthNames: ['Janvāris','Februāris','Marts','AprÄ«lis','Maijs','JÅ«nijs', + 'JÅ«lijs','Augusts','Septembris','Oktobris','Novembris','Decembris'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','JÅ«n', + 'JÅ«l','Aug','Sep','Okt','Nov','Dec'], + dayNames: ['svētdiena','pirmdiena','otrdiena','treÅ¡diena','ceturtdiena','piektdiena','sestdiena'], + dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'], + dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'], + dateFormat: 'dd-mm-yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['lv']); +});/* Malaysian initialisation for the jQuery UI date picker plugin. */ +/* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */ +jQuery(function($){ + $.datepicker.regional['ms'] = { + closeText: 'Tutup', + prevText: '<Sebelum', + nextText: 'Selepas>', + currentText: 'hari ini', + monthNames: ['Januari','Februari','Mac','April','Mei','Jun', + 'Julai','Ogos','September','Oktober','November','Disember'], + monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun', + 'Jul','Ogo','Sep','Okt','Nov','Dis'], + dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'], + dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'], + dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['ms']); +});/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Mathias Bynens */ +jQuery(function($){ + $.datepicker.regional.nl = { + closeText: 'Sluiten', + prevText: '←', + nextText: '→', + currentText: 'Vandaag', + monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', + 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], + monthNamesShort: ['jan', 'feb', 'maa', 'apr', 'mei', 'jun', + 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], + dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], + dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'], + dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], + dateFormat: 'dd/mm/yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional.nl); +});/* Norwegian initialisation for the jQuery UI date picker plugin. */ +/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['no'] = { + closeText: 'Lukk', + prevText: '«Forrige', + nextText: 'Neste»', + currentText: 'I dag', + monthNames: ['Januar','Februar','Mars','April','Mai','Juni', + 'Juli','August','September','Oktober','November','Desember'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun', + 'Jul','Aug','Sep','Okt','Nov','Des'], + dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], + dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], + dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], + dateFormat: 'yy-mm-dd', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['no']); +}); +/* Polish initialisation for the jQuery UI date picker plugin. */ +/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['pl'] = { + closeText: 'Zamknij', + prevText: '<Poprzedni', + nextText: 'Następny>', + currentText: 'Dziś', + monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec', + 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'], + monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze', + 'Lip','Sie','Wrz','Pa','Lis','Gru'], + dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'], + dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'], + dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'], + dateFormat: 'yy-mm-dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['pl']); +}); +/* Brazilian initialisation for the jQuery UI date picker plugin. */ +/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['pt-BR'] = { + closeText: 'Fechar', + prevText: '<Anterior', + nextText: 'Próximo>', + currentText: 'Hoje', + monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', + 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], + monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', + 'Jul','Ago','Set','Out','Nov','Dez'], + dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'], + dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'], + dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['pt-BR']); +});/* Romanian initialisation for the jQuery UI date picker plugin. */ +/* Written by Edmond L. (ll_edmond@walla.com). */ +jQuery(function($){ + $.datepicker.regional['ro'] = { + closeText: 'Inchide', + prevText: '<Anterior', + nextText: 'Urmator>', + currentText: 'Azi', + monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Junie', + 'Julie','August','Septembrie','Octobrie','Noiembrie','Decembrie'], + monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Noi', 'Dec'], + dayNames: ['Duminica', 'Luni', 'Marti', 'Miercuri', 'Joi', 'Vineri', 'Sambata'], + dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sam'], + dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sa'], + dateFormat: 'mm/dd/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['ro']); +}); +/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Andrew Stromnov (stromnov@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['ru'] = { + closeText: 'Закрыть', + prevText: '<Пред', + nextText: 'След>', + currentText: 'Сегодня', + monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь', + 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'], + monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн', + 'Июл','Авг','Сен','Окт','Ноя','Дек'], + dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'], + dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'], + dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['ru']); +});/* Slovak initialisation for the jQuery UI date picker plugin. */ +/* Written by Vojtech Rinik (vojto@hmm.sk). */ +jQuery(function($){ + $.datepicker.regional['sk'] = { + closeText: 'ZavrieÅ¥', + prevText: '<Predchádzajúci', + nextText: 'Nasledujúci>', + currentText: 'Dnes', + monthNames: ['Január','Február','Marec','Apríl','Máj','Jún', + 'Júl','August','September','Október','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún', + 'Júl','Aug','Sep','Okt','Nov','Dec'], + dayNames: ['Nedel\'a','Pondelok','Utorok','Streda','Å tvrtok','Piatok','Sobota'], + dayNamesShort: ['Ned','Pon','Uto','Str','Å tv','Pia','Sob'], + dayNamesMin: ['Ne','Po','Ut','St','Å t','Pia','So'], + dateFormat: 'dd.mm.yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['sk']); +}); +/* Slovenian initialisation for the jQuery UI date picker plugin. */ +/* Written by Jaka Jancar (jaka@kubje.org). */ +/* c = č, s = š z = ž C = Č S = Š Z = Ž */ +jQuery(function($){ + $.datepicker.regional['sl'] = { + closeText: 'Zapri', + prevText: '<Prejšnji', + nextText: 'Naslednji>', + currentText: 'Trenutni', + monthNames: ['Januar','Februar','Marec','April','Maj','Junij', + 'Julij','Avgust','September','Oktober','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Avg','Sep','Okt','Nov','Dec'], + dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'], + dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'], + dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['sl']); +}); +/* Albanian initialisation for the jQuery UI date picker plugin. */ +/* Written by Flakron Bytyqi (flakron@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['sq'] = { + closeText: 'mbylle', + prevText: '<mbrapa', + nextText: 'Përpara>', + currentText: 'sot', + monthNames: ['Janar','Shkurt','Mars','Pril','Maj','Qershor', + 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'], + monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer', + 'Kor','Gus','Sht','Tet','Nën','Dhj'], + dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'], + dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'], + dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['sq']); +}); +/* Swedish initialisation for the jQuery UI date picker plugin. */ +/* Written by Anders Ekdahl ( anders@nomadiz.se). */ +jQuery(function($){ + $.datepicker.regional['sv'] = { + closeText: 'Stäng', + prevText: '«Förra', + nextText: 'Nästa»', + currentText: 'Idag', + monthNames: ['Januari','Februari','Mars','April','Maj','Juni', + 'Juli','Augusti','September','Oktober','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Aug','Sep','Okt','Nov','Dec'], + dayNamesShort: ['Sön','MÃ¥n','Tis','Ons','Tor','Fre','Lör'], + dayNames: ['Söndag','MÃ¥ndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'], + dayNamesMin: ['Sö','MÃ¥','Ti','On','To','Fr','Lö'], + dateFormat: 'yy-mm-dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['sv']); +}); +/* Thai initialisation for the jQuery UI date picker plugin. */ +/* Written by pipo (pipo@sixhead.com). */ +jQuery(function($){ + $.datepicker.regional['th'] = { + closeText: 'ปิด', + prevText: '« à¸¢à¹‰à¸­à¸™', + nextText: 'ถัดไป »', + currentText: 'วันนี้', + monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน', + 'กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'], + monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.', + 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'], + dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'], + dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], + dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['th']); +});/* Turkish initialisation for the jQuery UI date picker plugin. */ +/* Written by Izzet Emre Erkan (kara@karalamalar.net). */ +jQuery(function($){ + $.datepicker.regional['tr'] = { + closeText: 'kapat', + prevText: '<geri', + nextText: 'ileri>', + currentText: 'bugün', + monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran', + 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'], + monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz', + 'Tem','Ağu','Eyl','Eki','Kas','Ara'], + dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'], + dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], + dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['tr']); +});/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['uk'] = { + closeText: 'Закрити', + prevText: '<', + nextText: '>', + currentText: 'Сьогодні', + monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень', + 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'], + monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер', + 'Лип','Сер','Вер','Жов','Лис','Гру'], + dayNames: ['неділя','понеділок','вівторок','середа','четвер','пятниця','суббота'], + dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'], + dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['uk']); +});/* Chinese initialisation for the jQuery UI date picker plugin. */ +/* Written by Cloudream (cloudream@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['zh-CN'] = { + closeText: '关闭', + prevText: '<上月', + nextText: '下月>', + currentText: '今天', + monthNames: ['一月','二月','三月','四月','五月','六月', + '七月','八月','九月','十月','十一月','十二月'], + monthNamesShort: ['一','二','三','四','五','六', + '七','八','九','十','十一','十二'], + dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], + dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], + dayNamesMin: ['日','一','二','三','四','五','六'], + dateFormat: 'yy-mm-dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['zh-CN']); +}); +/* Chinese initialisation for the jQuery UI date picker plugin. */ +/* Written by Ressol (ressol@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['zh-TW'] = { + closeText: '關閉', + prevText: '<上月', + nextText: '下月>', + currentText: '今天', + monthNames: ['一月','二月','三月','四月','五月','六月', + '七月','八月','九月','十月','十一月','十二月'], + monthNamesShort: ['一','二','三','四','五','六', + '七','八','九','十','十一','十二'], + dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], + dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], + dayNamesMin: ['日','一','二','三','四','五','六'], + dateFormat: 'yy/mm/dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['zh-TW']); +}); diff --git a/www/js/i18n/ui.datepicker-ar.js b/www/js/i18n/ui.datepicker-ar.js new file mode 100755 index 0000000..b605878 --- /dev/null +++ b/www/js/i18n/ui.datepicker-ar.js @@ -0,0 +1,20 @@ +/* Arabic Translation for jQuery UI date picker plugin. */ +/* Khaled Al Horani -- koko.dw@gmail.com */ +/* خالد الحوراني -- koko.dw@gmail.com */ +/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */ +jQuery(function($){ + $.datepicker.regional['ar'] = { + closeText: 'إغلاق', + prevText: '<السابق', + nextText: 'التالي>', + currentText: 'اليوم', + monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران', + 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], + monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], + dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'], + dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'], + dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: true}; + $.datepicker.setDefaults($.datepicker.regional['ar']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-bg.js b/www/js/i18n/ui.datepicker-bg.js new file mode 100755 index 0000000..a73884e --- /dev/null +++ b/www/js/i18n/ui.datepicker-bg.js @@ -0,0 +1,20 @@ +/* Bulgarian initialisation for the jQuery UI date picker plugin. */ +/* Written by Stoyan Kyosev (http://svest.org). */ +jQuery(function($){ + $.datepicker.regional['bg'] = { + closeText: 'затвори', + prevText: '<назад', + nextText: 'напред>', + nextBigText: '>>', + currentText: 'днес', + monthNames: ['Януари','Февруари','Март','Април','Май','Юни', + 'Юли','Август','Септември','Октомври','Ноември','Декември'], + monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни', + 'Юли','Авг','Сеп','Окт','Нов','Дек'], + dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'], + dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'], + dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['bg']); +}); diff --git a/www/js/i18n/ui.datepicker-ca.js b/www/js/i18n/ui.datepicker-ca.js new file mode 100755 index 0000000..ad47af0 --- /dev/null +++ b/www/js/i18n/ui.datepicker-ca.js @@ -0,0 +1,19 @@ +/* Inicialitzaci� en catal� per a l'extenci� 'calendar' per jQuery. */ +/* Writers: (joan.leon@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['ca'] = { + closeText: 'Tancar', + prevText: '<Ant', + nextText: 'Seg>', + currentText: 'Avui', + monthNames: ['Gener','Febrer','Març','Abril','Maig','Juny', + 'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'], + monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun', + 'Jul','Ago','Set','Oct','Nov','Des'], + dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'], + dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'], + dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'], + dateFormat: 'mm/dd/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['ca']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-cs.js b/www/js/i18n/ui.datepicker-cs.js new file mode 100755 index 0000000..334ae2f --- /dev/null +++ b/www/js/i18n/ui.datepicker-cs.js @@ -0,0 +1,19 @@ +/* Czech initialisation for the jQuery UI date picker plugin. */ +/* Written by Tomas Muller (tomas@tomas-muller.net). */ +jQuery(function($){ + $.datepicker.regional['cs'] = { + closeText: 'Zavřít', + prevText: '<Dříve', + nextText: 'Později>', + currentText: 'Nyní', + monthNames: ['leden','únor','březen','duben','květen','červen', + 'červenec','srpen','září','říjen','listopad','prosinec'], + monthNamesShort: ['led','úno','bře','dub','kvě','čer', + 'čvc','srp','zář','říj','lis','pro'], + dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'], + dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'], + dayNamesMin: ['ne','po','út','st','čt','pá','so'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['cs']); +}); diff --git a/www/js/i18n/ui.datepicker-da.js b/www/js/i18n/ui.datepicker-da.js new file mode 100755 index 0000000..8ad1e2c --- /dev/null +++ b/www/js/i18n/ui.datepicker-da.js @@ -0,0 +1,19 @@ +/* Danish initialisation for the jQuery UI date picker plugin. */ +/* Written by Jan Christensen ( deletestuff@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['da'] = { + closeText: 'Luk', + prevText: '<Forrige', + nextText: 'Næste>', + currentText: 'Idag', + monthNames: ['Januar','Februar','Marts','April','Maj','Juni', + 'Juli','August','September','Oktober','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Aug','Sep','Okt','Nov','Dec'], + dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], + dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], + dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], + dateFormat: 'dd-mm-yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['da']); +}); diff --git a/www/js/i18n/ui.datepicker-de.js b/www/js/i18n/ui.datepicker-de.js new file mode 100755 index 0000000..f9299c8 --- /dev/null +++ b/www/js/i18n/ui.datepicker-de.js @@ -0,0 +1,19 @@ +/* German initialisation for the jQuery UI date picker plugin. */ +/* Written by Milian Wolff (mail@milianw.de). */ +jQuery(function($){ + $.datepicker.regional['de'] = { + closeText: 'schließen', + prevText: '<zurück', + nextText: 'Vor>', + currentText: 'heute', + monthNames: ['Januar','Februar','März','April','Mai','Juni', + 'Juli','August','September','Oktober','November','Dezember'], + monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', + 'Jul','Aug','Sep','Okt','Nov','Dez'], + dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], + dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], + dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['de']); +}); diff --git a/www/js/i18n/ui.datepicker-el.js b/www/js/i18n/ui.datepicker-el.js new file mode 100755 index 0000000..535080d --- /dev/null +++ b/www/js/i18n/ui.datepicker-el.js @@ -0,0 +1,19 @@ +/* Greek (el) initialisation for the jQuery UI date picker plugin. */ +/* Written by Alex Cicovic (http://www.alexcicovic.com) */ +jQuery(function($){ + $.datepicker.regional['el'] = { + closeText: 'Κλείσιμο', + prevText: 'Προηγούμενος', + nextText: 'Επόμενος', + currentText: 'Τρέχων Μήνας', + monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος', + 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'], + monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν', + 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'], + dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'], + dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'], + dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'], + dateFormat: 'dd/mm/yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['el']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-eo.js b/www/js/i18n/ui.datepicker-eo.js new file mode 100755 index 0000000..28abac4 --- /dev/null +++ b/www/js/i18n/ui.datepicker-eo.js @@ -0,0 +1,19 @@ +/* Esperanto initialisation for the jQuery UI date picker plugin. */ +/* Written by Olivier M. (olivierweb@ifrance.com). */ +jQuery(function($){ + $.datepicker.regional['eo'] = { + closeText: 'Fermi', + prevText: '<Anta', + nextText: 'Sekv>', + currentText: 'Nuna', + monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio', + 'Julio','AÅ­gusto','Septembro','Oktobro','Novembro','Decembro'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','AÅ­g','Sep','Okt','Nov','Dec'], + dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ä´aÅ­do','Vendredo','Sabato'], + dayNamesShort: ['Dim','Lun','Mar','Mer','Ä´aÅ­','Ven','Sab'], + dayNamesMin: ['Di','Lu','Ma','Me','Ä´a','Ve','Sa'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['eo']); +}); diff --git a/www/js/i18n/ui.datepicker-es.js b/www/js/i18n/ui.datepicker-es.js new file mode 100755 index 0000000..0a699af --- /dev/null +++ b/www/js/i18n/ui.datepicker-es.js @@ -0,0 +1,19 @@ +/* Inicializaci�n en espa�ol para la extensi�n 'UI date picker' para jQuery. */ +/* Traducido por Vester (xvester@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['es'] = { + closeText: 'Cerrar', + prevText: '<Ant', + nextText: 'Sig>', + currentText: 'Hoy', + monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', + 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'], + monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun', + 'Jul','Ago','Sep','Oct','Nov','Dic'], + dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'], + dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], + dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['es']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-fa.js b/www/js/i18n/ui.datepicker-fa.js new file mode 100755 index 0000000..e40e1ac --- /dev/null +++ b/www/js/i18n/ui.datepicker-fa.js @@ -0,0 +1,19 @@ +/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */ +/* Javad Mowlanezhad -- jmowla@gmail.com */ +/* Jalali calendar should supported soon! (Its implemented but I have to test it) */ +jQuery(function($) { + $.datepicker.regional['fa'] = { + closeText: 'بستن', + prevText: '<قبلي', + nextText: 'بعدي>', + currentText: 'امروز', + monthNames: ['فروردين','ارديبهشت','خرداد','تير','مرداد','شهريور', + 'مهر','آبان','آذر','دي','بهمن','اسفند'], + monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], + dayNames: ['يکشنبه','دوشنبه','سه‌شنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'], + dayNamesShort: ['ي','د','س','چ','Ù¾','ج', 'Ø´'], + dayNamesMin: ['ي','د','س','چ','Ù¾','ج', 'Ø´'], + dateFormat: 'yy/mm/dd', firstDay: 6, + isRTL: true}; + $.datepicker.setDefaults($.datepicker.regional['fa']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-fi.js b/www/js/i18n/ui.datepicker-fi.js new file mode 100755 index 0000000..3a0943f --- /dev/null +++ b/www/js/i18n/ui.datepicker-fi.js @@ -0,0 +1,19 @@ +/* Finnish initialisation for the jQuery UI date picker plugin. */ +/* Written by Harri Kilpi� (harrikilpio@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['fi'] = { + closeText: 'Sulje', + prevText: '«Edellinen', + nextText: 'Seuraava»', + currentText: 'Tänään', + monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu', + 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'], + monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä', + 'Heinä','Elo','Syys','Loka','Marras','Joulu'], + dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'], + dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'], + dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['fi']); +}); diff --git a/www/js/i18n/ui.datepicker-fr.js b/www/js/i18n/ui.datepicker-fr.js new file mode 100755 index 0000000..02edda2 --- /dev/null +++ b/www/js/i18n/ui.datepicker-fr.js @@ -0,0 +1,19 @@ +/* French initialisation for the jQuery UI date picker plugin. */ +/* Written by Keith Wood (kbwood@virginbroadband.com.au) and Stéphane Nahmani (sholby@sholby.net). */ +jQuery(function($){ + $.datepicker.regional['fr'] = { + closeText: 'Fermer', + prevText: '<Préc', + nextText: 'Suiv>', + currentText: 'Courant', + monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin', + 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'], + monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun', + 'Jul','Aoû','Sep','Oct','Nov','Déc'], + dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], + dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'], + dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'], + dateFormat: 'dd/mm/yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['fr']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-he.js b/www/js/i18n/ui.datepicker-he.js new file mode 100755 index 0000000..38e0a03 --- /dev/null +++ b/www/js/i18n/ui.datepicker-he.js @@ -0,0 +1,19 @@ +/* Hebrew initialisation for the UI Datepicker extension. */ +/* Written by Amir Hardon (ahardon at gmail dot com). */ +jQuery(function($){ + $.datepicker.regional['he'] = { + closeText: 'סגור', + prevText: '<הקודם', + nextText: 'הבא>', + currentText: 'היום', + monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני', + 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'], + monthNamesShort: ['1','2','3','4','5','6', + '7','8','9','10','11','12'], + dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'], + dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], + dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: true}; + $.datepicker.setDefaults($.datepicker.regional['he']); +}); diff --git a/www/js/i18n/ui.datepicker-hr.js b/www/js/i18n/ui.datepicker-hr.js new file mode 100755 index 0000000..78e4006 --- /dev/null +++ b/www/js/i18n/ui.datepicker-hr.js @@ -0,0 +1,19 @@ +/* Croatian i18n for the jQuery UI date picker plugin. */ +/* Written by Vjekoslav Nesek. */ +jQuery(function($){ + $.datepicker.regional['hr'] = { + closeText: 'Zatvori', + prevText: '<', + nextText: '>', + currentText: 'Danas', + monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipani', + 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'], + monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip', + 'Srp','Kol','Ruj','Lis','Stu','Pro'], + dayNames: ['Nedjalja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'], + dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'], + dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], + dateFormat: 'dd.mm.yy.', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['hr']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-hu.js b/www/js/i18n/ui.datepicker-hu.js new file mode 100755 index 0000000..ee102ac --- /dev/null +++ b/www/js/i18n/ui.datepicker-hu.js @@ -0,0 +1,19 @@ +/* Hungarian initialisation for the jQuery UI date picker plugin. */ +/* Written by Istvan Karaszi (jquerycalendar@spam.raszi.hu). */ +jQuery(function($){ + $.datepicker.regional['hu'] = { + closeText: 'bezárás', + prevText: '« vissza', + nextText: 'előre »', + currentText: 'ma', + monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június', + 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'], + monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún', + 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'], + dayNames: ['Vasámap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'], + dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'], + dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'], + dateFormat: 'yy-mm-dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['hu']); +}); diff --git a/www/js/i18n/ui.datepicker-hy.js b/www/js/i18n/ui.datepicker-hy.js new file mode 100755 index 0000000..1ffbeaa --- /dev/null +++ b/www/js/i18n/ui.datepicker-hy.js @@ -0,0 +1,19 @@ +/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/ +jQuery(function($){ + $.datepicker.regional['hy'] = { + closeText: 'Փակել', + prevText: '<Նախ.', + nextText: 'Հաջ.>', + currentText: 'Այսօր', + monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս', + 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'], + monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս', + 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Ô´Õ¥Õ¯'], + dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','Õ°Õ«Õ¶Õ£Õ·Õ¡Õ¢Õ©Õ«','ուրբաթ','Õ·Õ¡Õ¢Õ¡Õ©'], + dayNamesShort: ['կիր','երկ','երք','չրք','Õ°Õ¶Õ£','ուրբ','Õ·Õ¢Õ©'], + dayNamesMin: ['կիր','երկ','երք','չրք','Õ°Õ¶Õ£','ուրբ','Õ·Õ¢Õ©'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['hy']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-id.js b/www/js/i18n/ui.datepicker-id.js new file mode 100755 index 0000000..e5246c8 --- /dev/null +++ b/www/js/i18n/ui.datepicker-id.js @@ -0,0 +1,19 @@ +/* Indonesian initialisation for the jQuery UI date picker plugin. */ +/* Written by Deden Fathurahman (dedenf@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['id'] = { + closeText: 'Tutup', + prevText: '<mundur', + nextText: 'maju>', + currentText: 'hari ini', + monthNames: ['Januari','Februari','Maret','April','Mei','Juni', + 'Juli','Agustus','September','Oktober','Nopember','Desember'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun', + 'Jul','Agus','Sep','Okt','Nop','Des'], + dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'], + dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'], + dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['id']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-is.js b/www/js/i18n/ui.datepicker-is.js new file mode 100755 index 0000000..68c1a07 --- /dev/null +++ b/www/js/i18n/ui.datepicker-is.js @@ -0,0 +1,19 @@ +/* Icelandic initialisation for the jQuery UI date picker plugin. */ +/* Written by Haukur H. Thorsson (haukur@eskill.is). */ +jQuery(function($){ + $.datepicker.regional['is'] = { + closeText: 'Loka', + prevText: '< Fyrri', + nextText: 'Næsti >', + currentText: 'Í dag', + monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní', + 'Júlí','Ágúst','September','Október','Nóvember','Desember'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún', + 'Júl','Ágú','Sep','Okt','Nóv','Des'], + dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'], + dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'], + dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['is']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-it.js b/www/js/i18n/ui.datepicker-it.js new file mode 100755 index 0000000..f3e691e --- /dev/null +++ b/www/js/i18n/ui.datepicker-it.js @@ -0,0 +1,19 @@ +/* Italian initialisation for the jQuery UI date picker plugin. */ +/* Written by Apaella (apaella@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['it'] = { + closeText: 'Chiudi', + prevText: '<Prec', + nextText: 'Succ>', + currentText: 'Oggi', + monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno', + 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'], + monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu', + 'Lug','Ago','Set','Ott','Nov','Dic'], + dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'], + dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'], + dayNamesMin: ['Do','Lu','Ma','Me','Gio','Ve','Sa'], + dateFormat: 'dd/mm/yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['it']); +}); diff --git a/www/js/i18n/ui.datepicker-ja.js b/www/js/i18n/ui.datepicker-ja.js new file mode 100755 index 0000000..a6a5f45 --- /dev/null +++ b/www/js/i18n/ui.datepicker-ja.js @@ -0,0 +1,20 @@ +/* Japanese initialisation for the jQuery UI date picker plugin. */ +/* Written by Kentaro SATO (kentaro@ranvis.com). */ +jQuery(function($){ + $.datepicker.regional['ja'] = { + closeText: '閉じる', + prevText: '<前', + nextText: '次>', + currentText: '今日', + monthNames: ['1月','2月','3月','4月','5月','6月', + '7月','8月','9月','10月','11月','12月'], + monthNamesShort: ['1月','2月','3月','4月','5月','6月', + '7月','8月','9月','10月','11月','12月'], + dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'], + dayNamesShort: ['日','月','火','æ°´','木','金','土'], + dayNamesMin: ['日','月','火','æ°´','木','金','土'], + dateFormat: 'yy/mm/dd', firstDay: 0, + isRTL: false, + showMonthAfterYear: true}; + $.datepicker.setDefaults($.datepicker.regional['ja']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-ko.js b/www/js/i18n/ui.datepicker-ko.js new file mode 100755 index 0000000..53ede91 --- /dev/null +++ b/www/js/i18n/ui.datepicker-ko.js @@ -0,0 +1,19 @@ +/* Korean initialisation for the jQuery calendar extension. */ +/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['ko'] = { + closeText: '닫기', + prevText: '이전달', + nextText: '다음달', + currentText: '오늘', + monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)', + '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'], + monthNamesShort: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)', + '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'], + dayNames: ['일','월','화','수','목','금','토'], + dayNamesShort: ['일','월','화','수','목','금','토'], + dayNamesMin: ['일','월','화','수','목','금','토'], + dateFormat: 'yy-mm-dd', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['ko']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-lt.js b/www/js/i18n/ui.datepicker-lt.js new file mode 100755 index 0000000..a8a6aa1 --- /dev/null +++ b/www/js/i18n/ui.datepicker-lt.js @@ -0,0 +1,19 @@ +/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* @author Arturas Paleicikas */ +jQuery(function($){ + $.datepicker.regional['lt'] = { + closeText: 'Uždaryti', + prevText: '<Atgal', + nextText: 'Pirmyn>', + currentText: 'Å iandien', + monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis', + 'Liepa','RugpjÅ«tis','Rugsėjis','Spalis','Lapkritis','Gruodis'], + monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir', + 'Lie','Rugp','Rugs','Spa','Lap','Gru'], + dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','Å¡eÅ¡tadienis'], + dayNamesShort: ['sek','pir','ant','tre','ket','pen','Å¡eÅ¡'], + dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Å e'], + dateFormat: 'yy-mm-dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['lt']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-lv.js b/www/js/i18n/ui.datepicker-lv.js new file mode 100755 index 0000000..12c32f8 --- /dev/null +++ b/www/js/i18n/ui.datepicker-lv.js @@ -0,0 +1,19 @@ +/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* @author Arturas Paleicikas */ +jQuery(function($){ + $.datepicker.regional['lv'] = { + closeText: 'Aizvērt', + prevText: 'Iepr', + nextText: 'Nāka', + currentText: 'Å odien', + monthNames: ['Janvāris','Februāris','Marts','AprÄ«lis','Maijs','JÅ«nijs', + 'JÅ«lijs','Augusts','Septembris','Oktobris','Novembris','Decembris'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','JÅ«n', + 'JÅ«l','Aug','Sep','Okt','Nov','Dec'], + dayNames: ['svētdiena','pirmdiena','otrdiena','treÅ¡diena','ceturtdiena','piektdiena','sestdiena'], + dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'], + dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'], + dateFormat: 'dd-mm-yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['lv']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-ms.js b/www/js/i18n/ui.datepicker-ms.js new file mode 100755 index 0000000..fa25305 --- /dev/null +++ b/www/js/i18n/ui.datepicker-ms.js @@ -0,0 +1,19 @@ +/* Malaysian initialisation for the jQuery UI date picker plugin. */ +/* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */ +jQuery(function($){ + $.datepicker.regional['ms'] = { + closeText: 'Tutup', + prevText: '<Sebelum', + nextText: 'Selepas>', + currentText: 'hari ini', + monthNames: ['Januari','Februari','Mac','April','Mei','Jun', + 'Julai','Ogos','September','Oktober','November','Disember'], + monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun', + 'Jul','Ogo','Sep','Okt','Nov','Dis'], + dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'], + dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'], + dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['ms']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-nl.js b/www/js/i18n/ui.datepicker-nl.js new file mode 100755 index 0000000..938dc5e --- /dev/null +++ b/www/js/i18n/ui.datepicker-nl.js @@ -0,0 +1,19 @@ +/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Mathias Bynens */ +jQuery(function($){ + $.datepicker.regional.nl = { + closeText: 'Sluiten', + prevText: '←', + nextText: '→', + currentText: 'Vandaag', + monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', + 'juli', 'augustus', 'september', 'oktober', 'november', 'december'], + monthNamesShort: ['jan', 'feb', 'maa', 'apr', 'mei', 'jun', + 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'], + dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'], + dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'], + dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'], + dateFormat: 'dd/mm/yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional.nl); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-no.js b/www/js/i18n/ui.datepicker-no.js new file mode 100755 index 0000000..d81f6bb --- /dev/null +++ b/www/js/i18n/ui.datepicker-no.js @@ -0,0 +1,19 @@ +/* Norwegian initialisation for the jQuery UI date picker plugin. */ +/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['no'] = { + closeText: 'Lukk', + prevText: '«Forrige', + nextText: 'Neste»', + currentText: 'I dag', + monthNames: ['Januar','Februar','Mars','April','Mai','Juni', + 'Juli','August','September','Oktober','November','Desember'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun', + 'Jul','Aug','Sep','Okt','Nov','Des'], + dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], + dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], + dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], + dateFormat: 'yy-mm-dd', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['no']); +}); diff --git a/www/js/i18n/ui.datepicker-pl.js b/www/js/i18n/ui.datepicker-pl.js new file mode 100755 index 0000000..0ce38be --- /dev/null +++ b/www/js/i18n/ui.datepicker-pl.js @@ -0,0 +1,19 @@ +/* Polish initialisation for the jQuery UI date picker plugin. */ +/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['pl'] = { + closeText: 'Zamknij', + prevText: '<Poprzedni', + nextText: 'Następny>', + currentText: 'Dziś', + monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec', + 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'], + monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze', + 'Lip','Sie','Wrz','Pa','Lis','Gru'], + dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'], + dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'], + dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'], + dateFormat: 'yy-mm-dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['pl']); +}); diff --git a/www/js/i18n/ui.datepicker-pt-BR.js b/www/js/i18n/ui.datepicker-pt-BR.js new file mode 100755 index 0000000..e3ac652 --- /dev/null +++ b/www/js/i18n/ui.datepicker-pt-BR.js @@ -0,0 +1,19 @@ +/* Brazilian initialisation for the jQuery UI date picker plugin. */ +/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['pt-BR'] = { + closeText: 'Fechar', + prevText: '<Anterior', + nextText: 'Próximo>', + currentText: 'Hoje', + monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho', + 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], + monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', + 'Jul','Ago','Set','Out','Nov','Dez'], + dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'], + dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'], + dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['pt-BR']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-ro.js b/www/js/i18n/ui.datepicker-ro.js new file mode 100755 index 0000000..f089dc1 --- /dev/null +++ b/www/js/i18n/ui.datepicker-ro.js @@ -0,0 +1,19 @@ +/* Romanian initialisation for the jQuery UI date picker plugin. */ +/* Written by Edmond L. (ll_edmond@walla.com). */ +jQuery(function($){ + $.datepicker.regional['ro'] = { + closeText: 'Inchide', + prevText: '<Anterior', + nextText: 'Urmator>', + currentText: 'Azi', + monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Junie', + 'Julie','August','Septembrie','Octobrie','Noiembrie','Decembrie'], + monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Noi', 'Dec'], + dayNames: ['Duminica', 'Luni', 'Marti', 'Miercuri', 'Joi', 'Vineri', 'Sambata'], + dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sam'], + dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sa'], + dateFormat: 'mm/dd/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['ro']); +}); diff --git a/www/js/i18n/ui.datepicker-ru.js b/www/js/i18n/ui.datepicker-ru.js new file mode 100755 index 0000000..62752c7 --- /dev/null +++ b/www/js/i18n/ui.datepicker-ru.js @@ -0,0 +1,19 @@ +/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Andrew Stromnov (stromnov@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['ru'] = { + closeText: 'Закрыть', + prevText: '<Пред', + nextText: 'След>', + currentText: 'Сегодня', + monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь', + 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'], + monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн', + 'Июл','Авг','Сен','Окт','Ноя','Дек'], + dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'], + dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'], + dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['ru']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-sk.js b/www/js/i18n/ui.datepicker-sk.js new file mode 100755 index 0000000..a023ffa --- /dev/null +++ b/www/js/i18n/ui.datepicker-sk.js @@ -0,0 +1,19 @@ +/* Slovak initialisation for the jQuery UI date picker plugin. */ +/* Written by Vojtech Rinik (vojto@hmm.sk). */ +jQuery(function($){ + $.datepicker.regional['sk'] = { + closeText: 'ZavrieÅ¥', + prevText: '<Predchádzajúci', + nextText: 'Nasledujúci>', + currentText: 'Dnes', + monthNames: ['Január','Február','Marec','Apríl','Máj','Jún', + 'Júl','August','September','Október','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún', + 'Júl','Aug','Sep','Okt','Nov','Dec'], + dayNames: ['Nedel\'a','Pondelok','Utorok','Streda','Å tvrtok','Piatok','Sobota'], + dayNamesShort: ['Ned','Pon','Uto','Str','Å tv','Pia','Sob'], + dayNamesMin: ['Ne','Po','Ut','St','Å t','Pia','So'], + dateFormat: 'dd.mm.yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['sk']); +}); diff --git a/www/js/i18n/ui.datepicker-sl.js b/www/js/i18n/ui.datepicker-sl.js new file mode 100755 index 0000000..480a4d8 --- /dev/null +++ b/www/js/i18n/ui.datepicker-sl.js @@ -0,0 +1,20 @@ +/* Slovenian initialisation for the jQuery UI date picker plugin. */ +/* Written by Jaka Jancar (jaka@kubje.org). */ +/* c = č, s = š z = ž C = Č S = Š Z = Ž */ +jQuery(function($){ + $.datepicker.regional['sl'] = { + closeText: 'Zapri', + prevText: '<Prejšnji', + nextText: 'Naslednji>', + currentText: 'Trenutni', + monthNames: ['Januar','Februar','Marec','April','Maj','Junij', + 'Julij','Avgust','September','Oktober','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Avg','Sep','Okt','Nov','Dec'], + dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'], + dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'], + dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['sl']); +}); diff --git a/www/js/i18n/ui.datepicker-sq.js b/www/js/i18n/ui.datepicker-sq.js new file mode 100755 index 0000000..3baee0b --- /dev/null +++ b/www/js/i18n/ui.datepicker-sq.js @@ -0,0 +1,19 @@ +/* Albanian initialisation for the jQuery UI date picker plugin. */ +/* Written by Flakron Bytyqi (flakron@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['sq'] = { + closeText: 'mbylle', + prevText: '<mbrapa', + nextText: 'Përpara>', + currentText: 'sot', + monthNames: ['Janar','Shkurt','Mars','Pril','Maj','Qershor', + 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'], + monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer', + 'Kor','Gus','Sht','Tet','Nën','Dhj'], + dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'], + dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'], + dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['sq']); +}); diff --git a/www/js/i18n/ui.datepicker-sv.js b/www/js/i18n/ui.datepicker-sv.js new file mode 100755 index 0000000..47c4b24 --- /dev/null +++ b/www/js/i18n/ui.datepicker-sv.js @@ -0,0 +1,19 @@ +/* Swedish initialisation for the jQuery UI date picker plugin. */ +/* Written by Anders Ekdahl ( anders@nomadiz.se). */ +jQuery(function($){ + $.datepicker.regional['sv'] = { + closeText: 'Stäng', + prevText: '«Förra', + nextText: 'Nästa»', + currentText: 'Idag', + monthNames: ['Januari','Februari','Mars','April','Maj','Juni', + 'Juli','Augusti','September','Oktober','November','December'], + monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', + 'Jul','Aug','Sep','Okt','Nov','Dec'], + dayNamesShort: ['Sön','MÃ¥n','Tis','Ons','Tor','Fre','Lör'], + dayNames: ['Söndag','MÃ¥ndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'], + dayNamesMin: ['Sö','MÃ¥','Ti','On','To','Fr','Lö'], + dateFormat: 'yy-mm-dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['sv']); +}); diff --git a/www/js/i18n/ui.datepicker-th.js b/www/js/i18n/ui.datepicker-th.js new file mode 100755 index 0000000..3c2a02b --- /dev/null +++ b/www/js/i18n/ui.datepicker-th.js @@ -0,0 +1,19 @@ +/* Thai initialisation for the jQuery UI date picker plugin. */ +/* Written by pipo (pipo@sixhead.com). */ +jQuery(function($){ + $.datepicker.regional['th'] = { + closeText: 'ปิด', + prevText: '« à¸¢à¹‰à¸­à¸™', + nextText: 'ถัดไป »', + currentText: 'วันนี้', + monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน', + 'กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'], + monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.', + 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'], + dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'], + dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], + dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'], + dateFormat: 'dd/mm/yy', firstDay: 0, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['th']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-tr.js b/www/js/i18n/ui.datepicker-tr.js new file mode 100755 index 0000000..5817b2a --- /dev/null +++ b/www/js/i18n/ui.datepicker-tr.js @@ -0,0 +1,19 @@ +/* Turkish initialisation for the jQuery UI date picker plugin. */ +/* Written by Izzet Emre Erkan (kara@karalamalar.net). */ +jQuery(function($){ + $.datepicker.regional['tr'] = { + closeText: 'kapat', + prevText: '<geri', + nextText: 'ileri>', + currentText: 'bugün', + monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran', + 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'], + monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz', + 'Tem','Ağu','Eyl','Eki','Kas','Ara'], + dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'], + dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], + dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['tr']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-uk.js b/www/js/i18n/ui.datepicker-uk.js new file mode 100755 index 0000000..b4a182c --- /dev/null +++ b/www/js/i18n/ui.datepicker-uk.js @@ -0,0 +1,19 @@ +/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */ +/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['uk'] = { + closeText: 'Закрити', + prevText: '<', + nextText: '>', + currentText: 'Сьогодні', + monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень', + 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'], + monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер', + 'Лип','Сер','Вер','Жов','Лис','Гру'], + dayNames: ['неділя','понеділок','вівторок','середа','четвер','пятниця','суббота'], + dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'], + dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'], + dateFormat: 'dd.mm.yy', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['uk']); +}); \ No newline at end of file diff --git a/www/js/i18n/ui.datepicker-zh-CN.js b/www/js/i18n/ui.datepicker-zh-CN.js new file mode 100755 index 0000000..e3a69dc --- /dev/null +++ b/www/js/i18n/ui.datepicker-zh-CN.js @@ -0,0 +1,19 @@ +/* Chinese initialisation for the jQuery UI date picker plugin. */ +/* Written by Cloudream (cloudream@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['zh-CN'] = { + closeText: '关闭', + prevText: '<上月', + nextText: '下月>', + currentText: '今天', + monthNames: ['一月','二月','三月','四月','五月','六月', + '七月','八月','九月','十月','十一月','十二月'], + monthNamesShort: ['一','二','三','四','五','六', + '七','八','九','十','十一','十二'], + dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], + dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], + dayNamesMin: ['日','一','二','三','四','五','六'], + dateFormat: 'yy-mm-dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['zh-CN']); +}); diff --git a/www/js/i18n/ui.datepicker-zh-TW.js b/www/js/i18n/ui.datepicker-zh-TW.js new file mode 100755 index 0000000..9cb49b7 --- /dev/null +++ b/www/js/i18n/ui.datepicker-zh-TW.js @@ -0,0 +1,19 @@ +/* Chinese initialisation for the jQuery UI date picker plugin. */ +/* Written by Ressol (ressol@gmail.com). */ +jQuery(function($){ + $.datepicker.regional['zh-TW'] = { + closeText: '關閉', + prevText: '<上月', + nextText: '下月>', + currentText: '今天', + monthNames: ['一月','二月','三月','四月','五月','六月', + '七月','八月','九月','十月','十一月','十二月'], + monthNamesShort: ['一','二','三','四','五','六', + '七','八','九','十','十一','十二'], + dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], + dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], + dayNamesMin: ['日','一','二','三','四','五','六'], + dateFormat: 'yy/mm/dd', firstDay: 1, + isRTL: false}; + $.datepicker.setDefaults($.datepicker.regional['zh-TW']); +}); diff --git a/www/js/jquery-1.3.2.js b/www/js/jquery-1.3.2.js new file mode 100644 index 0000000..9263574 --- /dev/null +++ b/www/js/jquery-1.3.2.js @@ -0,0 +1,4376 @@ +/*! + * jQuery JavaScript Library v1.3.2 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) + * Revision: 6246 + */ +(function(){ + +var + // Will speed up references to window, and allows munging its name. + window = this, + // Will speed up references to undefined, and allows munging its name. + undefined, + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + // Map over the $ in case of overwrite + _$ = window.$, + + jQuery = window.jQuery = window.$ = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context ); + }, + + // A simple way to check for HTML strings or ID strings + // (both of which we optimize for) + quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, + // Is it a simple selector + isSimple = /^.[^:#\[\.,]*$/; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + this.context = selector; + return this; + } + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem && elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + var ret = jQuery( elem || [] ); + ret.context = document; + ret.selector = selector; + return ret; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return jQuery( document ).ready( selector ); + + // Make sure that old selector state is passed along + if ( selector.selector && selector.context ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return this.setArray(jQuery.isArray( selector ) ? + selector : + jQuery.makeArray(selector)); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.3.2", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num === undefined ? + + // Return a 'clean' array + Array.prototype.slice.call( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) + ret.selector = this.selector + (this.selector ? " " : "") + selector; + else if ( name ) + ret.selector = this.selector + "." + name + "(" + selector + ")"; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem && elem.jquery ? elem[0] : elem + , this ); + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( typeof name === "string" ) + if ( value === undefined ) + return this[0] && jQuery[ type || "attr" ]( this[0], name ); + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text !== "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).clone(); + + if ( this[0].parentNode ) + wrap.insertBefore( this[0] ); + + wrap.map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }).append(this); + } + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: [].push, + sort: [].sort, + splice: [].splice, + + find: function( selector ) { + if ( this.length === 1 ) { + var ret = this.pushStack( [], "find", selector ); + ret.length = 0; + jQuery.find( selector, this[0], ret ); + return ret; + } else { + return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + })), "find", selector ); + } + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var html = this.outerHTML; + if ( !html ) { + var div = this.ownerDocument.createElement("div"); + div.appendChild( this.cloneNode(true) ); + html = div.innerHTML; + } + + return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0]; + } else + return this.cloneNode(true); + }); + + // Copy the events from the original to the clone + if ( events === true ) { + var orig = this.find("*").andSelf(), i = 0; + + ret.find("*").andSelf().each(function(){ + if ( this.nodeName !== orig[i].nodeName ) + return; + + var events = jQuery.data( orig[i], "events" ); + + for ( var type in events ) { + for ( var handler in events[ type ] ) { + jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); + } + } + + i++; + }); + } + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, jQuery.grep(this, function(elem){ + return elem.nodeType === 1; + }) ), "filter", selector ); + }, + + closest: function( selector ) { + var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null, + closer = 0; + + return this.map(function(){ + var cur = this; + while ( cur && cur.ownerDocument ) { + if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) { + jQuery.data(cur, "closest", closer); + return cur; + } + cur = cur.parentNode; + closer++; + } + }); + }, + + not: function( selector ) { + if ( typeof selector === "string" ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return this.pushStack( jQuery.unique( jQuery.merge( + this.get(), + typeof selector === "string" ? + jQuery( selector ) : + jQuery.makeArray( selector ) + ))); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return !!selector && this.is( "." + selector ); + }, + + val: function( value ) { + if ( value === undefined ) { + var elem = this[0]; + + if ( elem ) { + if( jQuery.nodeName( elem, 'option' ) ) + return (elem.attributes.value || {}).specified ? elem.value : elem.text; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery(option).val(); + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + } + + // Everything else, we just grab the value + return (elem.value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + if ( typeof value === "number" ) + value += ''; + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(value); + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value === undefined ? + (this[0] ? + this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, +i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ), + "slice", Array.prototype.slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + domManip: function( args, table, callback ) { + if ( this[0] ) { + var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(), + scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ), + first = fragment.firstChild; + + if ( first ) + for ( var i = 0, l = this.length; i < l; i++ ) + callback.call( root(this[i], first), this.length > 1 || i > 0 ? + fragment.cloneNode(true) : fragment ); + + if ( scripts ) + jQuery.each( scripts, evalScript ); + } + + return this; + + function root( elem, cur ) { + return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ? + (elem.getElementsByTagName("tbody")[0] || + elem.appendChild(elem.ownerDocument.createElement("tbody"))) : + elem; + } + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy === "object" && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, + // Never move original objects, clone them + src || ( copy.length != null ? [ ] : { } ) + , copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +// exclude the following css properties to add px +var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + // cache defaultView + defaultView = document.defaultView || {}, + toString = Object.prototype.toString; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return toString.call(obj) === "[object Function]"; + }, + + isArray: function( obj ) { + return toString.call(obj) === "[object Array]"; + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" || + !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument ); + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + if ( data && /\S/.test(data) ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.support.scriptEval ) + script.appendChild( document.createTextNode( data ) ); + else + script.text = data; + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, length = object.length; + + if ( args ) { + if ( length === undefined ) { + for ( name in object ) + if ( callback.apply( object[ name ], args ) === false ) + break; + } else + for ( ; i < length; ) + if ( callback.apply( object[ i++ ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( length === undefined ) { + for ( name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames !== undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use hasClass("class") + has: function( elem, className ) { + return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force, extra ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + + if ( extra === "border" ) + return; + + jQuery.each( which, function() { + if ( !extra ) + val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + if ( extra === "margin" ) + val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0; + else + val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + } + + if ( elem.offsetWidth !== 0 ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, Math.round(val)); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style; + + // We need to handle opacity special in IE + if ( name == "opacity" && !jQuery.support.opacity ) { + ret = jQuery.attr( style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && style && style[ name ] ) + ret = style[ name ]; + + else if ( defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var computedStyle = defaultView.getComputedStyle( elem, null ); + + if ( computedStyle ) + ret = computedStyle.getPropertyValue( name ); + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var left = style.left, rsLeft = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + style.left = ret || 0; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + clean: function( elems, context, fragment ) { + context = context || document; + + // !context.createElement fails in IE with an error but returns typeof 'object' + if ( typeof context.createElement === "undefined" ) + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) { + var match = /^<(\w+)\s*\/?>$/.exec(elems[0]); + if ( match ) + return [ context.createElement( match[1] ) ]; + } + + var ret = [], scripts = [], div = context.createElement("div"); + + jQuery.each(elems, function(i, elem){ + if ( typeof elem === "number" ) + elem += ''; + + if ( !elem ) + return; + + // Convert html string into DOM nodes + if ( typeof elem === "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase(); + + var wrap = + // option or optgroup + !tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "", "
" ] || + + !tags.indexOf("", "" ] || + + // matched above + (!tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + // IE can't serialize and