From 93513c6b3c3af3bb56b8b9eebf967ffc661f9f60 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Tue, 16 Feb 2010 21:35:22 -0500 Subject: Initial model layout --- .hgignore | 2 ++ snakeplan/__init__.py | 0 snakeplan/manage.py | 11 ++++++ snakeplan/projects/__init__.py | 0 snakeplan/projects/admin.py | 32 +++++++++++++++++ snakeplan/projects/models.py | 80 +++++++++++++++++++++++++++++++++++++++++ snakeplan/projects/tests.py | 23 ++++++++++++ snakeplan/projects/views.py | 1 + snakeplan/settings.py | 55 ++++++++++++++++++++++++++++ snakeplan/snakeplan.db | Bin 0 -> 86016 bytes snakeplan/urls.py | 10 ++++++ 11 files changed, 214 insertions(+) create mode 100644 .hgignore create mode 100755 snakeplan/__init__.py create mode 100755 snakeplan/manage.py create mode 100755 snakeplan/projects/__init__.py create mode 100644 snakeplan/projects/admin.py create mode 100755 snakeplan/projects/models.py create mode 100755 snakeplan/projects/tests.py create mode 100755 snakeplan/projects/views.py create mode 100755 snakeplan/settings.py create mode 100644 snakeplan/snakeplan.db create mode 100755 snakeplan/urls.py diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..2c9154d --- /dev/null +++ b/.hgignore @@ -0,0 +1,2 @@ +syntax: glob +*.pyc diff --git a/snakeplan/__init__.py b/snakeplan/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/snakeplan/manage.py b/snakeplan/manage.py new file mode 100755 index 0000000..5e78ea9 --- /dev/null +++ b/snakeplan/manage.py @@ -0,0 +1,11 @@ +#!/usr/bin/env 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/snakeplan/projects/__init__.py b/snakeplan/projects/__init__.py new file mode 100755 index 0000000..e69de29 diff --git a/snakeplan/projects/admin.py b/snakeplan/projects/admin.py new file mode 100644 index 0000000..bdfbbd3 --- /dev/null +++ b/snakeplan/projects/admin.py @@ -0,0 +1,32 @@ +from snakeplan.projects import models +from django.contrib import admin + + +class ProjectAdmin(admin.ModelAdmin): + pass + +admin.site.register(models.Project, ProjectAdmin) + + +class IterationAdmin(admin.ModelAdmin): + pass + +admin.site.register(models.Iteration, IterationAdmin) + + +class StoryAdmin(admin.ModelAdmin): + pass + +admin.site.register(models.Story, StoryAdmin) + + +class TaskAdmin(admin.ModelAdmin): + pass + +admin.site.register(models.Task, TaskAdmin) + + +class LoggedTimeAdmin(admin.ModelAdmin): + pass + +admin.site.register(models.LoggedTime, LoggedTimeAdmin) diff --git a/snakeplan/projects/models.py b/snakeplan/projects/models.py new file mode 100755 index 0000000..d02402e --- /dev/null +++ b/snakeplan/projects/models.py @@ -0,0 +1,80 @@ +from django.db import models as m +from django.db.models import Model +from django.contrib.auth.models import User + + +STATUSES = ( + (0, 'Active'), + (1, 'Inactive'), + ) + +DISPOSITIONS = ( + (0, 'Planned'), + (1, 'Carried Over'), + (2, 'Added'), + (3, 'Discovered'), + ) + +TASK_TYPES = ( + (0, 'Feature'), + (1, 'Debt'), + (2, 'Functional Test'), + (3, 'Acceptance Test'), + (4, 'Overhead'), + ) + + +class Project(Model): + + name = m.CharField(max_length=200) + description = m.TextField(blank=True) + active = m.BooleanField(default=True) + hidden = m.BooleanField(default=False) + wiki_link = m.URLField(blank=True) + + +class Iteration(Model): + + name = m.CharField(max_length=200) + project = m.ForeignKey(Project) + status = m.IntegerField(choices=STATUSES, default=0) + start_date = m.DateField() + end_date = m.DateField() + days_worked = m.DecimalField(default=0, decimal_places=2, max_digits=5) + description = m.TextField(blank=True) + + +class Story(Model): + + name = m.CharField(max_length=200) + project = m.ForeignKey(Project) + iteration = m.ForeignKey(Iteration, blank=True) + disposition = m.IntegerField(choices=DISPOSITIONS) + customer = m.ForeignKey(User, blank=True, related_name='story_customer') + tracker = m.ForeignKey(User, blank=True) + status = m.IntegerField(choices=STATUSES, default=0) + priority = m.IntegerField() + order = m.IntegerField() + description = m.TextField(blank=True) + + +class Task(Model): + + name = m.CharField(max_length=200) + story = m.ForeignKey(Story) + task_type = m.IntegerField(choices=TASK_TYPES) + disposition = m.IntegerField(choices=DISPOSITIONS) + acceptor = m.ForeignKey(User, blank=True) + estimated_hours = m.DecimalField(decimal_places=2, max_digits=5) + description = m.TextField(blank=True) + + +class LoggedTime(Model): + + start_time = m.DateTimeField(blank=True) + end_time = m.DateTimeField(blank=True) + logged_date = m.DateField() + duration = m.DecimalField(decimal_places=2, max_digits=5) + person1 = m.ForeignKey(User, blank=True, related_name="person1") + person2 = m.ForeignKey(User, blank=True, related_name="person2") + description = m.TextField(blank=True) diff --git a/snakeplan/projects/tests.py b/snakeplan/projects/tests.py new file mode 100755 index 0000000..2247054 --- /dev/null +++ b/snakeplan/projects/tests.py @@ -0,0 +1,23 @@ +""" +This file demonstrates two different styles of tests (one doctest and one +unittest). These will both pass when you run "manage.py test". + +Replace these with more appropriate tests for your application. +""" + +from django.test import TestCase + +class SimpleTest(TestCase): + def test_basic_addition(self): + """ + Tests that 1 + 1 always equals 2. + """ + self.failUnlessEqual(1 + 1, 2) + +__test__ = {"doctest": """ +Another way to test that 1 + 1 is equal to 2. + +>>> 1 + 1 == 2 +True +"""} + diff --git a/snakeplan/projects/views.py b/snakeplan/projects/views.py new file mode 100755 index 0000000..60f00ef --- /dev/null +++ b/snakeplan/projects/views.py @@ -0,0 +1 @@ +# Create your views here. diff --git a/snakeplan/settings.py b/snakeplan/settings.py new file mode 100755 index 0000000..6da9ec1 --- /dev/null +++ b/snakeplan/settings.py @@ -0,0 +1,55 @@ +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + ('Mike Crute', 'mcrute@gmail.com'), +) + +MANAGERS = ADMINS + +DATABASE_ENGINE = 'sqlite3' +DATABASE_NAME = 'snakeplan.db' + +TIME_ZONE = 'America/New_York' +LANGUAGE_CODE = 'en-us' + +SITE_ID = 1 + +USE_I18N = False + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = '' + +# 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 = '' +ADMIN_MEDIA_PREFIX = '/media/' + +SECRET_KEY = 'ow28jyl#0h8+^3$-!*%o-qfj5#zyr@xz+%vn_a3iizhn%l-3_=' + +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.load_template_source', + 'django.template.loaders.app_directories.load_template_source', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', +) + +ROOT_URLCONF = 'snakeplan.urls' + +TEMPLATE_DIRS = ( +) + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.admin', + 'snakeplan.projects', +) diff --git a/snakeplan/snakeplan.db b/snakeplan/snakeplan.db new file mode 100644 index 0000000..d2eeedc Binary files /dev/null and b/snakeplan/snakeplan.db differ diff --git a/snakeplan/urls.py b/snakeplan/urls.py new file mode 100755 index 0000000..105045d --- /dev/null +++ b/snakeplan/urls.py @@ -0,0 +1,10 @@ +from django.conf.urls.defaults import * +from django.contrib import admin +from snakeplan.projects import admin as snakeplan_admin + +admin.autodiscover() + +urlpatterns = patterns('', + # (r'^snakeplan/', include('snakeplan.foo.urls')), + (r'^admin/', include(admin.site.urls)), +) -- cgit v1.2.3 From eafc81114c0e0d559af4bc2f40b56af37d984740 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Fri, 19 Feb 2010 21:26:05 -0500 Subject: Cleaning out the useless admin stuff. --- snakeplan/projects/admin.py | 34 +++++----------------------------- snakeplan/projects/models.py | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 29 deletions(-) diff --git a/snakeplan/projects/admin.py b/snakeplan/projects/admin.py index bdfbbd3..7471356 100644 --- a/snakeplan/projects/admin.py +++ b/snakeplan/projects/admin.py @@ -1,32 +1,8 @@ from snakeplan.projects import models from django.contrib import admin - -class ProjectAdmin(admin.ModelAdmin): - pass - -admin.site.register(models.Project, ProjectAdmin) - - -class IterationAdmin(admin.ModelAdmin): - pass - -admin.site.register(models.Iteration, IterationAdmin) - - -class StoryAdmin(admin.ModelAdmin): - pass - -admin.site.register(models.Story, StoryAdmin) - - -class TaskAdmin(admin.ModelAdmin): - pass - -admin.site.register(models.Task, TaskAdmin) - - -class LoggedTimeAdmin(admin.ModelAdmin): - pass - -admin.site.register(models.LoggedTime, LoggedTimeAdmin) +admin.site.register(models.Task) +admin.site.register(models.Story) +admin.site.register(models.Project) +admin.site.register(models.Iteration) +admin.site.register(models.LoggedTime) diff --git a/snakeplan/projects/models.py b/snakeplan/projects/models.py index d02402e..b91ec7c 100755 --- a/snakeplan/projects/models.py +++ b/snakeplan/projects/models.py @@ -32,6 +32,9 @@ class Project(Model): hidden = m.BooleanField(default=False) wiki_link = m.URLField(blank=True) + def __unicode__(self): + return self.name + class Iteration(Model): @@ -43,6 +46,9 @@ class Iteration(Model): days_worked = m.DecimalField(default=0, decimal_places=2, max_digits=5) description = m.TextField(blank=True) + def __unicode__(self): + return self.name + class Story(Model): @@ -57,6 +63,9 @@ class Story(Model): order = m.IntegerField() description = m.TextField(blank=True) + def __unicode__(self): + return self.name + class Task(Model): @@ -68,6 +77,9 @@ class Task(Model): estimated_hours = m.DecimalField(decimal_places=2, max_digits=5) description = m.TextField(blank=True) + def __unicode__(self): + return self.name + class LoggedTime(Model): @@ -78,3 +90,6 @@ class LoggedTime(Model): person1 = m.ForeignKey(User, blank=True, related_name="person1") person2 = m.ForeignKey(User, blank=True, related_name="person2") description = m.TextField(blank=True) + + def __unicode__(self): + return self.description -- cgit v1.2.3 From 25e063a309f03791e0b4e1e3751fa8bd3f220bd3 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Fri, 19 Feb 2010 21:51:45 -0500 Subject: Importing jquery --- .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 0 -> 260 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 0 -> 251 bytes .../images/ui-bg_flat_10_000000_40x100.png | Bin 0 -> 178 bytes .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 0 -> 104 bytes .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 0 -> 125 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes .../images/ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 0 -> 4427 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 0 -> 90 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 0 -> 129 bytes .../images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_228ef1_256x240.png | Bin 0 -> 5355 bytes .../images/ui-icons_ef8c08_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_ffd27a_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_ffffff_256x240.png | Bin 0 -> 4369 bytes static/css/ui-lightness/jquery-ui-1.7.2.custom.css | 406 + static/development-bundle/AUTHORS.txt | 30 + static/development-bundle/GPL-LICENSE.txt | 278 + static/development-bundle/MIT-LICENSE.txt | 25 + .../demos/accordion/collapsible.html | 58 + .../demos/accordion/custom-icons.html | 60 + .../demos/accordion/default.html | 83 + .../demos/accordion/fillspace.html | 76 + .../development-bundle/demos/accordion/index.html | 20 + .../demos/accordion/mouseover.html | 57 + .../demos/accordion/no-auto-height.html | 57 + .../development-bundle/demos/addClass/default.html | 51 + .../development-bundle/demos/addClass/index.html | 17 + .../development-bundle/demos/animate/default.html | 52 + static/development-bundle/demos/animate/index.html | 17 + .../demos/datepicker/alt-field.html | 31 + .../demos/datepicker/buttonbar.html | 33 + .../demos/datepicker/date-formats.html | 43 + .../demos/datepicker/default.html | 31 + .../demos/datepicker/dropdown-month-year.html | 34 + .../demos/datepicker/icon-trigger.html | 31 + .../demos/datepicker/images/calendar.gif | Bin 0 -> 269 bytes .../development-bundle/demos/datepicker/index.html | 26 + .../demos/datepicker/inline.html | 31 + .../demos/datepicker/localization.html | 120 + .../demos/datepicker/min-max.html | 31 + .../demos/datepicker/multiple-calendars.html | 34 + static/development-bundle/demos/demos.css | 334 + .../development-bundle/demos/dialog/default.html | 51 + static/development-bundle/demos/dialog/index.html | 21 + .../demos/dialog/modal-confirmation.html | 67 + .../demos/dialog/modal-form.html | 178 + .../demos/dialog/modal-message.html | 64 + static/development-bundle/demos/dialog/modal.html | 55 + .../demos/draggable/constrain-movement.html | 67 + .../demos/draggable/cursor-style.html | 46 + .../demos/draggable/default.html | 38 + .../demos/draggable/delay-start.html | 42 + .../development-bundle/demos/draggable/events.html | 74 + .../development-bundle/demos/draggable/handle.html | 45 + .../development-bundle/demos/draggable/index.html | 27 + .../development-bundle/demos/draggable/revert.html | 41 + .../development-bundle/demos/draggable/scroll.html | 48 + .../demos/draggable/snap-to.html | 67 + .../demos/draggable/sortable.html | 54 + .../demos/draggable/visual-feedback.html | 73 + .../demos/droppable/accepted-elements.html | 55 + .../demos/droppable/default.html | 46 + .../demos/droppable/images/high_tatras.jpg | Bin 0 -> 23627 bytes .../demos/droppable/images/high_tatras2.jpg | Bin 0 -> 26332 bytes .../demos/droppable/images/high_tatras2_min.jpg | Bin 0 -> 2164 bytes .../demos/droppable/images/high_tatras3.jpg | Bin 0 -> 25219 bytes .../demos/droppable/images/high_tatras3_min.jpg | Bin 0 -> 1901 bytes .../demos/droppable/images/high_tatras4.jpg | Bin 0 -> 25656 bytes .../demos/droppable/images/high_tatras4_min.jpg | Bin 0 -> 2541 bytes .../demos/droppable/images/high_tatras_min.jpg | Bin 0 -> 2147 bytes .../development-bundle/demos/droppable/index.html | 22 + .../demos/droppable/photo-manager.html | 164 + .../demos/droppable/propagation.html | 71 + .../development-bundle/demos/droppable/revert.html | 55 + .../demos/droppable/visual-feedback.html | 70 + .../development-bundle/demos/effect/default.html | 104 + static/development-bundle/demos/effect/index.html | 17 + static/development-bundle/demos/hide/default.html | 105 + static/development-bundle/demos/hide/index.html | 17 + .../development-bundle/demos/images/calendar.gif | Bin 0 -> 269 bytes .../demos/images/demo-config-on-tile.gif | Bin 0 -> 180 bytes .../demos/images/demo-config-on.gif | Bin 0 -> 343 bytes .../demos/images/demo-spindown-closed.gif | Bin 0 -> 104 bytes .../demos/images/demo-spindown-open.gif | Bin 0 -> 105 bytes .../demos/images/icon-docs-info.gif | Bin 0 -> 214 bytes .../development-bundle/demos/images/pbar-ani.gif | Bin 0 -> 304064 bytes static/development-bundle/demos/index.html | 292 + .../demos/progressbar/animated.html | 42 + .../demos/progressbar/default.html | 37 + .../demos/progressbar/images/pbar-ani.gif | Bin 0 -> 304064 bytes .../demos/progressbar/index.html | 19 + .../demos/progressbar/resize.html | 37 + .../demos/removeClass/default.html | 51 + .../demos/removeClass/index.html | 17 + .../demos/resizable/animate.html | 38 + .../demos/resizable/aspect-ratio.html | 37 + .../demos/resizable/constrain-area.html | 42 + .../demos/resizable/default.html | 35 + .../demos/resizable/delay-start.html | 49 + .../development-bundle/demos/resizable/index.html | 25 + .../demos/resizable/max-min.html | 40 + .../demos/resizable/snap-to-grid.html | 37 + .../demos/resizable/synchronous-resize.html | 44 + .../demos/resizable/visual-feedback.html | 38 + .../demos/selectable/default.html | 45 + .../demos/selectable/display-grid.html | 50 + .../development-bundle/demos/selectable/index.html | 19 + .../demos/selectable/serialize.html | 56 + static/development-bundle/demos/show/default.html | 106 + static/development-bundle/demos/show/index.html | 17 + .../demos/slider/colorpicker.html | 92 + .../development-bundle/demos/slider/default.html | 34 + static/development-bundle/demos/slider/index.html | 25 + .../demos/slider/multiple-vertical.html | 76 + .../demos/slider/range-vertical.html | 47 + static/development-bundle/demos/slider/range.html | 48 + .../development-bundle/demos/slider/rangemax.html | 47 + .../development-bundle/demos/slider/rangemin.html | 48 + .../demos/slider/slider-vertical.html | 49 + static/development-bundle/demos/slider/steps.html | 48 + .../demos/sortable/connect-lists-through-tabs.html | 76 + .../demos/sortable/connect-lists.html | 55 + .../development-bundle/demos/sortable/default.html | 48 + .../demos/sortable/delay-start.html | 64 + .../demos/sortable/display-grid.html | 51 + .../demos/sortable/empty-lists.html | 66 + .../development-bundle/demos/sortable/index.html | 25 + .../development-bundle/demos/sortable/items.html | 68 + .../demos/sortable/placeholder.html | 53 + .../demos/sortable/portlets.html | 93 + .../demos/switchClass/default.html | 47 + .../demos/switchClass/index.html | 17 + static/development-bundle/demos/tabs/ajax.html | 40 + .../demos/tabs/ajax/content1.html | 4 + .../demos/tabs/ajax/content2.html | 4 + .../development-bundle/demos/tabs/collapsible.html | 54 + static/development-bundle/demos/tabs/default.html | 47 + static/development-bundle/demos/tabs/index.html | 21 + .../development-bundle/demos/tabs/mouseover.html | 52 + static/development-bundle/demos/tabs/sortable.html | 62 + static/development-bundle/demos/tabs/vertical.html | 62 + .../development-bundle/demos/toggle/default.html | 94 + static/development-bundle/demos/toggle/index.html | 17 + .../demos/toggleClass/default.html | 45 + .../demos/toggleClass/index.html | 17 + static/development-bundle/docs/accordion.html | 869 ++ static/development-bundle/docs/addClass.html | 108 + static/development-bundle/docs/animate.html | 78 + static/development-bundle/docs/datepicker.html | 2150 +++++ static/development-bundle/docs/dialog.html | 1520 ++++ static/development-bundle/docs/draggable.html | 1448 ++++ static/development-bundle/docs/droppable.html | 704 ++ static/development-bundle/docs/effect.html | 142 + static/development-bundle/docs/hide.html | 143 + static/development-bundle/docs/progressbar.html | 295 + static/development-bundle/docs/removeClass.html | 112 + static/development-bundle/docs/resizable.html | 1075 +++ static/development-bundle/docs/selectable.html | 707 ++ static/development-bundle/docs/show.html | 143 + static/development-bundle/docs/slider.html | 733 ++ static/development-bundle/docs/sortable.html | 1818 ++++ static/development-bundle/docs/switchClass.html | 128 + static/development-bundle/docs/tabs.html | 1426 +++ static/development-bundle/docs/toggle.html | 143 + static/development-bundle/docs/toggleClass.html | 110 + .../external/bgiframe/ChangeLog.txt | 20 + .../development-bundle/external/bgiframe/META.json | 32 + .../external/bgiframe/docs/index.html | 113 + .../external/bgiframe/jquery.bgiframe.js | 100 + .../external/bgiframe/jquery.bgiframe.min.js | 10 + .../external/bgiframe/jquery.bgiframe.pack.js | 10 + .../external/bgiframe/test/index.html | 197 + .../external/cookie/jquery.cookie.js | 97 + .../external/cookie/jquery.cookie.min.js | 10 + .../external/cookie/jquery.cookie.pack.js | 10 + .../external/cookie/jquery.cookie.zip | Bin 0 -> 3471 bytes .../development-bundle/external/jsdiff/jsdiff.js | 159 + .../external/qunit/testrunner.js | 780 ++ .../external/qunit/testsuite.css | 120 + .../external/simulate/jquery.simulate.js | 152 + static/development-bundle/jquery-1.3.2.js | 4376 ++++++++++ .../base/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 0 -> 180 bytes .../base/images/ui-bg_flat_75_ffffff_40x100.png | Bin 0 -> 178 bytes .../base/images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 0 -> 120 bytes .../base/images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes .../base/images/ui-bg_glass_75_dadada_1x400.png | Bin 0 -> 111 bytes .../base/images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 0 -> 110 bytes .../base/images/ui-bg_glass_95_fef1ec_1x400.png | Bin 0 -> 119 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 0 -> 101 bytes .../themes/base/images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_454545_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_888888_256x240.png | Bin 0 -> 4369 bytes .../themes/base/images/ui-icons_cd0a0a_256x240.png | Bin 0 -> 4369 bytes .../themes/base/ui.accordion.css | 9 + static/development-bundle/themes/base/ui.all.css | 2 + static/development-bundle/themes/base/ui.base.css | 8 + static/development-bundle/themes/base/ui.core.css | 37 + .../themes/base/ui.datepicker.css | 62 + .../development-bundle/themes/base/ui.dialog.css | 13 + .../themes/base/ui.progressbar.css | 4 + .../themes/base/ui.resizable.css | 13 + .../development-bundle/themes/base/ui.slider.css | 17 + static/development-bundle/themes/base/ui.tabs.css | 11 + static/development-bundle/themes/base/ui.theme.css | 245 + .../ui-bg_diagonals-thick_18_b81900_40x40.png | Bin 0 -> 260 bytes .../ui-bg_diagonals-thick_20_666666_40x40.png | Bin 0 -> 251 bytes .../images/ui-bg_flat_10_000000_40x100.png | Bin 0 -> 178 bytes .../images/ui-bg_glass_100_f6f6f6_1x400.png | Bin 0 -> 104 bytes .../images/ui-bg_glass_100_fdf5ce_1x400.png | Bin 0 -> 125 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 0 -> 105 bytes .../images/ui-bg_gloss-wave_35_f6a828_500x100.png | Bin 0 -> 4427 bytes .../ui-bg_highlight-soft_100_eeeeee_1x100.png | Bin 0 -> 90 bytes .../ui-bg_highlight-soft_75_ffe45c_1x100.png | Bin 0 -> 129 bytes .../images/ui-icons_222222_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_228ef1_256x240.png | Bin 0 -> 5355 bytes .../images/ui-icons_ef8c08_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_ffd27a_256x240.png | Bin 0 -> 4369 bytes .../images/ui-icons_ffffff_256x240.png | Bin 0 -> 4369 bytes .../themes/ui-lightness/jquery-ui-1.7.2.custom.css | 406 + .../themes/ui-lightness/ui.accordion.css | 9 + .../themes/ui-lightness/ui.all.css | 2 + .../themes/ui-lightness/ui.base.css | 8 + .../themes/ui-lightness/ui.core.css | 37 + .../themes/ui-lightness/ui.datepicker.css | 62 + .../themes/ui-lightness/ui.dialog.css | 13 + .../themes/ui-lightness/ui.progressbar.css | 4 + .../themes/ui-lightness/ui.resizable.css | 13 + .../themes/ui-lightness/ui.slider.css | 17 + .../themes/ui-lightness/ui.tabs.css | 11 + .../themes/ui-lightness/ui.theme.css | 247 + static/development-bundle/ui/effects.blind.js | 49 + static/development-bundle/ui/effects.bounce.js | 78 + static/development-bundle/ui/effects.clip.js | 54 + static/development-bundle/ui/effects.core.js | 545 ++ static/development-bundle/ui/effects.drop.js | 50 + static/development-bundle/ui/effects.explode.js | 79 + static/development-bundle/ui/effects.fold.js | 56 + static/development-bundle/ui/effects.highlight.js | 48 + static/development-bundle/ui/effects.pulsate.js | 56 + static/development-bundle/ui/effects.scale.js | 180 + static/development-bundle/ui/effects.shake.js | 57 + static/development-bundle/ui/effects.slide.js | 50 + static/development-bundle/ui/effects.transfer.js | 45 + .../development-bundle/ui/i18n/jquery-ui-i18n.js | 771 ++ .../development-bundle/ui/i18n/ui.datepicker-ar.js | 20 + .../development-bundle/ui/i18n/ui.datepicker-bg.js | 20 + .../development-bundle/ui/i18n/ui.datepicker-ca.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-cs.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-da.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-de.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-el.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-eo.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-es.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-fa.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-fi.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-fr.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-he.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-hr.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-hu.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-hy.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-id.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-is.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-it.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-ja.js | 20 + .../development-bundle/ui/i18n/ui.datepicker-ko.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-lt.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-lv.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-ms.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-nl.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-no.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-pl.js | 19 + .../ui/i18n/ui.datepicker-pt-BR.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-ro.js | 22 + .../development-bundle/ui/i18n/ui.datepicker-ru.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-sk.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-sl.js | 20 + .../development-bundle/ui/i18n/ui.datepicker-sq.js | 19 + .../ui/i18n/ui.datepicker-sr-SR.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-sr.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-sv.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-th.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-tr.js | 19 + .../development-bundle/ui/i18n/ui.datepicker-uk.js | 25 + .../ui/i18n/ui.datepicker-zh-CN.js | 19 + .../ui/i18n/ui.datepicker-zh-TW.js | 19 + .../ui/jquery-ui-1.7.2.custom.js | 9133 ++++++++++++++++++++ static/development-bundle/ui/ui.accordion.js | 477 + static/development-bundle/ui/ui.core.js | 519 ++ static/development-bundle/ui/ui.datepicker.js | 1636 ++++ static/development-bundle/ui/ui.dialog.js | 671 ++ static/development-bundle/ui/ui.draggable.js | 766 ++ static/development-bundle/ui/ui.droppable.js | 282 + static/development-bundle/ui/ui.progressbar.js | 116 + static/development-bundle/ui/ui.resizable.js | 800 ++ static/development-bundle/ui/ui.selectable.js | 257 + static/development-bundle/ui/ui.slider.js | 558 ++ static/development-bundle/ui/ui.sortable.js | 1019 +++ static/development-bundle/ui/ui.tabs.js | 685 ++ static/development-bundle/version.txt | 1 + static/index.html | 367 + static/js/jquery-1.3.2.min.js | 19 + static/js/jquery-1.4.2.min.js | 154 + static/js/jquery-ui-1.7.2.custom.min.js | 298 + 304 files changed, 48675 insertions(+) create mode 100644 static/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png create mode 100644 static/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png create mode 100644 static/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png create mode 100644 static/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png create mode 100644 static/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png create mode 100644 static/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 static/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png create mode 100644 static/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png create mode 100644 static/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png create mode 100644 static/css/ui-lightness/images/ui-icons_222222_256x240.png create mode 100644 static/css/ui-lightness/images/ui-icons_228ef1_256x240.png create mode 100644 static/css/ui-lightness/images/ui-icons_ef8c08_256x240.png create mode 100644 static/css/ui-lightness/images/ui-icons_ffd27a_256x240.png create mode 100644 static/css/ui-lightness/images/ui-icons_ffffff_256x240.png create mode 100644 static/css/ui-lightness/jquery-ui-1.7.2.custom.css create mode 100644 static/development-bundle/AUTHORS.txt create mode 100644 static/development-bundle/GPL-LICENSE.txt create mode 100644 static/development-bundle/MIT-LICENSE.txt create mode 100644 static/development-bundle/demos/accordion/collapsible.html create mode 100644 static/development-bundle/demos/accordion/custom-icons.html create mode 100644 static/development-bundle/demos/accordion/default.html create mode 100644 static/development-bundle/demos/accordion/fillspace.html create mode 100644 static/development-bundle/demos/accordion/index.html create mode 100644 static/development-bundle/demos/accordion/mouseover.html create mode 100644 static/development-bundle/demos/accordion/no-auto-height.html create mode 100644 static/development-bundle/demos/addClass/default.html create mode 100644 static/development-bundle/demos/addClass/index.html create mode 100644 static/development-bundle/demos/animate/default.html create mode 100644 static/development-bundle/demos/animate/index.html create mode 100644 static/development-bundle/demos/datepicker/alt-field.html create mode 100644 static/development-bundle/demos/datepicker/buttonbar.html create mode 100644 static/development-bundle/demos/datepicker/date-formats.html create mode 100644 static/development-bundle/demos/datepicker/default.html create mode 100644 static/development-bundle/demos/datepicker/dropdown-month-year.html create mode 100644 static/development-bundle/demos/datepicker/icon-trigger.html create mode 100644 static/development-bundle/demos/datepicker/images/calendar.gif create mode 100644 static/development-bundle/demos/datepicker/index.html create mode 100644 static/development-bundle/demos/datepicker/inline.html create mode 100644 static/development-bundle/demos/datepicker/localization.html create mode 100644 static/development-bundle/demos/datepicker/min-max.html create mode 100644 static/development-bundle/demos/datepicker/multiple-calendars.html create mode 100644 static/development-bundle/demos/demos.css create mode 100644 static/development-bundle/demos/dialog/default.html create mode 100644 static/development-bundle/demos/dialog/index.html create mode 100644 static/development-bundle/demos/dialog/modal-confirmation.html create mode 100644 static/development-bundle/demos/dialog/modal-form.html create mode 100644 static/development-bundle/demos/dialog/modal-message.html create mode 100644 static/development-bundle/demos/dialog/modal.html create mode 100644 static/development-bundle/demos/draggable/constrain-movement.html create mode 100644 static/development-bundle/demos/draggable/cursor-style.html create mode 100644 static/development-bundle/demos/draggable/default.html create mode 100644 static/development-bundle/demos/draggable/delay-start.html create mode 100644 static/development-bundle/demos/draggable/events.html create mode 100644 static/development-bundle/demos/draggable/handle.html create mode 100644 static/development-bundle/demos/draggable/index.html create mode 100644 static/development-bundle/demos/draggable/revert.html create mode 100644 static/development-bundle/demos/draggable/scroll.html create mode 100644 static/development-bundle/demos/draggable/snap-to.html create mode 100644 static/development-bundle/demos/draggable/sortable.html create mode 100644 static/development-bundle/demos/draggable/visual-feedback.html create mode 100644 static/development-bundle/demos/droppable/accepted-elements.html create mode 100644 static/development-bundle/demos/droppable/default.html create mode 100644 static/development-bundle/demos/droppable/images/high_tatras.jpg create mode 100644 static/development-bundle/demos/droppable/images/high_tatras2.jpg create mode 100644 static/development-bundle/demos/droppable/images/high_tatras2_min.jpg create mode 100644 static/development-bundle/demos/droppable/images/high_tatras3.jpg create mode 100644 static/development-bundle/demos/droppable/images/high_tatras3_min.jpg create mode 100644 static/development-bundle/demos/droppable/images/high_tatras4.jpg create mode 100644 static/development-bundle/demos/droppable/images/high_tatras4_min.jpg create mode 100644 static/development-bundle/demos/droppable/images/high_tatras_min.jpg create mode 100644 static/development-bundle/demos/droppable/index.html create mode 100644 static/development-bundle/demos/droppable/photo-manager.html create mode 100644 static/development-bundle/demos/droppable/propagation.html create mode 100644 static/development-bundle/demos/droppable/revert.html create mode 100644 static/development-bundle/demos/droppable/visual-feedback.html create mode 100644 static/development-bundle/demos/effect/default.html create mode 100644 static/development-bundle/demos/effect/index.html create mode 100644 static/development-bundle/demos/hide/default.html create mode 100644 static/development-bundle/demos/hide/index.html create mode 100644 static/development-bundle/demos/images/calendar.gif create mode 100644 static/development-bundle/demos/images/demo-config-on-tile.gif create mode 100644 static/development-bundle/demos/images/demo-config-on.gif create mode 100644 static/development-bundle/demos/images/demo-spindown-closed.gif create mode 100644 static/development-bundle/demos/images/demo-spindown-open.gif create mode 100644 static/development-bundle/demos/images/icon-docs-info.gif create mode 100644 static/development-bundle/demos/images/pbar-ani.gif create mode 100644 static/development-bundle/demos/index.html create mode 100644 static/development-bundle/demos/progressbar/animated.html create mode 100644 static/development-bundle/demos/progressbar/default.html create mode 100644 static/development-bundle/demos/progressbar/images/pbar-ani.gif create mode 100644 static/development-bundle/demos/progressbar/index.html create mode 100644 static/development-bundle/demos/progressbar/resize.html create mode 100644 static/development-bundle/demos/removeClass/default.html create mode 100644 static/development-bundle/demos/removeClass/index.html create mode 100644 static/development-bundle/demos/resizable/animate.html create mode 100644 static/development-bundle/demos/resizable/aspect-ratio.html create mode 100644 static/development-bundle/demos/resizable/constrain-area.html create mode 100644 static/development-bundle/demos/resizable/default.html create mode 100644 static/development-bundle/demos/resizable/delay-start.html create mode 100644 static/development-bundle/demos/resizable/index.html create mode 100644 static/development-bundle/demos/resizable/max-min.html create mode 100644 static/development-bundle/demos/resizable/snap-to-grid.html create mode 100644 static/development-bundle/demos/resizable/synchronous-resize.html create mode 100644 static/development-bundle/demos/resizable/visual-feedback.html create mode 100644 static/development-bundle/demos/selectable/default.html create mode 100644 static/development-bundle/demos/selectable/display-grid.html create mode 100644 static/development-bundle/demos/selectable/index.html create mode 100644 static/development-bundle/demos/selectable/serialize.html create mode 100644 static/development-bundle/demos/show/default.html create mode 100644 static/development-bundle/demos/show/index.html create mode 100644 static/development-bundle/demos/slider/colorpicker.html create mode 100644 static/development-bundle/demos/slider/default.html create mode 100644 static/development-bundle/demos/slider/index.html create mode 100644 static/development-bundle/demos/slider/multiple-vertical.html create mode 100644 static/development-bundle/demos/slider/range-vertical.html create mode 100644 static/development-bundle/demos/slider/range.html create mode 100644 static/development-bundle/demos/slider/rangemax.html create mode 100644 static/development-bundle/demos/slider/rangemin.html create mode 100644 static/development-bundle/demos/slider/slider-vertical.html create mode 100644 static/development-bundle/demos/slider/steps.html create mode 100644 static/development-bundle/demos/sortable/connect-lists-through-tabs.html create mode 100644 static/development-bundle/demos/sortable/connect-lists.html create mode 100644 static/development-bundle/demos/sortable/default.html create mode 100644 static/development-bundle/demos/sortable/delay-start.html create mode 100644 static/development-bundle/demos/sortable/display-grid.html create mode 100644 static/development-bundle/demos/sortable/empty-lists.html create mode 100644 static/development-bundle/demos/sortable/index.html create mode 100644 static/development-bundle/demos/sortable/items.html create mode 100644 static/development-bundle/demos/sortable/placeholder.html create mode 100644 static/development-bundle/demos/sortable/portlets.html create mode 100644 static/development-bundle/demos/switchClass/default.html create mode 100644 static/development-bundle/demos/switchClass/index.html create mode 100644 static/development-bundle/demos/tabs/ajax.html create mode 100644 static/development-bundle/demos/tabs/ajax/content1.html create mode 100644 static/development-bundle/demos/tabs/ajax/content2.html create mode 100644 static/development-bundle/demos/tabs/collapsible.html create mode 100644 static/development-bundle/demos/tabs/default.html create mode 100644 static/development-bundle/demos/tabs/index.html create mode 100644 static/development-bundle/demos/tabs/mouseover.html create mode 100644 static/development-bundle/demos/tabs/sortable.html create mode 100644 static/development-bundle/demos/tabs/vertical.html create mode 100644 static/development-bundle/demos/toggle/default.html create mode 100644 static/development-bundle/demos/toggle/index.html create mode 100644 static/development-bundle/demos/toggleClass/default.html create mode 100644 static/development-bundle/demos/toggleClass/index.html create mode 100644 static/development-bundle/docs/accordion.html create mode 100644 static/development-bundle/docs/addClass.html create mode 100644 static/development-bundle/docs/animate.html create mode 100644 static/development-bundle/docs/datepicker.html create mode 100644 static/development-bundle/docs/dialog.html create mode 100644 static/development-bundle/docs/draggable.html create mode 100644 static/development-bundle/docs/droppable.html create mode 100644 static/development-bundle/docs/effect.html create mode 100644 static/development-bundle/docs/hide.html create mode 100644 static/development-bundle/docs/progressbar.html create mode 100644 static/development-bundle/docs/removeClass.html create mode 100644 static/development-bundle/docs/resizable.html create mode 100644 static/development-bundle/docs/selectable.html create mode 100644 static/development-bundle/docs/show.html create mode 100644 static/development-bundle/docs/slider.html create mode 100644 static/development-bundle/docs/sortable.html create mode 100644 static/development-bundle/docs/switchClass.html create mode 100644 static/development-bundle/docs/tabs.html create mode 100644 static/development-bundle/docs/toggle.html create mode 100644 static/development-bundle/docs/toggleClass.html create mode 100644 static/development-bundle/external/bgiframe/ChangeLog.txt create mode 100644 static/development-bundle/external/bgiframe/META.json create mode 100644 static/development-bundle/external/bgiframe/docs/index.html create mode 100644 static/development-bundle/external/bgiframe/jquery.bgiframe.js create mode 100644 static/development-bundle/external/bgiframe/jquery.bgiframe.min.js create mode 100644 static/development-bundle/external/bgiframe/jquery.bgiframe.pack.js create mode 100644 static/development-bundle/external/bgiframe/test/index.html create mode 100644 static/development-bundle/external/cookie/jquery.cookie.js create mode 100644 static/development-bundle/external/cookie/jquery.cookie.min.js create mode 100644 static/development-bundle/external/cookie/jquery.cookie.pack.js create mode 100644 static/development-bundle/external/cookie/jquery.cookie.zip create mode 100644 static/development-bundle/external/jsdiff/jsdiff.js create mode 100644 static/development-bundle/external/qunit/testrunner.js create mode 100644 static/development-bundle/external/qunit/testsuite.css create mode 100644 static/development-bundle/external/simulate/jquery.simulate.js create mode 100644 static/development-bundle/jquery-1.3.2.js create mode 100644 static/development-bundle/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png create mode 100644 static/development-bundle/themes/base/images/ui-bg_flat_75_ffffff_40x100.png create mode 100644 static/development-bundle/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png create mode 100644 static/development-bundle/themes/base/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 static/development-bundle/themes/base/images/ui-bg_glass_75_dadada_1x400.png create mode 100644 static/development-bundle/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png create mode 100644 static/development-bundle/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png create mode 100644 static/development-bundle/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png create mode 100644 static/development-bundle/themes/base/images/ui-icons_222222_256x240.png create mode 100644 static/development-bundle/themes/base/images/ui-icons_2e83ff_256x240.png create mode 100644 static/development-bundle/themes/base/images/ui-icons_454545_256x240.png create mode 100644 static/development-bundle/themes/base/images/ui-icons_888888_256x240.png create mode 100644 static/development-bundle/themes/base/images/ui-icons_cd0a0a_256x240.png create mode 100644 static/development-bundle/themes/base/ui.accordion.css create mode 100644 static/development-bundle/themes/base/ui.all.css create mode 100644 static/development-bundle/themes/base/ui.base.css create mode 100644 static/development-bundle/themes/base/ui.core.css create mode 100644 static/development-bundle/themes/base/ui.datepicker.css create mode 100644 static/development-bundle/themes/base/ui.dialog.css create mode 100644 static/development-bundle/themes/base/ui.progressbar.css create mode 100644 static/development-bundle/themes/base/ui.resizable.css create mode 100644 static/development-bundle/themes/base/ui.slider.css create mode 100644 static/development-bundle/themes/base/ui.tabs.css create mode 100644 static/development-bundle/themes/base/ui.theme.css create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-bg_flat_10_000000_40x100.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-icons_222222_256x240.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-icons_228ef1_256x240.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-icons_ef8c08_256x240.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-icons_ffd27a_256x240.png create mode 100644 static/development-bundle/themes/ui-lightness/images/ui-icons_ffffff_256x240.png create mode 100644 static/development-bundle/themes/ui-lightness/jquery-ui-1.7.2.custom.css create mode 100644 static/development-bundle/themes/ui-lightness/ui.accordion.css create mode 100644 static/development-bundle/themes/ui-lightness/ui.all.css create mode 100644 static/development-bundle/themes/ui-lightness/ui.base.css create mode 100644 static/development-bundle/themes/ui-lightness/ui.core.css create mode 100644 static/development-bundle/themes/ui-lightness/ui.datepicker.css create mode 100644 static/development-bundle/themes/ui-lightness/ui.dialog.css create mode 100644 static/development-bundle/themes/ui-lightness/ui.progressbar.css create mode 100644 static/development-bundle/themes/ui-lightness/ui.resizable.css create mode 100644 static/development-bundle/themes/ui-lightness/ui.slider.css create mode 100644 static/development-bundle/themes/ui-lightness/ui.tabs.css create mode 100644 static/development-bundle/themes/ui-lightness/ui.theme.css create mode 100644 static/development-bundle/ui/effects.blind.js create mode 100644 static/development-bundle/ui/effects.bounce.js create mode 100644 static/development-bundle/ui/effects.clip.js create mode 100644 static/development-bundle/ui/effects.core.js create mode 100644 static/development-bundle/ui/effects.drop.js create mode 100644 static/development-bundle/ui/effects.explode.js create mode 100644 static/development-bundle/ui/effects.fold.js create mode 100644 static/development-bundle/ui/effects.highlight.js create mode 100644 static/development-bundle/ui/effects.pulsate.js create mode 100644 static/development-bundle/ui/effects.scale.js create mode 100644 static/development-bundle/ui/effects.shake.js create mode 100644 static/development-bundle/ui/effects.slide.js create mode 100644 static/development-bundle/ui/effects.transfer.js create mode 100644 static/development-bundle/ui/i18n/jquery-ui-i18n.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-ar.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-bg.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-ca.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-cs.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-da.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-de.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-el.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-eo.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-es.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-fa.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-fi.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-fr.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-he.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-hr.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-hu.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-hy.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-id.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-is.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-it.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-ja.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-ko.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-lt.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-lv.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-ms.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-nl.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-no.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-pl.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-pt-BR.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-ro.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-ru.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-sk.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-sl.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-sq.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-sr-SR.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-sr.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-sv.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-th.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-tr.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-uk.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-zh-CN.js create mode 100644 static/development-bundle/ui/i18n/ui.datepicker-zh-TW.js create mode 100644 static/development-bundle/ui/jquery-ui-1.7.2.custom.js create mode 100644 static/development-bundle/ui/ui.accordion.js create mode 100644 static/development-bundle/ui/ui.core.js create mode 100644 static/development-bundle/ui/ui.datepicker.js create mode 100644 static/development-bundle/ui/ui.dialog.js create mode 100644 static/development-bundle/ui/ui.draggable.js create mode 100644 static/development-bundle/ui/ui.droppable.js create mode 100644 static/development-bundle/ui/ui.progressbar.js create mode 100644 static/development-bundle/ui/ui.resizable.js create mode 100644 static/development-bundle/ui/ui.selectable.js create mode 100644 static/development-bundle/ui/ui.slider.js create mode 100644 static/development-bundle/ui/ui.sortable.js create mode 100644 static/development-bundle/ui/ui.tabs.js create mode 100644 static/development-bundle/version.txt create mode 100644 static/index.html create mode 100644 static/js/jquery-1.3.2.min.js create mode 100644 static/js/jquery-1.4.2.min.js create mode 100644 static/js/jquery-ui-1.7.2.custom.min.js diff --git a/static/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/static/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100644 index 0000000..954e22d Binary files /dev/null and b/static/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png differ diff --git a/static/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/static/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100644 index 0000000..64ece57 Binary files /dev/null and b/static/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png differ diff --git a/static/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/static/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png new file mode 100644 index 0000000..abdc010 Binary files /dev/null and b/static/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png differ diff --git a/static/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/static/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100644 index 0000000..9b383f4 Binary files /dev/null and b/static/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png differ diff --git a/static/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/static/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png new file mode 100644 index 0000000..a23baad Binary files /dev/null and b/static/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png differ diff --git a/static/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/static/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000..42ccba2 Binary files /dev/null and b/static/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/static/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/static/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100644 index 0000000..1b1972b Binary files /dev/null and b/static/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png differ diff --git a/static/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/static/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png new file mode 100644 index 0000000..f127367 Binary files /dev/null and b/static/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png differ diff --git a/static/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/static/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png new file mode 100644 index 0000000..359397a Binary files /dev/null and b/static/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png differ diff --git a/static/css/ui-lightness/images/ui-icons_222222_256x240.png b/static/css/ui-lightness/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..ee039dc Binary files /dev/null and b/static/css/ui-lightness/images/ui-icons_222222_256x240.png differ diff --git a/static/css/ui-lightness/images/ui-icons_228ef1_256x240.png b/static/css/ui-lightness/images/ui-icons_228ef1_256x240.png new file mode 100644 index 0000000..6a05ba5 Binary files /dev/null and b/static/css/ui-lightness/images/ui-icons_228ef1_256x240.png differ diff --git a/static/css/ui-lightness/images/ui-icons_ef8c08_256x240.png b/static/css/ui-lightness/images/ui-icons_ef8c08_256x240.png new file mode 100644 index 0000000..35bb8ef Binary files /dev/null and b/static/css/ui-lightness/images/ui-icons_ef8c08_256x240.png differ diff --git a/static/css/ui-lightness/images/ui-icons_ffd27a_256x240.png b/static/css/ui-lightness/images/ui-icons_ffd27a_256x240.png new file mode 100644 index 0000000..baebb63 Binary files /dev/null and b/static/css/ui-lightness/images/ui-icons_ffd27a_256x240.png differ diff --git a/static/css/ui-lightness/images/ui-icons_ffffff_256x240.png b/static/css/ui-lightness/images/ui-icons_ffffff_256x240.png new file mode 100644 index 0000000..bef5178 Binary files /dev/null and b/static/css/ui-lightness/images/ui-icons_ffffff_256x240.png differ diff --git a/static/css/ui-lightness/jquery-ui-1.7.2.custom.css b/static/css/ui-lightness/jquery-ui-1.7.2.custom.css new file mode 100644 index 0000000..9d7aa08 --- /dev/null +++ b/static/css/ui-lightness/jquery-ui-1.7.2.custom.css @@ -0,0 +1,406 @@ +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +*/ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + + +/* +* jQuery UI CSS Framework +* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) +* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px +*/ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } +.ui-widget-content a { color: #333333; } +.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; outline: none; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; outline: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; outline: none; } +.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; outline: none; } +.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; outline: none; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; outline: none; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #ffffff; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; } +.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } +.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } +.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } +.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; }/* Accordion +----------------------------------*/ +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } +.ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker +----------------------------------*/ +.ui-datepicker { width: 17em; padding: .2em .2em 0; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}/* Dialog +----------------------------------*/ +.ui-dialog { position: relative; padding: .2em; width: 300px; } +.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } +/* Progressbar +----------------------------------*/ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable +----------------------------------*/ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider +----------------------------------*/ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs +----------------------------------*/ +.ui-tabs { padding: .2em; zoom: 1; } +.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } +.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } diff --git a/static/development-bundle/AUTHORS.txt b/static/development-bundle/AUTHORS.txt new file mode 100644 index 0000000..637175b --- /dev/null +++ b/static/development-bundle/AUTHORS.txt @@ -0,0 +1,30 @@ +jQuery UI Authors (http://ui.jquery.com/about) + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +and logs, available at http://jquery-ui.googlecode.com/svn/ + +Brandon Aaron +Paul Bakaus (paulbakaus.com) +David Bolter +Rich Caloggero +Chi Cheng (cloudream@gmail.com) +Colin Clark (http://colin.atrc.utoronto.ca/) +Michelle D'Souza +Aaron Eisenberger (aaronchi@gmail.com) +Ariel Flesler +Bohdan Ganicky +Scott González +Marc Grabanski (m@marcgrabanski.com) +Klaus Hartl (stilbuero.de) +Scott Jehl +Cody Lindley +Eduardo Lundgren (eduardolundgren@gmail.com) +Todd Parker +John Resig +Patty Toland +Ca-Phun Ung (yelotofu.com) +Keith Wood (kbwood@virginbroadband.com.au) +Maggie Costello Wachs +Richard D. Worth (rdworth.org) +Jörn Zaefferer (bassistance.de) diff --git a/static/development-bundle/GPL-LICENSE.txt b/static/development-bundle/GPL-LICENSE.txt new file mode 100644 index 0000000..11dddd0 --- /dev/null +++ b/static/development-bundle/GPL-LICENSE.txt @@ -0,0 +1,278 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/static/development-bundle/MIT-LICENSE.txt b/static/development-bundle/MIT-LICENSE.txt new file mode 100644 index 0000000..f0f2ba9 --- /dev/null +++ b/static/development-bundle/MIT-LICENSE.txt @@ -0,0 +1,25 @@ +Copyright (c) 2009 Paul Bakaus, http://jqueryui.com/ + +This software consists of voluntary contributions made by many +individuals (AUTHORS.txt, http://jqueryui.com/about) For exact +contribution history, see the revision history and logs, available +at http://jquery-ui.googlecode.com/svn/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/static/development-bundle/demos/accordion/collapsible.html b/static/development-bundle/demos/accordion/collapsible.html new file mode 100644 index 0000000..381d5fe --- /dev/null +++ b/static/development-bundle/demos/accordion/collapsible.html @@ -0,0 +1,58 @@ + + + + jQuery UI Accordion - Collapse content + + + + + + + + + +
+ +
+

Section 1

+
+

Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.

+
+

Section 2

+
+

Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna.

+
+

Section 3

+
+

Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.

+
    +
  • List item one
  • +
  • List item two
  • +
  • List item three
  • +
+
+

Section 4

+
+

Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est.

Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

+
+
+ +
+ + + +
+ +

By default, accordions always keep one section open. To allow for all sections to be be collapsible, set the collapsible option to true. Click on the currently open section to collapse its content pane.

+ + +
+ + + diff --git a/static/development-bundle/demos/accordion/custom-icons.html b/static/development-bundle/demos/accordion/custom-icons.html new file mode 100644 index 0000000..777fa52 --- /dev/null +++ b/static/development-bundle/demos/accordion/custom-icons.html @@ -0,0 +1,60 @@ + + + + jQuery UI Accordion - Customize icons + + + + + + + + + +
+ +
+

Section 1

+
+

Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.

+
+

Section 2

+
+

Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna.

+
+

Section 3

+
+

Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.

+
    +
  • List item one
  • +
  • List item two
  • +
  • List item three
  • +
+
+

Section 4

+
+

Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est.

Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

+
+
+ +
+ + + +
+ +

Customize the header icons with the icons option, which accepts classes for the header's default and selected (open) state. Use any class from the UI CSS framework, or create custom classes with background images.

+ +
+ + + diff --git a/static/development-bundle/demos/accordion/default.html b/static/development-bundle/demos/accordion/default.html new file mode 100644 index 0000000..9493b26 --- /dev/null +++ b/static/development-bundle/demos/accordion/default.html @@ -0,0 +1,83 @@ + + + + jQuery UI Accordion - Default functionality + + + + + + + + + +
+ +
+

Section 1

+
+

+ Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer + ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit + amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut + odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. +

+
+

Section 2

+
+

+ Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet + purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor + velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In + suscipit faucibus urna. +

+
+

Section 3

+
+

+ Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. + Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero + ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis + lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. +

+
    +
  • List item one
  • +
  • List item two
  • +
  • List item three
  • +
+
+

Section 4

+
+

+ Cras dictum. Pellentesque habitant morbi tristique senectus et netus + et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in + faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia + mauris vel est. +

+

+ Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. + Class aptent taciti sociosqu ad litora torquent per conubia nostra, per + inceptos himenaeos. +

+
+
+ +
+ +
+

+Click headers to expand/collapse content that is broken into logical sections, much like tabs. +Optionally, toggle sections open/closed on mouseover. +

+

+The underlying HTML markup is a series of headers (H3 tags) and content divs so the content is +usable without JavaScript. +

+
+ + + diff --git a/static/development-bundle/demos/accordion/fillspace.html b/static/development-bundle/demos/accordion/fillspace.html new file mode 100644 index 0000000..3523d00 --- /dev/null +++ b/static/development-bundle/demos/accordion/fillspace.html @@ -0,0 +1,76 @@ + + + + jQuery UI Accordion - Fill space + + + + + + + + + + +
+ +

Resize the outer container:

+ +
+ +
+

Section 1

+
+

Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.

+
+

Section 2

+
+

Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna.

+
+

Section 3

+
+

Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.

+
    +
  • List item one
  • +
  • List item two
  • +
  • List item three
  • +
+
+

Section 4

+
+

Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est.

Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

+
+
+ + +
+ +
I'm another panel
+ +
+ + + +
+ +

Because the accordion is comprised of block-level elements, by default its width fills the available horizontal space. To fill the vertical space allocated by its container, set the boolean fillSpace option to true, and the script will automatically set the dimensions of the accordion to the height of its parent container. The accordion will also resize with its container if the container is resizable.

+ +
+ + + + diff --git a/static/development-bundle/demos/accordion/index.html b/static/development-bundle/demos/accordion/index.html new file mode 100644 index 0000000..f09fcf6 --- /dev/null +++ b/static/development-bundle/demos/accordion/index.html @@ -0,0 +1,20 @@ + + + + jQuery UI Accordion Demos + + + + + + diff --git a/static/development-bundle/demos/accordion/mouseover.html b/static/development-bundle/demos/accordion/mouseover.html new file mode 100644 index 0000000..2181649 --- /dev/null +++ b/static/development-bundle/demos/accordion/mouseover.html @@ -0,0 +1,57 @@ + + + + jQuery UI Accordion - Open on mouseover + + + + + + + + + +
+ +
+

Section 1

+
+

Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.

+
+

Section 2

+
+

Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna.

+
+

Section 3

+
+

Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.

+
    +
  • List item one
  • +
  • List item two
  • +
  • List item three
  • +
+
+

Section 4

+
+

Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est.

Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.

+
+
+ +
+ + + +
+ +

Toggle sections open/closed on mouseover with the event option. The default value for event is "click."

+ +
+ + + diff --git a/static/development-bundle/demos/accordion/no-auto-height.html b/static/development-bundle/demos/accordion/no-auto-height.html new file mode 100644 index 0000000..49b7c3b --- /dev/null +++ b/static/development-bundle/demos/accordion/no-auto-height.html @@ -0,0 +1,57 @@ + + + + jQuery UI Accordion - No Auto Height + + + + + + + + + +
+ +
+

Section 1

+
+

Mauris mauris ante, blandit et, ultrices a, susceros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.

+
+

Section 2

+
+

Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna.

+
+

Section 3

+
+

Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.

+
    +
  • List item
  • +
  • List item
  • +
  • List item
  • +
  • List item
  • +
  • List item
  • +
  • List item
  • +
  • List item
  • +
+
+
+ +
+ + + +
+ +

Setting autoHeight: false allows to accordion panels to keep their native height.

+ +
+ + + diff --git a/static/development-bundle/demos/addClass/default.html b/static/development-bundle/demos/addClass/default.html new file mode 100644 index 0000000..eae24b9 --- /dev/null +++ b/static/development-bundle/demos/addClass/default.html @@ -0,0 +1,51 @@ + + + + jQuery UI Effects - addClass Demo + + + + + + + + + +
+ +
+
+ Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. +
+
+ +Run Effect + +
+ +
+ +

This demo adds a class which animates: text-indent, letter-spacing, width, height, padding, margin, and font-size.

+ +
+ + + diff --git a/static/development-bundle/demos/addClass/index.html b/static/development-bundle/demos/addClass/index.html new file mode 100644 index 0000000..4b9471d --- /dev/null +++ b/static/development-bundle/demos/addClass/index.html @@ -0,0 +1,17 @@ + + + + jQuery UI Effects Demos + + + + +
+

Examples

+ +
+ + + diff --git a/static/development-bundle/demos/animate/default.html b/static/development-bundle/demos/animate/default.html new file mode 100644 index 0000000..a01f08a --- /dev/null +++ b/static/development-bundle/demos/animate/default.html @@ -0,0 +1,52 @@ + + + + jQuery UI Effects - Animate Demo + + + + + + + + + +
+ +
+
+

Animate

+

+ Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi. +

+
+
+ +Toggle Effect + +
+ +
+ +

Click the button above to preview the effect.

+ +
+ + + diff --git a/static/development-bundle/demos/animate/index.html b/static/development-bundle/demos/animate/index.html new file mode 100644 index 0000000..4b9471d --- /dev/null +++ b/static/development-bundle/demos/animate/index.html @@ -0,0 +1,17 @@ + + + + jQuery UI Effects Demos + + + + +
+

Examples

+ +
+ + + diff --git a/static/development-bundle/demos/datepicker/alt-field.html b/static/development-bundle/demos/datepicker/alt-field.html new file mode 100644 index 0000000..372e2bf --- /dev/null +++ b/static/development-bundle/demos/datepicker/alt-field.html @@ -0,0 +1,31 @@ + + + + jQuery UI Datepicker - Populate alternate field + + + + + + + + + +
+ +

Date:  

+ +
+ +
+ +

Populate an alternate field with its own date format whenever a date is selected using the altField and altFormat options. This feature could be used to present a human-friendly date for user selection, while passing a more computer-friendly date through for further processing.

+ +
+ + + diff --git a/static/development-bundle/demos/datepicker/buttonbar.html b/static/development-bundle/demos/datepicker/buttonbar.html new file mode 100644 index 0000000..eeea08a --- /dev/null +++ b/static/development-bundle/demos/datepicker/buttonbar.html @@ -0,0 +1,33 @@ + + + + jQuery UI Datepicker - Display button bar + + + + + + + + + +
+ +

Date:

+ +
+ +
+ +

Display a button for selecting Today's date and a Done button for closing the calendar with the boolean showButtonPanel option. Each button is enabled by default when the bar is displayed, but can be turned off with additional options. Button text is customizable.

+ +
+ + + diff --git a/static/development-bundle/demos/datepicker/date-formats.html b/static/development-bundle/demos/datepicker/date-formats.html new file mode 100644 index 0000000..a8712ec --- /dev/null +++ b/static/development-bundle/demos/datepicker/date-formats.html @@ -0,0 +1,43 @@ + + + + jQuery UI Datepicker - Format date + + + + + + + + + +
+ +

Date:

+ +

Format options:
+ +

+ +
+ +
+ +

Display date feedback in a variety of ways. Choose a date format from the dropdown, then click on the input and select a date to see it in that format.

+ +
+ + + diff --git a/static/development-bundle/demos/datepicker/default.html b/static/development-bundle/demos/datepicker/default.html new file mode 100644 index 0000000..368e0bc --- /dev/null +++ b/static/development-bundle/demos/datepicker/default.html @@ -0,0 +1,31 @@ + + + + jQuery UI Datepicker - Default functionality + + + + + + + + + +
+ +

Date:

+ +
+ +
+ +

The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay. Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close. If a date is chosen, feedback is shown as the input's value.

+ +
+ + + diff --git a/static/development-bundle/demos/datepicker/dropdown-month-year.html b/static/development-bundle/demos/datepicker/dropdown-month-year.html new file mode 100644 index 0000000..c169310 --- /dev/null +++ b/static/development-bundle/demos/datepicker/dropdown-month-year.html @@ -0,0 +1,34 @@ + + + + jQuery UI Datepicker - Display month & year menus + + + + + + + + + +
+ +

Date:

+ +
+ +
+ +

Show month and year dropdowns in place of the static month/year header to facilitate navigation through large timeframes. Add the boolean changeMonth and changeYear options.

+ +
+ + + diff --git a/static/development-bundle/demos/datepicker/icon-trigger.html b/static/development-bundle/demos/datepicker/icon-trigger.html new file mode 100644 index 0000000..5b4de4a --- /dev/null +++ b/static/development-bundle/demos/datepicker/icon-trigger.html @@ -0,0 +1,31 @@ + + + + jQuery UI Datepicker - Icon trigger + + + + + + + + + +
+ +

Date:

+ +
+ +
+ +

Click the icon next to the input field to show the datepicker. Set the datepicker to open on focus (default behavior), on icon click, or both.

+ +
+ + + diff --git a/static/development-bundle/demos/datepicker/images/calendar.gif b/static/development-bundle/demos/datepicker/images/calendar.gif new file mode 100644 index 0000000..d0abaa7 Binary files /dev/null and b/static/development-bundle/demos/datepicker/images/calendar.gif differ diff --git a/static/development-bundle/demos/datepicker/index.html b/static/development-bundle/demos/datepicker/index.html new file mode 100644 index 0000000..dfe22db --- /dev/null +++ b/static/development-bundle/demos/datepicker/index.html @@ -0,0 +1,26 @@ + + + + jQuery UI Datepicker Demos + + + + + + + + diff --git a/static/development-bundle/demos/datepicker/inline.html b/static/development-bundle/demos/datepicker/inline.html new file mode 100644 index 0000000..2d5ad75 --- /dev/null +++ b/static/development-bundle/demos/datepicker/inline.html @@ -0,0 +1,31 @@ + + + + jQuery UI Datepicker - Display inline + + + + + + + + + +
+ +Date:
+ +
+ +
+ +

Display the datepicker embedded in the page instead of in an overlay. Simply call .datepicker() on a div instead of an input.

+ +
+ + + diff --git a/static/development-bundle/demos/datepicker/localization.html b/static/development-bundle/demos/datepicker/localization.html new file mode 100644 index 0000000..39bc660 --- /dev/null +++ b/static/development-bundle/demos/datepicker/localization.html @@ -0,0 +1,120 @@ + + + + jQuery UI Datepicker - Localize calendar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +

Date:   +

+ +
+ +
+ +

Localize the datepicker calendar language and format (English / Western formatting is the default). The datepicker includes built-in support for languages that read right-to-left, such as Arabic and Hebrew.

+ +
+ + + diff --git a/static/development-bundle/demos/datepicker/min-max.html b/static/development-bundle/demos/datepicker/min-max.html new file mode 100644 index 0000000..06a1776 --- /dev/null +++ b/static/development-bundle/demos/datepicker/min-max.html @@ -0,0 +1,31 @@ + + + + jQuery UI Datepicker - Restrict date range + + + + + + + + + +
+ +

Date:

+ +
+ +
+ +

Restrict the range of selectable dates with the minDate and maxDate options. Set the beginning and end dates as actual dates (new Date(2009, 1 - 1, 26)), as a numeric offset from today (-20), or as a string of periods and units ('+1M +10D'). For the last, use 'D' for days, 'W' for weeks, 'M' for months, or 'Y' for years.

+ +
+ + + diff --git a/static/development-bundle/demos/datepicker/multiple-calendars.html b/static/development-bundle/demos/datepicker/multiple-calendars.html new file mode 100644 index 0000000..86e55a0 --- /dev/null +++ b/static/development-bundle/demos/datepicker/multiple-calendars.html @@ -0,0 +1,34 @@ + + + + jQuery UI Datepicker - Display multiple months + + + + + + + + + +
+ +

Date:

+ +
+ +
+ +

Set the numberOfMonths option to an integer of 2 or more to show multiple months in a single datepicker.

+ +
+ + + diff --git a/static/development-bundle/demos/demos.css b/static/development-bundle/demos/demos.css new file mode 100644 index 0000000..2d2ce1f --- /dev/null +++ b/static/development-bundle/demos/demos.css @@ -0,0 +1,334 @@ +body { + font-size: 62.5%; +} + +table { + font-size: 1em; +} + +/* Site + -------------------------------- */ + +body { + font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; +} + +/* Layout + -------------------------------- */ + +.layout-grid { + width: 960px; +} + +.layout-grid td { + vertical-align: top; +} + +.layout-grid td.left-nav { + width: 140px; +} + +.layout-grid td.normal { + border-left: 1px solid #eee; + padding: 20px 24px; + font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; +} + +.layout-grid td.demos { + background: url('/images/demos_bg.jpg') no-repeat; + height: 337px; + overflow: hidden; +} + +/* Normal + -------------------------------- */ + +.normal h3, +.normal h4 { + margin: 0; + font-weight: normal; +} + +.normal h3 { + padding: 0 0 9px; + font-size: 1.8em; +} + +.normal h4 { + padding-bottom: 21px; + border-bottom: 1px dashed #999; + font-size: 1.2em; + font-weight: bold; +} + +.normal p { + font-size: 1.2em; +} + +/* Demos */ + +.demos-nav, .demos-nav dt, .demos-nav dd, .demos-nav ul, .demos-nav li { + margin: 0; + padding: 0 +} + +.demos-nav { + float: left; + width: 170px; + font-size: 1.3em; +} + +.demos-nav dt, +.demos-nav h4 { + margin: 0; + padding: 0; + font: normal 1.1em "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif"; + color: #e87b10; +} + +.demos-nav dt, +.demos-nav h4 { + margin-top: 1.5em; + margin-bottom: 0; + padding-left: 8px; + padding-bottom:5px; + line-height: 1.2em; + border-bottom: 1px solid #F4F4F4; +} + +.demos-nav dd a, +.demos-nav li a { + border-bottom: 1px solid #F4F4F4; + display:block; + padding: 4px 3px 4px 8px; + font-size: 90%; + text-decoration: none; + color: #555 ; + margin:2px 0; + height:13px; +} + +.demos-nav dd a:hover, +.demos-nav dd a:focus, +.demos-nav dd a:hover, +.demos-nav dd a:focus { + background: #f3f3f3; + color:#000; + -moz-border-radius: 5px; -webkit-border-radius: 5px; +} + .demos-nav dd a.selected { + background: #555; + color:#ffffff; + -moz-border-radius: 5px; -webkit-border-radius: 5px; +} + + +/* new styles for demo pages, added by Filament 12.29.08 +eventually we should convert the font sizes to ems -- using px for now to minimize style conflicts +*/ + +.normal h3.demo-header { font-size:32px; padding:0 0 5px; border-bottom:1px solid #eee; text-transform: capitalize; } +.normal h4.demo-subheader { font-size:10px; text-transform: uppercase; color:#999; padding:8px 0 3px; border:0; margin:0; } +.normal a:link, +.normal a:visited { color:#1b75bb; text-decoration:none; } +.normal a:hover, +.normal a:active { color:#0b559b; } + +#demo-config { padding:20px 0 0; } + +#demo-frame { float:left; width:540px; height:380px; border:1px solid #ddd; overflow: auto; position: relative; } +#demo-frame h3, #demo-frame h4 { padding: 0; font-weight: bold; font-size: 1em; } + +#demo-config-menu { float:right; width:180px; } +#demo-config-menu h4 { font-size:13px; color:#666; font-weight:normal; border:0; padding-left:18px; } + +#demo-config-menu ul { list-style: none; padding: 0; margin: 0; } + +#demo-config-menu li { font-size:12px; padding:0 0 0 10px; margin:3px 0; zoom: 1; } + +#demo-config-menu li a:link, +#demo-config-menu li a:visited { display:block; padding:1px 8px 4px; border-bottom:1px dotted #b3b3b3; } +* html #demo-config-menu li a:link, +* html #demo-config-menu li a:visited { padding:1px 8px 2px; } +#demo-config-menu li a:hover, +#demo-config-menu li a:active { background-color:#f6f6f6; } + +#demo-config-menu li.demo-config-on { background: url(images/demo-config-on-tile.gif) repeat-x left center; } + +#demo-config-menu li.demo-config-on a:link, +#demo-config-menu li.demo-config-on a:visited, +#demo-config-menu li.demo-config-on a:hover, +#demo-config-menu li.demo-config-on a:active { background: url(images/demo-config-on.gif) no-repeat left; padding-left:18px; color:#fff; border:0; margin-left:-10px; margin-top: 0px; margin-bottom: 0px; } + +#demo-source, #demo-notes { + clear: both; + padding: 20px 0 0; + font-size: 1.3em; +} + +#demo-notes { width:520px; color:#333; font-size: 1em; } +#demo-notes p code, .demo-description p code { padding: 0; font-weight: bold; } +#demo-source pre, #demo-source code { padding: 0; } +code, pre { padding:8px 0 8px 20px ; font-size: 1.2em; line-height:130%; } + +#demo-source a:link, +#demo-source a:visited, +#demo-source a:hover, +#demo-source a:active { font-size:12px; padding-left:13px; background-position: left center; background-repeat: no-repeat; } + +#demo-source a.source-open:link, +#demo-source a.source-open:visited, +#demo-source a.source-open:hover, +#demo-source a.source-open:active { background-image: url(images/demo-spindown-open.gif); } + +#demo-source a.source-closed:link, +#demo-source a.source-closed:visited, +#demo-source a.source-closed:hover, +#demo-source a.source-closed:active { background-image: url(images/demo-spindown-closed.gif); } + +div.demo { + padding:12px; + font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif"; +} + +div.demo h3.docs { clear:left; font-size:12px; font-weight:normal; padding:0 0 1em; margin:0; } + +div.demo-description { + clear:both; + padding:12px; + font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif"; + font-size: 1.3em; + line-height: 1.4em; +} + +.ui-draggable, .ui-droppable { + background-position: top left; +} + +.left-nav .demos-nav { + padding-right: 10px; +} + +#demo-link { font-size:11px; padding-top: 6px; clear: both; overflow: hidden; } +#demo-link a span.ui-icon { float:left; margin-right:3px; } + +/* Component containers +----------------------------------*/ +#widget-docs .ui-widget { font-family: Trebuchet MS,Verdana,Arial,sans-serif; font-size: 1em; } +#widget-docs .ui-widget input, #widget-docs .ui-widget select, #widget-docs .ui-widget textarea, #widget-docs .ui-widget button { font-family: Trebuchet MS,Verdana,Arial,sans-serif; font-size: 1em; } +#widget-docs .ui-widget-header { border: 1px solid #ffffff; background: #464646 url(images/464646_40x100_textures_01_flat_100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +#widget-docs .ui-widget-header a { color: #ffffff; } +#widget-docs .ui-widget-content { border: 1px solid #ffffff; background: #ffffff url(images/ffffff_40x100_textures_01_flat_75.png) 50% 50% repeat-x; color: #222222; } +#widget-docs .ui-widget-content a { color: #222222; } + +/* Interaction states +----------------------------------*/ +#widget-docs .ui-state-default, #widget-docs .ui-widget-content #widget-docs .ui-state-default { border: 1px solid #666666; background: #555555 url(images/555555_40x100_textures_03_highlight_soft_75.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; outline: none; } +#widget-docs .ui-state-default a { color: #ffffff; text-decoration: none; outline: none; } +#widget-docs .ui-state-hover, #widget-docs .ui-widget-content #widget-docs .ui-state-hover, #widget-docs .ui-state-focus, #widget-docs .ui-widget-content #widget-docs .ui-state-focus { border: 1px solid #666666; background: #444444 url(images/444444_40x100_textures_03_highlight_soft_60.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; outline: none; } +#widget-docs .ui-state-hover a { color: #ffffff; text-decoration: none; outline: none; } +#widget-docs .ui-state-active, #widget-docs .ui-widget-content #widget-docs .ui-state-active { border: 1px solid #666666; background: #ffffff url(images/ffffff_40x100_textures_01_flat_65.png) 50% 50% repeat-x; font-weight: normal; color: #F6921E; outline: none; } +#widget-docs .ui-state-active a { color: #F6921E; outline: none; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +#widget-docs .ui-state-highlight, #widget-docs .ui-widget-content #widget-docs .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/fbf9ee_40x100_textures_02_glass_55.png) 50% 50% repeat-x; color: #363636; } +#widget-docs .ui-state-error, #widget-docs .ui-widget-content #widget-docs .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/fef1ec_40x100_textures_05_inset_soft_95.png) 50% bottom repeat-x; color: #cd0a0a; } +#widget-docs .ui-state-error-text, #widget-docs .ui-widget-content #widget-docs .ui-state-error-text { color: #cd0a0a; } +#widget-docs .ui-state-disabled, #widget-docs .ui-widget-content #widget-docs .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +#widget-docs .ui-priority-primary, #widget-docs .ui-widget-content #widget-docs .ui-priority-primary { font-weight: bold; } +#widget-docs .ui-priority-secondary, #widget-docs .ui-widget-content #widget-docs .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } + +/* Icons +----------------------------------*/ + +/* states and images */ +#demo-frame-wrapper .ui-icon, #widget-docs .ui-icon { width: 16px; height: 16px; background-image: url(images/222222_256x240_icons_icons.png); } +#widget-docs .ui-widget-content .ui-icon {background-image: url(images/222222_256x240_icons_icons.png); } +#widget-docs .ui-widget-header .ui-icon {background-image: url(images/222222_256x240_icons_icons.png); } +#widget-docs .ui-state-default .ui-icon { background-image: url(images/888888_256x240_icons_icons.png); } +#widget-docs .ui-state-hover .ui-icon, #widget-docs .ui-state-focus .ui-icon {background-image: url(images/454545_256x240_icons_icons.png); } +#widget-docs .ui-state-active .ui-icon {background-image: url(images/454545_256x240_icons_icons.png); } +#widget-docs .ui-state-highlight .ui-icon {background-image: url(images/2e83ff_256x240_icons_icons.png); } +#widget-docs .ui-state-error .ui-icon, #widget-docs .ui-state-error-text .ui-icon {background-image: url(images/cd0a0a_256x240_icons_icons.png); } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +#widget-docs .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; } +#widget-docs .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } +#widget-docs .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } +#widget-docs .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +#widget-docs .ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } +#widget-docs .ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +#widget-docs .ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } +#widget-docs .ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } +#widget-docs .ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; } + +/* Overlays */ +#widget-docs .ui-widget-overlay { background: #aaaaaa url(images/aaaaaa_40x100_textures_01_flat_0.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } +#widget-docs .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/aaaaaa_40x100_textures_01_flat_0.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; } + +/* +----------------------------------*/ + +#widget-docs { margin:20px 0 0; border: none; } + +#widget-docs h2, #widget-docs h3, #widget-docs h4, #widget-docs p, #widget-docs ul, #widget-docs code { margin:0; padding:0; } +#widget-docs code { display:block; color:#444; font-size:.9em; margin:0 0 1em; } +#widget-docs code strong { color:#000; } +#widget-docs p { margin:0 3em 1.2em 0; } +#widget-docs p.intro { font-size:13px; color:#666; line-height:1.3; } +#widget-docs ul { list-style-type: none; } + +#widget-docs h2 { font-size:16px; margin:1.2em 0 .5em; } +#widget-docs h3 { font-size:14px; color:#e6820E; margin:1.5em 0 .5em; } +.normal #widget-docs h4 { font-size:12px; color:#000; border:0; margin:0 0 .5em; } + +#docs-overview-main { width:400px; } +#docs-overview-sidebar { float:right; width:200px; } +#docs-overview-sidebar a span { color:#666; } +#widget-docs #docs-overview-main p { margin-right:0; } +#widget-docs #docs-overview-sidebar h4 { padding-left:0; } + +.docs-list-header { float:left; width:100%; margin:10px 0 0; border-bottom:1px solid #eee; } +#widget-docs .docs-list-header h2 { float:left; margin:0; } +#widget-docs .docs-list-header p { float:right; margin:5px 0; font-size:11px; } + +.docs-list { float:left; width:100%; padding:0 0 10px; } +.docs-list .param-header { float:left; clear:left; width:100%; padding:8px 0; border-top:1px solid #eee; } +#widget-docs .param-header h3, #widget-docs .param-header p { margin:0; float:left; } +#widget-docs .param-header h3 { width:50%; } +#widget-docs .param-header h3 span { background: url(images/demo-spindown-closed.gif) no-repeat left; padding-left:13px; } +#widget-docs .param-open .param-header h3 span { background: url(images/demo-spindown-open.gif) no-repeat left; } +#widget-docs .param-header p { width:24%; } +#widget-docs .param-header p.param-type span { background: url(images/icon-docs-info.gif) no-repeat left; cursor:pointer; border-bottom:1px dashed #ccc; padding-left:15px; } + +.param-details { padding-left:13px; } +.param-args { margin:0 0 1.5em; border-top:1px dotted #ccc;} +.param-args td { padding:3px 30px 3px 5px; border-bottom:1px dotted #ccc; } + + +/* overrides for ui-tab styles */ +#widget-docs ul.ui-tabs-nav { padding:0 0 0 8px; } +#widget-docs .ui-tabs-nav li { margin:5px 5px 0 0; } + +#widget-docs .ui-tabs-nav li a:link, +#widget-docs .ui-tabs-nav li a:visited, +#widget-docs .ui-tabs-nav li a:hover, +#widget-docs .ui-tabs-nav li a:active { font-size:14px; padding:4px 1.2em 3px; color:#fff; } + +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:link, +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:visited, +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:hover, +#widget-docs .ui-tabs-nav li.ui-tabs-selected a:active { color:#e6820E; } + +#widget-docs .ui-tabs-panel { padding:20px 9px; font-size:12px; line-height:1.4; color:#000; } + +#widget-docs .ui-widget-content a:link, +#widget-docs .ui-widget-content a:visited { color:#1b75bb; text-decoration:none; } +#widget-docs .ui-widget-content a:hover, +#widget-docs .ui-widget-content a:active { color:#0b559b; } + diff --git a/static/development-bundle/demos/dialog/default.html b/static/development-bundle/demos/dialog/default.html new file mode 100644 index 0000000..9d65926 --- /dev/null +++ b/static/development-bundle/demos/dialog/default.html @@ -0,0 +1,51 @@ + + + + jQuery UI Dialog - Default functionality + + + + + + + + + + + + +
+ +
+

This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.

+
+ + +
+

Sed vel diam id libero rutrum convallis. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.

+
+
+ checkbox
+ radio
+

+
+
+
+ +
+ +
+ +

The basic dialog window is an overlay positioned within the viewport and is protected from page content (like select elements) shining through with an iframe. It has a title bar and a content area, and can be moved, resized and closed with the 'x' icon by default.

+ +
+ + + diff --git a/static/development-bundle/demos/dialog/index.html b/static/development-bundle/demos/dialog/index.html new file mode 100644 index 0000000..bed31ab --- /dev/null +++ b/static/development-bundle/demos/dialog/index.html @@ -0,0 +1,21 @@ + + + + jQuery UI Dialog Demos + + + + + + + + diff --git a/static/development-bundle/demos/dialog/modal-confirmation.html b/static/development-bundle/demos/dialog/modal-confirmation.html new file mode 100644 index 0000000..f46fb19 --- /dev/null +++ b/static/development-bundle/demos/dialog/modal-confirmation.html @@ -0,0 +1,67 @@ + + + + jQuery UI Dialog - Modal confirmation + + + + + + + + + + + + +
+ +
+

These items will be permanently deleted and cannot be recovered. Are you sure?

+
+ + +
+

Sed vel diam id libero rutrum convallis. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.

+
+
+ checkbox
+ radio
+

+
+
+
+ +
+ +
+ +

Confirm an action that may be destructive or important. Set the modal option to true, and specify primary and secondary user actions with the buttons option.

+ +
+ + + diff --git a/static/development-bundle/demos/dialog/modal-form.html b/static/development-bundle/demos/dialog/modal-form.html new file mode 100644 index 0000000..68a3648 --- /dev/null +++ b/static/development-bundle/demos/dialog/modal-form.html @@ -0,0 +1,178 @@ + + + + jQuery UI Dialog - Modal form + + + + + + + + + + + + + + + +
+ +
+

All form fields are required.

+ +
+
+ + + + + + +
+
+
+ + +
+ +

Existing Users:

+ + + + + + + + + + + + + + + + + +
NameEmailPassword
John Doejohn.doe@example.comjohndoe1
+
+ + +
+ +
+ +

Use a modal dialog to require that the user enter data during a multi-step process. Embed form markup in the content area, set the modal option to true, and specify primary and secondary user actions with the buttons option.

+ +
+ + + diff --git a/static/development-bundle/demos/dialog/modal-message.html b/static/development-bundle/demos/dialog/modal-message.html new file mode 100644 index 0000000..df60a5e --- /dev/null +++ b/static/development-bundle/demos/dialog/modal-message.html @@ -0,0 +1,64 @@ + + + + jQuery UI Dialog - Modal message + + + + + + + + + + + + +
+ +
+

+ + Your files have downloaded successfully into the My Downloads folder. +

+

+ Currently using 36% of your storage space. +

+
+ + +
+

Sed vel diam id libero rutrum convallis. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.

+
+
+ checkbox
+ radio
+

+
+
+
+ +
+ +
+ +

Use a modal dialog to explicitly acknowledge information or an action before continuing their work. Set the modal option to true, and specify a primary action (Ok) with the buttons option.

+ +
+ + + diff --git a/static/development-bundle/demos/dialog/modal.html b/static/development-bundle/demos/dialog/modal.html new file mode 100644 index 0000000..dab3ea5 --- /dev/null +++ b/static/development-bundle/demos/dialog/modal.html @@ -0,0 +1,55 @@ + + + + jQuery UI Dialog - Basic modal + + + + + + + + + + + + + +
+ +
+

Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.

+
+ + +
+

Sed vel diam id libero rutrum convallis. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.

+
+
+ checkbox
+ radio
+

+
+
+
+ +
+ +
+ +

A modal dialog prevents the user from interacting with the rest of the page until it is closed. To add a semi-transparent layer that dims out the page content behind the dialog, set the background color and opacity of the overlay option.

+ +
+ + + diff --git a/static/development-bundle/demos/draggable/constrain-movement.html b/static/development-bundle/demos/draggable/constrain-movement.html new file mode 100644 index 0000000..73496bb --- /dev/null +++ b/static/development-bundle/demos/draggable/constrain-movement.html @@ -0,0 +1,67 @@ + + + + jQuery UI Draggable - Constrain movement + + + + + + + + + +
+ +

Constrain movement along an axis:

+ +
+

I can be dragged only vertically

+
+ +
+

I can be dragged only horizontally

+
+ +

Or to within another DOM element:

+
+
+

I'm contained within the box

+
+ +
+

I'm contained within the box's parent

+
+ +
+

I'm contained within my parent

+
+
+ +
+ +
+ +

+Constrain the movement of each draggable by defining the boundaries of the draggable area. Set the axis option to limit the draggable's path to the x- or y-axis, or use the containment option to specify a parent DOM element or a jQuery selector, like 'document.' +

+ +
+ + diff --git a/static/development-bundle/demos/draggable/cursor-style.html b/static/development-bundle/demos/draggable/cursor-style.html new file mode 100644 index 0000000..14b3b29 --- /dev/null +++ b/static/development-bundle/demos/draggable/cursor-style.html @@ -0,0 +1,46 @@ + + + + jQuery UI Draggable - Cursor style + + + + + + + + + +
+ +
+

I will always stick to the center (relative to the mouse)

+
+ +
+

My cursor is at left -5 and top -5

+
+ +
+

My cursor position is only controlled for the 'bottom' value

+
+ +
+ +
+ +

+Position the cursor while dragging the object. By default the cursor appears in the center of the dragged object; use the cursorAt option to specify another location relative to the draggable (specify a pixel value from the top, right, bottom, and/or left). Customize the cursor's appearance by supplying the cursor option with a valid CSS cursor value: default, move, pointer, crosshair, etc. +

+ +
+ + diff --git a/static/development-bundle/demos/draggable/default.html b/static/development-bundle/demos/draggable/default.html new file mode 100644 index 0000000..344accc --- /dev/null +++ b/static/development-bundle/demos/draggable/default.html @@ -0,0 +1,38 @@ + + + + jQuery UI Draggable - Default functionality + + + + + + + + + + +
+ +
+

Drag me around

+
+ +
+ +
+ +

+Enable draggable functionality on any DOM element. Move the draggable object by clicking on it with the mouse and dragging it anywhere within the viewport. +

+ +
+ + + diff --git a/static/development-bundle/demos/draggable/delay-start.html b/static/development-bundle/demos/draggable/delay-start.html new file mode 100644 index 0000000..6f49d17 --- /dev/null +++ b/static/development-bundle/demos/draggable/delay-start.html @@ -0,0 +1,42 @@ + + + + jQuery UI Draggable - Delay start + + + + + + + + + +
+ +
+

Only if you drag me by 20 pixels, the dragging will start

+
+ +
+

Regardless of the distance, you have to drag and wait for 1000ms before dragging starts

+
+ +
+ +
+ +

+Delay the start of dragging for a number of milliseconds with the delay option; prevent dragging until the cursor is held down and dragged a specifed number of pixels with the distance option. +

+ +
+ + diff --git a/static/development-bundle/demos/draggable/events.html b/static/development-bundle/demos/draggable/events.html new file mode 100644 index 0000000..ca13a9f --- /dev/null +++ b/static/development-bundle/demos/draggable/events.html @@ -0,0 +1,74 @@ + + + + jQuery UI Draggable - Events + + + + + + + + + + +
+ +
+ +

Drag me to trigger the chain of events.

+ +
    +
  • "start" invoked 0x
  • +
  • "drag" invoked 0x
  • +
  • "stop" invoked 0x
  • +
+
+ +
+ +
+ +

+Layer functionality onto the draggable using the start, drag, and stop events. Start is fired at the start of the drag; drag during the drag; and stop when dragging stops. +

+ +
+ + + diff --git a/static/development-bundle/demos/draggable/handle.html b/static/development-bundle/demos/draggable/handle.html new file mode 100644 index 0000000..8433a1e --- /dev/null +++ b/static/development-bundle/demos/draggable/handle.html @@ -0,0 +1,45 @@ + + + + jQuery UI Draggable - Handles + + + + + + + + + +
+ +
+

I can be dragged only by this handle

+
+ +
+

You can drag me around…

+

…but you can't drag me by this handle.

+
+ + + +
+ +
+ +

Allow dragging only when the cursor is over a specific part of the draggable. Use the handle option to specify the jQuery selector of an element (or group of elements) used to drag the object.

+

Or prevent dragging when the cursor is over a specific element (or group of elements) within the draggable. Use the cancel option to specify a jQuery selector over which to "cancel" draggable functionality.

+ +
+ + diff --git a/static/development-bundle/demos/draggable/index.html b/static/development-bundle/demos/draggable/index.html new file mode 100644 index 0000000..ba15243 --- /dev/null +++ b/static/development-bundle/demos/draggable/index.html @@ -0,0 +1,27 @@ + + + + jQuery UI Draggable Demos + + + + + + + + diff --git a/static/development-bundle/demos/draggable/revert.html b/static/development-bundle/demos/draggable/revert.html new file mode 100644 index 0000000..8433640 --- /dev/null +++ b/static/development-bundle/demos/draggable/revert.html @@ -0,0 +1,41 @@ + + + + jQuery UI Draggable - Revert position + + + + + + + + + +
+ +
+

Revert the original

+
+ +
+

Revert the helper

+
+ +
+ +
+ +

+Return the draggable (or it's helper) to its original location when dragging stops with the boolean revert option. +

+ +
+ + diff --git a/static/development-bundle/demos/draggable/scroll.html b/static/development-bundle/demos/draggable/scroll.html new file mode 100644 index 0000000..201ce9c --- /dev/null +++ b/static/development-bundle/demos/draggable/scroll.html @@ -0,0 +1,48 @@ + + + + jQuery UI Draggable - Auto-scroll + + + + + + + + + +
+ +
+

Scroll set to true, default settings

+
+ +
+

scrollSensitivity set to 100

+
+ +
+

scrollSpeed set to 100

+
+ +
+ +
+ +
+ +

+Automatically scroll the document when the draggable is moved beyond the viewport. Set the scroll option to true to enable auto-scrolling, and fine-tune when scrolling is triggered and its speed with the scrollSensitivity and scrollSpeed options. +

+ +
+ + diff --git a/static/development-bundle/demos/draggable/snap-to.html b/static/development-bundle/demos/draggable/snap-to.html new file mode 100644 index 0000000..43c0585 --- /dev/null +++ b/static/development-bundle/demos/draggable/snap-to.html @@ -0,0 +1,67 @@ + + + + jQuery UI Draggable - Snap to element or grid + + + + + + + + + +
+ +
+

I'm a snap target

+
+ +
+ +
+

Default (snap: true), snaps to all other draggable elements

+
+ +
+

I only snap to the big box

+
+ +
+

I only snap to the outer edges of the big box

+
+ +
+

I snap to a 20 x 20 grid

+
+ +
+

I snap to a 80 x 80 grid

+
+ +
+ +
+ +

Snap the draggable to the inner or outer boundaries of a DOM element. Use the snap, snapMode (inner, outer, both), and snapTolerance (distance in pixels the draggable must be from the element when snapping is invoked) options.

+ +

Or snap the draggable to a grid. Set the dimensions of grid cells (height and width in pixels) with the grid option.

+ +
+ + + + + diff --git a/static/development-bundle/demos/draggable/sortable.html b/static/development-bundle/demos/draggable/sortable.html new file mode 100644 index 0000000..6f15be4 --- /dev/null +++ b/static/development-bundle/demos/draggable/sortable.html @@ -0,0 +1,54 @@ + + + + jQuery UI Draggable + Sortable + + + + + + + + + + +
+ +
    +
  • Drag me down
  • +
+ +
    +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
  • Item 4
  • +
  • Item 5
  • +
+ +
+ +
+ +

+Draggables are built to interact seamlessly with sortables. +

+ +
+ + diff --git a/static/development-bundle/demos/draggable/visual-feedback.html b/static/development-bundle/demos/draggable/visual-feedback.html new file mode 100644 index 0000000..25c42fd --- /dev/null +++ b/static/development-bundle/demos/draggable/visual-feedback.html @@ -0,0 +1,73 @@ + + + + jQuery UI Draggable - Visual feedback + + + + + + + + + +
+ +

With helpers:

+ +
+

Original

+
+ +
+

Semi-transparent clone

+
+ +
+

Custom helper (in combination with cursorAt)

+
+ +

Stacked:

+
+
+

We are draggables..

+
+ +
+

..whose z-indexes are controlled automatically..

+
+ +
+

..with the stack option.

+
+
+ +
+ +
+ +

Provide feedback to users as they drag an object in the form of a helper. The helper option accepts the values 'original' (the draggable object moves with the cursor), 'clone' (a duplicate of the draggable moves with the cursor), or a function that returns a DOM element (that element is shown near the cursor during drag). Control the helper's transparency with the opacity option.

+ +

To clarify which draggable is in play, bring the draggable in motion to front. Use the zIndex option to set a higher z-index for the helper, if in play, or use the stack option to ensure that the last item dragged will appear on top of others in the same group on drag stop.

+ +
+ + diff --git a/static/development-bundle/demos/droppable/accepted-elements.html b/static/development-bundle/demos/droppable/accepted-elements.html new file mode 100644 index 0000000..3a12baa --- /dev/null +++ b/static/development-bundle/demos/droppable/accepted-elements.html @@ -0,0 +1,55 @@ + + + + jQuery UI Droppable - Accept Demo + + + + + + + + + + +
+ +
+

I'm draggable but can't be dropped

+
+ +
+

Drag me to my target

+
+ +
+

accept: '#draggable'

+
+ +
+ +
+ +

Specify using the accept option which element (or group of elements) is accepted by the target droppable.

+ +
+ + diff --git a/static/development-bundle/demos/droppable/default.html b/static/development-bundle/demos/droppable/default.html new file mode 100644 index 0000000..03fdace --- /dev/null +++ b/static/development-bundle/demos/droppable/default.html @@ -0,0 +1,46 @@ + + + + jQuery UI Droppable - Default Demo + + + + + + + + + + +
+ +
+

Drag me to my target

+
+ +
+

Drop here

+
+ +
+ +
+ +

Enable any DOM element to be droppable, a target for draggable elements.

+ +
+ + diff --git a/static/development-bundle/demos/droppable/images/high_tatras.jpg b/static/development-bundle/demos/droppable/images/high_tatras.jpg new file mode 100644 index 0000000..e2365c2 Binary files /dev/null and b/static/development-bundle/demos/droppable/images/high_tatras.jpg differ diff --git a/static/development-bundle/demos/droppable/images/high_tatras2.jpg b/static/development-bundle/demos/droppable/images/high_tatras2.jpg new file mode 100644 index 0000000..909024a Binary files /dev/null and b/static/development-bundle/demos/droppable/images/high_tatras2.jpg differ diff --git a/static/development-bundle/demos/droppable/images/high_tatras2_min.jpg b/static/development-bundle/demos/droppable/images/high_tatras2_min.jpg new file mode 100644 index 0000000..493e082 Binary files /dev/null and b/static/development-bundle/demos/droppable/images/high_tatras2_min.jpg differ diff --git a/static/development-bundle/demos/droppable/images/high_tatras3.jpg b/static/development-bundle/demos/droppable/images/high_tatras3.jpg new file mode 100644 index 0000000..05a4395 Binary files /dev/null and b/static/development-bundle/demos/droppable/images/high_tatras3.jpg differ diff --git a/static/development-bundle/demos/droppable/images/high_tatras3_min.jpg b/static/development-bundle/demos/droppable/images/high_tatras3_min.jpg new file mode 100644 index 0000000..4aa96b0 Binary files /dev/null and b/static/development-bundle/demos/droppable/images/high_tatras3_min.jpg differ diff --git a/static/development-bundle/demos/droppable/images/high_tatras4.jpg b/static/development-bundle/demos/droppable/images/high_tatras4.jpg new file mode 100644 index 0000000..ed753d1 Binary files /dev/null and b/static/development-bundle/demos/droppable/images/high_tatras4.jpg differ diff --git a/static/development-bundle/demos/droppable/images/high_tatras4_min.jpg b/static/development-bundle/demos/droppable/images/high_tatras4_min.jpg new file mode 100644 index 0000000..794dbdf Binary files /dev/null and b/static/development-bundle/demos/droppable/images/high_tatras4_min.jpg differ diff --git a/static/development-bundle/demos/droppable/images/high_tatras_min.jpg b/static/development-bundle/demos/droppable/images/high_tatras_min.jpg new file mode 100644 index 0000000..51e0cde Binary files /dev/null and b/static/development-bundle/demos/droppable/images/high_tatras_min.jpg differ diff --git a/static/development-bundle/demos/droppable/index.html b/static/development-bundle/demos/droppable/index.html new file mode 100644 index 0000000..3ffa565 --- /dev/null +++ b/static/development-bundle/demos/droppable/index.html @@ -0,0 +1,22 @@ + + + + jQuery UI Droppable Demos + + + + + + + + diff --git a/static/development-bundle/demos/droppable/photo-manager.html b/static/development-bundle/demos/droppable/photo-manager.html new file mode 100644 index 0000000..868085a --- /dev/null +++ b/static/development-bundle/demos/droppable/photo-manager.html @@ -0,0 +1,164 @@ + + + + jQuery UI Droppable - Simple photo manager + + + + + + + + + + + + +
+ + + +
+

Trash Trash

+
+ +
+ +
+ +

You can delete an image either by dragging it to the Trash or by clicking the trash icon.

+

You can "recycle" an image by dragging it back to the gallery or by clicking the recycle icon.

+

You can view larger image by clicking the zoom icon. jQuery UI dialog widget is used for the modal window.

+ +
+ + diff --git a/static/development-bundle/demos/droppable/propagation.html b/static/development-bundle/demos/droppable/propagation.html new file mode 100644 index 0000000..e9c5026 --- /dev/null +++ b/static/development-bundle/demos/droppable/propagation.html @@ -0,0 +1,71 @@ + + + + jQuery UI Droppable - Prevent propagation + + + + + + + + + + +
+ +
+

Drag me to my target

+
+ +
+

Outer droppable

+
+

Inner droppable (not greedy)

+
+
+ +
+

Outer droppable

+
+

Inner droppable (greedy)

+
+
+ +
+ +
+ +

When working with nested droppables — for example, you may have an editable directory structure displayed as a tree, with folder and document nodes — the greedy option set to true prevents event propagation when a draggable is dropped on a child node (droppable).

+ +
+ + diff --git a/static/development-bundle/demos/droppable/revert.html b/static/development-bundle/demos/droppable/revert.html new file mode 100644 index 0000000..01fea57 --- /dev/null +++ b/static/development-bundle/demos/droppable/revert.html @@ -0,0 +1,55 @@ + + + + jQuery UI Droppable - Revert draggable position + + + + + + + + + + +
+ +
+

I revert when I'm dropped

+
+ +
+

I revert when I'm not dropped

+
+ +
+

Drop me here

+
+ +
+ +
+ +

Return the draggable (or it's helper) to its original location when dragging stops with the boolean revert option set on the draggable.

+ +
+ + diff --git a/static/development-bundle/demos/droppable/visual-feedback.html b/static/development-bundle/demos/droppable/visual-feedback.html new file mode 100644 index 0000000..8f7e929 --- /dev/null +++ b/static/development-bundle/demos/droppable/visual-feedback.html @@ -0,0 +1,70 @@ + + + + jQuery UI Droppable - Visual feedback + + + + + + + + + + +
+ +

Feedback on hover:

+ +
+

Drag me to my target

+
+ +
+

Drop here

+
+ +

Feedback on activating draggable:

+ +
+

Drag me to my target

+
+ +
+

Drop here

+
+ + + +
+ +
+ +

Change the droppable's appearance on hover, or when the droppable is active (an acceptable draggable is dropped on it). Use the hoverClass or activeClass options to specify respective classes.

+ +
+ + diff --git a/static/development-bundle/demos/effect/default.html b/static/development-bundle/demos/effect/default.html new file mode 100644 index 0000000..4187080 --- /dev/null +++ b/static/development-bundle/demos/effect/default.html @@ -0,0 +1,104 @@ + + + + jQuery UI Effects - Effect Demo + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+

Effect

+

+ Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi. +

+
+
+ + + +Run Effect + + +
+ +
+ +

Click the button above to show the effect.

+ +
+ + + diff --git a/static/development-bundle/demos/effect/index.html b/static/development-bundle/demos/effect/index.html new file mode 100644 index 0000000..fbd0597 --- /dev/null +++ b/static/development-bundle/demos/effect/index.html @@ -0,0 +1,17 @@ + + + + jQuery UI Effect Demos + + + + +
+

Examples

+ +
+ + + diff --git a/static/development-bundle/demos/hide/default.html b/static/development-bundle/demos/hide/default.html new file mode 100644 index 0000000..a4a5ff2 --- /dev/null +++ b/static/development-bundle/demos/hide/default.html @@ -0,0 +1,105 @@ + + + + jQuery UI Effects - Hide Demo + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+

Hide

+

+ Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi. +

+
+
+ + + +Run Effect + + +
+ +
+ +

Click the button above to preview the effect.

+ +
+ + + diff --git a/static/development-bundle/demos/hide/index.html b/static/development-bundle/demos/hide/index.html new file mode 100644 index 0000000..4b9471d --- /dev/null +++ b/static/development-bundle/demos/hide/index.html @@ -0,0 +1,17 @@ + + + + jQuery UI Effects Demos + + + + +
+

Examples

+ +
+ + + diff --git a/static/development-bundle/demos/images/calendar.gif b/static/development-bundle/demos/images/calendar.gif new file mode 100644 index 0000000..d0abaa7 Binary files /dev/null and b/static/development-bundle/demos/images/calendar.gif differ diff --git a/static/development-bundle/demos/images/demo-config-on-tile.gif b/static/development-bundle/demos/images/demo-config-on-tile.gif new file mode 100644 index 0000000..359da95 Binary files /dev/null and b/static/development-bundle/demos/images/demo-config-on-tile.gif differ diff --git a/static/development-bundle/demos/images/demo-config-on.gif b/static/development-bundle/demos/images/demo-config-on.gif new file mode 100644 index 0000000..9fcec1a Binary files /dev/null and b/static/development-bundle/demos/images/demo-config-on.gif differ diff --git a/static/development-bundle/demos/images/demo-spindown-closed.gif b/static/development-bundle/demos/images/demo-spindown-closed.gif new file mode 100644 index 0000000..b247824 Binary files /dev/null and b/static/development-bundle/demos/images/demo-spindown-closed.gif differ diff --git a/static/development-bundle/demos/images/demo-spindown-open.gif b/static/development-bundle/demos/images/demo-spindown-open.gif new file mode 100644 index 0000000..e1c60aa Binary files /dev/null and b/static/development-bundle/demos/images/demo-spindown-open.gif differ diff --git a/static/development-bundle/demos/images/icon-docs-info.gif b/static/development-bundle/demos/images/icon-docs-info.gif new file mode 100644 index 0000000..6b0464e Binary files /dev/null and b/static/development-bundle/demos/images/icon-docs-info.gif differ diff --git a/static/development-bundle/demos/images/pbar-ani.gif b/static/development-bundle/demos/images/pbar-ani.gif new file mode 100644 index 0000000..0dfd45b Binary files /dev/null and b/static/development-bundle/demos/images/pbar-ani.gif differ diff --git a/static/development-bundle/demos/index.html b/static/development-bundle/demos/index.html new file mode 100644 index 0000000..1f45c3c --- /dev/null +++ b/static/development-bundle/demos/index.html @@ -0,0 +1,292 @@ + + + + + jQuery UI Demos + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
Interactions
+
Draggable
+
Droppable
+
Resizable
+
Selectable
+
Sortable
+
Widgets
+
Accordion
+
Datepicker
+
Dialog
+
Progressbar
+
Slider
+
Tabs
+
Effects
+
Add Class
+
Remove Class
+
Animate
+
Effect
+
Hide
+
Show
+
Switch Class
+
Toggle
+
Toggle Class
+
About jQuery UI
+
Getting Started
+
Upgrade Guide
+
Changelog
+
Roadmap
+
Subversion Access
+
UI Developer Guidelines
+
Theming
+
Theming jQuery UI
+
jQuery UI CSS Framework
+
ThemeRoller application
+
Theme Switcher Widget
+ +
+
+ +
+ +

Instructions

+

+ These demos showcase some common uses of each jQuery UI plugin. Simply copy and paste code from the demos to get started. Have fun playing with them. +

+ +
+ +
+ + diff --git a/static/development-bundle/demos/progressbar/animated.html b/static/development-bundle/demos/progressbar/animated.html new file mode 100644 index 0000000..db013d9 --- /dev/null +++ b/static/development-bundle/demos/progressbar/animated.html @@ -0,0 +1,42 @@ + + + + jQuery UI Progressbar - Animated + + + + + + + + + + +
+ +
+ +
+ +
+ +

+This progressbar has an animated fill by setting the +background-image +on the +.ui-progressbar-value +element, using css. +

+ +
+ + + diff --git a/static/development-bundle/demos/progressbar/default.html b/static/development-bundle/demos/progressbar/default.html new file mode 100644 index 0000000..a06e6bf --- /dev/null +++ b/static/development-bundle/demos/progressbar/default.html @@ -0,0 +1,37 @@ + + + + jQuery UI Progressbar - Default functionality + + + + + + + + + +
+ +
+ +
+ + + +
+ +

Default determinate progress bar.

+ +
+ + + + + diff --git a/static/development-bundle/demos/progressbar/images/pbar-ani.gif b/static/development-bundle/demos/progressbar/images/pbar-ani.gif new file mode 100644 index 0000000..0dfd45b Binary files /dev/null and b/static/development-bundle/demos/progressbar/images/pbar-ani.gif differ diff --git a/static/development-bundle/demos/progressbar/index.html b/static/development-bundle/demos/progressbar/index.html new file mode 100644 index 0000000..542bf14 --- /dev/null +++ b/static/development-bundle/demos/progressbar/index.html @@ -0,0 +1,19 @@ + + + + jQuery UI Progressbar Demos + + + + + + + + diff --git a/static/development-bundle/demos/progressbar/resize.html b/static/development-bundle/demos/progressbar/resize.html new file mode 100644 index 0000000..d1c53af --- /dev/null +++ b/static/development-bundle/demos/progressbar/resize.html @@ -0,0 +1,37 @@ + + + + jQuery UI Progressbar - Resizable + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ +

The progress bar's widths are specified in percentages for flexible sizing so it will resize to fit its container. Try resizing the height and width of this bar to see how it maintains the correct proportions. (This is not necessarily a real-world example, but it's a good illustration of how flexibly all the plugins are coded.)

+ +
+ + + diff --git a/static/development-bundle/demos/removeClass/default.html b/static/development-bundle/demos/removeClass/default.html new file mode 100644 index 0000000..83a8b89 --- /dev/null +++ b/static/development-bundle/demos/removeClass/default.html @@ -0,0 +1,51 @@ + + + + jQuery UI Effects - removeClass Demo + + + + + + + + + +
+ +
+
+ Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. +
+
+ +Run Effect + +
+ +
+ +

Click the button above to preview the effect.

+ +
+ + + diff --git a/static/development-bundle/demos/removeClass/index.html b/static/development-bundle/demos/removeClass/index.html new file mode 100644 index 0000000..4b9471d --- /dev/null +++ b/static/development-bundle/demos/removeClass/index.html @@ -0,0 +1,17 @@ + + + + jQuery UI Effects Demos + + + + +
+

Examples

+ +
+ + + diff --git a/static/development-bundle/demos/resizable/animate.html b/static/development-bundle/demos/resizable/animate.html new file mode 100644 index 0000000..9af1548 --- /dev/null +++ b/static/development-bundle/demos/resizable/animate.html @@ -0,0 +1,38 @@ + + + + jQuery UI Resizable - Animate + + + + + + + + + +
+ +
+

Animate

+
+ +
+ +
+ +

Animate the resize action using the animate option (boolean). When this option is set to true, drag the outline to the desired location; the element animates to that size on drag stop.

+ +
+ + diff --git a/static/development-bundle/demos/resizable/aspect-ratio.html b/static/development-bundle/demos/resizable/aspect-ratio.html new file mode 100644 index 0000000..56edad4 --- /dev/null +++ b/static/development-bundle/demos/resizable/aspect-ratio.html @@ -0,0 +1,37 @@ + + + + jQuery UI Resizable - Preserve aspect ratio + + + + + + + + + +
+ +
+

Preserve aspect ratio

+
+ +
+ +
+ +

Maintain the existing aspect ratio or set a new one to constrain the proportions on resize. Set the aspectRatio option to true, and optionally pass in a new ratio (i.e., 4/3)

+ +
+ + diff --git a/static/development-bundle/demos/resizable/constrain-area.html b/static/development-bundle/demos/resizable/constrain-area.html new file mode 100644 index 0000000..e1a9122 --- /dev/null +++ b/static/development-bundle/demos/resizable/constrain-area.html @@ -0,0 +1,42 @@ + + + + jQuery UI Resizable - Constrain resize area + + + + + + + + + +
+ +
+

Containment

+
+

Resizable

+
+
+ +
+ +
+ +

Define the boundaries of the resizable area. Use the containment option to specify a parent DOM element or a jQuery selector, like 'document.'

+ +
+ + diff --git a/static/development-bundle/demos/resizable/default.html b/static/development-bundle/demos/resizable/default.html new file mode 100644 index 0000000..0b77b34 --- /dev/null +++ b/static/development-bundle/demos/resizable/default.html @@ -0,0 +1,35 @@ + + + + jQuery UI Resizable - Default functionality + + + + + + + + + +
+ +
+

Resizable

+
+ +
+ +
+ +

Enable any DOM element to be resizable. With the cursor grab the right or bottom border and drag to the desired width or height.

+ +
+ + diff --git a/static/development-bundle/demos/resizable/delay-start.html b/static/development-bundle/demos/resizable/delay-start.html new file mode 100644 index 0000000..df20f8e --- /dev/null +++ b/static/development-bundle/demos/resizable/delay-start.html @@ -0,0 +1,49 @@ + + + + jQuery UI Resizable - Delay start + + + + + + + + + +
+ +

Time delay (ms):

+
+

Time

+
+ +

Distance delay (px):

+
+

Distance

+
+ + + +
+ +
+ +

Delay the start of resizng for a number of milliseconds with the delay option; prevent resizing until the cursor is held down and dragged a specifed number of pixels with the distance option.

+ +
+ + diff --git a/static/development-bundle/demos/resizable/index.html b/static/development-bundle/demos/resizable/index.html new file mode 100644 index 0000000..561b5bf --- /dev/null +++ b/static/development-bundle/demos/resizable/index.html @@ -0,0 +1,25 @@ + + + + jQuery UI Resizable Demos + + + + + + + + diff --git a/static/development-bundle/demos/resizable/max-min.html b/static/development-bundle/demos/resizable/max-min.html new file mode 100644 index 0000000..d29e4d7 --- /dev/null +++ b/static/development-bundle/demos/resizable/max-min.html @@ -0,0 +1,40 @@ + + + + jQuery UI Resizable - Maximum / minimum size + + + + + + + + + +
+ +
+

Resize larger / smaller

+
+ +
+ +
+ +

Limit the resizable element to a maximum or minimum height or width using the maxHeight, maxWidth, minHeight, and minWidth options.

+ +
+ + diff --git a/static/development-bundle/demos/resizable/snap-to-grid.html b/static/development-bundle/demos/resizable/snap-to-grid.html new file mode 100644 index 0000000..f2adcc6 --- /dev/null +++ b/static/development-bundle/demos/resizable/snap-to-grid.html @@ -0,0 +1,37 @@ + + + + jQuery UI Resizable - Snap to grid + + + + + + + + + +
+ +
+

Grid

+
+ +
+ +
+ +

Snap the resizable element to a grid. Set the dimensions of grid cells (height and width in pixels) with the grid option.

+ +
+ + diff --git a/static/development-bundle/demos/resizable/synchronous-resize.html b/static/development-bundle/demos/resizable/synchronous-resize.html new file mode 100644 index 0000000..bd5de82 --- /dev/null +++ b/static/development-bundle/demos/resizable/synchronous-resize.html @@ -0,0 +1,44 @@ + + + + jQuery UI Resizable - Synchronous resize + + + + + + + + + +
+ +
+

Resize

+
+ +
+

will also resize

+
+ +
+ +
+ +

Resize multiple elements simultaneously by clicking and dragging the sides of one. Pass a shared selector into the alsoResize option.

+ +
+ + diff --git a/static/development-bundle/demos/resizable/visual-feedback.html b/static/development-bundle/demos/resizable/visual-feedback.html new file mode 100644 index 0000000..c3edf9a --- /dev/null +++ b/static/development-bundle/demos/resizable/visual-feedback.html @@ -0,0 +1,38 @@ + + + + jQuery UI Resizable - Visual feedback + + + + + + + + + +
+ +
+

Ghost

+
+ +
+ +
+ +

Instead of showing the actual element during resize, set the ghost option to true to show a semi-transparent part of the element.

+ +
+ + diff --git a/static/development-bundle/demos/selectable/default.html b/static/development-bundle/demos/selectable/default.html new file mode 100644 index 0000000..6a81f2b --- /dev/null +++ b/static/development-bundle/demos/selectable/default.html @@ -0,0 +1,45 @@ + + + + jQuery UI Selectable - Default functionality + + + + + + + + + + +
+ +
    +
  1. Item 1
  2. +
  3. Item 2
  4. +
  5. Item 3
  6. +
  7. Item 4
  8. +
  9. Item 5
  10. +
  11. Item 6
  12. +
  13. Item 7
  14. +
+ +
+ +
+ +

Enable a DOM element (or group of elements) to be selectable. Draw a box with your cursor to select items. Hold down the Ctrl key to make multiple non-adjacent selections.

+ +
+ + diff --git a/static/development-bundle/demos/selectable/display-grid.html b/static/development-bundle/demos/selectable/display-grid.html new file mode 100644 index 0000000..3843c77 --- /dev/null +++ b/static/development-bundle/demos/selectable/display-grid.html @@ -0,0 +1,50 @@ + + + + jQuery UI Selectable - Display as grid + + + + + + + + + + +
+ +
    +
  1. 1
  2. +
  3. 2
  4. +
  5. 3
  6. +
  7. 4
  8. +
  9. 5
  10. +
  11. 6
  12. +
  13. 7
  14. +
  15. 8
  16. +
  17. 9
  18. +
  19. 10
  20. +
  21. 11
  22. +
  23. 12
  24. +
+ +
+ +
+ +

To arrange selectable items as a grid, give them identical dimensions and float them using CSS.

+ +
+ + diff --git a/static/development-bundle/demos/selectable/index.html b/static/development-bundle/demos/selectable/index.html new file mode 100644 index 0000000..8429802 --- /dev/null +++ b/static/development-bundle/demos/selectable/index.html @@ -0,0 +1,19 @@ + + + + jQuery UI Selectable Demos + + + + + + + + diff --git a/static/development-bundle/demos/selectable/serialize.html b/static/development-bundle/demos/selectable/serialize.html new file mode 100644 index 0000000..0e201fa --- /dev/null +++ b/static/development-bundle/demos/selectable/serialize.html @@ -0,0 +1,56 @@ + + + + jQuery UI Selectable - Serialize + + + + + + + + + + +
+ +

+You've selected: none. +

+ +
    +
  1. Item 1
  2. +
  3. Item 2
  4. +
  5. Item 3
  6. +
  7. Item 4
  8. +
  9. Item 5
  10. +
  11. Item 6
  12. +
+ +
+ +
+ +

Write a function that fires on the stop event to collect the index values of selected items. Present values as feedback, or pass as a data string.

+ +
+ + diff --git a/static/development-bundle/demos/show/default.html b/static/development-bundle/demos/show/default.html new file mode 100644 index 0000000..7c70526 --- /dev/null +++ b/static/development-bundle/demos/show/default.html @@ -0,0 +1,106 @@ + + + + jQuery UI Effects - Show Demo + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+

Show

+

+ Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi. +

+
+
+ + + +Run Effect + + +
+ +
+ +

Click the button above to preview the effect.

+ +
+ + + diff --git a/static/development-bundle/demos/show/index.html b/static/development-bundle/demos/show/index.html new file mode 100644 index 0000000..4b9471d --- /dev/null +++ b/static/development-bundle/demos/show/index.html @@ -0,0 +1,17 @@ + + + + jQuery UI Effects Demos + + + + +
+

Examples

+ +
+ + + diff --git a/static/development-bundle/demos/slider/colorpicker.html b/static/development-bundle/demos/slider/colorpicker.html new file mode 100644 index 0000000..0f7c264 --- /dev/null +++ b/static/development-bundle/demos/slider/colorpicker.html @@ -0,0 +1,92 @@ + + + + jQuery UI Slider - Colorpicker + + + + + + + + + + +
+ +

+ +Simple Colorpicker +

+ +
+
+
+ +
+ +
+ +
+ +

Combine three sliders to create a simple RGB colorpicker.

+ +
+ + + diff --git a/static/development-bundle/demos/slider/default.html b/static/development-bundle/demos/slider/default.html new file mode 100644 index 0000000..da92869 --- /dev/null +++ b/static/development-bundle/demos/slider/default.html @@ -0,0 +1,34 @@ + + + + jQuery UI Slider - Default functionality + + + + + + + + + + +
+ +
+ +
+ +
+ +

The basic slider is horizontal and has a single handle that can be moved with the mouse or by using the arrow keys.

+ +
+ + + diff --git a/static/development-bundle/demos/slider/index.html b/static/development-bundle/demos/slider/index.html new file mode 100644 index 0000000..9a010a5 --- /dev/null +++ b/static/development-bundle/demos/slider/index.html @@ -0,0 +1,25 @@ + + + + jQuery UI Slider Demos + + + + + + + + diff --git a/static/development-bundle/demos/slider/multiple-vertical.html b/static/development-bundle/demos/slider/multiple-vertical.html new file mode 100644 index 0000000..48258cc --- /dev/null +++ b/static/development-bundle/demos/slider/multiple-vertical.html @@ -0,0 +1,76 @@ + + + + jQuery UI Slider - Multiple sliders + + + + + + + + + + +
+ +

+ +Master volume +

+ +
+ +

+ +Graphic EQ +

+ +
+ 88 + 77 + 55 + 33 + 40 + 45 + 70 +
+ +
+ +
+ +

Combine horizontal and vertical sliders, each with their own options, to create the UI for a music player.

+ +
+ + + diff --git a/static/development-bundle/demos/slider/range-vertical.html b/static/development-bundle/demos/slider/range-vertical.html new file mode 100644 index 0000000..ad59511 --- /dev/null +++ b/static/development-bundle/demos/slider/range-vertical.html @@ -0,0 +1,47 @@ + + + + jQuery UI Slider - Vertical range slider + + + + + + + + + + +
+ +

+ + +

+ +
+ +
+ +
+ +

Change the orientation of the range slider to vertical. Assign a height value via .height() or by setting the height through CSS, and set the orientation option to "vertical."

+ +
+ + + diff --git a/static/development-bundle/demos/slider/range.html b/static/development-bundle/demos/slider/range.html new file mode 100644 index 0000000..7c595e0 --- /dev/null +++ b/static/development-bundle/demos/slider/range.html @@ -0,0 +1,48 @@ + + + + jQuery UI Slider - Range slider + + + + + + + + + + +
+ +

+ + +

+ +
+ +
+ +
+ +

Set the range option to true to capture a range of values with two drag handles. The space between the handles is filled with a different background color to indicate those values are selected.

+ +
+ + + diff --git a/static/development-bundle/demos/slider/rangemax.html b/static/development-bundle/demos/slider/rangemax.html new file mode 100644 index 0000000..db266db --- /dev/null +++ b/static/development-bundle/demos/slider/rangemax.html @@ -0,0 +1,47 @@ + + + + jQuery UI Slider - Range with fixed maximum + + + + + + + + + + +
+ +

+Minimum number of bedrooms: + +

+
+ +
+ +
+ +

Fix the maximum value of the range slider so that the user can only select a minimum. Set the range option to "max."

+ +
+ + + diff --git a/static/development-bundle/demos/slider/rangemin.html b/static/development-bundle/demos/slider/rangemin.html new file mode 100644 index 0000000..4eebade --- /dev/null +++ b/static/development-bundle/demos/slider/rangemin.html @@ -0,0 +1,48 @@ + + + + jQuery UI Slider - Range with fixed minimum + + + + + + + + + + +
+ +

+ + +

+ +
+ +
+ +
+ +

Fix the minimum value of the range slider so that the user can only select a maximum. Set the range option to "min."

+ +
+ + + diff --git a/static/development-bundle/demos/slider/slider-vertical.html b/static/development-bundle/demos/slider/slider-vertical.html new file mode 100644 index 0000000..7731a4b --- /dev/null +++ b/static/development-bundle/demos/slider/slider-vertical.html @@ -0,0 +1,49 @@ + + + + jQuery UI Slider - Vertical slider + + + + + + + + + + +
+ +

+ + +

+ +
+ +
+ +
+ +

Change the orientation of the slider to vertical. Assign a height value via .height() or by setting the height through CSS, and set the orientation option to "vertical."

+ +
+ + + diff --git a/static/development-bundle/demos/slider/steps.html b/static/development-bundle/demos/slider/steps.html new file mode 100644 index 0000000..f29b734 --- /dev/null +++ b/static/development-bundle/demos/slider/steps.html @@ -0,0 +1,48 @@ + + + + jQuery UI Slider - Snap to increments + + + + + + + + + + +
+ +

+ + +

+ +
+ +
+ +
+ +

Increment slider values with the step option set to an integer, commonly a dividend of the slider's maximum value. The default increment is 1.

+ +
+ + + diff --git a/static/development-bundle/demos/sortable/connect-lists-through-tabs.html b/static/development-bundle/demos/sortable/connect-lists-through-tabs.html new file mode 100644 index 0000000..481c506 --- /dev/null +++ b/static/development-bundle/demos/sortable/connect-lists-through-tabs.html @@ -0,0 +1,76 @@ + + + + jQuery UI Sortable - Connect lists with Tabs + + + + + + + + + + + +
+ +
+ +
+
    +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
  • Item 4
  • +
  • Item 5
  • +
+
+
+
    +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
  • Item 4
  • +
  • Item 5
  • +
+
+
+ +
+ +
+ +

+ Sort items from one list into another and vice versa, by dropping the list item on the appropriate tab above. +

+ +
+ + + diff --git a/static/development-bundle/demos/sortable/connect-lists.html b/static/development-bundle/demos/sortable/connect-lists.html new file mode 100644 index 0000000..639f0e9 --- /dev/null +++ b/static/development-bundle/demos/sortable/connect-lists.html @@ -0,0 +1,55 @@ + + + + jQuery UI Sortable - Connect lists + + + + + + + + + +
+ +
    +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
  • Item 4
  • +
  • Item 5
  • +
+ +
    +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
  • Item 4
  • +
  • Item 5
  • +
+ +
+ +
+ +

+ Sort items from one list into another and vice versa, by passing a selector into + the connectWith option. The simplest way to do this is to + group all related lists with a CSS class, and then pass that class into the + sortable function (i.e., connectWith: '.myclass'). +

+ +
+ + + diff --git a/static/development-bundle/demos/sortable/default.html b/static/development-bundle/demos/sortable/default.html new file mode 100644 index 0000000..6df9ec1 --- /dev/null +++ b/static/development-bundle/demos/sortable/default.html @@ -0,0 +1,48 @@ + + + + jQuery UI Sortable - Default functionality + + + + + + + + + +
+ +
    +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
  • Item 4
  • +
  • Item 5
  • +
  • Item 6
  • +
  • Item 7
  • +
+ +
+ +
+ +

+ Enable a group of DOM elements to be sortable. Click on and drag an + element to a new spot within the list, and the other items will adjust to + fit. By default, sortable items share draggable properties. +

+ +
+ + + diff --git a/static/development-bundle/demos/sortable/delay-start.html b/static/development-bundle/demos/sortable/delay-start.html new file mode 100644 index 0000000..636b743 --- /dev/null +++ b/static/development-bundle/demos/sortable/delay-start.html @@ -0,0 +1,64 @@ + + + + jQuery UI Sortable - Delay start + + + + + + + + + +
+ +

Time delay of 300ms:

+ +
    +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
  • Item 4
  • +
+ +

Distance delay of 15px:

+ +
    +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
  • Item 4
  • +
+ +
+ +
+ +

+ Prevent accidental sorting either by delay (time) or distance. Set a number of + milliseconds the element needs to be dragged before sorting starts + with the delay option. Set a distance in pixels the element + needs to be dragged before sorting starts with the distance + option. +

+ +
+ + + diff --git a/static/development-bundle/demos/sortable/display-grid.html b/static/development-bundle/demos/sortable/display-grid.html new file mode 100644 index 0000000..e10cd99 --- /dev/null +++ b/static/development-bundle/demos/sortable/display-grid.html @@ -0,0 +1,51 @@ + + + + jQuery UI Sortable - Display as grid + + + + + + + + + +
+ +
    +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
  • 5
  • +
  • 6
  • +
  • 7
  • +
  • 8
  • +
  • 9
  • +
  • 10
  • +
  • 11
  • +
  • 12
  • +
+ +
+ +
+ +

+ To arrange sortable items as a grid, give them identical dimensions and + float them using CSS. +

+ +
+ + + diff --git a/static/development-bundle/demos/sortable/empty-lists.html b/static/development-bundle/demos/sortable/empty-lists.html new file mode 100644 index 0000000..1886b8e --- /dev/null +++ b/static/development-bundle/demos/sortable/empty-lists.html @@ -0,0 +1,66 @@ + + + + jQuery UI Sortable - Handle empty lists + + + + + + + + + +
+ +
    +
  • Can be dropped..
  • +
  • ..on an empty list
  • +
  • Item 3
  • +
  • Item 4
  • +
  • Item 5
  • +
+ +
    +
  • Cannot be dropped..
  • +
  • ..on an empty list
  • +
  • Item 3
  • +
  • Item 4
  • +
  • Item 5
  • +
+ +
    +
+ +
+ +
+ +
+ +

+ Prevent all items in a list from being dropped into a separate, empty list + using the dropOnEmpty option set to false. By default, + sortable items can be dropped on empty lists. +

+ +
+ + + diff --git a/static/development-bundle/demos/sortable/index.html b/static/development-bundle/demos/sortable/index.html new file mode 100644 index 0000000..b77f223 --- /dev/null +++ b/static/development-bundle/demos/sortable/index.html @@ -0,0 +1,25 @@ + + + + jQuery UI Sortable Demos + + + + + + + + diff --git a/static/development-bundle/demos/sortable/items.html b/static/development-bundle/demos/sortable/items.html new file mode 100644 index 0000000..093631f --- /dev/null +++ b/static/development-bundle/demos/sortable/items.html @@ -0,0 +1,68 @@ + + + + jQuery UI Sortable - Include / exclude items + + + + + + + + + +
+ +

Specify which items are sortable:

+ +
    +
  • Item 1
  • +
  • (I'm not sortable or a drop target)
  • +
  • (I'm not sortable or a drop target)
  • +
  • Item 4
  • +
+ +

Cancel sorting (but keep as drop targets):

+ +
    +
  • Item 1
  • +
  • (I'm not sortable)
  • +
  • (I'm not sortable)
  • +
  • Item 4
  • +
+ +
+ +
+ +

+ Specify which items are eligible to sort by passing a jQuery selector into + the items option. Items excluded from this option are not + sortable, nor are they valid targets for sortable items. +

+ +

+ To only prevent sorting on certain items, pass a jQuery selector into the + cancel option. Cancelled items remain valid sort targets for + others. +

+ +
+ + + diff --git a/static/development-bundle/demos/sortable/placeholder.html b/static/development-bundle/demos/sortable/placeholder.html new file mode 100644 index 0000000..565eb0b --- /dev/null +++ b/static/development-bundle/demos/sortable/placeholder.html @@ -0,0 +1,53 @@ + + + + jQuery UI Sortable - Drop placeholder + + + + + + + + + +
+ +
    +
  • Item 1
  • +
  • Item 2
  • +
  • Item 3
  • +
  • Item 4
  • +
  • Item 5
  • +
  • Item 6
  • +
  • Item 7
  • +
+ +
+ +
+ +

+ When dragging a sortable item to a new location, other items will make room + for the that item by shifting to allow white space between them. Pass a + class into the placeholder option to style that space to + be visible. Use the boolean forcePlaceholderSize option + to set dimensions on the placeholder. +

+ +
+ + + diff --git a/static/development-bundle/demos/sortable/portlets.html b/static/development-bundle/demos/sortable/portlets.html new file mode 100644 index 0000000..5430989 --- /dev/null +++ b/static/development-bundle/demos/sortable/portlets.html @@ -0,0 +1,93 @@ + + + + jQuery UI Sortable - Portlets + + + + + + + + + +
+ +
+ +
+
Feeds
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit
+
+ +
+
News
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit
+
+ +
+ +
+ +
+
Shopping
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit
+
+ +
+ +
+ +
+
Links
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit
+
+ +
+
Images
+
Lorem ipsum dolor sit amet, consectetuer adipiscing elit
+
+ +
+ +
+ +
+ +

+ Enable portlets (styled divs) as sortables and use the connectWith + option to allow sorting between columns. +

+ +
+ + + diff --git a/static/development-bundle/demos/switchClass/default.html b/static/development-bundle/demos/switchClass/default.html new file mode 100644 index 0000000..09b48c9 --- /dev/null +++ b/static/development-bundle/demos/switchClass/default.html @@ -0,0 +1,47 @@ + + + + jQuery UI Effects - switchClass Demo + + + + + + + + + +
+ + +
+
+ Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. +
+
+Run Effect + +
+ +
+ +

Click the button above to preview the effect.

+ +
+ + + diff --git a/static/development-bundle/demos/switchClass/index.html b/static/development-bundle/demos/switchClass/index.html new file mode 100644 index 0000000..4b9471d --- /dev/null +++ b/static/development-bundle/demos/switchClass/index.html @@ -0,0 +1,17 @@ + + + + jQuery UI Effects Demos + + + + +
+

Examples

+ +
+ + + diff --git a/static/development-bundle/demos/tabs/ajax.html b/static/development-bundle/demos/tabs/ajax.html new file mode 100644 index 0000000..ecbc2c5 --- /dev/null +++ b/static/development-bundle/demos/tabs/ajax.html @@ -0,0 +1,40 @@ + + + + jQuery UI Tabs - Content via Ajax + + + + + + + + + +
+ +
+ +
+

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

+
+
+ +
+ +
+ +

Fetch external content via Ajax for the tabs by setting an href value in the tab links. While the Ajax request is waiting for a response, the tab label changes to say "Loading...", then returns to the normal label once loaded.

+ +
+ + + diff --git a/static/development-bundle/demos/tabs/ajax/content1.html b/static/development-bundle/demos/tabs/ajax/content1.html new file mode 100644 index 0000000..759bf13 --- /dev/null +++ b/static/development-bundle/demos/tabs/ajax/content1.html @@ -0,0 +1,4 @@ +

This content was loaded via ajax. +

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

+

Mauris vitae ante. Curabitur augue. Nulla purus nibh, lobortis ut, feugiat at, aliquam id, purus. Sed venenatis, lorem venenatis volutpat commodo, purus quam lacinia justo, mattis interdum pede pede a odio. Fusce nibh. Morbi nisl mauris, dapibus in, tristique eget, accumsan et, pede. Donec mauris risus, pulvinar ut, faucibus eu, mollis in, nunc. In augue massa, commodo a, cursus vehicula, varius eu, dui. Suspendisse sodales suscipit lorem. Morbi malesuada, eros quis condimentum dignissim, lectus nibh tristique urna, non bibendum diam massa vel risus. Morbi suscipit. Proin egestas, eros at scelerisque scelerisque, dolor lacus fringilla lacus, ut ullamcorper mi magna at quam. Aliquam sed elit. Aliquam turpis purus, congue quis, iaculis id, ullamcorper sit amet, justo. Maecenas sed mauris. Proin magna justo, interdum in, tincidunt eu, viverra eu, turpis. Suspendisse mollis. In magna. Phasellus pellentesque, urna pellentesque convallis pellentesque, augue sem blandit pede, at rhoncus libero nisl a odio.

+

Sed vitae nibh non magna semper tempor. Duis dolor. Nam congue laoreet arcu. Fusce lobortis enim quis ligula. Maecenas commodo odio id mi. Maecenas scelerisque tellus eu odio. Etiam dolor purus, lacinia a, imperdiet in, aliquam et, eros. In pellentesque. Nullam ac massa. Integer et turpis. Ut quam augue, congue non, imperdiet id, eleifend ac, nisi. Etiam ac arcu. Cras iaculis accumsan erat. Nullam vulputate sapien nec nisi pretium rhoncus. Aliquam a nibh. Vivamus est ante, fermentum a, tincidunt ut, imperdiet nec, velit. Aenean non tortor. Sed nec mauris eget tellus condimentum rutrum.

\ No newline at end of file diff --git a/static/development-bundle/demos/tabs/ajax/content2.html b/static/development-bundle/demos/tabs/ajax/content2.html new file mode 100644 index 0000000..759bf13 --- /dev/null +++ b/static/development-bundle/demos/tabs/ajax/content2.html @@ -0,0 +1,4 @@ +

This content was loaded via ajax. +

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

+

Mauris vitae ante. Curabitur augue. Nulla purus nibh, lobortis ut, feugiat at, aliquam id, purus. Sed venenatis, lorem venenatis volutpat commodo, purus quam lacinia justo, mattis interdum pede pede a odio. Fusce nibh. Morbi nisl mauris, dapibus in, tristique eget, accumsan et, pede. Donec mauris risus, pulvinar ut, faucibus eu, mollis in, nunc. In augue massa, commodo a, cursus vehicula, varius eu, dui. Suspendisse sodales suscipit lorem. Morbi malesuada, eros quis condimentum dignissim, lectus nibh tristique urna, non bibendum diam massa vel risus. Morbi suscipit. Proin egestas, eros at scelerisque scelerisque, dolor lacus fringilla lacus, ut ullamcorper mi magna at quam. Aliquam sed elit. Aliquam turpis purus, congue quis, iaculis id, ullamcorper sit amet, justo. Maecenas sed mauris. Proin magna justo, interdum in, tincidunt eu, viverra eu, turpis. Suspendisse mollis. In magna. Phasellus pellentesque, urna pellentesque convallis pellentesque, augue sem blandit pede, at rhoncus libero nisl a odio.

+

Sed vitae nibh non magna semper tempor. Duis dolor. Nam congue laoreet arcu. Fusce lobortis enim quis ligula. Maecenas commodo odio id mi. Maecenas scelerisque tellus eu odio. Etiam dolor purus, lacinia a, imperdiet in, aliquam et, eros. In pellentesque. Nullam ac massa. Integer et turpis. Ut quam augue, congue non, imperdiet id, eleifend ac, nisi. Etiam ac arcu. Cras iaculis accumsan erat. Nullam vulputate sapien nec nisi pretium rhoncus. Aliquam a nibh. Vivamus est ante, fermentum a, tincidunt ut, imperdiet nec, velit. Aenean non tortor. Sed nec mauris eget tellus condimentum rutrum.

\ No newline at end of file diff --git a/static/development-bundle/demos/tabs/collapsible.html b/static/development-bundle/demos/tabs/collapsible.html new file mode 100644 index 0000000..eab85af --- /dev/null +++ b/static/development-bundle/demos/tabs/collapsible.html @@ -0,0 +1,54 @@ + + + + jQuery UI Tabs - Collapse content + + + + + + + + + +
+ +
+ +
+

Click this tab again to close the content pane.

+

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

+
+
+

Click this tab again to close the content pane.

+

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.

+
+
+

Click this tab again to close the content pane.

+

Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.

+
+
+ +
+ +
+ +

Click the selected tab to toggle its content closed/open. To enable this functionality, set the collapsible option to true.

+ +
collapsible: true
+
+ +
+ + + diff --git a/static/development-bundle/demos/tabs/default.html b/static/development-bundle/demos/tabs/default.html new file mode 100644 index 0000000..6048bc9 --- /dev/null +++ b/static/development-bundle/demos/tabs/default.html @@ -0,0 +1,47 @@ + + + + jQuery UI Tabs - Default functionality + + + + + + + + + +
+ +
+ +
+

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

+
+
+

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.

+
+
+

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.

+

Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.

+
+
+ +
+ +
+ +

Click tabs to swap between content that is broken into logical sections.

+ +
+ + + diff --git a/static/development-bundle/demos/tabs/index.html b/static/development-bundle/demos/tabs/index.html new file mode 100644 index 0000000..903e9f3 --- /dev/null +++ b/static/development-bundle/demos/tabs/index.html @@ -0,0 +1,21 @@ + + + + jQuery UI Tabs Demos + + + + + + + + diff --git a/static/development-bundle/demos/tabs/mouseover.html b/static/development-bundle/demos/tabs/mouseover.html new file mode 100644 index 0000000..3232e1f --- /dev/null +++ b/static/development-bundle/demos/tabs/mouseover.html @@ -0,0 +1,52 @@ + + + + jQuery UI Tabs - Open on mouseover + + + + + + + + + +
+ +
+ +
+

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

+
+
+

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.

+
+
+

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.

+

Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.

+
+
+ +
+ +
+ +

Toggle sections open/closed on mouseover with the event option. The default value for event is "click."

+ +
event: 'mouseover'
+
+ +
+ + + diff --git a/static/development-bundle/demos/tabs/sortable.html b/static/development-bundle/demos/tabs/sortable.html new file mode 100644 index 0000000..1b0d458 --- /dev/null +++ b/static/development-bundle/demos/tabs/sortable.html @@ -0,0 +1,62 @@ + + + + jQuery UI Tabs - Sortable + + + + + + + + + + +
+ +
+ +
+

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

+
+
+

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.

+
+
+

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.

+

Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.

+
+
+ +
+ +
+ +

+Drag the tabs above to re-order them. +

+ +

+Making tabs sortable is as simple as calling + +.sortable() + +on the + +.ui-tabs-nav + +element. +

+ +
+ + + diff --git a/static/development-bundle/demos/tabs/vertical.html b/static/development-bundle/demos/tabs/vertical.html new file mode 100644 index 0000000..56001c3 --- /dev/null +++ b/static/development-bundle/demos/tabs/vertical.html @@ -0,0 +1,62 @@ + + + + jQuery UI Tabs - Vertical Tabs functionality + + + + + + + + + + +
+ +
+ +
+

Content heading 1

+

Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.

+
+
+

Content heading 2

+

Morbi tincidunt, dui sit amet facilisis feugiat, odio metus gravida ante, ut pharetra massa metus id nunc. Duis scelerisque molestie turpis. Sed fringilla, massa eget luctus malesuada, metus eros molestie lectus, ut tempus eros massa ut dolor. Aenean aliquet fringilla sem. Suspendisse sed ligula in ligula suscipit aliquam. Praesent in eros vestibulum mi adipiscing adipiscing. Morbi facilisis. Curabitur ornare consequat nunc. Aenean vel metus. Ut posuere viverra nulla. Aliquam erat volutpat. Pellentesque convallis. Maecenas feugiat, tellus pellentesque pretium posuere, felis lorem euismod felis, eu ornare leo nisi vel felis. Mauris consectetur tortor et purus.

+
+
+

Content heading 3

+

Mauris eleifend est et turpis. Duis id erat. Suspendisse potenti. Aliquam vulputate, pede vel vehicula accumsan, mi neque rutrum erat, eu congue orci lorem eget lorem. Vestibulum non ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sodales. Quisque eu urna vel enim commodo pellentesque. Praesent eu risus hendrerit ligula tempus pretium. Curabitur lorem enim, pretium nec, feugiat nec, luctus a, lacus.

+

Duis cursus. Maecenas ligula eros, blandit nec, pharetra at, semper at, magna. Nullam ac lacus. Nulla facilisi. Praesent viverra justo vitae neque. Praesent blandit adipiscing velit. Suspendisse potenti. Donec mattis, pede vel pharetra blandit, magna ligula faucibus eros, id euismod lacus dolor eget odio. Nam scelerisque. Donec non libero sed nulla mattis commodo. Ut sagittis. Donec nisi lectus, feugiat porttitor, tempor ac, tempor vitae, pede. Aenean vehicula velit eu tellus interdum rutrum. Maecenas commodo. Pellentesque nec elit. Fusce in lacus. Vivamus a libero vitae lectus hendrerit hendrerit.

+
+
+ +
+ +
+ +

Click tabs to swap between content that is broken into logical sections.

+ +
+ + + diff --git a/static/development-bundle/demos/toggle/default.html b/static/development-bundle/demos/toggle/default.html new file mode 100644 index 0000000..ffb464b --- /dev/null +++ b/static/development-bundle/demos/toggle/default.html @@ -0,0 +1,94 @@ + + + + jQuery UI Effects - Toggle Demo + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+

Toggle

+

+ Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi. +

+
+
+ + + +Run Effect +
+ +
+ +

Click the button above to preview the effect.

+ +
+ + + diff --git a/static/development-bundle/demos/toggle/index.html b/static/development-bundle/demos/toggle/index.html new file mode 100644 index 0000000..4b9471d --- /dev/null +++ b/static/development-bundle/demos/toggle/index.html @@ -0,0 +1,17 @@ + + + + jQuery UI Effects Demos + + + + +
+

Examples

+ +
+ + + diff --git a/static/development-bundle/demos/toggleClass/default.html b/static/development-bundle/demos/toggleClass/default.html new file mode 100644 index 0000000..8faa159 --- /dev/null +++ b/static/development-bundle/demos/toggleClass/default.html @@ -0,0 +1,45 @@ + + + + jQuery UI Effects - toggleClass Demo + + + + + + + + + +
+ +
+
+ Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. +
+
+ +Run Effect + +
+ +
+ +

Click the button above to preview the effect.

+ +
+ + + diff --git a/static/development-bundle/demos/toggleClass/index.html b/static/development-bundle/demos/toggleClass/index.html new file mode 100644 index 0000000..4b9471d --- /dev/null +++ b/static/development-bundle/demos/toggleClass/index.html @@ -0,0 +1,17 @@ + + + + jQuery UI Effects Demos + + + + +
+

Examples

+ +
+ + + diff --git a/static/development-bundle/docs/accordion.html b/static/development-bundle/docs/accordion.html new file mode 100644 index 0000000..bf89bc3 --- /dev/null +++ b/static/development-bundle/docs/accordion.html @@ -0,0 +1,869 @@ + + +
+

jQuery UI Accordion

+
+

Overview

+
+

Make the selected elements Accordion widgets. Semantic requirements:

+

The markup of your accordion container needs pairs of headers and content panels. By default, the header elements are anchors, assuming the following structure:

+
<div id="accordion">
+    <a href="#">First header</a>
+    <div>First content</div>
+    <a href="#">Second header</a>
+    <div>Second content</div>
+</div>
+

If you use a different element for the header, specify the header-option with an appropriate selector, eg. header: 'h3'. The content element must be always next to its header.

+

If you have links inside the accordion content and use a-elements as headers, add a class to them and use that as the header, eg. header: 'a.header'.

+

Use activate(Number) to change the active content programmatically.

+

NOTE: If you want multiple sections open at once, don't use an accordion

+

An accordion doesn't allow more than one content panel to be open at the same time, and it takes a lot of effort to do that. If you are looking for a widget that allows more than one content panel to be open, don't use this. Usually it can be written with a few lines of jQuery instead, something like this:

+
jQuery(document).ready(function(){
+	$('.accordion .head').click(function() {
+		$(this).next().toggle();
+		return false;
+	}).next().hide();
+});
+

Or animated:

+
jQuery(document).ready(function(){
+	$('.accordion .head').click(function() {
+		$(this).next().toggle('slow');
+		return false;
+	}).next().hide();
+});
+
+
+

Dependencies

+
    +
  • UI Core
  • +
  • UI Effects Core (Optional - only for non-default animations)
  • +
+
+
+

Example

+
+ +

+A simple jQuery UI Accordion.
+

+
$("#accordion").accordion();
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.accordion.js"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("#accordion").accordion();
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<div id="accordion">
+	<h3><a href="#">Section 1</a></h3>
+	<div>
+		<p>
+		Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
+		ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
+		amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
+		odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
+		</p>
+	</div>
+	<h3><a href="#">Section 2</a></h3>
+	<div>
+		<p>
+		Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
+		purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
+		velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
+		suscipit faucibus urna.
+		</p>
+	</div>
+	<h3><a href="#">Section 3</a></h3>
+	<div>
+		<p>
+		Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
+		Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
+		ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
+		lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
+		</p>
+		<ul>
+			<li>List item one</li>
+			<li>List item two</li>
+			<li>List item three</li>
+		</ul>
+	</div>
+	<h3><a href="#">Section 4</a></h3>
+	<div>
+		<p>
+		Cras dictum. Pellentesque habitant morbi tristique senectus et netus
+		et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
+		faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
+		mauris vel est.
+		</p>
+		<p>
+		Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
+		Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
+		inceptos himenaeos.
+		</p>
+	</div>
+</div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Options

+
    + +
  • +
    +

    active

    +
    +
    Type:
    +
    Selector, Element, jQuery, Boolean, Number
    + +
    Default:
    +
    first child
    + +
    +
    +
    +

    Selector for the active element. Set to false to display none at start. Needs collapsible: true.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a accordion with the active option specified. +
    +
    +
    $('.selector').accordion({ active: 2 });
    +
    + + +
    + Get or set the active option, after init. +
    +
    +
    //getter
    +var active = $('.selector').accordion('option', 'active');
    +//setter
    +$('.selector').accordion('option', 'active', 2);
    +
    + +
    +
    +
  • + + +
  • +
    +

    animated

    +
    +
    Type:
    +
    Boolean, String
    + +
    Default:
    +
    'slide'
    + +
    +
    +
    +

    Choose your favorite animation, or disable them (set to false). In addition to the default, 'bounceslide' and all defined easing methods are supported ('bounceslide' requires UI Effects Core).

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a accordion with the animated option specified. +
    +
    +
    $('.selector').accordion({ animated: 'bounceslide' });
    +
    + + +
    + Get or set the animated option, after init. +
    +
    +
    //getter
    +var animated = $('.selector').accordion('option', 'animated');
    +//setter
    +$('.selector').accordion('option', 'animated', 'bounceslide');
    +
    + +
    +
    +
  • + + +
  • +
    +

    autoHeight

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    If set, the highest content part is used as height reference for all other parts. Provides more consistent animations.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a accordion with the autoHeight option specified. +
    +
    +
    $('.selector').accordion({ autoHeight: false });
    +
    + + +
    + Get or set the autoHeight option, after init. +
    +
    +
    //getter
    +var autoHeight = $('.selector').accordion('option', 'autoHeight');
    +//setter
    +$('.selector').accordion('option', 'autoHeight', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    clearStyle

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set, clears height and overflow styles after finishing animations. This enables accordions to work with dynamic content. Won't work together with autoHeight.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a accordion with the clearStyle option specified. +
    +
    +
    $('.selector').accordion({ clearStyle: true });
    +
    + + +
    + Get or set the clearStyle option, after init. +
    +
    +
    //getter
    +var clearStyle = $('.selector').accordion('option', 'clearStyle');
    +//setter
    +$('.selector').accordion('option', 'clearStyle', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    collapsible

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Whether all the sections can be closed at once. Allows collapsing the active section by the triggering event (click is the default).

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a accordion with the collapsible option specified. +
    +
    +
    $('.selector').accordion({ collapsible: true });
    +
    + + +
    + Get or set the collapsible option, after init. +
    +
    +
    //getter
    +var collapsible = $('.selector').accordion('option', 'collapsible');
    +//setter
    +$('.selector').accordion('option', 'collapsible', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    event

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'click'
    + +
    +
    +
    +

    The event on which to trigger the accordion.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a accordion with the event option specified. +
    +
    +
    $('.selector').accordion({ event: 'mouseover' });
    +
    + + +
    + Get or set the event option, after init. +
    +
    +
    //getter
    +var event = $('.selector').accordion('option', 'event');
    +//setter
    +$('.selector').accordion('option', 'event', 'mouseover');
    +
    + +
    +
    +
  • + + +
  • +
    +

    fillSpace

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set, the accordion completely fills the height of the parent element. Overrides autoheight.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a accordion with the fillSpace option specified. +
    +
    +
    $('.selector').accordion({ fillSpace: true });
    +
    + + +
    + Get or set the fillSpace option, after init. +
    +
    +
    //getter
    +var fillSpace = $('.selector').accordion('option', 'fillSpace');
    +//setter
    +$('.selector').accordion('option', 'fillSpace', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    header

    +
    +
    Type:
    +
    Selector, jQuery
    + +
    Default:
    +
    '> li > :first-child,> :not(li):even'
    + +
    +
    +
    +

    Selector for the header element.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a accordion with the header option specified. +
    +
    +
    $('.selector').accordion({ header: 'h3' });
    +
    + + +
    + Get or set the header option, after init. +
    +
    +
    //getter
    +var header = $('.selector').accordion('option', 'header');
    +//setter
    +$('.selector').accordion('option', 'header', 'h3');
    +
    + +
    +
    +
  • + + +
  • +
    +

    icons

    +
    +
    Type:
    +
    Object
    + +
    Default:
    +
    { 'header': 'ui-icon-triangle-1-e', 'headerSelected': 'ui-icon-triangle-1-s' }
    + +
    +
    +
    +

    Icons to use for headers. Icons may be specified for 'header' and 'headerSelected', and we recommend using the icons native to the jQuery UI CSS Framework manipulated by jQuery UI ThemeRoller

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a accordion with the icons option specified. +
    +
    +
    $('.selector').accordion({ icons: { 'header': 'ui-icon-plus', 'headerSelected': 'ui-icon-minus' } });
    +
    + + +
    + Get or set the icons option, after init. +
    +
    +
    //getter
    +var icons = $('.selector').accordion('option', 'icons');
    +//setter
    +$('.selector').accordion('option', 'icons', { 'header': 'ui-icon-plus', 'headerSelected': 'ui-icon-minus' });
    +
    + +
    +
    +
  • + + +
  • +
    +

    navigation

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set, looks for the anchor that matches location.href and activates it. Great for href-based state-saving. Use navigationFilter to implement your own matcher.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a accordion with the navigation option specified. +
    +
    +
    $('.selector').accordion({ navigation: true });
    +
    + + +
    + Get or set the navigation option, after init. +
    +
    +
    //getter
    +var navigation = $('.selector').accordion('option', 'navigation');
    +//setter
    +$('.selector').accordion('option', 'navigation', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    navigationFilter

    +
    +
    Type:
    +
    Function
    + +
    Default:
    +
    + +
    +
    +
    +

    Overwrite the default location.href-matching with your own matcher.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a accordion with the navigationFilter option specified. +
    +
    +
    $('.selector').accordion({ navigationFilter: function(){ ... } });
    +
    + + +
    + Get or set the navigationFilter option, after init. +
    +
    +
    //getter
    +var navigationFilter = $('.selector').accordion('option', 'navigationFilter');
    +//setter
    +$('.selector').accordion('option', 'navigationFilter', function(){ ... });
    +
    + +
    +
    +
  • + +
+
+
+

Events

+
    + +
  • +
    +

    change

    +
    +
    Type:
    +
    accordionchange
    +
    +
    +
    +

    This event is triggered every time the accordion changes. If the accordion is animated, the event will be triggered upon completion of the animation; otherwise, it is triggered immediately. +

    +
    $('.ui-accordion').bind('accordionchange', function(event, ui) {
    +  ui.newHeader // jQuery object, activated header
    +  ui.oldHeader // jQuery object, previous header
    +  ui.newContent // jQuery object, activated content
    +  ui.oldContent // jQuery object, previous content
    +});

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the change event as an init option. +
    +
    +
    $('.selector').accordion({
    +   change: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the change event by type: accordionchange. +
    +
    +
    $('.selector').bind('accordionchange', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + +

    +

  • +
    +

    changestart

    +
    +
    Type:
    +
    accordionchangestart
    +
    +
    +
    +

    This event is triggered every time the accordion starts to change. +

    +
    $('.ui-accordion').bind('accordionchangestart', function(event, ui) {
    +  ui.newHeader // jQuery object, activated header
    +  ui.oldHeader // jQuery object, previous header
    +  ui.newContent // jQuery object, activated content
    +  ui.oldContent // jQuery object, previous content
    +});

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the changestart event as an init option. +
    +
    +
    $('.selector').accordion({
    +   changestart: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the changestart event by type: accordionchangestart. +
    +
    +
    $('.selector').bind('accordionchangestart', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + +
+
+
+

Methods

+
    + +
  • +
    +

    destroy

    +
    +
    Signature:
    +
    .accordion( 'destroy' + + + + + + + +)
    +
    +
    +
    +

    Remove the accordion functionality completely. This will return the element back to its pre-init state.

    +
    +
  • + +

    +

  • +
    +

    disable

    +
    +
    Signature:
    +
    .accordion( 'disable' + + + + + + + +)
    +
    +
    +
    +

    Disable the accordion.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .accordion( 'enable' + + + + + + + +)
    +
    +
    +
    +

    Enable the accordion.

    +
    +
  • + + +
  • +
    +

    option

    +
    +
    Signature:
    +
    .accordion( 'option' + +, optionName + +, [value] + + + +)
    +
    +
    +
    +

    Get or set any accordion option. If no value is specified, will act as a getter.

    +
    +
  • + + +
  • +
    +

    activate

    +
    +
    Signature:
    +
    .accordion( 'activate' + +, index + + + + + +)
    +
    +
    +
    +

    Activate a content part of the Accordion programmatically. The index can be a zero-indexed number to match the position of the header to close or a Selector matching an element. Pass false to close all (only possible with collapsible:true).

    +
    +
  • + +
+
+
+

Theming

+

The jQuery UI Accordion plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +

+

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.accordion.css stylesheet that can be modified. These classes are highlighed in bold below. +

+ +

Sample markup with jQuery UI CSS Framework classes

+ <div class="ui-accordion ui-widget ui-helper-reset">
+  <h3 class="ui-accordion-header ui-helper-reset ui-state-active ui-corner-top">
+    <span class="ui-icon ui-icon-triangle-1-s"/>
+    <a href="#">Section 1</a>
+  </h3>
+  <div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content-active">
+    Section 1 content
+  </div>
+  <h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all">
+    <span class="ui-icon ui-icon-triangle-1-e"/>
+    <a href="#">Section 2</a>
+  </h3>
+  <div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom">
+    Section 2 content
+  </div>
+  <h3 class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-all">
+    <span class="ui-icon ui-icon-triangle-1-e"/>
+    <a href="#">Section 3</a>
+  </h3>
+  <div class="ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom">
+    Section 3 content
+  </div>
+</div>
+

+ + Note: This is a sample of markup generated by the accordion plugin, not markup you should use to create a accordion. The only markup needed for that is
<div>
+   <h3><a href="#">Section 1</a></h3>
+   <div>
+      Section 1 content
+   </div>
+   <h3><a href="#">Section 2</a></h3>
+   <div>
+      Section 2 content
+   </div>
+   <h3><a href="#">Section 3</a></h3>
+   <div>
+      Section 3 content
+   </div>
+</div>. +
+

+ +
+
+ +

+ + diff --git a/static/development-bundle/docs/addClass.html b/static/development-bundle/docs/addClass.html new file mode 100644 index 0000000..e0e2a1d --- /dev/null +++ b/static/development-bundle/docs/addClass.html @@ -0,0 +1,108 @@ + + +
+

jQuery UI addClass

+
+

Overview

+
+

addClass( class, [duration] )

+

Adds the specified class to each of the set of matched elements with an optional transition between the states.

+
+
+

Dependencies

+
    +
  • Effects Core
  • +
+
+
+

Example

+
+ +

+Adds the class 'selected' to the matched elements with a one second transition.
+

+
$("p").click(function () {
+      $(this).addClass("selected", 1000);
+    });
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
+<style type="text/css">
+  p { cursor: pointer; font-size: 1.2em; }
+  .selected { color:red; }
+</style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("p").click(function () {
+      $(this).addClass("selected", 1000);
+    });
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  <p>Click me to add a 'selected' class.</p>
+<p>Click me to add a 'selected' class.</p>
+<p>Click me to add a 'selected' class.</p>
+</body>
+</html>
+
+

+

+
+
+
+

Arguments

+
    + +
  • +
    +

    class

    +
    +
    Type:
    +
    String
    + +
    +
    +
    +

    One CSS class to add to the elements.

    +
    +
  • + + +
  • +
    +

    duration

    +
    +
    Type:
    +
    String, Number
    + +
    Optional
    + +
    +
    +
    +

    A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).

    +
    +
  • + +
+
+
+ +

+ + diff --git a/static/development-bundle/docs/animate.html b/static/development-bundle/docs/animate.html new file mode 100644 index 0000000..9c365a4 --- /dev/null +++ b/static/development-bundle/docs/animate.html @@ -0,0 +1,78 @@ +

« Back to the jQuery UI Docs +

The jQuery UI effects core extends the animate function to be able to animate colors as well. It's heavily used by the class transition feature and it's able to color animate the following properties: +

+
  • backgroundColor +
  • borderBottomColor +
  • borderLeftColor +
  • borderRightColor +
  • borderTopColor +
  • color +
  • outlineColor +
+

with one of the following combinations: +

+
  • hex (#FF0000) +
  • rgb (rgb(255,255,255)) +
  • names ("black") +
+


+

+
NameType
Example: +
+ +
+A simple color animation.
+

+
$(".block").toggle(function() {
+    $(this).animate({ backgroundColor: "black" }, 1000);
+},function() {
+    $(this).animate({ backgroundColor: "#68BFEF" }, 500);
+});
+
+
+

+

+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
+                    "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <script src="http://code.jquery.com/jquery-latest.js"></script>
+  
+  <script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
+
+  <script>
+  $(document).ready(function(){
+    $(".block").toggle(function() {
+    $(this).animate({ backgroundColor: "black" }, 1000);
+},function() {
+    $(this).animate({ backgroundColor: "#68BFEF" }, 500);
+});
+
+  });
+  </script>
+  <style>
+  .block { 
+    color: white;
+    background-color: #68BFEF;
+    width: 150px; 
+    height: 70px;
+    margin: 10px; 
+  }
+  </style>
+</head>
+<body>
+  <div class="block"> Click me</div>
+</body>
+</html>
+
+

+

+

NameType
+

+ + diff --git a/static/development-bundle/docs/datepicker.html b/static/development-bundle/docs/datepicker.html new file mode 100644 index 0000000..f0772b2 --- /dev/null +++ b/static/development-bundle/docs/datepicker.html @@ -0,0 +1,2150 @@ + + +
+

jQuery UI Datepicker

+
+

Overview

+
+

The jQuery UI Datepicker is a highly configurable plugin that adds datepicker functionality to your pages. You can customize the date format and language, restrict the selectable date ranges and add in buttons and other navigation options easily.

+

By default, the datepicker calendar opens in a small overlay onFocus and closes automatically onBlur or when a date if selected. For an inline calendar, simply attach the datepicker to a div or span. +

You can use keyboard shortcuts to drive the datepicker: +

+
    +
  • page up/down - previous/next month
  • +
  • ctrl+page up/down - previous/next year
  • +
  • ctrl+home - current month or open when closed
  • +
  • ctrl+left/right - previous/next day
  • +
  • ctrl+up/down - previous/next week
  • +
  • enter - accept the selected date
  • +
  • ctrl+end - close and erase the date
  • +
  • escape - close the datepicker without selection
  • +
+

Utility functions

+ +
+
+

Dependencies

+
    +
  • UI Core
  • +
+
+
+

Example

+
+ +

+A simple jQuery UI Datepicker.
+

+
$("#datepicker").datepicker();
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.datepicker.js"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("#datepicker").datepicker();
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<div type="text" id="datepicker"></div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Options

+
    + +
  • +
    +

    altField

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    ''
    + +
    +
    +
    +

    The jQuery selector for another field that is to be updated with the selected date from the datepicker. Use the altFormat setting below to change the format of the date within this field. Leave as blank for no alternate field.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the altField option specified. +
    +
    +
    $('.selector').datepicker({ altField: '#actualDate' });
    +
    + + +
    + Get or set the altField option, after init. +
    +
    +
    //getter
    +var altField = $('.selector').datepicker('option', 'altField');
    +//setter
    +$('.selector').datepicker('option', 'altField', '#actualDate');
    +
    + +
    +
    +
  • + + +
  • +
    +

    altFormat

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    ''
    + +
    +
    +
    +

    The dateFormat to be used for the altField option. This allows one date format to be shown to the user for selection purposes, while a different format is actually sent behind the scenes. For a full list of the possible formats see the formatDate function

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the altFormat option specified. +
    +
    +
    $('.selector').datepicker({ altFormat: 'yy-mm-dd' });
    +
    + + +
    + Get or set the altFormat option, after init. +
    +
    +
    //getter
    +var altFormat = $('.selector').datepicker('option', 'altFormat');
    +//setter
    +$('.selector').datepicker('option', 'altFormat', 'yy-mm-dd');
    +
    + +
    +
    +
  • + + +
  • +
    +

    appendText

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    ''
    + +
    +
    +
    +

    The text to display after each date field, e.g. to show the required format.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the appendText option specified. +
    +
    +
    $('.selector').datepicker({ appendText: '(yyyy-mm-dd)' });
    +
    + + +
    + Get or set the appendText option, after init. +
    +
    +
    //getter
    +var appendText = $('.selector').datepicker('option', 'appendText');
    +//setter
    +$('.selector').datepicker('option', 'appendText', '(yyyy-mm-dd)');
    +
    + +
    +
    +
  • + + +
  • +
    +

    buttonImage

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    ''
    + +
    +
    +
    +

    The URL for the popup button image. If set, button text becomes the alt value and is not directly displayed.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the buttonImage option specified. +
    +
    +
    $('.selector').datepicker({ buttonImage: '/images/datepicker.gif' });
    +
    + + +
    + Get or set the buttonImage option, after init. +
    +
    +
    //getter
    +var buttonImage = $('.selector').datepicker('option', 'buttonImage');
    +//setter
    +$('.selector').datepicker('option', 'buttonImage', '/images/datepicker.gif');
    +
    + +
    +
    +
  • + + +
  • +
    +

    buttonImageOnly

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Set to true to place an image after the field to use as the trigger without it appearing on a button.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the buttonImageOnly option specified. +
    +
    +
    $('.selector').datepicker({ buttonImageOnly: true });
    +
    + + +
    + Get or set the buttonImageOnly option, after init. +
    +
    +
    //getter
    +var buttonImageOnly = $('.selector').datepicker('option', 'buttonImageOnly');
    +//setter
    +$('.selector').datepicker('option', 'buttonImageOnly', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    buttonText

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    '...'
    + +
    +
    +
    +

    The text to display on the trigger button. Use in conjunction with showOn equal to 'button' or 'both'.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the buttonText option specified. +
    +
    +
    $('.selector').datepicker({ buttonText: 'Choose' });
    +
    + + +
    + Get or set the buttonText option, after init. +
    +
    +
    //getter
    +var buttonText = $('.selector').datepicker('option', 'buttonText');
    +//setter
    +$('.selector').datepicker('option', 'buttonText', 'Choose');
    +
    + +
    +
    +
  • + + +
  • +
    +

    changeMonth

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Allows you to change the month by selecting from a drop-down list. You can enable this feature by setting the attribute to true.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the changeMonth option specified. +
    +
    +
    $('.selector').datepicker({ changeMonth: true });
    +
    + + +
    + Get or set the changeMonth option, after init. +
    +
    +
    //getter
    +var changeMonth = $('.selector').datepicker('option', 'changeMonth');
    +//setter
    +$('.selector').datepicker('option', 'changeMonth', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    changeYear

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Allows you to change the year by selecting from a drop-down list. You can enable this feature by setting the attribute to true.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the changeYear option specified. +
    +
    +
    $('.selector').datepicker({ changeYear: true });
    +
    + + +
    + Get or set the changeYear option, after init. +
    +
    +
    //getter
    +var changeYear = $('.selector').datepicker('option', 'changeYear');
    +//setter
    +$('.selector').datepicker('option', 'changeYear', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    closeText

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'Done'
    + +
    +
    +
    +

    The text to display for the close link. This attribute is one of the regionalisation attributes. Use the showButtonPanel to display this button.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the closeText option specified. +
    +
    +
    $('.selector').datepicker({ closeText: 'X' });
    +
    + + +
    + Get or set the closeText option, after init. +
    +
    +
    //getter
    +var closeText = $('.selector').datepicker('option', 'closeText');
    +//setter
    +$('.selector').datepicker('option', 'closeText', 'X');
    +
    + +
    +
    +
  • + + +
  • +
    +

    constrainInput

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    True if the input field is constrained to the current date format.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the constrainInput option specified. +
    +
    +
    $('.selector').datepicker({ constrainInput: false });
    +
    + + +
    + Get or set the constrainInput option, after init. +
    +
    +
    //getter
    +var constrainInput = $('.selector').datepicker('option', 'constrainInput');
    +//setter
    +$('.selector').datepicker('option', 'constrainInput', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    currentText

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'Today'
    + +
    +
    +
    +

    The text to display for the current day link. This attribute is one of the regionalisation attributes. Use the showButtonPanel to display this button.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the currentText option specified. +
    +
    +
    $('.selector').datepicker({ currentText: 'Now' });
    +
    + + +
    + Get or set the currentText option, after init. +
    +
    +
    //getter
    +var currentText = $('.selector').datepicker('option', 'currentText');
    +//setter
    +$('.selector').datepicker('option', 'currentText', 'Now');
    +
    + +
    +
    +
  • + + +
  • +
    +

    dateFormat

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'mm/dd/yy'
    + +
    +
    +
    +

    The format for parsed and displayed dates. This attribute is one of the regionalisation attributes. For a full list of the possible formats see the formatDate function.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the dateFormat option specified. +
    +
    +
    $('.selector').datepicker({ dateFormat: 'yy-mm-dd' });
    +
    + + +
    + Get or set the dateFormat option, after init. +
    +
    +
    //getter
    +var dateFormat = $('.selector').datepicker('option', 'dateFormat');
    +//setter
    +$('.selector').datepicker('option', 'dateFormat', 'yy-mm-dd');
    +
    + +
    +
    +
  • + + +
  • +
    +

    dayNames

    +
    +
    Type:
    +
    Array
    + +
    Default:
    +
    ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
    + +
    +
    +
    +

    The list of long day names, starting from Sunday, for use as requested via the dateFormat setting. They also appear as popup hints when hovering over the corresponding column headings. This attribute is one of the regionalisation attributes.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the dayNames option specified. +
    +
    +
    $('.selector').datepicker({ dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'] });
    +
    + + +
    + Get or set the dayNames option, after init. +
    +
    +
    //getter
    +var dayNames = $('.selector').datepicker('option', 'dayNames');
    +//setter
    +$('.selector').datepicker('option', 'dayNames', ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi']);
    +
    + +
    +
    +
  • + + +
  • +
    +

    dayNamesMin

    +
    +
    Type:
    +
    Array
    + +
    Default:
    +
    ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']
    + +
    +
    +
    +

    The list of minimised day names, starting from Sunday, for use as column headers within the datepicker. This attribute is one of the regionalisation attributes.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the dayNamesMin option specified. +
    +
    +
    $('.selector').datepicker({ dayNamesMin: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'] });
    +
    + + +
    + Get or set the dayNamesMin option, after init. +
    +
    +
    //getter
    +var dayNamesMin = $('.selector').datepicker('option', 'dayNamesMin');
    +//setter
    +$('.selector').datepicker('option', 'dayNamesMin', ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa']);
    +
    + +
    +
    +
  • + + +
  • +
    +

    dayNamesShort

    +
    +
    Type:
    +
    Array
    + +
    Default:
    +
    ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
    + +
    +
    +
    +

    The list of abbreviated day names, starting from Sunday, for use as requested via the dateFormat setting. This attribute is one of the regionalisation attributes.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the dayNamesShort option specified. +
    +
    +
    $('.selector').datepicker({ dayNamesShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'] });
    +
    + + +
    + Get or set the dayNamesShort option, after init. +
    +
    +
    //getter
    +var dayNamesShort = $('.selector').datepicker('option', 'dayNamesShort');
    +//setter
    +$('.selector').datepicker('option', 'dayNamesShort', ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam']);
    +
    + +
    +
    +
  • + + +
  • +
    +

    defaultDate

    +
    +
    Type:
    +
    Date, Number, String
    + +
    Default:
    +
    null
    + +
    +
    +
    +

    Set the date to highlight on first opening if the field is blank. Specify either an actual date via a Date object, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or null for today.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the defaultDate option specified. +
    +
    +
    $('.selector').datepicker({ defaultDate: +7 });
    +
    + + +
    + Get or set the defaultDate option, after init. +
    +
    +
    //getter
    +var defaultDate = $('.selector').datepicker('option', 'defaultDate');
    +//setter
    +$('.selector').datepicker('option', 'defaultDate', +7);
    +
    + +
    +
    +
  • + + +
  • +
    +

    duration

    +
    +
    Type:
    +
    String, Number
    + +
    Default:
    +
    'normal'
    + +
    +
    +
    +

    Control the speed at which the datepicker appears, it may be a time in milliseconds, a string representing one of the three predefined speeds ("slow", "normal", "fast"), or '' for immediately.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the duration option specified. +
    +
    +
    $('.selector').datepicker({ duration: 'slow' });
    +
    + + +
    + Get or set the duration option, after init. +
    +
    +
    //getter
    +var duration = $('.selector').datepicker('option', 'duration');
    +//setter
    +$('.selector').datepicker('option', 'duration', 'slow');
    +
    + +
    +
    +
  • + + +
  • +
    +

    firstDay

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    0
    + +
    +
    +
    +

    Set the first day of the week: Sunday is 0, Monday is 1, ... This attribute is one of the regionalisation attributes.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the firstDay option specified. +
    +
    +
    $('.selector').datepicker({ firstDay: 1 });
    +
    + + +
    + Get or set the firstDay option, after init. +
    +
    +
    //getter
    +var firstDay = $('.selector').datepicker('option', 'firstDay');
    +//setter
    +$('.selector').datepicker('option', 'firstDay', 1);
    +
    + +
    +
    +
  • + + +
  • +
    +

    gotoCurrent

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If true, the current day link moves to the currently selected date instead of today.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the gotoCurrent option specified. +
    +
    +
    $('.selector').datepicker({ gotoCurrent: true });
    +
    + + +
    + Get or set the gotoCurrent option, after init. +
    +
    +
    //getter
    +var gotoCurrent = $('.selector').datepicker('option', 'gotoCurrent');
    +//setter
    +$('.selector').datepicker('option', 'gotoCurrent', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    hideIfNoPrevNext

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Normally the previous and next links are disabled when not applicable (see minDate/maxDate). You can hide them altogether by setting this attribute to true.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the hideIfNoPrevNext option specified. +
    +
    +
    $('.selector').datepicker({ hideIfNoPrevNext: true });
    +
    + + +
    + Get or set the hideIfNoPrevNext option, after init. +
    +
    +
    //getter
    +var hideIfNoPrevNext = $('.selector').datepicker('option', 'hideIfNoPrevNext');
    +//setter
    +$('.selector').datepicker('option', 'hideIfNoPrevNext', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    isRTL

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    True if the current language is drawn from right to left. This attribute is one of the regionalisation attributes.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the isRTL option specified. +
    +
    +
    $('.selector').datepicker({ isRTL: true });
    +
    + + +
    + Get or set the isRTL option, after init. +
    +
    +
    //getter
    +var isRTL = $('.selector').datepicker('option', 'isRTL');
    +//setter
    +$('.selector').datepicker('option', 'isRTL', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    maxDate

    +
    +
    Type:
    +
    Date, Number, String
    + +
    Default:
    +
    null
    + +
    +
    +
    +

    Set a maximum selectable date via a Date object, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +1w'), or null for no limit.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the maxDate option specified. +
    +
    +
    $('.selector').datepicker({ maxDate: '+1m +1w' });
    +
    + + +
    + Get or set the maxDate option, after init. +
    +
    +
    //getter
    +var maxDate = $('.selector').datepicker('option', 'maxDate');
    +//setter
    +$('.selector').datepicker('option', 'maxDate', '+1m +1w');
    +
    + +
    +
    +
  • + + +
  • +
    +

    minDate

    +
    +
    Type:
    +
    Date, Number, String
    + +
    Default:
    +
    null
    + +
    +
    +
    +

    Set a minimum selectable date via a Date object, or a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '-1y -1m'), or null for no limit.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the minDate option specified. +
    +
    +
    $('.selector').datepicker({ minDate: new Date(2007, 1 - 1, 1) });
    +
    + + +
    + Get or set the minDate option, after init. +
    +
    +
    //getter
    +var minDate = $('.selector').datepicker('option', 'minDate');
    +//setter
    +$('.selector').datepicker('option', 'minDate', new Date(2007, 1 - 1, 1));
    +
    + +
    +
    +
  • + + +
  • +
    +

    monthNames

    +
    +
    Type:
    +
    Array
    + +
    Default:
    +
    ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
    + +
    +
    +
    +

    The list of full month names, as used in the month header on each datepicker and as requested via the dateFormat setting. This attribute is one of the regionalisation attributes.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the monthNames option specified. +
    +
    +
    $('.selector').datepicker({ monthNames: ['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December'] });
    +
    + + +
    + Get or set the monthNames option, after init. +
    +
    +
    //getter
    +var monthNames = $('.selector').datepicker('option', 'monthNames');
    +//setter
    +$('.selector').datepicker('option', 'monthNames', ['Januar','Februar','Marts','April','Maj','Juni','Juli','August','September','Oktober','November','December']);
    +
    + +
    +
    +
  • + + +
  • +
    +

    monthNamesShort

    +
    +
    Type:
    +
    Array
    + +
    Default:
    +
    ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
    + +
    +
    +
    +

    The list of abbreviated month names, for use as requested via the dateFormat setting. This attribute is one of the regionalisation attributes.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the monthNamesShort option specified. +
    +
    +
    $('.selector').datepicker({ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec'] });
    +
    + + +
    + Get or set the monthNamesShort option, after init. +
    +
    +
    //getter
    +var monthNamesShort = $('.selector').datepicker('option', 'monthNamesShort');
    +//setter
    +$('.selector').datepicker('option', 'monthNamesShort', ['Jan','Feb','Mar','Apr','Maj','Jun','Jul','Aug','Sep','Okt','Nov','Dec']);
    +
    + +
    +
    +
  • + + +
  • +
    +

    navigationAsDateFormat

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    When true the formatDate function is applied to the prevText, nextText, and currentText values before display, allowing them to display the target month names for example.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the navigationAsDateFormat option specified. +
    +
    +
    $('.selector').datepicker({ navigationAsDateFormat: true });
    +
    + + +
    + Get or set the navigationAsDateFormat option, after init. +
    +
    +
    //getter
    +var navigationAsDateFormat = $('.selector').datepicker('option', 'navigationAsDateFormat');
    +//setter
    +$('.selector').datepicker('option', 'navigationAsDateFormat', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    nextText

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'Next'
    + +
    +
    +
    +

    The text to display for the next month link. This attribute is one of the regionalisation attributes. With the standard ThemeRoller styling, this value is replaced by an icon.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the nextText option specified. +
    +
    +
    $('.selector').datepicker({ nextText: 'Later' });
    +
    + + +
    + Get or set the nextText option, after init. +
    +
    +
    //getter
    +var nextText = $('.selector').datepicker('option', 'nextText');
    +//setter
    +$('.selector').datepicker('option', 'nextText', 'Later');
    +
    + +
    +
    +
  • + + +
  • +
    +

    numberOfMonths

    +
    +
    Type:
    +
    Number, Array
    + +
    Default:
    +
    1
    + +
    +
    +
    +

    Set how many months to show at once. The value can be a straight integer, or can be a two-element array to define the number of rows and columns to display.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the numberOfMonths option specified. +
    +
    +
    $('.selector').datepicker({ numberOfMonths: [2, 3] });
    +
    + + +
    + Get or set the numberOfMonths option, after init. +
    +
    +
    //getter
    +var numberOfMonths = $('.selector').datepicker('option', 'numberOfMonths');
    +//setter
    +$('.selector').datepicker('option', 'numberOfMonths', [2, 3]);
    +
    + +
    +
    +
  • + + +
  • +
    +

    prevText

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'Prev'
    + +
    +
    +
    +

    The text to display for the previous month link. This attribute is one of the regionalisation attributes. With the standard ThemeRoller styling, this value is replaced by an icon.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the prevText option specified. +
    +
    +
    $('.selector').datepicker({ prevText: 'Earlier' });
    +
    + + +
    + Get or set the prevText option, after init. +
    +
    +
    //getter
    +var prevText = $('.selector').datepicker('option', 'prevText');
    +//setter
    +$('.selector').datepicker('option', 'prevText', 'Earlier');
    +
    + +
    +
    +
  • + + +
  • +
    +

    shortYearCutoff

    +
    +
    Type:
    +
    String, Number
    + +
    Default:
    +
    '+10'
    + +
    +
    +
    +

    Set the cutoff year for determining the century for a date (used in conjunction with dateFormat 'y'). If a numeric value (0-99) is provided then this value is used directly. If a string value is provided then it is converted to a number and added to the current year. Once the cutoff year is calculated, any dates entered with a year value less than or equal to it are considered to be in the current century, while those greater than it are deemed to be in the previous century.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the shortYearCutoff option specified. +
    +
    +
    $('.selector').datepicker({ shortYearCutoff: 50 });
    +
    + + +
    + Get or set the shortYearCutoff option, after init. +
    +
    +
    //getter
    +var shortYearCutoff = $('.selector').datepicker('option', 'shortYearCutoff');
    +//setter
    +$('.selector').datepicker('option', 'shortYearCutoff', 50);
    +
    + +
    +
    +
  • + + +
  • +
    +

    showAnim

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'show'
    + +
    +
    +
    +

    Set the name of the animation used to show/hide the datepicker. Use 'show' (the default), 'slideDown', 'fadeIn', or any of the show/hide jQuery UI effects.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the showAnim option specified. +
    +
    +
    $('.selector').datepicker({ showAnim: 'fold' });
    +
    + + +
    + Get or set the showAnim option, after init. +
    +
    +
    //getter
    +var showAnim = $('.selector').datepicker('option', 'showAnim');
    +//setter
    +$('.selector').datepicker('option', 'showAnim', 'fold');
    +
    + +
    +
    +
  • + + +
  • +
    +

    showButtonPanel

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Whether to show the button panel.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the showButtonPanel option specified. +
    +
    +
    $('.selector').datepicker({ showButtonPanel: true });
    +
    + + +
    + Get or set the showButtonPanel option, after init. +
    +
    +
    //getter
    +var showButtonPanel = $('.selector').datepicker('option', 'showButtonPanel');
    +//setter
    +$('.selector').datepicker('option', 'showButtonPanel', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    showCurrentAtPos

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    0
    + +
    +
    +
    +

    Specify where in a multi-month display the current month shows, starting from 0 at the top/left.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the showCurrentAtPos option specified. +
    +
    +
    $('.selector').datepicker({ showCurrentAtPos: 3 });
    +
    + + +
    + Get or set the showCurrentAtPos option, after init. +
    +
    +
    //getter
    +var showCurrentAtPos = $('.selector').datepicker('option', 'showCurrentAtPos');
    +//setter
    +$('.selector').datepicker('option', 'showCurrentAtPos', 3);
    +
    + +
    +
    +
  • + + +
  • +
    +

    showMonthAfterYear

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Whether to show the month after the year in the header.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the showMonthAfterYear option specified. +
    +
    +
    $('.selector').datepicker({ showMonthAfterYear: true });
    +
    + + +
    + Get or set the showMonthAfterYear option, after init. +
    +
    +
    //getter
    +var showMonthAfterYear = $('.selector').datepicker('option', 'showMonthAfterYear');
    +//setter
    +$('.selector').datepicker('option', 'showMonthAfterYear', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    showOn

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'focus'
    + +
    +
    +
    +

    Have the datepicker appear automatically when the field receives focus ('focus'), appear only when a button is clicked ('button'), or appear when either event takes place ('both').

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the showOn option specified. +
    +
    +
    $('.selector').datepicker({ showOn: 'both' });
    +
    + + +
    + Get or set the showOn option, after init. +
    +
    +
    //getter
    +var showOn = $('.selector').datepicker('option', 'showOn');
    +//setter
    +$('.selector').datepicker('option', 'showOn', 'both');
    +
    + +
    +
    +
  • + + +
  • +
    +

    showOptions

    +
    +
    Type:
    +
    Options
    + +
    Default:
    +
    {}
    + +
    +
    +
    +

    If using one of the jQuery UI effects for showAnim, you can provide additional settings for that animation via this option.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the showOptions option specified. +
    +
    +
    $('.selector').datepicker({ showOptions: {direction: 'up' });
    +
    + + +
    + Get or set the showOptions option, after init. +
    +
    +
    //getter
    +var showOptions = $('.selector').datepicker('option', 'showOptions');
    +//setter
    +$('.selector').datepicker('option', 'showOptions', {direction: 'up');
    +
    + +
    +
    +
  • + + +
  • +
    +

    showOtherMonths

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Display dates in other months (non-selectable) at the start or end of the current month.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the showOtherMonths option specified. +
    +
    +
    $('.selector').datepicker({ showOtherMonths: true });
    +
    + + +
    + Get or set the showOtherMonths option, after init. +
    +
    +
    //getter
    +var showOtherMonths = $('.selector').datepicker('option', 'showOtherMonths');
    +//setter
    +$('.selector').datepicker('option', 'showOtherMonths', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    stepMonths

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    1
    + +
    +
    +
    +

    Set how many months to move when clicking the Previous/Next links.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the stepMonths option specified. +
    +
    +
    $('.selector').datepicker({ stepMonths: 3 });
    +
    + + +
    + Get or set the stepMonths option, after init. +
    +
    +
    //getter
    +var stepMonths = $('.selector').datepicker('option', 'stepMonths');
    +//setter
    +$('.selector').datepicker('option', 'stepMonths', 3);
    +
    + +
    +
    +
  • + + +
  • +
    +

    yearRange

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    '-10:+10'
    + +
    +
    +
    +

    Control the range of years displayed in the year drop-down: either relative to current year (-nn:+nn) or absolute (nnnn:nnnn).

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a datepicker with the yearRange option specified. +
    +
    +
    $('.selector').datepicker({ yearRange: '2000:2010' });
    +
    + + +
    + Get or set the yearRange option, after init. +
    +
    +
    //getter
    +var yearRange = $('.selector').datepicker('option', 'yearRange');
    +//setter
    +$('.selector').datepicker('option', 'yearRange', '2000:2010');
    +
    + +
    +
    +
  • + +
+
+
+

Events

+
    + +
  • +
    +

    beforeShow

    +
    +
    +
    function(input)
    +
    +
    +
    +

    Can be a function that takes an input field and current datepicker instance and returns an options object to update the datepicker with. It is called just before the datepicker is displayed.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the beforeShow event as an init option. +
    +
    +
    $('.selector').datepicker({
    +   beforeShow: function(input) { ... }
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    beforeShowDay

    +
    +
    +
    function(date)
    +
    +
    +
    +

    The function takes a date as a parameter and must return an array with [0] equal to true/false indicating whether or not this date is selectable, [1] equal to a CSS class name(s) or '' for the default presentation and [2] an optional popup tooltip for this date. It is called for each day in the datepicker before is it displayed.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the beforeShowDay event as an init option. +
    +
    +
    $('.selector').datepicker({
    +   beforeShowDay: function(date) { ... }
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    onChangeMonthYear

    +
    +
    +
    function(year, month, inst)
    +
    +
    +
    +

    Allows you to define your own event when the datepicker moves to a new month and/or year. The function receives the selected year, month (1-12), and the datepicker instance as parameters. this refers to the associated input field.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the onChangeMonthYear event as an init option. +
    +
    +
    $('.selector').datepicker({
    +   onChangeMonthYear: function(year, month, inst) { ... }
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    onClose

    +
    +
    +
    function(dateText, inst)
    +
    +
    +
    +

    Allows you to define your own event when the datepicker is closed, whether or not a date is selected. The function receives the selected date as text and the datepicker instance as parameters. this refers to the associated input field.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the onClose event as an init option. +
    +
    +
    $('.selector').datepicker({
    +   onClose: function(dateText, inst) { ... }
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    onSelect

    +
    +
    +
    function(dateText, inst)
    +
    +
    +
    +

    Allows you to define your own event when the datepicker is selected. The function receives the selected date as text and the datepicker instance as parameters. this refers to the associated input field.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the onSelect event as an init option. +
    +
    +
    $('.selector').datepicker({
    +   onSelect: function(dateText, inst) { ... }
    +});
    +
    + +
    +
    +
  • + +
+
+
+

Methods

+
    + +
  • +
    +

    destroy

    +
    +
    Signature:
    +
    .datepicker( 'destroy' + + + + + + + +)
    +
    +
    +
    +

    Remove the datepicker functionality completely. This will return the element back to its pre-init state.

    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Signature:
    +
    .datepicker( 'disable' + + + + + + + +)
    +
    +
    +
    +

    Disable the datepicker.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .datepicker( 'enable' + + + + + + + +)
    +
    +
    +
    +

    Enable the datepicker.

    +
    +
  • + + +
  • +
    +

    option

    +
    +
    Signature:
    +
    .datepicker( 'option' + +, optionName + +, [value] + + + +)
    +
    +
    +
    +

    Get or set any datepicker option. If no value is specified, will act as a getter.

    +
    +
  • + + +
  • +
    +

    dialog

    +
    +
    Signature:
    +
    .datepicker( 'dialog' + +, dateText + +, [onSelect] + +, [settings] + +, [pos] )
    +
    +
    +
    +

    Open a datepicker in a "dialog" box. +

    dateText: the initial date for the date picker. +

    onSelect: A callback function when a date is selected. The function receives the date text and date picker instance as parameters. +

    settings: The new settings for the date picker. +

    pos: The position of the top/left of the dialog as [x, y] or a MouseEvent that contains the coordinates. If not specified the dialog is centered on the screen.

    +
    +
  • + + +
  • +
    +

    isDisabled

    +
    +
    Signature:
    +
    .datepicker( 'isDisabled' + + + + + + + +)
    +
    +
    +
    +

    Determine whether a date picker has been disabled.

    +
    +
  • + + +
  • +
    +

    hide

    +
    +
    Signature:
    +
    .datepicker( 'hide' + +, [speed] + + + + + +)
    +
    +
    +
    +

    Close a previously opened date picker. +

    speed: The speed at which to close the date picker.

    +
    +
  • + + +
  • +
    +

    show

    +
    +
    Signature:
    +
    .datepicker( 'show' + + + + + + + +)
    +
    +
    +
    +

    Call up a previously attached date picker.

    +
    +
  • + + +
  • +
    +

    getDate

    +
    +
    Signature:
    +
    .datepicker( 'getDate' + + + + + + + +)
    +
    +
    +
    +

    Returns the current date for the datepicker.

    +
    +
  • + + +
  • +
    +

    setDate

    +
    +
    Signature:
    +
    .datepicker( 'setDate' + +, date + + + + + +)
    +
    +
    +
    +

    Sets the current date for the datepicker. The new date may also be a number of days from today (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or null for today.

    +
    +
  • + +
+
+
+

Theming

+

The jQuery UI Datepicker plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +

+

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.datepicker.css stylesheet that can be modified. These classes are highlighed in bold below. +

+ +

Sample markup with jQuery UI CSS Framework classes

+ <div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible">
+   <div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all">
+      <a class="ui-datepicker-prev ui-corner-all">title="Prev"><span class="ui-icon ui-icon-circle-triangle-w">Prev</span></a>
+      <a class="ui-datepicker-next ui-corner-all" title="Next"><span class="ui-icon ui-icon-circle-triangle-e">Next</span></a>
+      <div class="ui-datepicker-title">
+         <span class="ui-datepicker-month">January</span><span class="ui-datepicker-year">2009</span>
+      </div>
+   </div>
+   <table class="ui-datepicker-calendar">
+      <thead>
+      <tr>
+         <th class="ui-datepicker-week-end"><span title="Sunday">Su</span></th>
+         ...
+      </tr>
+      </thead>
+      <tbody><tr>
+         <td class="ui-datepicker-week-end ui-datepicker-other-month "> 1 </td>
+         ...
+      </tr>
+      </tbody>
+   </table>
+   <div class="ui-datepicker-buttonpane ui-widget-content">
+      <button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all">Today</button>
+      <button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all">Done</button>
+   </div>
+</div>
+

+ + Note: This is a sample of markup generated by the datepicker plugin, not markup you should use to create a datepicker. The only markup needed for that is <input type="text" /> or <div></div>. + +

+ +
+
+ +

+ + diff --git a/static/development-bundle/docs/dialog.html b/static/development-bundle/docs/dialog.html new file mode 100644 index 0000000..b763298 --- /dev/null +++ b/static/development-bundle/docs/dialog.html @@ -0,0 +1,1520 @@ +

+

+
+

jQuery UI Dialog

+
+

Overview

+
+ A dialog is a floating window that contains a title bar and a content area. The dialog window can be moved, resized and closed with the 'x' icon by default. +

If the content length exceeds the maximum height, a scrollbar will automatically appear. +

A bottom button bar and semi-transparent modal overlay layer are common options that can be added. +

+A call to $(foo).dialog() initializes a dialog. If you want a click to open a dialog, use $(foo).dialog('open'), but if the dialog hasn't been destroyed, the $(foo).dialog() init call is only required once, not on each click. +
+
+

Dependencies

+
    +
  • UI Core
  • +
  • UI Draggable (Optional)
  • +
  • UI Resizable (Optional)
  • +
+
+
+

Example

+
+ +

+A simple jQuery UI Dialog.
+

+
$("#dialog").dialog();
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.draggable.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.resizable.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.dialog.js"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("#dialog").dialog();
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<div id="dialog" title="Dialog Title">I'm in a dialog</div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Options

+
    + +
  • +
    +

    autoOpen

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    When autoOpen is true the dialog will open automatically when dialog is called. If false it will stay hidden until .dialog("open") is called on it.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the autoOpen option specified. +
    +
    +
    $('.selector').dialog({ autoOpen: false });
    +
    + + +
    + Get or set the autoOpen option, after init. +
    +
    +
    //getter
    +var autoOpen = $('.selector').dialog('option', 'autoOpen');
    +//setter
    +$('.selector').dialog('option', 'autoOpen', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    bgiframe

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    When true, the bgiframe plugin will be used, to fix the issue in IE6 where select boxes show on top of other elements, regardless of zIndex. Requires including the bgiframe plugin. Future versions may not require a separate plugin.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the bgiframe option specified. +
    +
    +
    $('.selector').dialog({ bgiframe: true });
    +
    + + +
    + Get or set the bgiframe option, after init. +
    +
    +
    //getter
    +var bgiframe = $('.selector').dialog('option', 'bgiframe');
    +//setter
    +$('.selector').dialog('option', 'bgiframe', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    buttons

    +
    +
    Type:
    +
    Object
    + +
    Default:
    +
    { }
    + +
    +
    +
    +

    Specifies which buttons should be displayed on the dialog. The property key is the text of the button. The value is the callback function for when the button is clicked. The context of the callback is the dialog element; if you need access to the button, it is available as the target of the event object. +

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the buttons option specified. +
    +
    +
    $('.selector').dialog({ buttons: { "Ok": function() { $(this).dialog("close"); } } });
    +
    + + +
    + Get or set the buttons option, after init. +
    +
    +
    //getter
    +var buttons = $('.selector').dialog('option', 'buttons');
    +//setter
    +$('.selector').dialog('option', 'buttons', { "Ok": function() { $(this).dialog("close"); } });
    +
    + +
    +
    +
  • + + +
  • +
    +

    closeOnEscape

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    Specifies whether the dialog should close when it has focus and the user presses the esacpe (ESC) key.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the closeOnEscape option specified. +
    +
    +
    $('.selector').dialog({ closeOnEscape: false });
    +
    + + +
    + Get or set the closeOnEscape option, after init. +
    +
    +
    //getter
    +var closeOnEscape = $('.selector').dialog('option', 'closeOnEscape');
    +//setter
    +$('.selector').dialog('option', 'closeOnEscape', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    dialogClass

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    ''
    + +
    +
    +
    +

    The specified class name(s) will be added to the dialog, for additional theming.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the dialogClass option specified. +
    +
    +
    $('.selector').dialog({ dialogClass: 'alert' });
    +
    + + +
    + Get or set the dialogClass option, after init. +
    +
    +
    //getter
    +var dialogClass = $('.selector').dialog('option', 'dialogClass');
    +//setter
    +$('.selector').dialog('option', 'dialogClass', 'alert');
    +
    + +
    +
    +
  • + + +
  • +
    +

    draggable

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    If set to true, the dialog will be draggable will be draggable by the titlebar.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the draggable option specified. +
    +
    +
    $('.selector').dialog({ draggable: false });
    +
    + + +
    + Get or set the draggable option, after init. +
    +
    +
    //getter
    +var draggable = $('.selector').dialog('option', 'draggable');
    +//setter
    +$('.selector').dialog('option', 'draggable', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    height

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    'auto'
    + +
    +
    +
    +

    The height of the dialog, in pixels.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the height option specified. +
    +
    +
    $('.selector').dialog({ height: 530 });
    +
    + + +
    + Get or set the height option, after init. +
    +
    +
    //getter
    +var height = $('.selector').dialog('option', 'height');
    +//setter
    +$('.selector').dialog('option', 'height', 530);
    +
    + +
    +
    +
  • + + +
  • +
    +

    hide

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    null
    + +
    +
    +
    +

    The effect to be used when the dialog is closed.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the hide option specified. +
    +
    +
    $('.selector').dialog({ hide: 'slide' });
    +
    + + +
    + Get or set the hide option, after init. +
    +
    +
    //getter
    +var hide = $('.selector').dialog('option', 'hide');
    +//setter
    +$('.selector').dialog('option', 'hide', 'slide');
    +
    + +
    +
    +
  • + + +
  • +
    +

    maxHeight

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    The maximum height to which the dialog can be resized, in pixels.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the maxHeight option specified. +
    +
    +
    $('.selector').dialog({ maxHeight: 400 });
    +
    + + +
    + Get or set the maxHeight option, after init. +
    +
    +
    //getter
    +var maxHeight = $('.selector').dialog('option', 'maxHeight');
    +//setter
    +$('.selector').dialog('option', 'maxHeight', 400);
    +
    + +
    +
    +
  • + + +
  • +
    +

    maxWidth

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    The maximum width to which the dialog can be resized, in pixels.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the maxWidth option specified. +
    +
    +
    $('.selector').dialog({ maxWidth: 600 });
    +
    + + +
    + Get or set the maxWidth option, after init. +
    +
    +
    //getter
    +var maxWidth = $('.selector').dialog('option', 'maxWidth');
    +//setter
    +$('.selector').dialog('option', 'maxWidth', 600);
    +
    + +
    +
    +
  • + + +
  • +
    +

    minHeight

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    150
    + +
    +
    +
    +

    The minimum height to which the dialog can be resized, in pixels.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the minHeight option specified. +
    +
    +
    $('.selector').dialog({ minHeight: 300 });
    +
    + + +
    + Get or set the minHeight option, after init. +
    +
    +
    //getter
    +var minHeight = $('.selector').dialog('option', 'minHeight');
    +//setter
    +$('.selector').dialog('option', 'minHeight', 300);
    +
    + +
    +
    +
  • + + +
  • +
    +

    minWidth

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    150
    + +
    +
    +
    +

    The minimum width to which the dialog can be resized, in pixels.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the minWidth option specified. +
    +
    +
    $('.selector').dialog({ minWidth: 400 });
    +
    + + +
    + Get or set the minWidth option, after init. +
    +
    +
    //getter
    +var minWidth = $('.selector').dialog('option', 'minWidth');
    +//setter
    +$('.selector').dialog('option', 'minWidth', 400);
    +
    + +
    +
    +
  • + + +
  • +
    +

    modal

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set to true, the dialog will have modal behavior; other items on the page will be disabled (i.e. cannot be interacted with). Modal dialogs create an overlay below the dialog but above other page elements.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the modal option specified. +
    +
    +
    $('.selector').dialog({ modal: true });
    +
    + + +
    + Get or set the modal option, after init. +
    +
    +
    //getter
    +var modal = $('.selector').dialog('option', 'modal');
    +//setter
    +$('.selector').dialog('option', 'modal', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    position

    +
    +
    Type:
    +
    String, Array
    + +
    Default:
    +
    'center'
    + +
    +
    +
    +

    Specifies where the dialog should be displayed. Possible values: 'center', 'left', 'right', 'top', 'bottom', or an array containing a coordinate pair (in pixel offset from top left of viewport) or the possible string values (e.g. ['right','top'] for top right corner).

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the position option specified. +
    +
    +
    $('.selector').dialog({ position: 'top' });
    +
    + + +
    + Get or set the position option, after init. +
    +
    +
    //getter
    +var position = $('.selector').dialog('option', 'position');
    +//setter
    +$('.selector').dialog('option', 'position', 'top');
    +
    + +
    +
    +
  • + + +
  • +
    +

    resizable

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    If set to true, the dialog will be resizeable.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the resizable option specified. +
    +
    +
    $('.selector').dialog({ resizable: false });
    +
    + + +
    + Get or set the resizable option, after init. +
    +
    +
    //getter
    +var resizable = $('.selector').dialog('option', 'resizable');
    +//setter
    +$('.selector').dialog('option', 'resizable', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    show

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    null
    + +
    +
    +
    +

    The effect to be used when the dialog is opened.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the show option specified. +
    +
    +
    $('.selector').dialog({ show: 'slide' });
    +
    + + +
    + Get or set the show option, after init. +
    +
    +
    //getter
    +var show = $('.selector').dialog('option', 'show');
    +//setter
    +$('.selector').dialog('option', 'show', 'slide');
    +
    + +
    +
    +
  • + + +
  • +
    +

    stack

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    Specifies whether the dialog will stack on top of other dialogs. This will cause the dialog to move to the front of other dialogs when it gains focus.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the stack option specified. +
    +
    +
    $('.selector').dialog({ stack: false });
    +
    + + +
    + Get or set the stack option, after init. +
    +
    +
    //getter
    +var stack = $('.selector').dialog('option', 'stack');
    +//setter
    +$('.selector').dialog('option', 'stack', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    title

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    ''
    + +
    +
    +
    +

    Specifies the title of the dialog. The title can also be specified by the title attribute on the dialog source element.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the title option specified. +
    +
    +
    $('.selector').dialog({ title: 'Dialog Title' });
    +
    + + +
    + Get or set the title option, after init. +
    +
    +
    //getter
    +var title = $('.selector').dialog('option', 'title');
    +//setter
    +$('.selector').dialog('option', 'title', 'Dialog Title');
    +
    + +
    +
    +
  • + + +
  • +
    +

    width

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    300
    + +
    +
    +
    +

    The width of the dialog, in pixels.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the width option specified. +
    +
    +
    $('.selector').dialog({ width: 460 });
    +
    + + +
    + Get or set the width option, after init. +
    +
    +
    //getter
    +var width = $('.selector').dialog('option', 'width');
    +//setter
    +$('.selector').dialog('option', 'width', 460);
    +
    + +
    +
    +
  • + + +
  • +
    +

    zIndex

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    1000
    + +
    +
    +
    +

    The starting z-index for the dialog.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a dialog with the zIndex option specified. +
    +
    +
    $('.selector').dialog({ zIndex: 3999 });
    +
    + + +
    + Get or set the zIndex option, after init. +
    +
    +
    //getter
    +var zIndex = $('.selector').dialog('option', 'zIndex');
    +//setter
    +$('.selector').dialog('option', 'zIndex', 3999);
    +
    + +
    +
    +
  • + +
+
+
+

Events

+
    + +
  • +
    +

    beforeclose

    +
    +
    Type:
    +
    dialogbeforeclose
    +
    +
    +
    +

    This event is triggered when a dialog attempts to close. If the beforeclose event handler (callback function) returns false, the close will be prevented.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the beforeclose event as an init option. +
    +
    +
    $('.selector').dialog({
    +   beforeclose: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the beforeclose event by type: dialogbeforeclose. +
    +
    +
    $('.selector').bind('dialogbeforeclose', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    open

    +
    +
    Type:
    +
    dialogopen
    +
    +
    +
    +

    This event is triggered when dialog is opened.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the open event as an init option. +
    +
    +
    $('.selector').dialog({
    +   open: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the open event by type: dialogopen. +
    +
    +
    $('.selector').bind('dialogopen', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    focus

    +
    +
    Type:
    +
    dialogfocus
    +
    +
    +
    +

    This event is triggered when the dialog gains focus.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the focus event as an init option. +
    +
    +
    $('.selector').dialog({
    +   focus: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the focus event by type: dialogfocus. +
    +
    +
    $('.selector').bind('dialogfocus', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    dragStart

    +
    +
    Type:
    +
    dragStart
    +
    +
    +
    +

    This event is triggered at the beginning of the dialog being dragged.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the dragStart event as an init option. +
    +
    +
    $('.selector').dialog({
    +   dragStart: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the dragStart event by type: dragStart. +
    +
    +
    $('.selector').bind('dragStart', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    drag

    +
    +
    Type:
    +
    drag
    +
    +
    +
    +

    This event is triggered when the dialog is dragged.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the drag event as an init option. +
    +
    +
    $('.selector').dialog({
    +   drag: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the drag event by type: drag. +
    +
    +
    $('.selector').bind('drag', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    dragStop

    +
    +
    Type:
    +
    dragStop
    +
    +
    +
    +

    This event is triggered after the dialog has been dragged.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the dragStop event as an init option. +
    +
    +
    $('.selector').dialog({
    +   dragStop: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the dragStop event by type: dragStop. +
    +
    +
    $('.selector').bind('dragStop', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    resizeStart

    +
    +
    Type:
    +
    resizeStart
    +
    +
    +
    +

    This event is triggered at the beginning of the dialog being resized.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the resizeStart event as an init option. +
    +
    +
    $('.selector').dialog({
    +   resizeStart: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the resizeStart event by type: resizeStart. +
    +
    +
    $('.selector').bind('resizeStart', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    resize

    +
    +
    Type:
    +
    resize
    +
    +
    +
    +

    This event is triggered when the dialog is resized.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the resize event as an init option. +
    +
    +
    $('.selector').dialog({
    +   resize: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the resize event by type: resize. +
    +
    +
    $('.selector').bind('resize', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    resizeStop

    +
    +
    Type:
    +
    resizeStop
    +
    +
    +
    +

    This event is triggered after the dialog has been resized.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the resizeStop event as an init option. +
    +
    +
    $('.selector').dialog({
    +   resizeStop: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the resizeStop event by type: resizeStop. +
    +
    +
    $('.selector').bind('resizeStop', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    close

    +
    +
    Type:
    +
    dialogclose
    +
    +
    +
    +

    This event is triggered when the dialog is closed.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the close event as an init option. +
    +
    +
    $('.selector').dialog({
    +   close: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the close event by type: dialogclose. +
    +
    +
    $('.selector').bind('dialogclose', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + +
+
+
+

Methods

+
    + +
  • +
    +

    destroy

    +
    +
    Signature:
    +
    .dialog( 'destroy' + + + + + + + +)
    +
    +
    +
    +

    Remove the dialog functionality completely. This will return the element back to its pre-init state.

    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Signature:
    +
    .dialog( 'disable' + + + + + + + +)
    +
    +
    +
    +

    Disable the dialog.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .dialog( 'enable' + + + + + + + +)
    +
    +
    +
    +

    Enable the dialog.

    +
    +
  • + + +
  • +
    +

    option

    +
    +
    Signature:
    +
    .dialog( 'option' + +, optionName + +, [value] + + + +)
    +
    +
    +
    +

    Get or set any dialog option. If no value is specified, will act as a getter.

    +
    +
  • + + +
  • +
    +

    close

    +
    +
    Signature:
    +
    .dialog( 'close' + + + + + + + +)
    +
    +
    +
    +

    Close the dialog.

    +
    +
  • + + +
  • +
    +

    isOpen

    +
    +
    Signature:
    +
    .dialog( 'isOpen' + + + + + + + +)
    +
    +
    +
    +

    Returns true if the dialog is currently open.

    +
    +
  • + + +
  • +
    +

    moveToTop

    +
    +
    Signature:
    +
    .dialog( 'moveToTop' + + + + + + + +)
    +
    +
    +
    +

    Move the dialog to the top of the dialogs stack.

    +
    +
  • + + +
  • +
    +

    open

    +
    +
    Signature:
    +
    .dialog( 'open' + + + + + + + +)
    +
    +
    +
    +

    Open the dialog.

    +
    +
  • + +
+
+
+

Theming

+

The jQuery UI Dialog plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +

+

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.dialog.css stylesheet that can be modified. These classes are highlighed in bold below. +

+ +

Sample markup with jQuery UI CSS Framework classes

+ <div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable ui-resizable">
+   <div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix">
+      <span id="ui-dialog-title-dialog" class="ui-dialog-title">Dialog title</span>
+      <a class="ui-dialog-titlebar-close ui-corner-all" href="#"><span class="ui-icon ui-icon-closethick">close</span></a>
+   </div>
+   <div style="height: 200px; min-height: 109px; width: auto;" class="ui-dialog-content ui-widget-content" id="dialog">
+      <p>Dialog content goes here.</p>
+   </div>
+</div>
+

+ + Note: This is a sample of markup generated by the dialog plugin, not markup you should use to create a dialog. The only markup needed for that is <div></div>. + +

+ +
+
+ +

+ + diff --git a/static/development-bundle/docs/draggable.html b/static/development-bundle/docs/draggable.html new file mode 100644 index 0000000..8e45fc2 --- /dev/null +++ b/static/development-bundle/docs/draggable.html @@ -0,0 +1,1448 @@ + + +
+

jQuery UI Draggable

+
+

Overview

+
+

The jQuery UI Draggable plugin makes selected elements draggable by mouse.

+

Draggable elements gets a class of ui-draggable. During drag the element also gets a class of ui-draggable-dragging. If you want not just drag, but drag-and-drop, see the jQuery UI Droppable plugin, which provides a drop target for draggables.

+

All callbacks (start, stop, drag) receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):

+
    +
  • ui.helper - the jQuery object representing the helper that's being dragged
  • +
  • ui.position - current position of the helper as { top, left } object, relative to the offset element
  • +
  • ui.offset - current absolute position of the helper as { top, left } object, relative to page
  • +
+
+
+

Dependencies

+
    +
  • UI Core
  • +
+
+
+

Example

+
+ +

+Initialize a draggable with default options.
+

+
$("#draggable").draggable();
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.draggable.js"></script>
+  <style type="text/css">
+    #draggable { width: 100px; height: 70px; background: silver; }
+  </style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("#draggable").draggable();
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<div id="draggable">Drag me</div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Options

+
    + +
  • +
    +

    addClasses

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    If set to false, will prevent the ui-draggable class from being added. This may be desired as a performance optimization when calling .draggable() init on many hundreds of elements.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the addClasses option specified. +
    +
    +
    $('.selector').draggable({ addClasses: false });
    +
    + + +
    + Get or set the addClasses option, after init. +
    +
    +
    //getter
    +var addClasses = $('.selector').draggable('option', 'addClasses');
    +//setter
    +$('.selector').draggable('option', 'addClasses', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    appendTo

    +
    +
    Type:
    +
    Element, Selector
    + +
    Default:
    +
    'parent'
    + +
    +
    +
    +

    The element passed to or selected by the appendTo option will be used as the draggable helper's container during dragging. By default, the helper is appended to the same container as the draggable.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the appendTo option specified. +
    +
    +
    $('.selector').draggable({ appendTo: 'body' });
    +
    + + +
    + Get or set the appendTo option, after init. +
    +
    +
    //getter
    +var appendTo = $('.selector').draggable('option', 'appendTo');
    +//setter
    +$('.selector').draggable('option', 'appendTo', 'body');
    +
    + +
    +
    +
  • + + +
  • +
    +

    axis

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Constrains dragging to either the horizontal (x) or vertical (y) axis. Possible values: 'x', 'y'.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the axis option specified. +
    +
    +
    $('.selector').draggable({ axis: 'x' });
    +
    + + +
    + Get or set the axis option, after init. +
    +
    +
    //getter
    +var axis = $('.selector').draggable('option', 'axis');
    +//setter
    +$('.selector').draggable('option', 'axis', 'x');
    +
    + +
    +
    +
  • + + +
  • +
    +

    cancel

    +
    +
    Type:
    +
    Selector
    + +
    Default:
    +
    ':input,option'
    + +
    +
    +
    +

    Prevents dragging from starting on specified elements.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the cancel option specified. +
    +
    +
    $('.selector').draggable({ cancel: 'button' });
    +
    + + +
    + Get or set the cancel option, after init. +
    +
    +
    //getter
    +var cancel = $('.selector').draggable('option', 'cancel');
    +//setter
    +$('.selector').draggable('option', 'cancel', 'button');
    +
    + +
    +
    +
  • + + +
  • +
    +

    connectToSortable

    +
    +
    Type:
    +
    Selector
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Allows the draggable to be dropped onto the specified sortables. If this option is used (helper must be set to 'clone' in order to work flawlessly), a draggable can be dropped onto a sortable list and then becomes part of it. +

    Note: Specifying this option as an array of selectors has been removed.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the connectToSortable option specified. +
    +
    +
    $('.selector').draggable({ connectToSortable: 'ul#myList' });
    +
    + + +
    + Get or set the connectToSortable option, after init. +
    +
    +
    //getter
    +var connectToSortable = $('.selector').draggable('option', 'connectToSortable');
    +//setter
    +$('.selector').draggable('option', 'connectToSortable', 'ul#myList');
    +
    + +
    +
    +
  • + + +
  • +
    +

    containment

    +
    +
    Type:
    +
    Selector, Element, String, Array
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Constrains dragging to within the bounds of the specified element or region. Possible string values: 'parent', 'document', 'window', [x1, y1, x2, y2].

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the containment option specified. +
    +
    +
    $('.selector').draggable({ containment: 'parent' });
    +
    + + +
    + Get or set the containment option, after init. +
    +
    +
    //getter
    +var containment = $('.selector').draggable('option', 'containment');
    +//setter
    +$('.selector').draggable('option', 'containment', 'parent');
    +
    + +
    +
    +
  • + + +
  • +
    +

    cursor

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'auto'
    + +
    +
    +
    +

    The css cursor during the drag operation.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the cursor option specified. +
    +
    +
    $('.selector').draggable({ cursor: 'crosshair' });
    +
    + + +
    + Get or set the cursor option, after init. +
    +
    +
    //getter
    +var cursor = $('.selector').draggable('option', 'cursor');
    +//setter
    +$('.selector').draggable('option', 'cursor', 'crosshair');
    +
    + +
    +
    +
  • + + +
  • +
    +

    cursorAt

    +
    +
    Type:
    +
    Object
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Moves the dragging helper so the cursor always appears to drag from the same position. Coordinates can be given as a hash using a combination of one or two keys: { top, left, right, bottom }.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the cursorAt option specified. +
    +
    +
    $('.selector').draggable({ cursorAt: { left: 5 } });
    +
    + + +
    + Get or set the cursorAt option, after init. +
    +
    +
    //getter
    +var cursorAt = $('.selector').draggable('option', 'cursorAt');
    +//setter
    +$('.selector').draggable('option', 'cursorAt', { left: 5 });
    +
    + +
    +
    +
  • + + +
  • +
    +

    delay

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    0
    + +
    +
    +
    +

    Time in milliseconds after mousedown until dragging should start. This option can be used to prevent unwanted drags when clicking on an element.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the delay option specified. +
    +
    +
    $('.selector').draggable({ delay: 500 });
    +
    + + +
    + Get or set the delay option, after init. +
    +
    +
    //getter
    +var delay = $('.selector').draggable('option', 'delay');
    +//setter
    +$('.selector').draggable('option', 'delay', 500);
    +
    + +
    +
    +
  • + + +
  • +
    +

    distance

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    1
    + +
    +
    +
    +

    Distance in pixels after mousedown the mouse must move before dragging should start. This option can be used to prevent unwanted drags when clicking on an element.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the distance option specified. +
    +
    +
    $('.selector').draggable({ distance: 30 });
    +
    + + +
    + Get or set the distance option, after init. +
    +
    +
    //getter
    +var distance = $('.selector').draggable('option', 'distance');
    +//setter
    +$('.selector').draggable('option', 'distance', 30);
    +
    + +
    +
    +
  • + + +
  • +
    +

    grid

    +
    +
    Type:
    +
    Array
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Snaps the dragging helper to a grid, every x and y pixels. Array values: [x, y]

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the grid option specified. +
    +
    +
    $('.selector').draggable({ grid: [50, 20] });
    +
    + + +
    + Get or set the grid option, after init. +
    +
    +
    //getter
    +var grid = $('.selector').draggable('option', 'grid');
    +//setter
    +$('.selector').draggable('option', 'grid', [50, 20]);
    +
    + +
    +
    +
  • + + +
  • +
    +

    handle

    +
    +
    Type:
    +
    Element, Selector
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If specified, restricts drag start click to the specified element(s).

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the handle option specified. +
    +
    +
    $('.selector').draggable({ handle: 'h2' });
    +
    + + +
    + Get or set the handle option, after init. +
    +
    +
    //getter
    +var handle = $('.selector').draggable('option', 'handle');
    +//setter
    +$('.selector').draggable('option', 'handle', 'h2');
    +
    + +
    +
    +
  • + + +
  • +
    +

    helper

    +
    +
    Type:
    +
    String, Function
    + +
    Default:
    +
    'original'
    + +
    +
    +
    +

    Allows for a helper element to be used for dragging display. Possible values: 'original', 'clone', Function. If a function is specified, it must return a DOMElement.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the helper option specified. +
    +
    +
    $('.selector').draggable({ helper: 'clone' });
    +
    + + +
    + Get or set the helper option, after init. +
    +
    +
    //getter
    +var helper = $('.selector').draggable('option', 'helper');
    +//setter
    +$('.selector').draggable('option', 'helper', 'clone');
    +
    + +
    +
    +
  • + + +
  • +
    +

    iframeFix

    +
    +
    Type:
    +
    Boolean, Selector
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Prevent iframes from capturing the mousemove events during a drag. Useful in combination with cursorAt, or in any case, if the mouse cursor is not over the helper. If set to true, transparent overlays will be placed over all iframes on the page. If a selector is supplied, the matched iframes will have an overlay placed over them.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the iframeFix option specified. +
    +
    +
    $('.selector').draggable({ iframeFix: true });
    +
    + + +
    + Get or set the iframeFix option, after init. +
    +
    +
    //getter
    +var iframeFix = $('.selector').draggable('option', 'iframeFix');
    +//setter
    +$('.selector').draggable('option', 'iframeFix', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    opacity

    +
    +
    Type:
    +
    Float
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Opacity for the helper while being dragged.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the opacity option specified. +
    +
    +
    $('.selector').draggable({ opacity: 0.35 });
    +
    + + +
    + Get or set the opacity option, after init. +
    +
    +
    //getter
    +var opacity = $('.selector').draggable('option', 'opacity');
    +//setter
    +$('.selector').draggable('option', 'opacity', 0.35);
    +
    + +
    +
    +
  • + + +
  • +
    +

    refreshPositions

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set to true, all droppable positions are calculated on every mousemove. Caution: This solves issues on highly dynamic pages, but dramatically decreases performance.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the refreshPositions option specified. +
    +
    +
    $('.selector').draggable({ refreshPositions: true });
    +
    + + +
    + Get or set the refreshPositions option, after init. +
    +
    +
    //getter
    +var refreshPositions = $('.selector').draggable('option', 'refreshPositions');
    +//setter
    +$('.selector').draggable('option', 'refreshPositions', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    revert

    +
    +
    Type:
    +
    Boolean, String
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set to true, the element will return to its start position when dragging stops. Possible string values: 'valid', 'invalid'. If set to invalid, revert will only occur if the draggable has not been dropped on a droppable. For valid, it's the other way around.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the revert option specified. +
    +
    +
    $('.selector').draggable({ revert: true });
    +
    + + +
    + Get or set the revert option, after init. +
    +
    +
    //getter
    +var revert = $('.selector').draggable('option', 'revert');
    +//setter
    +$('.selector').draggable('option', 'revert', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    revertDuration

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    500
    + +
    +
    +
    +

    The duration of the revert animation, in milliseconds. Ignored if revert is false.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the revertDuration option specified. +
    +
    +
    $('.selector').draggable({ revertDuration: 1000 });
    +
    + + +
    + Get or set the revertDuration option, after init. +
    +
    +
    //getter
    +var revertDuration = $('.selector').draggable('option', 'revertDuration');
    +//setter
    +$('.selector').draggable('option', 'revertDuration', 1000);
    +
    + +
    +
    +
  • + + +
  • +
    +

    scope

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'default'
    + +
    +
    +
    +

    Used to group sets of draggable and droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the droppable.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the scope option specified. +
    +
    +
    $('.selector').draggable({ scope: 'tasks' });
    +
    + + +
    + Get or set the scope option, after init. +
    +
    +
    //getter
    +var scope = $('.selector').draggable('option', 'scope');
    +//setter
    +$('.selector').draggable('option', 'scope', 'tasks');
    +
    + +
    +
    +
  • + + +
  • +
    +

    scroll

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    If set to true, container auto-scrolls while dragging.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the scroll option specified. +
    +
    +
    $('.selector').draggable({ scroll: false });
    +
    + + +
    + Get or set the scroll option, after init. +
    +
    +
    //getter
    +var scroll = $('.selector').draggable('option', 'scroll');
    +//setter
    +$('.selector').draggable('option', 'scroll', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    scrollSensitivity

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    20
    + +
    +
    +
    +

    Distance in pixels from the edge of the viewport after which the viewport should scroll. Distance is relative to pointer, not the draggable.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the scrollSensitivity option specified. +
    +
    +
    $('.selector').draggable({ scrollSensitivity: 40 });
    +
    + + +
    + Get or set the scrollSensitivity option, after init. +
    +
    +
    //getter
    +var scrollSensitivity = $('.selector').draggable('option', 'scrollSensitivity');
    +//setter
    +$('.selector').draggable('option', 'scrollSensitivity', 40);
    +
    + +
    +
    +
  • + + +
  • +
    +

    scrollSpeed

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    20
    + +
    +
    +
    +

    The speed at which the window should scroll once the mouse pointer gets within the scrollSensitivity distance.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the scrollSpeed option specified. +
    +
    +
    $('.selector').draggable({ scrollSpeed: 40 });
    +
    + + +
    + Get or set the scrollSpeed option, after init. +
    +
    +
    //getter
    +var scrollSpeed = $('.selector').draggable('option', 'scrollSpeed');
    +//setter
    +$('.selector').draggable('option', 'scrollSpeed', 40);
    +
    + +
    +
    +
  • + + +
  • +
    +

    snap

    +
    +
    Type:
    +
    Boolean, Selector
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set to a selector or to true (equivalent to '.ui-draggable'), the draggable will snap to the edges of the selected elements when near an edge of the element.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the snap option specified. +
    +
    +
    $('.selector').draggable({ snap: true });
    +
    + + +
    + Get or set the snap option, after init. +
    +
    +
    //getter
    +var snap = $('.selector').draggable('option', 'snap');
    +//setter
    +$('.selector').draggable('option', 'snap', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    snapMode

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'both'
    + +
    +
    +
    +

    Determines which edges of snap elements the draggable will snap to. Ignored if snap is false. Possible values: 'inner', 'outer', 'both'

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the snapMode option specified. +
    +
    +
    $('.selector').draggable({ snapMode: 'outer' });
    +
    + + +
    + Get or set the snapMode option, after init. +
    +
    +
    //getter
    +var snapMode = $('.selector').draggable('option', 'snapMode');
    +//setter
    +$('.selector').draggable('option', 'snapMode', 'outer');
    +
    + +
    +
    +
  • + + +
  • +
    +

    snapTolerance

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    20
    + +
    +
    +
    +

    The distance in pixels from the snap element edges at which snapping should occur. Ignored if snap is false.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the snapTolerance option specified. +
    +
    +
    $('.selector').draggable({ snapTolerance: 40 });
    +
    + + +
    + Get or set the snapTolerance option, after init. +
    +
    +
    //getter
    +var snapTolerance = $('.selector').draggable('option', 'snapTolerance');
    +//setter
    +$('.selector').draggable('option', 'snapTolerance', 40);
    +
    + +
    +
    +
  • + + +
  • +
    +

    stack

    +
    +
    Type:
    +
    Object
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Controls the z-Index of the defined group (key 'group' in the hash, accepts jQuery selector) automatically, always brings to front the dragged item. Very useful in things like window managers. Optionally, a 'min' key can be set, so the zIndex cannot go below that value.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the stack option specified. +
    +
    +
    $('.selector').draggable({ stack: { group: 'products', min: 50 } });
    +
    + + +
    + Get or set the stack option, after init. +
    +
    +
    //getter
    +var stack = $('.selector').draggable('option', 'stack');
    +//setter
    +$('.selector').draggable('option', 'stack', { group: 'products', min: 50 });
    +
    + +
    +
    +
  • + + +
  • +
    +

    zIndex

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    z-index for the helper while being dragged.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a draggable with the zIndex option specified. +
    +
    +
    $('.selector').draggable({ zIndex: 2700 });
    +
    + + +
    + Get or set the zIndex option, after init. +
    +
    +
    //getter
    +var zIndex = $('.selector').draggable('option', 'zIndex');
    +//setter
    +$('.selector').draggable('option', 'zIndex', 2700);
    +
    + +
    +
    +
  • + +
+
+
+

Events

+
    + +
  • +
    +

    start

    +
    +
    Type:
    +
    dragstart
    +
    +
    +
    +

    This event is triggered when dragging starts.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the start event as an init option. +
    +
    +
    $('.selector').draggable({
    +   start: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the start event by type: dragstart. +
    +
    +
    $('.selector').bind('dragstart', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    drag

    +
    +
    Type:
    +
    drag
    +
    +
    +
    +

    This event is triggered when the mouse is moved during the dragging.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the drag event as an init option. +
    +
    +
    $('.selector').draggable({
    +   drag: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the drag event by type: drag. +
    +
    +
    $('.selector').bind('drag', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    stop

    +
    +
    Type:
    +
    dragstop
    +
    +
    +
    +

    This event is triggered when dragging stops.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the stop event as an init option. +
    +
    +
    $('.selector').draggable({
    +   stop: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the stop event by type: dragstop. +
    +
    +
    $('.selector').bind('dragstop', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + +
+
+
+

Methods

+
    + +
  • +
    +

    destroy

    +
    +
    Signature:
    +
    .draggable( 'destroy' + + + + + + + +)
    +
    +
    +
    +

    Remove the draggable functionality completely. This will return the element back to its pre-init state.

    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Signature:
    +
    .draggable( 'disable' + + + + + + + +)
    +
    +
    +
    +

    Disable the draggable.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .draggable( 'enable' + + + + + + + +)
    +
    +
    +
    +

    Enable the draggable.

    +
    +
  • + + +
  • +
    +

    option

    +
    +
    Signature:
    +
    .draggable( 'option' + +, optionName + +, [value] + + + +)
    +
    +
    +
    +

    Get or set any draggable option. If no value is specified, will act as a getter.

    +
    +
  • + + +
+
+
+

Theming

+

The jQuery UI Draggable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +

+

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.draggable.css stylesheet that can be modified. These classes are highlighed in bold below. +

+ +

Sample markup with jQuery UI CSS Framework classes

+ <div class="ui-draggable"></div> +

+ + Note: This is a sample of markup generated by the draggable plugin, not markup you should use to create a draggable. The only markup needed for that is <div></div>. + +

+ +
+
+ +

+ + diff --git a/static/development-bundle/docs/droppable.html b/static/development-bundle/docs/droppable.html new file mode 100644 index 0000000..7adf946 --- /dev/null +++ b/static/development-bundle/docs/droppable.html @@ -0,0 +1,704 @@ + + +
+

jQuery UI Droppable

+
+

Overview

+
+

The jQuery UI Droppable plugin makes selected elements droppable (meaning they accept being dropped on by draggables). You can specify which (individually) or which kind of draggables each will accept.

+

All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):

+
    +
  • ui.draggable - current draggable element, a jQuery object.
  • +
  • ui.helper - current draggable helper, a jQuery object
  • +
  • ui.position - current position of the draggable helper { top: , left: }
  • +
  • ui.offset - current absolute position of the draggable helper { top: , left: }
  • +
+
+
+

Dependencies

+ +
+
+

Example

+
+ +

+Makes the div droppable (a drop target for a draggable).
+

+
$("#draggable").draggable();
+    $("#droppable").droppable({
+      drop: function() { alert('dropped'); }
+    });
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.draggable.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.droppable.js"></script>
+  <style type="text/css">
+    #draggable { width: 75px; height: 25px; background: silver; padding: 10px; }
+    #droppable { position: absolute; left: 250px; top: 0; width: 125px; height: 75px; background: gray; color: white; padding: 10px; }
+  </style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("#draggable").draggable();
+    $("#droppable").droppable({
+      drop: function() { alert('dropped'); }
+    });
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<div id="droppable">Drop here</div>
+<div id="draggable">Drag me</div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Options

+
    + +
  • +
    +

    accept

    +
    +
    Type:
    +
    Selector, Function
    + +
    Default:
    +
    '*'
    + +
    +
    +
    +

    All draggables that match the selector will be accepted. If a function is specified, the function will be called for each draggable on the page (passed as the first argument to the function), to provide a custom filter. The function should return true if the draggable should be accepted.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a droppable with the accept option specified. +
    +
    +
    $('.selector').droppable({ accept: '.special' });
    +
    + + +
    + Get or set the accept option, after init. +
    +
    +
    //getter
    +var accept = $('.selector').droppable('option', 'accept');
    +//setter
    +$('.selector').droppable('option', 'accept', '.special');
    +
    + +
    +
    +
  • + + +
  • +
    +

    activeClass

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If specified, the class will be added to the droppable while an acceptable draggable is being dragged.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a droppable with the activeClass option specified. +
    +
    +
    $('.selector').droppable({ activeClass: '.ui-state-highlight' });
    +
    + + +
    + Get or set the activeClass option, after init. +
    +
    +
    //getter
    +var activeClass = $('.selector').droppable('option', 'activeClass');
    +//setter
    +$('.selector').droppable('option', 'activeClass', '.ui-state-highlight');
    +
    + +
    +
    +
  • + + +
  • +
    +

    addClasses

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    If set to false, will prevent the ui-droppable class from being added. This may be desired as a performance optimization when calling .droppable() init on many hundreds of elements.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a droppable with the addClasses option specified. +
    +
    +
    $('.selector').droppable({ addClasses: false });
    +
    + + +
    + Get or set the addClasses option, after init. +
    +
    +
    //getter
    +var addClasses = $('.selector').droppable('option', 'addClasses');
    +//setter
    +$('.selector').droppable('option', 'addClasses', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    greedy

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If true, will prevent event propagation on nested droppables.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a droppable with the greedy option specified. +
    +
    +
    $('.selector').droppable({ greedy: true });
    +
    + + +
    + Get or set the greedy option, after init. +
    +
    +
    //getter
    +var greedy = $('.selector').droppable('option', 'greedy');
    +//setter
    +$('.selector').droppable('option', 'greedy', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    hoverClass

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If specified, the class will be added to the droppable while an acceptable draggable is being hovered.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a droppable with the hoverClass option specified. +
    +
    +
    $('.selector').droppable({ hoverClass: 'drophover' });
    +
    + + +
    + Get or set the hoverClass option, after init. +
    +
    +
    //getter
    +var hoverClass = $('.selector').droppable('option', 'hoverClass');
    +//setter
    +$('.selector').droppable('option', 'hoverClass', 'drophover');
    +
    + +
    +
    +
  • + + +
  • +
    +

    scope

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'default'
    + +
    +
    +
    +

    Used to group sets of draggable and droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a droppable with the scope option specified. +
    +
    +
    $('.selector').droppable({ scope: 'tasks' });
    +
    + + +
    + Get or set the scope option, after init. +
    +
    +
    //getter
    +var scope = $('.selector').droppable('option', 'scope');
    +//setter
    +$('.selector').droppable('option', 'scope', 'tasks');
    +
    + +
    +
    +
  • + + +
  • +
    +

    tolerance

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'intersect'
    + +
    +
    +
    +

    Specifies which mode to use for testing whether a draggable is 'over' a droppable. Possible values: 'fit', 'intersect', 'pointer', 'touch'. +

    +
      +
    • fit: draggable overlaps the droppable entirely
    • +
    • intersect: draggable overlaps the droppable at least 50%
    • +
    • pointer: mouse pointer overlaps the droppable
    • +
    • touch: draggable overlaps the droppable any amount
    • +
    +

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a droppable with the tolerance option specified. +
    +
    +
    $('.selector').droppable({ tolerance: 'fit' });
    +
    + + +
    + Get or set the tolerance option, after init. +
    +
    +
    //getter
    +var tolerance = $('.selector').droppable('option', 'tolerance');
    +//setter
    +$('.selector').droppable('option', 'tolerance', 'fit');
    +
    + +
    +
    +
  • + +
+
+
+

Events

+
    + +
  • +
    +

    activate

    +
    +
    Type:
    +
    dropactivate
    +
    +
    +
    +

    This event is triggered any time an accepted draggable starts dragging. This can be useful if you want to make the droppable 'light up' when it can be dropped on.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the activate event as an init option. +
    +
    +
    $('.selector').droppable({
    +   activate: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the activate event by type: dropactivate. +
    +
    +
    $('.selector').bind('dropactivate', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    deactivate

    +
    +
    Type:
    +
    dropdeactivate
    +
    +
    +
    +

    This event is triggered any time an accepted draggable stops dragging.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the deactivate event as an init option. +
    +
    +
    $('.selector').droppable({
    +   deactivate: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the deactivate event by type: dropdeactivate. +
    +
    +
    $('.selector').bind('dropdeactivate', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    over

    +
    +
    Type:
    +
    dropover
    +
    +
    +
    +

    This event is triggered as an accepted draggable is dragged 'over' (within the tolerance of) this droppable.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the over event as an init option. +
    +
    +
    $('.selector').droppable({
    +   over: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the over event by type: dropover. +
    +
    +
    $('.selector').bind('dropover', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    out

    +
    +
    Type:
    +
    dropout
    +
    +
    +
    +

    This event is triggered when an accepted draggable is dragged out (within the tolerance of) this droppable.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the out event as an init option. +
    +
    +
    $('.selector').droppable({
    +   out: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the out event by type: dropout. +
    +
    +
    $('.selector').bind('dropout', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    drop

    +
    +
    Type:
    +
    drop
    +
    +
    +
    +

    This event is triggered when an accepted draggable is dropped 'over' (within the tolerance of) this droppable. In the callback, $(this) represents the droppable the draggable is dropped on. +ui.draggable represents the draggable.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the drop event as an init option. +
    +
    +
    $('.selector').droppable({
    +   drop: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the drop event by type: drop. +
    +
    +
    $('.selector').bind('drop', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + +
+
+
+

Methods

+
    + +
  • +
    +

    destroy

    +
    +
    Signature:
    +
    .droppable( 'destroy' + + + + + + + +)
    +
    +
    +
    +

    Remove the droppable functionality completely. This will return the element back to its pre-init state.

    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Signature:
    +
    .droppable( 'disable' + + + + + + + +)
    +
    +
    +
    +

    Disable the droppable.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .droppable( 'enable' + + + + + + + +)
    +
    +
    +
    +

    Enable the droppable.

    +
    +
  • + + +
  • +
    +

    option

    +
    +
    Signature:
    +
    .droppable( 'option' + +, optionName + +, [value] + + + +)
    +
    +
    +
    +

    Get or set any droppable option. If no value is specified, will act as a getter.

    +
    +
  • + + +
+
+
+

Theming

+

The jQuery UI Droppable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +

+

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.droppable.css stylesheet that can be modified. These classes are highlighed in bold below. +

+ +

Sample markup with jQuery UI CSS Framework classes

+ <div class="ui-droppable"></div> +

+ + Note: This is a sample of markup generated by the droppable plugin, not markup you should use to create a droppable. The only markup needed for that is <div></div>. + +

+ +
+
+ +

+ + diff --git a/static/development-bundle/docs/effect.html b/static/development-bundle/docs/effect.html new file mode 100644 index 0000000..439e6cd --- /dev/null +++ b/static/development-bundle/docs/effect.html @@ -0,0 +1,142 @@ + + +
+

jQuery UI effect

+
+

Overview

+
+

effect( effect, [options], [speed], [callback] )

+

Uses a specific effect on an element (without the show/hide logic).

+
+
+

Dependencies

+
    +
  • Effects Core
  • +
+
+
+

Example

+
+ +

+Apply the effect explode if you click on the element.
+

+
$("p").click(function () {
+      $("div").effect("explode");
+    });
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
+<script src="http://ui.jquery.com/latest/ui/effects.explode.js"></script>
+<style type="text/css">
+  div { margin: 0 auto; width: 100px; height: 80px; background: blue; position: relative; }
+</style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("p").click(function () {
+      $("div").effect("explode");
+    });
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<p>Click me</p><div></div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Arguments

+
    + +
  • +
    +

    effect

    +
    +
    Type:
    +
    String
    + +
    +
    +
    +

    The effect to be used. Possible values: 'blind', 'bounce', 'clip', 'drop', 'explode', 'fold', 'highlight', 'puff', 'pulsate', 'scale', 'shake', 'size', 'slide', 'transfer'.

    +
    +
  • + + +
  • +
    +

    options

    +
    +
    Type:
    +
    Hash
    + +
    Optional
    + +
    +
    +
    +

    A object/hash including specific options for the effect.

    +
    +
  • + + +
  • +
    +

    speed

    +
    +
    Type:
    +
    String, Number
    + +
    Optional
    + +
    +
    +
    +

    A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).

    +
    +
  • + + +
  • +
    +

    callback

    +
    +
    Type:
    +
    Function
    + +
    Optional
    + +
    +
    +
    +

    A function that is called after the effect is completed.

    +
    +
  • + +
+
+
+ +

+ + diff --git a/static/development-bundle/docs/hide.html b/static/development-bundle/docs/hide.html new file mode 100644 index 0000000..8ea9d59 --- /dev/null +++ b/static/development-bundle/docs/hide.html @@ -0,0 +1,143 @@ + + +
+

jQuery UI hide

+
+

Overview

+
+

hide( effect, [options], [speed], [callback] )

+

The enhanced hide method optionally accepts jQuery UI advanced effects.

+

Uses a specific effect on an element to hide the element if the first argument is an effect string.

+
+
+

Dependencies

+
    +
  • Effects Core
  • +
+
+
+

Example

+
+ +

+Apply the effect slide if you click on the p to hide a div.
+

+
$("p").click(function () {
+      $("div").hide("slide", {}, 1000);
+    });
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
+<script src="http://ui.jquery.com/latest/ui/effects.slide.js"></script>
+<style type="text/css">
+  div { margin: 0px; width: 100px; height: 80px; background: blue; position: relative; }
+</style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("p").click(function () {
+      $("div").hide("slide", {}, 1000);
+    });
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<p>Click me</p><div></div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Arguments

+
    + +
  • +
    +

    effect

    +
    +
    Type:
    +
    String
    + +
    +
    +
    +

    The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.

    +
    +
  • + + +
  • +
    +

    options

    +
    +
    Type:
    +
    Hash
    + +
    Optional
    + +
    +
    +
    +

    A object/hash including specific options for the effect.

    +
    +
  • + + +
  • +
    +

    speed

    +
    +
    Type:
    +
    String, Number
    + +
    Optional
    + +
    +
    +
    +

    A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).

    +
    +
  • + + +
  • +
    +

    callback

    +
    +
    Type:
    +
    Function
    + +
    Optional
    + +
    +
    +
    +

    A function that is called after the effect is completed.

    +
    +
  • + +
+
+
+ +

+ + diff --git a/static/development-bundle/docs/progressbar.html b/static/development-bundle/docs/progressbar.html new file mode 100644 index 0000000..0e42d5a --- /dev/null +++ b/static/development-bundle/docs/progressbar.html @@ -0,0 +1,295 @@ + + +
+

jQuery UI Progressbar

+
+

Overview

+
+

+The progress bar is designed to simply display the current % complete for a process. The bar is coded to be flexibly sized through CSS and will scale to fit inside it's parent container by default. +

+

+This is a determinate progress bar, meaning that it should only be used in situations where the system can accurately update the current status complete. A determinate progress bar should never fill from left to right, then loop back to empty for a single process -- if the actual percent complete status cannot be calculated, an indeterminate progress bar (coming soon) or spinner animation is a better way to provide user feedback. +

+
+
+

Dependencies

+
    +
  • UI Core
  • +
+
+
+

Example

+
+ +

+A simple jQuery UI Progressbar.
+

+
$("#progressbar").progressbar({ value: 37 });
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.progressbar.js"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("#progressbar").progressbar({ value: 37 });
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<div id="progressbar"></div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Options

+
    + +
  • +
    +

    value

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    0
    + +
    +
    +
    +

    The value of the progressbar.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a progressbar with the value option specified. +
    +
    +
    $('.selector').progressbar({ value: 37 });
    +
    + + +
    + Get or set the value option, after init. +
    +
    +
    //getter
    +var value = $('.selector').progressbar('option', 'value');
    +//setter
    +$('.selector').progressbar('option', 'value', 37);
    +
    + +
    +
    +
  • + +
+
+
+

Events

+
    + +
  • +
    +

    change

    +
    +
    Type:
    +
    progressbarchange
    +
    +
    +
    +

    This event is triggered when the value of the progressbar changes.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the change event as an init option. +
    +
    +
    $('.selector').progressbar({
    +   change: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the change event by type: progressbarchange. +
    +
    +
    $('.selector').bind('progressbarchange', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + +
+
+
+

Methods

+
    + +
  • +
    +

    destroy

    +
    +
    Signature:
    +
    .progressbar( 'destroy' + + + + + + + +)
    +
    +
    +
    +

    Remove the progressbar functionality completely. This will return the element back to its pre-init state.

    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Signature:
    +
    .progressbar( 'disable' + + + + + + + +)
    +
    +
    +
    +

    Disable the progressbar.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .progressbar( 'enable' + + + + + + + +)
    +
    +
    +
    +

    Enable the progressbar.

    +
    +
  • + + +
  • +
    +

    option

    +
    +
    Signature:
    +
    .progressbar( 'option' + +, optionName + +, [value] + + + +)
    +
    +
    +
    +

    Get or set any progressbar option. If no value is specified, will act as a getter.

    +
    +
  • + + +
  • +
    +

    value

    +
    +
    Signature:
    +
    .progressbar( 'value' + +, [value] + + + + + +)
    +
    +
    +
    +

    This method gets or sets the current value of the progressbar.

    +
    +
  • + +
+
+
+

Theming

+

The jQuery UI Progressbar plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +

+

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.progressbar.css stylesheet that can be modified. These classes are highlighed in bold below. +

+ +

Sample markup with jQuery UI CSS Framework classes

+ <div class="ui-progressbar ui-widget ui-widget-content ui-corner-all">
+    <div style="width: 37%;" class="ui-progressbar-value ui-widget-header ui-corner-left"></div>
+ </div> +

+ + Note: This is a sample of markup generated by the progressbar plugin, not markup you should use to create a progressbar. The only markup needed for that is <div></div>. + +

+ +
+
+ +

+ + diff --git a/static/development-bundle/docs/removeClass.html b/static/development-bundle/docs/removeClass.html new file mode 100644 index 0000000..b2b19e8 --- /dev/null +++ b/static/development-bundle/docs/removeClass.html @@ -0,0 +1,112 @@ + + +
+

jQuery UI removeClass

+
+

Overview

+
+

removeClass( [class], [duration] )

+

Removes all or specified class from each of the set of matched elements with an optional transition between the states.

+
+
+

Dependencies

+
    +
  • Effects Core
  • +
+
+
+

Example

+
+ +

+Removes the class 'selected' from the matched elements with a one second transition.
+

+
$("p").click(function () {
+      $(this).removeClass("selected", 1000);
+    });
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
+<style type="text/css">
+  p { cursor: pointer; font-size: 1.2em; }
+  .selected { color:red; }
+</style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("p").click(function () {
+      $(this).removeClass("selected", 1000);
+    });
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<p class="selected">Click me to remove 'selected' class.</p>
+<p class="selected">Click me to remove 'selected' class.</p>
+<p class="selected">Click me to remove 'selected' class.</p>
+
+</body>
+</html>
+
+

+

+
+
+
+

Arguments

+
    + +
  • +
    +

    class

    +
    +
    Type:
    +
    String
    + +
    Optional
    + +
    +
    +
    +

    CSS classes to remove from the elements.

    +
    +
  • + + +
  • +
    +

    duration

    +
    +
    Type:
    +
    String, Number
    + +
    Optional
    + +
    +
    +
    +

    A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).

    +
    +
  • + +
+
+
+ +

+ + diff --git a/static/development-bundle/docs/resizable.html b/static/development-bundle/docs/resizable.html new file mode 100644 index 0000000..3e75ffe --- /dev/null +++ b/static/development-bundle/docs/resizable.html @@ -0,0 +1,1075 @@ + + +
+

jQuery UI Resizable

+
+

Overview

+
+

The jQuery UI Resizable plugin makes selected elements resizable (meaning they have draggable resize handles). You can specify one or more handles as well as min and max width and height.

+

All callbacks (start,stop,resize) receive two arguments: The original browser event and a prepared ui object. The ui object has the following fields:

+
    +
  • ui.helper - a jQuery object containing the helper element
  • +
  • ui.originalPosition - {top, left} before resizing started
  • +
  • ui.originalSize - {width, height} before resizing started
  • +
  • ui.position - {top, left} current position
  • +
  • ui.size - {width, height} current size
  • +
+
+
+

Dependencies

+
    +
  • UI Core
  • +
+
+
+

Example

+
+ +

+A simple jQuery UI Resizable.
+

+
$("#resizable").resizable();
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.resizable.js"></script>
+  <style type="text/css">
+    #resizable { width: 100px; height: 100px; background: silver; }
+  </style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("#resizable").resizable();
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<div id="resizable"></div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Options

+
    + +
  • +
    +

    alsoResize

    +
    +
    Type:
    +
    Selector, jQuery, Element
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Resize these elements synchronous when resizing.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the alsoResize option specified. +
    +
    +
    $('.selector').resizable({ alsoResize: '.other' });
    +
    + + +
    + Get or set the alsoResize option, after init. +
    +
    +
    //getter
    +var alsoResize = $('.selector').resizable('option', 'alsoResize');
    +//setter
    +$('.selector').resizable('option', 'alsoResize', '.other');
    +
    + +
    +
    +
  • + + +
  • +
    +

    animate

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Animates to the final size after resizing.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the animate option specified. +
    +
    +
    $('.selector').resizable({ animate: true });
    +
    + + +
    + Get or set the animate option, after init. +
    +
    +
    //getter
    +var animate = $('.selector').resizable('option', 'animate');
    +//setter
    +$('.selector').resizable('option', 'animate', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    animateDuration

    +
    +
    Type:
    +
    Integer, String
    + +
    Default:
    +
    'slow'
    + +
    +
    +
    +

    Duration time for animating, in milliseconds. Other possible values: 'slow', 'normal', 'fast'.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the animateDuration option specified. +
    +
    +
    $('.selector').resizable({ animateDuration: 500 });
    +
    + + +
    + Get or set the animateDuration option, after init. +
    +
    +
    //getter
    +var animateDuration = $('.selector').resizable('option', 'animateDuration');
    +//setter
    +$('.selector').resizable('option', 'animateDuration', 500);
    +
    + +
    +
    +
  • + + +
  • +
    +

    animateEasing

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'swing'
    + +
    +
    +
    +

    Easing effect for animating.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the animateEasing option specified. +
    +
    +
    $('.selector').resizable({ animateEasing: 'swing' });
    +
    + + +
    + Get or set the animateEasing option, after init. +
    +
    +
    //getter
    +var animateEasing = $('.selector').resizable('option', 'animateEasing');
    +//setter
    +$('.selector').resizable('option', 'animateEasing', 'swing');
    +
    + +
    +
    +
  • + + +
  • +
    +

    aspectRatio

    +
    +
    Type:
    +
    Boolean, Float
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set to true, resizing is constrained by the original aspect ratio. Otherwise a custom aspect ratio can be specified, such as 9 / 16, or 0.5.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the aspectRatio option specified. +
    +
    +
    $('.selector').resizable({ aspectRatio: .75 });
    +
    + + +
    + Get or set the aspectRatio option, after init. +
    +
    +
    //getter
    +var aspectRatio = $('.selector').resizable('option', 'aspectRatio');
    +//setter
    +$('.selector').resizable('option', 'aspectRatio', .75);
    +
    + +
    +
    +
  • + + +
  • +
    +

    autoHide

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set to true, automatically hides the handles except when the mouse hovers over the element.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the autoHide option specified. +
    +
    +
    $('.selector').resizable({ autoHide: true });
    +
    + + +
    + Get or set the autoHide option, after init. +
    +
    +
    //getter
    +var autoHide = $('.selector').resizable('option', 'autoHide');
    +//setter
    +$('.selector').resizable('option', 'autoHide', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    cancel

    +
    +
    Type:
    +
    Selector
    + +
    Default:
    +
    ':input,option'
    + +
    +
    +
    +

    Prevents resizing if you start on elements matching the selector.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the cancel option specified. +
    +
    +
    $('.selector').resizable({ cancel: ':input,option' });
    +
    + + +
    + Get or set the cancel option, after init. +
    +
    +
    //getter
    +var cancel = $('.selector').resizable('option', 'cancel');
    +//setter
    +$('.selector').resizable('option', 'cancel', ':input,option');
    +
    + +
    +
    +
  • + + +
  • +
    +

    containment

    +
    +
    Type:
    +
    String, Element, Selector
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Constrains resizing to within the bounds of the specified element. Possible values: 'parent', 'document', a DOMElement, or a Selector.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the containment option specified. +
    +
    +
    $('.selector').resizable({ containment: 'parent' });
    +
    + + +
    + Get or set the containment option, after init. +
    +
    +
    //getter
    +var containment = $('.selector').resizable('option', 'containment');
    +//setter
    +$('.selector').resizable('option', 'containment', 'parent');
    +
    + +
    +
    +
  • + + +
  • +
    +

    delay

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    0
    + +
    +
    +
    +

    Tolerance, in milliseconds, for when resizing should start. If specified, resizing will not start until after mouse is moved beyond duration. This can help prevent unintended resizing when clicking on an element.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the delay option specified. +
    +
    +
    $('.selector').resizable({ delay: 20 });
    +
    + + +
    + Get or set the delay option, after init. +
    +
    +
    //getter
    +var delay = $('.selector').resizable('option', 'delay');
    +//setter
    +$('.selector').resizable('option', 'delay', 20);
    +
    + +
    +
    +
  • + + +
  • +
    +

    distance

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    1
    + +
    +
    +
    +

    Tolerance, in pixels, for when resizing should start. If specified, resizing will not start until after mouse is moved beyond distance. This can help prevent unintended resizing when clicking on an element.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the distance option specified. +
    +
    +
    $('.selector').resizable({ distance: 20 });
    +
    + + +
    + Get or set the distance option, after init. +
    +
    +
    //getter
    +var distance = $('.selector').resizable('option', 'distance');
    +//setter
    +$('.selector').resizable('option', 'distance', 20);
    +
    + +
    +
    +
  • + + +
  • +
    +

    ghost

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set to true, a semi-transparent helper element is shown for resizing.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the ghost option specified. +
    +
    +
    $('.selector').resizable({ ghost: true });
    +
    + + +
    + Get or set the ghost option, after init. +
    +
    +
    //getter
    +var ghost = $('.selector').resizable('option', 'ghost');
    +//setter
    +$('.selector').resizable('option', 'ghost', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    grid

    +
    +
    Type:
    +
    Array
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Snaps the resizing element to a grid, every x and y pixels. Array values: [x, y]

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the grid option specified. +
    +
    +
    $('.selector').resizable({ grid: [50, 50] });
    +
    + + +
    + Get or set the grid option, after init. +
    +
    +
    //getter
    +var grid = $('.selector').resizable('option', 'grid');
    +//setter
    +$('.selector').resizable('option', 'grid', [50, 50]);
    +
    + +
    +
    +
  • + + +
  • +
    +

    handles

    +
    +
    Type:
    +
    String, Object
    + +
    Default:
    +
    'e, s, se'
    + +
    +
    +
    +

    If specified as a string, should be a comma-split list of any of the following: 'n, e, s, w, ne, se, sw, nw, all'. The necessary handles will be auto-generated by the plugin. +

    If specified as an object, the following keys are supported: { n, e, s, w, ne, se, sw, nw }. The value of any specified should be a jQuery selector matching the child element of the resizable to use as that handle. If the handle is not a child of the resizable, you can pass in the DOMElement or a valid jQuery object directly.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the handles option specified. +
    +
    +
    $('.selector').resizable({ handles: 'n, e, s, w' });
    +
    + + +
    + Get or set the handles option, after init. +
    +
    +
    //getter
    +var handles = $('.selector').resizable('option', 'handles');
    +//setter
    +$('.selector').resizable('option', 'handles', 'n, e, s, w');
    +
    + +
    +
    +
  • + + +
  • +
    +

    helper

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    This is the css class that will be added to a proxy element to outline the resize during the drag of the resize handle. Once the resize is complete, the original element is sized.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the helper option specified. +
    +
    +
    $('.selector').resizable({ helper: 'ui-state-highlight' });
    +
    + + +
    + Get or set the helper option, after init. +
    +
    +
    //getter
    +var helper = $('.selector').resizable('option', 'helper');
    +//setter
    +$('.selector').resizable('option', 'helper', 'ui-state-highlight');
    +
    + +
    +
    +
  • + + +
  • +
    +

    maxHeight

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    null
    + +
    +
    +
    +

    This is the maximum height the resizable should be allowed to resize to.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the maxHeight option specified. +
    +
    +
    $('.selector').resizable({ maxHeight: 300 });
    +
    + + +
    + Get or set the maxHeight option, after init. +
    +
    +
    //getter
    +var maxHeight = $('.selector').resizable('option', 'maxHeight');
    +//setter
    +$('.selector').resizable('option', 'maxHeight', 300);
    +
    + +
    +
    +
  • + + +
  • +
    +

    maxWidth

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    null
    + +
    +
    +
    +

    This is the maximum width the resizable should be allowed to resize to.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the maxWidth option specified. +
    +
    +
    $('.selector').resizable({ maxWidth: 250 });
    +
    + + +
    + Get or set the maxWidth option, after init. +
    +
    +
    //getter
    +var maxWidth = $('.selector').resizable('option', 'maxWidth');
    +//setter
    +$('.selector').resizable('option', 'maxWidth', 250);
    +
    + +
    +
    +
  • + + +
  • +
    +

    minHeight

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    10
    + +
    +
    +
    +

    This is the minimum height the resizable should be allowed to resize to.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the minHeight option specified. +
    +
    +
    $('.selector').resizable({ minHeight: 150 });
    +
    + + +
    + Get or set the minHeight option, after init. +
    +
    +
    //getter
    +var minHeight = $('.selector').resizable('option', 'minHeight');
    +//setter
    +$('.selector').resizable('option', 'minHeight', 150);
    +
    + +
    +
    +
  • + + +
  • +
    +

    minWidth

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    10
    + +
    +
    +
    +

    This is the minimum width the resizable should be allowed to resize to.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a resizable with the minWidth option specified. +
    +
    +
    $('.selector').resizable({ minWidth: 75 });
    +
    + + +
    + Get or set the minWidth option, after init. +
    +
    +
    //getter
    +var minWidth = $('.selector').resizable('option', 'minWidth');
    +//setter
    +$('.selector').resizable('option', 'minWidth', 75);
    +
    + +
    +
    +
  • + +
+
+
+

Events

+
    + +
  • +
    +

    start

    +
    +
    Type:
    +
    resizestart
    +
    +
    +
    +

    This event is triggered at the start of a resize operation.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the start event as an init option. +
    +
    +
    $('.selector').resizable({
    +   start: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the start event by type: resizestart. +
    +
    +
    $('.selector').bind('resizestart', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    resize

    +
    +
    Type:
    +
    resize
    +
    +
    +
    +

    This event is triggered during the resize, on the drag of the resize handler.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the resize event as an init option. +
    +
    +
    $('.selector').resizable({
    +   resize: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the resize event by type: resize. +
    +
    +
    $('.selector').bind('resize', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    stop

    +
    +
    Type:
    +
    resizestop
    +
    +
    +
    +

    This event is triggered at the end of a resize operation.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the stop event as an init option. +
    +
    +
    $('.selector').resizable({
    +   stop: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the stop event by type: resizestop. +
    +
    +
    $('.selector').bind('resizestop', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + +
+
+
+

Methods

+
    + +
  • +
    +

    destroy

    +
    +
    Signature:
    +
    .resizable( 'destroy' + + + + + + + +)
    +
    +
    +
    +

    Remove the resizable functionality completely. This will return the element back to its pre-init state.

    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Signature:
    +
    .resizable( 'disable' + + + + + + + +)
    +
    +
    +
    +

    Disable the resizable.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .resizable( 'enable' + + + + + + + +)
    +
    +
    +
    +

    Enable the resizable.

    +
    +
  • + + +
  • +
    +

    option

    +
    +
    Signature:
    +
    .resizable( 'option' + +, optionName + +, [value] + + + +)
    +
    +
    +
    +

    Get or set any resizable option. If no value is specified, will act as a getter.

    +
    +
  • + + +
+
+
+

Theming

+

The jQuery UI Resizable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +

+

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.resizable.css stylesheet that can be modified. These classes are highlighed in bold below. +

+ +

Sample markup with jQuery UI CSS Framework classes

+ <div class="ui-resizable">
+   <div style="-moz-user-select: none;" unselectable="on" class="ui-resizable-handle ui-resizable-e"></div>
+   <div style="-moz-user-select: none;" unselectable="on" class="ui-resizable-handle ui-resizable-s"></div>
+   <div unselectable="on" style="z-index: 1001; -moz-user-select: none;" class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se"></div>
+</div> +

+ + Note: This is a sample of markup generated by the resizable plugin, not markup you should use to create a resizable. The only markup needed for that is <div></div>. + +

+ +
+
+ +

+ + diff --git a/static/development-bundle/docs/selectable.html b/static/development-bundle/docs/selectable.html new file mode 100644 index 0000000..4841ebc --- /dev/null +++ b/static/development-bundle/docs/selectable.html @@ -0,0 +1,707 @@ + + +
+

jQuery UI Selectable

+
+

Overview

+
+

The jQuery UI Selectable plugin allows for elements to be selected by dragging a box (sometimes called a lasso) with the mouse over the elements. Also, elements can be selected by click or drag while holding the Ctrl/Meta key, allowing for multiple (non-contiguous) selections.

+
+
+

Dependencies

+
    +
  • UI Core
  • +
+
+
+

Example

+
+ +

+A simple jQuery UI Selectable.
+

+
$("#selectable").selectable();
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.selectable.js"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("#selectable").selectable();
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<div id="selectable"></div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Options

+
    + +
  • +
    +

    autoRefresh

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    This determines whether to refresh (recalculate) the position and size of each selectee at the beginning of each select operation. If you have many many items, you may want to set this to false and call the refresh method manually.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a selectable with the autoRefresh option specified. +
    +
    +
    $('.selector').selectable({ autoRefresh: false });
    +
    + + +
    + Get or set the autoRefresh option, after init. +
    +
    +
    //getter
    +var autoRefresh = $('.selector').selectable('option', 'autoRefresh');
    +//setter
    +$('.selector').selectable('option', 'autoRefresh', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    cancel

    +
    +
    Type:
    +
    Selector
    + +
    Default:
    +
    ':input,option'
    + +
    +
    +
    +

    Prevents selecting if you start on elements matching the selector.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a selectable with the cancel option specified. +
    +
    +
    $('.selector').selectable({ cancel: ':input,option' });
    +
    + + +
    + Get or set the cancel option, after init. +
    +
    +
    //getter
    +var cancel = $('.selector').selectable('option', 'cancel');
    +//setter
    +$('.selector').selectable('option', 'cancel', ':input,option');
    +
    + +
    +
    +
  • + + +
  • +
    +

    delay

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    0
    + +
    +
    +
    +

    Time in milliseconds to define when the selecting should start. It helps preventing unwanted selections when clicking on an element.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a selectable with the delay option specified. +
    +
    +
    $('.selector').selectable({ delay: 20 });
    +
    + + +
    + Get or set the delay option, after init. +
    +
    +
    //getter
    +var delay = $('.selector').selectable('option', 'delay');
    +//setter
    +$('.selector').selectable('option', 'delay', 20);
    +
    + +
    +
    +
  • + + +
  • +
    +

    distance

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    0
    + +
    +
    +
    +

    Tolerance, in pixels, for when selecting should start. If specified, selecting will not start until after mouse is dragged beyond distance.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a selectable with the distance option specified. +
    +
    +
    $('.selector').selectable({ distance: 20 });
    +
    + + +
    + Get or set the distance option, after init. +
    +
    +
    //getter
    +var distance = $('.selector').selectable('option', 'distance');
    +//setter
    +$('.selector').selectable('option', 'distance', 20);
    +
    + +
    +
    +
  • + + +
  • +
    +

    filter

    +
    +
    Type:
    +
    Selector
    + +
    Default:
    +
    '*'
    + +
    +
    +
    +

    The matching child elements will be made selectees (able to be selected).

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a selectable with the filter option specified. +
    +
    +
    $('.selector').selectable({ filter: 'li' });
    +
    + + +
    + Get or set the filter option, after init. +
    +
    +
    //getter
    +var filter = $('.selector').selectable('option', 'filter');
    +//setter
    +$('.selector').selectable('option', 'filter', 'li');
    +
    + +
    +
    +
  • + + +
  • +
    +

    tolerance

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'touch'
    + +
    +
    +
    +

    Possible values: 'touch', 'fit'. +

    +
      +
    • fit: draggable overlaps the droppable entirely
    • +
    • touch: draggable overlaps the droppable any amount
    • +
    +

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a selectable with the tolerance option specified. +
    +
    +
    $('.selector').selectable({ tolerance: 'fit' });
    +
    + + +
    + Get or set the tolerance option, after init. +
    +
    +
    //getter
    +var tolerance = $('.selector').selectable('option', 'tolerance');
    +//setter
    +$('.selector').selectable('option', 'tolerance', 'fit');
    +
    + +
    +
    +
  • + +
+
+
+

Events

+
    + +
  • +
    +

    selected

    +
    +
    Type:
    +
    selected
    +
    +
    +
    +

    This event is triggered at the end of the select operation, on each element added to the selection.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the selected event as an init option. +
    +
    +
    $('.selector').selectable({
    +   selected: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the selected event by type: selected. +
    +
    +
    $('.selector').bind('selected', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    selecting

    +
    +
    Type:
    +
    selecting
    +
    +
    +
    +

    This event is triggered during the select operation, on each element added to the selection.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the selecting event as an init option. +
    +
    +
    $('.selector').selectable({
    +   selecting: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the selecting event by type: selecting. +
    +
    +
    $('.selector').bind('selecting', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    start

    +
    +
    Type:
    +
    selectablestart
    +
    +
    +
    +

    This event is triggered at the beginning of the select operation.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the start event as an init option. +
    +
    +
    $('.selector').selectable({
    +   start: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the start event by type: selectablestart. +
    +
    +
    $('.selector').bind('selectablestart', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    stop

    +
    +
    Type:
    +
    selectablestop
    +
    +
    +
    +

    This event is triggered at the end of the select operation.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the stop event as an init option. +
    +
    +
    $('.selector').selectable({
    +   stop: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the stop event by type: selectablestop. +
    +
    +
    $('.selector').bind('selectablestop', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    unselected

    +
    +
    Type:
    +
    unselected
    +
    +
    +
    +

    This event is triggered at the end of the select operation, on each element removed from the selection.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the unselected event as an init option. +
    +
    +
    $('.selector').selectable({
    +   unselected: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the unselected event by type: unselected. +
    +
    +
    $('.selector').bind('unselected', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    unselecting

    +
    +
    Type:
    +
    unselecting
    +
    +
    +
    +

    This event is triggered during the select operation, on each element removed from the selection.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the unselecting event as an init option. +
    +
    +
    $('.selector').selectable({
    +   unselecting: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the unselecting event by type: unselecting. +
    +
    +
    $('.selector').bind('unselecting', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + +
+
+
+

Methods

+
    + +
  • +
    +

    destroy

    +
    +
    Signature:
    +
    .selectable( 'destroy' + + + + + + + +)
    +
    +
    +
    +

    Remove the selectable functionality completely. This will return the element back to its pre-init state.

    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Signature:
    +
    .selectable( 'disable' + + + + + + + +)
    +
    +
    +
    +

    Disable the selectable.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .selectable( 'enable' + + + + + + + +)
    +
    +
    +
    +

    Enable the selectable.

    +
    +
  • + + +
  • +
    +

    option

    +
    +
    Signature:
    +
    .selectable( 'option' + +, optionName + +, [value] + + + +)
    +
    +
    +
    +

    Get or set any selectable option. If no value is specified, will act as a getter.

    +
    +
  • + + +
  • +
    +

    refresh

    +
    +
    Signature:
    +
    .selectable( 'refresh' + + + + + + + +)
    +
    +
    +
    +

    Refresh the position and size of each selectee element. This method can be used to manually recalculate the position and size of each selectee element. Very useful if autoRefresh is set to false.

    +
    +
  • + +
+
+
+

Theming

+

The jQuery UI Selectable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +

+

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.selectable.css stylesheet that can be modified. These classes are highlighed in bold below. +

+ +

Sample markup with jQuery UI CSS Framework classes

+ <ul class="ui-selectable">
+   <li class="ui-selectee"></li>
+   <li class="ui-selectee"></li>
+   <li class="ui-selectee"></li>
+</ul> +

+ + Note: This is a sample of markup generated by the selectable plugin, not markup you should use to create a selectable. The only markup needed for that is
<ul>
+   <li></li>
+   <li></li>
+   <li></li>
+</ul>. +
+

+ +
+
+ +

+ + diff --git a/static/development-bundle/docs/show.html b/static/development-bundle/docs/show.html new file mode 100644 index 0000000..c8e6681 --- /dev/null +++ b/static/development-bundle/docs/show.html @@ -0,0 +1,143 @@ + + +
+

jQuery UI show

+
+

Overview

+
+

show( effect, [options], [speed], [callback] )

+

The enhanced show method optionally accepts jQuery UI advanced effects.

+

Uses a specific effect on an element to show the element if the first argument is a effect string.

+
+
+

Dependencies

+
    +
  • Effects Core
  • +
+
+
+

Example

+
+ +

+Apply the effect slide if you click on the p to show a div.
+

+
$("p").click(function () {
+      $("div").show("slide", {}, 1000);
+    });
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
+<script src="http://ui.jquery.com/latest/ui/effects.slide.js"></script>
+<style type="text/css">
+  div { display: none; margin: 0px; width: 100px; height: 80px; background: blue; position: relative; }
+</style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("p").click(function () {
+      $("div").show("slide", {}, 1000);
+    });
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<p>Click me</p><div></div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Arguments

+
    + +
  • +
    +

    effect

    +
    +
    Type:
    +
    String
    + +
    +
    +
    +

    The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.

    +
    +
  • + + +
  • +
    +

    options

    +
    +
    Type:
    +
    Hash
    + +
    Optional
    + +
    +
    +
    +

    A object/hash including specific options for the effect.

    +
    +
  • + + +
  • +
    +

    speed

    +
    +
    Type:
    +
    String, Number
    + +
    Optional
    + +
    +
    +
    +

    A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).

    +
    +
  • + + +
  • +
    +

    callback

    +
    +
    Type:
    +
    Function
    + +
    Optional
    + +
    +
    +
    +

    A function that is called after the effect is completed.

    +
    +
  • + +
+
+
+ +

+ + diff --git a/static/development-bundle/docs/slider.html b/static/development-bundle/docs/slider.html new file mode 100644 index 0000000..338681e --- /dev/null +++ b/static/development-bundle/docs/slider.html @@ -0,0 +1,733 @@ + + +
+

jQuery UI Slider

+
+

Overview

+
+

The jQuery UI Slider plugin makes selected elements into sliders. There are various options such as multiple handles, and ranges. The handle can be moved with the mouse or the arrow keys.

+

All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'): +

+
    +
  • ui.handle: DOMElement - the current focused handle +
  • ui.value: Integer - the current handle's value +
+
+
+

Dependencies

+
    +
  • UI Core
  • +
+
+
+

Example

+
+ +

+A simple jQuery UI Slider.
+

+
$("#slider").slider();
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.slider.js"></script>
+  <style type="text/css">
+    #slider { margin: 10px; }
+  </style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("#slider").slider();
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<div id="slider"></div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Options

+
    + +
  • +
    +

    animate

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Whether to slide handle smoothly when user click outside handle on the bar.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a slider with the animate option specified. +
    +
    +
    $('.selector').slider({ animate: true });
    +
    + + +
    + Get or set the animate option, after init. +
    +
    +
    //getter
    +var animate = $('.selector').slider('option', 'animate');
    +//setter
    +$('.selector').slider('option', 'animate', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    max

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    100
    + +
    +
    +
    +

    The maximum value of the slider.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a slider with the max option specified. +
    +
    +
    $('.selector').slider({ max: 7 });
    +
    + + +
    + Get or set the max option, after init. +
    +
    +
    //getter
    +var max = $('.selector').slider('option', 'max');
    +//setter
    +$('.selector').slider('option', 'max', 7);
    +
    + +
    +
    +
  • + + +
  • +
    +

    min

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    0
    + +
    +
    +
    +

    The minimum value of the slider.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a slider with the min option specified. +
    +
    +
    $('.selector').slider({ min: -7 });
    +
    + + +
    + Get or set the min option, after init. +
    +
    +
    //getter
    +var min = $('.selector').slider('option', 'min');
    +//setter
    +$('.selector').slider('option', 'min', -7);
    +
    + +
    +
    +
  • + + +
  • +
    +

    orientation

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'auto'
    + +
    +
    +
    +

    Normally you don't need to set this option because the plugin detects the slider orientation automatically. If the orientation is not correctly detected you can set this option to 'horizontal' or 'vertical'.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a slider with the orientation option specified. +
    +
    +
    $('.selector').slider({ orientation: 'vertical' });
    +
    + + +
    + Get or set the orientation option, after init. +
    +
    +
    //getter
    +var orientation = $('.selector').slider('option', 'orientation');
    +//setter
    +$('.selector').slider('option', 'orientation', 'vertical');
    +
    + +
    +
    +
  • + + +
  • +
    +

    range

    +
    +
    Type:
    +
    Boolean, String
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set to true, the slider will detect if you have two handles and create a stylable range element between these two. Two other possible values are 'min' and 'max'. A min range goes from the slider min to one handle. A max range goes from one handle to the slider max.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a slider with the range option specified. +
    +
    +
    $('.selector').slider({ range: 'min' });
    +
    + + +
    + Get or set the range option, after init. +
    +
    +
    //getter
    +var range = $('.selector').slider('option', 'range');
    +//setter
    +$('.selector').slider('option', 'range', 'min');
    +
    + +
    +
    +
  • + + +
  • +
    +

    step

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    1
    + +
    +
    +
    +

    Determines the size or amount of each interval or step the slider takes between min and max. The full specified value range of the slider (max - min) needs to be evenly divisible by the step.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a slider with the step option specified. +
    +
    +
    $('.selector').slider({ step: 5 });
    +
    + + +
    + Get or set the step option, after init. +
    +
    +
    //getter
    +var step = $('.selector').slider('option', 'step');
    +//setter
    +$('.selector').slider('option', 'step', 5);
    +
    + +
    +
    +
  • + + +
  • +
    +

    value

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    0
    + +
    +
    +
    +

    Determines the value of the slider, if there's only one handle. If there is more than one handle, determines the value of the first handle.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a slider with the value option specified. +
    +
    +
    $('.selector').slider({ value: 37 });
    +
    + + +
    + Get or set the value option, after init. +
    +
    +
    //getter
    +var value = $('.selector').slider('option', 'value');
    +//setter
    +$('.selector').slider('option', 'value', 37);
    +
    + +
    +
    +
  • + + +
  • +
    +

    values

    +
    +
    Type:
    +
    Array
    + +
    Default:
    +
    null
    + +
    +
    +
    +

    This option can be used to specify multiple handles. If range is set to true, the length of 'values' should be 2.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a slider with the values option specified. +
    +
    +
    $('.selector').slider({ values: [1,5,9] });
    +
    + + +
    + Get or set the values option, after init. +
    +
    +
    //getter
    +var values = $('.selector').slider('option', 'values');
    +//setter
    +$('.selector').slider('option', 'values', [1,5,9]);
    +
    + +
    +
    +
  • + +
+
+
+

Events

+
    + +
  • +
    +

    start

    +
    +
    Type:
    +
    slidestart
    +
    +
    +
    +

    This event is triggered when the user starts sliding.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the start event as an init option. +
    +
    +
    $('.selector').slider({
    +   start: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the start event by type: slidestart. +
    +
    +
    $('.selector').bind('slidestart', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    slide

    +
    +
    Type:
    +
    slide
    +
    +
    +
    +

    This event is triggered on every mouse move during slide. Use ui.value (single-handled sliders) to obtain the value of the current handle, $(..).slider('value', index) to get another handles' value. +

    Return false in order to prevent a slide, based on ui.value.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the slide event as an init option. +
    +
    +
    $('.selector').slider({
    +   slide: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the slide event by type: slide. +
    +
    +
    $('.selector').bind('slide', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    change

    +
    +
    Type:
    +
    slidechange
    +
    +
    +
    +

    This event is triggered on slide stop, or if the value is changed programmatically (by the value method). Takes arguments event and ui. Use event.orginalEvent to detect whether the value changed by mouse, keyboard, or programmatically. Use ui.value (single-handled sliders) to obtain the value of the current handle, $(this).slider('values', index) to get another handle's value.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the change event as an init option. +
    +
    +
    $('.selector').slider({
    +   change: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the change event by type: slidechange. +
    +
    +
    $('.selector').bind('slidechange', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    stop

    +
    +
    Type:
    +
    slidestop
    +
    +
    +
    +

    This event is triggered when the user stops sliding.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the stop event as an init option. +
    +
    +
    $('.selector').slider({
    +   stop: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the stop event by type: slidestop. +
    +
    +
    $('.selector').bind('slidestop', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + +
+
+
+

Methods

+
    + +
  • +
    +

    destroy

    +
    +
    Signature:
    +
    .slider( 'destroy' + + + + + + + +)
    +
    +
    +
    +

    Remove the slider functionality completely. This will return the element back to its pre-init state.

    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Signature:
    +
    .slider( 'disable' + + + + + + + +)
    +
    +
    +
    +

    Disable the slider.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .slider( 'enable' + + + + + + + +)
    +
    +
    +
    +

    Enable the slider.

    +
    +
  • + + +
  • +
    +

    option

    +
    +
    Signature:
    +
    .slider( 'option' + +, optionName + +, [value] + + + +)
    +
    +
    +
    +

    Get or set any slider option. If no value is specified, will act as a getter.

    +
    +
  • + + +
  • +
    +

    value

    +
    +
    Signature:
    +
    .slider( 'value' + +, [value] + + + + + +)
    +
    +
    +
    +

    Gets or sets the value of the slider. For single handle sliders.

    +
    +
  • + + +
  • +
    +

    values

    +
    +
    Signature:
    +
    .slider( 'values' + +, index + +, [value] + + + +)
    +
    +
    +
    +

    Gets or sets the values of the slider. For multiple handle or range sliders.

    +
    +
  • + +
+
+
+

Theming

+

The jQuery UI Slider plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +

+

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.slider.css stylesheet that can be modified. These classes are highlighed in bold below. +

+ +

Sample markup with jQuery UI CSS Framework classes

+ <div class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all">
+   <a style="left: 0%;" class="ui-slider-handle ui-state-default ui-corner-all" href="#"></a>
+</div>
+

+ + Note: This is a sample of markup generated by the slider plugin, not markup you should use to create a slider. The only markup needed for that is <div><div>. + +

+ +
+
+ +

+ + diff --git a/static/development-bundle/docs/sortable.html b/static/development-bundle/docs/sortable.html new file mode 100644 index 0000000..6ed114b --- /dev/null +++ b/static/development-bundle/docs/sortable.html @@ -0,0 +1,1818 @@ + + +
+

jQuery UI Sortable

+
+

Overview

+
+

The jQuery UI Sortable plugin makes selected elements sortable by dragging with the mouse.

+

All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):

+
    +
  • ui.helper - the current helper element (most often a clone of the item)
  • +
  • ui.position - current position of the helper
  • +
  • ui.offset - current absolute position of the helper
  • +
  • ui.item - the current dragged element
  • +
  • ui.placeholder - the placeholder (if you defined one)
  • +
  • ui.sender - the sortable where the item comes from (only exists if you move from one connected list to another)
  • +
+
+
+

Dependencies

+
    +
  • UI Core
  • +
+
+
+

Example

+
+ +

+A simple jQuery UI Sortable.
+

+
$("#sortable").sortable();
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.sortable.js"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("#sortable").sortable();
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<div id="sortable"></div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Options

+
    + +
  • +
    +

    appendTo

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'parent'
    + +
    +
    +
    +

    Defines where the helper that moves with the mouse is being appended to during the drag (for example, to resolve overlap/zIndex issues).

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the appendTo option specified. +
    +
    +
    $('.selector').sortable({ appendTo: 'body' });
    +
    + + +
    + Get or set the appendTo option, after init. +
    +
    +
    //getter
    +var appendTo = $('.selector').sortable('option', 'appendTo');
    +//setter
    +$('.selector').sortable('option', 'appendTo', 'body');
    +
    + +
    +
    +
  • + + +
  • +
    +

    axis

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If defined, the items can be dragged only horizontally or vertically. Possible values:'x', 'y'.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the axis option specified. +
    +
    +
    $('.selector').sortable({ axis: 'x' });
    +
    + + +
    + Get or set the axis option, after init. +
    +
    +
    //getter
    +var axis = $('.selector').sortable('option', 'axis');
    +//setter
    +$('.selector').sortable('option', 'axis', 'x');
    +
    + +
    +
    +
  • + + +
  • +
    +

    cancel

    +
    +
    Type:
    +
    Selector
    + +
    Default:
    +
    ':input,button'
    + +
    +
    +
    +

    Prevents sorting if you start on elements matching the selector.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the cancel option specified. +
    +
    +
    $('.selector').sortable({ cancel: 'button' });
    +
    + + +
    + Get or set the cancel option, after init. +
    +
    +
    //getter
    +var cancel = $('.selector').sortable('option', 'cancel');
    +//setter
    +$('.selector').sortable('option', 'cancel', 'button');
    +
    + +
    +
    +
  • + + +
  • +
    +

    connectWith

    +
    +
    Type:
    +
    Selector
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Takes a jQuery selector with items that also have sortables applied. If used, the sortable is now connected to the other one-way, so you can drag from this sortable to the other.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the connectWith option specified. +
    +
    +
    $('.selector').sortable({ connectWith: '.otherlist' });
    +
    + + +
    + Get or set the connectWith option, after init. +
    +
    +
    //getter
    +var connectWith = $('.selector').sortable('option', 'connectWith');
    +//setter
    +$('.selector').sortable('option', 'connectWith', '.otherlist');
    +
    + +
    +
    +
  • + + +
  • +
    +

    containment

    +
    +
    Type:
    +
    Element, String, Selector
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Constrains dragging to within the bounds of the specified element - can be a DOM element, 'parent', 'document', 'window', or a jQuery selector.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the containment option specified. +
    +
    +
    $('.selector').sortable({ containment: 'parent' });
    +
    + + +
    + Get or set the containment option, after init. +
    +
    +
    //getter
    +var containment = $('.selector').sortable('option', 'containment');
    +//setter
    +$('.selector').sortable('option', 'containment', 'parent');
    +
    + +
    +
    +
  • + + +
  • +
    +

    cursor

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'auto'
    + +
    +
    +
    +

    Defines the cursor that is being shown while sorting.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the cursor option specified. +
    +
    +
    $('.selector').sortable({ cursor: 'crosshair' });
    +
    + + +
    + Get or set the cursor option, after init. +
    +
    +
    //getter
    +var cursor = $('.selector').sortable('option', 'cursor');
    +//setter
    +$('.selector').sortable('option', 'cursor', 'crosshair');
    +
    + +
    +
    +
  • + + +
  • +
    +

    cursorAt

    +
    +
    Type:
    +
    Object
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Moves the sorting element or helper so the cursor always appears to drag from the same position. Coordinates can be given as a hash using a combination of one or two keys: { top, left, right, bottom }.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the cursorAt option specified. +
    +
    +
    $('.selector').sortable({ cursorAt: 'top' });
    +
    + + +
    + Get or set the cursorAt option, after init. +
    +
    +
    //getter
    +var cursorAt = $('.selector').sortable('option', 'cursorAt');
    +//setter
    +$('.selector').sortable('option', 'cursorAt', 'top');
    +
    + +
    +
    +
  • + + +
  • +
    +

    delay

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    0
    + +
    +
    +
    +

    Time in milliseconds to define when the sorting should start. It helps preventing unwanted drags when clicking on an element.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the delay option specified. +
    +
    +
    $('.selector').sortable({ delay: 500 });
    +
    + + +
    + Get or set the delay option, after init. +
    +
    +
    //getter
    +var delay = $('.selector').sortable('option', 'delay');
    +//setter
    +$('.selector').sortable('option', 'delay', 500);
    +
    + +
    +
    +
  • + + +
  • +
    +

    distance

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    1
    + +
    +
    +
    +

    Tolerance, in pixels, for when sorting should start. If specified, sorting will not start until after mouse is dragged beyond distance. Can be used to allow for clicks on elements within a handle.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the distance option specified. +
    +
    +
    $('.selector').sortable({ distance: 30 });
    +
    + + +
    + Get or set the distance option, after init. +
    +
    +
    //getter
    +var distance = $('.selector').sortable('option', 'distance');
    +//setter
    +$('.selector').sortable('option', 'distance', 30);
    +
    + +
    +
    +
  • + + +
  • +
    +

    dropOnEmpty

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    If empty allows for an item to be dropped from a linked selectable.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the dropOnEmpty option specified. +
    +
    +
    $('.selector').sortable({ dropOnEmpty: false });
    +
    + + +
    + Get or set the dropOnEmpty option, after init. +
    +
    +
    //getter
    +var dropOnEmpty = $('.selector').sortable('option', 'dropOnEmpty');
    +//setter
    +$('.selector').sortable('option', 'dropOnEmpty', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    forceHelperSize

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If true, forces the helper to have a size.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the forceHelperSize option specified. +
    +
    +
    $('.selector').sortable({ forceHelperSize: true });
    +
    + + +
    + Get or set the forceHelperSize option, after init. +
    +
    +
    //getter
    +var forceHelperSize = $('.selector').sortable('option', 'forceHelperSize');
    +//setter
    +$('.selector').sortable('option', 'forceHelperSize', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    forcePlaceholderSize

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If true, forces the placeholder to have a size.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the forcePlaceholderSize option specified. +
    +
    +
    $('.selector').sortable({ forcePlaceholderSize: true });
    +
    + + +
    + Get or set the forcePlaceholderSize option, after init. +
    +
    +
    //getter
    +var forcePlaceholderSize = $('.selector').sortable('option', 'forcePlaceholderSize');
    +//setter
    +$('.selector').sortable('option', 'forcePlaceholderSize', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    grid

    +
    +
    Type:
    +
    Array
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Snaps the sorting element or helper to a grid, every x and y pixels. Array values: [x, y]

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the grid option specified. +
    +
    +
    $('.selector').sortable({ grid: [50, 20] });
    +
    + + +
    + Get or set the grid option, after init. +
    +
    +
    //getter
    +var grid = $('.selector').sortable('option', 'grid');
    +//setter
    +$('.selector').sortable('option', 'grid', [50, 20]);
    +
    + +
    +
    +
  • + + +
  • +
    +

    handle

    +
    +
    Type:
    +
    Selector, Element
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Restricts sort start click to the specified element.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the handle option specified. +
    +
    +
    $('.selector').sortable({ handle: 'h2' });
    +
    + + +
    + Get or set the handle option, after init. +
    +
    +
    //getter
    +var handle = $('.selector').sortable('option', 'handle');
    +//setter
    +$('.selector').sortable('option', 'handle', 'h2');
    +
    + +
    +
    +
  • + + +
  • +
    +

    helper

    +
    +
    Type:
    +
    String, Function
    + +
    Default:
    +
    'original'
    + +
    +
    +
    +

    Allows for a helper element to be used for dragging display. The supplied function receives the event and the element being sorted, and should return a DOMElement to be used as a custom proxy helper. Possible values: 'original', 'clone'

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the helper option specified. +
    +
    +
    $('.selector').sortable({ helper: 'clone' });
    +
    + + +
    + Get or set the helper option, after init. +
    +
    +
    //getter
    +var helper = $('.selector').sortable('option', 'helper');
    +//setter
    +$('.selector').sortable('option', 'helper', 'clone');
    +
    + +
    +
    +
  • + + +
  • +
    +

    items

    +
    +
    Type:
    +
    Selector
    + +
    Default:
    +
    '> *'
    + +
    +
    +
    +

    Specifies which items inside the element should be sortable.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the items option specified. +
    +
    +
    $('.selector').sortable({ items: 'li' });
    +
    + + +
    + Get or set the items option, after init. +
    +
    +
    //getter
    +var items = $('.selector').sortable('option', 'items');
    +//setter
    +$('.selector').sortable('option', 'items', 'li');
    +
    + +
    +
    +
  • + + +
  • +
    +

    opacity

    +
    +
    Type:
    +
    Float
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Defines the opacity of the helper while sorting. From 0.01 to 1

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the opacity option specified. +
    +
    +
    $('.selector').sortable({ opacity: 0.6 });
    +
    + + +
    + Get or set the opacity option, after init. +
    +
    +
    //getter
    +var opacity = $('.selector').sortable('option', 'opacity');
    +//setter
    +$('.selector').sortable('option', 'opacity', 0.6);
    +
    + +
    +
    +
  • + + +
  • +
    +

    placeholder

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Class that gets applied to the otherwise white space.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the placeholder option specified. +
    +
    +
    $('.selector').sortable({ placeholder: 'ui-state-highlight' });
    +
    + + +
    + Get or set the placeholder option, after init. +
    +
    +
    //getter
    +var placeholder = $('.selector').sortable('option', 'placeholder');
    +//setter
    +$('.selector').sortable('option', 'placeholder', 'ui-state-highlight');
    +
    + +
    +
    +
  • + + +
  • +
    +

    revert

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    If set to true, the item will be reverted to its new DOM position with a smooth animation.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the revert option specified. +
    +
    +
    $('.selector').sortable({ revert: true });
    +
    + + +
    + Get or set the revert option, after init. +
    +
    +
    //getter
    +var revert = $('.selector').sortable('option', 'revert');
    +//setter
    +$('.selector').sortable('option', 'revert', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    scroll

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    true
    + +
    +
    +
    +

    If set to true, the page scrolls when coming to an edge.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the scroll option specified. +
    +
    +
    $('.selector').sortable({ scroll: false });
    +
    + + +
    + Get or set the scroll option, after init. +
    +
    +
    //getter
    +var scroll = $('.selector').sortable('option', 'scroll');
    +//setter
    +$('.selector').sortable('option', 'scroll', false);
    +
    + +
    +
    +
  • + + +
  • +
    +

    scrollSensitivity

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    20
    + +
    +
    +
    +

    Defines how near the mouse must be to an edge to start scrolling.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the scrollSensitivity option specified. +
    +
    +
    $('.selector').sortable({ scrollSensitivity: 40 });
    +
    + + +
    + Get or set the scrollSensitivity option, after init. +
    +
    +
    //getter
    +var scrollSensitivity = $('.selector').sortable('option', 'scrollSensitivity');
    +//setter
    +$('.selector').sortable('option', 'scrollSensitivity', 40);
    +
    + +
    +
    +
  • + + +
  • +
    +

    scrollSpeed

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    20
    + +
    +
    +
    +

    The speed at which the window should scroll once the mouse pointer gets within the scrollSensitivity distance.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the scrollSpeed option specified. +
    +
    +
    $('.selector').sortable({ scrollSpeed: 40 });
    +
    + + +
    + Get or set the scrollSpeed option, after init. +
    +
    +
    //getter
    +var scrollSpeed = $('.selector').sortable('option', 'scrollSpeed');
    +//setter
    +$('.selector').sortable('option', 'scrollSpeed', 40);
    +
    + +
    +
    +
  • + + +
  • +
    +

    tolerance

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'intersect'
    + +
    +
    +
    +

    This is the way the reordering behaves during drag. Possible values: 'intersect', 'pointer'. In some setups, 'pointer' is more natural. +

    +
      +
    • intersect: draggable overlaps the droppable at least 50%
    • +
    • pointer: mouse pointer overlaps the droppable
    • +
    +

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the tolerance option specified. +
    +
    +
    $('.selector').sortable({ tolerance: 'pointer' });
    +
    + + +
    + Get or set the tolerance option, after init. +
    +
    +
    //getter
    +var tolerance = $('.selector').sortable('option', 'tolerance');
    +//setter
    +$('.selector').sortable('option', 'tolerance', 'pointer');
    +
    + +
    +
    +
  • + + +
  • +
    +

    zIndex

    +
    +
    Type:
    +
    Integer
    + +
    Default:
    +
    1000
    + +
    +
    +
    +

    Z-index for element/helper while being sorted.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a sortable with the zIndex option specified. +
    +
    +
    $('.selector').sortable({ zIndex: 5 });
    +
    + + +
    + Get or set the zIndex option, after init. +
    +
    +
    //getter
    +var zIndex = $('.selector').sortable('option', 'zIndex');
    +//setter
    +$('.selector').sortable('option', 'zIndex', 5);
    +
    + +
    +
    +
  • + +
+
+
+

Events

+
    + +
  • +
    +

    start

    +
    +
    Type:
    +
    sortstart
    +
    +
    +
    +

    This event is triggered when sorting starts.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the start event as an init option. +
    +
    +
    $('.selector').sortable({
    +   start: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the start event by type: sortstart. +
    +
    +
    $('.selector').bind('sortstart', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    sort

    +
    +
    Type:
    +
    sort
    +
    +
    +
    +

    This event is triggered during sorting.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the sort event as an init option. +
    +
    +
    $('.selector').sortable({
    +   sort: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the sort event by type: sort. +
    +
    +
    $('.selector').bind('sort', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    change

    +
    +
    Type:
    +
    sortchange
    +
    +
    +
    +

    This event is triggered during sorting, but only when the DOM position has changed.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the change event as an init option. +
    +
    +
    $('.selector').sortable({
    +   change: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the change event by type: sortchange. +
    +
    +
    $('.selector').bind('sortchange', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    beforeStop

    +
    +
    Type:
    +
    sortbeforeStop
    +
    +
    +
    +

    This event is triggered when sorting stops, but when the placeholder/helper is still available.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the beforeStop event as an init option. +
    +
    +
    $('.selector').sortable({
    +   beforeStop: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the beforeStop event by type: sortbeforeStop. +
    +
    +
    $('.selector').bind('sortbeforeStop', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    stop

    +
    +
    Type:
    +
    sortstop
    +
    +
    +
    +

    This event is triggered when sorting has stopped.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the stop event as an init option. +
    +
    +
    $('.selector').sortable({
    +   stop: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the stop event by type: sortstop. +
    +
    +
    $('.selector').bind('sortstop', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    update

    +
    +
    Type:
    +
    sortupdate
    +
    +
    +
    +

    This event is triggered when the user stopped sorting and the DOM position has changed.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the update event as an init option. +
    +
    +
    $('.selector').sortable({
    +   update: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the update event by type: sortupdate. +
    +
    +
    $('.selector').bind('sortupdate', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    receive

    +
    +
    Type:
    +
    sortreceive
    +
    +
    +
    +

    This event is triggered when a connected sortable list has received an item from another list.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the receive event as an init option. +
    +
    +
    $('.selector').sortable({
    +   receive: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the receive event by type: sortreceive. +
    +
    +
    $('.selector').bind('sortreceive', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    remove

    +
    +
    Type:
    +
    sortremove
    +
    +
    +
    +

    This event is triggered when a sortable item has been dragged out from the list and into another.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the remove event as an init option. +
    +
    +
    $('.selector').sortable({
    +   remove: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the remove event by type: sortremove. +
    +
    +
    $('.selector').bind('sortremove', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    over

    +
    +
    Type:
    +
    sortover
    +
    +
    +
    +

    This event is triggered when a sortable item is moved into a connected list.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the over event as an init option. +
    +
    +
    $('.selector').sortable({
    +   over: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the over event by type: sortover. +
    +
    +
    $('.selector').bind('sortover', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    out

    +
    +
    Type:
    +
    sortout
    +
    +
    +
    +

    This event is triggered when a sortable item is moved away from a connected list.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the out event as an init option. +
    +
    +
    $('.selector').sortable({
    +   out: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the out event by type: sortout. +
    +
    +
    $('.selector').bind('sortout', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    activate

    +
    +
    Type:
    +
    sortactivate
    +
    +
    +
    +

    This event is triggered when using connected lists, every connected list on drag start receives it.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the activate event as an init option. +
    +
    +
    $('.selector').sortable({
    +   activate: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the activate event by type: sortactivate. +
    +
    +
    $('.selector').bind('sortactivate', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    deactivate

    +
    +
    Type:
    +
    sortdeactivate
    +
    +
    +
    +

    This event is triggered when sorting was stopped, is propagated to all possible connected lists.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the deactivate event as an init option. +
    +
    +
    $('.selector').sortable({
    +   deactivate: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the deactivate event by type: sortdeactivate. +
    +
    +
    $('.selector').bind('sortdeactivate', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + +
+
+
+

Methods

+
    + +
  • +
    +

    destroy

    +
    +
    Signature:
    +
    .sortable( 'destroy' + + + + + + + +)
    +
    +
    +
    +

    Remove the sortable functionality completely. This will return the element back to its pre-init state.

    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Signature:
    +
    .sortable( 'disable' + + + + + + + +)
    +
    +
    +
    +

    Disable the sortable.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .sortable( 'enable' + + + + + + + +)
    +
    +
    +
    +

    Enable the sortable.

    +
    +
  • + + +
  • +
    +

    option

    +
    +
    Signature:
    +
    .sortable( 'option' + +, optionName + +, [value] + + + +)
    +
    +
    +
    +

    Get or set any sortable option. If no value is specified, will act as a getter.

    +
    +
  • + + +
  • +
    +

    serialize

    +
    +
    Signature:
    +
    .sortable( 'serialize' + +, [options] + + + + + +)
    +
    +
    +
    +

    Serializes the sortable's item id's into a form/ajax submittable string. Calling this method produces a hash that can be appended to any url to easily submit a new item order back to the server. +

    It works by default by looking at the id of each item in the format 'setname_number', and it spits out a hash like "setname[]=number&setname[]=number". +

    You can also give in a option hash as second argument to custom define how the function works. The possible options are: 'key' (replaces part1[] with whatever you want), 'attribute' (test another attribute than 'id') and 'expression' (use your own regexp). +

    If serialize returns an empty string, make sure the id attributes include an underscore. They must be in the form: "set_number" For example, a 3 element list with id attributes foo_1, foo_5, foo_2 will serialize to foo[]=1&foo[]=5&foo[]=2. You can use an underscore, equal sign or hyphen to separate the set and number. For example foo=1 or foo-1 or foo_1 all serialize to foo[]=1.

    +
    +
  • + + +
  • +
    +

    toArray

    +
    +
    Signature:
    +
    .sortable( 'toArray' + + + + + + + +)
    +
    +
    +
    +

    Serializes the sortable's item id's into an array of string. If you have +

    +
    +<ul id="a_sortable"><br>
    +<li id="hello">Hello</li><br>
    +<li id="goodbye">Good bye</li><br>
    +</ul>
    +
    +

    and do +

    +
    var result = $('#a_sortable').sortable('toArray');
    +

    then +

    +
    result[0] will contain "hello" and result[1] will contain "goodbye".

    +
    +
  • + +

    +

  • +
    +

    refresh

    +
    +
    Signature:
    +
    .sortable( 'refresh' + + + + + + + +)
    +
    +
    +
    +

    Refresh the sortable items. Custom trigger the reloading of all sortable items, causing new items to be recognized.

    +
    +
  • + + +
  • +
    +

    refreshPositions

    +
    +
    Signature:
    +
    .sortable( 'refreshPositions' + + + + + + + +)
    +
    +
    +
    +

    Refresh the cached positions of the sortables' items. Calling this method refreshes the cached item positions of all sortables. This is usually done automatically by the script and slows down performance. Use wisely.

    +
    +
  • + + +
  • +
    +

    cancel

    +
    +
    Signature:
    +
    .sortable( 'cancel' + + + + + + + +)
    +
    +
    +
    +

    Cancels a change in the current sortable and reverts it back to how it was before the current sort started. Useful in the stop and receive callback functions. +

    If the sortable item is not being moved from one connected sortable to another: +

    +
    $(this).sortable('cancel');
    +

    will cancel the change. +

    If the sortable item is being moved from one connected sortable to another: +

    +
    $(ui.sender).sortable('cancel');
    +

    will cancel the change. Useful in the 'receive' callback.

    +
    +
  • + +
+
+
+

Theming

+

The jQuery UI Sortable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +

+

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.sortable.css stylesheet that can be modified. These classes are highlighed in bold below. +

+ +

Sample markup with jQuery UI CSS Framework classes

+ <ul class="ui-sortable">
+   <li></li>
+   <li></li>
+   <li></li>
+</ul> +

+ + Note: This is a sample of markup generated by the sortable plugin, not markup you should use to create a sortable. The only markup needed for that is
<ul>
+   <li></li>
+   <li></li>
+   <li></li>
+</ul>. +
+

+ +
+
+ +

+ + diff --git a/static/development-bundle/docs/switchClass.html b/static/development-bundle/docs/switchClass.html new file mode 100644 index 0000000..b2e1b83 --- /dev/null +++ b/static/development-bundle/docs/switchClass.html @@ -0,0 +1,128 @@ + + +
+

jQuery UI switchClass

+
+

Overview

+
+

switchClass( remove, add, [duration] )

+

Switches from the class defined in the first argument to the class defined as second argument, using an optional transition.

+
+
+

Dependencies

+
    +
  • Effects Core
  • +
+
+
+

Example

+
+ +

+Switch the class 'highlight' to 'blue' when a paragraph is clicked with a one second transition.
+

+
$("p").click(function () {
+      $(this).switchClass("highlight", "blue", 1000);
+    });
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
+<style type="text/css">
+  p { margin: 4px; font-size:16px; font-weight:bolder; 
+      cursor:pointer; }
+  .blue { background: blue; }
+  .highlight { background:yellow; }
+</style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("p").click(function () {
+      $(this).switchClass("highlight", "blue", 1000);
+    });
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<p class="highlight">Click to switch</p>
+<p class="highlight">to blue</p>
+<p class="highlight">on these</p>
+<p class="highlight">paragraphs</p>
+
+</body>
+</html>
+
+

+

+
+
+
+

Arguments

+
    + +
  • +
    +

    remove

    +
    +
    Type:
    +
    String
    + +
    +
    +
    +

    The CSS class that will be removed.

    +
    +
  • + + +
  • +
    +

    add

    +
    +
    Type:
    +
    String
    + +
    +
    +
    +

    The CSS class that will be added.

    +
    +
  • + + +
  • +
    +

    duration

    +
    +
    Type:
    +
    String, Number
    + +
    Optional
    + +
    +
    +
    +

    A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).

    +
    +
  • + +
+
+
+ +

+ + diff --git a/static/development-bundle/docs/tabs.html b/static/development-bundle/docs/tabs.html new file mode 100644 index 0000000..b500cf5 --- /dev/null +++ b/static/development-bundle/docs/tabs.html @@ -0,0 +1,1426 @@ + + +
+

jQuery UI Tabs

+
+

Overview

+
+

Tabs are generally used to break content into multiple sections that can be swapped to save space, much like an accordion.

+

By default a tab widget will swap between tabbed sections onClick, but the events can be changed to onHover through an option. Tab content can be loaded via Ajax by setting an href on a tab.

+

Contents

+ +
+

Events

+

A series of events fire when interacting with a tabs interface: +

+
  • tabsselect, tabsload, tabsshow (in that order) +
  • tabsadd, tabsremove +
  • tabsenable, tabsdisable +
+

Event binding example: +

+
$('#example').bind('tabsselect', function(event, ui) {
+
+    // Objects available in the function context:
+    ui.tab     // anchor element of the selected (clicked) tab
+    ui.panel   // element, that contains the selected/clicked tab contents
+    ui.index   // zero-based index of the selected (clicked) tab
+
+});
+

Note that if a handler for the tabsselect event returns false, the clicked tab will not become selected (useful for example if switching to the next tab requires a form validation). +

+

Ajax mode

+

Tabs supports loading tab content via Ajax in an unobtrusive manner. +

The HTML you need is slightly different from the one that is used for static tabs: A list of links pointing to existing resources (from where the content gets loaded) and no additional containers at all (unobtrusive!). The containers' markup is going to be created on the fly: +

+
+<div id="example">
+     <ul>
+         <li><a href="ahah_1.html"><span>Content 1</span></a></li>
+         <li><a href="ahah_2.html"><span>Content 2</span></a></li>
+         <li><a href="ahah_3.html"><span>Content 3</span></a></li>
+     </ul>
+</div>
+
+

Obviously this degrades gracefully - the links, e.g. the content, will still be accessible with JavaScript disabled. +

Note that if you wish to reuse an existing container, you +could do so by matching a title attribute and the container's id: +

+
+<li><a href="hello/world.html" title="Todo Overview"> ... </a></li>
+
+

and a container like: +

+
+<div id="Todo_Overview"> ... </div>
+
+

(Note how white space is replaced with an underscore) +

This is useful if you want a human readable hash in the URL instead of +a cryptic generated one. +

+

Back button and bookmarking

+

Tabs 2 already supported this functionality, although the history plugin needs a rewrite first (it doesn't support Safari 3 and is in general a little inflexible) before it can be build back into the tabs. It is planned and Klaus is working on it whenever he finds the time. Actual bugs in the UI Tabs plugin itself always have higher priority though. +

+

How to...

+

...retrieve the index of the currently selected tab

+
var $tabs = $('#example').tabs();
+var selected = $tabs.tabs('option', 'selected'); // => 0
+

...open links in the current tab instead of leaving the page

+

"Hijax" links after tab content has been loaded: +

+
$('#example').tabs({
+    load: function(event, ui) {
+        $('a', ui.panel).click(function() {
+            $(ui.panel).load(this.href);
+            return false;
+        });
+    }
+});
+

...select a tab from a text link instead of clicking a tab itself

+
var $tabs = $('#example').tabs(); // first tab selected
+
+$('#my-text-link').click(function() { // bind click event to link
+    $tabs.tabs('select', 2); // switch to third tab
+    return false;
+});
+

...prevent switching to the tab on click depending on form validation

+

Returning false in the tabs select handler prevents the clicked tab from becoming selected. +

+
$('#example').tabs({
+    select: function(event, ui) {
+        var isValid = ... // form validation returning true or false
+        return isValid;
+    }
+});
+

...immediately select a just added tab

+
var $tabs = $('#example').tabs({
+    add: function(event, ui) {
+        $tabs.tabs('select', '#' + ui.panel.id);
+    }
+});
+

...follow a tab's URL instead of loading its content via ajax

+

Note that opening a tab in a new window is unexpected, e.g. +inconsistent behaviour exposing a usablity problem (http://www.useit.com/alertbox/tabs.html). +

+
$('#example').tabs({
+    select: function(event, ui) {
+        var url = $.data(ui.tab, 'load.tabs');
+        if( url ) {
+            location.href = url;
+            return false;
+        }
+        return true;
+    }
+});
+


+

+

...prevent a FOUC (Flash of Unstyled Content) before tabs are initialized

+

Add the necessary classes to hide an inactive tab panel to the HTML right away - note that this will not degrade gracefully with JavaScript being disabled: +

+
<div id="example" class="ui-tabs">
+  ...
+  <div id="a-tab-panel" class="ui-tabs-hide"> </div>
+  ...
+</div>
+

Why does...

+

...my slider, Google Map, sIFR etc. not work when placed in a hidden (inactive) tab?

+

Any component that requires some dimensional computation for its initialization won't work in a hidden tab, because the tab panel itself is hidden via display: none so that any elements inside won't report their actual width and height (0 in most browsers). +

There's an easy workaround. Use the off-left technique for hiding inactive tab panels. E.g. in your style sheet replace the rule for the class selector ".ui-tabs .ui-tabs-hide" with +

+
.ui-tabs .ui-tabs-hide {
+    position: absolute;
+    left: -10000px;
+}
+

For Google maps you can also resize the map once the tab is displayed like this: +

+
$('#example').bind('tabsshow', function(event, ui) {
+    if (ui.panel.id == "map-tab") {
+        resizeMap();
+    }
+});
+resizeMap() will call Google Maps' checkResize() on the particular map. +
+
+

Dependencies

+
    +
  • UI Core
  • +
  • To use the cookie option: jquery.cookie.js
  • +
  • Required CSS: +
    .ui-tabs .ui-tabs-hide {
    +     display: none;
    +}
  • +
+
+
+

Example

+
+ +

+A simple jQuery UI Tabs.
+

+
$("#tabs").tabs();
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
+  <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.tabs.js"></script>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("#tabs").tabs();
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<div id="tabs">
+    <ul>
+        <li><a href="#fragment-1"><span>One</span></a></li>
+        <li><a href="#fragment-2"><span>Two</span></a></li>
+        <li><a href="#fragment-3"><span>Three</span></a></li>
+    </ul>
+    <div id="fragment-1">
+        <p>First tab is active by default:</p>
+        <pre><code>$('#example').tabs();</code></pre>
+    </div>
+    <div id="fragment-2">
+        Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
+        Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
+    </div>
+    <div id="fragment-3">
+        Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
+        Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
+        Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
+    </div>
+</div>
+</body>
+</html>
+
+

+

+
+
+
+

Options

+
    + +
  • +
    +

    ajaxOptions

    +
    +
    Type:
    +
    Options
    + +
    Default:
    +
    null
    + +
    +
    +
    +

    Additional Ajax options to consider when loading tab content (see $.ajax).

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the ajaxOptions option specified. +
    +
    +
    $('.selector').tabs({ ajaxOptions: { async: false } });
    +
    + + +
    + Get or set the ajaxOptions option, after init. +
    +
    +
    //getter
    +var ajaxOptions = $('.selector').tabs('option', 'ajaxOptions');
    +//setter
    +$('.selector').tabs('option', 'ajaxOptions', { async: false });
    +
    + +
    +
    +
  • + + +
  • +
    +

    cache

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Whether or not to cache remote tabs content, e.g. load only once or with every click. Cached content is being lazy loaded, e.g once and only once for the first click. Note that to prevent the actual Ajax requests from being cached by the browser you need to provide an extra cache: false flag to ajaxOptions.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the cache option specified. +
    +
    +
    $('.selector').tabs({ cache: true });
    +
    + + +
    + Get or set the cache option, after init. +
    +
    +
    //getter
    +var cache = $('.selector').tabs('option', 'cache');
    +//setter
    +$('.selector').tabs('option', 'cache', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    collapsible

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    Set to true to allow an already selected tab to become unselected again upon reselection.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the collapsible option specified. +
    +
    +
    $('.selector').tabs({ collapsible: true });
    +
    + + +
    + Get or set the collapsible option, after init. +
    +
    +
    //getter
    +var collapsible = $('.selector').tabs('option', 'collapsible');
    +//setter
    +$('.selector').tabs('option', 'collapsible', true);
    +
    + +
    +
    +
  • + + + + + +
  • +
    +

    deselectable

    +
    +
    Type:
    +
    Boolean
    + +
    Default:
    +
    false
    + +
    +
    +
    +

    deprecated in jQuery UI 1.7, use collapsible.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the deselectable option specified. +
    +
    +
    $('.selector').tabs({ deselectable: true });
    +
    + + +
    + Get or set the deselectable option, after init. +
    +
    +
    //getter
    +var deselectable = $('.selector').tabs('option', 'deselectable');
    +//setter
    +$('.selector').tabs('option', 'deselectable', true);
    +
    + +
    +
    +
  • + + +
  • +
    +

    disabled

    +
    +
    Type:
    +
    Array<Number>
    + +
    Default:
    +
    []
    + +
    +
    +
    +

    An array containing the position of the tabs (zero-based index) that should be disabled on initialization.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the disabled option specified. +
    +
    +
    $('.selector').tabs({ disabled: [1, 2] });
    +
    + + +
    + Get or set the disabled option, after init. +
    +
    +
    //getter
    +var disabled = $('.selector').tabs('option', 'disabled');
    +//setter
    +$('.selector').tabs('option', 'disabled', [1, 2]);
    +
    + +
    +
    +
  • + + +
  • +
    +

    event

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'click'
    + +
    +
    +
    +

    The type of event to be used for selecting a tab.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the event option specified. +
    +
    +
    $('.selector').tabs({ event: 'mouseover' });
    +
    + + +
    + Get or set the event option, after init. +
    +
    +
    //getter
    +var event = $('.selector').tabs('option', 'event');
    +//setter
    +$('.selector').tabs('option', 'event', 'mouseover');
    +
    + +
    +
    +
  • + + +
  • +
    +

    fx

    +
    +
    Type:
    +
    Options, Array<Options>
    + +
    Default:
    +
    null
    + +
    +
    +
    +

    Enable animations for hiding and showing tab panels. The duration option can be a string representing one of the three predefined speeds ("slow", "normal", "fast") or the duration in milliseconds to run an animation (default is "normal").

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the fx option specified. +
    +
    +
    $('.selector').tabs({ fx: { opacity: 'toggle' } });
    +
    + + +
    + Get or set the fx option, after init. +
    +
    +
    //getter
    +var fx = $('.selector').tabs('option', 'fx');
    +//setter
    +$('.selector').tabs('option', 'fx', { opacity: 'toggle' });
    +
    + +
    +
    +
  • + + +
  • +
    +

    idPrefix

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    'ui-tabs-'
    + +
    +
    +
    +

    If the remote tab, its anchor element that is, has no title attribute to generate an id from, an id/fragment identifier is created from this prefix and a unique id returned by $.data(el), for example "ui-tabs-54".

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the idPrefix option specified. +
    +
    +
    $('.selector').tabs({ idPrefix: 'ui-tabs-primary' });
    +
    + + +
    + Get or set the idPrefix option, after init. +
    +
    +
    //getter
    +var idPrefix = $('.selector').tabs('option', 'idPrefix');
    +//setter
    +$('.selector').tabs('option', 'idPrefix', 'ui-tabs-primary');
    +
    + +
    +
    +
  • + + +
  • +
    +

    panelTemplate

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    '<div></div>'
    + +
    +
    +
    +

    HTML template from which a new tab panel is created in case of adding a tab with the add method or when creating a panel for a remote tab on the fly.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the panelTemplate option specified. +
    +
    +
    $('.selector').tabs({ panelTemplate: '<li></li>' });
    +
    + + +
    + Get or set the panelTemplate option, after init. +
    +
    +
    //getter
    +var panelTemplate = $('.selector').tabs('option', 'panelTemplate');
    +//setter
    +$('.selector').tabs('option', 'panelTemplate', '<li></li>');
    +
    + +
    +
    +
  • + + +
  • +
    +

    selected

    +
    +
    Type:
    +
    Number
    + +
    Default:
    +
    0
    + +
    +
    +
    +

    Zero-based index of the tab to be selected on initialization. To set all tabs to unselected pass -1 as value.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the selected option specified. +
    +
    +
    $('.selector').tabs({ selected: 3 });
    +
    + + +
    + Get or set the selected option, after init. +
    +
    +
    //getter
    +var selected = $('.selector').tabs('option', 'selected');
    +//setter
    +$('.selector').tabs('option', 'selected', 3);
    +
    + +
    +
    +
  • + + +
  • +
    +

    spinner

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    '<em>Loading&#8230;</em>'
    + +
    +
    +
    +

    The HTML content of this string is shown in a tab title while remote content is loading. Pass in empty string to deactivate that behavior.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the spinner option specified. +
    +
    +
    $('.selector').tabs({ spinner: 'Retrieving data...' });
    +
    + + +
    + Get or set the spinner option, after init. +
    +
    +
    //getter
    +var spinner = $('.selector').tabs('option', 'spinner');
    +//setter
    +$('.selector').tabs('option', 'spinner', 'Retrieving data...');
    +
    + +
    +
    +
  • + + +
  • +
    +

    tabTemplate

    +
    +
    Type:
    +
    String
    + +
    Default:
    +
    '<li><a href="#{href}"><span>#{label}</span></a></li>'
    + +
    +
    +
    +

    HTML template from which a new tab is created and added. The placeholders #{href} and #{label} are replaced with the url and tab label that are passed as arguments to the add method.

    +
    +
    +

    Code examples

    +
    + +
    + Initialize a tabs with the tabTemplate option specified. +
    +
    +
    $('.selector').tabs({ tabTemplate: '<div><a href="#{href}"><span>#{label}</span></a></div>' });
    +
    + + +
    + Get or set the tabTemplate option, after init. +
    +
    +
    //getter
    +var tabTemplate = $('.selector').tabs('option', 'tabTemplate');
    +//setter
    +$('.selector').tabs('option', 'tabTemplate', '<div><a href="#{href}"><span>#{label}</span></a></div>');
    +
    + +
    +
    +
  • + +
+
+
+

Events

+
    + +
  • +
    +

    select

    +
    +
    Type:
    +
    tabsselect
    +
    +
    +
    +

    This event is triggered when clicking a tab.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the select event as an init option. +
    +
    +
    $('.selector').tabs({
    +   select: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the select event by type: tabsselect. +
    +
    +
    $('.selector').bind('tabsselect', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    load

    +
    +
    Type:
    +
    tabsload
    +
    +
    +
    +

    This event is triggered after the content of a remote tab has been loaded.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the load event as an init option. +
    +
    +
    $('.selector').tabs({
    +   load: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the load event by type: tabsload. +
    +
    +
    $('.selector').bind('tabsload', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    show

    +
    +
    Type:
    +
    tabsshow
    +
    +
    +
    +

    This event is triggered when a tab is shown.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the show event as an init option. +
    +
    +
    $('.selector').tabs({
    +   show: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the show event by type: tabsshow. +
    +
    +
    $('.selector').bind('tabsshow', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    add

    +
    +
    Type:
    +
    tabsadd
    +
    +
    +
    +

    This event is triggered when a tab is added.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the add event as an init option. +
    +
    +
    $('.selector').tabs({
    +   add: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the add event by type: tabsadd. +
    +
    +
    $('.selector').bind('tabsadd', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    remove

    +
    +
    Type:
    +
    tabsremove
    +
    +
    +
    +

    This event is triggered when a tab is removed.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the remove event as an init option. +
    +
    +
    $('.selector').tabs({
    +   remove: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the remove event by type: tabsremove. +
    +
    +
    $('.selector').bind('tabsremove', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Type:
    +
    tabsenable
    +
    +
    +
    +

    This event is triggered when a tab is enabled.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the enable event as an init option. +
    +
    +
    $('.selector').tabs({
    +   enable: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the enable event by type: tabsenable. +
    +
    +
    $('.selector').bind('tabsenable', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Type:
    +
    tabsdisable
    +
    +
    +
    +

    This event is triggered when a tab is disabled.

    +
    +
    +

    Code examples

    +
    + +
    + Supply a callback function to handle the disable event as an init option. +
    +
    +
    $('.selector').tabs({
    +   disable: function(event, ui) { ... }
    +});
    +
    + + +
    + Bind to the disable event by type: tabsdisable. +
    +
    +
    $('.selector').bind('tabsdisable', function(event, ui) {
    +  ...
    +});
    +
    + +
    +
    +
  • + +
+
+
+

Methods

+
    + +
  • +
    +

    destroy

    +
    +
    Signature:
    +
    .tabs( 'destroy' + + + + + + + +)
    +
    +
    +
    +

    Remove the tabs functionality completely. This will return the element back to its pre-init state.

    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Signature:
    +
    .tabs( 'disable' + + + + + + + +)
    +
    +
    +
    +

    Disable the tabs.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .tabs( 'enable' + + + + + + + +)
    +
    +
    +
    +

    Enable the tabs.

    +
    +
  • + + +
  • +
    +

    option

    +
    +
    Signature:
    +
    .tabs( 'option' + +, optionName + +, [value] + + + +)
    +
    +
    +
    +

    Get or set any tabs option. If no value is specified, will act as a getter.

    +
    +
  • + + +
  • +
    +

    add

    +
    +
    Signature:
    +
    .tabs( 'add' + +, url + +, label + +, [index] + +)
    +
    +
    +
    +

    Add a new tab. The second argument is either a URL consisting of a fragment identifier only to create an in-page tab or a full url (relative or absolute, no cross-domain support) to turn the new tab into an Ajax (remote) tab. The third is the zero-based position where to insert the new tab. Optional, by default a new tab is appended at the end.

    +
    +
  • + + +
  • +
    +

    remove

    +
    +
    Signature:
    +
    .tabs( 'remove' + +, index + + + + + +)
    +
    +
    +
    +

    Remove a tab. The second argument is the zero-based index of the tab to be removed.

    +
    +
  • + + +
  • +
    +

    enable

    +
    +
    Signature:
    +
    .tabs( 'enable' + +, index + + + + + +)
    +
    +
    +
    +

    Enable a disabled tab. To enable more than one tab at once reset the disabled property like: $('#example').data('disabled.tabs', []);. The second argument is the zero-based index of the tab to be enabled.

    +
    +
  • + + +
  • +
    +

    disable

    +
    +
    Signature:
    +
    .tabs( 'disable' + +, index + + + + + +)
    +
    +
    +
    +

    Disable a tab. The selected tab cannot be disabled. To disable more than one tab at once use: $('#example').data('disabled.tabs', [1, 2, 3]); The second argument is the zero-based index of the tab to be disabled.

    +
    +
  • + + +
  • +
    +

    select

    +
    +
    Signature:
    +
    .tabs( 'select' + +, index + + + + + +)
    +
    +
    +
    +

    Select a tab, as if it were clicked. The second argument is the zero-based index of the tab to be selected or the id selector of the panel the tab is associated with (the tab's href fragment identifier, e.g. hash, points to the panel's id).

    +
    +
  • + + +
  • +
    +

    load

    +
    +
    Signature:
    +
    .tabs( 'load' + +, index + + + + + +)
    +
    +
    +
    +

    Reload the content of an Ajax tab programmatically. This method always loads the tab content from the remote location, even if cache is set to true. The second argument is the zero-based index of the tab to be reloaded.

    +
    +
  • + + +
  • +
    +

    url

    +
    +
    Signature:
    +
    .tabs( 'url' + +, index + +, url + + + +)
    +
    +
    +
    +

    Change the url from which an Ajax (remote) tab will be loaded. The specified URL will be used for subsequent loads. Note that you can not only change the URL for an existing remote tab with this method, but also turn an in-page tab into a remote tab. The second argument is the zero-based index of the tab of which its URL is to be updated. The third is a URL the content of the tab is loaded from.

    +
    +
  • + + +
  • +
    +

    length

    +
    +
    Signature:
    +
    .tabs( 'length' + + + + + + + +)
    +
    +
    +
    +

    Retrieve the number of tabs of the first matched tab pane.

    +
    +
  • + + +
  • +
    +

    abort

    +
    +
    Signature:
    +
    .tabs( 'abort' + + + + + + + +)
    +
    +
    +
    +

    Terminate all running tab ajax requests and animations.

    +
    +
  • + + +
  • +
    +

    rotate

    +
    +
    Signature:
    +
    .tabs( 'rotate' + +, ms + +, [continuing] + + + +)
    +
    +
    +
    +

    Set up an automatic rotation through tabs of a tab pane. The second argument is an amount of time in milliseconds until the next tab in the cycle gets activated. Use 0 or null to stop the rotation. The third controls whether or not to continue the rotation after a tab has been selected by a user. Default: false.

    +
    +
  • + +
+
+
+

Theming

+

The jQuery UI Tabs plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +

+

If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.tabs.css stylesheet that can be modified. These classes are highlighed in bold below. +

+ +

Sample markup with jQuery UI CSS Framework classes

+ <div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
+   <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
+     <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#tabs-1">Nunc tincidunt</a></li>
+      <li class="ui-state-default ui-corner-top"><a href="#tabs-2">Proin dolor</a></li>
+   <div class="ui-tabs-panel ui-widget-content ui-corner-bottom" id="tabs-1">
+      <p>Tab one content goes here.</p>
+   </div>
+    ...
+</div>
+

+ + Note: This is a sample of markup generated by the tabs plugin, not markup you should use to create a tabs. The only markup needed for that is
<div id="tabs">
+   <ul>
+      <li><a href="#tabs-1">Nunc tincidunt</a></li>
+      <li><a href="#tabs-2">Proin dolor</a></li>
+      <li><a href="#tabs-3">Aenean lacinia</a></li>
+   </ul>
+   <div id="tabs-1">
+      <p>Tab 1 content</p>
+   </div>
+   <div id="tabs-2">
+      <p>Tab 2 content</p>
+   </div>
+   <div id="tabs-3">
+      <p>Tab 3 content</p>
+   </div>
+</div>. +
+

+ +
+
+ +

+ + diff --git a/static/development-bundle/docs/toggle.html b/static/development-bundle/docs/toggle.html new file mode 100644 index 0000000..f569345 --- /dev/null +++ b/static/development-bundle/docs/toggle.html @@ -0,0 +1,143 @@ + + +
+

jQuery UI toggle

+
+

Overview

+
+

toggle( effect, [options], [speed], [callback] )

+

The enhanced toggle method optionally accepts jQuery UI advanced effects.

+

Uses a specific effect on an element to toggle the element if the first argument is an effect string.

+
+
+

Dependencies

+
    +
  • Effects Core
  • +
+
+
+

Example

+
+ +

+Apply the effect slide if you click on the p to toggle a div.
+

+
$("p").click(function () {
+      $("div").toggle("slide", {}, 1000);
+    });
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
+<script src="http://ui.jquery.com/latest/ui/effects.slide.js"></script>
+<style type="text/css">
+  div { display: none; margin: 0px; width: 100px; height: 80px; background: blue; position: relative; }
+</style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("p").click(function () {
+      $("div").toggle("slide", {}, 1000);
+    });
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<p>Click me</p><div></div>
+
+</body>
+</html>
+
+

+

+
+
+
+

Arguments

+
    + +
  • +
    +

    effect

    +
    +
    Type:
    +
    String
    + +
    +
    +
    +

    The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.

    +
    +
  • + + +
  • +
    +

    options

    +
    +
    Type:
    +
    Hash
    + +
    Optional
    + +
    +
    +
    +

    A object/hash including specific options for the effect.

    +
    +
  • + + +
  • +
    +

    speed

    +
    +
    Type:
    +
    String, Number
    + +
    Optional
    + +
    +
    +
    +

    A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).

    +
    +
  • + + +
  • +
    +

    callback

    +
    +
    Type:
    +
    Function
    + +
    Optional
    + +
    +
    +
    +

    A function that is called after the effect is completed.

    +
    +
  • + +
+
+
+ +

+ + diff --git a/static/development-bundle/docs/toggleClass.html b/static/development-bundle/docs/toggleClass.html new file mode 100644 index 0000000..6740cc3 --- /dev/null +++ b/static/development-bundle/docs/toggleClass.html @@ -0,0 +1,110 @@ + + +
+

jQuery UI toggleClass

+
+

Overview

+
+

toggleClass( class, [duration] )

+

Adds the specified class if it is not present, and removes the specified class if it is present, using an optional transition.

+
+
+

Dependencies

+
    +
  • Effects Core
  • +
+
+
+

Example

+
+ +

+Adds the 'selected' class if it is not present, and removes the 'selected' class if it is present.
+

+
$("p").click(function () {
+      $(this).toggleClass("selected", 1000);
+    });
+
+

+

+
<!DOCTYPE html>
+<html>
+<head>
+  <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
+  <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
+  <script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
+<style type="text/css">
+  p { cursor: pointer; font-size: 1.2em; }
+  .selected { color:red; }
+</style>
+  <script type="text/javascript">
+  $(document).ready(function(){
+    $("p").click(function () {
+      $(this).toggleClass("selected", 1000);
+    });
+  });
+  </script>
+</head>
+<body style="font-size:62.5%;">
+  
+<p>Click me to toggle 'selected' class.</p>
+<p class="selected">Click me to toggle 'selected' class.</p>
+<p>Click me to toggle 'selected' class.</p>
+
+</body>
+</html>
+
+

+

+
+
+
+

Arguments

+
    + +
  • +
    +

    class

    +
    +
    Type:
    +
    String
    + +
    +
    +
    +

    A CSS class to toggle on the elements.

    +
    +
  • + + +
  • +
    +

    duration

    +
    +
    Type:
    +
    String, Number
    + +
    Optional
    + +
    +
    +
    +

    A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).

    +
    +
  • + +
+
+
+ +

+ + diff --git a/static/development-bundle/external/bgiframe/ChangeLog.txt b/static/development-bundle/external/bgiframe/ChangeLog.txt new file mode 100644 index 0000000..ccebcbf --- /dev/null +++ b/static/development-bundle/external/bgiframe/ChangeLog.txt @@ -0,0 +1,20 @@ +== New and Noteworthy == + +== 2.1.1 == + +* Removed $.browser.version for jQuery < 1.1.3 + +== 2.1 == + +* Updated to work with jQuery 1.1.3 +* Added $.browser.version for jQuery < 1.1.3 +* Optimized duplication check by using child selector and using .length test + +== 2.0 == + +* Added ability change settings like width, height, src and more. + +== 1.0 == + +* Only adds iframe once per an element +* Works with SSL enabled pages \ No newline at end of file diff --git a/static/development-bundle/external/bgiframe/META.json b/static/development-bundle/external/bgiframe/META.json new file mode 100644 index 0000000..5be79cc --- /dev/null +++ b/static/development-bundle/external/bgiframe/META.json @@ -0,0 +1,32 @@ +{ + "name": "jQuery-bgiframe", + "version": 2.1, + "author": [ + "Brandon Aaron " + ], + "abstract": "jQuery plugin for fixing z-index issues in IE6", + "license": "mit, gpl", + "distribution_type": "plugin", + "requires": { + "jQuery": ">=1.0.3" + }, + "provides": { + "jQuery.bgiframe": { + "version": 2.1, + "file": "jquery.bgiframe.js" + } + }, + "keywords": [ + "iframe", + "hack", + "zIndex", + "z-index", + "ie6" + ], + "stability": "Official", + "meta-spec": { + "version": 1.3, + "url": "http://module-build.sourceforge.net/META-spec-v1.3.html" + }, + "generated_by": "Brandon Aaron" +} diff --git a/static/development-bundle/external/bgiframe/docs/index.html b/static/development-bundle/external/bgiframe/docs/index.html new file mode 100644 index 0000000..1776b4d --- /dev/null +++ b/static/development-bundle/external/bgiframe/docs/index.html @@ -0,0 +1,113 @@ + + + + + bgiframe 2.1.1 docs + + + + + +
+
+

bgiframe 2.1.1

+ +
+
What does it do?
+
+

Have you ever experienced the select form element z-index issue in Internet Explorer 6? Most likely you have if you've implemented some sort of drop down menu navigation that shows up over a select form element.

+

The background iframe (bgiframe) plugin provides a very small, quick and easy way to fix that problem so you don't have to worry about it. No matter the size, borders or position the bgiframe plugin can fix it.

+
+ +
When should I use it?
+
+

The bgiframe plugin should be used when you are trying to show elements above a select form control in Internet Explorer 6.

+
+ +
How do I use it?
+
+

The usage is simple. Just call bgiframe on a jQuery collection of elements.

+

$('.fix-z-index').bgiframe();

+

The plugin tries its best to handle most situations but sometimes some configuration is necessary. For example if your borders are defined in a unit other than pixels, you will need to manually set the top and left properties to the negative width of the border. Here are the options/settings available to configure the output.

+
+
top
+
+

The iframe must be offset to the top by the width of the top border. This should be a negative number representing the border-top-width. If a number is is used here, pixels will be assumed. Otherwise, be sure to specify a unit. An expression could also be used. By default the value is "auto" which will use an expression to get the border-top-width if it is in pixels.

+

$('.fix-z-index').bgiframe({ top: '-1em' });

+
+
left
+
+

The iframe must be offset to the left by the width of the left border. This should be a negative number representing the border-left-width. If a number is used here, pixels will be assumed. Otherwise, be sure to specify a unit. An expression could also be used. By default the value is "auto" which will use an expression to get the border-left-width if it is in pixels.

+

$('.fix-z-index').bgiframe({ left: '-1em' });

+
+
width
+
+

This is the width of the iframe. If a number is used here, pixels will be assume. Otherwise, be sure to specify a unit. An expression could also be used. By default the value is "auto" which will use an expression to get the offsetWidth.

+

$('.fix-z-index').bgiframe({ width: 100 });

+
+
height
+
+

This is the height of the iframe. If a number is used here, pixels will be assume. Otherwise, be sure to specify a unit. An expression could also be used. By default the value is "auto" which will use an expression to get the offsetHeight.

+

$('.fix-z-index').bgiframe({ height: 100 });

+
+
opacity
+
+

This is a boolean representing whether or not to use opacity. If set to true, the opacity of 0 is applied. If set to false, the opacity filter is not applied. Default: true.

+

$('.fix-z-index').bgiframe({ opacity: false });

+
+
src
+
+

This setting is provided so that one could change the src of the iframe to whatever they need. Default: "javascript:false;"

+

$('.fix-z-index').bgiframe({ src: '#' });

+
+
+
+ +
How does it work?
+
+

The bgiframe plugin works by prepending an iframe to the element. The iframe is given a class of bgiframe and positioned below all the other children of the element. In the default configuration it automatically adjusts to the width and height of the element (including the borders) and the opacity is set to 0. The element needs to have position (relative or absolute) and should have a background (color or image).

+

Check out the test page to see the plugin in action.

+
+ +
Where can I get it?
+
+
    +
  • 2.1 zip from the bgiframe project page.
  • +
  • Latest SVN: http://jqueryjs.googlecode.com/svn/trunk/plugins/bgiframe/
  • +
  • Tagged Versions in SVN: Latest SVN: http://jqueryjs.googlecode.com/svn/tags/plugins/bgiframe/
  • +
+
+ +
Suggestions? Bugs? Patches?
+
+

Feel free to make any suggestions, bug reports or add any patches via the project page.

+
+
+

The bgiframe plugin is authored by Brandon Aaron (http://brandonaaron.net/)

+
+
+ + \ No newline at end of file diff --git a/static/development-bundle/external/bgiframe/jquery.bgiframe.js b/static/development-bundle/external/bgiframe/jquery.bgiframe.js new file mode 100644 index 0000000..3a01f6e --- /dev/null +++ b/static/development-bundle/external/bgiframe/jquery.bgiframe.js @@ -0,0 +1,100 @@ +/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net) + * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) + * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. + * + * $LastChangedDate: 2007-07-21 18:44:59 -0500 (Sat, 21 Jul 2007) $ + * $Rev: 2446 $ + * + * Version 2.1.1 + */ + +(function($){ + +/** + * The bgiframe is chainable and applies the iframe hack to get + * around zIndex issues in IE6. It will only apply itself in IE6 + * and adds a class to the iframe called 'bgiframe'. The iframe + * is appeneded as the first child of the matched element(s) + * with a tabIndex and zIndex of -1. + * + * By default the plugin will take borders, sized with pixel units, + * into account. If a different unit is used for the border's width, + * then you will need to use the top and left settings as explained below. + * + * NOTICE: This plugin has been reported to cause perfromance problems + * when used on elements that change properties (like width, height and + * opacity) a lot in IE6. Most of these problems have been caused by + * the expressions used to calculate the elements width, height and + * borders. Some have reported it is due to the opacity filter. All + * these settings can be changed if needed as explained below. + * + * @example $('div').bgiframe(); + * @before

Paragraph

+ * @result
' : ''); + inst._keyEvent = false; + return html; + }, + + /* Generate the month and year header. */ + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, + selectedDate, secondary, monthNames, monthNamesShort) { + minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate); + var changeMonth = this._get(inst, 'changeMonth'); + var changeYear = this._get(inst, 'changeYear'); + var showMonthAfterYear = this._get(inst, 'showMonthAfterYear'); + var html = '
'; + var monthHtml = ''; + // month selection + if (secondary || !changeMonth) + monthHtml += '' + monthNames[drawMonth] + ' '; + else { + var inMinYear = (minDate && minDate.getFullYear() == drawYear); + var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); + monthHtml += ''; + } + if (!showMonthAfterYear) + html += monthHtml + ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? ' ' : ''); + // year selection + if (secondary || !changeYear) + html += '' + drawYear + ''; + else { + // determine range of years to display + var years = this._get(inst, 'yearRange').split(':'); + var year = 0; + var endYear = 0; + if (years.length != 2) { + year = drawYear - 10; + endYear = drawYear + 10; + } else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') { + year = drawYear + parseInt(years[0], 10); + endYear = drawYear + parseInt(years[1], 10); + } else { + year = parseInt(years[0], 10); + endYear = parseInt(years[1], 10); + } + year = (minDate ? Math.max(year, minDate.getFullYear()) : year); + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); + html += ''; + } + if (showMonthAfterYear) + html += (secondary || changeMonth || changeYear ? ' ' : '') + monthHtml; + html += '
'; // Close datepicker_header + return html; + }, + + /* Adjust one of the date sub-fields. */ + _adjustInstDate: function(inst, offset, period) { + var year = inst.drawYear + (period == 'Y' ? offset : 0); + var month = inst.drawMonth + (period == 'M' ? offset : 0); + var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + + (period == 'D' ? offset : 0); + var date = this._daylightSavingAdjust(new Date(year, month, day)); + // ensure it is within the bounds set + var minDate = this._getMinMaxDate(inst, 'min', true); + var maxDate = this._getMinMaxDate(inst, 'max'); + date = (minDate && date < minDate ? minDate : date); + date = (maxDate && date > maxDate ? maxDate : date); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + if (period == 'M' || period == 'Y') + this._notifyChange(inst); + }, + + /* Notify change of month/year. */ + _notifyChange: function(inst) { + var onChange = this._get(inst, 'onChangeMonthYear'); + if (onChange) + onChange.apply((inst.input ? inst.input[0] : null), + [inst.selectedYear, inst.selectedMonth + 1, inst]); + }, + + /* Determine the number of months to show. */ + _getNumberOfMonths: function(inst) { + var numMonths = this._get(inst, 'numberOfMonths'); + return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths)); + }, + + /* Determine the current maximum date - ensure no time components are set - may be overridden for a range. */ + _getMinMaxDate: function(inst, minMax, checkRange) { + var date = this._determineDate(this._get(inst, minMax + 'Date'), null); + return (!checkRange || !inst.rangeStart ? date : + (!date || inst.rangeStart > date ? inst.rangeStart : date)); + }, + + /* Find the number of days in a given month. */ + _getDaysInMonth: function(year, month) { + return 32 - new Date(year, month, 32).getDate(); + }, + + /* Find the day of the week of the first of a month. */ + _getFirstDayOfMonth: function(year, month) { + return new Date(year, month, 1).getDay(); + }, + + /* Determines if we should allow a "next/prev" month display change. */ + _canAdjustMonth: function(inst, offset, curYear, curMonth) { + var numMonths = this._getNumberOfMonths(inst); + var date = this._daylightSavingAdjust(new Date( + curYear, curMonth + (offset < 0 ? offset : numMonths[1]), 1)); + if (offset < 0) + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); + return this._isInRange(inst, date); + }, + + /* Is the given date in the accepted range? */ + _isInRange: function(inst, date) { + // during range selection, use minimum of selected date and range start + var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust( + new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay))); + newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate); + var minDate = newMinDate || this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); + return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate)); + }, + + /* Provide the configuration settings for formatting/parsing. */ + _getFormatConfig: function(inst) { + var shortYearCutoff = this._get(inst, 'shortYearCutoff'); + shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + return {shortYearCutoff: shortYearCutoff, + dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'), + monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')}; + }, + + /* Format the given date for display. */ + _formatDate: function(inst, day, month, year) { + if (!day) { + inst.currentDay = inst.selectedDay; + inst.currentMonth = inst.selectedMonth; + inst.currentYear = inst.selectedYear; + } + var date = (day ? (typeof day == 'object' ? day : + this._daylightSavingAdjust(new Date(year, month, day))) : + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst)); + } +}); + +/* jQuery extend now ignores nulls! */ +function extendRemove(target, props) { + $.extend(target, props); + for (var name in props) + if (props[name] == null || props[name] == undefined) + target[name] = props[name]; + return target; +}; + +/* Determine whether an object is an array. */ +function isArray(a) { + return (a && (($.browser.safari && typeof a == 'object' && a.length) || + (a.constructor && a.constructor.toString().match(/\Array\(\)/)))); +}; + +/* Invoke the datepicker functionality. + @param options string - a command, optionally followed by additional parameters or + Object - settings for attaching new datepicker functionality + @return jQuery object */ +$.fn.datepicker = function(options){ + + /* Initialise the date picker. */ + if (!$.datepicker.initialized) { + $(document).mousedown($.datepicker._checkExternalClick). + find('body').append($.datepicker.dpDiv); + $.datepicker.initialized = true; + } + + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate')) + return $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this[0]].concat(otherArgs)); + if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') + return $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this[0]].concat(otherArgs)); + return this.each(function() { + typeof options == 'string' ? + $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this].concat(otherArgs)) : + $.datepicker._attachDatepicker(this, options); + }); +}; + +$.datepicker = new Datepicker(); // singleton instance +$.datepicker.initialized = false; +$.datepicker.uuid = new Date().getTime(); +$.datepicker.version = "1.7.2"; + +// Workaround for #4055 +// Add another global to avoid noConflict issues with inline event handlers +window.DP_jQuery = $; + +})(jQuery); +/* + * jQuery UI Progressbar 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * ui.core.js + */ +(function($) { + +$.widget("ui.progressbar", { + + _init: function() { + + this.element + .addClass("ui-progressbar" + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all") + .attr({ + role: "progressbar", + "aria-valuemin": this._valueMin(), + "aria-valuemax": this._valueMax(), + "aria-valuenow": this._value() + }); + + this.valueDiv = $('
').appendTo(this.element); + + this._refreshValue(); + + }, + + destroy: function() { + + this.element + .removeClass("ui-progressbar" + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all") + .removeAttr("role") + .removeAttr("aria-valuemin") + .removeAttr("aria-valuemax") + .removeAttr("aria-valuenow") + .removeData("progressbar") + .unbind(".progressbar"); + + this.valueDiv.remove(); + + $.widget.prototype.destroy.apply(this, arguments); + + }, + + value: function(newValue) { + if (newValue === undefined) { + return this._value(); + } + + this._setData('value', newValue); + return this; + }, + + _setData: function(key, value) { + + switch (key) { + case 'value': + this.options.value = value; + this._refreshValue(); + this._trigger('change', null, {}); + break; + } + + $.widget.prototype._setData.apply(this, arguments); + + }, + + _value: function() { + + var val = this.options.value; + if (val < this._valueMin()) val = this._valueMin(); + if (val > this._valueMax()) val = this._valueMax(); + + return val; + + }, + + _valueMin: function() { + var valueMin = 0; + return valueMin; + }, + + _valueMax: function() { + var valueMax = 100; + return valueMax; + }, + + _refreshValue: function() { + var value = this.value(); + this.valueDiv[value == this._valueMax() ? 'addClass' : 'removeClass']("ui-corner-right"); + this.valueDiv.width(value + '%'); + this.element.attr("aria-valuenow", value); + } + +}); + +$.extend($.ui.progressbar, { + version: "1.7.2", + defaults: { + value: 0 + } +}); + +})(jQuery); +/* + * jQuery UI Effects 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/ + */ +;jQuery.effects || (function($) { + +$.effects = { + version: "1.7.2", + + // Saves a set of properties in a data storage + save: function(element, set) { + for(var i=0; i < set.length; i++) { + if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]); + } + }, + + // Restores a set of previously saved properties from a data storage + restore: function(element, set) { + for(var i=0; i < set.length; i++) { + if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i])); + } + }, + + setMode: function(el, mode) { + if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle + return mode; + }, + + getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value + // this should be a little more flexible in the future to handle a string & hash + var y, x; + switch (origin[0]) { + case 'top': y = 0; break; + case 'middle': y = 0.5; break; + case 'bottom': y = 1; break; + default: y = origin[0] / original.height; + }; + switch (origin[1]) { + case 'left': x = 0; break; + case 'center': x = 0.5; break; + case 'right': x = 1; break; + default: x = origin[1] / original.width; + }; + return {x: x, y: y}; + }, + + // Wraps the element around a wrapper that copies position properties + createWrapper: function(element) { + + //if the element is already wrapped, return it + if (element.parent().is('.ui-effects-wrapper')) + return element.parent(); + + //Cache width,height and float properties of the element, and create a wrapper around it + var props = { width: element.outerWidth(true), height: element.outerHeight(true), 'float': element.css('float') }; + element.wrap('
'); + var wrapper = element.parent(); + + //Transfer the positioning of the element to the wrapper + if (element.css('position') == 'static') { + wrapper.css({ position: 'relative' }); + element.css({ position: 'relative'} ); + } else { + var top = element.css('top'); if(isNaN(parseInt(top,10))) top = 'auto'; + var left = element.css('left'); if(isNaN(parseInt(left,10))) left = 'auto'; + wrapper.css({ position: element.css('position'), top: top, left: left, zIndex: element.css('z-index') }).show(); + element.css({position: 'relative', top: 0, left: 0 }); + } + + wrapper.css(props); + return wrapper; + }, + + removeWrapper: function(element) { + if (element.parent().is('.ui-effects-wrapper')) + return element.parent().replaceWith(element); + return element; + }, + + setTransition: function(element, list, factor, value) { + value = value || {}; + $.each(list, function(i, x){ + unit = element.cssUnit(x); + if (unit[0] > 0) value[x] = unit[0] * factor + unit[1]; + }); + return value; + }, + + //Base function to animate from one class to another in a seamless transition + animateClass: function(value, duration, easing, callback) { + + var cb = (typeof easing == "function" ? easing : (callback ? callback : null)); + var ea = (typeof easing == "string" ? easing : null); + + return this.each(function() { + + var offset = {}; var that = $(this); var oldStyleAttr = that.attr("style") || ''; + if(typeof oldStyleAttr == 'object') oldStyleAttr = oldStyleAttr["cssText"]; /* Stupidly in IE, style is a object.. */ + if(value.toggle) { that.hasClass(value.toggle) ? value.remove = value.toggle : value.add = value.toggle; } + + //Let's get a style offset + var oldStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle)); + if(value.add) that.addClass(value.add); if(value.remove) that.removeClass(value.remove); + var newStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle)); + if(value.add) that.removeClass(value.add); if(value.remove) that.addClass(value.remove); + + // The main function to form the object for animation + for(var n in newStyle) { + if( typeof newStyle[n] != "function" && newStyle[n] /* No functions and null properties */ + && n.indexOf("Moz") == -1 && n.indexOf("length") == -1 /* No mozilla spezific render properties. */ + && newStyle[n] != oldStyle[n] /* Only values that have changed are used for the animation */ + && (n.match(/color/i) || (!n.match(/color/i) && !isNaN(parseInt(newStyle[n],10)))) /* Only things that can be parsed to integers or colors */ + && (oldStyle.position != "static" || (oldStyle.position == "static" && !n.match(/left|top|bottom|right/))) /* No need for positions when dealing with static positions */ + ) offset[n] = newStyle[n]; + } + + that.animate(offset, duration, ea, function() { // Animate the newly constructed offset object + // Change style attribute back to original. For stupid IE, we need to clear the damn object. + if(typeof $(this).attr("style") == 'object') { $(this).attr("style")["cssText"] = ""; $(this).attr("style")["cssText"] = oldStyleAttr; } else $(this).attr("style", oldStyleAttr); + if(value.add) $(this).addClass(value.add); if(value.remove) $(this).removeClass(value.remove); + if(cb) cb.apply(this, arguments); + }); + + }); + } +}; + + +function _normalizeArguments(a, m) { + + var o = a[1] && a[1].constructor == Object ? a[1] : {}; if(m) o.mode = m; + var speed = a[1] && a[1].constructor != Object ? a[1] : (o.duration ? o.duration : a[2]); //either comes from options.duration or the secon/third argument + speed = $.fx.off ? 0 : typeof speed === "number" ? speed : $.fx.speeds[speed] || $.fx.speeds._default; + var callback = o.callback || ( $.isFunction(a[1]) && a[1] ) || ( $.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] ); + + return [a[0], o, speed, callback]; + +} + +//Extend the methods of jQuery +$.fn.extend({ + + //Save old methods + _show: $.fn.show, + _hide: $.fn.hide, + __toggle: $.fn.toggle, + _addClass: $.fn.addClass, + _removeClass: $.fn.removeClass, + _toggleClass: $.fn.toggleClass, + + // New effect methods + effect: function(fx, options, speed, callback) { + return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: options || {}, duration: speed, callback: callback }) : null; + }, + + show: function() { + if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0]))) + return this._show.apply(this, arguments); + else { + return this.effect.apply(this, _normalizeArguments(arguments, 'show')); + } + }, + + hide: function() { + if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0]))) + return this._hide.apply(this, arguments); + else { + return this.effect.apply(this, _normalizeArguments(arguments, 'hide')); + } + }, + + toggle: function(){ + if(!arguments[0] || + (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) || + ($.isFunction(arguments[0]) || typeof arguments[0] == 'boolean')) { + return this.__toggle.apply(this, arguments); + } else { + return this.effect.apply(this, _normalizeArguments(arguments, 'toggle')); + } + }, + + addClass: function(classNames, speed, easing, callback) { + return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames); + }, + removeClass: function(classNames,speed,easing,callback) { + return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames); + }, + toggleClass: function(classNames,speed,easing,callback) { + return ( (typeof speed !== "boolean") && speed ) ? $.effects.animateClass.apply(this, [{ toggle: classNames },speed,easing,callback]) : this._toggleClass(classNames, speed); + }, + morph: function(remove,add,speed,easing,callback) { + return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]); + }, + switchClass: function() { + return this.morph.apply(this, arguments); + }, + + // helper functions + cssUnit: function(key) { + var style = this.css(key), val = []; + $.each( ['em','px','%','pt'], function(i, unit){ + if(style.indexOf(unit) > 0) + val = [parseFloat(style), unit]; + }); + return val; + } +}); + +/* + * jQuery Color Animations + * Copyright 2007 John Resig + * Released under the MIT and GPL licenses. + */ + +// We override the animation for all of these color styles +$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){ + $.fx.step[attr] = function(fx) { + if ( fx.state == 0 ) { + fx.start = getColor( fx.elem, attr ); + fx.end = getRGB( fx.end ); + } + + fx.elem.style[attr] = "rgb(" + [ + Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0],10), 255), 0), + Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1],10), 255), 0), + Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2],10), 255), 0) + ].join(",") + ")"; + }; +}); + +// Color Conversion functions from highlightFade +// By Blair Mitchelmore +// http://jquery.offput.ca/highlightFade/ + +// Parse strings looking for color tuples [255,255,255] +function getRGB(color) { + var result; + + // Check if we're already dealing with an array of colors + if ( color && color.constructor == Array && color.length == 3 ) + return color; + + // Look for rgb(num,num,num) + if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)) + return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)]; + + // Look for rgb(num%,num%,num%) + if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)) + return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55]; + + // Look for #a0b1c2 + if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) + return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)]; + + // Look for #fff + if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) + return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)]; + + // Look for rgba(0, 0, 0, 0) == transparent in Safari 3 + if (result = /rgba\(0, 0, 0, 0\)/.exec(color)) + return colors['transparent']; + + // Otherwise, we're most likely dealing with a named color + return colors[$.trim(color).toLowerCase()]; +} + +function getColor(elem, attr) { + var color; + + do { + color = $.curCSS(elem, attr); + + // Keep going until we find an element that has color, or we hit the body + if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") ) + break; + + attr = "backgroundColor"; + } while ( elem = elem.parentNode ); + + return getRGB(color); +}; + +// Some named colors to work with +// From Interface by Stefan Petre +// http://interface.eyecon.ro/ + +var colors = { + aqua:[0,255,255], + azure:[240,255,255], + beige:[245,245,220], + black:[0,0,0], + blue:[0,0,255], + brown:[165,42,42], + cyan:[0,255,255], + darkblue:[0,0,139], + darkcyan:[0,139,139], + darkgrey:[169,169,169], + darkgreen:[0,100,0], + darkkhaki:[189,183,107], + darkmagenta:[139,0,139], + darkolivegreen:[85,107,47], + darkorange:[255,140,0], + darkorchid:[153,50,204], + darkred:[139,0,0], + darksalmon:[233,150,122], + darkviolet:[148,0,211], + fuchsia:[255,0,255], + gold:[255,215,0], + green:[0,128,0], + indigo:[75,0,130], + khaki:[240,230,140], + lightblue:[173,216,230], + lightcyan:[224,255,255], + lightgreen:[144,238,144], + lightgrey:[211,211,211], + lightpink:[255,182,193], + lightyellow:[255,255,224], + lime:[0,255,0], + magenta:[255,0,255], + maroon:[128,0,0], + navy:[0,0,128], + olive:[128,128,0], + orange:[255,165,0], + pink:[255,192,203], + purple:[128,0,128], + violet:[128,0,128], + red:[255,0,0], + silver:[192,192,192], + white:[255,255,255], + yellow:[255,255,0], + transparent: [255,255,255] +}; + +/* + * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ + * + * Uses the built in easing capabilities added In jQuery 1.1 + * to offer multiple easing options + * + * TERMS OF USE - jQuery Easing + * + * Open source under the BSD License. + * + * Copyright 2008 George McGinley Smith + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * +*/ + +// t: current time, b: begInnIng value, c: change In value, d: duration +$.easing.jswing = $.easing.swing; + +$.extend($.easing, +{ + def: 'easeOutQuad', + swing: function (x, t, b, c, d) { + //alert($.easing.default); + return $.easing[$.easing.def](x, t, b, c, d); + }, + easeInQuad: function (x, t, b, c, d) { + return c*(t/=d)*t + b; + }, + easeOutQuad: function (x, t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + easeInOutQuad: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t + b; + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + easeInCubic: function (x, t, b, c, d) { + return c*(t/=d)*t*t + b; + }, + easeOutCubic: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t + 1) + b; + }, + easeInOutCubic: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t + b; + return c/2*((t-=2)*t*t + 2) + b; + }, + easeInQuart: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + easeOutQuart: function (x, t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + easeInOutQuart: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t + b; + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + easeInQuint: function (x, t, b, c, d) { + return c*(t/=d)*t*t*t*t + b; + }, + easeOutQuint: function (x, t, b, c, d) { + return c*((t=t/d-1)*t*t*t*t + 1) + b; + }, + easeInOutQuint: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; + return c/2*((t-=2)*t*t*t*t + 2) + b; + }, + easeInSine: function (x, t, b, c, d) { + return -c * Math.cos(t/d * (Math.PI/2)) + c + b; + }, + easeOutSine: function (x, t, b, c, d) { + return c * Math.sin(t/d * (Math.PI/2)) + b; + }, + easeInOutSine: function (x, t, b, c, d) { + return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; + }, + easeInExpo: function (x, t, b, c, d) { + return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; + }, + easeOutExpo: function (x, t, b, c, d) { + return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; + }, + easeInOutExpo: function (x, t, b, c, d) { + if (t==0) return b; + if (t==d) return b+c; + if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; + return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; + }, + easeInCirc: function (x, t, b, c, d) { + return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; + }, + easeOutCirc: function (x, t, b, c, d) { + return c * Math.sqrt(1 - (t=t/d-1)*t) + b; + }, + easeInOutCirc: function (x, t, b, c, d) { + if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; + return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; + }, + easeInElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + easeOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + easeInOutElastic: function (x, t, b, c, d) { + var s=1.70158;var p=0;var a=c; + if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); + if (a < Math.abs(c)) { a=c; var s=p/4; } + else var s = p/(2*Math.PI) * Math.asin (c/a); + if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + easeInBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + easeOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + easeInOutBack: function (x, t, b, c, d, s) { + if (s == undefined) s = 1.70158; + if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + easeInBounce: function (x, t, b, c, d) { + return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b; + }, + easeOutBounce: function (x, t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } else { + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + } + }, + easeInOutBounce: function (x, t, b, c, d) { + if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; + return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}); + +/* + * + * TERMS OF USE - EASING EQUATIONS + * + * Open source under the BSD License. + * + * Copyright 2001 Robert Penner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the author nor the names of contributors may be used to endorse + * or promote products derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +})(jQuery); +/* + * jQuery UI Effects Blind 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Blind + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.blind = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this), props = ['position','top','left']; + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode + var direction = o.options.direction || 'vertical'; // Default direction + + // Adjust + $.effects.save(el, props); el.show(); // Save & Show + var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper + var ref = (direction == 'vertical') ? 'height' : 'width'; + var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width(); + if(mode == 'show') wrapper.css(ref, 0); // Shift + + // Animation + var animation = {}; + animation[ref] = mode == 'show' ? distance : 0; + + // Animate + wrapper.animate(animation, o.duration, o.options.easing, function() { + if(mode == 'hide') el.hide(); // Hide + $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore + if(o.callback) o.callback.apply(el[0], arguments); // Callback + el.dequeue(); + }); + + }); + +}; + +})(jQuery); +/* + * jQuery UI Effects Bounce 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Bounce + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.bounce = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this), props = ['position','top','left']; + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode + var direction = o.options.direction || 'up'; // Default direction + var distance = o.options.distance || 20; // Default distance + var times = o.options.times || 5; // Default # of times + var speed = o.duration || 250; // Default speed per bounce + if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE + + // Adjust + $.effects.save(el, props); el.show(); // Save & Show + $.effects.createWrapper(el); // Create Wrapper + var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left'; + var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg'; + var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 3 : el.outerWidth({margin:true}) / 3); + if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift + if (mode == 'hide') distance = distance / (times * 2); + if (mode != 'hide') times--; + + // Animate + if (mode == 'show') { // Show Bounce + var animation = {opacity: 1}; + animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance; + el.animate(animation, speed / 2, o.options.easing); + distance = distance / 2; + times--; + }; + for (var i = 0; i < times; i++) { // Bounces + var animation1 = {}, animation2 = {}; + animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance; + animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance; + el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing); + distance = (mode == 'hide') ? distance * 2 : distance / 2; + }; + if (mode == 'hide') { // Last Bounce + var animation = {opacity: 0}; + animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance; + el.animate(animation, speed / 2, o.options.easing, function(){ + el.hide(); // Hide + $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore + if(o.callback) o.callback.apply(this, arguments); // Callback + }); + } else { + var animation1 = {}, animation2 = {}; + animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance; + animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance; + el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){ + $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore + if(o.callback) o.callback.apply(this, arguments); // Callback + }); + }; + el.queue('fx', function() { el.dequeue(); }); + el.dequeue(); + }); + +}; + +})(jQuery); +/* + * jQuery UI Effects Clip 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Clip + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.clip = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this), props = ['position','top','left','height','width']; + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode + var direction = o.options.direction || 'vertical'; // Default direction + + // Adjust + $.effects.save(el, props); el.show(); // Save & Show + var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper + var animate = el[0].tagName == 'IMG' ? wrapper : el; + var ref = { + size: (direction == 'vertical') ? 'height' : 'width', + position: (direction == 'vertical') ? 'top' : 'left' + }; + var distance = (direction == 'vertical') ? animate.height() : animate.width(); + if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift + + // Animation + var animation = {}; + animation[ref.size] = mode == 'show' ? distance : 0; + animation[ref.position] = mode == 'show' ? 0 : distance / 2; + + // Animate + animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() { + if(mode == 'hide') el.hide(); // Hide + $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore + if(o.callback) o.callback.apply(el[0], arguments); // Callback + el.dequeue(); + }}); + + }); + +}; + +})(jQuery); +/* + * jQuery UI Effects Drop 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Drop + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.drop = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this), props = ['position','top','left','opacity']; + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode + var direction = o.options.direction || 'left'; // Default Direction + + // Adjust + $.effects.save(el, props); el.show(); // Save & Show + $.effects.createWrapper(el); // Create Wrapper + var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left'; + var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg'; + var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 2 : el.outerWidth({margin:true}) / 2); + if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift + + // Animation + var animation = {opacity: mode == 'show' ? 1 : 0}; + animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance; + + // Animate + el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() { + if(mode == 'hide') el.hide(); // Hide + $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore + if(o.callback) o.callback.apply(this, arguments); // Callback + el.dequeue(); + }}); + + }); + +}; + +})(jQuery); +/* + * jQuery UI Effects Explode 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Explode + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.explode = function(o) { + + return this.queue(function() { + + var rows = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3; + var cells = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3; + + o.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode; + var el = $(this).show().css('visibility', 'hidden'); + var offset = el.offset(); + + //Substract the margins - not fixing the problem yet. + offset.top -= parseInt(el.css("marginTop"),10) || 0; + offset.left -= parseInt(el.css("marginLeft"),10) || 0; + + var width = el.outerWidth(true); + var height = el.outerHeight(true); + + for(var i=0;i
') + .css({ + position: 'absolute', + visibility: 'visible', + left: -j*(width/cells), + top: -i*(height/rows) + }) + .parent() + .addClass('ui-effects-explode') + .css({ + position: 'absolute', + overflow: 'hidden', + width: width/cells, + height: height/rows, + left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? (j-Math.floor(cells/2))*(width/cells) : 0), + top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? (i-Math.floor(rows/2))*(height/rows) : 0), + opacity: o.options.mode == 'show' ? 0 : 1 + }).animate({ + left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? 0 : (j-Math.floor(cells/2))*(width/cells)), + top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? 0 : (i-Math.floor(rows/2))*(height/rows)), + opacity: o.options.mode == 'show' ? 1 : 0 + }, o.duration || 500); + } + } + + // Set a timeout, to call the callback approx. when the other animations have finished + setTimeout(function() { + + o.options.mode == 'show' ? el.css({ visibility: 'visible' }) : el.css({ visibility: 'visible' }).hide(); + if(o.callback) o.callback.apply(el[0]); // Callback + el.dequeue(); + + $('div.ui-effects-explode').remove(); + + }, o.duration || 500); + + + }); + +}; + +})(jQuery); +/* + * jQuery UI Effects Fold 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.fold = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this), props = ['position','top','left']; + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode + var size = o.options.size || 15; // Default fold size + var horizFirst = !(!o.options.horizFirst); // Ensure a boolean value + var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2; + + // Adjust + $.effects.save(el, props); el.show(); // Save & Show + var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper + var widthFirst = ((mode == 'show') != horizFirst); + var ref = widthFirst ? ['width', 'height'] : ['height', 'width']; + var distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()]; + var percent = /([0-9]+)%/.exec(size); + if(percent) size = parseInt(percent[1],10) / 100 * distance[mode == 'hide' ? 0 : 1]; + if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift + + // Animation + var animation1 = {}, animation2 = {}; + animation1[ref[0]] = mode == 'show' ? distance[0] : size; + animation2[ref[1]] = mode == 'show' ? distance[1] : 0; + + // Animate + wrapper.animate(animation1, duration, o.options.easing) + .animate(animation2, duration, o.options.easing, function() { + if(mode == 'hide') el.hide(); // Hide + $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore + if(o.callback) o.callback.apply(el[0], arguments); // Callback + el.dequeue(); + }); + + }); + +}; + +})(jQuery); +/* + * jQuery UI Effects Highlight 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.highlight = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this), props = ['backgroundImage','backgroundColor','opacity']; + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode + var color = o.options.color || "#ffff99"; // Default highlight color + var oldColor = el.css("backgroundColor"); + + // Adjust + $.effects.save(el, props); el.show(); // Save & Show + el.css({backgroundImage: 'none', backgroundColor: color}); // Shift + + // Animation + var animation = {backgroundColor: oldColor }; + if (mode == "hide") animation['opacity'] = 0; + + // Animate + el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() { + if(mode == "hide") el.hide(); + $.effects.restore(el, props); + if (mode == "show" && $.browser.msie) this.style.removeAttribute('filter'); + if(o.callback) o.callback.apply(this, arguments); + el.dequeue(); + }}); + + }); + +}; + +})(jQuery); +/* + * jQuery UI Effects Pulsate 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.pulsate = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this); + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode + var times = o.options.times || 5; // Default # of times + var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2; + + // Adjust + if (mode == 'hide') times--; + if (el.is(':hidden')) { // Show fadeIn + el.css('opacity', 0); + el.show(); // Show + el.animate({opacity: 1}, duration, o.options.easing); + times = times-2; + } + + // Animate + for (var i = 0; i < times; i++) { // Pulsate + el.animate({opacity: 0}, duration, o.options.easing).animate({opacity: 1}, duration, o.options.easing); + }; + if (mode == 'hide') { // Last Pulse + el.animate({opacity: 0}, duration, o.options.easing, function(){ + el.hide(); // Hide + if(o.callback) o.callback.apply(this, arguments); // Callback + }); + } else { + el.animate({opacity: 0}, duration, o.options.easing).animate({opacity: 1}, duration, o.options.easing, function(){ + if(o.callback) o.callback.apply(this, arguments); // Callback + }); + }; + el.queue('fx', function() { el.dequeue(); }); + el.dequeue(); + }); + +}; + +})(jQuery); +/* + * jQuery UI Effects Scale 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Scale + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.puff = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this); + + // Set options + var options = $.extend(true, {}, o.options); + var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode + var percent = parseInt(o.options.percent,10) || 150; // Set default puff percent + options.fade = true; // It's not a puff if it doesn't fade! :) + var original = {height: el.height(), width: el.width()}; // Save original + + // Adjust + var factor = percent / 100; + el.from = (mode == 'hide') ? original : {height: original.height * factor, width: original.width * factor}; + + // Animation + options.from = el.from; + options.percent = (mode == 'hide') ? percent : 100; + options.mode = mode; + + // Animate + el.effect('scale', options, o.duration, o.callback); + el.dequeue(); + }); + +}; + +$.effects.scale = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this); + + // Set options + var options = $.extend(true, {}, o.options); + var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode + var percent = parseInt(o.options.percent,10) || (parseInt(o.options.percent,10) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent + var direction = o.options.direction || 'both'; // Set default axis + var origin = o.options.origin; // The origin of the scaling + if (mode != 'effect') { // Set default origin and restore for show/hide + options.origin = origin || ['middle','center']; + options.restore = true; + } + var original = {height: el.height(), width: el.width()}; // Save original + el.from = o.options.from || (mode == 'show' ? {height: 0, width: 0} : original); // Default from state + + // Adjust + var factor = { // Set scaling factor + y: direction != 'horizontal' ? (percent / 100) : 1, + x: direction != 'vertical' ? (percent / 100) : 1 + }; + el.to = {height: original.height * factor.y, width: original.width * factor.x}; // Set to state + + if (o.options.fade) { // Fade option to support puff + if (mode == 'show') {el.from.opacity = 0; el.to.opacity = 1;}; + if (mode == 'hide') {el.from.opacity = 1; el.to.opacity = 0;}; + }; + + // Animation + options.from = el.from; options.to = el.to; options.mode = mode; + + // Animate + el.effect('size', options, o.duration, o.callback); + el.dequeue(); + }); + +}; + +$.effects.size = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this), props = ['position','top','left','width','height','overflow','opacity']; + var props1 = ['position','top','left','overflow','opacity']; // Always restore + var props2 = ['width','height','overflow']; // Copy for children + var cProps = ['fontSize']; + var vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom']; + var hProps = ['borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight']; + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode + var restore = o.options.restore || false; // Default restore + var scale = o.options.scale || 'both'; // Default scale mode + var origin = o.options.origin; // The origin of the sizing + var original = {height: el.height(), width: el.width()}; // Save original + el.from = o.options.from || original; // Default from state + el.to = o.options.to || original; // Default to state + // Adjust + if (origin) { // Calculate baseline shifts + var baseline = $.effects.getBaseline(origin, original); + el.from.top = (original.height - el.from.height) * baseline.y; + el.from.left = (original.width - el.from.width) * baseline.x; + el.to.top = (original.height - el.to.height) * baseline.y; + el.to.left = (original.width - el.to.width) * baseline.x; + }; + var factor = { // Set scaling factor + from: {y: el.from.height / original.height, x: el.from.width / original.width}, + to: {y: el.to.height / original.height, x: el.to.width / original.width} + }; + if (scale == 'box' || scale == 'both') { // Scale the css box + if (factor.from.y != factor.to.y) { // Vertical props scaling + props = props.concat(vProps); + el.from = $.effects.setTransition(el, vProps, factor.from.y, el.from); + el.to = $.effects.setTransition(el, vProps, factor.to.y, el.to); + }; + if (factor.from.x != factor.to.x) { // Horizontal props scaling + props = props.concat(hProps); + el.from = $.effects.setTransition(el, hProps, factor.from.x, el.from); + el.to = $.effects.setTransition(el, hProps, factor.to.x, el.to); + }; + }; + if (scale == 'content' || scale == 'both') { // Scale the content + if (factor.from.y != factor.to.y) { // Vertical props scaling + props = props.concat(cProps); + el.from = $.effects.setTransition(el, cProps, factor.from.y, el.from); + el.to = $.effects.setTransition(el, cProps, factor.to.y, el.to); + }; + }; + $.effects.save(el, restore ? props : props1); el.show(); // Save & Show + $.effects.createWrapper(el); // Create Wrapper + el.css('overflow','hidden').css(el.from); // Shift + + // Animate + if (scale == 'content' || scale == 'both') { // Scale the children + vProps = vProps.concat(['marginTop','marginBottom']).concat(cProps); // Add margins/font-size + hProps = hProps.concat(['marginLeft','marginRight']); // Add margins + props2 = props.concat(vProps).concat(hProps); // Concat + el.find("*[width]").each(function(){ + child = $(this); + if (restore) $.effects.save(child, props2); + var c_original = {height: child.height(), width: child.width()}; // Save original + child.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x}; + child.to = {height: c_original.height * factor.to.y, width: c_original.width * factor.to.x}; + if (factor.from.y != factor.to.y) { // Vertical props scaling + child.from = $.effects.setTransition(child, vProps, factor.from.y, child.from); + child.to = $.effects.setTransition(child, vProps, factor.to.y, child.to); + }; + if (factor.from.x != factor.to.x) { // Horizontal props scaling + child.from = $.effects.setTransition(child, hProps, factor.from.x, child.from); + child.to = $.effects.setTransition(child, hProps, factor.to.x, child.to); + }; + child.css(child.from); // Shift children + child.animate(child.to, o.duration, o.options.easing, function(){ + if (restore) $.effects.restore(child, props2); // Restore children + }); // Animate children + }); + }; + + // Animate + el.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() { + if(mode == 'hide') el.hide(); // Hide + $.effects.restore(el, restore ? props : props1); $.effects.removeWrapper(el); // Restore + if(o.callback) o.callback.apply(this, arguments); // Callback + el.dequeue(); + }}); + + }); + +}; + +})(jQuery); +/* + * jQuery UI Effects Shake 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Shake + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.shake = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this), props = ['position','top','left']; + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode + var direction = o.options.direction || 'left'; // Default direction + var distance = o.options.distance || 20; // Default distance + var times = o.options.times || 3; // Default # of times + var speed = o.duration || o.options.duration || 140; // Default speed per shake + + // Adjust + $.effects.save(el, props); el.show(); // Save & Show + $.effects.createWrapper(el); // Create Wrapper + var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left'; + var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg'; + + // Animation + var animation = {}, animation1 = {}, animation2 = {}; + animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance; + animation1[ref] = (motion == 'pos' ? '+=' : '-=') + distance * 2; + animation2[ref] = (motion == 'pos' ? '-=' : '+=') + distance * 2; + + // Animate + el.animate(animation, speed, o.options.easing); + for (var i = 1; i < times; i++) { // Shakes + el.animate(animation1, speed, o.options.easing).animate(animation2, speed, o.options.easing); + }; + el.animate(animation1, speed, o.options.easing). + animate(animation, speed / 2, o.options.easing, function(){ // Last shake + $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore + if(o.callback) o.callback.apply(this, arguments); // Callback + }); + el.queue('fx', function() { el.dequeue(); }); + el.dequeue(); + }); + +}; + +})(jQuery); +/* + * jQuery UI Effects Slide 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Slide + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.slide = function(o) { + + return this.queue(function() { + + // Create element + var el = $(this), props = ['position','top','left']; + + // Set options + var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode + var direction = o.options.direction || 'left'; // Default Direction + + // Adjust + $.effects.save(el, props); el.show(); // Save & Show + $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper + var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left'; + var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg'; + var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true})); + if (mode == 'show') el.css(ref, motion == 'pos' ? -distance : distance); // Shift + + // Animation + var animation = {}; + animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance; + + // Animate + el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() { + if(mode == 'hide') el.hide(); // Hide + $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore + if(o.callback) o.callback.apply(this, arguments); // Callback + el.dequeue(); + }}); + + }); + +}; + +})(jQuery); +/* + * jQuery UI Effects Transfer 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Transfer + * + * Depends: + * effects.core.js + */ +(function($) { + +$.effects.transfer = function(o) { + return this.queue(function() { + var elem = $(this), + target = $(o.options.to), + endPosition = target.offset(), + animation = { + top: endPosition.top, + left: endPosition.left, + height: target.innerHeight(), + width: target.innerWidth() + }, + startPosition = elem.offset(), + transfer = $('
') + .appendTo(document.body) + .addClass(o.options.className) + .css({ + top: startPosition.top, + left: startPosition.left, + height: elem.innerHeight(), + width: elem.innerWidth(), + position: 'absolute' + }) + .animate(animation, o.duration, o.options.easing, function() { + transfer.remove(); + (o.callback && o.callback.apply(elem[0], arguments)); + elem.dequeue(); + }); + }); +}; + +})(jQuery); diff --git a/static/development-bundle/ui/ui.accordion.js b/static/development-bundle/ui/ui.accordion.js new file mode 100644 index 0000000..e469c3a --- /dev/null +++ b/static/development-bundle/ui/ui.accordion.js @@ -0,0 +1,477 @@ +/* + * jQuery UI Accordion 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Accordion + * + * Depends: + * ui.core.js + */ +(function($) { + +$.widget("ui.accordion", { + + _init: function() { + + var o = this.options, self = this; + this.running = 0; + + // if the user set the alwaysOpen option on init + // then we need to set the collapsible option + // if they set both on init, collapsible will take priority + if (o.collapsible == $.ui.accordion.defaults.collapsible && + o.alwaysOpen != $.ui.accordion.defaults.alwaysOpen) { + o.collapsible = !o.alwaysOpen; + } + + if ( o.navigation ) { + var current = this.element.find("a").filter(o.navigationFilter); + if ( current.length ) { + if ( current.filter(o.header).length ) { + this.active = current; + } else { + this.active = current.parent().parent().prev(); + current.addClass("ui-accordion-content-active"); + } + } + } + + this.element.addClass("ui-accordion ui-widget ui-helper-reset"); + + // in lack of child-selectors in CSS we need to mark top-LIs in a UL-accordion for some IE-fix + if (this.element[0].nodeName == "UL") { + this.element.children("li").addClass("ui-accordion-li-fix"); + } + + this.headers = this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all") + .bind("mouseenter.accordion", function(){ $(this).addClass('ui-state-hover'); }) + .bind("mouseleave.accordion", function(){ $(this).removeClass('ui-state-hover'); }) + .bind("focus.accordion", function(){ $(this).addClass('ui-state-focus'); }) + .bind("blur.accordion", function(){ $(this).removeClass('ui-state-focus'); }); + + this.headers + .next() + .addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); + + this.active = this._findActive(this.active || o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"); + this.active.next().addClass('ui-accordion-content-active'); + + //Append icon elements + $("").addClass("ui-icon " + o.icons.header).prependTo(this.headers); + this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected); + + // IE7-/Win - Extra vertical space in lists fixed + if ($.browser.msie) { + this.element.find('a').css('zoom', '1'); + } + + this.resize(); + + //ARIA + this.element.attr('role','tablist'); + + this.headers + .attr('role','tab') + .bind('keydown', function(event) { return self._keydown(event); }) + .next() + .attr('role','tabpanel'); + + this.headers + .not(this.active || "") + .attr('aria-expanded','false') + .attr("tabIndex", "-1") + .next() + .hide(); + + // make sure at least one header is in the tab order + if (!this.active.length) { + this.headers.eq(0).attr('tabIndex','0'); + } else { + this.active + .attr('aria-expanded','true') + .attr('tabIndex', '0'); + } + + // only need links in taborder for Safari + if (!$.browser.safari) + this.headers.find('a').attr('tabIndex','-1'); + + if (o.event) { + this.headers.bind((o.event) + ".accordion", function(event) { return self._clickHandler.call(self, event, this); }); + } + + }, + + destroy: function() { + var o = this.options; + + this.element + .removeClass("ui-accordion ui-widget ui-helper-reset") + .removeAttr("role") + .unbind('.accordion') + .removeData('accordion'); + + this.headers + .unbind(".accordion") + .removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top") + .removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex"); + + this.headers.find("a").removeAttr("tabindex"); + this.headers.children(".ui-icon").remove(); + var contents = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active"); + if (o.autoHeight || o.fillHeight) { + contents.css("height", ""); + } + }, + + _setData: function(key, value) { + if(key == 'alwaysOpen') { key = 'collapsible'; value = !value; } + $.widget.prototype._setData.apply(this, arguments); + }, + + _keydown: function(event) { + + var o = this.options, keyCode = $.ui.keyCode; + + if (o.disabled || event.altKey || event.ctrlKey) + return; + + var length = this.headers.length; + var currentIndex = this.headers.index(event.target); + var toFocus = false; + + switch(event.keyCode) { + case keyCode.RIGHT: + case keyCode.DOWN: + toFocus = this.headers[(currentIndex + 1) % length]; + break; + case keyCode.LEFT: + case keyCode.UP: + toFocus = this.headers[(currentIndex - 1 + length) % length]; + break; + case keyCode.SPACE: + case keyCode.ENTER: + return this._clickHandler({ target: event.target }, event.target); + } + + if (toFocus) { + $(event.target).attr('tabIndex','-1'); + $(toFocus).attr('tabIndex','0'); + toFocus.focus(); + return false; + } + + return true; + + }, + + resize: function() { + + var o = this.options, maxHeight; + + if (o.fillSpace) { + + if($.browser.msie) { var defOverflow = this.element.parent().css('overflow'); this.element.parent().css('overflow', 'hidden'); } + maxHeight = this.element.parent().height(); + if($.browser.msie) { this.element.parent().css('overflow', defOverflow); } + + this.headers.each(function() { + maxHeight -= $(this).outerHeight(); + }); + + var maxPadding = 0; + this.headers.next().each(function() { + maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height()); + }).height(Math.max(0, maxHeight - maxPadding)) + .css('overflow', 'auto'); + + } else if ( o.autoHeight ) { + maxHeight = 0; + this.headers.next().each(function() { + maxHeight = Math.max(maxHeight, $(this).outerHeight()); + }).height(maxHeight); + } + + }, + + activate: function(index) { + // call clickHandler with custom event + var active = this._findActive(index)[0]; + this._clickHandler({ target: active }, active); + }, + + _findActive: function(selector) { + return selector + ? typeof selector == "number" + ? this.headers.filter(":eq(" + selector + ")") + : this.headers.not(this.headers.not(selector)) + : selector === false + ? $([]) + : this.headers.filter(":eq(0)"); + }, + + _clickHandler: function(event, target) { + + var o = this.options; + if (o.disabled) return false; + + // called only when using activate(false) to close all parts programmatically + if (!event.target && o.collapsible) { + this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all") + .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header); + this.active.next().addClass('ui-accordion-content-active'); + var toHide = this.active.next(), + data = { + options: o, + newHeader: $([]), + oldHeader: o.active, + newContent: $([]), + oldContent: toHide + }, + toShow = (this.active = $([])); + this._toggle(toShow, toHide, data); + return false; + } + + // get the click target + var clicked = $(event.currentTarget || target); + var clickedIsActive = clicked[0] == this.active[0]; + + // if animations are still active, or the active header is the target, ignore click + if (this.running || (!o.collapsible && clickedIsActive)) { + return false; + } + + // switch classes + this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all") + .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header); + this.active.next().addClass('ui-accordion-content-active'); + if (!clickedIsActive) { + clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top") + .find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected); + clicked.next().addClass('ui-accordion-content-active'); + } + + // find elements to show and hide + var toShow = clicked.next(), + toHide = this.active.next(), + data = { + options: o, + newHeader: clickedIsActive && o.collapsible ? $([]) : clicked, + oldHeader: this.active, + newContent: clickedIsActive && o.collapsible ? $([]) : toShow.find('> *'), + oldContent: toHide.find('> *') + }, + down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] ); + + this.active = clickedIsActive ? $([]) : clicked; + this._toggle(toShow, toHide, data, clickedIsActive, down); + + return false; + + }, + + _toggle: function(toShow, toHide, data, clickedIsActive, down) { + + var o = this.options, self = this; + + this.toShow = toShow; + this.toHide = toHide; + this.data = data; + + var complete = function() { if(!self) return; return self._completed.apply(self, arguments); }; + + // trigger changestart event + this._trigger("changestart", null, this.data); + + // count elements to animate + this.running = toHide.size() === 0 ? toShow.size() : toHide.size(); + + if (o.animated) { + + var animOptions = {}; + + if ( o.collapsible && clickedIsActive ) { + animOptions = { + toShow: $([]), + toHide: toHide, + complete: complete, + down: down, + autoHeight: o.autoHeight || o.fillSpace + }; + } else { + animOptions = { + toShow: toShow, + toHide: toHide, + complete: complete, + down: down, + autoHeight: o.autoHeight || o.fillSpace + }; + } + + if (!o.proxied) { + o.proxied = o.animated; + } + + if (!o.proxiedDuration) { + o.proxiedDuration = o.duration; + } + + o.animated = $.isFunction(o.proxied) ? + o.proxied(animOptions) : o.proxied; + + o.duration = $.isFunction(o.proxiedDuration) ? + o.proxiedDuration(animOptions) : o.proxiedDuration; + + var animations = $.ui.accordion.animations, + duration = o.duration, + easing = o.animated; + + if (!animations[easing]) { + animations[easing] = function(options) { + this.slide(options, { + easing: easing, + duration: duration || 700 + }); + }; + } + + animations[easing](animOptions); + + } else { + + if (o.collapsible && clickedIsActive) { + toShow.toggle(); + } else { + toHide.hide(); + toShow.show(); + } + + complete(true); + + } + + toHide.prev().attr('aria-expanded','false').attr("tabIndex", "-1").blur(); + toShow.prev().attr('aria-expanded','true').attr("tabIndex", "0").focus(); + + }, + + _completed: function(cancel) { + + var o = this.options; + + this.running = cancel ? 0 : --this.running; + if (this.running) return; + + if (o.clearStyle) { + this.toShow.add(this.toHide).css({ + height: "", + overflow: "" + }); + } + + this._trigger('change', null, this.data); + } + +}); + + +$.extend($.ui.accordion, { + version: "1.7.2", + defaults: { + active: null, + alwaysOpen: true, //deprecated, use collapsible + animated: 'slide', + autoHeight: true, + clearStyle: false, + collapsible: false, + event: "click", + fillSpace: false, + header: "> li > :first-child,> :not(li):even", + icons: { + header: "ui-icon-triangle-1-e", + headerSelected: "ui-icon-triangle-1-s" + }, + navigation: false, + navigationFilter: function() { + return this.href.toLowerCase() == location.href.toLowerCase(); + } + }, + animations: { + slide: function(options, additions) { + options = $.extend({ + easing: "swing", + duration: 300 + }, options, additions); + if ( !options.toHide.size() ) { + options.toShow.animate({height: "show"}, options); + return; + } + if ( !options.toShow.size() ) { + options.toHide.animate({height: "hide"}, options); + return; + } + var overflow = options.toShow.css('overflow'), + percentDone, + showProps = {}, + hideProps = {}, + fxAttrs = [ "height", "paddingTop", "paddingBottom" ], + originalWidth; + // fix width before calculating height of hidden element + var s = options.toShow; + originalWidth = s[0].style.width; + s.width( parseInt(s.parent().width(),10) - parseInt(s.css("paddingLeft"),10) - parseInt(s.css("paddingRight"),10) - (parseInt(s.css("borderLeftWidth"),10) || 0) - (parseInt(s.css("borderRightWidth"),10) || 0) ); + + $.each(fxAttrs, function(i, prop) { + hideProps[prop] = 'hide'; + + var parts = ('' + $.css(options.toShow[0], prop)).match(/^([\d+-.]+)(.*)$/); + showProps[prop] = { + value: parts[1], + unit: parts[2] || 'px' + }; + }); + options.toShow.css({ height: 0, overflow: 'hidden' }).show(); + options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{ + step: function(now, settings) { + // only calculate the percent when animating height + // IE gets very inconsistent results when animating elements + // with small values, which is common for padding + if (settings.prop == 'height') { + percentDone = (settings.now - settings.start) / (settings.end - settings.start); + } + + options.toShow[0].style[settings.prop] = + (percentDone * showProps[settings.prop].value) + showProps[settings.prop].unit; + }, + duration: options.duration, + easing: options.easing, + complete: function() { + if ( !options.autoHeight ) { + options.toShow.css("height", ""); + } + options.toShow.css("width", originalWidth); + options.toShow.css({overflow: overflow}); + options.complete(); + } + }); + }, + bounceslide: function(options) { + this.slide(options, { + easing: options.down ? "easeOutBounce" : "swing", + duration: options.down ? 1000 : 200 + }); + }, + easeslide: function(options) { + this.slide(options, { + easing: "easeinout", + duration: 700 + }); + } + } +}); + +})(jQuery); diff --git a/static/development-bundle/ui/ui.core.js b/static/development-bundle/ui/ui.core.js new file mode 100644 index 0000000..5493e0a --- /dev/null +++ b/static/development-bundle/ui/ui.core.js @@ -0,0 +1,519 @@ +/* + * jQuery UI 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI + */ +;jQuery.ui || (function($) { + +var _remove = $.fn.remove, + isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9); + +//Helper functions and ui object +$.ui = { + version: "1.7.2", + + // $.ui.plugin is deprecated. Use the proxy pattern instead. + plugin: { + add: function(module, option, set) { + var proto = $.ui[module].prototype; + for(var i in set) { + proto.plugins[i] = proto.plugins[i] || []; + proto.plugins[i].push([option, set[i]]); + } + }, + call: function(instance, name, args) { + var set = instance.plugins[name]; + if(!set || !instance.element[0].parentNode) { return; } + + for (var i = 0; i < set.length; i++) { + if (instance.options[set[i][0]]) { + set[i][1].apply(instance.element, args); + } + } + } + }, + + contains: function(a, b) { + return document.compareDocumentPosition + ? a.compareDocumentPosition(b) & 16 + : a !== b && a.contains(b); + }, + + hasScroll: function(el, a) { + + //If overflow is hidden, the element might have extra content, but the user wants to hide it + if ($(el).css('overflow') == 'hidden') { return false; } + + var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop', + has = false; + + if (el[scroll] > 0) { return true; } + + // TODO: determine which cases actually cause this to happen + // if the element doesn't have the scroll set, see if it's possible to + // set the scroll + el[scroll] = 1; + has = (el[scroll] > 0); + el[scroll] = 0; + return has; + }, + + isOverAxis: function(x, reference, size) { + //Determines when x coordinate is over "b" element axis + return (x > reference) && (x < (reference + size)); + }, + + isOver: function(y, x, top, left, height, width) { + //Determines when x, y coordinates is over "b" element + return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width); + }, + + keyCode: { + BACKSPACE: 8, + CAPS_LOCK: 20, + COMMA: 188, + CONTROL: 17, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + INSERT: 45, + LEFT: 37, + NUMPAD_ADD: 107, + NUMPAD_DECIMAL: 110, + NUMPAD_DIVIDE: 111, + NUMPAD_ENTER: 108, + NUMPAD_MULTIPLY: 106, + NUMPAD_SUBTRACT: 109, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SHIFT: 16, + SPACE: 32, + TAB: 9, + UP: 38 + } +}; + +// WAI-ARIA normalization +if (isFF2) { + var attr = $.attr, + removeAttr = $.fn.removeAttr, + ariaNS = "http://www.w3.org/2005/07/aaa", + ariaState = /^aria-/, + ariaRole = /^wairole:/; + + $.attr = function(elem, name, value) { + var set = value !== undefined; + + return (name == 'role' + ? (set + ? attr.call(this, elem, name, "wairole:" + value) + : (attr.apply(this, arguments) || "").replace(ariaRole, "")) + : (ariaState.test(name) + ? (set + ? elem.setAttributeNS(ariaNS, + name.replace(ariaState, "aaa:"), value) + : attr.call(this, elem, name.replace(ariaState, "aaa:"))) + : attr.apply(this, arguments))); + }; + + $.fn.removeAttr = function(name) { + return (ariaState.test(name) + ? this.each(function() { + this.removeAttributeNS(ariaNS, name.replace(ariaState, "")); + }) : removeAttr.call(this, name)); + }; +} + +//jQuery plugins +$.fn.extend({ + remove: function() { + // Safari has a native remove event which actually removes DOM elements, + // so we have to use triggerHandler instead of trigger (#3037). + $("*", this).add(this).each(function() { + $(this).triggerHandler("remove"); + }); + return _remove.apply(this, arguments ); + }, + + enableSelection: function() { + return this + .attr('unselectable', 'off') + .css('MozUserSelect', '') + .unbind('selectstart.ui'); + }, + + disableSelection: function() { + return this + .attr('unselectable', 'on') + .css('MozUserSelect', 'none') + .bind('selectstart.ui', function() { return false; }); + }, + + scrollParent: function() { + var scrollParent; + if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) { + scrollParent = this.parents().filter(function() { + return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); + }).eq(0); + } else { + scrollParent = this.parents().filter(function() { + return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1)); + }).eq(0); + } + + return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent; + } +}); + + +//Additional selectors +$.extend($.expr[':'], { + data: function(elem, i, match) { + return !!$.data(elem, match[3]); + }, + + focusable: function(element) { + var nodeName = element.nodeName.toLowerCase(), + tabIndex = $.attr(element, 'tabindex'); + return (/input|select|textarea|button|object/.test(nodeName) + ? !element.disabled + : 'a' == nodeName || 'area' == nodeName + ? element.href || !isNaN(tabIndex) + : !isNaN(tabIndex)) + // the element and all of its ancestors must be visible + // the browser may report that the area is hidden + && !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length; + }, + + tabbable: function(element) { + var tabIndex = $.attr(element, 'tabindex'); + return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable'); + } +}); + + +// $.widget is a factory to create jQuery plugins +// taking some boilerplate code out of the plugin code +function getter(namespace, plugin, method, args) { + function getMethods(type) { + var methods = $[namespace][plugin][type] || []; + return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods); + } + + var methods = getMethods('getter'); + if (args.length == 1 && typeof args[0] == 'string') { + methods = methods.concat(getMethods('getterSetter')); + } + return ($.inArray(method, methods) != -1); +} + +$.widget = function(name, prototype) { + var namespace = name.split(".")[0]; + name = name.split(".")[1]; + + // create plugin method + $.fn[name] = function(options) { + var isMethodCall = (typeof options == 'string'), + args = Array.prototype.slice.call(arguments, 1); + + // prevent calls to internal methods + if (isMethodCall && options.substring(0, 1) == '_') { + return this; + } + + // handle getter methods + if (isMethodCall && getter(namespace, name, options, args)) { + var instance = $.data(this[0], name); + return (instance ? instance[options].apply(instance, args) + : undefined); + } + + // handle initialization and non-getter methods + return this.each(function() { + var instance = $.data(this, name); + + // constructor + (!instance && !isMethodCall && + $.data(this, name, new $[namespace][name](this, options))._init()); + + // method call + (instance && isMethodCall && $.isFunction(instance[options]) && + instance[options].apply(instance, args)); + }); + }; + + // create widget constructor + $[namespace] = $[namespace] || {}; + $[namespace][name] = function(element, options) { + var self = this; + + this.namespace = namespace; + this.widgetName = name; + this.widgetEventPrefix = $[namespace][name].eventPrefix || name; + this.widgetBaseClass = namespace + '-' + name; + + this.options = $.extend({}, + $.widget.defaults, + $[namespace][name].defaults, + $.metadata && $.metadata.get(element)[name], + options); + + this.element = $(element) + .bind('setData.' + name, function(event, key, value) { + if (event.target == element) { + return self._setData(key, value); + } + }) + .bind('getData.' + name, function(event, key) { + if (event.target == element) { + return self._getData(key); + } + }) + .bind('remove', function() { + return self.destroy(); + }); + }; + + // add widget prototype + $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype); + + // TODO: merge getter and getterSetter properties from widget prototype + // and plugin prototype + $[namespace][name].getterSetter = 'option'; +}; + +$.widget.prototype = { + _init: function() {}, + destroy: function() { + this.element.removeData(this.widgetName) + .removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled') + .removeAttr('aria-disabled'); + }, + + option: function(key, value) { + var options = key, + self = this; + + if (typeof key == "string") { + if (value === undefined) { + return this._getData(key); + } + options = {}; + options[key] = value; + } + + $.each(options, function(key, value) { + self._setData(key, value); + }); + }, + _getData: function(key) { + return this.options[key]; + }, + _setData: function(key, value) { + this.options[key] = value; + + if (key == 'disabled') { + this.element + [value ? 'addClass' : 'removeClass']( + this.widgetBaseClass + '-disabled' + ' ' + + this.namespace + '-state-disabled') + .attr("aria-disabled", value); + } + }, + + enable: function() { + this._setData('disabled', false); + }, + disable: function() { + this._setData('disabled', true); + }, + + _trigger: function(type, event, data) { + var callback = this.options[type], + eventName = (type == this.widgetEventPrefix + ? type : this.widgetEventPrefix + type); + + event = $.Event(event); + event.type = eventName; + + // copy original event properties over to the new event + // this would happen if we could call $.event.fix instead of $.Event + // but we don't have a way to force an event to be fixed multiple times + if (event.originalEvent) { + for (var i = $.event.props.length, prop; i;) { + prop = $.event.props[--i]; + event[prop] = event.originalEvent[prop]; + } + } + + this.element.trigger(event, data); + + return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false + || event.isDefaultPrevented()); + } +}; + +$.widget.defaults = { + disabled: false +}; + + +/** Mouse Interaction Plugin **/ + +$.ui.mouse = { + _mouseInit: function() { + var self = this; + + this.element + .bind('mousedown.'+this.widgetName, function(event) { + return self._mouseDown(event); + }) + .bind('click.'+this.widgetName, function(event) { + if(self._preventClickEvent) { + self._preventClickEvent = false; + event.stopImmediatePropagation(); + return false; + } + }); + + // Prevent text selection in IE + if ($.browser.msie) { + this._mouseUnselectable = this.element.attr('unselectable'); + this.element.attr('unselectable', 'on'); + } + + this.started = false; + }, + + // TODO: make sure destroying one instance of mouse doesn't mess with + // other instances of mouse + _mouseDestroy: function() { + this.element.unbind('.'+this.widgetName); + + // Restore text selection in IE + ($.browser.msie + && this.element.attr('unselectable', this._mouseUnselectable)); + }, + + _mouseDown: function(event) { + // don't let more than one widget handle mouseStart + // TODO: figure out why we have to use originalEvent + event.originalEvent = event.originalEvent || {}; + if (event.originalEvent.mouseHandled) { return; } + + // we may have missed mouseup (out of window) + (this._mouseStarted && this._mouseUp(event)); + + this._mouseDownEvent = event; + + var self = this, + btnIsLeft = (event.which == 1), + elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false); + if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { + return true; + } + + this.mouseDelayMet = !this.options.delay; + if (!this.mouseDelayMet) { + this._mouseDelayTimer = setTimeout(function() { + self.mouseDelayMet = true; + }, this.options.delay); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = (this._mouseStart(event) !== false); + if (!this._mouseStarted) { + event.preventDefault(); + return true; + } + } + + // these delegates are required to keep context + this._mouseMoveDelegate = function(event) { + return self._mouseMove(event); + }; + this._mouseUpDelegate = function(event) { + return self._mouseUp(event); + }; + $(document) + .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate) + .bind('mouseup.'+this.widgetName, this._mouseUpDelegate); + + // preventDefault() is used to prevent the selection of text here - + // however, in Safari, this causes select boxes not to be selectable + // anymore, so this fix is needed + ($.browser.safari || event.preventDefault()); + + event.originalEvent.mouseHandled = true; + return true; + }, + + _mouseMove: function(event) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.browser.msie && !event.button) { + return this._mouseUp(event); + } + + if (this._mouseStarted) { + this._mouseDrag(event); + return event.preventDefault(); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = + (this._mouseStart(this._mouseDownEvent, event) !== false); + (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); + } + + return !this._mouseStarted; + }, + + _mouseUp: function(event) { + $(document) + .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate) + .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate); + + if (this._mouseStarted) { + this._mouseStarted = false; + this._preventClickEvent = (event.target == this._mouseDownEvent.target); + this._mouseStop(event); + } + + return false; + }, + + _mouseDistanceMet: function(event) { + return (Math.max( + Math.abs(this._mouseDownEvent.pageX - event.pageX), + Math.abs(this._mouseDownEvent.pageY - event.pageY) + ) >= this.options.distance + ); + }, + + _mouseDelayMet: function(event) { + return this.mouseDelayMet; + }, + + // These are placeholder methods, to be overriden by extending plugin + _mouseStart: function(event) {}, + _mouseDrag: function(event) {}, + _mouseStop: function(event) {}, + _mouseCapture: function(event) { return true; } +}; + +$.ui.mouse.defaults = { + cancel: null, + distance: 1, + delay: 0 +}; + +})(jQuery); diff --git a/static/development-bundle/ui/ui.datepicker.js b/static/development-bundle/ui/ui.datepicker.js new file mode 100644 index 0000000..0ce166e --- /dev/null +++ b/static/development-bundle/ui/ui.datepicker.js @@ -0,0 +1,1636 @@ +/* + * jQuery UI Datepicker 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Datepicker + * + * Depends: + * ui.core.js + */ + +(function($) { // hide the namespace + +$.extend($.ui, { datepicker: { version: "1.7.2" } }); + +var PROP_NAME = 'datepicker'; + +/* Date picker manager. + Use the singleton instance of this class, $.datepicker, to interact with the date picker. + Settings for (groups of) date pickers are maintained in an instance object, + allowing multiple different settings on the same page. */ + +function Datepicker() { + this.debug = false; // Change this to true to start debugging + this._curInst = null; // The current instance in use + this._keyEvent = false; // If the last event was a key event + this._disabledInputs = []; // List of date picker inputs that have been disabled + this._datepickerShowing = false; // True if the popup picker is showing , false if not + this._inDialog = false; // True if showing within a "dialog", false if not + this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division + this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class + this._appendClass = 'ui-datepicker-append'; // The name of the append marker class + this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class + this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class + this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class + this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class + this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class + this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class + this.regional = []; // Available regional settings, indexed by language code + this.regional[''] = { // Default regional settings + closeText: 'Done', // Display text for close link + prevText: 'Prev', // Display text for previous month link + nextText: 'Next', // Display text for next month link + currentText: 'Today', // Display text for current month link + monthNames: ['January','February','March','April','May','June', + 'July','August','September','October','November','December'], // Names of months for drop-down and formatting + monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting + dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting + dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting + dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday + dateFormat: 'mm/dd/yy', // See format options on parseDate + firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... + isRTL: false // True if right-to-left language, false if left-to-right + }; + this._defaults = { // Global defaults for all the date picker instances + showOn: 'focus', // 'focus' for popup on focus, + // 'button' for trigger button, or 'both' for either + showAnim: 'show', // Name of jQuery animation for popup + showOptions: {}, // Options for enhanced animations + defaultDate: null, // Used when field is blank: actual date, + // +/-number for offset from today, null for today + appendText: '', // Display text following the input box, e.g. showing the format + buttonText: '...', // Text for trigger button + buttonImage: '', // URL for trigger button image + buttonImageOnly: false, // True if the image appears alone, false if it appears on a button + hideIfNoPrevNext: false, // True to hide next/previous month links + // if not applicable, false to just disable them + navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links + gotoCurrent: false, // True if today link goes back to current selection instead + changeMonth: false, // True if month can be selected directly, false if only prev/next + changeYear: false, // True if year can be selected directly, false if only prev/next + showMonthAfterYear: false, // True if the year select precedes month, false for month then year + yearRange: '-10:+10', // Range of years to display in drop-down, + // either relative to current year (-nn:+nn) or absolute (nnnn:nnnn) + showOtherMonths: false, // True to show dates in other months, false to leave blank + calculateWeek: this.iso8601Week, // How to calculate the week of the year, + // takes a Date and returns the number of the week for it + shortYearCutoff: '+10', // Short year values < this are in the current century, + // > this are in the previous century, + // string value starting with '+' for current year + value + minDate: null, // The earliest selectable date, or null for no limit + maxDate: null, // The latest selectable date, or null for no limit + duration: 'normal', // Duration of display/closure + beforeShowDay: null, // Function that takes a date and returns an array with + // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '', + // [2] = cell title (optional), e.g. $.datepicker.noWeekends + beforeShow: null, // Function that takes an input field and + // returns a set of custom settings for the date picker + onSelect: null, // Define a callback function when a date is selected + onChangeMonthYear: null, // Define a callback function when the month or year is changed + onClose: null, // Define a callback function when the datepicker is closed + numberOfMonths: 1, // Number of months to show at a time + showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) + stepMonths: 1, // Number of months to step back/forward + stepBigMonths: 12, // Number of months to step back/forward for the big links + altField: '', // Selector for an alternate field to store selected dates into + altFormat: '', // The date format to use for the alternate field + constrainInput: true, // The input is constrained by the current date format + showButtonPanel: false // True to show button panel, false to not show it + }; + $.extend(this._defaults, this.regional['']); + this.dpDiv = $('
'); +} + +$.extend(Datepicker.prototype, { + /* Class name added to elements to indicate already configured with a date picker. */ + markerClassName: 'hasDatepicker', + + /* Debug logging (if enabled). */ + log: function () { + if (this.debug) + console.log.apply('', arguments); + }, + + /* Override the default settings for all instances of the date picker. + @param settings object - the new settings to use as defaults (anonymous object) + @return the manager object */ + setDefaults: function(settings) { + extendRemove(this._defaults, settings || {}); + return this; + }, + + /* Attach the date picker to a jQuery selection. + @param target element - the target input field or division or span + @param settings object - the new settings to use for this date picker instance (anonymous) */ + _attachDatepicker: function(target, settings) { + // check for settings on the control itself - in namespace 'date:' + var inlineSettings = null; + for (var attrName in this._defaults) { + var attrValue = target.getAttribute('date:' + attrName); + if (attrValue) { + inlineSettings = inlineSettings || {}; + try { + inlineSettings[attrName] = eval(attrValue); + } catch (err) { + inlineSettings[attrName] = attrValue; + } + } + } + var nodeName = target.nodeName.toLowerCase(); + var inline = (nodeName == 'div' || nodeName == 'span'); + if (!target.id) + target.id = 'dp' + (++this.uuid); + var inst = this._newInst($(target), inline); + inst.settings = $.extend({}, settings || {}, inlineSettings || {}); + if (nodeName == 'input') { + this._connectDatepicker(target, inst); + } else if (inline) { + this._inlineDatepicker(target, inst); + } + }, + + /* Create a new instance object. */ + _newInst: function(target, inline) { + var id = target[0].id.replace(/([:\[\]\.])/g, '\\\\$1'); // escape jQuery meta chars + return {id: id, input: target, // associated target + selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection + drawMonth: 0, drawYear: 0, // month being drawn + inline: inline, // is datepicker inline or not + dpDiv: (!inline ? this.dpDiv : // presentation div + $('
'))}; + }, + + /* Attach the date picker to an input field. */ + _connectDatepicker: function(target, inst) { + var input = $(target); + inst.append = $([]); + inst.trigger = $([]); + if (input.hasClass(this.markerClassName)) + return; + var appendText = this._get(inst, 'appendText'); + var isRTL = this._get(inst, 'isRTL'); + if (appendText) { + inst.append = $('' + appendText + ''); + input[isRTL ? 'before' : 'after'](inst.append); + } + var showOn = this._get(inst, 'showOn'); + if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field + input.focus(this._showDatepicker); + if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked + var buttonText = this._get(inst, 'buttonText'); + var buttonImage = this._get(inst, 'buttonImage'); + inst.trigger = $(this._get(inst, 'buttonImageOnly') ? + $('').addClass(this._triggerClass). + attr({ src: buttonImage, alt: buttonText, title: buttonText }) : + $('').addClass(this._triggerClass). + html(buttonImage == '' ? buttonText : $('').attr( + { src:buttonImage, alt:buttonText, title:buttonText }))); + input[isRTL ? 'before' : 'after'](inst.trigger); + inst.trigger.click(function() { + if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target) + $.datepicker._hideDatepicker(); + else + $.datepicker._showDatepicker(target); + return false; + }); + } + input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress). + bind("setData.datepicker", function(event, key, value) { + inst.settings[key] = value; + }).bind("getData.datepicker", function(event, key) { + return this._get(inst, key); + }); + $.data(target, PROP_NAME, inst); + }, + + /* Attach an inline date picker to a div. */ + _inlineDatepicker: function(target, inst) { + var divSpan = $(target); + if (divSpan.hasClass(this.markerClassName)) + return; + divSpan.addClass(this.markerClassName).append(inst.dpDiv). + bind("setData.datepicker", function(event, key, value){ + inst.settings[key] = value; + }).bind("getData.datepicker", function(event, key){ + return this._get(inst, key); + }); + $.data(target, PROP_NAME, inst); + this._setDate(inst, this._getDefaultDate(inst)); + this._updateDatepicker(inst); + this._updateAlternate(inst); + }, + + /* Pop-up the date picker in a "dialog" box. + @param input element - ignored + @param dateText string - the initial date to display (in the current format) + @param onSelect function - the function(dateText) to call when a date is selected + @param settings object - update the dialog date picker instance's settings (anonymous object) + @param pos int[2] - coordinates for the dialog's position within the screen or + event - with x/y coordinates or + leave empty for default (screen centre) + @return the manager object */ + _dialogDatepicker: function(input, dateText, onSelect, settings, pos) { + var inst = this._dialogInst; // internal instance + if (!inst) { + var id = 'dp' + (++this.uuid); + this._dialogInput = $(''); + this._dialogInput.keydown(this._doKeyDown); + $('body').append(this._dialogInput); + inst = this._dialogInst = this._newInst(this._dialogInput, false); + inst.settings = {}; + $.data(this._dialogInput[0], PROP_NAME, inst); + } + extendRemove(inst.settings, settings || {}); + this._dialogInput.val(dateText); + + this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); + if (!this._pos) { + var browserWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; + var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; + var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; + var scrollY = document.documentElement.scrollTop || document.body.scrollTop; + this._pos = // should use actual width/height below + [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; + } + + // move input on screen for focus, but hidden behind dialog + this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px'); + inst.settings.onSelect = onSelect; + this._inDialog = true; + this.dpDiv.addClass(this._dialogClass); + this._showDatepicker(this._dialogInput[0]); + if ($.blockUI) + $.blockUI(this.dpDiv); + $.data(this._dialogInput[0], PROP_NAME, inst); + return this; + }, + + /* Detach a datepicker from its control. + @param target element - the target input field or division or span */ + _destroyDatepicker: function(target) { + var $target = $(target); + var inst = $.data(target, PROP_NAME); + if (!$target.hasClass(this.markerClassName)) { + return; + } + var nodeName = target.nodeName.toLowerCase(); + $.removeData(target, PROP_NAME); + if (nodeName == 'input') { + inst.append.remove(); + inst.trigger.remove(); + $target.removeClass(this.markerClassName). + unbind('focus', this._showDatepicker). + unbind('keydown', this._doKeyDown). + unbind('keypress', this._doKeyPress); + } else if (nodeName == 'div' || nodeName == 'span') + $target.removeClass(this.markerClassName).empty(); + }, + + /* Enable the date picker to a jQuery selection. + @param target element - the target input field or division or span */ + _enableDatepicker: function(target) { + var $target = $(target); + var inst = $.data(target, PROP_NAME); + if (!$target.hasClass(this.markerClassName)) { + return; + } + var nodeName = target.nodeName.toLowerCase(); + if (nodeName == 'input') { + target.disabled = false; + inst.trigger.filter('button'). + each(function() { this.disabled = false; }).end(). + filter('img').css({opacity: '1.0', cursor: ''}); + } + else if (nodeName == 'div' || nodeName == 'span') { + var inline = $target.children('.' + this._inlineClass); + inline.children().removeClass('ui-state-disabled'); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value == target ? null : value); }); // delete entry + }, + + /* Disable the date picker to a jQuery selection. + @param target element - the target input field or division or span */ + _disableDatepicker: function(target) { + var $target = $(target); + var inst = $.data(target, PROP_NAME); + if (!$target.hasClass(this.markerClassName)) { + return; + } + var nodeName = target.nodeName.toLowerCase(); + if (nodeName == 'input') { + target.disabled = true; + inst.trigger.filter('button'). + each(function() { this.disabled = true; }).end(). + filter('img').css({opacity: '0.5', cursor: 'default'}); + } + else if (nodeName == 'div' || nodeName == 'span') { + var inline = $target.children('.' + this._inlineClass); + inline.children().addClass('ui-state-disabled'); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value == target ? null : value); }); // delete entry + this._disabledInputs[this._disabledInputs.length] = target; + }, + + /* Is the first field in a jQuery collection disabled as a datepicker? + @param target element - the target input field or division or span + @return boolean - true if disabled, false if enabled */ + _isDisabledDatepicker: function(target) { + if (!target) { + return false; + } + for (var i = 0; i < this._disabledInputs.length; i++) { + if (this._disabledInputs[i] == target) + return true; + } + return false; + }, + + /* Retrieve the instance data for the target control. + @param target element - the target input field or division or span + @return object - the associated instance data + @throws error if a jQuery problem getting data */ + _getInst: function(target) { + try { + return $.data(target, PROP_NAME); + } + catch (err) { + throw 'Missing instance data for this datepicker'; + } + }, + + /* Update or retrieve the settings for a date picker attached to an input field or division. + @param target element - the target input field or division or span + @param name object - the new settings to update or + string - the name of the setting to change or retrieve, + when retrieving also 'all' for all instance settings or + 'defaults' for all global defaults + @param value any - the new value for the setting + (omit if above is an object or to retrieve a value) */ + _optionDatepicker: function(target, name, value) { + var inst = this._getInst(target); + if (arguments.length == 2 && typeof name == 'string') { + return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) : + (inst ? (name == 'all' ? $.extend({}, inst.settings) : + this._get(inst, name)) : null)); + } + var settings = name || {}; + if (typeof name == 'string') { + settings = {}; + settings[name] = value; + } + if (inst) { + if (this._curInst == inst) { + this._hideDatepicker(null); + } + var date = this._getDateDatepicker(target); + extendRemove(inst.settings, settings); + this._setDateDatepicker(target, date); + this._updateDatepicker(inst); + } + }, + + // change method deprecated + _changeDatepicker: function(target, name, value) { + this._optionDatepicker(target, name, value); + }, + + /* Redraw the date picker attached to an input field or division. + @param target element - the target input field or division or span */ + _refreshDatepicker: function(target) { + var inst = this._getInst(target); + if (inst) { + this._updateDatepicker(inst); + } + }, + + /* Set the dates for a jQuery selection. + @param target element - the target input field or division or span + @param date Date - the new date + @param endDate Date - the new end date for a range (optional) */ + _setDateDatepicker: function(target, date, endDate) { + var inst = this._getInst(target); + if (inst) { + this._setDate(inst, date, endDate); + this._updateDatepicker(inst); + this._updateAlternate(inst); + } + }, + + /* Get the date(s) for the first entry in a jQuery selection. + @param target element - the target input field or division or span + @return Date - the current date or + Date[2] - the current dates for a range */ + _getDateDatepicker: function(target) { + var inst = this._getInst(target); + if (inst && !inst.inline) + this._setDateFromField(inst); + return (inst ? this._getDate(inst) : null); + }, + + /* Handle keystrokes. */ + _doKeyDown: function(event) { + var inst = $.datepicker._getInst(event.target); + var handled = true; + var isRTL = inst.dpDiv.is('.ui-datepicker-rtl'); + inst._keyEvent = true; + if ($.datepicker._datepickerShowing) + switch (event.keyCode) { + case 9: $.datepicker._hideDatepicker(null, ''); + break; // hide on tab out + case 13: var sel = $('td.' + $.datepicker._dayOverClass + + ', td.' + $.datepicker._currentClass, inst.dpDiv); + if (sel[0]) + $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); + else + $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration')); + return false; // don't submit the form + break; // select the value on enter + case 27: $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration')); + break; // hide on escape + case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, 'stepBigMonths') : + -$.datepicker._get(inst, 'stepMonths')), 'M'); + break; // previous month/year on page up/+ ctrl + case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, 'stepBigMonths') : + +$.datepicker._get(inst, 'stepMonths')), 'M'); + break; // next month/year on page down/+ ctrl + case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target); + handled = event.ctrlKey || event.metaKey; + break; // clear on ctrl or command +end + case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target); + handled = event.ctrlKey || event.metaKey; + break; // current on ctrl or command +home + case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D'); + handled = event.ctrlKey || event.metaKey; + // -1 day on ctrl or command +left + if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, 'stepBigMonths') : + -$.datepicker._get(inst, 'stepMonths')), 'M'); + // next month/year on alt +left on Mac + break; + case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D'); + handled = event.ctrlKey || event.metaKey; + break; // -1 week on ctrl or command +up + case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D'); + handled = event.ctrlKey || event.metaKey; + // +1 day on ctrl or command +right + if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, 'stepBigMonths') : + +$.datepicker._get(inst, 'stepMonths')), 'M'); + // next month/year on alt +right + break; + case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D'); + handled = event.ctrlKey || event.metaKey; + break; // +1 week on ctrl or command +down + default: handled = false; + } + else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home + $.datepicker._showDatepicker(this); + else { + handled = false; + } + if (handled) { + event.preventDefault(); + event.stopPropagation(); + } + }, + + /* Filter entered characters - based on date format. */ + _doKeyPress: function(event) { + var inst = $.datepicker._getInst(event.target); + if ($.datepicker._get(inst, 'constrainInput')) { + var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')); + var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode); + return event.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1); + } + }, + + /* Pop-up the date picker for a given input field. + @param input element - the input field attached to the date picker or + event - if triggered by focus */ + _showDatepicker: function(input) { + input = input.target || input; + if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger + input = $('input', input.parentNode)[0]; + if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here + return; + var inst = $.datepicker._getInst(input); + var beforeShow = $.datepicker._get(inst, 'beforeShow'); + extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {})); + $.datepicker._hideDatepicker(null, ''); + $.datepicker._lastInput = input; + $.datepicker._setDateFromField(inst); + if ($.datepicker._inDialog) // hide cursor + input.value = ''; + if (!$.datepicker._pos) { // position below input + $.datepicker._pos = $.datepicker._findPos(input); + $.datepicker._pos[1] += input.offsetHeight; // add the height + } + var isFixed = false; + $(input).parents().each(function() { + isFixed |= $(this).css('position') == 'fixed'; + return !isFixed; + }); + if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled + $.datepicker._pos[0] -= document.documentElement.scrollLeft; + $.datepicker._pos[1] -= document.documentElement.scrollTop; + } + var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; + $.datepicker._pos = null; + inst.rangeStart = null; + // determine sizing offscreen + inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'}); + $.datepicker._updateDatepicker(inst); + // fix width for dynamic number of date pickers + // and adjust position before showing + offset = $.datepicker._checkOffset(inst, offset, isFixed); + inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? + 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none', + left: offset.left + 'px', top: offset.top + 'px'}); + if (!inst.inline) { + var showAnim = $.datepicker._get(inst, 'showAnim') || 'show'; + var duration = $.datepicker._get(inst, 'duration'); + var postProcess = function() { + $.datepicker._datepickerShowing = true; + if ($.browser.msie && parseInt($.browser.version,10) < 7) // fix IE < 7 select problems + $('iframe.ui-datepicker-cover').css({width: inst.dpDiv.width() + 4, + height: inst.dpDiv.height() + 4}); + }; + if ($.effects && $.effects[showAnim]) + inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess); + else + inst.dpDiv[showAnim](duration, postProcess); + if (duration == '') + postProcess(); + if (inst.input[0].type != 'hidden') + inst.input[0].focus(); + $.datepicker._curInst = inst; + } + }, + + /* Generate the date picker content. */ + _updateDatepicker: function(inst) { + var dims = {width: inst.dpDiv.width() + 4, + height: inst.dpDiv.height() + 4}; + var self = this; + inst.dpDiv.empty().append(this._generateHTML(inst)) + .find('iframe.ui-datepicker-cover'). + css({width: dims.width, height: dims.height}) + .end() + .find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a') + .bind('mouseout', function(){ + $(this).removeClass('ui-state-hover'); + if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover'); + if(this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover'); + }) + .bind('mouseover', function(){ + if (!self._isDisabledDatepicker( inst.inline ? inst.dpDiv.parent()[0] : inst.input[0])) { + $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover'); + $(this).addClass('ui-state-hover'); + if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover'); + if(this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover'); + } + }) + .end() + .find('.' + this._dayOverClass + ' a') + .trigger('mouseover') + .end(); + var numMonths = this._getNumberOfMonths(inst); + var cols = numMonths[1]; + var width = 17; + if (cols > 1) { + inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em'); + } else { + inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width(''); + } + inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') + + 'Class']('ui-datepicker-multi'); + inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') + + 'Class']('ui-datepicker-rtl'); + if (inst.input && inst.input[0].type != 'hidden' && inst == $.datepicker._curInst) + $(inst.input[0]).focus(); + }, + + /* Check positioning to remain on screen. */ + _checkOffset: function(inst, offset, isFixed) { + var dpWidth = inst.dpDiv.outerWidth(); + var dpHeight = inst.dpDiv.outerHeight(); + var inputWidth = inst.input ? inst.input.outerWidth() : 0; + var inputHeight = inst.input ? inst.input.outerHeight() : 0; + var viewWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft(); + var viewHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + $(document).scrollTop(); + + offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0); + offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0; + offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; + + // now check if datepicker is showing outside window viewport - move to a better place if so. + offset.left -= (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? Math.abs(offset.left + dpWidth - viewWidth) : 0; + offset.top -= (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? Math.abs(offset.top + dpHeight + inputHeight*2 - viewHeight) : 0; + + return offset; + }, + + /* Find an object's position on the screen. */ + _findPos: function(obj) { + while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) { + obj = obj.nextSibling; + } + var position = $(obj).offset(); + return [position.left, position.top]; + }, + + /* Hide the date picker from view. + @param input element - the input field attached to the date picker + @param duration string - the duration over which to close the date picker */ + _hideDatepicker: function(input, duration) { + var inst = this._curInst; + if (!inst || (input && inst != $.data(input, PROP_NAME))) + return; + if (inst.stayOpen) + this._selectDate('#' + inst.id, this._formatDate(inst, + inst.currentDay, inst.currentMonth, inst.currentYear)); + inst.stayOpen = false; + if (this._datepickerShowing) { + duration = (duration != null ? duration : this._get(inst, 'duration')); + var showAnim = this._get(inst, 'showAnim'); + var postProcess = function() { + $.datepicker._tidyDialog(inst); + }; + if (duration != '' && $.effects && $.effects[showAnim]) + inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), + duration, postProcess); + else + inst.dpDiv[(duration == '' ? 'hide' : (showAnim == 'slideDown' ? 'slideUp' : + (showAnim == 'fadeIn' ? 'fadeOut' : 'hide')))](duration, postProcess); + if (duration == '') + this._tidyDialog(inst); + var onClose = this._get(inst, 'onClose'); + if (onClose) + onClose.apply((inst.input ? inst.input[0] : null), + [(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback + this._datepickerShowing = false; + this._lastInput = null; + if (this._inDialog) { + this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' }); + if ($.blockUI) { + $.unblockUI(); + $('body').append(this.dpDiv); + } + } + this._inDialog = false; + } + this._curInst = null; + }, + + /* Tidy up after a dialog display. */ + _tidyDialog: function(inst) { + inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar'); + }, + + /* Close date picker if clicked elsewhere. */ + _checkExternalClick: function(event) { + if (!$.datepicker._curInst) + return; + var $target = $(event.target); + if (($target.parents('#' + $.datepicker._mainDivId).length == 0) && + !$target.hasClass($.datepicker.markerClassName) && + !$target.hasClass($.datepicker._triggerClass) && + $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI)) + $.datepicker._hideDatepicker(null, ''); + }, + + /* Adjust one of the date sub-fields. */ + _adjustDate: function(id, offset, period) { + var target = $(id); + var inst = this._getInst(target[0]); + if (this._isDisabledDatepicker(target[0])) { + return; + } + this._adjustInstDate(inst, offset + + (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning + period); + this._updateDatepicker(inst); + }, + + /* Action for current link. */ + _gotoToday: function(id) { + var target = $(id); + var inst = this._getInst(target[0]); + if (this._get(inst, 'gotoCurrent') && inst.currentDay) { + inst.selectedDay = inst.currentDay; + inst.drawMonth = inst.selectedMonth = inst.currentMonth; + inst.drawYear = inst.selectedYear = inst.currentYear; + } + else { + var date = new Date(); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + } + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Action for selecting a new month/year. */ + _selectMonthYear: function(id, select, period) { + var target = $(id); + var inst = this._getInst(target[0]); + inst._selectingMonthYear = false; + inst['selected' + (period == 'M' ? 'Month' : 'Year')] = + inst['draw' + (period == 'M' ? 'Month' : 'Year')] = + parseInt(select.options[select.selectedIndex].value,10); + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Restore input focus after not changing month/year. */ + _clickMonthYear: function(id) { + var target = $(id); + var inst = this._getInst(target[0]); + if (inst.input && inst._selectingMonthYear && !$.browser.msie) + inst.input[0].focus(); + inst._selectingMonthYear = !inst._selectingMonthYear; + }, + + /* Action for selecting a day. */ + _selectDay: function(id, month, year, td) { + var target = $(id); + if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { + return; + } + var inst = this._getInst(target[0]); + inst.selectedDay = inst.currentDay = $('a', td).html(); + inst.selectedMonth = inst.currentMonth = month; + inst.selectedYear = inst.currentYear = year; + if (inst.stayOpen) { + inst.endDay = inst.endMonth = inst.endYear = null; + } + this._selectDate(id, this._formatDate(inst, + inst.currentDay, inst.currentMonth, inst.currentYear)); + if (inst.stayOpen) { + inst.rangeStart = this._daylightSavingAdjust( + new Date(inst.currentYear, inst.currentMonth, inst.currentDay)); + this._updateDatepicker(inst); + } + }, + + /* Erase the input field and hide the date picker. */ + _clearDate: function(id) { + var target = $(id); + var inst = this._getInst(target[0]); + inst.stayOpen = false; + inst.endDay = inst.endMonth = inst.endYear = inst.rangeStart = null; + this._selectDate(target, ''); + }, + + /* Update the input field with the selected date. */ + _selectDate: function(id, dateStr) { + var target = $(id); + var inst = this._getInst(target[0]); + dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); + if (inst.input) + inst.input.val(dateStr); + this._updateAlternate(inst); + var onSelect = this._get(inst, 'onSelect'); + if (onSelect) + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback + else if (inst.input) + inst.input.trigger('change'); // fire the change event + if (inst.inline) + this._updateDatepicker(inst); + else if (!inst.stayOpen) { + this._hideDatepicker(null, this._get(inst, 'duration')); + this._lastInput = inst.input[0]; + if (typeof(inst.input[0]) != 'object') + inst.input[0].focus(); // restore focus + this._lastInput = null; + } + }, + + /* Update any alternate field to synchronise with the main field. */ + _updateAlternate: function(inst) { + var altField = this._get(inst, 'altField'); + if (altField) { // update alternate field too + var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat'); + var date = this._getDate(inst); + dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); + $(altField).each(function() { $(this).val(dateStr); }); + } + }, + + /* Set as beforeShowDay function to prevent selection of weekends. + @param date Date - the date to customise + @return [boolean, string] - is this date selectable?, what is its CSS class? */ + noWeekends: function(date) { + var day = date.getDay(); + return [(day > 0 && day < 6), '']; + }, + + /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. + @param date Date - the date to get the week for + @return number - the number of the week within the year that contains this date */ + iso8601Week: function(date) { + var checkDate = new Date(date.getFullYear(), date.getMonth(), date.getDate()); + var firstMon = new Date(checkDate.getFullYear(), 1 - 1, 4); // First week always contains 4 Jan + var firstDay = firstMon.getDay() || 7; // Day of week: Mon = 1, ..., Sun = 7 + firstMon.setDate(firstMon.getDate() + 1 - firstDay); // Preceding Monday + if (firstDay < 4 && checkDate < firstMon) { // Adjust first three days in year if necessary + checkDate.setDate(checkDate.getDate() - 3); // Generate for previous year + return $.datepicker.iso8601Week(checkDate); + } else if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) { // Check last three days in year + firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7; + if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) { // Adjust if necessary + return 1; + } + } + return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1; // Weeks to given date + }, + + /* Parse a string value into a date object. + See formatDate below for the possible formats. + + @param format string - the expected format of the date + @param value string - the date in the above format + @param settings Object - attributes include: + shortYearCutoff number - the cutoff year for determining the century (optional) + dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + dayNames string[7] - names of the days from Sunday (optional) + monthNamesShort string[12] - abbreviated names of the months (optional) + monthNames string[12] - names of the months (optional) + @return Date - the extracted date value or null if value is blank */ + parseDate: function (format, value, settings) { + if (format == null || value == null) + throw 'Invalid arguments'; + value = (typeof value == 'object' ? value.toString() : value + ''); + if (value == '') + return null; + var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff; + var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort; + var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames; + var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort; + var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames; + var year = -1; + var month = -1; + var day = -1; + var doy = -1; + var literal = false; + // Check whether a format character is doubled + var lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match); + if (matches) + iFormat++; + return matches; + }; + // Extract a number from the string value + var getNumber = function(match) { + lookAhead(match); + var origSize = (match == '@' ? 14 : (match == 'y' ? 4 : (match == 'o' ? 3 : 2))); + var size = origSize; + var num = 0; + while (size > 0 && iValue < value.length && + value.charAt(iValue) >= '0' && value.charAt(iValue) <= '9') { + num = num * 10 + parseInt(value.charAt(iValue++),10); + size--; + } + if (size == origSize) + throw 'Missing number at position ' + iValue; + return num; + }; + // Extract a name from the string value and convert to an index + var getName = function(match, shortNames, longNames) { + var names = (lookAhead(match) ? longNames : shortNames); + var size = 0; + for (var j = 0; j < names.length; j++) + size = Math.max(size, names[j].length); + var name = ''; + var iInit = iValue; + while (size > 0 && iValue < value.length) { + name += value.charAt(iValue++); + for (var i = 0; i < names.length; i++) + if (name == names[i]) + return i + 1; + size--; + } + throw 'Unknown name at position ' + iInit; + }; + // Confirm that a literal character matches the string value + var checkLiteral = function() { + if (value.charAt(iValue) != format.charAt(iFormat)) + throw 'Unexpected literal at position ' + iValue; + iValue++; + }; + var iValue = 0; + for (var iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) + if (format.charAt(iFormat) == "'" && !lookAhead("'")) + literal = false; + else + checkLiteral(); + else + switch (format.charAt(iFormat)) { + case 'd': + day = getNumber('d'); + break; + case 'D': + getName('D', dayNamesShort, dayNames); + break; + case 'o': + doy = getNumber('o'); + break; + case 'm': + month = getNumber('m'); + break; + case 'M': + month = getName('M', monthNamesShort, monthNames); + break; + case 'y': + year = getNumber('y'); + break; + case '@': + var date = new Date(getNumber('@')); + year = date.getFullYear(); + month = date.getMonth() + 1; + day = date.getDate(); + break; + case "'": + if (lookAhead("'")) + checkLiteral(); + else + literal = true; + break; + default: + checkLiteral(); + } + } + if (year == -1) + year = new Date().getFullYear(); + else if (year < 100) + year += new Date().getFullYear() - new Date().getFullYear() % 100 + + (year <= shortYearCutoff ? 0 : -100); + if (doy > -1) { + month = 1; + day = doy; + do { + var dim = this._getDaysInMonth(year, month - 1); + if (day <= dim) + break; + month++; + day -= dim; + } while (true); + } + var date = this._daylightSavingAdjust(new Date(year, month - 1, day)); + if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day) + throw 'Invalid date'; // E.g. 31/02/* + return date; + }, + + /* Standard date formats. */ + ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601) + COOKIE: 'D, dd M yy', + ISO_8601: 'yy-mm-dd', + RFC_822: 'D, d M y', + RFC_850: 'DD, dd-M-y', + RFC_1036: 'D, d M y', + RFC_1123: 'D, d M yy', + RFC_2822: 'D, d M yy', + RSS: 'D, d M y', // RFC 822 + TIMESTAMP: '@', + W3C: 'yy-mm-dd', // ISO 8601 + + /* Format a date object into a string value. + The format can be combinations of the following: + d - day of month (no leading zero) + dd - day of month (two digit) + o - day of year (no leading zeros) + oo - day of year (three digit) + D - day name short + DD - day name long + m - month of year (no leading zero) + mm - month of year (two digit) + M - month name short + MM - month name long + y - year (two digit) + yy - year (four digit) + @ - Unix timestamp (ms since 01/01/1970) + '...' - literal text + '' - single quote + + @param format string - the desired format of the date + @param date Date - the date value to format + @param settings Object - attributes include: + dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + dayNames string[7] - names of the days from Sunday (optional) + monthNamesShort string[12] - abbreviated names of the months (optional) + monthNames string[12] - names of the months (optional) + @return string - the date in the above format */ + formatDate: function (format, date, settings) { + if (!date) + return ''; + var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort; + var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames; + var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort; + var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames; + // Check whether a format character is doubled + var lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match); + if (matches) + iFormat++; + return matches; + }; + // Format a number, with leading zero if necessary + var formatNumber = function(match, value, len) { + var num = '' + value; + if (lookAhead(match)) + while (num.length < len) + num = '0' + num; + return num; + }; + // Format a name, short or long as requested + var formatName = function(match, value, shortNames, longNames) { + return (lookAhead(match) ? longNames[value] : shortNames[value]); + }; + var output = ''; + var literal = false; + if (date) + for (var iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) + if (format.charAt(iFormat) == "'" && !lookAhead("'")) + literal = false; + else + output += format.charAt(iFormat); + else + switch (format.charAt(iFormat)) { + case 'd': + output += formatNumber('d', date.getDate(), 2); + break; + case 'D': + output += formatName('D', date.getDay(), dayNamesShort, dayNames); + break; + case 'o': + var doy = date.getDate(); + for (var m = date.getMonth() - 1; m >= 0; m--) + doy += this._getDaysInMonth(date.getFullYear(), m); + output += formatNumber('o', doy, 3); + break; + case 'm': + output += formatNumber('m', date.getMonth() + 1, 2); + break; + case 'M': + output += formatName('M', date.getMonth(), monthNamesShort, monthNames); + break; + case 'y': + output += (lookAhead('y') ? date.getFullYear() : + (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100); + break; + case '@': + output += date.getTime(); + break; + case "'": + if (lookAhead("'")) + output += "'"; + else + literal = true; + break; + default: + output += format.charAt(iFormat); + } + } + return output; + }, + + /* Extract all possible characters from the date format. */ + _possibleChars: function (format) { + var chars = ''; + var literal = false; + for (var iFormat = 0; iFormat < format.length; iFormat++) + if (literal) + if (format.charAt(iFormat) == "'" && !lookAhead("'")) + literal = false; + else + chars += format.charAt(iFormat); + else + switch (format.charAt(iFormat)) { + case 'd': case 'm': case 'y': case '@': + chars += '0123456789'; + break; + case 'D': case 'M': + return null; // Accept anything + case "'": + if (lookAhead("'")) + chars += "'"; + else + literal = true; + break; + default: + chars += format.charAt(iFormat); + } + return chars; + }, + + /* Get a setting value, defaulting if necessary. */ + _get: function(inst, name) { + return inst.settings[name] !== undefined ? + inst.settings[name] : this._defaults[name]; + }, + + /* Parse existing date and initialise date picker. */ + _setDateFromField: function(inst) { + var dateFormat = this._get(inst, 'dateFormat'); + var dates = inst.input ? inst.input.val() : null; + inst.endDay = inst.endMonth = inst.endYear = null; + var date = defaultDate = this._getDefaultDate(inst); + var settings = this._getFormatConfig(inst); + try { + date = this.parseDate(dateFormat, dates, settings) || defaultDate; + } catch (event) { + this.log(event); + date = defaultDate; + } + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + inst.currentDay = (dates ? date.getDate() : 0); + inst.currentMonth = (dates ? date.getMonth() : 0); + inst.currentYear = (dates ? date.getFullYear() : 0); + this._adjustInstDate(inst); + }, + + /* Retrieve the default date shown on opening. */ + _getDefaultDate: function(inst) { + var date = this._determineDate(this._get(inst, 'defaultDate'), new Date()); + var minDate = this._getMinMaxDate(inst, 'min', true); + var maxDate = this._getMinMaxDate(inst, 'max'); + date = (minDate && date < minDate ? minDate : date); + date = (maxDate && date > maxDate ? maxDate : date); + return date; + }, + + /* A date may be specified as an exact value or a relative one. */ + _determineDate: function(date, defaultDate) { + var offsetNumeric = function(offset) { + var date = new Date(); + date.setDate(date.getDate() + offset); + return date; + }; + var offsetString = function(offset, getDaysInMonth) { + var date = new Date(); + var year = date.getFullYear(); + var month = date.getMonth(); + var day = date.getDate(); + var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g; + var matches = pattern.exec(offset); + while (matches) { + switch (matches[2] || 'd') { + case 'd' : case 'D' : + day += parseInt(matches[1],10); break; + case 'w' : case 'W' : + day += parseInt(matches[1],10) * 7; break; + case 'm' : case 'M' : + month += parseInt(matches[1],10); + day = Math.min(day, getDaysInMonth(year, month)); + break; + case 'y': case 'Y' : + year += parseInt(matches[1],10); + day = Math.min(day, getDaysInMonth(year, month)); + break; + } + matches = pattern.exec(offset); + } + return new Date(year, month, day); + }; + date = (date == null ? defaultDate : + (typeof date == 'string' ? offsetString(date, this._getDaysInMonth) : + (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : date))); + date = (date && date.toString() == 'Invalid Date' ? defaultDate : date); + if (date) { + date.setHours(0); + date.setMinutes(0); + date.setSeconds(0); + date.setMilliseconds(0); + } + return this._daylightSavingAdjust(date); + }, + + /* Handle switch to/from daylight saving. + Hours may be non-zero on daylight saving cut-over: + > 12 when midnight changeover, but then cannot generate + midnight datetime, so jump to 1AM, otherwise reset. + @param date (Date) the date to check + @return (Date) the corrected date */ + _daylightSavingAdjust: function(date) { + if (!date) return null; + date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); + return date; + }, + + /* Set the date(s) directly. */ + _setDate: function(inst, date, endDate) { + var clear = !(date); + var origMonth = inst.selectedMonth; + var origYear = inst.selectedYear; + date = this._determineDate(date, new Date()); + inst.selectedDay = inst.currentDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear(); + if (origMonth != inst.selectedMonth || origYear != inst.selectedYear) + this._notifyChange(inst); + this._adjustInstDate(inst); + if (inst.input) { + inst.input.val(clear ? '' : this._formatDate(inst)); + } + }, + + /* Retrieve the date(s) directly. */ + _getDate: function(inst) { + var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null : + this._daylightSavingAdjust(new Date( + inst.currentYear, inst.currentMonth, inst.currentDay))); + return startDate; + }, + + /* Generate the HTML for the current state of the date picker. */ + _generateHTML: function(inst) { + var today = new Date(); + today = this._daylightSavingAdjust( + new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time + var isRTL = this._get(inst, 'isRTL'); + var showButtonPanel = this._get(inst, 'showButtonPanel'); + var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext'); + var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat'); + var numMonths = this._getNumberOfMonths(inst); + var showCurrentAtPos = this._get(inst, 'showCurrentAtPos'); + var stepMonths = this._get(inst, 'stepMonths'); + var stepBigMonths = this._get(inst, 'stepBigMonths'); + var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1); + var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : + new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + var minDate = this._getMinMaxDate(inst, 'min', true); + var maxDate = this._getMinMaxDate(inst, 'max'); + var drawMonth = inst.drawMonth - showCurrentAtPos; + var drawYear = inst.drawYear; + if (drawMonth < 0) { + drawMonth += 12; + drawYear--; + } + if (maxDate) { + var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), + maxDate.getMonth() - numMonths[1] + 1, maxDate.getDate())); + maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); + while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { + drawMonth--; + if (drawMonth < 0) { + drawMonth = 11; + drawYear--; + } + } + } + inst.drawMonth = drawMonth; + inst.drawYear = drawYear; + var prevText = this._get(inst, 'prevText'); + prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), + this._getFormatConfig(inst))); + var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? + '' + prevText + '' : + (hideIfNoPrevNext ? '' : '' + prevText + '')); + var nextText = this._get(inst, 'nextText'); + nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), + this._getFormatConfig(inst))); + var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? + '' + nextText + '' : + (hideIfNoPrevNext ? '' : '' + nextText + '')); + var currentText = this._get(inst, 'currentText'); + var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today); + currentText = (!navigationAsDateFormat ? currentText : + this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); + var controls = (!inst.inline ? '' : ''); + var buttonPanel = (showButtonPanel) ? '
' + (isRTL ? controls : '') + + (this._isInRange(inst, gotoDate) ? '' : '') + (isRTL ? '' : controls) + '
' : ''; + var firstDay = parseInt(this._get(inst, 'firstDay'),10); + firstDay = (isNaN(firstDay) ? 0 : firstDay); + var dayNames = this._get(inst, 'dayNames'); + var dayNamesShort = this._get(inst, 'dayNamesShort'); + var dayNamesMin = this._get(inst, 'dayNamesMin'); + var monthNames = this._get(inst, 'monthNames'); + var monthNamesShort = this._get(inst, 'monthNamesShort'); + var beforeShowDay = this._get(inst, 'beforeShowDay'); + var showOtherMonths = this._get(inst, 'showOtherMonths'); + var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week; + var endDate = inst.endDay ? this._daylightSavingAdjust( + new Date(inst.endYear, inst.endMonth, inst.endDay)) : currentDate; + var defaultDate = this._getDefaultDate(inst); + var html = ''; + for (var row = 0; row < numMonths[0]; row++) { + var group = ''; + for (var col = 0; col < numMonths[1]; col++) { + var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); + var cornerClass = ' ui-corner-all'; + var calender = ''; + if (isMultiMonth) { + calender += '
'; + } + calender += '
' + + (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') + + (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') + + this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, + selectedDate, row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers + '
' + + ''; + var thead = ''; + for (var dow = 0; dow < 7; dow++) { // days of the week + var day = (dow + firstDay) % 7; + thead += '= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' + + '' + dayNamesMin[day] + ''; + } + calender += thead + ''; + var daysInMonth = this._getDaysInMonth(drawYear, drawMonth); + if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth) + inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); + var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; + var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate + var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); + for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows + calender += ''; + var tbody = ''; + for (var dow = 0; dow < 7; dow++) { // create date picker days + var daySettings = (beforeShowDay ? + beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']); + var otherMonth = (printDate.getMonth() != drawMonth); + var unselectable = otherMonth || !daySettings[0] || + (minDate && printDate < minDate) || (maxDate && printDate > maxDate); + tbody += ''; // display for this month + printDate.setDate(printDate.getDate() + 1); + printDate = this._daylightSavingAdjust(printDate); + } + calender += tbody + ''; + } + drawMonth++; + if (drawMonth > 11) { + drawMonth = 0; + drawYear++; + } + calender += '
' + // actions + (otherMonth ? (showOtherMonths ? printDate.getDate() : ' ') : // display for other months + (unselectable ? '' + printDate.getDate() + '' : '' + printDate.getDate() + '')) + '
' + (isMultiMonth ? '
' + + ((numMonths[0] > 0 && col == numMonths[1]-1) ? '
' : '') : ''); + group += calender; + } + html += group; + } + html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ? + '' : ''); + inst._keyEvent = false; + return html; + }, + + /* Generate the month and year header. */ + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, + selectedDate, secondary, monthNames, monthNamesShort) { + minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate); + var changeMonth = this._get(inst, 'changeMonth'); + var changeYear = this._get(inst, 'changeYear'); + var showMonthAfterYear = this._get(inst, 'showMonthAfterYear'); + var html = '
'; + var monthHtml = ''; + // month selection + if (secondary || !changeMonth) + monthHtml += '' + monthNames[drawMonth] + ' '; + else { + var inMinYear = (minDate && minDate.getFullYear() == drawYear); + var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); + monthHtml += ''; + } + if (!showMonthAfterYear) + html += monthHtml + ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? ' ' : ''); + // year selection + if (secondary || !changeYear) + html += '' + drawYear + ''; + else { + // determine range of years to display + var years = this._get(inst, 'yearRange').split(':'); + var year = 0; + var endYear = 0; + if (years.length != 2) { + year = drawYear - 10; + endYear = drawYear + 10; + } else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') { + year = drawYear + parseInt(years[0], 10); + endYear = drawYear + parseInt(years[1], 10); + } else { + year = parseInt(years[0], 10); + endYear = parseInt(years[1], 10); + } + year = (minDate ? Math.max(year, minDate.getFullYear()) : year); + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); + html += ''; + } + if (showMonthAfterYear) + html += (secondary || changeMonth || changeYear ? ' ' : '') + monthHtml; + html += '
'; // Close datepicker_header + return html; + }, + + /* Adjust one of the date sub-fields. */ + _adjustInstDate: function(inst, offset, period) { + var year = inst.drawYear + (period == 'Y' ? offset : 0); + var month = inst.drawMonth + (period == 'M' ? offset : 0); + var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + + (period == 'D' ? offset : 0); + var date = this._daylightSavingAdjust(new Date(year, month, day)); + // ensure it is within the bounds set + var minDate = this._getMinMaxDate(inst, 'min', true); + var maxDate = this._getMinMaxDate(inst, 'max'); + date = (minDate && date < minDate ? minDate : date); + date = (maxDate && date > maxDate ? maxDate : date); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + if (period == 'M' || period == 'Y') + this._notifyChange(inst); + }, + + /* Notify change of month/year. */ + _notifyChange: function(inst) { + var onChange = this._get(inst, 'onChangeMonthYear'); + if (onChange) + onChange.apply((inst.input ? inst.input[0] : null), + [inst.selectedYear, inst.selectedMonth + 1, inst]); + }, + + /* Determine the number of months to show. */ + _getNumberOfMonths: function(inst) { + var numMonths = this._get(inst, 'numberOfMonths'); + return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths)); + }, + + /* Determine the current maximum date - ensure no time components are set - may be overridden for a range. */ + _getMinMaxDate: function(inst, minMax, checkRange) { + var date = this._determineDate(this._get(inst, minMax + 'Date'), null); + return (!checkRange || !inst.rangeStart ? date : + (!date || inst.rangeStart > date ? inst.rangeStart : date)); + }, + + /* Find the number of days in a given month. */ + _getDaysInMonth: function(year, month) { + return 32 - new Date(year, month, 32).getDate(); + }, + + /* Find the day of the week of the first of a month. */ + _getFirstDayOfMonth: function(year, month) { + return new Date(year, month, 1).getDay(); + }, + + /* Determines if we should allow a "next/prev" month display change. */ + _canAdjustMonth: function(inst, offset, curYear, curMonth) { + var numMonths = this._getNumberOfMonths(inst); + var date = this._daylightSavingAdjust(new Date( + curYear, curMonth + (offset < 0 ? offset : numMonths[1]), 1)); + if (offset < 0) + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); + return this._isInRange(inst, date); + }, + + /* Is the given date in the accepted range? */ + _isInRange: function(inst, date) { + // during range selection, use minimum of selected date and range start + var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust( + new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay))); + newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate); + var minDate = newMinDate || this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); + return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate)); + }, + + /* Provide the configuration settings for formatting/parsing. */ + _getFormatConfig: function(inst) { + var shortYearCutoff = this._get(inst, 'shortYearCutoff'); + shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + return {shortYearCutoff: shortYearCutoff, + dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'), + monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')}; + }, + + /* Format the given date for display. */ + _formatDate: function(inst, day, month, year) { + if (!day) { + inst.currentDay = inst.selectedDay; + inst.currentMonth = inst.selectedMonth; + inst.currentYear = inst.selectedYear; + } + var date = (day ? (typeof day == 'object' ? day : + this._daylightSavingAdjust(new Date(year, month, day))) : + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst)); + } +}); + +/* jQuery extend now ignores nulls! */ +function extendRemove(target, props) { + $.extend(target, props); + for (var name in props) + if (props[name] == null || props[name] == undefined) + target[name] = props[name]; + return target; +}; + +/* Determine whether an object is an array. */ +function isArray(a) { + return (a && (($.browser.safari && typeof a == 'object' && a.length) || + (a.constructor && a.constructor.toString().match(/\Array\(\)/)))); +}; + +/* Invoke the datepicker functionality. + @param options string - a command, optionally followed by additional parameters or + Object - settings for attaching new datepicker functionality + @return jQuery object */ +$.fn.datepicker = function(options){ + + /* Initialise the date picker. */ + if (!$.datepicker.initialized) { + $(document).mousedown($.datepicker._checkExternalClick). + find('body').append($.datepicker.dpDiv); + $.datepicker.initialized = true; + } + + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate')) + return $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this[0]].concat(otherArgs)); + if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string') + return $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this[0]].concat(otherArgs)); + return this.each(function() { + typeof options == 'string' ? + $.datepicker['_' + options + 'Datepicker']. + apply($.datepicker, [this].concat(otherArgs)) : + $.datepicker._attachDatepicker(this, options); + }); +}; + +$.datepicker = new Datepicker(); // singleton instance +$.datepicker.initialized = false; +$.datepicker.uuid = new Date().getTime(); +$.datepicker.version = "1.7.2"; + +// Workaround for #4055 +// Add another global to avoid noConflict issues with inline event handlers +window.DP_jQuery = $; + +})(jQuery); diff --git a/static/development-bundle/ui/ui.dialog.js b/static/development-bundle/ui/ui.dialog.js new file mode 100644 index 0000000..fdd5b26 --- /dev/null +++ b/static/development-bundle/ui/ui.dialog.js @@ -0,0 +1,671 @@ +/* + * jQuery UI Dialog 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * ui.core.js + * ui.draggable.js + * ui.resizable.js + */ +(function($) { + +var setDataSwitch = { + dragStart: "start.draggable", + drag: "drag.draggable", + dragStop: "stop.draggable", + maxHeight: "maxHeight.resizable", + minHeight: "minHeight.resizable", + maxWidth: "maxWidth.resizable", + minWidth: "minWidth.resizable", + resizeStart: "start.resizable", + resize: "drag.resizable", + resizeStop: "stop.resizable" + }, + + uiDialogClasses = + 'ui-dialog ' + + 'ui-widget ' + + 'ui-widget-content ' + + 'ui-corner-all '; + +$.widget("ui.dialog", { + + _init: function() { + this.originalTitle = this.element.attr('title'); + + var self = this, + options = this.options, + + title = options.title || this.originalTitle || ' ', + titleId = $.ui.dialog.getTitleId(this.element), + + uiDialog = (this.uiDialog = $('
')) + .appendTo(document.body) + .hide() + .addClass(uiDialogClasses + options.dialogClass) + .css({ + position: 'absolute', + overflow: 'hidden', + zIndex: options.zIndex + }) + // setting tabIndex makes the div focusable + // setting outline to 0 prevents a border on focus in Mozilla + .attr('tabIndex', -1).css('outline', 0).keydown(function(event) { + (options.closeOnEscape && event.keyCode + && event.keyCode == $.ui.keyCode.ESCAPE && self.close(event)); + }) + .attr({ + role: 'dialog', + 'aria-labelledby': titleId + }) + .mousedown(function(event) { + self.moveToTop(false, event); + }), + + uiDialogContent = this.element + .show() + .removeAttr('title') + .addClass( + 'ui-dialog-content ' + + 'ui-widget-content') + .appendTo(uiDialog), + + uiDialogTitlebar = (this.uiDialogTitlebar = $('
')) + .addClass( + 'ui-dialog-titlebar ' + + 'ui-widget-header ' + + 'ui-corner-all ' + + 'ui-helper-clearfix' + ) + .prependTo(uiDialog), + + uiDialogTitlebarClose = $('') + .addClass( + 'ui-dialog-titlebar-close ' + + 'ui-corner-all' + ) + .attr('role', 'button') + .hover( + function() { + uiDialogTitlebarClose.addClass('ui-state-hover'); + }, + function() { + uiDialogTitlebarClose.removeClass('ui-state-hover'); + } + ) + .focus(function() { + uiDialogTitlebarClose.addClass('ui-state-focus'); + }) + .blur(function() { + uiDialogTitlebarClose.removeClass('ui-state-focus'); + }) + .mousedown(function(ev) { + ev.stopPropagation(); + }) + .click(function(event) { + self.close(event); + return false; + }) + .appendTo(uiDialogTitlebar), + + uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText = $('')) + .addClass( + 'ui-icon ' + + 'ui-icon-closethick' + ) + .text(options.closeText) + .appendTo(uiDialogTitlebarClose), + + uiDialogTitle = $('') + .addClass('ui-dialog-title') + .attr('id', titleId) + .html(title) + .prependTo(uiDialogTitlebar); + + uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection(); + + (options.draggable && $.fn.draggable && this._makeDraggable()); + (options.resizable && $.fn.resizable && this._makeResizable()); + + this._createButtons(options.buttons); + this._isOpen = false; + + (options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe()); + (options.autoOpen && this.open()); + + }, + + destroy: function() { + (this.overlay && this.overlay.destroy()); + this.uiDialog.hide(); + this.element + .unbind('.dialog') + .removeData('dialog') + .removeClass('ui-dialog-content ui-widget-content') + .hide().appendTo('body'); + this.uiDialog.remove(); + + (this.originalTitle && this.element.attr('title', this.originalTitle)); + }, + + close: function(event) { + var self = this; + + if (false === self._trigger('beforeclose', event)) { + return; + } + + (self.overlay && self.overlay.destroy()); + self.uiDialog.unbind('keypress.ui-dialog'); + + (self.options.hide + ? self.uiDialog.hide(self.options.hide, function() { + self._trigger('close', event); + }) + : self.uiDialog.hide() && self._trigger('close', event)); + + $.ui.dialog.overlay.resize(); + + self._isOpen = false; + + // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) + if (self.options.modal) { + var maxZ = 0; + $('.ui-dialog').each(function() { + if (this != self.uiDialog[0]) { + maxZ = Math.max(maxZ, $(this).css('z-index')); + } + }); + $.ui.dialog.maxZ = maxZ; + } + }, + + isOpen: function() { + return this._isOpen; + }, + + // the force parameter allows us to move modal dialogs to their correct + // position on open + moveToTop: function(force, event) { + + if ((this.options.modal && !force) + || (!this.options.stack && !this.options.modal)) { + return this._trigger('focus', event); + } + + if (this.options.zIndex > $.ui.dialog.maxZ) { + $.ui.dialog.maxZ = this.options.zIndex; + } + (this.overlay && this.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = ++$.ui.dialog.maxZ)); + + //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed. + // http://ui.jquery.com/bugs/ticket/3193 + var saveScroll = { scrollTop: this.element.attr('scrollTop'), scrollLeft: this.element.attr('scrollLeft') }; + this.uiDialog.css('z-index', ++$.ui.dialog.maxZ); + this.element.attr(saveScroll); + this._trigger('focus', event); + }, + + open: function() { + if (this._isOpen) { return; } + + var options = this.options, + uiDialog = this.uiDialog; + + this.overlay = options.modal ? new $.ui.dialog.overlay(this) : null; + (uiDialog.next().length && uiDialog.appendTo('body')); + this._size(); + this._position(options.position); + uiDialog.show(options.show); + this.moveToTop(true); + + // prevent tabbing out of modal dialogs + (options.modal && uiDialog.bind('keypress.ui-dialog', function(event) { + if (event.keyCode != $.ui.keyCode.TAB) { + return; + } + + var tabbables = $(':tabbable', this), + first = tabbables.filter(':first')[0], + last = tabbables.filter(':last')[0]; + + if (event.target == last && !event.shiftKey) { + setTimeout(function() { + first.focus(); + }, 1); + } else if (event.target == first && event.shiftKey) { + setTimeout(function() { + last.focus(); + }, 1); + } + })); + + // set focus to the first tabbable element in the content area or the first button + // if there are no tabbable elements, set focus on the dialog itself + $([]) + .add(uiDialog.find('.ui-dialog-content :tabbable:first')) + .add(uiDialog.find('.ui-dialog-buttonpane :tabbable:first')) + .add(uiDialog) + .filter(':first') + .focus(); + + this._trigger('open'); + this._isOpen = true; + }, + + _createButtons: function(buttons) { + var self = this, + hasButtons = false, + uiDialogButtonPane = $('
') + .addClass( + 'ui-dialog-buttonpane ' + + 'ui-widget-content ' + + 'ui-helper-clearfix' + ); + + // if we already have a button pane, remove it + this.uiDialog.find('.ui-dialog-buttonpane').remove(); + + (typeof buttons == 'object' && buttons !== null && + $.each(buttons, function() { return !(hasButtons = true); })); + if (hasButtons) { + $.each(buttons, function(name, fn) { + $('') + .addClass( + 'ui-state-default ' + + 'ui-corner-all' + ) + .text(name) + .click(function() { fn.apply(self.element[0], arguments); }) + .hover( + function() { + $(this).addClass('ui-state-hover'); + }, + function() { + $(this).removeClass('ui-state-hover'); + } + ) + .focus(function() { + $(this).addClass('ui-state-focus'); + }) + .blur(function() { + $(this).removeClass('ui-state-focus'); + }) + .appendTo(uiDialogButtonPane); + }); + uiDialogButtonPane.appendTo(this.uiDialog); + } + }, + + _makeDraggable: function() { + var self = this, + options = this.options, + heightBeforeDrag; + + this.uiDialog.draggable({ + cancel: '.ui-dialog-content', + handle: '.ui-dialog-titlebar', + containment: 'document', + start: function() { + heightBeforeDrag = options.height; + $(this).height($(this).height()).addClass("ui-dialog-dragging"); + (options.dragStart && options.dragStart.apply(self.element[0], arguments)); + }, + drag: function() { + (options.drag && options.drag.apply(self.element[0], arguments)); + }, + stop: function() { + $(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag); + (options.dragStop && options.dragStop.apply(self.element[0], arguments)); + $.ui.dialog.overlay.resize(); + } + }); + }, + + _makeResizable: function(handles) { + handles = (handles === undefined ? this.options.resizable : handles); + var self = this, + options = this.options, + resizeHandles = typeof handles == 'string' + ? handles + : 'n,e,s,w,se,sw,ne,nw'; + + this.uiDialog.resizable({ + cancel: '.ui-dialog-content', + alsoResize: this.element, + maxWidth: options.maxWidth, + maxHeight: options.maxHeight, + minWidth: options.minWidth, + minHeight: options.minHeight, + start: function() { + $(this).addClass("ui-dialog-resizing"); + (options.resizeStart && options.resizeStart.apply(self.element[0], arguments)); + }, + resize: function() { + (options.resize && options.resize.apply(self.element[0], arguments)); + }, + handles: resizeHandles, + stop: function() { + $(this).removeClass("ui-dialog-resizing"); + options.height = $(this).height(); + options.width = $(this).width(); + (options.resizeStop && options.resizeStop.apply(self.element[0], arguments)); + $.ui.dialog.overlay.resize(); + } + }) + .find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se'); + }, + + _position: function(pos) { + var wnd = $(window), doc = $(document), + pTop = doc.scrollTop(), pLeft = doc.scrollLeft(), + minTop = pTop; + + if ($.inArray(pos, ['center','top','right','bottom','left']) >= 0) { + pos = [ + pos == 'right' || pos == 'left' ? pos : 'center', + pos == 'top' || pos == 'bottom' ? pos : 'middle' + ]; + } + if (pos.constructor != Array) { + pos = ['center', 'middle']; + } + if (pos[0].constructor == Number) { + pLeft += pos[0]; + } else { + switch (pos[0]) { + case 'left': + pLeft += 0; + break; + case 'right': + pLeft += wnd.width() - this.uiDialog.outerWidth(); + break; + default: + case 'center': + pLeft += (wnd.width() - this.uiDialog.outerWidth()) / 2; + } + } + if (pos[1].constructor == Number) { + pTop += pos[1]; + } else { + switch (pos[1]) { + case 'top': + pTop += 0; + break; + case 'bottom': + pTop += wnd.height() - this.uiDialog.outerHeight(); + break; + default: + case 'middle': + pTop += (wnd.height() - this.uiDialog.outerHeight()) / 2; + } + } + + // prevent the dialog from being too high (make sure the titlebar + // is accessible) + pTop = Math.max(pTop, minTop); + this.uiDialog.css({top: pTop, left: pLeft}); + }, + + _setData: function(key, value){ + (setDataSwitch[key] && this.uiDialog.data(setDataSwitch[key], value)); + switch (key) { + case "buttons": + this._createButtons(value); + break; + case "closeText": + this.uiDialogTitlebarCloseText.text(value); + break; + case "dialogClass": + this.uiDialog + .removeClass(this.options.dialogClass) + .addClass(uiDialogClasses + value); + break; + case "draggable": + (value + ? this._makeDraggable() + : this.uiDialog.draggable('destroy')); + break; + case "height": + this.uiDialog.height(value); + break; + case "position": + this._position(value); + break; + case "resizable": + var uiDialog = this.uiDialog, + isResizable = this.uiDialog.is(':data(resizable)'); + + // currently resizable, becoming non-resizable + (isResizable && !value && uiDialog.resizable('destroy')); + + // currently resizable, changing handles + (isResizable && typeof value == 'string' && + uiDialog.resizable('option', 'handles', value)); + + // currently non-resizable, becoming resizable + (isResizable || this._makeResizable(value)); + break; + case "title": + $(".ui-dialog-title", this.uiDialogTitlebar).html(value || ' '); + break; + case "width": + this.uiDialog.width(value); + break; + } + + $.widget.prototype._setData.apply(this, arguments); + }, + + _size: function() { + /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content + * divs will both have width and height set, so we need to reset them + */ + var options = this.options; + + // reset content sizing + this.element.css({ + height: 0, + minHeight: 0, + width: 'auto' + }); + + // reset wrapper sizing + // determine the height of all the non-content elements + var nonContentHeight = this.uiDialog.css({ + height: 'auto', + width: options.width + }) + .height(); + + this.element + .css({ + minHeight: Math.max(options.minHeight - nonContentHeight, 0), + height: options.height == 'auto' + ? 'auto' + : Math.max(options.height - nonContentHeight, 0) + }); + } +}); + +$.extend($.ui.dialog, { + version: "1.7.2", + defaults: { + autoOpen: true, + bgiframe: false, + buttons: {}, + closeOnEscape: true, + closeText: 'close', + dialogClass: '', + draggable: true, + hide: null, + height: 'auto', + maxHeight: false, + maxWidth: false, + minHeight: 150, + minWidth: 150, + modal: false, + position: 'center', + resizable: true, + show: null, + stack: true, + title: '', + width: 300, + zIndex: 1000 + }, + + getter: 'isOpen', + + uuid: 0, + maxZ: 0, + + getTitleId: function($el) { + return 'ui-dialog-title-' + ($el.attr('id') || ++this.uuid); + }, + + overlay: function(dialog) { + this.$el = $.ui.dialog.overlay.create(dialog); + } +}); + +$.extend($.ui.dialog.overlay, { + instances: [], + maxZ: 0, + events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','), + function(event) { return event + '.dialog-overlay'; }).join(' '), + create: function(dialog) { + if (this.instances.length === 0) { + // prevent use of anchors and inputs + // we use a setTimeout in case the overlay is created from an + // event that we're going to be cancelling (see #2804) + setTimeout(function() { + // handle $(el).dialog().dialog('close') (see #4065) + if ($.ui.dialog.overlay.instances.length) { + $(document).bind($.ui.dialog.overlay.events, function(event) { + var dialogZ = $(event.target).parents('.ui-dialog').css('zIndex') || 0; + return (dialogZ > $.ui.dialog.overlay.maxZ); + }); + } + }, 1); + + // allow closing by pressing the escape key + $(document).bind('keydown.dialog-overlay', function(event) { + (dialog.options.closeOnEscape && event.keyCode + && event.keyCode == $.ui.keyCode.ESCAPE && dialog.close(event)); + }); + + // handle window resize + $(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize); + } + + var $el = $('
').appendTo(document.body) + .addClass('ui-widget-overlay').css({ + width: this.width(), + height: this.height() + }); + + (dialog.options.bgiframe && $.fn.bgiframe && $el.bgiframe()); + + this.instances.push($el); + return $el; + }, + + destroy: function($el) { + this.instances.splice($.inArray(this.instances, $el), 1); + + if (this.instances.length === 0) { + $([document, window]).unbind('.dialog-overlay'); + } + + $el.remove(); + + // adjust the maxZ to allow other modal dialogs to continue to work (see #4309) + var maxZ = 0; + $.each(this.instances, function() { + maxZ = Math.max(maxZ, this.css('z-index')); + }); + this.maxZ = maxZ; + }, + + height: function() { + // handle IE 6 + if ($.browser.msie && $.browser.version < 7) { + var scrollHeight = Math.max( + document.documentElement.scrollHeight, + document.body.scrollHeight + ); + var offsetHeight = Math.max( + document.documentElement.offsetHeight, + document.body.offsetHeight + ); + + if (scrollHeight < offsetHeight) { + return $(window).height() + 'px'; + } else { + return scrollHeight + 'px'; + } + // handle "good" browsers + } else { + return $(document).height() + 'px'; + } + }, + + width: function() { + // handle IE 6 + if ($.browser.msie && $.browser.version < 7) { + var scrollWidth = Math.max( + document.documentElement.scrollWidth, + document.body.scrollWidth + ); + var offsetWidth = Math.max( + document.documentElement.offsetWidth, + document.body.offsetWidth + ); + + if (scrollWidth < offsetWidth) { + return $(window).width() + 'px'; + } else { + return scrollWidth + 'px'; + } + // handle "good" browsers + } else { + return $(document).width() + 'px'; + } + }, + + resize: function() { + /* If the dialog is draggable and the user drags it past the + * right edge of the window, the document becomes wider so we + * need to stretch the overlay. If the user then drags the + * dialog back to the left, the document will become narrower, + * so we need to shrink the overlay to the appropriate size. + * This is handled by shrinking the overlay before setting it + * to the full document size. + */ + var $overlays = $([]); + $.each($.ui.dialog.overlay.instances, function() { + $overlays = $overlays.add(this); + }); + + $overlays.css({ + width: 0, + height: 0 + }).css({ + width: $.ui.dialog.overlay.width(), + height: $.ui.dialog.overlay.height() + }); + } +}); + +$.extend($.ui.dialog.overlay.prototype, { + destroy: function() { + $.ui.dialog.overlay.destroy(this.$el); + } +}); + +})(jQuery); diff --git a/static/development-bundle/ui/ui.draggable.js b/static/development-bundle/ui/ui.draggable.js new file mode 100644 index 0000000..0402f0e --- /dev/null +++ b/static/development-bundle/ui/ui.draggable.js @@ -0,0 +1,766 @@ +/* + * jQuery UI Draggable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * ui.core.js + */ +(function($) { + +$.widget("ui.draggable", $.extend({}, $.ui.mouse, { + + _init: function() { + + if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position"))) + this.element[0].style.position = 'relative'; + + (this.options.addClasses && this.element.addClass("ui-draggable")); + (this.options.disabled && this.element.addClass("ui-draggable-disabled")); + + this._mouseInit(); + + }, + + destroy: function() { + if(!this.element.data('draggable')) return; + this.element + .removeData("draggable") + .unbind(".draggable") + .removeClass("ui-draggable" + + " ui-draggable-dragging" + + " ui-draggable-disabled"); + this._mouseDestroy(); + }, + + _mouseCapture: function(event) { + + var o = this.options; + + if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle')) + return false; + + //Quit if we're not on a valid handle + this.handle = this._getHandle(event); + if (!this.handle) + return false; + + return true; + + }, + + _mouseStart: function(event) { + + var o = this.options; + + //Create and append the visible helper + this.helper = this._createHelper(event); + + //Cache the helper size + this._cacheHelperProportions(); + + //If ddmanager is used for droppables, set the global draggable + if($.ui.ddmanager) + $.ui.ddmanager.current = this; + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Store the helper's css position + this.cssPosition = this.helper.css("position"); + this.scrollParent = this.helper.scrollParent(); + + //The element's absolute position on the page minus margins + this.offset = this.element.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + //Generate the original position + this.originalPosition = this._generatePosition(event); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied + if(o.cursorAt) + this._adjustOffsetFromHelper(o.cursorAt); + + //Set a containment if given in the options + if(o.containment) + this._setContainment(); + + //Call plugins and callbacks + this._trigger("start", event); + + //Recache the helper size + this._cacheHelperProportions(); + + //Prepare the droppable offsets + if ($.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(this, event); + + this.helper.addClass("ui-draggable-dragging"); + this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position + return true; + }, + + _mouseDrag: function(event, noPropagation) { + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + //Call plugins and callbacks and use the resulting position if something is returned + if (!noPropagation) { + var ui = this._uiHash(); + this._trigger('drag', event, ui); + this.position = ui.position; + } + + if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; + if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; + if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); + + return false; + }, + + _mouseStop: function(event) { + + //If we are using droppables, inform the manager about the drop + var dropped = false; + if ($.ui.ddmanager && !this.options.dropBehaviour) + dropped = $.ui.ddmanager.drop(this, event); + + //if a drop comes from outside (a sortable) + if(this.dropped) { + dropped = this.dropped; + this.dropped = false; + } + + if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { + var self = this; + $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { + self._trigger("stop", event); + self._clear(); + }); + } else { + this._trigger("stop", event); + this._clear(); + } + + return false; + }, + + _getHandle: function(event) { + + var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false; + $(this.options.handle, this.element) + .find("*") + .andSelf() + .each(function() { + if(this == event.target) handle = true; + }); + + return handle; + + }, + + _createHelper: function(event) { + + var o = this.options; + var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone() : this.element); + + if(!helper.parents('body').length) + helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo)); + + if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) + helper.css("position", "absolute"); + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left; + if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top; + if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + }, + + _getParentOffset: function() { + + //Get the offsetParent and cache its position + this.offsetParent = this.helper.offsetParent(); + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information + || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix + po = { top: 0, left: 0 }; + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition == "relative") { + var p = this.element.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.element.css("marginLeft"),10) || 0), + top: (parseInt(this.element.css("marginTop"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var o = this.options; + if(o.containment == 'parent') o.containment = this.helper[0].parentNode; + if(o.containment == 'document' || o.containment == 'window') this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left, + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top + ]; + + if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) { + var ce = $(o.containment)[0]; if(!ce) return; + var co = $(o.containment).offset(); + var over = ($(ce).css("overflow") != 'hidden'); + + this.containment = [ + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, + co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, + co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top + ]; + } else if(o.containment.constructor == Array) { + this.containment = o.containment; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) pos = this.position; + var mod = d == "absolute" ? 1 : -1; + var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + return { + top: ( + pos.top // The absolute mouse position + + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border) + - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) + ), + left: ( + pos.left // The absolute mouse position + + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border) + - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) + ) + }; + + }, + + _generatePosition: function(event) { + + var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + // This is another very weird special case that only happens for relative elements: + // 1. If the css position is relative + // 2. and the scroll parent is the document or similar to the offset parent + // we have to refresh the relative offset during the scroll so there are no jumps + if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) { + this.offset.relative = this._getRelativeOffset(); + } + + var pageX = event.pageX; + var pageY = event.pageY; + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + if(this.originalPosition) { //If we are not dragging yet, we won't check for options + + if(this.containment) { + if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left; + if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top; + if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left; + if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top; + } + + if(o.grid) { + var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; + pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; + pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + } + + return { + top: ( + pageY // The absolute mouse position + - this.offset.click.top // Click offset (relative to the element) + - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.top // The offsetParent's offset without borders (offset + border) + + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) + ), + left: ( + pageX // The absolute mouse position + - this.offset.click.left // Click offset (relative to the element) + - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.left // The offsetParent's offset without borders (offset + border) + + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) + ) + }; + + }, + + _clear: function() { + this.helper.removeClass("ui-draggable-dragging"); + if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove(); + //if($.ui.ddmanager) $.ui.ddmanager.current = null; + this.helper = null; + this.cancelHelperRemoval = false; + }, + + // From now on bulk stuff - mainly helpers + + _trigger: function(type, event, ui) { + ui = ui || this._uiHash(); + $.ui.plugin.call(this, type, [event, ui]); + if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins + return $.widget.prototype._trigger.call(this, type, event, ui); + }, + + plugins: {}, + + _uiHash: function(event) { + return { + helper: this.helper, + position: this.position, + absolutePosition: this.positionAbs, //deprecated + offset: this.positionAbs + }; + } + +})); + +$.extend($.ui.draggable, { + version: "1.7.2", + eventPrefix: "drag", + defaults: { + addClasses: true, + appendTo: "parent", + axis: false, + cancel: ":input,option", + connectToSortable: false, + containment: false, + cursor: "auto", + cursorAt: false, + delay: 0, + distance: 1, + grid: false, + handle: false, + helper: "original", + iframeFix: false, + opacity: false, + refreshPositions: false, + revert: false, + revertDuration: 500, + scope: "default", + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + snap: false, + snapMode: "both", + snapTolerance: 20, + stack: false, + zIndex: false + } +}); + +$.ui.plugin.add("draggable", "connectToSortable", { + start: function(event, ui) { + + var inst = $(this).data("draggable"), o = inst.options, + uiSortable = $.extend({}, ui, { item: inst.element }); + inst.sortables = []; + $(o.connectToSortable).each(function() { + var sortable = $.data(this, 'sortable'); + if (sortable && !sortable.options.disabled) { + inst.sortables.push({ + instance: sortable, + shouldRevert: sortable.options.revert + }); + sortable._refreshItems(); //Do a one-time refresh at start to refresh the containerCache + sortable._trigger("activate", event, uiSortable); + } + }); + + }, + stop: function(event, ui) { + + //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper + var inst = $(this).data("draggable"), + uiSortable = $.extend({}, ui, { item: inst.element }); + + $.each(inst.sortables, function() { + if(this.instance.isOver) { + + this.instance.isOver = 0; + + inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance + this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work) + + //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid' + if(this.shouldRevert) this.instance.options.revert = true; + + //Trigger the stop of the sortable + this.instance._mouseStop(event); + + this.instance.options.helper = this.instance.options._helper; + + //If the helper has been the original item, restore properties in the sortable + if(inst.options.helper == 'original') + this.instance.currentItem.css({ top: 'auto', left: 'auto' }); + + } else { + this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance + this.instance._trigger("deactivate", event, uiSortable); + } + + }); + + }, + drag: function(event, ui) { + + var inst = $(this).data("draggable"), self = this; + + var checkPos = function(o) { + var dyClick = this.offset.click.top, dxClick = this.offset.click.left; + var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left; + var itemHeight = o.height, itemWidth = o.width; + var itemTop = o.top, itemLeft = o.left; + + return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth); + }; + + $.each(inst.sortables, function(i) { + + //Copy over some variables to allow calling the sortable's native _intersectsWith + this.instance.positionAbs = inst.positionAbs; + this.instance.helperProportions = inst.helperProportions; + this.instance.offset.click = inst.offset.click; + + if(this.instance._intersectsWith(this.instance.containerCache)) { + + //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once + if(!this.instance.isOver) { + + this.instance.isOver = 1; + //Now we fake the start of dragging for the sortable instance, + //by cloning the list group item, appending it to the sortable and using it as inst.currentItem + //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one) + this.instance.currentItem = $(self).clone().appendTo(this.instance.element).data("sortable-item", true); + this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it + this.instance.options.helper = function() { return ui.helper[0]; }; + + event.target = this.instance.currentItem[0]; + this.instance._mouseCapture(event, true); + this.instance._mouseStart(event, true, true); + + //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes + this.instance.offset.click.top = inst.offset.click.top; + this.instance.offset.click.left = inst.offset.click.left; + this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left; + this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top; + + inst._trigger("toSortable", event); + inst.dropped = this.instance.element; //draggable revert needs that + //hack so receive/update callbacks work (mostly) + inst.currentItem = inst.element; + this.instance.fromOutside = inst; + + } + + //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable + if(this.instance.currentItem) this.instance._mouseDrag(event); + + } else { + + //If it doesn't intersect with the sortable, and it intersected before, + //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval + if(this.instance.isOver) { + + this.instance.isOver = 0; + this.instance.cancelHelperRemoval = true; + + //Prevent reverting on this forced stop + this.instance.options.revert = false; + + // The out event needs to be triggered independently + this.instance._trigger('out', event, this.instance._uiHash(this.instance)); + + this.instance._mouseStop(event, true); + this.instance.options.helper = this.instance.options._helper; + + //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size + this.instance.currentItem.remove(); + if(this.instance.placeholder) this.instance.placeholder.remove(); + + inst._trigger("fromSortable", event); + inst.dropped = false; //draggable revert needs that + } + + }; + + }); + + } +}); + +$.ui.plugin.add("draggable", "cursor", { + start: function(event, ui) { + var t = $('body'), o = $(this).data('draggable').options; + if (t.css("cursor")) o._cursor = t.css("cursor"); + t.css("cursor", o.cursor); + }, + stop: function(event, ui) { + var o = $(this).data('draggable').options; + if (o._cursor) $('body').css("cursor", o._cursor); + } +}); + +$.ui.plugin.add("draggable", "iframeFix", { + start: function(event, ui) { + var o = $(this).data('draggable').options; + $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() { + $('
') + .css({ + width: this.offsetWidth+"px", height: this.offsetHeight+"px", + position: "absolute", opacity: "0.001", zIndex: 1000 + }) + .css($(this).offset()) + .appendTo("body"); + }); + }, + stop: function(event, ui) { + $("div.ui-draggable-iframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers + } +}); + +$.ui.plugin.add("draggable", "opacity", { + start: function(event, ui) { + var t = $(ui.helper), o = $(this).data('draggable').options; + if(t.css("opacity")) o._opacity = t.css("opacity"); + t.css('opacity', o.opacity); + }, + stop: function(event, ui) { + var o = $(this).data('draggable').options; + if(o._opacity) $(ui.helper).css('opacity', o._opacity); + } +}); + +$.ui.plugin.add("draggable", "scroll", { + start: function(event, ui) { + var i = $(this).data("draggable"); + if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset(); + }, + drag: function(event, ui) { + + var i = $(this).data("draggable"), o = i.options, scrolled = false; + + if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') { + + if(!o.axis || o.axis != 'x') { + if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed; + else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed; + } + + if(!o.axis || o.axis != 'y') { + if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed; + else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed; + } + + } else { + + if(!o.axis || o.axis != 'x') { + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + } + + if(!o.axis || o.axis != 'y') { + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + } + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(i, event); + + } +}); + +$.ui.plugin.add("draggable", "snap", { + start: function(event, ui) { + + var i = $(this).data("draggable"), o = i.options; + i.snapElements = []; + + $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() { + var $t = $(this); var $o = $t.offset(); + if(this != i.element[0]) i.snapElements.push({ + item: this, + width: $t.outerWidth(), height: $t.outerHeight(), + top: $o.top, left: $o.left + }); + }); + + }, + drag: function(event, ui) { + + var inst = $(this).data("draggable"), o = inst.options; + var d = o.snapTolerance; + + var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, + y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; + + for (var i = inst.snapElements.length - 1; i >= 0; i--){ + + var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width, + t = inst.snapElements[i].top, b = t + inst.snapElements[i].height; + + //Yes, I know, this is insane ;) + if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) { + if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + inst.snapElements[i].snapping = false; + continue; + } + + if(o.snapMode != 'inner') { + var ts = Math.abs(t - y2) <= d; + var bs = Math.abs(b - y1) <= d; + var ls = Math.abs(l - x2) <= d; + var rs = Math.abs(r - x1) <= d; + if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top; + if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top; + if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left; + if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left; + } + + var first = (ts || bs || ls || rs); + + if(o.snapMode != 'outer') { + var ts = Math.abs(t - y1) <= d; + var bs = Math.abs(b - y2) <= d; + var ls = Math.abs(l - x1) <= d; + var rs = Math.abs(r - x2) <= d; + if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top; + if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top; + if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left; + if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left; + } + + if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) + (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + inst.snapElements[i].snapping = (ts || bs || ls || rs || first); + + }; + + } +}); + +$.ui.plugin.add("draggable", "stack", { + start: function(event, ui) { + + var o = $(this).data("draggable").options; + + var group = $.makeArray($(o.stack.group)).sort(function(a,b) { + return (parseInt($(a).css("zIndex"),10) || o.stack.min) - (parseInt($(b).css("zIndex"),10) || o.stack.min); + }); + + $(group).each(function(i) { + this.style.zIndex = o.stack.min + i; + }); + + this[0].style.zIndex = o.stack.min + group.length; + + } +}); + +$.ui.plugin.add("draggable", "zIndex", { + start: function(event, ui) { + var t = $(ui.helper), o = $(this).data("draggable").options; + if(t.css("zIndex")) o._zIndex = t.css("zIndex"); + t.css('zIndex', o.zIndex); + }, + stop: function(event, ui) { + var o = $(this).data("draggable").options; + if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex); + } +}); + +})(jQuery); diff --git a/static/development-bundle/ui/ui.droppable.js b/static/development-bundle/ui/ui.droppable.js new file mode 100644 index 0000000..8e7be33 --- /dev/null +++ b/static/development-bundle/ui/ui.droppable.js @@ -0,0 +1,282 @@ +/* + * jQuery UI Droppable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Droppables + * + * Depends: + * ui.core.js + * ui.draggable.js + */ +(function($) { + +$.widget("ui.droppable", { + + _init: function() { + + var o = this.options, accept = o.accept; + this.isover = 0; this.isout = 1; + + this.options.accept = this.options.accept && $.isFunction(this.options.accept) ? this.options.accept : function(d) { + return d.is(accept); + }; + + //Store the droppable's proportions + this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight }; + + // Add the reference and positions to the manager + $.ui.ddmanager.droppables[this.options.scope] = $.ui.ddmanager.droppables[this.options.scope] || []; + $.ui.ddmanager.droppables[this.options.scope].push(this); + + (this.options.addClasses && this.element.addClass("ui-droppable")); + + }, + + destroy: function() { + var drop = $.ui.ddmanager.droppables[this.options.scope]; + for ( var i = 0; i < drop.length; i++ ) + if ( drop[i] == this ) + drop.splice(i, 1); + + this.element + .removeClass("ui-droppable ui-droppable-disabled") + .removeData("droppable") + .unbind(".droppable"); + }, + + _setData: function(key, value) { + + if(key == 'accept') { + this.options.accept = value && $.isFunction(value) ? value : function(d) { + return d.is(value); + }; + } else { + $.widget.prototype._setData.apply(this, arguments); + } + + }, + + _activate: function(event) { + var draggable = $.ui.ddmanager.current; + if(this.options.activeClass) this.element.addClass(this.options.activeClass); + (draggable && this._trigger('activate', event, this.ui(draggable))); + }, + + _deactivate: function(event) { + var draggable = $.ui.ddmanager.current; + if(this.options.activeClass) this.element.removeClass(this.options.activeClass); + (draggable && this._trigger('deactivate', event, this.ui(draggable))); + }, + + _over: function(event) { + + var draggable = $.ui.ddmanager.current; + if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element + + if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.hoverClass) this.element.addClass(this.options.hoverClass); + this._trigger('over', event, this.ui(draggable)); + } + + }, + + _out: function(event) { + + var draggable = $.ui.ddmanager.current; + if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element + + if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); + this._trigger('out', event, this.ui(draggable)); + } + + }, + + _drop: function(event,custom) { + + var draggable = custom || $.ui.ddmanager.current; + if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element + + var childrenIntersection = false; + this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() { + var inst = $.data(this, 'droppable'); + if(inst.options.greedy && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)) { + childrenIntersection = true; return false; + } + }); + if(childrenIntersection) return false; + + if(this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + if(this.options.activeClass) this.element.removeClass(this.options.activeClass); + if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass); + this._trigger('drop', event, this.ui(draggable)); + return this.element; + } + + return false; + + }, + + ui: function(c) { + return { + draggable: (c.currentItem || c.element), + helper: c.helper, + position: c.position, + absolutePosition: c.positionAbs, //deprecated + offset: c.positionAbs + }; + } + +}); + +$.extend($.ui.droppable, { + version: "1.7.2", + eventPrefix: 'drop', + defaults: { + accept: '*', + activeClass: false, + addClasses: true, + greedy: false, + hoverClass: false, + scope: 'default', + tolerance: 'intersect' + } +}); + +$.ui.intersect = function(draggable, droppable, toleranceMode) { + + if (!droppable.offset) return false; + + var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width, + y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height; + var l = droppable.offset.left, r = l + droppable.proportions.width, + t = droppable.offset.top, b = t + droppable.proportions.height; + + switch (toleranceMode) { + case 'fit': + return (l < x1 && x2 < r + && t < y1 && y2 < b); + break; + case 'intersect': + return (l < x1 + (draggable.helperProportions.width / 2) // Right Half + && x2 - (draggable.helperProportions.width / 2) < r // Left Half + && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half + && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half + break; + case 'pointer': + var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left), + draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top), + isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width); + return isOver; + break; + case 'touch': + return ( + (y1 >= t && y1 <= b) || // Top edge touching + (y2 >= t && y2 <= b) || // Bottom edge touching + (y1 < t && y2 > b) // Surrounded vertically + ) && ( + (x1 >= l && x1 <= r) || // Left edge touching + (x2 >= l && x2 <= r) || // Right edge touching + (x1 < l && x2 > r) // Surrounded horizontally + ); + break; + default: + return false; + break; + } + +}; + +/* + This manager tracks offsets of draggables and droppables +*/ +$.ui.ddmanager = { + current: null, + droppables: { 'default': [] }, + prepareOffsets: function(t, event) { + + var m = $.ui.ddmanager.droppables[t.options.scope]; + var type = event ? event.type : null; // workaround for #2317 + var list = (t.currentItem || t.element).find(":data(droppable)").andSelf(); + + droppablesLoop: for (var i = 0; i < m.length; i++) { + + if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted + for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item + m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue + + m[i].offset = m[i].element.offset(); + m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight }; + + if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables + + } + + }, + drop: function(draggable, event) { + + var dropped = false; + $.each($.ui.ddmanager.droppables[draggable.options.scope], function() { + + if(!this.options) return; + if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) + dropped = this._drop.call(this, event); + + if (!this.options.disabled && this.visible && this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) { + this.isout = 1; this.isover = 0; + this._deactivate.call(this, event); + } + + }); + return dropped; + + }, + drag: function(draggable, event) { + + //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse. + if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event); + + //Run through all droppables and check their positions based on specific tolerance options + + $.each($.ui.ddmanager.droppables[draggable.options.scope], function() { + + if(this.options.disabled || this.greedyChild || !this.visible) return; + var intersects = $.ui.intersect(draggable, this, this.options.tolerance); + + var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null); + if(!c) return; + + var parentInstance; + if (this.options.greedy) { + var parent = this.element.parents(':data(droppable):eq(0)'); + if (parent.length) { + parentInstance = $.data(parent[0], 'droppable'); + parentInstance.greedyChild = (c == 'isover' ? 1 : 0); + } + } + + // we just moved into a greedy child + if (parentInstance && c == 'isover') { + parentInstance['isover'] = 0; + parentInstance['isout'] = 1; + parentInstance._out.call(parentInstance, event); + } + + this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0; + this[c == "isover" ? "_over" : "_out"].call(this, event); + + // we just moved out of a greedy child + if (parentInstance && c == 'isout') { + parentInstance['isout'] = 0; + parentInstance['isover'] = 1; + parentInstance._over.call(parentInstance, event); + } + }); + + } +}; + +})(jQuery); diff --git a/static/development-bundle/ui/ui.progressbar.js b/static/development-bundle/ui/ui.progressbar.js new file mode 100644 index 0000000..30aac98 --- /dev/null +++ b/static/development-bundle/ui/ui.progressbar.js @@ -0,0 +1,116 @@ +/* + * jQuery UI Progressbar 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * ui.core.js + */ +(function($) { + +$.widget("ui.progressbar", { + + _init: function() { + + this.element + .addClass("ui-progressbar" + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all") + .attr({ + role: "progressbar", + "aria-valuemin": this._valueMin(), + "aria-valuemax": this._valueMax(), + "aria-valuenow": this._value() + }); + + this.valueDiv = $('
').appendTo(this.element); + + this._refreshValue(); + + }, + + destroy: function() { + + this.element + .removeClass("ui-progressbar" + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all") + .removeAttr("role") + .removeAttr("aria-valuemin") + .removeAttr("aria-valuemax") + .removeAttr("aria-valuenow") + .removeData("progressbar") + .unbind(".progressbar"); + + this.valueDiv.remove(); + + $.widget.prototype.destroy.apply(this, arguments); + + }, + + value: function(newValue) { + if (newValue === undefined) { + return this._value(); + } + + this._setData('value', newValue); + return this; + }, + + _setData: function(key, value) { + + switch (key) { + case 'value': + this.options.value = value; + this._refreshValue(); + this._trigger('change', null, {}); + break; + } + + $.widget.prototype._setData.apply(this, arguments); + + }, + + _value: function() { + + var val = this.options.value; + if (val < this._valueMin()) val = this._valueMin(); + if (val > this._valueMax()) val = this._valueMax(); + + return val; + + }, + + _valueMin: function() { + var valueMin = 0; + return valueMin; + }, + + _valueMax: function() { + var valueMax = 100; + return valueMax; + }, + + _refreshValue: function() { + var value = this.value(); + this.valueDiv[value == this._valueMax() ? 'addClass' : 'removeClass']("ui-corner-right"); + this.valueDiv.width(value + '%'); + this.element.attr("aria-valuenow", value); + } + +}); + +$.extend($.ui.progressbar, { + version: "1.7.2", + defaults: { + value: 0 + } +}); + +})(jQuery); diff --git a/static/development-bundle/ui/ui.resizable.js b/static/development-bundle/ui/ui.resizable.js new file mode 100644 index 0000000..6172d6c --- /dev/null +++ b/static/development-bundle/ui/ui.resizable.js @@ -0,0 +1,800 @@ +/* + * jQuery UI Resizable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Resizables + * + * Depends: + * ui.core.js + */ +(function($) { + +$.widget("ui.resizable", $.extend({}, $.ui.mouse, { + + _init: function() { + + var self = this, o = this.options; + this.element.addClass("ui-resizable"); + + $.extend(this, { + _aspectRatio: !!(o.aspectRatio), + aspectRatio: o.aspectRatio, + originalElement: this.element, + _proportionallyResizeElements: [], + _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null + }); + + //Wrap the element if it cannot hold child nodes + if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { + + //Opera fix for relative positioning + if (/relative/.test(this.element.css('position')) && $.browser.opera) + this.element.css({ position: 'relative', top: 'auto', left: 'auto' }); + + //Create a wrapper element and set the wrapper to the new current internal element + this.element.wrap( + $('
').css({ + position: this.element.css('position'), + width: this.element.outerWidth(), + height: this.element.outerHeight(), + top: this.element.css('top'), + left: this.element.css('left') + }) + ); + + //Overwrite the original this.element + this.element = this.element.parent().data( + "resizable", this.element.data('resizable') + ); + + this.elementIsWrapper = true; + + //Move margins to the wrapper + this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") }); + this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0}); + + //Prevent Safari textarea resize + this.originalResizeStyle = this.originalElement.css('resize'); + this.originalElement.css('resize', 'none'); + + //Push the actual element to our proportionallyResize internal array + this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' })); + + // avoid IE jump (hard set the margin) + this.originalElement.css({ margin: this.originalElement.css('margin') }); + + // fix handlers offset + this._proportionallyResize(); + + } + + this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' }); + if(this.handles.constructor == String) { + + if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw'; + var n = this.handles.split(","); this.handles = {}; + + for(var i = 0; i < n.length; i++) { + + var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle; + var axis = $('
'); + + // increase zIndex of sw, se, ne, nw axis + //TODO : this modifies original option + if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex }); + + //TODO : What's going on here? + if ('se' == handle) { + axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se'); + }; + + //Insert into internal handles object and append to element + this.handles[handle] = '.ui-resizable-'+handle; + this.element.append(axis); + } + + } + + this._renderAxis = function(target) { + + target = target || this.element; + + for(var i in this.handles) { + + if(this.handles[i].constructor == String) + this.handles[i] = $(this.handles[i], this.element).show(); + + //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls) + if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { + + var axis = $(this.handles[i], this.element), padWrapper = 0; + + //Checking the correct pad and border + padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth(); + + //The padding type i have to apply... + var padPos = [ 'padding', + /ne|nw|n/.test(i) ? 'Top' : + /se|sw|s/.test(i) ? 'Bottom' : + /^e$/.test(i) ? 'Right' : 'Left' ].join(""); + + target.css(padPos, padWrapper); + + this._proportionallyResize(); + + } + + //TODO: What's that good for? There's not anything to be executed left + if(!$(this.handles[i]).length) + continue; + + } + }; + + //TODO: make renderAxis a prototype function + this._renderAxis(this.element); + + this._handles = $('.ui-resizable-handle', this.element) + .disableSelection(); + + //Matching axis name + this._handles.mouseover(function() { + if (!self.resizing) { + if (this.className) + var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); + //Axis, default = se + self.axis = axis && axis[1] ? axis[1] : 'se'; + } + }); + + //If we want to auto hide the elements + if (o.autoHide) { + this._handles.hide(); + $(this.element) + .addClass("ui-resizable-autohide") + .hover(function() { + $(this).removeClass("ui-resizable-autohide"); + self._handles.show(); + }, + function(){ + if (!self.resizing) { + $(this).addClass("ui-resizable-autohide"); + self._handles.hide(); + } + }); + } + + //Initialize the mouse interaction + this._mouseInit(); + + }, + + destroy: function() { + + this._mouseDestroy(); + + var _destroy = function(exp) { + $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") + .removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove(); + }; + + //TODO: Unwrap at same DOM position + if (this.elementIsWrapper) { + _destroy(this.element); + var wrapper = this.element; + wrapper.parent().append( + this.originalElement.css({ + position: wrapper.css('position'), + width: wrapper.outerWidth(), + height: wrapper.outerHeight(), + top: wrapper.css('top'), + left: wrapper.css('left') + }) + ).end().remove(); + } + + this.originalElement.css('resize', this.originalResizeStyle); + _destroy(this.originalElement); + + }, + + _mouseCapture: function(event) { + + var handle = false; + for(var i in this.handles) { + if($(this.handles[i])[0] == event.target) handle = true; + } + + return this.options.disabled || !!handle; + + }, + + _mouseStart: function(event) { + + var o = this.options, iniPos = this.element.position(), el = this.element; + + this.resizing = true; + this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() }; + + // bugfix for http://dev.jquery.com/ticket/1749 + if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) { + el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left }); + } + + //Opera fixing relative position + if ($.browser.opera && (/relative/).test(el.css('position'))) + el.css({ position: 'relative', top: 'auto', left: 'auto' }); + + this._renderProxy(); + + var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top')); + + if (o.containment) { + curleft += $(o.containment).scrollLeft() || 0; + curtop += $(o.containment).scrollTop() || 0; + } + + //Store needed variables + this.offset = this.helper.offset(); + this.position = { left: curleft, top: curtop }; + this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; + this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() }; + this.originalPosition = { left: curleft, top: curtop }; + this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() }; + this.originalMousePosition = { left: event.pageX, top: event.pageY }; + + //Aspect Ratio + this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1); + + var cursor = $('.ui-resizable-' + this.axis).css('cursor'); + $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor); + + el.addClass("ui-resizable-resizing"); + this._propagate("start", event); + return true; + }, + + _mouseDrag: function(event) { + + //Increase performance, avoid regex + var el = this.helper, o = this.options, props = {}, + self = this, smp = this.originalMousePosition, a = this.axis; + + var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0; + var trigger = this._change[a]; + if (!trigger) return false; + + // Calculate the attrs that will be change + var data = trigger.apply(this, [event, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff; + + if (this._aspectRatio || event.shiftKey) + data = this._updateRatio(data, event); + + data = this._respectSize(data, event); + + // plugins callbacks need to be called first + this._propagate("resize", event); + + el.css({ + top: this.position.top + "px", left: this.position.left + "px", + width: this.size.width + "px", height: this.size.height + "px" + }); + + if (!this._helper && this._proportionallyResizeElements.length) + this._proportionallyResize(); + + this._updateCache(data); + + // calling the user callback at the end + this._trigger('resize', event, this.ui()); + + return false; + }, + + _mouseStop: function(event) { + + this.resizing = false; + var o = this.options, self = this; + + if(this._helper) { + var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName), + soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height, + soffsetw = ista ? 0 : self.sizeDiff.width; + + var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) }, + left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null, + top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null; + + if (!o.animate) + this.element.css($.extend(s, { top: top, left: left })); + + self.helper.height(self.size.height); + self.helper.width(self.size.width); + + if (this._helper && !o.animate) this._proportionallyResize(); + } + + $('body').css('cursor', 'auto'); + + this.element.removeClass("ui-resizable-resizing"); + + this._propagate("stop", event); + + if (this._helper) this.helper.remove(); + return false; + + }, + + _updateCache: function(data) { + var o = this.options; + this.offset = this.helper.offset(); + if (isNumber(data.left)) this.position.left = data.left; + if (isNumber(data.top)) this.position.top = data.top; + if (isNumber(data.height)) this.size.height = data.height; + if (isNumber(data.width)) this.size.width = data.width; + }, + + _updateRatio: function(data, event) { + + var o = this.options, cpos = this.position, csize = this.size, a = this.axis; + + if (data.height) data.width = (csize.height * this.aspectRatio); + else if (data.width) data.height = (csize.width / this.aspectRatio); + + if (a == 'sw') { + data.left = cpos.left + (csize.width - data.width); + data.top = null; + } + if (a == 'nw') { + data.top = cpos.top + (csize.height - data.height); + data.left = cpos.left + (csize.width - data.width); + } + + return data; + }, + + _respectSize: function(data, event) { + + var el = this.helper, o = this.options, pRatio = this._aspectRatio || event.shiftKey, a = this.axis, + ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height), + isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height); + + if (isminw) data.width = o.minWidth; + if (isminh) data.height = o.minHeight; + if (ismaxw) data.width = o.maxWidth; + if (ismaxh) data.height = o.maxHeight; + + var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height; + var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a); + + if (isminw && cw) data.left = dw - o.minWidth; + if (ismaxw && cw) data.left = dw - o.maxWidth; + if (isminh && ch) data.top = dh - o.minHeight; + if (ismaxh && ch) data.top = dh - o.maxHeight; + + // fixing jump error on top/left - bug #2330 + var isNotwh = !data.width && !data.height; + if (isNotwh && !data.left && data.top) data.top = null; + else if (isNotwh && !data.top && data.left) data.left = null; + + return data; + }, + + _proportionallyResize: function() { + + var o = this.options; + if (!this._proportionallyResizeElements.length) return; + var element = this.helper || this.element; + + for (var i=0; i < this._proportionallyResizeElements.length; i++) { + + var prel = this._proportionallyResizeElements[i]; + + if (!this.borderDif) { + var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')], + p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')]; + + this.borderDif = $.map(b, function(v, i) { + var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0; + return border + padding; + }); + } + + if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length))) + continue; + + prel.css({ + height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0, + width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0 + }); + + }; + + }, + + _renderProxy: function() { + + var el = this.element, o = this.options; + this.elementOffset = el.offset(); + + if(this._helper) { + + this.helper = this.helper || $('
'); + + // fix ie6 offset TODO: This seems broken + var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0), + pxyoffset = ( ie6 ? 2 : -1 ); + + this.helper.addClass(this._helper).css({ + width: this.element.outerWidth() + pxyoffset, + height: this.element.outerHeight() + pxyoffset, + position: 'absolute', + left: this.elementOffset.left - ie6offset +'px', + top: this.elementOffset.top - ie6offset +'px', + zIndex: ++o.zIndex //TODO: Don't modify option + }); + + this.helper + .appendTo("body") + .disableSelection(); + + } else { + this.helper = this.element; + } + + }, + + _change: { + e: function(event, dx, dy) { + return { width: this.originalSize.width + dx }; + }, + w: function(event, dx, dy) { + var o = this.options, cs = this.originalSize, sp = this.originalPosition; + return { left: sp.left + dx, width: cs.width - dx }; + }, + n: function(event, dx, dy) { + var o = this.options, cs = this.originalSize, sp = this.originalPosition; + return { top: sp.top + dy, height: cs.height - dy }; + }, + s: function(event, dx, dy) { + return { height: this.originalSize.height + dy }; + }, + se: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); + }, + sw: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); + }, + ne: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy])); + }, + nw: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy])); + } + }, + + _propagate: function(n, event) { + $.ui.plugin.call(this, n, [event, this.ui()]); + (n != "resize" && this._trigger(n, event, this.ui())); + }, + + plugins: {}, + + ui: function() { + return { + originalElement: this.originalElement, + element: this.element, + helper: this.helper, + position: this.position, + size: this.size, + originalSize: this.originalSize, + originalPosition: this.originalPosition + }; + } + +})); + +$.extend($.ui.resizable, { + version: "1.7.2", + eventPrefix: "resize", + defaults: { + alsoResize: false, + animate: false, + animateDuration: "slow", + animateEasing: "swing", + aspectRatio: false, + autoHide: false, + cancel: ":input,option", + containment: false, + delay: 0, + distance: 1, + ghost: false, + grid: false, + handles: "e,s,se", + helper: false, + maxHeight: null, + maxWidth: null, + minHeight: 10, + minWidth: 10, + zIndex: 1000 + } +}); + +/* + * Resizable Extensions + */ + +$.ui.plugin.add("resizable", "alsoResize", { + + start: function(event, ui) { + + var self = $(this).data("resizable"), o = self.options; + + _store = function(exp) { + $(exp).each(function() { + $(this).data("resizable-alsoresize", { + width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10), + left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10) + }); + }); + }; + + if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) { + if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); } + else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); } + }else{ + _store(o.alsoResize); + } + }, + + resize: function(event, ui){ + var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition; + + var delta = { + height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0, + top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0 + }, + + _alsoResize = function(exp, c) { + $(exp).each(function() { + var el = $(this), start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left']; + + $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) { + var sum = (start[prop]||0) + (delta[prop]||0); + if (sum && sum >= 0) + style[prop] = sum || null; + }); + + //Opera fixing relative position + if (/relative/.test(el.css('position')) && $.browser.opera) { + self._revertToRelativePosition = true; + el.css({ position: 'absolute', top: 'auto', left: 'auto' }); + } + + el.css(style); + }); + }; + + if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) { + $.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); }); + }else{ + _alsoResize(o.alsoResize); + } + }, + + stop: function(event, ui){ + var self = $(this).data("resizable"); + + //Opera fixing relative position + if (self._revertToRelativePosition && $.browser.opera) { + self._revertToRelativePosition = false; + el.css({ position: 'relative' }); + } + + $(this).removeData("resizable-alsoresize-start"); + } +}); + +$.ui.plugin.add("resizable", "animate", { + + stop: function(event, ui) { + var self = $(this).data("resizable"), o = self.options; + + var pr = self._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName), + soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height, + soffsetw = ista ? 0 : self.sizeDiff.width; + + var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) }, + left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null, + top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null; + + self.element.animate( + $.extend(style, top && left ? { top: top, left: left } : {}), { + duration: o.animateDuration, + easing: o.animateEasing, + step: function() { + + var data = { + width: parseInt(self.element.css('width'), 10), + height: parseInt(self.element.css('height'), 10), + top: parseInt(self.element.css('top'), 10), + left: parseInt(self.element.css('left'), 10) + }; + + if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height }); + + // propagating resize, and updating values for each animation step + self._updateCache(data); + self._propagate("resize", event); + + } + } + ); + } + +}); + +$.ui.plugin.add("resizable", "containment", { + + start: function(event, ui) { + var self = $(this).data("resizable"), o = self.options, el = self.element; + var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc; + if (!ce) return; + + self.containerElement = $(ce); + + if (/document/.test(oc) || oc == document) { + self.containerOffset = { left: 0, top: 0 }; + self.containerPosition = { left: 0, top: 0 }; + + self.parentData = { + element: $(document), left: 0, top: 0, + width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight + }; + } + + // i'm a node, so compute top, left, right, bottom + else { + var element = $(ce), p = []; + $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); }); + + self.containerOffset = element.offset(); + self.containerPosition = element.position(); + self.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) }; + + var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width, + width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch); + + self.parentData = { + element: ce, left: co.left, top: co.top, width: width, height: height + }; + } + }, + + resize: function(event, ui) { + var self = $(this).data("resizable"), o = self.options, + ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position, + pRatio = self._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement; + + if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co; + + if (cp.left < (self._helper ? co.left : 0)) { + self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left)); + if (pRatio) self.size.height = self.size.width / o.aspectRatio; + self.position.left = o.helper ? co.left : 0; + } + + if (cp.top < (self._helper ? co.top : 0)) { + self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top); + if (pRatio) self.size.width = self.size.height * o.aspectRatio; + self.position.top = self._helper ? co.top : 0; + } + + self.offset.left = self.parentData.left+self.position.left; + self.offset.top = self.parentData.top+self.position.top; + + var woset = Math.abs( (self._helper ? self.offset.left - cop.left : (self.offset.left - cop.left)) + self.sizeDiff.width ), + hoset = Math.abs( (self._helper ? self.offset.top - cop.top : (self.offset.top - co.top)) + self.sizeDiff.height ); + + var isParent = self.containerElement.get(0) == self.element.parent().get(0), + isOffsetRelative = /relative|absolute/.test(self.containerElement.css('position')); + + if(isParent && isOffsetRelative) woset -= self.parentData.left; + + if (woset + self.size.width >= self.parentData.width) { + self.size.width = self.parentData.width - woset; + if (pRatio) self.size.height = self.size.width / self.aspectRatio; + } + + if (hoset + self.size.height >= self.parentData.height) { + self.size.height = self.parentData.height - hoset; + if (pRatio) self.size.width = self.size.height * self.aspectRatio; + } + }, + + stop: function(event, ui){ + var self = $(this).data("resizable"), o = self.options, cp = self.position, + co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement; + + var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height; + + if (self._helper && !o.animate && (/relative/).test(ce.css('position'))) + $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); + + if (self._helper && !o.animate && (/static/).test(ce.css('position'))) + $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h }); + + } +}); + +$.ui.plugin.add("resizable", "ghost", { + + start: function(event, ui) { + + var self = $(this).data("resizable"), o = self.options, cs = self.size; + + self.ghost = self.originalElement.clone(); + self.ghost + .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 }) + .addClass('ui-resizable-ghost') + .addClass(typeof o.ghost == 'string' ? o.ghost : ''); + + self.ghost.appendTo(self.helper); + + }, + + resize: function(event, ui){ + var self = $(this).data("resizable"), o = self.options; + if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width }); + }, + + stop: function(event, ui){ + var self = $(this).data("resizable"), o = self.options; + if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0)); + } + +}); + +$.ui.plugin.add("resizable", "grid", { + + resize: function(event, ui) { + var self = $(this).data("resizable"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey; + o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid; + var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1); + + if (/^(se|s|e)$/.test(a)) { + self.size.width = os.width + ox; + self.size.height = os.height + oy; + } + else if (/^(ne)$/.test(a)) { + self.size.width = os.width + ox; + self.size.height = os.height + oy; + self.position.top = op.top - oy; + } + else if (/^(sw)$/.test(a)) { + self.size.width = os.width + ox; + self.size.height = os.height + oy; + self.position.left = op.left - ox; + } + else { + self.size.width = os.width + ox; + self.size.height = os.height + oy; + self.position.top = op.top - oy; + self.position.left = op.left - ox; + } + } + +}); + +var num = function(v) { + return parseInt(v, 10) || 0; +}; + +var isNumber = function(value) { + return !isNaN(parseInt(value, 10)); +}; + +})(jQuery); diff --git a/static/development-bundle/ui/ui.selectable.js b/static/development-bundle/ui/ui.selectable.js new file mode 100644 index 0000000..08f99cf --- /dev/null +++ b/static/development-bundle/ui/ui.selectable.js @@ -0,0 +1,257 @@ +/* + * jQuery UI Selectable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Selectables + * + * Depends: + * ui.core.js + */ +(function($) { + +$.widget("ui.selectable", $.extend({}, $.ui.mouse, { + + _init: function() { + var self = this; + + this.element.addClass("ui-selectable"); + + this.dragged = false; + + // cache selectee children based on filter + var selectees; + this.refresh = function() { + selectees = $(self.options.filter, self.element[0]); + selectees.each(function() { + var $this = $(this); + var pos = $this.offset(); + $.data(this, "selectable-item", { + element: this, + $element: $this, + left: pos.left, + top: pos.top, + right: pos.left + $this.outerWidth(), + bottom: pos.top + $this.outerHeight(), + startselected: false, + selected: $this.hasClass('ui-selected'), + selecting: $this.hasClass('ui-selecting'), + unselecting: $this.hasClass('ui-unselecting') + }); + }); + }; + this.refresh(); + + this.selectees = selectees.addClass("ui-selectee"); + + this._mouseInit(); + + this.helper = $(document.createElement('div')) + .css({border:'1px dotted black'}) + .addClass("ui-selectable-helper"); + }, + + destroy: function() { + this.element + .removeClass("ui-selectable ui-selectable-disabled") + .removeData("selectable") + .unbind(".selectable"); + this._mouseDestroy(); + }, + + _mouseStart: function(event) { + var self = this; + + this.opos = [event.pageX, event.pageY]; + + if (this.options.disabled) + return; + + var options = this.options; + + this.selectees = $(options.filter, this.element[0]); + + this._trigger("start", event); + + $(options.appendTo).append(this.helper); + // position helper (lasso) + this.helper.css({ + "z-index": 100, + "position": "absolute", + "left": event.clientX, + "top": event.clientY, + "width": 0, + "height": 0 + }); + + if (options.autoRefresh) { + this.refresh(); + } + + this.selectees.filter('.ui-selected').each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.startselected = true; + if (!event.metaKey) { + selectee.$element.removeClass('ui-selected'); + selectee.selected = false; + selectee.$element.addClass('ui-unselecting'); + selectee.unselecting = true; + // selectable UNSELECTING callback + self._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + }); + + $(event.target).parents().andSelf().each(function() { + var selectee = $.data(this, "selectable-item"); + if (selectee) { + selectee.$element.removeClass("ui-unselecting").addClass('ui-selecting'); + selectee.unselecting = false; + selectee.selecting = true; + selectee.selected = true; + // selectable SELECTING callback + self._trigger("selecting", event, { + selecting: selectee.element + }); + return false; + } + }); + + }, + + _mouseDrag: function(event) { + var self = this; + this.dragged = true; + + if (this.options.disabled) + return; + + var options = this.options; + + var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY; + if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; } + if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; } + this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1}); + + this.selectees.each(function() { + var selectee = $.data(this, "selectable-item"); + //prevent helper from being selected if appendTo: selectable + if (!selectee || selectee.element == self.element[0]) + return; + var hit = false; + if (options.tolerance == 'touch') { + hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) ); + } else if (options.tolerance == 'fit') { + hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2); + } + + if (hit) { + // SELECT + if (selectee.selected) { + selectee.$element.removeClass('ui-selected'); + selectee.selected = false; + } + if (selectee.unselecting) { + selectee.$element.removeClass('ui-unselecting'); + selectee.unselecting = false; + } + if (!selectee.selecting) { + selectee.$element.addClass('ui-selecting'); + selectee.selecting = true; + // selectable SELECTING callback + self._trigger("selecting", event, { + selecting: selectee.element + }); + } + } else { + // UNSELECT + if (selectee.selecting) { + if (event.metaKey && selectee.startselected) { + selectee.$element.removeClass('ui-selecting'); + selectee.selecting = false; + selectee.$element.addClass('ui-selected'); + selectee.selected = true; + } else { + selectee.$element.removeClass('ui-selecting'); + selectee.selecting = false; + if (selectee.startselected) { + selectee.$element.addClass('ui-unselecting'); + selectee.unselecting = true; + } + // selectable UNSELECTING callback + self._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + if (selectee.selected) { + if (!event.metaKey && !selectee.startselected) { + selectee.$element.removeClass('ui-selected'); + selectee.selected = false; + + selectee.$element.addClass('ui-unselecting'); + selectee.unselecting = true; + // selectable UNSELECTING callback + self._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + } + }); + + return false; + }, + + _mouseStop: function(event) { + var self = this; + + this.dragged = false; + + var options = this.options; + + $('.ui-unselecting', this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass('ui-unselecting'); + selectee.unselecting = false; + selectee.startselected = false; + self._trigger("unselected", event, { + unselected: selectee.element + }); + }); + $('.ui-selecting', this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass('ui-selecting').addClass('ui-selected'); + selectee.selecting = false; + selectee.selected = true; + selectee.startselected = true; + self._trigger("selected", event, { + selected: selectee.element + }); + }); + this._trigger("stop", event); + + this.helper.remove(); + + return false; + } + +})); + +$.extend($.ui.selectable, { + version: "1.7.2", + defaults: { + appendTo: 'body', + autoRefresh: true, + cancel: ":input,option", + delay: 0, + distance: 0, + filter: '*', + tolerance: 'touch' + } +}); + +})(jQuery); diff --git a/static/development-bundle/ui/ui.slider.js b/static/development-bundle/ui/ui.slider.js new file mode 100644 index 0000000..f466a69 --- /dev/null +++ b/static/development-bundle/ui/ui.slider.js @@ -0,0 +1,558 @@ +/* + * jQuery UI Slider 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Slider + * + * Depends: + * ui.core.js + */ + +(function($) { + +$.widget("ui.slider", $.extend({}, $.ui.mouse, { + + _init: function() { + + var self = this, o = this.options; + this._keySliding = false; + this._handleIndex = null; + this._detectOrientation(); + this._mouseInit(); + + this.element + .addClass("ui-slider" + + " ui-slider-" + this.orientation + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all"); + + this.range = $([]); + + if (o.range) { + + if (o.range === true) { + this.range = $('
'); + if (!o.values) o.values = [this._valueMin(), this._valueMin()]; + if (o.values.length && o.values.length != 2) { + o.values = [o.values[0], o.values[0]]; + } + } else { + this.range = $('
'); + } + + this.range + .appendTo(this.element) + .addClass("ui-slider-range"); + + if (o.range == "min" || o.range == "max") { + this.range.addClass("ui-slider-range-" + o.range); + } + + // note: this isn't the most fittingly semantic framework class for this element, + // but worked best visually with a variety of themes + this.range.addClass("ui-widget-header"); + + } + + if ($(".ui-slider-handle", this.element).length == 0) + $('
') + .appendTo(this.element) + .addClass("ui-slider-handle"); + + if (o.values && o.values.length) { + while ($(".ui-slider-handle", this.element).length < o.values.length) + $('') + .appendTo(this.element) + .addClass("ui-slider-handle"); + } + + this.handles = $(".ui-slider-handle", this.element) + .addClass("ui-state-default" + + " ui-corner-all"); + + this.handle = this.handles.eq(0); + + this.handles.add(this.range).filter("a") + .click(function(event) { + event.preventDefault(); + }) + .hover(function() { + if (!o.disabled) { + $(this).addClass('ui-state-hover'); + } + }, function() { + $(this).removeClass('ui-state-hover'); + }) + .focus(function() { + if (!o.disabled) { + $(".ui-slider .ui-state-focus").removeClass('ui-state-focus'); $(this).addClass('ui-state-focus'); + } else { + $(this).blur(); + } + }) + .blur(function() { + $(this).removeClass('ui-state-focus'); + }); + + this.handles.each(function(i) { + $(this).data("index.ui-slider-handle", i); + }); + + this.handles.keydown(function(event) { + + var ret = true; + + var index = $(this).data("index.ui-slider-handle"); + + if (self.options.disabled) + return; + + switch (event.keyCode) { + case $.ui.keyCode.HOME: + case $.ui.keyCode.END: + case $.ui.keyCode.UP: + case $.ui.keyCode.RIGHT: + case $.ui.keyCode.DOWN: + case $.ui.keyCode.LEFT: + ret = false; + if (!self._keySliding) { + self._keySliding = true; + $(this).addClass("ui-state-active"); + self._start(event, index); + } + break; + } + + var curVal, newVal, step = self._step(); + if (self.options.values && self.options.values.length) { + curVal = newVal = self.values(index); + } else { + curVal = newVal = self.value(); + } + + switch (event.keyCode) { + case $.ui.keyCode.HOME: + newVal = self._valueMin(); + break; + case $.ui.keyCode.END: + newVal = self._valueMax(); + break; + case $.ui.keyCode.UP: + case $.ui.keyCode.RIGHT: + if(curVal == self._valueMax()) return; + newVal = curVal + step; + break; + case $.ui.keyCode.DOWN: + case $.ui.keyCode.LEFT: + if(curVal == self._valueMin()) return; + newVal = curVal - step; + break; + } + + self._slide(event, index, newVal); + + return ret; + + }).keyup(function(event) { + + var index = $(this).data("index.ui-slider-handle"); + + if (self._keySliding) { + self._stop(event, index); + self._change(event, index); + self._keySliding = false; + $(this).removeClass("ui-state-active"); + } + + }); + + this._refreshValue(); + + }, + + destroy: function() { + + this.handles.remove(); + this.range.remove(); + + this.element + .removeClass("ui-slider" + + " ui-slider-horizontal" + + " ui-slider-vertical" + + " ui-slider-disabled" + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all") + .removeData("slider") + .unbind(".slider"); + + this._mouseDestroy(); + + }, + + _mouseCapture: function(event) { + + var o = this.options; + + if (o.disabled) + return false; + + this.elementSize = { + width: this.element.outerWidth(), + height: this.element.outerHeight() + }; + this.elementOffset = this.element.offset(); + + var position = { x: event.pageX, y: event.pageY }; + var normValue = this._normValueFromMouse(position); + + var distance = this._valueMax() - this._valueMin() + 1, closestHandle; + var self = this, index; + this.handles.each(function(i) { + var thisDistance = Math.abs(normValue - self.values(i)); + if (distance > thisDistance) { + distance = thisDistance; + closestHandle = $(this); + index = i; + } + }); + + // workaround for bug #3736 (if both handles of a range are at 0, + // the first is always used as the one with least distance, + // and moving it is obviously prevented by preventing negative ranges) + if(o.range == true && this.values(1) == o.min) { + closestHandle = $(this.handles[++index]); + } + + this._start(event, index); + + self._handleIndex = index; + + closestHandle + .addClass("ui-state-active") + .focus(); + + var offset = closestHandle.offset(); + var mouseOverHandle = !$(event.target).parents().andSelf().is('.ui-slider-handle'); + this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { + left: event.pageX - offset.left - (closestHandle.width() / 2), + top: event.pageY - offset.top + - (closestHandle.height() / 2) + - (parseInt(closestHandle.css('borderTopWidth'),10) || 0) + - (parseInt(closestHandle.css('borderBottomWidth'),10) || 0) + + (parseInt(closestHandle.css('marginTop'),10) || 0) + }; + + normValue = this._normValueFromMouse(position); + this._slide(event, index, normValue); + return true; + + }, + + _mouseStart: function(event) { + return true; + }, + + _mouseDrag: function(event) { + + var position = { x: event.pageX, y: event.pageY }; + var normValue = this._normValueFromMouse(position); + + this._slide(event, this._handleIndex, normValue); + + return false; + + }, + + _mouseStop: function(event) { + + this.handles.removeClass("ui-state-active"); + this._stop(event, this._handleIndex); + this._change(event, this._handleIndex); + this._handleIndex = null; + this._clickOffset = null; + + return false; + + }, + + _detectOrientation: function() { + this.orientation = this.options.orientation == 'vertical' ? 'vertical' : 'horizontal'; + }, + + _normValueFromMouse: function(position) { + + var pixelTotal, pixelMouse; + if ('horizontal' == this.orientation) { + pixelTotal = this.elementSize.width; + pixelMouse = position.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0); + } else { + pixelTotal = this.elementSize.height; + pixelMouse = position.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0); + } + + var percentMouse = (pixelMouse / pixelTotal); + if (percentMouse > 1) percentMouse = 1; + if (percentMouse < 0) percentMouse = 0; + if ('vertical' == this.orientation) + percentMouse = 1 - percentMouse; + + var valueTotal = this._valueMax() - this._valueMin(), + valueMouse = percentMouse * valueTotal, + valueMouseModStep = valueMouse % this.options.step, + normValue = this._valueMin() + valueMouse - valueMouseModStep; + + if (valueMouseModStep > (this.options.step / 2)) + normValue += this.options.step; + + // Since JavaScript has problems with large floats, round + // the final value to 5 digits after the decimal point (see #4124) + return parseFloat(normValue.toFixed(5)); + + }, + + _start: function(event, index) { + var uiHash = { + handle: this.handles[index], + value: this.value() + }; + if (this.options.values && this.options.values.length) { + uiHash.value = this.values(index); + uiHash.values = this.values(); + } + this._trigger("start", event, uiHash); + }, + + _slide: function(event, index, newVal) { + + var handle = this.handles[index]; + + if (this.options.values && this.options.values.length) { + + var otherVal = this.values(index ? 0 : 1); + + if ((this.options.values.length == 2 && this.options.range === true) && + ((index == 0 && newVal > otherVal) || (index == 1 && newVal < otherVal))){ + newVal = otherVal; + } + + if (newVal != this.values(index)) { + var newValues = this.values(); + newValues[index] = newVal; + // A slide can be canceled by returning false from the slide callback + var allowed = this._trigger("slide", event, { + handle: this.handles[index], + value: newVal, + values: newValues + }); + var otherVal = this.values(index ? 0 : 1); + if (allowed !== false) { + this.values(index, newVal, ( event.type == 'mousedown' && this.options.animate ), true); + } + } + + } else { + + if (newVal != this.value()) { + // A slide can be canceled by returning false from the slide callback + var allowed = this._trigger("slide", event, { + handle: this.handles[index], + value: newVal + }); + if (allowed !== false) { + this._setData('value', newVal, ( event.type == 'mousedown' && this.options.animate )); + } + + } + + } + + }, + + _stop: function(event, index) { + var uiHash = { + handle: this.handles[index], + value: this.value() + }; + if (this.options.values && this.options.values.length) { + uiHash.value = this.values(index); + uiHash.values = this.values(); + } + this._trigger("stop", event, uiHash); + }, + + _change: function(event, index) { + var uiHash = { + handle: this.handles[index], + value: this.value() + }; + if (this.options.values && this.options.values.length) { + uiHash.value = this.values(index); + uiHash.values = this.values(); + } + this._trigger("change", event, uiHash); + }, + + value: function(newValue) { + + if (arguments.length) { + this._setData("value", newValue); + this._change(null, 0); + } + + return this._value(); + + }, + + values: function(index, newValue, animated, noPropagation) { + + if (arguments.length > 1) { + this.options.values[index] = newValue; + this._refreshValue(animated); + if(!noPropagation) this._change(null, index); + } + + if (arguments.length) { + if (this.options.values && this.options.values.length) { + return this._values(index); + } else { + return this.value(); + } + } else { + return this._values(); + } + + }, + + _setData: function(key, value, animated) { + + $.widget.prototype._setData.apply(this, arguments); + + switch (key) { + case 'disabled': + if (value) { + this.handles.filter(".ui-state-focus").blur(); + this.handles.removeClass("ui-state-hover"); + this.handles.attr("disabled", "disabled"); + } else { + this.handles.removeAttr("disabled"); + } + case 'orientation': + + this._detectOrientation(); + + this.element + .removeClass("ui-slider-horizontal ui-slider-vertical") + .addClass("ui-slider-" + this.orientation); + this._refreshValue(animated); + break; + case 'value': + this._refreshValue(animated); + break; + } + + }, + + _step: function() { + var step = this.options.step; + return step; + }, + + _value: function() { + + var val = this.options.value; + if (val < this._valueMin()) val = this._valueMin(); + if (val > this._valueMax()) val = this._valueMax(); + + return val; + + }, + + _values: function(index) { + + if (arguments.length) { + var val = this.options.values[index]; + if (val < this._valueMin()) val = this._valueMin(); + if (val > this._valueMax()) val = this._valueMax(); + + return val; + } else { + return this.options.values; + } + + }, + + _valueMin: function() { + var valueMin = this.options.min; + return valueMin; + }, + + _valueMax: function() { + var valueMax = this.options.max; + return valueMax; + }, + + _refreshValue: function(animate) { + + var oRange = this.options.range, o = this.options, self = this; + + if (this.options.values && this.options.values.length) { + var vp0, vp1; + this.handles.each(function(i, j) { + var valPercent = (self.values(i) - self._valueMin()) / (self._valueMax() - self._valueMin()) * 100; + var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%'; + $(this).stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate); + if (self.options.range === true) { + if (self.orientation == 'horizontal') { + (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ left: valPercent + '%' }, o.animate); + (i == 1) && self.range[animate ? 'animate' : 'css']({ width: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate }); + } else { + (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ bottom: (valPercent) + '%' }, o.animate); + (i == 1) && self.range[animate ? 'animate' : 'css']({ height: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate }); + } + } + lastValPercent = valPercent; + }); + } else { + var value = this.value(), + valueMin = this._valueMin(), + valueMax = this._valueMax(), + valPercent = valueMax != valueMin + ? (value - valueMin) / (valueMax - valueMin) * 100 + : 0; + var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%'; + this.handle.stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate); + + (oRange == "min") && (this.orientation == "horizontal") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ width: valPercent + '%' }, o.animate); + (oRange == "max") && (this.orientation == "horizontal") && this.range[animate ? 'animate' : 'css']({ width: (100 - valPercent) + '%' }, { queue: false, duration: o.animate }); + (oRange == "min") && (this.orientation == "vertical") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ height: valPercent + '%' }, o.animate); + (oRange == "max") && (this.orientation == "vertical") && this.range[animate ? 'animate' : 'css']({ height: (100 - valPercent) + '%' }, { queue: false, duration: o.animate }); + } + + } + +})); + +$.extend($.ui.slider, { + getter: "value values", + version: "1.7.2", + eventPrefix: "slide", + defaults: { + animate: false, + delay: 0, + distance: 0, + max: 100, + min: 0, + orientation: 'horizontal', + range: false, + step: 1, + value: 0, + values: null + } +}); + +})(jQuery); diff --git a/static/development-bundle/ui/ui.sortable.js b/static/development-bundle/ui/ui.sortable.js new file mode 100644 index 0000000..5460850 --- /dev/null +++ b/static/development-bundle/ui/ui.sortable.js @@ -0,0 +1,1019 @@ +/* + * jQuery UI Sortable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Sortables + * + * Depends: + * ui.core.js + */ +(function($) { + +$.widget("ui.sortable", $.extend({}, $.ui.mouse, { + _init: function() { + + var o = this.options; + this.containerCache = {}; + this.element.addClass("ui-sortable"); + + //Get the items + this.refresh(); + + //Let's determine if the items are floating + this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false; + + //Let's determine the parent's offset + this.offset = this.element.offset(); + + //Initialize mouse events for interaction + this._mouseInit(); + + }, + + destroy: function() { + this.element + .removeClass("ui-sortable ui-sortable-disabled") + .removeData("sortable") + .unbind(".sortable"); + this._mouseDestroy(); + + for ( var i = this.items.length - 1; i >= 0; i-- ) + this.items[i].item.removeData("sortable-item"); + }, + + _mouseCapture: function(event, overrideHandle) { + + if (this.reverting) { + return false; + } + + if(this.options.disabled || this.options.type == 'static') return false; + + //We have to refresh the items data once first + this._refreshItems(event); + + //Find out if the clicked node (or one of its parents) is a actual item in this.items + var currentItem = null, self = this, nodes = $(event.target).parents().each(function() { + if($.data(this, 'sortable-item') == self) { + currentItem = $(this); + return false; + } + }); + if($.data(event.target, 'sortable-item') == self) currentItem = $(event.target); + + if(!currentItem) return false; + if(this.options.handle && !overrideHandle) { + var validHandle = false; + + $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; }); + if(!validHandle) return false; + } + + this.currentItem = currentItem; + this._removeCurrentsFromItems(); + return true; + + }, + + _mouseStart: function(event, overrideHandle, noActivation) { + + var o = this.options, self = this; + this.currentContainer = this; + + //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture + this.refreshPositions(); + + //Create and append the visible helper + this.helper = this._createHelper(event); + + //Cache the helper size + this._cacheHelperProportions(); + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Get the next scrolling parent + this.scrollParent = this.helper.scrollParent(); + + //The element's absolute position on the page minus margins + this.offset = this.currentItem.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + // Only after we got the offset, we can change the helper's position to absolute + // TODO: Still need to figure out a way to make relative sorting possible + this.helper.css("position", "absolute"); + this.cssPosition = this.helper.css("position"); + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + //Generate the original position + this.originalPosition = this._generatePosition(event); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied + if(o.cursorAt) + this._adjustOffsetFromHelper(o.cursorAt); + + //Cache the former DOM position + this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; + + //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way + if(this.helper[0] != this.currentItem[0]) { + this.currentItem.hide(); + } + + //Create the placeholder + this._createPlaceholder(); + + //Set a containment if given in the options + if(o.containment) + this._setContainment(); + + if(o.cursor) { // cursor option + if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor"); + $('body').css("cursor", o.cursor); + } + + if(o.opacity) { // opacity option + if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity"); + this.helper.css("opacity", o.opacity); + } + + if(o.zIndex) { // zIndex option + if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex"); + this.helper.css("zIndex", o.zIndex); + } + + //Prepare scrolling + if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') + this.overflowOffset = this.scrollParent.offset(); + + //Call callbacks + this._trigger("start", event, this._uiHash()); + + //Recache the helper size + if(!this._preserveHelperProportions) + this._cacheHelperProportions(); + + + //Post 'activate' events to possible containers + if(!noActivation) { + for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, self._uiHash(this)); } + } + + //Prepare possible droppables + if($.ui.ddmanager) + $.ui.ddmanager.current = this; + + if ($.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(this, event); + + this.dragging = true; + + this.helper.addClass("ui-sortable-helper"); + this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position + return true; + + }, + + _mouseDrag: function(event) { + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + if (!this.lastPositionAbs) { + this.lastPositionAbs = this.positionAbs; + } + + //Do scrolling + if(this.options.scroll) { + var o = this.options, scrolled = false; + if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') { + + if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; + else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; + + if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; + else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; + + } else { + + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) + $.ui.ddmanager.prepareOffsets(this, event); + } + + //Regenerate the absolute position used for position checks + this.positionAbs = this._convertPositionTo("absolute"); + + //Set the helper position + if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px'; + if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px'; + + //Rearrange + for (var i = this.items.length - 1; i >= 0; i--) { + + //Cache variables and intersection, continue if no intersection + var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item); + if (!intersection) continue; + + if(itemElement != this.currentItem[0] //cannot intersect with itself + && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before + && !$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked + && (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true) + ) { + + this.direction = intersection == 1 ? "down" : "up"; + + if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) { + this._rearrange(event, item); + } else { + break; + } + + this._trigger("change", event, this._uiHash()); + break; + } + } + + //Post events to containers + this._contactContainers(event); + + //Interconnect with droppables + if($.ui.ddmanager) $.ui.ddmanager.drag(this, event); + + //Call callbacks + this._trigger('sort', event, this._uiHash()); + + this.lastPositionAbs = this.positionAbs; + return false; + + }, + + _mouseStop: function(event, noPropagation) { + + if(!event) return; + + //If we are using droppables, inform the manager about the drop + if ($.ui.ddmanager && !this.options.dropBehaviour) + $.ui.ddmanager.drop(this, event); + + if(this.options.revert) { + var self = this; + var cur = self.placeholder.offset(); + + self.reverting = true; + + $(this.helper).animate({ + left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), + top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) + }, parseInt(this.options.revert, 10) || 500, function() { + self._clear(event); + }); + } else { + this._clear(event, noPropagation); + } + + return false; + + }, + + cancel: function() { + + var self = this; + + if(this.dragging) { + + this._mouseUp(); + + if(this.options.helper == "original") + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + else + this.currentItem.show(); + + //Post deactivating events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + this.containers[i]._trigger("deactivate", null, self._uiHash(this)); + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", null, self._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove(); + + $.extend(this, { + helper: null, + dragging: false, + reverting: false, + _noFinalSort: null + }); + + if(this.domPosition.prev) { + $(this.domPosition.prev).after(this.currentItem); + } else { + $(this.domPosition.parent).prepend(this.currentItem); + } + + return true; + + }, + + serialize: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected); + var str = []; o = o || {}; + + $(items).each(function() { + var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/)); + if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2])); + }); + + return str.join('&'); + + }, + + toArray: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected); + var ret = []; o = o || {}; + + items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); }); + return ret; + + }, + + /* Be careful with the following core functions */ + _intersectsWith: function(item) { + + var x1 = this.positionAbs.left, + x2 = x1 + this.helperProportions.width, + y1 = this.positionAbs.top, + y2 = y1 + this.helperProportions.height; + + var l = item.left, + r = l + item.width, + t = item.top, + b = t + item.height; + + var dyClick = this.offset.click.top, + dxClick = this.offset.click.left; + + var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r; + + if( this.options.tolerance == "pointer" + || this.options.forcePointerForContainers + || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height']) + ) { + return isOverElement; + } else { + + return (l < x1 + (this.helperProportions.width / 2) // Right Half + && x2 - (this.helperProportions.width / 2) < r // Left Half + && t < y1 + (this.helperProportions.height / 2) // Bottom Half + && y2 - (this.helperProportions.height / 2) < b ); // Top Half + + } + }, + + _intersectsWithPointer: function(item) { + + var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), + isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), + isOverElement = isOverElementHeight && isOverElementWidth, + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (!isOverElement) + return false; + + return this.floating ? + ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 ) + : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) ); + + }, + + _intersectsWithSides: function(item) { + + var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), + isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (this.floating && horizontalDirection) { + return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf)); + } else { + return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf)); + } + + }, + + _getDragVerticalDirection: function() { + var delta = this.positionAbs.top - this.lastPositionAbs.top; + return delta != 0 && (delta > 0 ? "down" : "up"); + }, + + _getDragHorizontalDirection: function() { + var delta = this.positionAbs.left - this.lastPositionAbs.left; + return delta != 0 && (delta > 0 ? "right" : "left"); + }, + + refresh: function(event) { + this._refreshItems(event); + this.refreshPositions(); + }, + + _connectWith: function() { + var options = this.options; + return options.connectWith.constructor == String + ? [options.connectWith] + : options.connectWith; + }, + + _getItemsAsjQuery: function(connected) { + + var self = this; + var items = []; + var queries = []; + var connectWith = this._connectWith(); + + if(connectWith && connected) { + for (var i = connectWith.length - 1; i >= 0; i--){ + var cur = $(connectWith[i]); + for (var j = cur.length - 1; j >= 0; j--){ + var inst = $.data(cur[j], 'sortable'); + if(inst && inst != this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper"), inst]); + } + }; + }; + } + + queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper"), this]); + + for (var i = queries.length - 1; i >= 0; i--){ + queries[i][0].each(function() { + items.push(this); + }); + }; + + return $(items); + + }, + + _removeCurrentsFromItems: function() { + + var list = this.currentItem.find(":data(sortable-item)"); + + for (var i=0; i < this.items.length; i++) { + + for (var j=0; j < list.length; j++) { + if(list[j] == this.items[i].item[0]) + this.items.splice(i,1); + }; + + }; + + }, + + _refreshItems: function(event) { + + this.items = []; + this.containers = [this]; + var items = this.items; + var self = this; + var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]]; + var connectWith = this._connectWith(); + + if(connectWith) { + for (var i = connectWith.length - 1; i >= 0; i--){ + var cur = $(connectWith[i]); + for (var j = cur.length - 1; j >= 0; j--){ + var inst = $.data(cur[j], 'sortable'); + if(inst && inst != this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); + this.containers.push(inst); + } + }; + }; + } + + for (var i = queries.length - 1; i >= 0; i--) { + var targetData = queries[i][1]; + var _queries = queries[i][0]; + + for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) { + var item = $(_queries[j]); + + item.data('sortable-item', targetData); // Data for target checking (mouse manager) + + items.push({ + item: item, + instance: targetData, + width: 0, height: 0, + left: 0, top: 0 + }); + }; + }; + + }, + + refreshPositions: function(fast) { + + //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change + if(this.offsetParent && this.helper) { + this.offset.parent = this._getParentOffset(); + } + + for (var i = this.items.length - 1; i >= 0; i--){ + var item = this.items[i]; + + //We ignore calculating positions of all connected containers when we're not over them + if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0]) + continue; + + var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; + + if (!fast) { + item.width = t.outerWidth(); + item.height = t.outerHeight(); + } + + var p = t.offset(); + item.left = p.left; + item.top = p.top; + }; + + if(this.options.custom && this.options.custom.refreshContainers) { + this.options.custom.refreshContainers.call(this); + } else { + for (var i = this.containers.length - 1; i >= 0; i--){ + var p = this.containers[i].element.offset(); + this.containers[i].containerCache.left = p.left; + this.containers[i].containerCache.top = p.top; + this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); + this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); + }; + } + + }, + + _createPlaceholder: function(that) { + + var self = that || this, o = self.options; + + if(!o.placeholder || o.placeholder.constructor == String) { + var className = o.placeholder; + o.placeholder = { + element: function() { + + var el = $(document.createElement(self.currentItem[0].nodeName)) + .addClass(className || self.currentItem[0].className+" ui-sortable-placeholder") + .removeClass("ui-sortable-helper")[0]; + + if(!className) + el.style.visibility = "hidden"; + + return el; + }, + update: function(container, p) { + + // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that + // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified + if(className && !o.forcePlaceholderSize) return; + + //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item + if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); }; + if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); }; + } + }; + } + + //Create the placeholder + self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem)); + + //Append it after the actual current item + self.currentItem.after(self.placeholder); + + //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) + o.placeholder.update(self, self.placeholder); + + }, + + _contactContainers: function(event) { + for (var i = this.containers.length - 1; i >= 0; i--){ + + if(this._intersectsWith(this.containers[i].containerCache)) { + if(!this.containers[i].containerCache.over) { + + if(this.currentContainer != this.containers[i]) { + + //When entering a new container, we will find the item with the least distance and append our item near it + var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[i].floating ? 'left' : 'top']; + for (var j = this.items.length - 1; j >= 0; j--) { + if(!$.ui.contains(this.containers[i].element[0], this.items[j].item[0])) continue; + var cur = this.items[j][this.containers[i].floating ? 'left' : 'top']; + if(Math.abs(cur - base) < dist) { + dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j]; + } + } + + if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled + continue; + + this.currentContainer = this.containers[i]; + itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[i].element, true); + this._trigger("change", event, this._uiHash()); + this.containers[i]._trigger("change", event, this._uiHash(this)); + + //Update the placeholder + this.options.placeholder.update(this.currentContainer, this.placeholder); + + } + + this.containers[i]._trigger("over", event, this._uiHash(this)); + this.containers[i].containerCache.over = 1; + } + } else { + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", event, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + }; + }, + + _createHelper: function(event) { + + var o = this.options; + var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem); + + if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already + $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); + + if(helper[0] == this.currentItem[0]) + this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; + + if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width()); + if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height()); + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left; + if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top; + if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + }, + + _getParentOffset: function() { + + + //Get the offsetParent and cache its position + this.offsetParent = this.helper.offsetParent(); + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information + || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.browser.msie)) //Ugly IE fix + po = { top: 0, left: 0 }; + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition == "relative") { + var p = this.currentItem.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), + top: (parseInt(this.currentItem.css("marginTop"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var o = this.options; + if(o.containment == 'parent') o.containment = this.helper[0].parentNode; + if(o.containment == 'document' || o.containment == 'window') this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left, + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top + ]; + + if(!(/^(document|window|parent)$/).test(o.containment)) { + var ce = $(o.containment)[0]; + var co = $(o.containment).offset(); + var over = ($(ce).css("overflow") != 'hidden'); + + this.containment = [ + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, + co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, + co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top + ]; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) pos = this.position; + var mod = d == "absolute" ? 1 : -1; + var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + return { + top: ( + pos.top // The absolute mouse position + + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border) + - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) + ), + left: ( + pos.left // The absolute mouse position + + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent + + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border) + - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) + ) + }; + + }, + + _generatePosition: function(event) { + + var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + // This is another very weird special case that only happens for relative elements: + // 1. If the css position is relative + // 2. and the scroll parent is the document or similar to the offset parent + // we have to refresh the relative offset during the scroll so there are no jumps + if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) { + this.offset.relative = this._getRelativeOffset(); + } + + var pageX = event.pageX; + var pageY = event.pageY; + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + if(this.originalPosition) { //If we are not dragging yet, we won't check for options + + if(this.containment) { + if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left; + if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top; + if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left; + if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top; + } + + if(o.grid) { + var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; + pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; + pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + } + + return { + top: ( + pageY // The absolute mouse position + - this.offset.click.top // Click offset (relative to the element) + - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.top // The offsetParent's offset without borders (offset + border) + + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) + ), + left: ( + pageX // The absolute mouse position + - this.offset.click.left // Click offset (relative to the element) + - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent + - this.offset.parent.left // The offsetParent's offset without borders (offset + border) + + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) + ) + }; + + }, + + _rearrange: function(event, i, a, hardRefresh) { + + a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling)); + + //Various things done here to improve the performance: + // 1. we create a setTimeout, that calls refreshPositions + // 2. on the instance, we have a counter variable, that get's higher after every append + // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same + // 4. this lets only the last addition to the timeout stack through + this.counter = this.counter ? ++this.counter : 1; + var self = this, counter = this.counter; + + window.setTimeout(function() { + if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove + },0); + + }, + + _clear: function(event, noPropagation) { + + this.reverting = false; + // We delay all events that have to be triggered to after the point where the placeholder has been removed and + // everything else normalized again + var delayedTriggers = [], self = this; + + // We first have to update the dom position of the actual currentItem + // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) + if(!this._noFinalSort && this.currentItem[0].parentNode) this.placeholder.before(this.currentItem); + this._noFinalSort = null; + + if(this.helper[0] == this.currentItem[0]) { + for(var i in this._storedCSS) { + if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = ''; + } + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); + if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed + if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element + if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); + for (var i = this.containers.length - 1; i >= 0; i--){ + if($.ui.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) { + delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.containers[i])); + delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.containers[i])); + } + }; + }; + + //Post events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i])); + if(this.containers[i].containerCache.over) { + delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i])); + this.containers[i].containerCache.over = 0; + } + } + + //Do what was originally in plugins + if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor + if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset cursor + if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index + + this.dragging = false; + if(this.cancelHelperRemoval) { + if(!noPropagation) { + this._trigger("beforeStop", event, this._uiHash()); + for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + return false; + } + + if(!noPropagation) this._trigger("beforeStop", event, this._uiHash()); + + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + + if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null; + + if(!noPropagation) { + for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return true; + + }, + + _trigger: function() { + if ($.widget.prototype._trigger.apply(this, arguments) === false) { + this.cancel(); + } + }, + + _uiHash: function(inst) { + var self = inst || this; + return { + helper: self.helper, + placeholder: self.placeholder || $([]), + position: self.position, + absolutePosition: self.positionAbs, //deprecated + offset: self.positionAbs, + item: self.currentItem, + sender: inst ? inst.element : null + }; + } + +})); + +$.extend($.ui.sortable, { + getter: "serialize toArray", + version: "1.7.2", + eventPrefix: "sort", + defaults: { + appendTo: "parent", + axis: false, + cancel: ":input,option", + connectWith: false, + containment: false, + cursor: 'auto', + cursorAt: false, + delay: 0, + distance: 1, + dropOnEmpty: true, + forcePlaceholderSize: false, + forceHelperSize: false, + grid: false, + handle: false, + helper: "original", + items: '> *', + opacity: false, + placeholder: false, + revert: false, + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + tolerance: "intersect", + zIndex: 1000 + } +}); + +})(jQuery); diff --git a/static/development-bundle/ui/ui.tabs.js b/static/development-bundle/ui/ui.tabs.js new file mode 100644 index 0000000..d914b3e --- /dev/null +++ b/static/development-bundle/ui/ui.tabs.js @@ -0,0 +1,685 @@ +/* + * jQuery UI Tabs 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Tabs + * + * Depends: + * ui.core.js + */ +(function($) { + +$.widget("ui.tabs", { + + _init: function() { + if (this.options.deselectable !== undefined) { + this.options.collapsible = this.options.deselectable; + } + this._tabify(true); + }, + + _setData: function(key, value) { + if (key == 'selected') { + if (this.options.collapsible && value == this.options.selected) { + return; + } + this.select(value); + } + else { + this.options[key] = value; + if (key == 'deselectable') { + this.options.collapsible = value; + } + this._tabify(); + } + }, + + _tabId: function(a) { + return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') || + this.options.idPrefix + $.data(a); + }, + + _sanitizeSelector: function(hash) { + return hash.replace(/:/g, '\\:'); // we need this because an id may contain a ":" + }, + + _cookie: function() { + var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + $.data(this.list[0])); + return $.cookie.apply(null, [cookie].concat($.makeArray(arguments))); + }, + + _ui: function(tab, panel) { + return { + tab: tab, + panel: panel, + index: this.anchors.index(tab) + }; + }, + + _cleanup: function() { + // restore all former loading tabs labels + this.lis.filter('.ui-state-processing').removeClass('ui-state-processing') + .find('span:data(label.tabs)') + .each(function() { + var el = $(this); + el.html(el.data('label.tabs')).removeData('label.tabs'); + }); + }, + + _tabify: function(init) { + + this.list = this.element.children('ul:first'); + this.lis = $('li:has(a[href])', this.list); + this.anchors = this.lis.map(function() { return $('a', this)[0]; }); + this.panels = $([]); + + var self = this, o = this.options; + + var fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash + this.anchors.each(function(i, a) { + var href = $(a).attr('href'); + + // For dynamically created HTML that contains a hash as href IE < 8 expands + // such href to the full page url with hash and then misinterprets tab as ajax. + // Same consideration applies for an added tab with a fragment identifier + // since a[href=#fragment-identifier] does unexpectedly not match. + // Thus normalize href attribute... + var hrefBase = href.split('#')[0], baseEl; + if (hrefBase && (hrefBase === location.toString().split('#')[0] || + (baseEl = $('base')[0]) && hrefBase === baseEl.href)) { + href = a.hash; + a.href = href; + } + + // inline tab + if (fragmentId.test(href)) { + self.panels = self.panels.add(self._sanitizeSelector(href)); + } + + // remote tab + else if (href != '#') { // prevent loading the page itself if href is just "#" + $.data(a, 'href.tabs', href); // required for restore on destroy + + // TODO until #3808 is fixed strip fragment identifier from url + // (IE fails to load from such url) + $.data(a, 'load.tabs', href.replace(/#.*$/, '')); // mutable data + + var id = self._tabId(a); + a.href = '#' + id; + var $panel = $('#' + id); + if (!$panel.length) { + $panel = $(o.panelTemplate).attr('id', id).addClass('ui-tabs-panel ui-widget-content ui-corner-bottom') + .insertAfter(self.panels[i - 1] || self.list); + $panel.data('destroy.tabs', true); + } + self.panels = self.panels.add($panel); + } + + // invalid tab href + else { + o.disabled.push(i); + } + }); + + // initialization from scratch + if (init) { + + // attach necessary classes for styling + this.element.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all'); + this.list.addClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all'); + this.lis.addClass('ui-state-default ui-corner-top'); + this.panels.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom'); + + // Selected tab + // use "selected" option or try to retrieve: + // 1. from fragment identifier in url + // 2. from cookie + // 3. from selected class attribute on
  • + if (o.selected === undefined) { + if (location.hash) { + this.anchors.each(function(i, a) { + if (a.hash == location.hash) { + o.selected = i; + return false; // break + } + }); + } + if (typeof o.selected != 'number' && o.cookie) { + o.selected = parseInt(self._cookie(), 10); + } + if (typeof o.selected != 'number' && this.lis.filter('.ui-tabs-selected').length) { + o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected')); + } + o.selected = o.selected || 0; + } + else if (o.selected === null) { // usage of null is deprecated, TODO remove in next release + o.selected = -1; + } + + // sanity check - default to first tab... + o.selected = ((o.selected >= 0 && this.anchors[o.selected]) || o.selected < 0) ? o.selected : 0; + + // Take disabling tabs via class attribute from HTML + // into account and update option properly. + // A selected tab cannot become disabled. + o.disabled = $.unique(o.disabled.concat( + $.map(this.lis.filter('.ui-state-disabled'), + function(n, i) { return self.lis.index(n); } ) + )).sort(); + + if ($.inArray(o.selected, o.disabled) != -1) { + o.disabled.splice($.inArray(o.selected, o.disabled), 1); + } + + // highlight selected tab + this.panels.addClass('ui-tabs-hide'); + this.lis.removeClass('ui-tabs-selected ui-state-active'); + if (o.selected >= 0 && this.anchors.length) { // check for length avoids error when initializing empty list + this.panels.eq(o.selected).removeClass('ui-tabs-hide'); + this.lis.eq(o.selected).addClass('ui-tabs-selected ui-state-active'); + + // seems to be expected behavior that the show callback is fired + self.element.queue("tabs", function() { + self._trigger('show', null, self._ui(self.anchors[o.selected], self.panels[o.selected])); + }); + + this.load(o.selected); + } + + // clean up to avoid memory leaks in certain versions of IE 6 + $(window).bind('unload', function() { + self.lis.add(self.anchors).unbind('.tabs'); + self.lis = self.anchors = self.panels = null; + }); + + } + // update selected after add/remove + else { + o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected')); + } + + // update collapsible + this.element[o.collapsible ? 'addClass' : 'removeClass']('ui-tabs-collapsible'); + + // set or update cookie after init and add/remove respectively + if (o.cookie) { + this._cookie(o.selected, o.cookie); + } + + // disable tabs + for (var i = 0, li; (li = this.lis[i]); i++) { + $(li)[$.inArray(i, o.disabled) != -1 && + !$(li).hasClass('ui-tabs-selected') ? 'addClass' : 'removeClass']('ui-state-disabled'); + } + + // reset cache if switching from cached to not cached + if (o.cache === false) { + this.anchors.removeData('cache.tabs'); + } + + // remove all handlers before, tabify may run on existing tabs after add or option change + this.lis.add(this.anchors).unbind('.tabs'); + + if (o.event != 'mouseover') { + var addState = function(state, el) { + if (el.is(':not(.ui-state-disabled)')) { + el.addClass('ui-state-' + state); + } + }; + var removeState = function(state, el) { + el.removeClass('ui-state-' + state); + }; + this.lis.bind('mouseover.tabs', function() { + addState('hover', $(this)); + }); + this.lis.bind('mouseout.tabs', function() { + removeState('hover', $(this)); + }); + this.anchors.bind('focus.tabs', function() { + addState('focus', $(this).closest('li')); + }); + this.anchors.bind('blur.tabs', function() { + removeState('focus', $(this).closest('li')); + }); + } + + // set up animations + var hideFx, showFx; + if (o.fx) { + if ($.isArray(o.fx)) { + hideFx = o.fx[0]; + showFx = o.fx[1]; + } + else { + hideFx = showFx = o.fx; + } + } + + // Reset certain styles left over from animation + // and prevent IE's ClearType bug... + function resetStyle($el, fx) { + $el.css({ display: '' }); + if ($.browser.msie && fx.opacity) { + $el[0].style.removeAttribute('filter'); + } + } + + // Show a tab... + var showTab = showFx ? + function(clicked, $show) { + $(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active'); + $show.hide().removeClass('ui-tabs-hide') // avoid flicker that way + .animate(showFx, showFx.duration || 'normal', function() { + resetStyle($show, showFx); + self._trigger('show', null, self._ui(clicked, $show[0])); + }); + } : + function(clicked, $show) { + $(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active'); + $show.removeClass('ui-tabs-hide'); + self._trigger('show', null, self._ui(clicked, $show[0])); + }; + + // Hide a tab, $show is optional... + var hideTab = hideFx ? + function(clicked, $hide) { + $hide.animate(hideFx, hideFx.duration || 'normal', function() { + self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default'); + $hide.addClass('ui-tabs-hide'); + resetStyle($hide, hideFx); + self.element.dequeue("tabs"); + }); + } : + function(clicked, $hide, $show) { + self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default'); + $hide.addClass('ui-tabs-hide'); + self.element.dequeue("tabs"); + }; + + // attach tab event handler, unbind to avoid duplicates from former tabifying... + this.anchors.bind(o.event + '.tabs', function() { + var el = this, $li = $(this).closest('li'), $hide = self.panels.filter(':not(.ui-tabs-hide)'), + $show = $(self._sanitizeSelector(this.hash)); + + // If tab is already selected and not collapsible or tab disabled or + // or is already loading or click callback returns false stop here. + // Check if click handler returns false last so that it is not executed + // for a disabled or loading tab! + if (($li.hasClass('ui-tabs-selected') && !o.collapsible) || + $li.hasClass('ui-state-disabled') || + $li.hasClass('ui-state-processing') || + self._trigger('select', null, self._ui(this, $show[0])) === false) { + this.blur(); + return false; + } + + o.selected = self.anchors.index(this); + + self.abort(); + + // if tab may be closed + if (o.collapsible) { + if ($li.hasClass('ui-tabs-selected')) { + o.selected = -1; + + if (o.cookie) { + self._cookie(o.selected, o.cookie); + } + + self.element.queue("tabs", function() { + hideTab(el, $hide); + }).dequeue("tabs"); + + this.blur(); + return false; + } + else if (!$hide.length) { + if (o.cookie) { + self._cookie(o.selected, o.cookie); + } + + self.element.queue("tabs", function() { + showTab(el, $show); + }); + + self.load(self.anchors.index(this)); // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171 + + this.blur(); + return false; + } + } + + if (o.cookie) { + self._cookie(o.selected, o.cookie); + } + + // show new tab + if ($show.length) { + if ($hide.length) { + self.element.queue("tabs", function() { + hideTab(el, $hide); + }); + } + self.element.queue("tabs", function() { + showTab(el, $show); + }); + + self.load(self.anchors.index(this)); + } + else { + throw 'jQuery UI Tabs: Mismatching fragment identifier.'; + } + + // Prevent IE from keeping other link focussed when using the back button + // and remove dotted border from clicked link. This is controlled via CSS + // in modern browsers; blur() removes focus from address bar in Firefox + // which can become a usability and annoying problem with tabs('rotate'). + if ($.browser.msie) { + this.blur(); + } + + }); + + // disable click in any case + this.anchors.bind('click.tabs', function(){return false;}); + + }, + + destroy: function() { + var o = this.options; + + this.abort(); + + this.element.unbind('.tabs') + .removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible') + .removeData('tabs'); + + this.list.removeClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all'); + + this.anchors.each(function() { + var href = $.data(this, 'href.tabs'); + if (href) { + this.href = href; + } + var $this = $(this).unbind('.tabs'); + $.each(['href', 'load', 'cache'], function(i, prefix) { + $this.removeData(prefix + '.tabs'); + }); + }); + + this.lis.unbind('.tabs').add(this.panels).each(function() { + if ($.data(this, 'destroy.tabs')) { + $(this).remove(); + } + else { + $(this).removeClass([ + 'ui-state-default', + 'ui-corner-top', + 'ui-tabs-selected', + 'ui-state-active', + 'ui-state-hover', + 'ui-state-focus', + 'ui-state-disabled', + 'ui-tabs-panel', + 'ui-widget-content', + 'ui-corner-bottom', + 'ui-tabs-hide' + ].join(' ')); + } + }); + + if (o.cookie) { + this._cookie(null, o.cookie); + } + }, + + add: function(url, label, index) { + if (index === undefined) { + index = this.anchors.length; // append by default + } + + var self = this, o = this.options, + $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label)), + id = !url.indexOf('#') ? url.replace('#', '') : this._tabId($('a', $li)[0]); + + $li.addClass('ui-state-default ui-corner-top').data('destroy.tabs', true); + + // try to find an existing element before creating a new one + var $panel = $('#' + id); + if (!$panel.length) { + $panel = $(o.panelTemplate).attr('id', id).data('destroy.tabs', true); + } + $panel.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide'); + + if (index >= this.lis.length) { + $li.appendTo(this.list); + $panel.appendTo(this.list[0].parentNode); + } + else { + $li.insertBefore(this.lis[index]); + $panel.insertBefore(this.panels[index]); + } + + o.disabled = $.map(o.disabled, + function(n, i) { return n >= index ? ++n : n; }); + + this._tabify(); + + if (this.anchors.length == 1) { // after tabify + $li.addClass('ui-tabs-selected ui-state-active'); + $panel.removeClass('ui-tabs-hide'); + this.element.queue("tabs", function() { + self._trigger('show', null, self._ui(self.anchors[0], self.panels[0])); + }); + + this.load(0); + } + + // callback + this._trigger('add', null, this._ui(this.anchors[index], this.panels[index])); + }, + + remove: function(index) { + var o = this.options, $li = this.lis.eq(index).remove(), + $panel = this.panels.eq(index).remove(); + + // If selected tab was removed focus tab to the right or + // in case the last tab was removed the tab to the left. + if ($li.hasClass('ui-tabs-selected') && this.anchors.length > 1) { + this.select(index + (index + 1 < this.anchors.length ? 1 : -1)); + } + + o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }), + function(n, i) { return n >= index ? --n : n; }); + + this._tabify(); + + // callback + this._trigger('remove', null, this._ui($li.find('a')[0], $panel[0])); + }, + + enable: function(index) { + var o = this.options; + if ($.inArray(index, o.disabled) == -1) { + return; + } + + this.lis.eq(index).removeClass('ui-state-disabled'); + o.disabled = $.grep(o.disabled, function(n, i) { return n != index; }); + + // callback + this._trigger('enable', null, this._ui(this.anchors[index], this.panels[index])); + }, + + disable: function(index) { + var self = this, o = this.options; + if (index != o.selected) { // cannot disable already selected tab + this.lis.eq(index).addClass('ui-state-disabled'); + + o.disabled.push(index); + o.disabled.sort(); + + // callback + this._trigger('disable', null, this._ui(this.anchors[index], this.panels[index])); + } + }, + + select: function(index) { + if (typeof index == 'string') { + index = this.anchors.index(this.anchors.filter('[href$=' + index + ']')); + } + else if (index === null) { // usage of null is deprecated, TODO remove in next release + index = -1; + } + if (index == -1 && this.options.collapsible) { + index = this.options.selected; + } + + this.anchors.eq(index).trigger(this.options.event + '.tabs'); + }, + + load: function(index) { + var self = this, o = this.options, a = this.anchors.eq(index)[0], url = $.data(a, 'load.tabs'); + + this.abort(); + + // not remote or from cache + if (!url || this.element.queue("tabs").length !== 0 && $.data(a, 'cache.tabs')) { + this.element.dequeue("tabs"); + return; + } + + // load remote from here on + this.lis.eq(index).addClass('ui-state-processing'); + + if (o.spinner) { + var span = $('span', a); + span.data('label.tabs', span.html()).html(o.spinner); + } + + this.xhr = $.ajax($.extend({}, o.ajaxOptions, { + url: url, + success: function(r, s) { + $(self._sanitizeSelector(a.hash)).html(r); + + // take care of tab labels + self._cleanup(); + + if (o.cache) { + $.data(a, 'cache.tabs', true); // if loaded once do not load them again + } + + // callbacks + self._trigger('load', null, self._ui(self.anchors[index], self.panels[index])); + try { + o.ajaxOptions.success(r, s); + } + catch (e) {} + + // last, so that load event is fired before show... + self.element.dequeue("tabs"); + } + })); + }, + + abort: function() { + // stop possibly running animations + this.element.queue([]); + this.panels.stop(false, true); + + // terminate pending requests from other tabs + if (this.xhr) { + this.xhr.abort(); + delete this.xhr; + } + + // take care of tab labels + this._cleanup(); + + }, + + url: function(index, url) { + this.anchors.eq(index).removeData('cache.tabs').data('load.tabs', url); + }, + + length: function() { + return this.anchors.length; + } + +}); + +$.extend($.ui.tabs, { + version: '1.7.2', + getter: 'length', + defaults: { + ajaxOptions: null, + cache: false, + cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true } + collapsible: false, + disabled: [], + event: 'click', + fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 } + idPrefix: 'ui-tabs-', + panelTemplate: '
    ', + spinner: 'Loading…', + tabTemplate: '
  • #{label}
  • ' + } +}); + +/* + * Tabs Extensions + */ + +/* + * Rotate + */ +$.extend($.ui.tabs.prototype, { + rotation: null, + rotate: function(ms, continuing) { + + var self = this, o = this.options; + + var rotate = self._rotate || (self._rotate = function(e) { + clearTimeout(self.rotation); + self.rotation = setTimeout(function() { + var t = o.selected; + self.select( ++t < self.anchors.length ? t : 0 ); + }, ms); + + if (e) { + e.stopPropagation(); + } + }); + + var stop = self._unrotate || (self._unrotate = !continuing ? + function(e) { + if (e.clientX) { // in case of a true click + self.rotate(null); + } + } : + function(e) { + t = o.selected; + rotate(); + }); + + // start rotation + if (ms) { + this.element.bind('tabsshow', rotate); + this.anchors.bind(o.event + '.tabs', stop); + rotate(); + } + // stop rotation + else { + clearTimeout(self.rotation); + this.element.unbind('tabsshow', rotate); + this.anchors.unbind(o.event + '.tabs', stop); + delete this._rotate; + delete this._unrotate; + } + } +}); + +})(jQuery); diff --git a/static/development-bundle/version.txt b/static/development-bundle/version.txt new file mode 100644 index 0000000..0a182f2 --- /dev/null +++ b/static/development-bundle/version.txt @@ -0,0 +1 @@ +1.7.2 \ No newline at end of file diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000..751cebe --- /dev/null +++ b/static/index.html @@ -0,0 +1,367 @@ + + + + + jQuery UI Example Page + + + + + + + +

    Welcome to jQuery UI!

    +

    This page demonstrates the widgets you downloaded using the theme you selected in the download builder. We've included and linked to minified versions of jQuery, your personalized copy of jQuery UI (js/jquery-ui-1.7.2.custom.min.js), and css/ui-lightness/jquery-ui-1.7.2.custom.css which imports the entire jQuery UI CSS Framework. You can choose to link a subset of the CSS Framework depending on your needs.

    +

    You've downloaded components and a theme that are compatible with jQuery 1.3+. Please make sure you are using jQuery 1.3+ in your production environment. If you need jQuery UI components that work with an earlier version of jQuery, you can choose an older version in the jQuery UI download builder.

    + +

    YOUR COMPONENTS:

    + + +

    Accordion

    +
    +
    +

    First

    +
    Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.
    +
    +
    +

    Second

    +
    Phasellus mattis tincidunt nibh.
    +
    +
    +

    Third

    +
    Nam dui erat, auctor a, dignissim quis.
    +
    +
    + + +

    Tabs

    +
    + +
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
    +
    Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.
    +
    Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.
    +
    + + +

    Dialog

    +

    Open Dialog

    + + +

    Overlay and Shadow Classes (not currently used in UI widgets)

    +
    +

    Lorem ipsum dolor sit amet, Nulla nec tortor. Donec id elit quis purus consectetur consequat.

    Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci.

    Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat.

    Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam.

    Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante.

    Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi.

    + + +
    +
    +
    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

    +
    +
    + +
    + + + +
    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

    +
    + + + +

    Framework Icons (content color preview)

    +
      + +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • + +
    • +
    • +
    • +
    • +
    • +
    + + + +

    Slider

    +
    + + +

    Datepicker

    +
    + + +

    Progressbar

    +
    + + +

    Highlight / Error

    +
    +
    +

    + Hey! Sample ui-state-highlight style.

    +
    +
    +
    +
    +
    +

    + Alert: Sample ui-state-error style.

    +
    +
    + + + + + diff --git a/static/js/jquery-1.3.2.min.js b/static/js/jquery-1.3.2.min.js new file mode 100644 index 0000000..b1ae21d --- /dev/null +++ b/static/js/jquery-1.3.2.min.js @@ -0,0 +1,19 @@ +/* + * 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 l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
    "]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
    ","
    "]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.3 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

    ";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
    ";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
    ").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
    ';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); \ No newline at end of file diff --git a/static/js/jquery-1.4.2.min.js b/static/js/jquery-1.4.2.min.js new file mode 100644 index 0000000..7c24308 --- /dev/null +++ b/static/js/jquery-1.4.2.min.js @@ -0,0 +1,154 @@ +/*! + * jQuery JavaScript Library v1.4.2 + * http://jquery.com/ + * + * Copyright 2010, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2010, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Sat Feb 13 22:33:48 2010 -0500 + */ +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
    a"; +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, +text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= +h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

    ";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); +(function(){var g=s.createElement("div");g.innerHTML="
    ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= +{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", +d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
    ","
    "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); +return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
    ").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
    "; +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/static/js/jquery-ui-1.7.2.custom.min.js b/static/js/jquery-ui-1.7.2.custom.min.js new file mode 100644 index 0000000..cf19f30 --- /dev/null +++ b/static/js/jquery-ui-1.7.2.custom.min.js @@ -0,0 +1,298 @@ +/* + * jQuery UI 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI + */ +jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/* + * jQuery UI Draggable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.leftthis.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.topthis.containment[3])?g:(!(g-this.offset.click.topthis.containment[2])?f:(!(f-this.offset.click.left
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y=p&&n<=k)||(m>=p&&m<=k)||(nk))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(ec));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d
    ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidthk.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/* + * jQuery UI Selectable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Selectables + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element})}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false}})},_mouseDrag:function(i){var c=this;this.dragged=true;if(this.options.disabled){return}var e=this.options;var d=this.opos[0],h=this.opos[1],b=i.pageX,g=i.pageY;if(d>b){var f=b;b=d;d=f}if(h>g){var f=g;g=h;h=f}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!j||j.element==c.element[0]){return}var k=false;if(e.tolerance=="touch"){k=(!(j.left>b||j.rightg||j.bottomd&&j.righth&&j.bottom=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)f&&(e+h)m[this.floating?"width":"height"])){return g}else{return(f0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.topthis.containment[3])?g:(!(g-this.offset.click.topthis.containment[2])?f:(!(f-this.offset.click.left=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);;/* + * jQuery UI Accordion 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Accordion + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/* + * jQuery UI Dialog 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * ui.core.js + * ui.draggable.js + * ui.resizable.js + */ +(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||" ",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("
    ")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("
    ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("
    ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||" ");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("
    ").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e
    ");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("
    ")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('
    ').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(bthis._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(cthis._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;/* + * jQuery UI Tabs 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Tabs + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"
    ",spinner:"Loading…",tabTemplate:'
  • #{label}
  • '}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('
    '))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$(''+appendText+"");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDatenew Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)0&&iValue="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j0&&iValue-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormatmaxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDrawmaxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?''+prevText+"":(hideIfNoPrevNext?"":''+prevText+""));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?''+nextText+"":(hideIfNoPrevNext?"":''+nextText+""));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'":"");var buttonPanel=(showButtonPanel)?'
    '+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'":"")+(isRTL?"":controls)+"
    ":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="=5?' class="ui-datepicker-week-end"':"")+'>'+dayNamesMin[day]+""}calender+=thead+"";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDatemaxDate);tbody+='";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+""}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="
    =currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():" "):(unselectable?''+printDate.getDate()+"":'=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+""))+"
    "+(isMultiMonth?""+((numMonths[0]>0&&col==numMonths[1]-1)?'
    ':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?" ":"")}if(secondary||!changeYear){html+=''+drawYear+""}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?" ":"")+monthHtml}html+="";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&datemaxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);;/* + * jQuery UI Progressbar 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('
    ').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(bthis._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;/* + * jQuery UI Effects 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/ + */ +jQuery.effects||(function(d){d.effects={version:"1.7.2",save:function(g,h){for(var f=0;f');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h").css({position:"absolute",visibility:"visible",left:-d*(g/e),top:-f*(c/k)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:l.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:l.top+f*(c/k)+(b.options.mode=="show"?(f-Math.floor(k/2))*(c/k):0),opacity:b.options.mode=="show"?0:1}).animate({left:l.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:l.top+f*(c/k)+(b.options.mode=="show"?0:(f-Math.floor(k/2))*(c/k)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0])}h.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/* + * jQuery UI Effects Fold 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * effects.core.js + */ +(function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),k=["position","top","left"];var h=a.effects.setMode(e,b.options.mode||"hide");var o=b.options.size||15;var n=!(!b.options.horizFirst);var g=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(e,k);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var i=((h=="show")!=n);var f=i?["width","height"]:["height","width"];var c=i?[d.width(),d.height()]:[d.height(),d.width()];var j=/([0-9]+)%/.exec(o);if(j){o=parseInt(j[1],10)/100*c[h=="hide"?0:1]}if(h=="show"){d.css(n?{height:0,width:o}:{height:o,width:0})}var m={},l={};m[f[0]]=h=="show"?c[0]:o;l[f[1]]=h=="show"?c[1]:0;d.animate(m,g,b.options.easing).animate(l,g,b.options.easing,function(){if(h=="hide"){e.hide()}a.effects.restore(e,k);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);;/* + * jQuery UI Effects Highlight 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * effects.core.js + */ +(function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var c=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,d);e.show();e.css({backgroundImage:"none",backgroundColor:c});var f={backgroundColor:g};if(h=="hide"){f.opacity=0}e.animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide()}a.effects.restore(e,d);if(h=="show"&&a.browser.msie){this.style.removeAttribute("filter")}if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/* + * jQuery UI Effects Pulsate 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * effects.core.js + */ +(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"show");var f=b.options.times||5;var e=b.duration?b.duration/2:a.fx.speeds._default/2;if(g=="hide"){f--}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},e,b.options.easing);f=f-2}for(var c=0;c').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue()})})}})(jQuery);; \ No newline at end of file -- cgit v1.2.3 From 5ac91412c04bf94e48613dbe738ef5a05f83994c Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Fri, 19 Feb 2010 22:06:22 -0500 Subject: Making views into a package. --- snakeplan/projects/urls.py | 0 snakeplan/projects/views.py | 1 - snakeplan/projects/views/__init__.py | 0 3 files changed, 1 deletion(-) create mode 100644 snakeplan/projects/urls.py delete mode 100755 snakeplan/projects/views.py create mode 100644 snakeplan/projects/views/__init__.py diff --git a/snakeplan/projects/urls.py b/snakeplan/projects/urls.py new file mode 100644 index 0000000..e69de29 diff --git a/snakeplan/projects/views.py b/snakeplan/projects/views.py deleted file mode 100755 index 60f00ef..0000000 --- a/snakeplan/projects/views.py +++ /dev/null @@ -1 +0,0 @@ -# Create your views here. diff --git a/snakeplan/projects/views/__init__.py b/snakeplan/projects/views/__init__.py new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3 From 98801f126fb9286a9e99d6a27a0fe1e2de6b907e Mon Sep 17 00:00:00 2001 From: "W. Matthew Wilson" Date: Fri, 19 Feb 2010 22:23:53 -0500 Subject: This is matt's contribution --- snakeplan/urls.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/snakeplan/urls.py b/snakeplan/urls.py index 105045d..6cea0d0 100755 --- a/snakeplan/urls.py +++ b/snakeplan/urls.py @@ -7,4 +7,53 @@ admin.autodiscover() urlpatterns = patterns('', # (r'^snakeplan/', include('snakeplan.foo.urls')), (r'^admin/', include(admin.site.urls)), + (r'^foo$', 'snakeplan.projects.views.foo'), + (r'^projects$', 'snakeplan.projects.views.foo'), ) + + +""" +====== ======================== ======================================== +Method URL What it does +====== ======================== ======================================== +GET /modelname/ Lists model instances, using filters + like ?key=value1&key=value2 + +GET /modelname/search displays a search form + +GET /modelname/id displays a readonly instance + +GET /modelname/edit/id displays an edit form + +POST /modelname/update/id updates an instance and redirects + +POST /modelname/upsert Updates or inserts an instance and + redirects + +GET /modelname/upsert Draws a form to do an upsert. + +GET /modelname/upsertform Draws a form to do an upsert. + +GET /modelname/create displays an insert form + +GET /modelname/insertform displays an insert form + +GET /modelname/remove/id displays a form that posts to + /model/delete/id + +POST /modelname/insert inserts a new record and redirects + +POST /modelname/delete/id deletes a record and redirects + +GET /modelname/bulk/edit display a bulk edit ui + +POST /modelname/bulk/update performs a bulk update and redirect + +GET /modelname/bulk/create display a bulk insert form + +POST /modelname/bulk/insert performs a bulk insert and redirect + +POST /modelname/bulk/delete performs a bulk delete and redirect + +====== ======================== ======================================== +""" -- cgit v1.2.3