commit 2ce2c4097ddb094615456353272f2f7abf870136 Author: pcros Date: Tue Jan 27 17:01:38 2015 +0100 application hebdo diff --git a/css/Museo500-Regular.otf b/css/Museo500-Regular.otf new file mode 100644 index 0000000..da52e9c Binary files /dev/null and b/css/Museo500-Regular.otf differ diff --git a/css/images/logo-html5.png b/css/images/logo-html5.png new file mode 100644 index 0000000..ac60bf7 Binary files /dev/null and b/css/images/logo-html5.png differ diff --git a/css/images/ui-bg_flat_30_cccccc_40x100.png b/css/images/ui-bg_flat_30_cccccc_40x100.png new file mode 100644 index 0000000..04e8204 Binary files /dev/null and b/css/images/ui-bg_flat_30_cccccc_40x100.png differ diff --git a/css/images/ui-bg_flat_50_5c5c5c_40x100.png b/css/images/ui-bg_flat_50_5c5c5c_40x100.png new file mode 100644 index 0000000..eea82da Binary files /dev/null and b/css/images/ui-bg_flat_50_5c5c5c_40x100.png differ diff --git a/css/images/ui-bg_glass_20_555555_1x400.png b/css/images/ui-bg_glass_20_555555_1x400.png new file mode 100644 index 0000000..d931157 Binary files /dev/null and b/css/images/ui-bg_glass_20_555555_1x400.png differ diff --git a/css/images/ui-bg_glass_40_0078a3_1x400.png b/css/images/ui-bg_glass_40_0078a3_1x400.png new file mode 100644 index 0000000..f9f9dfa Binary files /dev/null and b/css/images/ui-bg_glass_40_0078a3_1x400.png differ diff --git a/css/images/ui-bg_glass_40_ffc73d_1x400.png b/css/images/ui-bg_glass_40_ffc73d_1x400.png new file mode 100644 index 0000000..f366b96 Binary files /dev/null and b/css/images/ui-bg_glass_40_ffc73d_1x400.png differ diff --git a/css/images/ui-bg_gloss-wave_25_333333_500x100.png b/css/images/ui-bg_gloss-wave_25_333333_500x100.png new file mode 100644 index 0000000..1e48337 Binary files /dev/null and b/css/images/ui-bg_gloss-wave_25_333333_500x100.png differ diff --git a/css/images/ui-bg_highlight-soft_80_eeeeee_1x100.png b/css/images/ui-bg_highlight-soft_80_eeeeee_1x100.png new file mode 100644 index 0000000..c96c2d7 Binary files /dev/null and b/css/images/ui-bg_highlight-soft_80_eeeeee_1x100.png differ diff --git a/css/images/ui-bg_inset-soft_25_000000_1x100.png b/css/images/ui-bg_inset-soft_25_000000_1x100.png new file mode 100644 index 0000000..686d2f4 Binary files /dev/null and b/css/images/ui-bg_inset-soft_25_000000_1x100.png differ diff --git a/css/images/ui-bg_inset-soft_30_E0007A_1x100.png b/css/images/ui-bg_inset-soft_30_E0007A_1x100.png new file mode 100644 index 0000000..91e386e Binary files /dev/null and b/css/images/ui-bg_inset-soft_30_E0007A_1x100.png differ diff --git a/css/images/ui-icons_222222_256x240.png b/css/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..c1cb117 Binary files /dev/null and b/css/images/ui-icons_222222_256x240.png differ diff --git a/css/images/ui-icons_4b8e0b_256x240.png b/css/images/ui-icons_4b8e0b_256x240.png new file mode 100644 index 0000000..232832a Binary files /dev/null and b/css/images/ui-icons_4b8e0b_256x240.png differ diff --git a/css/images/ui-icons_a83300_256x240.png b/css/images/ui-icons_a83300_256x240.png new file mode 100644 index 0000000..bb22520 Binary files /dev/null and b/css/images/ui-icons_a83300_256x240.png differ diff --git a/css/images/ui-icons_cccccc_256x240.png b/css/images/ui-icons_cccccc_256x240.png new file mode 100644 index 0000000..4185f97 Binary files /dev/null and b/css/images/ui-icons_cccccc_256x240.png differ diff --git a/css/images/ui-icons_ffffff_256x240.png b/css/images/ui-icons_ffffff_256x240.png new file mode 100644 index 0000000..4f624bb Binary files /dev/null and b/css/images/ui-icons_ffffff_256x240.png differ diff --git a/css/jquery-ui.css b/css/jquery-ui.css new file mode 100644 index 0000000..bcb2153 --- /dev/null +++ b/css/jquery-ui.css @@ -0,0 +1,1225 @@ +/*! jQuery UI - v1.11.2 - 2014-12-07 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=droid%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=%23333333&bgTextureHeader=gloss_wave&bgImgOpacityHeader=25&borderColorHeader=%23333333&fcHeader=%23ffffff&iconColorHeader=%23ffffff&bgColorContent=%23000000&bgTextureContent=inset_soft&bgImgOpacityContent=25&borderColorContent=%23666666&fcContent=%23ffffff&iconColorContent=%23cccccc&bgColorDefault=%23555555&bgTextureDefault=glass&bgImgOpacityDefault=20&borderColorDefault=%23666666&fcDefault=%23eeeeee&iconColorDefault=%23cccccc&bgColorHover=%230078a3&bgTextureHover=glass&bgImgOpacityHover=40&borderColorHover=%2359b4d4&fcHover=%23ffffff&iconColorHover=%23ffffff&bgColorActive=%23E0007A&bgTextureActive=inset_soft&bgImgOpacityActive=30&borderColorActive=%23E0007A&fcActive=%23ffffff&iconColorActive=%23222222&bgColorHighlight=%23eeeeee&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=80&borderColorHighlight=%23cccccc&fcHighlight=%232e7db2&iconColorHighlight=%234b8e0b&bgColorError=%23ffc73d&bgTextureError=glass&bgImgOpacityError=40&borderColorError=%23ffb73d&fcError=%23111111&iconColorError=%23a83300&bgColorOverlay=%235c5c5c&bgTextureOverlay=flat&bgImgOpacityOverlay=50&opacityOverlay=80&bgColorShadow=%23cccccc&bgTextureShadow=flat&bgImgOpacityShadow=30&opacityShadow=60&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px&tr%26ffDefault=Helvetica%2CArial%2Csans-serif +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.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:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* 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: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.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: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + 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; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.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 { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.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, +.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%; + font-size: 0; +} + +/* 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, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.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; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.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; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: droid,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: droid,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #666666; + background: #000000 url("images/ui-bg_inset-soft_25_000000_1x100.png") 50% bottom repeat-x; + color: #ffffff; +} +.ui-widget-content a { + color: #ffffff; +} +.ui-widget-header { + border: 1px solid #333333; + background: #333333 url("images/ui-bg_gloss-wave_25_333333_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, +.ui-widget-header .ui-state-default { + border: 1px solid #666666; + background: #555555 url("images/ui-bg_glass_20_555555_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #eeeeee; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #eeeeee; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #59b4d4; + background: #0078a3 url("images/ui-bg_glass_40_0078a3_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #ffffff; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #E0007A; + background: #E0007A url("images/ui-bg_inset-soft_30_E0007A_1x100.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #cccccc; + background: #eeeeee url("images/ui-bg_highlight-soft_80_eeeeee_1x100.png") 50% top repeat-x; + color: #2e7db2; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #2e7db2; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #ffb73d; + background: #ffc73d url("images/ui-bg_glass_40_ffc73d_1x400.png") 50% 50% repeat-x; + color: #111111; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #111111; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #111111; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("images/ui-icons_cccccc_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_cccccc_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("images/ui-icons_ffffff_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("images/ui-icons_222222_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("images/ui-icons_4b8e0b_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("images/ui-icons_a83300_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.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-on { background-position: -96px -144px; } +.ui-icon-radio-off { 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-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.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-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 6px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #5c5c5c url("images/ui-bg_flat_50_5c5c5c_40x100.png") 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -7px 0 0 -7px; + padding: 7px; + background: #cccccc url("images/ui-bg_flat_30_cccccc_40x100.png") 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); /* support: IE8 */ + border-radius: 8px; +} diff --git a/css/jquery-ui.min.css b/css/jquery-ui.min.css new file mode 100644 index 0000000..9b02bc0 --- /dev/null +++ b/css/jquery-ui.min.css @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.11.2 - 2014-12-07 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=droid%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=%23333333&bgTextureHeader=gloss_wave&bgImgOpacityHeader=25&borderColorHeader=%23333333&fcHeader=%23ffffff&iconColorHeader=%23ffffff&bgColorContent=%23000000&bgTextureContent=inset_soft&bgImgOpacityContent=25&borderColorContent=%23666666&fcContent=%23ffffff&iconColorContent=%23cccccc&bgColorDefault=%23555555&bgTextureDefault=glass&bgImgOpacityDefault=20&borderColorDefault=%23666666&fcDefault=%23eeeeee&iconColorDefault=%23cccccc&bgColorHover=%230078a3&bgTextureHover=glass&bgImgOpacityHover=40&borderColorHover=%2359b4d4&fcHover=%23ffffff&iconColorHover=%23ffffff&bgColorActive=%23E0007A&bgTextureActive=inset_soft&bgImgOpacityActive=30&borderColorActive=%23E0007A&fcActive=%23ffffff&iconColorActive=%23222222&bgColorHighlight=%23eeeeee&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=80&borderColorHighlight=%23cccccc&fcHighlight=%232e7db2&iconColorHighlight=%234b8e0b&bgColorError=%23ffc73d&bgTextureError=glass&bgImgOpacityError=40&borderColorError=%23ffb73d&fcError=%23111111&iconColorError=%23a83300&bgColorOverlay=%235c5c5c&bgTextureOverlay=flat&bgImgOpacityOverlay=50&opacityOverlay=80&bgColorShadow=%23cccccc&bgTextureShadow=flat&bgImgOpacityShadow=30&opacityShadow=60&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px&tr%26ffDefault=Helvetica%2CArial%2Csans-serif +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.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:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.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:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;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}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.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{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.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}.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,.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%;font-size:0}.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,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.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}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:droid,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:droid,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #666;background:#000 url("images/ui-bg_inset-soft_25_000000_1x100.png") 50% bottom repeat-x;color:#fff}.ui-widget-content a{color:#fff}.ui-widget-header{border:1px solid #333;background:#333 url("images/ui-bg_gloss-wave_25_333333_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #666;background:#555 url("images/ui-bg_glass_20_555555_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eee}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#eee;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #59b4d4;background:#0078a3 url("images/ui-bg_glass_40_0078a3_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#fff}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#fff;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #E0007A;background:#E0007A url("images/ui-bg_inset-soft_30_E0007A_1x100.png") 50% 50% repeat-x;font-weight:bold;color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #ccc;background:#eee url("images/ui-bg_highlight-soft_80_eeeeee_1x100.png") 50% top repeat-x;color:#2e7db2}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#2e7db2}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #ffb73d;background:#ffc73d url("images/ui-bg_glass_40_ffc73d_1x400.png") 50% 50% repeat-x;color:#111}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#111}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#111}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_cccccc_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_cccccc_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_4b8e0b_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_a83300_256x240.png")}.ui-icon-blank{background-position:16px 16px}.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-on{background-position:-96px -144px}.ui-icon-radio-off{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-start{background-position:-80px -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}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:6px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:6px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:6px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:6px}.ui-widget-overlay{background:#5c5c5c url("images/ui-bg_flat_50_5c5c5c_40x100.png") 50% 50% repeat-x;opacity:.8;filter:Alpha(Opacity=80)}.ui-widget-shadow{margin:-7px 0 0 -7px;padding:7px;background:#ccc url("images/ui-bg_flat_30_cccccc_40x100.png") 50% 50% repeat-x;opacity:.6;filter:Alpha(Opacity=60);border-radius:8px} \ No newline at end of file diff --git a/css/jquery-ui.structure.css b/css/jquery-ui.structure.css new file mode 100644 index 0000000..d3d88d4 --- /dev/null +++ b/css/jquery-ui.structure.css @@ -0,0 +1,833 @@ +/*! + * jQuery UI CSS Framework 1.11.2 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/theming/ + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.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:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* 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: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.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: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + 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; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.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 { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.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, +.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%; + font-size: 0; +} + +/* 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, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.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; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.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; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} diff --git a/css/jquery-ui.structure.min.css b/css/jquery-ui.structure.min.css new file mode 100644 index 0000000..7eb8b66 --- /dev/null +++ b/css/jquery-ui.structure.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.11.2 - 2014-12-05 +* http://jqueryui.com +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.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:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.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:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;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}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.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{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.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}.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,.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%;font-size:0}.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,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.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;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.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}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px} \ No newline at end of file diff --git a/css/jquery-ui.theme.css b/css/jquery-ui.theme.css new file mode 100644 index 0000000..ccc5631 --- /dev/null +++ b/css/jquery-ui.theme.css @@ -0,0 +1,410 @@ +/*! + * jQuery UI CSS Framework 1.11.2 + * http://jqueryui.com + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/theming/ + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=droid%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=%23333333&bgTextureHeader=gloss_wave&bgImgOpacityHeader=25&borderColorHeader=%23333333&fcHeader=%23ffffff&iconColorHeader=%23ffffff&bgColorContent=%23000000&bgTextureContent=inset_soft&bgImgOpacityContent=25&borderColorContent=%23666666&fcContent=%23ffffff&iconColorContent=%23cccccc&bgColorDefault=%23555555&bgTextureDefault=glass&bgImgOpacityDefault=20&borderColorDefault=%23666666&fcDefault=%23eeeeee&iconColorDefault=%23cccccc&bgColorHover=%230078a3&bgTextureHover=glass&bgImgOpacityHover=40&borderColorHover=%2359b4d4&fcHover=%23ffffff&iconColorHover=%23ffffff&bgColorActive=%23E0007A&bgTextureActive=inset_soft&bgImgOpacityActive=30&borderColorActive=%23E0007A&fcActive=%23ffffff&iconColorActive=%23222222&bgColorHighlight=%23eeeeee&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=80&borderColorHighlight=%23cccccc&fcHighlight=%232e7db2&iconColorHighlight=%234b8e0b&bgColorError=%23ffc73d&bgTextureError=glass&bgImgOpacityError=40&borderColorError=%23ffb73d&fcError=%23111111&iconColorError=%23a83300&bgColorOverlay=%235c5c5c&bgTextureOverlay=flat&bgImgOpacityOverlay=50&opacityOverlay=80&bgColorShadow=%23cccccc&bgTextureShadow=flat&bgImgOpacityShadow=30&opacityShadow=60&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px&tr%26ffDefault=Helvetica%2CArial%2Csans-serif + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: droid,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: droid,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #666666; + background: #000000 url("images/ui-bg_inset-soft_25_000000_1x100.png") 50% bottom repeat-x; + color: #ffffff; +} +.ui-widget-content a { + color: #ffffff; +} +.ui-widget-header { + border: 1px solid #333333; + background: #333333 url("images/ui-bg_gloss-wave_25_333333_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, +.ui-widget-header .ui-state-default { + border: 1px solid #666666; + background: #555555 url("images/ui-bg_glass_20_555555_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #eeeeee; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #eeeeee; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #59b4d4; + background: #0078a3 url("images/ui-bg_glass_40_0078a3_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #ffffff; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #E0007A; + background: #E0007A url("images/ui-bg_inset-soft_30_E0007A_1x100.png") 50% 50% repeat-x; + font-weight: bold; + color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #cccccc; + background: #eeeeee url("images/ui-bg_highlight-soft_80_eeeeee_1x100.png") 50% top repeat-x; + color: #2e7db2; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #2e7db2; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #ffb73d; + background: #ffc73d url("images/ui-bg_glass_40_ffc73d_1x400.png") 50% 50% repeat-x; + color: #111111; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #111111; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #111111; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("images/ui-icons_cccccc_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_cccccc_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("images/ui-icons_ffffff_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("images/ui-icons_222222_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("images/ui-icons_4b8e0b_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("images/ui-icons_a83300_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.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-on { background-position: -96px -144px; } +.ui-icon-radio-off { 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-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.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-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 6px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 6px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #5c5c5c url("images/ui-bg_flat_50_5c5c5c_40x100.png") 50% 50% repeat-x; + opacity: .8; + filter: Alpha(Opacity=80); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -7px 0 0 -7px; + padding: 7px; + background: #cccccc url("images/ui-bg_flat_30_cccccc_40x100.png") 50% 50% repeat-x; + opacity: .6; + filter: Alpha(Opacity=60); /* support: IE8 */ + border-radius: 8px; +} diff --git a/css/jquery-ui.theme.min.css b/css/jquery-ui.theme.min.css new file mode 100644 index 0000000..6d4c18b --- /dev/null +++ b/css/jquery-ui.theme.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.11.2 - 2014-12-07 +* http://jqueryui.com +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-widget{font-family:droid,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:droid,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #666;background:#000 url("images/ui-bg_inset-soft_25_000000_1x100.png") 50% bottom repeat-x;color:#fff}.ui-widget-content a{color:#fff}.ui-widget-header{border:1px solid #333;background:#333 url("images/ui-bg_gloss-wave_25_333333_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #666;background:#555 url("images/ui-bg_glass_20_555555_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eee}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#eee;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #59b4d4;background:#0078a3 url("images/ui-bg_glass_40_0078a3_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#fff}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#fff;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #E0007A;background:#E0007A url("images/ui-bg_inset-soft_30_E0007A_1x100.png") 50% 50% repeat-x;font-weight:bold;color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #ccc;background:#eee url("images/ui-bg_highlight-soft_80_eeeeee_1x100.png") 50% top repeat-x;color:#2e7db2}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#2e7db2}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #ffb73d;background:#ffc73d url("images/ui-bg_glass_40_ffc73d_1x400.png") 50% 50% repeat-x;color:#111}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#111}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#111}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_cccccc_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_cccccc_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_4b8e0b_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_a83300_256x240.png")}.ui-icon-blank{background-position:16px 16px}.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-on{background-position:-96px -144px}.ui-icon-radio-off{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-start{background-position:-80px -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}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:6px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:6px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:6px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:6px}.ui-widget-overlay{background:#5c5c5c url("images/ui-bg_flat_50_5c5c5c_40x100.png") 50% 50% repeat-x;opacity:.8;filter:Alpha(Opacity=80)}.ui-widget-shadow{margin:-7px 0 0 -7px;padding:7px;background:#ccc url("images/ui-bg_flat_30_cccccc_40x100.png") 50% 50% repeat-x;opacity:.6;filter:Alpha(Opacity=60);border-radius:8px} \ No newline at end of file diff --git a/css/styles.css b/css/styles.css new file mode 100644 index 0000000..1d4a64d --- /dev/null +++ b/css/styles.css @@ -0,0 +1,114 @@ +@font-face { + font-family: 'Museo500'; + src: url(Museo500-Regular.otf); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'MuseoSlab'; + src: url(Museo_Slab.otf); + font-weight: normal; + font-style: normal; +} + +html, body { + font-family: arial, sans-serif; + color: black; + font-size: 1.15em; + margin: 0; +} + +h1 { + font-family: Museo500, sans-serif; + text-align: center; + background-color: #E0007A; + padding: 0.3em; +} + +#gauche{ + display: inline-block; +} + +#droite{ + float: right; + background-color: black; + padding: 0.2em; + margin : 0; + margin-right: 0.5em; + color: white; +} + +button { + margin: 0.5em +} + + #gauche>p { + background-color: black; + color:white; + padding: 0.2em; + margin:0; + margin-left: 0.5em; + } + +ul { + list-style: none outside none; + margin: 0; + margin-left: 0.5em; + padding: 0.2em; + margin-top: 0.2em; +} + +li { + background-color: black; + padding: 0.2em; + margin-top: 0.2em; +} + +li>div { + margin-top: 1em; + margin-right: 1em; + position: absolute; +/* margin-left: -1.3em;*/ +} + + +li>input{ + display: inline-block; + margin: 0.8em; + } + + +#mois{ + font-family: Museo500, sans-serif; + margin-left: 12em; +} + +#generer { + float: right; + margin-top: 1em; +} + +#libelles{ + font-family: Museo500, sans-serif; + display: inline-block; + width: 12em; + margin-left: 0.2em; +} + +#mois>div{ + display: inline-block; + text-align: center; + margin: 0.1em; +/* width: 3.8em;*/ +} + +#barre{ + background-color: #E0007A; + display: inline-block; +} + +/*footer {*/ +/* text-align: right;*/ +/* margin-right: 0.2em;*/ +/*}*/ diff --git a/images/logo-html5.png b/images/logo-html5.png new file mode 100644 index 0000000..ac60bf7 Binary files /dev/null and b/images/logo-html5.png differ diff --git a/images/ui-bg_flat_30_cccccc_40x100.png b/images/ui-bg_flat_30_cccccc_40x100.png new file mode 100644 index 0000000..04e8204 Binary files /dev/null and b/images/ui-bg_flat_30_cccccc_40x100.png differ diff --git a/images/ui-bg_flat_50_5c5c5c_40x100.png b/images/ui-bg_flat_50_5c5c5c_40x100.png new file mode 100644 index 0000000..eea82da Binary files /dev/null and b/images/ui-bg_flat_50_5c5c5c_40x100.png differ diff --git a/images/ui-bg_glass_20_555555_1x400.png b/images/ui-bg_glass_20_555555_1x400.png new file mode 100644 index 0000000..d931157 Binary files /dev/null and b/images/ui-bg_glass_20_555555_1x400.png differ diff --git a/images/ui-bg_glass_40_0078a3_1x400.png b/images/ui-bg_glass_40_0078a3_1x400.png new file mode 100644 index 0000000..f9f9dfa Binary files /dev/null and b/images/ui-bg_glass_40_0078a3_1x400.png differ diff --git a/images/ui-bg_glass_40_ffc73d_1x400.png b/images/ui-bg_glass_40_ffc73d_1x400.png new file mode 100644 index 0000000..f366b96 Binary files /dev/null and b/images/ui-bg_glass_40_ffc73d_1x400.png differ diff --git a/images/ui-bg_gloss-wave_25_333333_500x100.png b/images/ui-bg_gloss-wave_25_333333_500x100.png new file mode 100644 index 0000000..1e48337 Binary files /dev/null and b/images/ui-bg_gloss-wave_25_333333_500x100.png differ diff --git a/images/ui-bg_highlight-soft_80_eeeeee_1x100.png b/images/ui-bg_highlight-soft_80_eeeeee_1x100.png new file mode 100644 index 0000000..c96c2d7 Binary files /dev/null and b/images/ui-bg_highlight-soft_80_eeeeee_1x100.png differ diff --git a/images/ui-bg_inset-soft_25_000000_1x100.png b/images/ui-bg_inset-soft_25_000000_1x100.png new file mode 100644 index 0000000..686d2f4 Binary files /dev/null and b/images/ui-bg_inset-soft_25_000000_1x100.png differ diff --git a/images/ui-bg_inset-soft_30_E0007A_1x100.png b/images/ui-bg_inset-soft_30_E0007A_1x100.png new file mode 100644 index 0000000..91e386e Binary files /dev/null and b/images/ui-bg_inset-soft_30_E0007A_1x100.png differ diff --git a/images/ui-icons_222222_256x240.png b/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..c1cb117 Binary files /dev/null and b/images/ui-icons_222222_256x240.png differ diff --git a/images/ui-icons_4b8e0b_256x240.png b/images/ui-icons_4b8e0b_256x240.png new file mode 100644 index 0000000..232832a Binary files /dev/null and b/images/ui-icons_4b8e0b_256x240.png differ diff --git a/images/ui-icons_a83300_256x240.png b/images/ui-icons_a83300_256x240.png new file mode 100644 index 0000000..bb22520 Binary files /dev/null and b/images/ui-icons_a83300_256x240.png differ diff --git a/images/ui-icons_cccccc_256x240.png b/images/ui-icons_cccccc_256x240.png new file mode 100644 index 0000000..4185f97 Binary files /dev/null and b/images/ui-icons_cccccc_256x240.png differ diff --git a/images/ui-icons_ffffff_256x240.png b/images/ui-icons_ffffff_256x240.png new file mode 100644 index 0000000..4f624bb Binary files /dev/null and b/images/ui-icons_ffffff_256x240.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..b679069 --- /dev/null +++ b/index.html @@ -0,0 +1,55 @@ + + + + + + + + + + + +Planning + + + +

Planning

+ +
+

Libellé de la tâche / Nombre de semaines

+ + +
+ +
+
Date de début :
+
+ +
+
+ +
+ +
+

+

+ +
+ + + + + + + + + + + diff --git a/js/jquery-2.1.1.js b/js/jquery-2.1.1.js new file mode 100644 index 0000000..9f7b3d3 --- /dev/null +++ b/js/jquery-2.1.1.js @@ -0,0 +1,9190 @@ +/*! + * jQuery JavaScript Library v2.1.1 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-05-01T17:11Z + */ + +(function( global, factory ) { + + if ( typeof module === "object" && typeof module.exports === "object" ) { + // For CommonJS and CommonJS-like environments where a proper window is present, + // execute the factory and get jQuery + // For environments that do not inherently posses a window with a document + // (such as Node.js), expose a jQuery-making factory as module.exports + // This accentuates the need for the creation of a real window + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +// + +var arr = []; + +var slice = arr.slice; + +var concat = arr.concat; + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var support = {}; + + + +var + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + + version = "2.1.1", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }, + + // Support: Android<4.1 + // Make sure we trim BOM and NBSP + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num != null ? + + // Return just the one element from the set + ( num < 0 ? this[ num + this.length ] : this[ num ] ) : + + // Return all the elements in a clean array + slice.call( this ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray, + + isWindow: function( obj ) { + return obj != null && obj === obj.window; + }, + + isNumeric: function( obj ) { + // parseFloat NaNs numeric-cast false positives (null|true|false|"") + // ...but misinterprets leading-number strings, particularly hex literals ("0x...") + // subtraction forces infinities to NaN + return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; + }, + + isPlainObject: function( obj ) { + // Not plain objects: + // - Any object or value whose internal [[Class]] property is not "[object Object]" + // - DOM nodes + // - window + if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.constructor && + !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { + return false; + } + + // If the function hasn't returned already, we're confident that + // |obj| is a plain object, created by {} or constructed with new Object + return true; + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + type: function( obj ) { + if ( obj == null ) { + return obj + ""; + } + // Support: Android < 4.0, iOS < 6 (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call(obj) ] || "object" : + typeof obj; + }, + + // Evaluates a script in a global context + globalEval: function( code ) { + var script, + indirect = eval; + + code = jQuery.trim( code ); + + if ( code ) { + // If the code includes a valid, prologue position + // strict mode pragma, execute code by injecting a + // script tag into the document. + if ( code.indexOf("use strict") === 1 ) { + script = document.createElement("script"); + script.text = code; + document.head.appendChild( script ).parentNode.removeChild( script ); + } else { + // Otherwise, avoid the DOM node creation, insertion + // and removal by using an indirect global eval + indirect( code ); + } + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Support: Android<4.1 + trim: function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var tmp, args, proxy; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + now: Date.now, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( type === "function" || jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v1.10.19 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-04-18 + */ +(function( window ) { + +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + + "*\\]", + + pseudos = ":(" + characterEncoding + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox<24 + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + high < 0 ? + // BMP codepoint + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document (jQuery #6963) + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key + " " ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== strundefined && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, + doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent !== parent.top ) { + // IE11 does not have attachEvent, so all must suffer + if ( parent.addEventListener ) { + parent.addEventListener( "unload", function() { + setDocument(); + }, false ); + } else if ( parent.attachEvent ) { + parent.attachEvent( "onunload", function() { + setDocument(); + }); + } + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { + div.innerHTML = "
"; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [ m ] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( div.querySelectorAll("[msallowclip^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( div.querySelectorAll("[name=d]").length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + while ( (node = elem[i++]) ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[6] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] ) { + match[2] = match[4] || match[5] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( (tokens = []) ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (oldCache = outerCache[ dir ]) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return (newCache[ 2 ] = oldCache[ 2 ]); + } else { + // Reuse newcache so results back-propagate to previous elements + outerCache[ dir ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + len = elems.length; + + if ( outermost ) { + outermostContext = context !== document && context; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( (selector = compiled.selector || selector) ); + + results = results || []; + + // Try to minimize operations if there is no seed and only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = ""; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = ""; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + null; + } + }); +} + +return Sizzle; + +})( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); + + + +var risSimple = /^.[^:#\[\.,]*$/; + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( risSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; + }); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); +}; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + len = this.length, + ret = [], + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +}); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + init = jQuery.fn.init = function( selector, context ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return typeof rootjQuery.ready !== "undefined" ? + rootjQuery.ready( selector ) : + // Execute immediately if ready is not present + selector( jQuery ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.extend({ + dir: function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; + }, + + sibling: function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; + } +}); + +jQuery.fn.extend({ + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter(function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + matched.push( cur ); + break; + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.unique( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return elem.contentDocument || jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.unique( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +}); +var rnotwhite = (/\S+/g); + + + +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); + + +// The deferred used on DOM ready +var readyList; + +jQuery.fn.ready = function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; +}; + +jQuery.extend({ + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.triggerHandler ) { + jQuery( document ).triggerHandler( "ready" ); + jQuery( document ).off( "ready" ); + } + } +}); + +/** + * The ready event handler and self cleanup method + */ +function completed() { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + jQuery.ready(); +} + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + } else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + } + } + return readyList.promise( obj ); +}; + +// Kick off the DOM ready check even if the user does not +jQuery.ready.promise(); + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + len ? fn( elems[0], key ) : emptyGet; +}; + + +/** + * Determines whether an object can have data + */ +jQuery.acceptData = function( owner ) { + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + /* jshint -W018 */ + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + +function Data() { + // Support: Android < 4, + // Old WebKit does not have Object.preventExtensions/freeze method, + // return new empty object instead with no [[set]] accessor + Object.defineProperty( this.cache = {}, 0, { + get: function() { + return {}; + } + }); + + this.expando = jQuery.expando + Math.random(); +} + +Data.uid = 1; +Data.accepts = jQuery.acceptData; + +Data.prototype = { + key: function( owner ) { + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return the key for a frozen object. + if ( !Data.accepts( owner ) ) { + return 0; + } + + var descriptor = {}, + // Check if the owner object already has a cache key + unlock = owner[ this.expando ]; + + // If not, create one + if ( !unlock ) { + unlock = Data.uid++; + + // Secure it in a non-enumerable, non-writable property + try { + descriptor[ this.expando ] = { value: unlock }; + Object.defineProperties( owner, descriptor ); + + // Support: Android < 4 + // Fallback to a less secure definition + } catch ( e ) { + descriptor[ this.expando ] = unlock; + jQuery.extend( owner, descriptor ); + } + } + + // Ensure the cache object + if ( !this.cache[ unlock ] ) { + this.cache[ unlock ] = {}; + } + + return unlock; + }, + set: function( owner, data, value ) { + var prop, + // There may be an unlock assigned to this node, + // if there is no entry for this "owner", create one inline + // and set the unlock as though an owner entry had always existed + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + // Handle: [ owner, key, value ] args + if ( typeof data === "string" ) { + cache[ data ] = value; + + // Handle: [ owner, { properties } ] args + } else { + // Fresh assignments by object are shallow copied + if ( jQuery.isEmptyObject( cache ) ) { + jQuery.extend( this.cache[ unlock ], data ); + // Otherwise, copy the properties one-by-one to the cache object + } else { + for ( prop in data ) { + cache[ prop ] = data[ prop ]; + } + } + } + return cache; + }, + get: function( owner, key ) { + // Either a valid cache is found, or will be created. + // New caches will be created and the unlock returned, + // allowing direct access to the newly created + // empty data object. A valid owner object must be provided. + var cache = this.cache[ this.key( owner ) ]; + + return key === undefined ? + cache : cache[ key ]; + }, + access: function( owner, key, value ) { + var stored; + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ((key && typeof key === "string") && value === undefined) ) { + + stored = this.get( owner, key ); + + return stored !== undefined ? + stored : this.get( owner, jQuery.camelCase(key) ); + } + + // [*]When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, name, camel, + unlock = this.key( owner ), + cache = this.cache[ unlock ]; + + if ( key === undefined ) { + this.cache[ unlock ] = {}; + + } else { + // Support array or space separated string of keys + if ( jQuery.isArray( key ) ) { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = key.concat( key.map( jQuery.camelCase ) ); + } else { + camel = jQuery.camelCase( key ); + // Try the string as a key before any manipulation + if ( key in cache ) { + name = [ key, camel ]; + } else { + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + name = camel; + name = name in cache ? + [ name ] : ( name.match( rnotwhite ) || [] ); + } + } + + i = name.length; + while ( i-- ) { + delete cache[ name[ i ] ]; + } + } + }, + hasData: function( owner ) { + return !jQuery.isEmptyObject( + this.cache[ owner[ this.expando ] ] || {} + ); + }, + discard: function( owner ) { + if ( owner[ this.expando ] ) { + delete this.cache[ owner[ this.expando ] ]; + } + } +}; +var data_priv = new Data(); + +var data_user = new Data(); + + + +/* + Implementation Summary + + 1. Enforce API surface and semantic compatibility with 1.9.x branch + 2. Improve the module's maintainability by reducing the storage + paths to a single mechanism. + 3. Use the same single mechanism to support "private" and "user" data. + 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) + 5. Avoid exposing implementation details on user objects (eg. expando properties) + 6. Provide a clear path for implementation upgrade to WeakMap in 2014 +*/ +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /([A-Z])/g; + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + data_user.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend({ + hasData: function( elem ) { + return data_user.hasData( elem ) || data_priv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return data_user.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + data_user.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to data_priv methods, these can be deprecated. + _data: function( elem, name, data ) { + return data_priv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + data_priv.remove( elem, name ); + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = data_user.get( elem ); + + if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE11+ + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + data_priv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + data_user.set( this, key ); + }); + } + + return access( this, function( value ) { + var data, + camelKey = jQuery.camelCase( key ); + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + // Attempt to get data from the cache + // with the key as-is + data = data_user.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to get data from the cache + // with the key camelized + data = data_user.get( elem, camelKey ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, camelKey, undefined ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each(function() { + // First, attempt to store a copy or reference of any + // data that might've been store with a camelCased key. + var data = data_user.get( this, camelKey ); + + // For HTML5 data-* attribute interop, we have to + // store property names with dashes in a camelCase form. + // This might not apply to all properties...* + data_user.set( this, camelKey, value ); + + // *... In the case of properties that might _actually_ + // have dashes, we need to also store a copy of that + // unchanged property. + if ( key.indexOf("-") !== -1 && data !== undefined ) { + data_user.set( this, key, value ); + } + }); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each(function() { + data_user.remove( this, key ); + }); + } +}); + + +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = data_priv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray( data ) ) { + queue = data_priv.access( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return data_priv.get( elem, key ) || data_priv.access( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + data_priv.remove( elem, [ type + "queue", key ] ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = data_priv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var isHidden = function( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); + }; + +var rcheckableType = (/^(?:checkbox|radio)$/i); + + + +(function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // #11217 - WebKit loses check when the name is after the checked attribute + // Support: Windows Web Apps (WWA) + // `name` and `type` need .setAttribute for WWA + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 + // old WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Make sure textarea (and checkbox) defaultValue is properly cloned + // Support: IE9-IE11+ + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; +})(); +var strundefined = typeof undefined; + + + +support.focusinBubbles = "onfocusin" in window; + + +var + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.get( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = data_priv.hasData( elem ) && data_priv.get( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnotwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + data_priv.remove( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && jQuery.acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, j, ret, matched, handleObj, + handlerQueue = [], + args = slice.call( arguments ), + handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, matches, sel, handleObj, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.disabled !== true || event.type !== "click" ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: Cordova 2.5 (WebKit) (#13255) + // All events should have a target; Cordova deviceready doesn't + if ( !event.target ) { + event.target = document; + } + + // Support: Safari 6.0+, Chrome < 28 + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + this.focus(); + return false; + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } +}; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + // Support: Android < 4.0 + src.returnValue === false ? + returnTrue : + returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && e.preventDefault ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && e.stopPropagation ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && e.stopImmediatePropagation ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +// Support: Chrome 15+ +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// Create "bubbling" focus and blur events +// Support: Firefox, Chrome, Safari +if ( !support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + var doc = this.ownerDocument || this, + attaches = data_priv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this, + attaches = data_priv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + data_priv.remove( doc, fix ); + + } else { + data_priv.access( doc, fix, attaches ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); + + +var + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style|link)/i, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /^$|\/(?:java|ecma)script/i, + rscriptTypeMasked = /^true\/(.*)/, + rcleanScript = /^\s*\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + + // Support: IE 9 + option: [ 1, "" ], + + thead: [ 1, "", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] + }; + +// Support: IE 9 +wrapMap.optgroup = wrapMap.option; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: 1.x compatibility +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + + if ( match ) { + elem.type = match[ 1 ]; + } else { + elem.removeAttribute("type"); + } + + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + data_priv.set( + elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) + ); + } +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( data_priv.hasData( src ) ) { + pdataOld = data_priv.access( src ); + pdataCur = data_priv.set( dest, pdataOld ); + events = pdataOld.events; + + if ( events ) { + delete pdataCur.handle; + pdataCur.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( data_user.hasData( src ) ) { + udataOld = data_user.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + data_user.set( dest, udataCur ); + } +} + +function getAll( context, tag ) { + var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : + context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : + []; + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], ret ) : + ret; +} + +// Support: IE >= 9 +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = jQuery.contains( elem.ownerDocument, elem ); + + // Support: IE >= 9 + // Fix Cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var elem, tmp, tag, wrap, contains, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + // Support: QtWebKit + // jQuery.merge because push.apply(_, arraylike) throws + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: QtWebKit + // jQuery.merge because push.apply(_, arraylike) throws + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Fixes #12346 + // Support: Webkit, IE + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; + }, + + cleanData: function( elems ) { + var data, elem, type, key, + special = jQuery.event.special, + i = 0; + + for ( ; (elem = elems[ i ]) !== undefined; i++ ) { + if ( jQuery.acceptData( elem ) ) { + key = elem[ data_priv.expando ]; + + if ( key && (data = data_priv.cache[ key ]) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + if ( data_priv.cache[ key ] ) { + // Discard any remaining `private` data + delete data_priv.cache[ key ]; + } + } + } + // Discard any remaining `user` data + delete data_user.cache[ elem[ data_user.expando ] ]; + } + } +}); + +jQuery.fn.extend({ + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each(function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + }); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + remove: function( selector, keepData /* Internal Use Only */ ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map(function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var arg = arguments[ 0 ]; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + arg = this.parentNode; + + jQuery.cleanData( getAll( this ) ); + + if ( arg ) { + arg.replaceChild( elem, this ); + } + }); + + // Force removal if there was no new content (e.g., from empty arguments) + return arg && (arg.length || arg.nodeType) ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback ) { + + // Flatten any nested arrays + args = concat.apply( [], args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[ 0 ], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + self.domManip( args, callback ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + // Support: QtWebKit + // jQuery.merge because push.apply(_, arraylike) throws + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl ) { + jQuery._evalUrl( node.src ); + } + } else { + jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); + } + } + } + } + } + } + + return this; + } +}); + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: QtWebKit + // .get() because push.apply(_, arraylike) throws + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + + +var iframe, + elemdisplay = {}; + +/** + * Retrieve the actual display of a element + * @param {String} name nodeName of the element + * @param {Object} doc Document object + */ +// Called only from within defaultDisplay +function actualDisplay( name, doc ) { + var style, + elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + + // getDefaultComputedStyle might be reliably used only on attached element + display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? + + // Use of this method is a temporary fix (more like optmization) until something better comes along, + // since it was removed from specification and supported only in FF + style.display : jQuery.css( elem[ 0 ], "display" ); + + // We don't have any data stored on the element, + // so use "detach" method as fast way to get rid of the element + elem.detach(); + + return display; +} + +/** + * Try to determine the default display value of an element + * @param {String} nodeName + */ +function defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + + // Use the already-created iframe if possible + iframe = (iframe || jQuery( " + + + diff --git a/js/pickadate.js-3.5.3/_docs/index.htm b/js/pickadate.js-3.5.3/_docs/index.htm new file mode 100644 index 0000000..59e1939 --- /dev/null +++ b/js/pickadate.js-3.5.3/_docs/index.htm @@ -0,0 +1,92 @@ + +{% + fileSize_js_core = meta.fileSize( grunt.file.read( dirs.lib.min + '/picker.js') ).gzip + fileSize_js_date = meta.fileSize( grunt.file.read( dirs.lib.min + '/picker.date.js') ).gzip + fileSize_js_time = meta.fileSize( grunt.file.read( dirs.lib.min + '/picker.time.js') ).gzip + + fileSize_css_core = meta.fileSize( grunt.file.read( dirs.themes.min + '/default.css') ).gzip + fileSize_css_date = meta.fileSize( grunt.file.read( dirs.themes.min + '/default.date.css') ).gzip + fileSize_css_time = meta.fileSize( grunt.file.read( dirs.themes.min + '/default.time.css') ).gzip + + fileSize_js = fileSize_js_core + fileSize_js_date + fileSize_js_time + fileSize_js = (fileSize_js/1024).toFixed(0) + + fileSize_css = fileSize_css_core + fileSize_css_date + fileSize_css_time + fileSize_css = (fileSize_css/1024).toFixed(0) + + languagesCount = grunt.file.expand(dirs.translations.min + '/*.js').length +%} + +
+ +
+ +

Demo§

+ +
// The date picker (read the docs)
+$('.datepicker').pickadate()
+
+ +
// The time picker (read the docs)
+$('.timepicker').pickatime()
+
+ +
+

There’s a tonne of options to customize the date and time pickers, such as month/year selectors, time intervals, etc.

+

There’s also a rich API to extend the functionality of the picker. Some examples are displayed on Codepen.

+
+ +
+

When using the “classic” theme, it is important to have a wrapper div with position: relative around the source input to ensure the picker is sized according to the input element it is bound to.

+
+ +
+ +
+ +

Features§

+ +
+
    +
  • Supports jQuery 1.7 and up.
  • +
  • Is ARIA-enabled to be WCAG 2.0 compliant. (added in v3.4)
  • +
  • Leaves a tiny footprint of {%= fileSize_js %}kb JS and {%= fileSize_css %}kb CSS. (minified and gzipped)
  • +
  • Comes with translations for {%= languagesCount %} languages.
  • +
  • Has touch & keyboard friendliness.
  • +
  • Follows BEM style class naming.
  • +
  • Utilizes LESS based stylesheets.
  • +
  • Includes a Grunt based build system.
  • +
+
+ +
+ +
+ +

Browser Support§

+ +

Supports all modern browsers – and IE8+.

+

Specifically, v3 has been tested with Chrome MWA, Firefox MWA, Opera MWA, Safari Mi, Internet Explorer W, Blackberry 6.0+ and Android 3.2+ browsers.

+ + +

M = Mac, W = Windows, A = Android, i = iOS

+
+ +
+

Make sure to also include the legacy.js file along for the oldie browsers.

+
+ +
+ +
+ +

Community§

+ +

pickadate.js is an open source project, shared under an MIT license. All code and discussions are hosted on Github.

+

Contributions are very welcome – please read these pointers before submitting a bug report or feature request.

+

If you find this library useful and would like to see further development, consider supporting it.

+ +
+ +
+ diff --git a/js/pickadate.js-3.5.3/_docs/time.htm b/js/pickadate.js-3.5.3/_docs/time.htm new file mode 100644 index 0000000..e12d7ab --- /dev/null +++ b/js/pickadate.js-3.5.3/_docs/time.htm @@ -0,0 +1,503 @@ + + +{% timeDemoField = function( props ) { + props = props || {} + return '
' + + ( props.pre || '' ) + + '' + + '
' +} %} + + +
+ + +
+ +

The Time Picker§

+ +

The basic setup requires targetting an input element and invoking the picker:

+ +
$('.timepicker').pickatime()
+ {%= timeDemoField({ klass: 'js__timepicker' }) %} + +
+ + +
+ +

Options§

+

With the basic invocation above, these are the default settings:

+ +
// Translations and clear button
+clear: 'Clear',
+
+// Formats
+format: 'h:i A',
+formatLabel: undefined,
+formatSubmit: undefined,
+hiddenPrefix: undefined,
+hiddenSuffix: '_submit',
+
+// Editable input
+editable: undefined,
+
+// Time intervals
+interval: 30,
+
+// Time limits
+min: undefined,
+max: undefined,
+
+// Disable times
+disable: undefined,
+
+// Root container
+container: undefined,
+
+// Events
+onStart: undefined,
+onRender: undefined,
+onOpen: undefined,
+onClose: undefined,
+onSet: undefined,
+onStop: undefined,
+
+// Classes
+klass: {
+
+    // The element states
+    input: 'picker__input',
+    active: 'picker__input--active',
+
+    // The root picker and states *
+    picker: 'picker picker--time',
+    opened: 'picker--opened',
+    focused: 'picker--focused',
+
+    // The picker holder
+    holder: 'picker__holder',
+
+    // The picker frame, wrapper, and box
+    frame: 'picker__frame',
+    wrap: 'picker__wrap',
+    box: 'picker__box',
+
+    // List of times
+    list: 'picker__list',
+    listItem: 'picker__list-item',
+
+    // Time states
+    disabled: 'picker__list-item--disabled',
+    selected: 'picker__list-item--selected',
+    highlighted: 'picker__list-item--highlighted',
+    viewset: 'picker__list-item--viewset',
+    now: 'picker__list-item--now',
+
+    // Clear button
+    buttonClear: 'picker__button--clear',
+}
+ +
+

* It is important to not add any stylings to the picker’s root element. Instead, target the .picker__holder element (or any other within) based on the state of the root element.

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

Translations§

+

Coming soon...

+ +
+ +
+ + +
+ +
+ +

Clear Button§

+

Change the text or hide the button completely by passing a false-y value:

+ +
$('.timepicker').pickatime({
+    clear: ''
+})
+ + {%= timeDemoField({ id: 'time_demo__buttons' }) %} + +
+ +
+ + +
+ +
+ +

Formats§

+

Display a human-friendly label and input format and use an alternate one to submit.

+

This is done by creating a new hidden input element with the same name attribute as the original and an optional prefix/suffix:

+ +
$('.timepicker').pickatime({
+    // Escape any “rule” characters with an exclamation mark (!).
+    format: 'T!ime selected: h:i a',
+    formatLabel: '<b>h</b>:i <!i>a</!i>',
+    formatSubmit: 'HH:i',
+    hiddenPrefix: 'prefix__',
+    hiddenSuffix: '__suffix'
+})
+ + {%= timeDemoField({ id: 'time_demo__formats--a' }).replace( 'type=text', 'name=time_input type=text' ) %} + +

The formatLabel option is unique. It can contain HTML and it can also be a function if you want to create the label during run-time:

+ + + +
$('.timepicker').pickatime({
+    formatLabel: function(time) {
+        var hours = ( time.pick - this.get('now').pick ) / 60,
+            label = hours < 0 ? ' !hours to now' : hours > 0 ? ' !hours from now' : 'now'
+        return  'h:i a <sm!all>' + ( hours ? Math.abs(hours) : '' ) + label + '</sm!all>'
+    }
+})
+ + {%= timeDemoField({ id: 'time_demo__formats--b' }).replace( 'type=text', 'name=time_demo__formats type=text' ) %} + +

Send the hidden value only§

+

A majority of the time, the value that needs to be sent to the server is just the hidden value – and not the visible one. To make this happen, use the hiddenName option.

+

This essentially nullifies the hiddenPrefix and hiddenSuffix, strips the name attribute from the source input, and then sets it as the name of the hidden input:

+ +
$('.timepicker').pickatime({
+    formatSubmit: 'HH:i',
+    hiddenName: true
+})
+ + {%= timeDemoField({ id: 'time_demo__formats--c' }).replace( 'type=text', 'name=time_input type=text' ) %} + +

Formatting Rules§

+

The following rules can be used to format any time:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RuleDescriptionResult
hHour in 12-hour format1 – 12
hhHour in 12-hour format with a leading zero01 – 12
HHour in 24-hour format0 – 23
HHHour in 24-hour format with a leading zero00 – 23
iMinutes00 – 59
aDay time perioda.m. / p.m.
ADay time period in uppercaseAM / PM
+ +
+ +
+ + +
+ +
+ +

Editable input§

+

By default, typing into the input is disabled by giving it a readOnly attribute. Doing so ensures that virtual keyboards don’t pop open on touch devices. It is also a confirmation that values passed to the server will be of a consistent format.

+

However, this behavior can be changed using the editable option:

+ +
$('.timepicker').pickatime({
+    editable: true
+})
+ + {%= timeDemoField({ id: 'time_demo__editable' }) %} + +
+

An important thing to note here is that this disables keyboard bindings on the input element, such as arrow keys opening the picker. You will have to add your own bindings as you see fit.

+
+ +

Using HTML5 attributes§

+

Because each input is readOnly by default, HTML5 attributes, such as required and pattern, do not get enforced.

+

To enable default browser behavior on these attributes, set the editable property to true.

+ +
+ +
+ + +
+ +
+ +

Intervals§

+

Choose the minutes interval between each time in the list:

+ +
$('.timepicker').pickatime({
+    interval: 150
+})
+ + {%= dateDemoField({ id: 'time_demo__interval' }) %} + +
+ +
+ + +
+ +
+ +

Time Limits§

+

Set the minimum and maximum selectable times on the picker.

+ +

Using JavaScript dates§

+ +
$('.datepicker').pickadate({
+    min: new Date(2013,3,20,7),
+    max: new Date(2013,7,14,18,30)
+})
+ + {%= dateDemoField({ id: 'time_demo__limits--a' }) %} + +

Using arrays formatted as [HOUR,MINUTE]§

+ +
$('.timepicker').pickatime({
+    min: [7,30],
+    max: [14,0]
+})
+ + {%= timeDemoField({ id: 'time_demo__limits--b' }) %} + +

Using integers or a boolean§

+ +
$('.timepicker').pickatime({
+    // An integer (positive/negative) sets it as intervals relative from now.
+    min: -5,
+    // `true` sets it to now. `false` removes any limits.
+    max: true
+})
+ + {%= timeDemoField({ id: 'time_demo__limits--c' }) %} + +
+ +
+ + +
+ +
+ +

Disable Times§

+

Disable a specific or arbitrary set of times selectable on the picker.

+ +

Using JavaScript dates§

+ +
$('.timepicker').pickatime({
+    disable: [
+        new Date(2014,3,20,4,30),
+        new Date(2014,3,20,9)
+    ]
+})
+ + {%= timeDemoField({ id: 'time_demo__disable-times--a' }) %} + +

Using arrays formatted as [HOUR,MINUTE]§

+ +
$('.timepicker').pickatime({
+    disable: [
+        [0,30],
+        [2,0],
+        [8,30],
+        [9,0]
+    ]
+})
+ + {%= timeDemoField({ id: 'time_demo__disable-times--b' }) %} + +

Using integers as hours (0 to 23)§

+ +
$('.timepicker').pickatime({
+    disable: [
+        3, 5, 7
+    ]
+})
+ + {%= timeDemoField({ id: 'time_demo__disable-times--c' }) %} + +

Using objects as a range of times§

+ +
$('.timepicker').pickatime({
+    disable: [
+        { from: [2,0], to: [5,30] }
+    ]
+})
+ + {%= dateDemoField({ id: 'date_demo__disable-times--d' }) %} + +

The values for from & to can be:

+
    +
  • A JavaScript Date object,
  • +
  • An array formatted as [HOUR,MINUTE],
  • +
  • And true to set it as “now”.
  • +
+

The values can also be integers representing time intervals relative to the other:

+
    +
  • to can only be positive:
    { from: [3,0], to: 10 }
  • +
  • from can only be negative:
    { from: -10, to: true }
  • +
+ +

Disabling all with a set of exceptions§

+

Enable only a specific or arbitrary set of times by setting true as the first item in the collection:

+ +
$('.timepicker').pickatime({
+    disable: [
+        true,
+        3, 5, 7,
+        [0,30],
+        [2,0],
+        [8,30],
+        [9,0]
+    ]
+})
+ + {%= timeDemoField({ id: 'time_demo__disable-times--e' }) %} + +

Disabling ranges with exceptions§

+

Enable times that fall within a range of disabled times by adding the inverted parameter to the item within the collection:

+ +
$('.timepicker').pickatime({
+    disable: [
+        1,
+        [1, 30, 'inverted'],
+        { from: [4, 30], to: [10, 30] },
+        [6, 30, 'inverted'],
+        { from: [8, 0], to: [9, 0], inverted: true }
+    ]
+})
+ + {%= timeDemoField({ id: 'time_demo__disable-times--f' }) %} + +
+ +
+ + + +
+ +
+ +

container§

+

By default, the picker’s root element is inserted right after the input element. Specify where to insert the root element by passing any valid CSS selector to this option:

+ +
+ +
$('.timepicker').pickatime({
+    container: '#root-outlet'
+})
+ + {%= timeDemoField({ id: 'time_demo__container' }) %} + +
+

This is especially important when the input falls within a label element because click events bubble up to the label element and re-open the picker.

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

events§

+

Fire off events as the user interacts with the picker:

+ +
$('.timepicker').pickatime({
+    onStart: function() {
+        console.log('Hello there :)')
+    },
+    onRender: function() {
+        console.log('Whoa.. rendered anew')
+    },
+    onOpen: function() {
+        console.log('Opened up')
+    },
+    onClose: function() {
+        console.log('Closed now')
+    },
+    onStop: function() {
+        console.log('See ya.')
+    },
+    onSet: function(context) {
+        console.log('Just set stuff:', context)
+    }
+})
+ + {%= timeDemoField({ id: 'time_demo__events' }).replace( 'Try me', 'Open your console and try me' ) %} + +

The onSet event is the only callback that is passed a context argument that provides details as to which properties are being “set”.

+

Within scope of all six of these events, this refers to the picker.

+

To learn more on how to use the picker object, read the API documentation.

+ +
+ +
+ + + diff --git a/js/pickadate.js-3.5.3/api.htm b/js/pickadate.js-3.5.3/api.htm new file mode 100644 index 0000000..97d6470 --- /dev/null +++ b/js/pickadate.js-3.5.3/api.htm @@ -0,0 +1,1235 @@ + + + + + + + + + + + +pickadate.js / api + + + + + + + + + + + + + +
+ +
+ +
+ + + +
+ + + + + + + + + + + + +
+ +
+ +

The API§

+ +

You can play with the picker API to extend and create custom functionality:

+ +
var $input = $('.datepicker').pickadate()
+
+// Use the picker object directly.
+var picker = $input.pickadate('picker')
+picker.methodName(argument1, argument2, ...)
+picker.objectName
+
+// Or pass through the element’s plugin data.
+$input.pickadate(methodName, argument1, argument2, ...)
+$input.pickadate(objectName)
+ +
+

For most examples on this page, the date picker is used, but the same API applies to the time picker as well.

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

Methods§

+ +

There are eleven methods available on the picker:

+ +
    +
  1. open
  2. +
  3. close
  4. +
  5. start
  6. +
  7. stop
  8. +
  9. render
  10. +
  11. clear
  12. +
  13. get
  14. +
  15. set
  16. +
  17. on
  18. +
  19. off
  20. +
  21. trigger
  22. +
+ +

All these methods (except get) return the picker object and are therefore chainable:

+ +
picker.open().clear().close()...
+ +
+ +
+ + +
+ +
+ +

Objects§

+ +

There are four objects available through the picker:

+ +
    +
  1. $node
  2. +
  3. $root
  4. +
  5. _hidden
  6. +
  7. component
  8. +
+ +
+ +
+ + +
+ +
+ +

The Methods§

+ +
+ +
+ + +
+ +
+ +

Open and Close§

+

Open and close the picker holder. To check if it’s already open, use the get method.

+ +
picker.open()
+picker.close()
+
+// If a “click” is involved, prevent the event bubbling.
+event.stopPropagation()
+
+// If we want to maintain focus on the input,
+// prevent the default action on “mousedown”.
+event.preventDefault()
+ +
+ +
+ +
+ +

Close with focus§

+ +

Close the picker while keeping focus on the input element by passing a truth-y argument.

+ +
picker.close(true)
+ +
+ +
+ +
+ +

Open without focus§

+ +

Open the picker without focusing onto the input element by passing false as the first argument. Opening the picker this way, there’s a few things to note:

+

(1) The only way to close it is with a separate custom binding – in this example, on document click.

+

(2) The “opening” events are still triggered – however, using the get method to see if the picker is open will return false.

+

(3) If any of the picker elements is focused/clicked, it resumes normal behavior.

+ +
picker.open(false)
+$(document).on('click', function() {
+    picker.close()
+})
+ +
+ +
+ +
+ + +
+ +
+ +

Start and Stop§

+

Destroy and rebuild the picker. To check if it’s already started, use the get method.

+ +
picker.stop()
+picker.start()
+ +
+ +
+

Destroying the picker also clears any events’ callbacks bound on it.

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

Render§

+

Refresh the picker after adding something to the holder.

+ +
picker.render()
+ +
+ +

By default, only the “face” of the picker (i.e. the box element), has it’s contents re-rendered. To render the entire picker from the root up, pass true as the first argument:

+ +
picker.render(true)
+ +
+ +
+ + +
+ +
+ +

Clear§

+

Clear the value in the picker’s input element.

+ +
picker.clear()
+ +
+ +

This is a shorthand that uses the set method behind the scenes.

+ +
+ +
+ + +
+ +
+ +

Get§

+ +

Get the properties, objects, and states of the picker.

+ +
picker.get(thing)
+ +

The thing argument is an optional string and can be one of the following:

+ + + +

* Item Objects§

+ +

The things denoted in the list above with an asterisk (*) return a picker item object that can be formatted by passing a second string argument using the date or time formatting rules:

+
picker.get(thing, format)
+ +

Each “date” or “time” within the picker has an item object accompanying it behind the scenes.

+ +

Here’s a date picker item object for 20 April, 2013:

+
{
+    // The full year.
+    year: 2013,
+
+    // The month with zero-as-index.
+    month: 3,
+
+    // The date of the month.
+    date: 20,
+
+    // The day of the week with zero-as-index.
+    day: 6,
+
+    // The underlying JavaScript Date object.
+    obj: { 'Sat, 20 Apr 2013 04:00:00 GMT' },
+
+    // The “pick” value used for comparisons.
+    pick: 1366430400000
+}
+ +

Here’s a time picker item object for 4:20 PM:

+
{
+    // Hour of the day from 0 to 23.
+    hour: 16,
+
+    // The minutes of the hour from 0 to 59 (based on the interval).
+    mins: 20,
+
+    // The “pick” value used for comparisons.
+    pick: 980
+}
+ +
+ +
+ + +
+ +
+ +

Get value§

+ +

Returns the string value of the picker’s input element.

+ +
picker.get() // Short for `picker.get('value')`.
+ +
+ +
+ +
+ +

Get select§

+ +

Returns the item object or formatted string of the date that is visually selected.

+

Defaults to null when there’s no value.

+
picker.get('select')
+picker.get('select', 'yyyy/mm/dd')
+
+ +
+ +
+ +

Get highlight§

+ +

Returns the item object or formatted string of the date that is visually highlighted.

+

Defaults to “today” (or “now” for the time picker) when there’s no value.

+
picker.get('highlight')
+picker.get('highlight', 'yyyy/mm/dd')
+
+ +
+ +
+ +

Get view§

+ +

Returns the item object or formatted string of the date that determines the current view.

+

Defaults to the first day of the current month (or “now” for the time picker) when there’s no value.

+
picker.get('view')
+picker.get('view', 'yyyy/mm/dd')
+
+ +
+ +
+ +

Get min§

+ +

Returns the item object or formatted string of the date that determines the lower limit.

+

Defaults to a -Infinity item object when it is not explicitly set in the options or through the picker’s API.

+
picker.get('min')
+picker.get('min', 'yyyy/mm/dd')
+
+ +
+ +
+ +

Get max§

+ +

Returns the item object or formatted string of the date that determines the upper limit.

+

Defaults to an Infinity item object when it is not explicitly set in the options or through the picker’s API.

+
picker.get('max')
+picker.get('max', 'yyyy/mm/dd')
+
+ +
+ +
+ +

Get open§

+ +

Returns a boolean value of whether the picker is open or not.

+
picker.get('open')
+
+ +
+ +
+ +

Get start§

+ +

Returns a boolean value of whether the picker has started or not.

+
picker.get('start')
+
+ +
+ +
+ +

Get id§

+ +

Returns a unique string that is the ID of the picker and it’s element. If the element has no ID, it is set to something random.

+
picker.get('id')
+
+ +
+ +
+ +

Get disable and enable§

+ +

Both these things work together to determine which item objects to disable on the picker:

+
// Array passed in options to disable dates
+var datesToDisable = [ 1, 4, 7, [2013,3,8], [2013,3,19], new Date(2013,3,26) ]
+
+// Returns `1` to represent a base “enabled” state
+picker.get('enable')
+
+// Returns the collection of dates to disable
+picker.get('disable')
+
+ +

However, when all dates are disabled and a select few are enabled, it behaves differently:

+
// Array passed in options to disable all dates except a few
+var datesToDisable = [ true, 1, 4, 7, [2013,3,8], [2013,3,19], new Date(2013,3,26) ]
+
+// Returns `-1` to represent a base “flipped” state
+picker.get('enable')
+
+// Returns the collection of dates to *not* disable
+picker.get('disable')
+
+ +
+ +
+ + +
+ +
+ +

Set§

+ +

Set the properties, objects, and states of the picker.

+ +
// One at a time
+picker.set(thing, value)
+
+// Multiple at once
+picker.set({
+    thing: value,
+    thing: value,
+    thing: value
+})
+ +

The value is based on the thing being set. The thing, is a string that can be:

+ + + +

* cascading changes§

+ +

When the things denoted in the list above with an asterisk (*) are set, they cascade into updating other things using the same value.

+ +

muted callbacks§

+ +

By default, any callbacks bound with the on method will be fired when it’s relevant thing is set. To silenty set a thing, pass an options object with the muted parameter set to true:

+ +
// One at a time
+picker.set(thing, value, { muted: true })
+
+// Multiple at once
+picker.set({
+    thing: value,
+    thing: value,
+    thing: value
+}, { muted: true })
+
+ +
+ +
+ + +
+ +
+ +

Set clear§

+

Clear the value in the picker’s input element.

+ +
picker.set('clear')
+ +
+ +

This is the full form of the clear method.

+ +
+ +
+ + +
+ +
+ +

Set select§

+

Setting select has cascading changes that update the highlight, the view, and the value of the input element based on the settings format.

+ +

Select a date item object§

+ +
// Using arrays formatted as [YEAR,MONTH,DATE].
+picker.set('select', [2013,3,20])
+
+// Using JavaScript Date objects.
+picker.set('select', new Date(2013, 3, 30))
+
+// Using positive integers as UNIX timestamps.
+picker.set('select', 1366898887654)
+
+// Using a string along with the parsing format (defaults to `format` option).
+picker.set('select', '2014-04-20', { format: 'yyyy-mm-dd' })
+ +
+ +

Select a time item object§

+ +
// Using arrays formatted as [HOUR,MINUTE].
+picker.set('select', [3,0])
+
+// Using JavaScript Date objects.
+picker.set('select', new Date(2013, 3, 20, 10, 30))
+
+// Using positive integers as minutes.
+picker.set('select', 540)
+
+// Using a string along with the parsing format (defaults to `format` option).
+picker.set('select', '04-30', { format: 'hh-i' })
+ +
+ +
+ +
+ + +
+ +
+ +

Set highlight§

+

Setting highlight has a cascading change that updates the item object that sets the view of the picker.

+ +

Highlight a date item object§

+ +
// Using arrays formatted as [YEAR,MONTH,DATE].
+picker.set('highlight', [2013,3,20])
+
+// Using JavaScript Date objects.
+picker.set('highlight', new Date(2013, 3, 30))
+
+// Using positive integers as UNIX timestamps.
+picker.set('highlight', 1366898887654)
+
+// Using a string along with the parsing format (defaults to `format` option).
+picker.set('highlight', '2014-04-20', { format: 'yyyy-mm-dd' })
+ +
+ +

Highlight a time item object§

+ +
// Using arrays formatted as [HOUR,MINUTE].
+picker.set('highlight', [15,30])
+
+// Using JavaScript Date objects.
+picker.set('highlight', new Date(2013, 3, 20, 10, 30))
+
+// Using positive integers as minutes.
+picker.set('highlight', 1080)
+
+// Using a string along with the parsing format (defaults to `format` option).
+picker.set('highlight', '04-30', { format: 'hh-i' })
+ +
+ +
+ +
+ + +
+ +
+ +

Set view§

+

Setting view has no cascading changes and the highlight remains unaffected.

+ +

Viewset a date item object§

+ +

The value passed gets normalized to the first date of the month to bring into view.

+ +
// Using arrays formatted as [YEAR,MONTH,DATE].
+picker.set('view', [2000,3,20])
+
+// Using JavaScript Date objects.
+picker.set('view', new Date(1988,7,14))
+
+// Using positive integers as UNIX timestamps.
+picker.set('view', 1587355200000)
+
+// Using a string along with the parsing format (defaults to `format` option).
+picker.set('view', '2014-04-20', { format: 'yyyy-mm-dd' })
+ +
+ +

Viewset a time item object§

+ +
// Using arrays formatted as [HOUR,MINUTE].
+picker.set('view', [15,30])
+
+// Using JavaScript Date objects.
+picker.set('view', new Date(2013, 3, 20, 10, 30))
+
+// Using positive integers as minutes.
+picker.set('view', 1080)
+
+// Using a string along with the parsing format (defaults to `format` option).
+picker.set('view', '04-30', { format: 'hh-i' })
+ +
+ +
+ +
+ + +
+ +
+ +

Set min§

+

Setting min has cascading changes on the select, highlight, and view only when the particular item object goes out of range.

+ +

Limit the min date §

+ +
// Using arrays formatted as [YEAR,MONTH,DATE].
+picker.set('min', [2013,3,20])
+
+// Using JavaScript Date objects.
+picker.set('min', new Date(2013,7,14))
+
+// Using formatted strings.
+picker.set('min', '8 January, 2014'))
+
+// Using integers as days relative to today.
+picker.set('min', -4)
+
+// Using `true` for “today”.
+picker.set('min', true)
+
+// Using `false` to remove.
+picker.set('min', false)
+ +
+ +

Limit the min time §

+ +
// Using arrays formatted as [HOUR,MINUTE].
+picker.set('min', [15,30])
+
+// Using JavaScript Date objects.
+picker.set('min', new Date(2013, 3, 20, 10, 30))
+
+// Using formatted strings.
+picker.set('min', '4:30 PM'))
+
+// Using integers as intervals relative from now.
+picker.set('min', -4)
+
+// Using `true` for “now”.
+picker.set('min', true)
+
+// Using `false` to remove.
+picker.set('min', false)
+ +
+ +
+ +
+ + +
+ +
+ +

Set max§

+

Setting max has cascading changes on the select, highlight, and view only when the particular item object goes out of range.

+ +

Limit the max date §

+ +
// Using arrays formatted as [YEAR,MONTH,DATE].
+picker.set('max', [2013,3,20])
+
+// Using JavaScript Date objects.
+picker.set('max', new Date(2013,7,14))
+
+// Using formatted strings.
+picker.set('max', '20 April, 2016'))
+
+// Using integers as days relative to today.
+picker.set('max', 4)
+
+// Using `true` for “today”.
+picker.set('max', true)
+
+// Using `false` to remove.
+picker.set('max', false)
+ +
+ +

Limit the max time §

+ +
// Using arrays formatted as [HOUR,MINUTE].
+picker.set('max', [15,30])
+
+// Using JavaScript Date objects.
+picker.set('max', new Date(2013, 3, 20, 10, 30))
+
+// Using formatted strings.
+picker.set('max', '11:30 AM'))
+
+// Using integers as intervals relative from now.
+picker.set('max', 4)
+
+// Using `true` for “now”.
+picker.set('max', true)
+
+// Using `false` to remove.
+picker.set('max', false)
+ +
+ +
+ +
+ + +
+ +
+ +

Set disable and enable§

+

Setting disable or enable has cascading changes on the select, highlight, and view only when the currently selected item object becomes disabled.

+ +
+

An important thing to note here is that “setting” something as enabled or disabled adds the new elements to the collection of items to disable rather than completely replacing them with the new collection.

+
+ +

Disable/enable dates §

+

You can disable sets of dates and then enable the entire set or specific dates within those sets by the following methods:

+ +
    +
  • +

    Specific dates:

    +
    picker.set('disable', [
    +
    +    // Using a collection of arrays formatted as [YEAR,MONTH,DATE]
    +    [2014,9,3], [2014,9,9], [2014,9,20],
    +
    +    // Using JavaScript Date objects
    +    new Date(2013,9,13), new Date(2013,9,24)
    +])
    +picker.set('enable', [
    +    [2014,9,9],
    +    [2014,9,13],
    +    new Date(2013,9,20)
    +])
    +
    +
  • +
  • +

    Ranges of dates:

    +
    picker.set('disable', [
    +
    +    // Using integers as the days of the week (1 to 7)
    +    1, 4, 7,
    +
    +    // Using a range object with a “from” and “to” property
    +    { from: [2014,2,14], to: [2014,2,27] }
    +])
    +picker.set('enable', [
    +    4,
    +    { from: [2014,2,24], to: [2014,2,27] }
    +])
    +
    +
  • +
  • +

    “Flip” the enabled and disabled dates:

    +
    picker.set('disable', 'flip')
    +picker.set('enable', 'flip')
    +
    +
  • +
  • +

    All the dates:

    +
    // Disable all the dates
    +picker.set('disable', true)
    +picker.set('enable', false)
    +
    +// Enable all the dates
    +picker.set('enable', true)
    +picker.set('disable', false)
    +
    +
  • +
+ +

Disable/enable times §

+

You can disable sets of times and then enable the entire set or specific times within those sets by the following methods:

+
    +
  • +

    Specific times:

    +
    picker.set('disable', [
    +
    +    // Using a collection of arrays formatted as [HOUR,MINUTES]
    +    [2,30], [4,30], [9,0],
    +
    +    // Using JavaScript Date objects
    +    new Date(2013,9,13,6), new Date(2013,9,13,12,30)
    +])
    +picker.set('enable', [
    +    [4,30], [6,0],
    +    new Date(2013,9,13,9)
    +])
    +
    +
  • +
  • +

    Ranges of times:

    +
    picker.set('disable', [
    +
    +    // Using integers as hours of the day (from 0 to 23)
    +    1, 4, 7,
    +
    +    // Using a range object with a “from” and “to” property
    +    { from: [10,30], to: [18,0] }
    +})
    +picker.set('enable', [
    +    4,
    +    { from: [14,0], to: [16,30] }
    +])
    +
    +
  • +
  • +

    “Flip” the enabled and disabled times:

    +
    picker.set('disable', 'flip')
    +picker.set('enable', 'flip')
    +
    +
  • +
  • +

    All the times:

    +
    // Disable all the times
    +picker.set('disable', true)
    +picker.set('enable', true)
    +
    +// Enable all the dates
    +picker.set('enable', true)
    +picker.set('disable', false)
    +
    +
  • +
+ +

Enable an element within a disabled range §

+ +

When a date or time you want to enable falls within a disabled range, add the inverted property to the item:

+ +
picker.set('disable', [
+
+    // Disable all Mondays, except November 17th, 2013.
+    1, [2013, 10, 17, 'inverted'],
+
+    // Disable all dates from March 2nd, 2014 to March 28th, 2014
+    // except for March 10th and all between March 14th and March 23rd.
+    { from: [2014, 2, 2], to: [2014, 2, 28] },
+    [2014, 2, 10, 'inverted'],
+    { from: [2014, 2, 14], to: [2014, 2, 23], inverted: true }
+])
+ +
+ +
picker.set('disable', [
+
+    // Disable all times from 1:00 AM to 1:59 AM, except 1:30 AM.
+    1, [1, 30, 'inverted'],
+
+    // Disable all times from 3:00 AM to 6:00 PM except
+    // for 4:30 AM and all between 7:30 AM and 11:30 AM.
+    { from: [3,0], to: [18,0] },
+    [4, 30, 'inverted'],
+    { from: [7,30], to: [11,30], inverted: true }
+])
+ +
+ +
+ +
+ + +
+ +
+ +

Set interval§

+

For the time picker only, you can change the interval between each time display.

+

Setting interval has cascading changes on the select, highlight, and view only when the particular item object goes out of range.

+ +
// Using integers representing the interval length in minutes
+picker.set('interval', 15)
+picker.set('interval', 20)
+picker.set('interval', 120)
+ +
+ +
+ +
+ + +
+ +
+ +

The Events and Callbacks§

+ +
+ +
+ + +
+ +
+ +

Event on§

+

Bind callbacks to get fired off when the relative picker method is called (unless if the callback is “muted”):

+ +
// One at a time
+picker.on(methodName, function() { … })
+
+// Multiple at once
+picker.on({
+    methodName: function() { … },
+    methodName: function() { … },
+    methodName: function() { … }
+})
+ +

The methodName can be open, close, render, start, stop, or set.

+

Within scope of these callbacks, this refers to the picker object – and for most events, no arguments are passed.

+

The only exception is the set method, which is passed an argument that provides more context as to what is being “set”.

+ +
+ + +
+ +

Event callbacks as bindings§

+

After the picker has been initiated, callbacks to events can be set using the on method:

+ +
picker.on({
+    open: function() {
+        console.log('Opened up!')
+    },
+    close: function() {
+        console.log('Closed now')
+    },
+    render: function() {
+        console.log('Just rendered anew')
+    },
+    stop: function() {
+        console.log('See ya')
+    },
+    set: function(thingSet) {
+        console.log('Set stuff:', thingSet)
+    }
+})
+ +
+ +
+

Since these callbacks can only be bound after the picker has started, the 'start' event cannot be given a callback this way. To do that, it must be passed as an option.

+
+ +
+ + +
+ +

Event callbacks as options§

+

Before the picker has initiated, callbacks to events can be set by passing them as options when invoking the picker:

+ +
$('.datepicker').pickadate({
+    onOpen: function() {
+        console.log('Opened up!')
+    },
+    onClose: function() {
+        console.log('Closed now')
+    },
+    onRender: function() {
+        console.log('Just rendered anew')
+    },
+    onStart: function() {
+        console.log('Hello there :)')
+    },
+    onStop: function() {
+        console.log('See ya')
+    },
+    onSet: function(thingSet) {
+        console.log('Set stuff:', thingSet)
+    }
+})
+ +
+ +
+ +
+ + +
+ +
+ +

Event off§

+

Unbind callbacks that are bound using the on method:

+ +
picker.off(methodName, methodName, methodName, ...)
+ +

The methodName can be open, close, render, start, stop, or set.

+ +
picker.on('open', function() {
+    console.log('Even when I’m opened, I’m not logged..')
+})
+picker.off('open')
+ +
+ +
+ +
+ + +
+ +
+ +

Event trigger§

+

Trigger an event’s callbacks that have been queued up:

+ +
picker.on('open', function() {
+    console.log('This logs without opening!')
+})
+picker.trigger('open')
+ +
+ +
+

Note: this doesn’t actually invoke the method; it only triggers the callback. Similar to jQuery’s triggerHandler method.

+
+ +

Optionally, you can also pass some data to the method being triggered:

+ +
picker.on('open', function(data) {
+    console.log('This logs without opening with this data:', data)
+})
+picker.trigger('open', { some: 'value' })
+ +
+ +
+ +
+ + +
+ +
+ +

The Objects§

+ +
+ +
+ + +
+ +
+ +

Object $node§

+

This is the picker’s relative input element wrapped as a jQuery object.

+ +
picker.$node
+ +
+ +
+ +
+ + +
+ +
+ +

Object $root§

+

This is the picker’s relative root holder element wrapped as a jQuery object.

+ +
picker.$root
+ +
+ +
+ +
+ + +
+ +
+ +

Object _hidden§

+

This is the picker’s relative hidden element, which is undefined if there’s no formatSubmit option.

+

There should be no reason to use this – it’s mostly for internal use. If you have a valid reason for using this, please mention it in the Issues.

+ +
+ +
+ + +
+ +
+ +

Object component§

+

This is the picker’s relative component constructor that builds the date or time picker. This API is in flux – so avoid using it for now.

+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/bower.json b/js/pickadate.js-3.5.3/bower.json new file mode 100644 index 0000000..bff14b3 --- /dev/null +++ b/js/pickadate.js-3.5.3/bower.json @@ -0,0 +1,59 @@ +{ + "name": "pickadate", + "version": "3.5.3", + "title": "pickadate.js", + "description": "The mobile-friendly, responsive, and lightweight jQuery date & time input picker.", + "author": { + "name": "Amsul", + "email": "reach@amsul.ca", + "url": "http://amsul.ca" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://amsul.ca/MIT" + } + ], + "keywords": [ + "date", + "time", + "picker", + "input", + "responsive" + ], + "ignore": [ + "*.md", + "*.htm", + "_docs", + "demo", + "tests", + "v2-(deprecated)" + ], + "main": "lib/picker.js", + "homepage": "http://amsul.github.io/pickadate.js", + "docs": "http://amsul.github.io/pickadate.js", + "demo": "http://amsul.github.io/pickadate.js", + "bugs": "https://github.com/amsul/pickadate.js/issues", + "repository": { + "type": "git", + "url": "https://github.com/amsul/pickadate.js.git" + }, + "dependencies": { + "jquery": ">=1.7" + }, + "devDependencies": { + "grunt": "^0.4.5", + "phantomjs": "^1.9.7-5", + "zlib-browserify": "0.0.3", + "grunt-contrib-watch": "^0.6.1", + "grunt-contrib-jshint": "^0.10.0", + "grunt-contrib-qunit": "^0.4.0", + "grunt-contrib-copy": "^0.5.0", + "grunt-contrib-less": "^0.11.0", + "grunt-contrib-cssmin": "^0.9.0", + "grunt-contrib-uglify": "^0.4.0" + }, + "scripts": { + "test": "grunt travis --verbose" + } +} diff --git a/js/pickadate.js-3.5.3/date.htm b/js/pickadate.js-3.5.3/date.htm new file mode 100644 index 0000000..f921785 --- /dev/null +++ b/js/pickadate.js-3.5.3/date.htm @@ -0,0 +1,750 @@ + + + + + + + + + + + +pickadate.js / date + + + + + + + + + + + + + +
+ +
+ +
+ + + +
+ + + + + + + +
+ + +
+ +

The Date Picker§

+ +

The basic setup requires targetting an input element and invoking the picker:

+ +
$('.datepicker').pickadate()
+
+ +
+

Along with v3, the v2 options and API have effectively been deprecated. Read up on the full changelog here.

+

One of the most critical changes is that the “month” used to create dates, just as in JavaScript’s native Date object, now has zero-as-index.

+
+ +
+ + +
+ +

Options§

+

With the basic invocation above, these are the default settings:

+ +
// Strings and translations
+monthsFull: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
+monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+weekdaysFull: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+showMonthsShort: undefined,
+showWeekdaysFull: undefined,
+
+// Buttons
+today: 'Today',
+clear: 'Clear',
+
+// Accessibility labels
+labelMonthNext: 'Next month',
+labelMonthPrev: 'Previous month',
+labelMonthSelect: 'Select a month',
+labelYearSelect: 'Select a year',
+
+// Formats
+format: 'd mmmm, yyyy',
+formatSubmit: undefined,
+hiddenPrefix: undefined,
+hiddenSuffix: '_submit',
+hiddenName: undefined,
+
+// Editable input
+editable: undefined,
+
+// Dropdown selectors
+selectYears: undefined,
+selectMonths: undefined,
+
+// First day of the week
+firstDay: undefined,
+
+// Date limits
+min: undefined,
+max: undefined,
+
+// Disable dates
+disable: undefined,
+
+// Root container
+container: undefined,
+
+// Events
+onStart: undefined,
+onRender: undefined,
+onOpen: undefined,
+onClose: undefined,
+onSet: undefined,
+onStop: undefined,
+
+// Classes
+klass: {
+
+    // The element states
+    input: 'picker__input',
+    active: 'picker__input--active',
+
+    // The root picker and states *
+    picker: 'picker',
+    opened: 'picker--opened',
+    focused: 'picker--focused',
+
+    // The picker holder
+    holder: 'picker__holder',
+
+    // The picker frame, wrapper, and box
+    frame: 'picker__frame',
+    wrap: 'picker__wrap',
+    box: 'picker__box',
+
+    // The picker header
+    header: 'picker__header',
+
+    // Month navigation
+    navPrev: 'picker__nav--prev',
+    navNext: 'picker__nav--next',
+    navDisabled: 'picker__nav--disabled',
+
+    // Month & year labels
+    month: 'picker__month',
+    year: 'picker__year',
+
+    // Month & year dropdowns
+    selectMonth: 'picker__select--month',
+    selectYear: 'picker__select--year',
+
+    // Table of dates
+    table: 'picker__table',
+
+    // Weekday labels
+    weekdays: 'picker__weekday',
+
+    // Day states
+    day: 'picker__day',
+    disabled: 'picker__day--disabled',
+    selected: 'picker__day--selected',
+    highlighted: 'picker__day--highlighted',
+    now: 'picker__day--today',
+    infocus: 'picker__day--infocus',
+    outfocus: 'picker__day--outfocus',
+
+    // The picker footer
+    footer: 'picker__footer',
+
+    // Today & clear buttons
+    buttonClear: 'picker__button--clear',
+    buttonToday: 'picker__button--today'
+}
+ +
+

* It is important to not add any stylings to the picker’s root element. Instead, target the .picker__holder element (or any other within) based on the state of the root element.

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

Strings§

+

Change the month and weekday labels as you find suitable:

+ +
$('.datepicker').pickadate({
+    weekdaysShort: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
+    showMonthsShort: true
+})
+ +
+ +
+ +
+ + +
+ +
+ +

Buttons§

+

Change the text or hide a button completely by passing a false-y value:

+ +
$('.datepicker').pickadate({
+    today: '',
+    clear: 'Clear selection'
+})
+ +
+ +
+ +
+ + +
+ +
+ +

Accessibility labels§

+

Change the title attributes to several elements within the picker:

+ +
$('.datepicker').pickadate({
+    labelMonthNext: 'Go to the next month',
+    labelMonthPrev: 'Go to the previous month',
+    labelMonthSelect: 'Pick a month from the dropdown',
+    labelYearSelect: 'Pick a year from the dropdown',
+    selectMonths: true,
+    selectYears: true
+})
+ +
+ +
+ +
+ + +
+ +
+ +

Translations§

+

The picker can be extended to add support for internationalization. Translations for 39 languages are available out of the box, which you can include in one of two ways:

+ +
// Extend the default picker options for all instances.
+$.extend($.fn.pickadate.defaults, {
+    monthsFull: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
+    weekdaysShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'],
+    today: 'aujourd\'hui',
+    clear: 'effacer',
+    formatSubmit: 'yyyy/mm/dd'
+})
+
+// Or, pass the months and weekdays as an array for each invocation.
+$('.datepicker').pickadate({
+    monthsFull: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'],
+    weekdaysShort: ['Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam'],
+    today: 'aujourd\'hui',
+    clear: 'effacer',
+    formatSubmit: 'yyyy/mm/dd'
+})
+
+ +
+

When using translations, specify the formatSubmit and data-value to ensure the date parses correctly regardless of locale.

+
+ +

RTL languages§

+

For languages that flow from right-to-left (RTL), you’ll need to switch the arrows and text direction by linking along the rtl.css file:

+ +
<!-- Add the stylings *after* the pickadate theme files -->
+<link rel="stylesheet" href="lib/themes/rtl.css">
+
+<!-- Add the language *after* the pickadate script files -->
+<script src="lib/translations/ar.js"></script>
+
+ +
+ +
+ + +
+ +
+ +

Formats§

+

Display a human-friendly format and use an alternate one to submit to the server.

+

This is done by creating a new hidden input element with the same name attribute as the original with an optional prefix/suffix:

+ +
$('.datepicker').pickadate({
+    // Escape any “rule” characters with an exclamation mark (!).
+    format: 'You selecte!d: dddd, dd mmm, yyyy',
+    formatSubmit: 'yyyy/mm/dd',
+    hiddenPrefix: 'prefix__',
+    hiddenSuffix: '__suffix'
+})
+ +
+ +

Send the hidden value only§

+

A majority of the time, the value that needs to be sent to the server is just the hidden value – and not the visible one. To make this happen, use the hiddenName option.

+

This essentially nullifies the hiddenPrefix and hiddenSuffix, strips the name attribute from the source input, and then sets it as the name of the hidden input:

+ +
$('.datepicker').pickadate({
+    formatSubmit: 'yyyy/mm/dd',
+    hiddenName: true
+})
+ +
+ +

Pre-fill values using custom formats or translations§

+

When using a custom formatting rule for the format option or when using translations, the input element should be given a data-value attribute formatted using the formatSubmit – the element’s value can be left blank. This helps to parse the date from custom formats into various languages:

+
<input data-value="2013/04/20">
+
+ +

Formatting Rules§

+

To use a formatting rule, make sure to keep a delimiter between each rule. This ensures each rule’s value can be parsed correctly. Example:
Bad: yyyymmdd; Good: yyyy-mm-dd.

+

The following rules can be used to format any date:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RuleDescriptionResult
dDate of the month1 – 31
ddDate of the month with a leading zero01 – 31
dddDay of the week in short formSun – Sat
ddddDay of the week in full formSunday – Saturday
mMonth of the year1 – 12
mmMonth of the year with a leading zero01 – 12
mmmMonth name in short formJan – Dec
mmmmMonth name in full formJanuary – December
yyYear in short form *00 – 99
yyyyYear in full form2000 – 2999
+ +
+

* If you use the yy rule in the format option, you must specify the yyyy rule in the formatSubmit option with the appropriate data-value attribute to ensure the date parses accurately.

+

Never use the yy rule in the formatSubmit option.

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

Editable input§

+

By default, typing into the input is disabled by giving it a readOnly attribute. Doing so ensures that virtual keyboards don’t pop open on touch devices. It is also a confirmation that values passed to the server will be of a consistent format.

+

However, this behavior can be changed using the editable option:

+ +
$('.datepicker').pickadate({
+    editable: true
+})
+ +
+ +
+

An important thing to note here is that this disables keyboard bindings on the input element, such as arrow keys opening the picker. You will have to add your own bindings as you see fit.

+
+ +

Using HTML5 attributes§

+

Because each input is readOnly by default, HTML5 attributes, such as required and pattern, do not get enforced.

+

To enable default browser behavior on these attributes, set the editable property to true.

+ +
+ +
+ + +
+ +
+ +

Dropdown Selectors§

+

Display select menus to pick the month and year. Anything truth-y enables the selectors and anything false-y switches them into text:

+ +
$('.datepicker').pickadate({
+    selectYears: true,
+    selectMonths: true
+})
+ +
+ +
+

When selectYears is truthy, the year selector appears before the month. Read here for more details on why.

+
+ +

You can also specify the number of years to show in the dropdown using an even integer - half before and half after the year in focus:

+ +
$('.datepicker').pickadate({
+    // `true` defaults to 10.
+    selectYears: 4
+})
+ +
+ +
+ +
+ + +
+ +
+ +

First Weekday§

+

The first day of the week can be set to either Sunday or Monday. Anything truth-y sets it as Monday and anything false-y as Sunday:

+ +
$('.datepicker').pickadate({
+    firstDay: 1
+})
+ +
+ +
+ +
+ + +
+ +
+ +

Date Limits§

+

Set the minimum and maximum selectable dates on the picker.

+ +

Using JavaScript dates§

+ +
$('.datepicker').pickadate({
+    min: new Date(2013,3,20),
+    max: new Date(2013,7,14)
+})
+ +
+ +

Using arrays formatted as [YEAR,MONTH,DATE]§

+ +
$('.datepicker').pickadate({
+    min: [2013,3,20],
+    max: [2013,7,14]
+})
+ +
+ +

Using integers or a boolean§

+ +
$('.datepicker').pickadate({
+    // An integer (positive/negative) sets it relative to today.
+    min: -15,
+    // `true` sets it to today. `false` removes any limits.
+    max: true
+})
+ +
+ +
+ +
+ + +
+ +
+ +

Disable Dates§

+

Disable a specific or arbitrary set of dates selectable on the picker.

+ +

Using JavaScript dates§

+ +
$('.datepicker').pickadate({
+    disable: [
+        new Date(2013,3,13),
+        new Date(2013,3,29)
+    ]
+})
+ +
+ +

Using arrays formatted as [YEAR,MONTH,DATE]§

+ +
$('.datepicker').pickadate({
+    disable: [
+        [2013,3,3],
+        [2013,3,12],
+        [2013,3,20]
+    ]
+})
+ +
+ +

Using integers as days of the week (1 to 7)§

+ +
$('.datepicker').pickadate({
+    disable: [
+        1, 4, 7
+    ]
+})
+ +
+ +

Using objects as a range of dates§

+ +
$('.datepicker').pickadate({
+    disable: [
+        { from: [2014,2,14], to: [2014,2,27] }
+    ]
+})
+ +
+ +

The values for from & to can be:

+
    +
  • A JavaScript Date object,
  • +
  • An array formatted as [YEAR,MONTH,DATE],
  • +
  • And true to set it as “today”.
  • +
+

The values can also be integers representing dates relative to the other:

+
    +
  • to can only be positive:
    { from: [2014,3,12], to: 10 }
  • +
  • from can only be negative:
    { from: -10, to: true }
  • +
+ +

Disabling all with a set of exceptions§

+

Enable only a specific or arbitrary set of dates by setting true as the first item in the collection:

+ +
$('.datepicker').pickadate({
+    disable: [
+        true,
+        1, 4, 7,
+        [2013,3,3],
+        [2013,3,12],
+        [2013,3,20],
+        new Date(2013,3,13),
+        new Date(2013,3,29)
+    ]
+})
+ +
+ +

Disabling ranges with exceptions§

+

Enable dates that fall within a range of disabled dates by adding the inverted parameter to the item within the collection:

+ +
$('.datepicker').pickadate({
+    disable: [
+        5,
+        [2013, 10, 21, 'inverted'],
+        { from: [2014, 3, 15], to: [2014, 3, 25] },
+        [2014, 3, 20, 'inverted'],
+        { from: [2014, 3, 17], to: [2014, 3, 18], inverted: true }
+    ]
+})
+ +
+ + +
+ +
+ + + +
+ +
+ +

container§

+

By default, the picker’s root element is inserted right after the input element. Specify where to insert the root element by passing any valid CSS selector to this option:

+ +
+ +
$('.datepicker').pickadate({
+    container: '#root-outlet'
+})
+ +
+ +
+

This is especially important when the input falls within a label element because click events bubble up to the label element and re-open the picker.

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

events§

+

Fire off events as the user interacts with the picker:

+ +
$('.datepicker').pickadate({
+    onStart: function() {
+        console.log('Hello there :)')
+    },
+    onRender: function() {
+        console.log('Whoa.. rendered anew')
+    },
+    onOpen: function() {
+        console.log('Opened up')
+    },
+    onClose: function() {
+        console.log('Closed now')
+    },
+    onStop: function() {
+        console.log('See ya.')
+    },
+    onSet: function(context) {
+        console.log('Just set stuff:', context)
+    }
+})
+ +
+ +

The onSet event is the only callback that is passed a context argument that provides details as to which properties are being “set”.

+

Within scope of all six of these events, this refers to the picker.

+

To learn more on how to use the picker object, read the API documentation.

+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/demo/fonts/icomoon.dev.svg b/js/pickadate.js-3.5.3/demo/fonts/icomoon.dev.svg new file mode 100644 index 0000000..9542d1f --- /dev/null +++ b/js/pickadate.js-3.5.3/demo/fonts/icomoon.dev.svg @@ -0,0 +1,16 @@ + + + + +This is a custom SVG font generated by IcoMoon. + + + + + + + + + + + \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/demo/fonts/p.fw.png b/js/pickadate.js-3.5.3/demo/fonts/p.fw.png new file mode 100644 index 0000000..2220bc8 Binary files /dev/null and b/js/pickadate.js-3.5.3/demo/fonts/p.fw.png differ diff --git a/js/pickadate.js-3.5.3/demo/fonts/p.svg b/js/pickadate.js-3.5.3/demo/fonts/p.svg new file mode 100644 index 0000000..8d1c7bf --- /dev/null +++ b/js/pickadate.js-3.5.3/demo/fonts/p.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/demo/fonts/peace.fw.png b/js/pickadate.js-3.5.3/demo/fonts/peace.fw.png new file mode 100644 index 0000000..caaac3d Binary files /dev/null and b/js/pickadate.js-3.5.3/demo/fonts/peace.fw.png differ diff --git a/js/pickadate.js-3.5.3/demo/fonts/peace.svg b/js/pickadate.js-3.5.3/demo/fonts/peace.svg new file mode 100644 index 0000000..6e74f48 --- /dev/null +++ b/js/pickadate.js-3.5.3/demo/fonts/peace.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/demo/images/bg.png b/js/pickadate.js-3.5.3/demo/images/bg.png new file mode 100644 index 0000000..ca2f1bb Binary files /dev/null and b/js/pickadate.js-3.5.3/demo/images/bg.png differ diff --git a/js/pickadate.js-3.5.3/demo/images/bg.psd b/js/pickadate.js-3.5.3/demo/images/bg.psd new file mode 100644 index 0000000..8eff6d8 Binary files /dev/null and b/js/pickadate.js-3.5.3/demo/images/bg.psd differ diff --git a/js/pickadate.js-3.5.3/demo/images/favicon.ico b/js/pickadate.js-3.5.3/demo/images/favicon.ico new file mode 100644 index 0000000..349bb57 Binary files /dev/null and b/js/pickadate.js-3.5.3/demo/images/favicon.ico differ diff --git a/js/pickadate.js-3.5.3/demo/images/favicon.psd b/js/pickadate.js-3.5.3/demo/images/favicon.psd new file mode 100644 index 0000000..98a67a7 Binary files /dev/null and b/js/pickadate.js-3.5.3/demo/images/favicon.psd differ diff --git a/js/pickadate.js-3.5.3/demo/images/favicon.xcf b/js/pickadate.js-3.5.3/demo/images/favicon.xcf new file mode 100644 index 0000000..345a3ba Binary files /dev/null and b/js/pickadate.js-3.5.3/demo/images/favicon.xcf differ diff --git a/js/pickadate.js-3.5.3/demo/images/logo.png b/js/pickadate.js-3.5.3/demo/images/logo.png new file mode 100644 index 0000000..c0c9732 Binary files /dev/null and b/js/pickadate.js-3.5.3/demo/images/logo.png differ diff --git a/js/pickadate.js-3.5.3/demo/images/logo.psd b/js/pickadate.js-3.5.3/demo/images/logo.psd new file mode 100644 index 0000000..b12b58b Binary files /dev/null and b/js/pickadate.js-3.5.3/demo/images/logo.psd differ diff --git a/js/pickadate.js-3.5.3/demo/scripts/demo.js b/js/pickadate.js-3.5.3/demo/scripts/demo.js new file mode 100644 index 0000000..ecba137 --- /dev/null +++ b/js/pickadate.js-3.5.3/demo/scripts/demo.js @@ -0,0 +1,1385 @@ + +/*jshint + debug: true, + devel: true, + browser: true, + asi: true, + unused: false + */ + + + + +/* ========================================================================== + Globals + ========================================================================== */ + +var TODAY = new Date(2013,3,20,10,30) + + + + +/* ========================================================================== + Date picker demos + ========================================================================== */ + + +/** + * Weekday labels + */ +$( '#date_demo__weekdaysShort' ).pickadate({ + weekdaysShort: [ 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa' ], + showMonthsShort: true +}) + + + +/** + * Translations + */ +$( '#date_demo__translations' ).pickadate({ + monthsFull: [ 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre' ], + monthsShort: [ 'Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec' ], + weekdaysShort: [ 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' ], + today: 'Aujourd\'hui', + clear: 'Effacer', + formatSubmit: 'yyyy/mm/dd' +}) +$( '#date_demo__translations_rtl' ).pickadate({ + monthsFull: [ 'يناير', 'فبراير', 'مارس', 'ابريل', 'مايو', 'يونيو', 'يوليو', 'اغسطس', 'سبتمبر', 'اكتوبر', 'نوفمبر', 'ديسمبر' ], + monthsShort: [ 'يناير', 'فبراير', 'مارس', 'ابريل', 'مايو', 'يونيو', 'يوليو', 'اغسطس', 'سبتمبر', 'اكتوبر', 'نوفمبر', 'ديسمبر' ], + weekdaysFull: [ 'الاحد', 'الاثنين', 'الثلاثاء', 'الاربعاء', 'الخميس', 'الجمعة', 'السبت' ], + weekdaysShort: [ 'الاحد', 'الاثنين', 'الثلاثاء', 'الاربعاء', 'الخميس', 'الجمعة', 'السبت' ], + today: 'اليوم', + clear: 'مسح', + format: 'yyyy mmmm dd', + formatSubmit: 'yyyy/mm/dd' +}) + + + +/** + * Buttons + */ +$( '#date_demo__buttons' ).pickadate({ + // Any false-y value will hide the button. + today: '', + clear: 'Clear selection' +}) + + + +/** + * Buttons + */ +$( '#date_demo__accessibility-labels' ).pickadate({ + labelMonthNext: 'Go to the next month', + labelMonthPrev: 'Go to the previous month', + labelMonthSelect: 'Pick a month from the dropdown', + labelYearSelect: 'Pick a year from the dropdown', + selectMonths: true, + selectYears: true +}) + + + +/** + * Formats + */ +$( '#date_demo__formats--a' ).pickadate({ + format: 'You selecte!d: dddd, dd mmm, yyyy', + formatSubmit: 'yyyy/mm/dd', + hiddenPrefix: 'prefix__', + hiddenSuffix: '__suffix', + onSet: function( event ) { + if ( event.select ) { + this.$node. + closest( '.js__fieldset' ). + after( '
' + + '

Values to submit: ' + + '' + this.get() + '' + + ' and ' + + '' + this.get( 'select', 'yyyy/mm/dd' ) + '' + + '

' + + '

Using the names: ' + + '' + this.$node[0].name + '' + + ' and ' + + '' + this._hidden.name + '' + + '

' + ) + } + } +}) +$( '#date_demo__formats--b' ).pickadate({ + formatSubmit: 'yyyy/mm/dd', + hiddenName: true, + onSet: function( event ) { + if ( event.select ) { + this.$node. + closest( '.js__fieldset' ). + after( '
' + + '

Value to submit: ' + + this.get( 'select', 'yyyy/mm/dd' ) + + '

' + + '

Using the name: ' + + this._hidden.name + + '

' + ) + } + } +}) + +$( '#date_demo__formats--c' ).pickadate({ + monthsFull: [ 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre' ], + monthsShort: [ 'Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec' ], + weekdaysShort: [ 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' ], + today: 'aujourd\'hui', + clear: 'effacer', + formatSubmit: 'yyyy/mm/dd' +}) + + + +/** + * Dropdown selectors + */ +$( '#date_demo__selectors--a' ).pickadate({ + selectYears: true, + selectMonths: true +}) +$( '#date_demo__selectors--b' ).pickadate({ + selectYears: 4 +}) + + + +/** + * Editable input + */ +$( '#date_demo__editable' ).pickadate({ + editable: true +}) + + + +/** + * First weekday + */ +$( '#date_demo__firstDay' ).pickadate({ + firstDay: 1 +}) + + + +/** + * Limits + */ + +// Limits as specific dates using JavaScript date objects. +$( '#date_demo__limits--a' ).pickadate({ + min: new Date(2013,3,20), + max: new Date(2013,7,14) +}) + +// Limits as specific dates using arrays. +$( '#date_demo__limits--b' ).pickadate({ + min: [2013,3,20], + max: [2013,7,14] +}) + +// Limits as dates relative to today. +$( '#date_demo__limits--c' ).pickadate({ + min: -15, + max: true +}) + + + +/** + * Disable dates + */ + +// Disable a specific set of dates using native +// JavaScript Date objects. +$( '#date_demo__disable-dates--a' ).pickadate({ + disable: [ + new Date(2013,3,13), + new Date(2013,3,29) + ] +}) + +// Disable a specific set of dates using arrays +// formatted as [ YEAR, MONTH, DATE ]. +$( '#date_demo__disable-dates--b' ).pickadate({ + disable: [ + [2013,3,3], + [2013,3,12], + [2013,3,20] + ] +}) + +// Disable an arbitrary set of dates using integers +// from 1 - 7 representing the day of week. +$( '#date_demo__disable-dates--c' ).pickadate({ + disable: [ + 1, 4, 7 + ] +}) + +// Disable a set of dates using object literals +// with a “from” and “to” date. +$( '#date_demo__disable-dates--d' ).pickadate({ + disable: [ + { from: [2014,2,14], to: [2014,2,27] } + ] +}) + +// Set the first array item to `true` to disable all the dates. +// Then selectively enable specific or arbitrary sets of dates. +$( '#date_demo__disable-dates--e' ).pickadate({ + disable: [ + true, + 1, 4, 7, + [2013,3,3], + [2013,3,12], + [2013,3,20], + new Date(2013,3,13), + new Date(2013,3,29) + ] +}) + +// Pass “inverted” as the last paramter to flip within a range. +$( '#date_demo__disable-dates--f' ).pickadate({ + disable: [ + 5, + [2013, 10, 21,'inverted'], + { from: [2014, 3, 15], to: [2014, 3, 25] }, + [2014, 3, 20, 'inverted'], + { from: [2014, 3, 17], to: [2014, 3, 18], inverted: true } + ] +}) + + + +/** + * Outlet container + */ +$( '#date_demo__container' ).pickadate({ + container: '#root-outlet' +}) + + + +/** + * Date picker events + */ +$( '#date_demo__events' ).pickadate({ + onStart: function() { + console.log( 'Hello there :)' ) + }, + onRender: function() { + console.log( 'Whoa.. rendered anew' ) + }, + onOpen: function() { + console.log( 'Opened up' ) + }, + onClose: function() { + console.log( 'Closed now' ) + }, + onStop: function() { + console.log( 'See ya.' ) + }, + onSet: function( event ) { + console.log( 'Just set stuff:', event ) + } +}) + + + + + + + + + +/* ========================================================================== + Time picker demos + ========================================================================== */ + + +/** + * Translations + */ +$( '#time_demo__translations' ).pickatime({ + clear: 'effacer' +}) + + + +/** + * Buttons + */ +$( '#time_demo__buttons' ).pickatime({ + // Any false-y value will hide the button. + clear: '' +}) + + + +/** + * Formats + */ +$( '#time_demo__formats--a' ).pickatime({ + format: 'T!ime selected: h:i a', + formatLabel: 'h:i a', + formatSubmit: 'HH:i', + hiddenPrefix: 'prefix__', + hiddenSuffix: '__suffix', + onSet: function( event ) { + if ( event.select ) { + this.$node. + closest( '.js__fieldset' ). + after( '
' + + '

Values to submit: ' + + '' + this.get() + '' + + ' and ' + + '' + this.get( 'select', 'HH:i' ) + '' + + '

' + + '

Using the names: ' + + '' + this.$node[0].name + '' + + ' and ' + + '' + this._hidden.name + '' + + '

' + ) + } + } +}) +$( '#time_demo__formats--b' ).pickatime({ + formatLabel: function(time) { + var hours = ( time.pick - this.get('now').pick ) / 60, + label = hours < 0 ? ' !hours to now' : hours > 0 ? ' !hours from now' : 'now' + return 'h:i a ' + ( hours ? Math.abs( hours ) : '' ) + label + '' + } +}) +$( '#time_demo__formats--c' ).pickatime({ + formatSubmit: 'HH:i', + hiddenName: true, + onSet: function( event ) { + if ( event.select ) { + this.$node. + closest( '.js__fieldset' ). + after( '
' + + '

Value to submit: ' + + this.get( 'select', 'HH:i' ) + + '

' + + '

Using the name: ' + + this._hidden.name + + '

' + ) + } + } +}) + + + +/** + * Editable input + */ +$( '#time_demo__editable' ).pickatime({ + editable: true +}) + + + +/** + * Time intervals + */ +$( '#time_demo__interval' ).pickatime({ + interval: 150 +}) + + + +/** + * Limits + */ + +// Limits as specific times using JavaScript dates. +$( '#time_demo__limits--a' ).pickatime({ + min: new Date(2013,3,20,7), + max: new Date(2013,7,14,18,30) +}) + +// Limits as specific times using arrays. +$( '#time_demo__limits--b' ).pickatime({ + min: [7,30], + max: [14,0] +}) + +// Limits as times relative to now. +$( '#time_demo__limits--c' ).pickatime({ + min: -5, + max: true +}) + + + +/** + * Disable times + */ + +// Disable a specific set of times using native +// JavaScript Date objects. +$( '#time_demo__disable-times--a' ).pickatime({ + disable: [ + new Date(2014,3,20,4,30), + new Date(2014,3,20,9) + ] +}) + +// Disable a specific set of times using arrays +// formatted as [ HOUR, MINUTE ]. +$( '#time_demo__disable-times--b' ).pickatime({ + disable: [ + [0,30], + [2,0], + [8,30], + [9,0] + ] +}) + +// Disable an arbitrary set of times using integers +// from 0 - 23 representing the hours. +$( '#time_demo__disable-times--c' ).pickatime({ + disable: [ + 3, 5, 7 + ] +}) + +// Disable a set of times using object literals +// with a “from” and “to” time. +$( '#time_demo__disable-times--c' ).pickatime({ + disable: [ + { from: [2,0], to: [5,30] } + ] +}) + +// Set the first array item to `true` to disable all the times. +// Then selectively enable specific or arbitrary sets of times. +$( '#time_demo__disable-times--e' ).pickatime({ + disable: [ + true, + 3, 5, 7, + [0,30], + [2,0], + [8,30], + [9,0] + ] +}) + +// Pass “inverted” as the last paramter to flip within a range. +$( '#time_demo__disable-times--f' ).pickatime({ + disable: [ + 1, + [1, 30, 'inverted'], + { from: [4, 30], to: [10, 30] }, + [6, 30, 'inverted'], + { from: [8, 0], to: [9, 0], inverted: true } + ] +}) + + + +/** + * Outlet container + */ +$( '#time_demo__container' ).pickatime({ + container: '#root-outlet' +}) + + + +/** + * Time picker events + */ +$( '#time_demo__events' ).pickatime({ + onStart: function() { + console.log( 'Hello there :)' ) + }, + onRender: function() { + console.log( 'Whoa.. rendered anew' ) + }, + onOpen: function() { + console.log( 'Opened up' ) + }, + onClose: function() { + console.log( 'Closed now' ) + }, + onStop: function() { + console.log( 'See ya.' ) + }, + onSet: function( event ) { + console.log( 'Just set stuff:', event ) + } +}) + + + + + + + + + + + +/* ========================================================================== + API stuff + ========================================================================== */ + + + +/** + * API demo: open-close + */ +var $button_open_close = $( '#button__api-open-close' ), + $input_open_close = $( '#demo__api-open-close' ).pickadate({ + onOpen: function() { + $button_open_close.text( 'Close' ) + }, + onClose: function() { + $button_open_close.text( 'Open' ) + } + }), + picker_open_close = $input_open_close.pickadate( 'picker' ) +$button_open_close. + on( 'click', function( event ) { + if ( picker_open_close.get( 'open' ) ) { + picker_open_close.close() + } + else { + picker_open_close.open() + } + event.stopPropagation() + }). + on( 'mousedown', function(event) { + event.preventDefault() + }) + +var $input_close_focus = $( '#demo__api-close-focus' ).pickadate(), + picker_close_focus = $input_close_focus.pickadate( 'picker' ) +$( '#button__api-close-focus' ).on( 'click', function() { + picker_close_focus.close( true ) +}) + +var $input_open_focus = $( '#demo__api-open-focus' ).pickadate(), + picker_open_focus = $input_open_focus.pickadate( 'picker' ) +$( '#button__api-open-focus' ).on( 'click', function( event ) { + picker_open_focus.open( false ) + event.stopPropagation() + $(document).on( 'click.open_focus', function() { + picker_open_focus.close() + $(document).off( '.open_focus' ) + }) +}) + + + + + +/** + * API demo: start-stop + */ +var $button_start_stop = $( '#button__api-start-stop' ), + $input_start_stop = $( '#demo__api-start-stop' ).pickadate() + +$button_start_stop.on( 'click', function( event ) { + var text = $button_start_stop.text() + if ( text == 'Stop' ) { + $button_start_stop.text( 'Start' ) + $input_start_stop.pickadate( 'picker' ).stop() + } + else { + $button_start_stop.text( 'Stop' ) + $input_start_stop.pickadate() + } + event.stopPropagation() +}) + + + +/** + * API demo: render + */ +var addStuff = function( $element ) { + var today = new Date(), + todayString = today.getDate() + '/' + (today.getMonth()+1) + '/' + today.getFullYear() + $element.find( '.picker__box' ). + prepend('

Hello there! Today is ' + todayString + '

') + }, + $button_render = $( '#button__api-render' ), + $input_render = $( '#demo__api-render' ).pickadate(), + picker_render = $input_render.pickadate( 'picker' ) +$button_render.on( 'click', function( event ) { + if ( $button_render.text() == 'Render' ) { + picker_render.render() + $button_render.text( 'Add stuff' ) + } + else { + addStuff( picker_render.$root ) + $button_render.text( 'Render' ) + } + event.stopPropagation() +}) + + + +/** + * API demo: clear + */ +var $button_clear = $( '#button__api-clear' ), + $input_clear = $( '#demo__api-clear' ).pickadate(), + picker_clear = $input_clear.pickadate( 'picker' ) +$button_clear.on( 'click', function( event ) { + picker_clear.clear() + event.stopPropagation() +}) + + + +/** + * API demo: get + */ + +//value +var $button_get__value = $( '#button__api-get--value' ), + $input_get__value = $( '#demo__api-get--value' ).pickadate(), + picker_get__value = $input_get__value.pickadate( 'picker' ) +$button_get__value.on( 'click', function( event ) { + console.log( picker_get__value.get() ) + event.stopPropagation() +}) + +//select +var $input_get__select = $( '#demo__api-get--select' ).pickadate(), + picker_get__select = $input_get__select.pickadate( 'picker' ) +$( '#button__api-get--select' ).on( 'click', function( event ) { + console.log( picker_get__select.get( 'select' ) ) + event.stopPropagation() +}) +$( '#button__api-get--select-format' ).on( 'click', function( event ) { + console.log( picker_get__select.get( 'select', 'yyyy/mm/dd' ) ) + event.stopPropagation() +}) + +//highlight +var $input_get__highlight = $( '#demo__api-get--highlight' ).pickadate(), + picker_get__highlight = $input_get__highlight.pickadate( 'picker' ) +$( '#button__api-get--highlight' ).on( 'click', function( event ) { + console.log( picker_get__highlight.get( 'highlight' ) ) + event.stopPropagation() +}) +$( '#button__api-get--highlight-format' ).on( 'click', function( event ) { + console.log( picker_get__highlight.get( 'highlight', 'yyyy/mm/dd' ) ) + event.stopPropagation() +}) + +//view +var $input_get__view = $( '#demo__api-get--view' ).pickadate(), + picker_get__view = $input_get__view.pickadate( 'picker' ) +$( '#button__api-get--view' ).on( 'click', function( event ) { + console.log( picker_get__view.get( 'view' ) ) + event.stopPropagation() +}) +$( '#button__api-get--view-format' ).on( 'click', function( event ) { + console.log( picker_get__view.get( 'view', 'yyyy/mm/dd' ) ) + event.stopPropagation() +}) + +//min +var $input_get__min = $( '#demo__api-get--min' ).pickadate({ + min: [TODAY.getFullYear(),TODAY.getMonth(),TODAY.getDate()] + }), + picker_get__min = $input_get__min.pickadate( 'picker' ) +$( '#button__api-get--min' ).on( 'click', function( event ) { + console.log( picker_get__min.get( 'min' ) ) + event.stopPropagation() +}) +$( '#button__api-get--min-format' ).on( 'click', function( event ) { + console.log( picker_get__min.get( 'min', 'yyyy/mm/dd' ) ) + event.stopPropagation() +}) + +//max +var $input_get__max = $( '#demo__api-get--max' ).pickadate({ + max: [TODAY.getFullYear()+2,TODAY.getMonth(),TODAY.getDate()] + }), + picker_get__max = $input_get__max.pickadate( 'picker' ) +$( '#button__api-get--max' ).on( 'click', function( event ) { + console.log( picker_get__max.get( 'max' ) ) + event.stopPropagation() +}) +$( '#button__api-get--max-format' ).on( 'click', function( event ) { + console.log( picker_get__max.get( 'max', 'yyyy/mm/dd' ) ) + event.stopPropagation() +}) + +//open +var $input_get__open = $( '#demo__api-get--open' ).pickadate({ + onOpen: function() { + console.log( 'Open state:', picker_get__open.get( 'open' ) ) + } + }), + picker_get__open = $input_get__open.pickadate( 'picker' ) +$( '#button__api-get--open' ).on( 'click', function( event ) { + console.log( 'Open state:', picker_get__open.get( 'open' ) ) + event.stopPropagation() +}) + +//start +var $input_get__start = $( '#demo__api-get--start' ).pickadate(), + picker_get__start = $input_get__start.pickadate( 'picker' ) +$( '#button__api-get--start' ).on( 'click', function( event ) { + console.log( 'Start state:', picker_get__start.get( 'start' ) ) + event.stopPropagation() +}) +$( '#button__api-get--start-stop' ).on( 'click', function( event ) { + var $this = $( this ) + if ( $this.text() == 'Stop picker' ) { + picker_get__start.stop() + $this.text( 'Start picker' ) + } + else { + picker_get__start.start() + $this.text( 'Stop picker' ) + } + event.stopPropagation() +}) + +//id +var $input_get__id = $( '#demo__api-get--id' ).pickadate(), + picker_get__id = $input_get__id.pickadate( 'picker' ) +$( '#button__api-get--id' ).on( 'click', function( event ) { + console.log( picker_get__id.get( 'id' ) ) + event.stopPropagation() +}) + +//disable +var $input_get__disable = $( '#demo__api-get--disable' ).pickadate({ + disable: [ + 1,4,7, + [TODAY.getFullYear(),TODAY.getMonth(),8], + [TODAY.getFullYear(),TODAY.getMonth(),19], + new Date(TODAY.getFullYear(),TODAY.getMonth(),26) + ] + }), + picker_get__disable = $input_get__disable.pickadate( 'picker' ) +$( '#button__api-get--disable' ).on( 'click', function( event ) { + console.log( 'Base picker state:', picker_get__disable.get( 'enable' ) ) + console.log( 'Dates to disabled:', picker_get__disable.get( 'disable' ) ) + event.stopPropagation() +}) +var $input_get__enable = $( '#demo__api-get--enable' ).pickadate({ + disable: [ + true, + 1,4,7, + [TODAY.getFullYear(),TODAY.getMonth(),8], + [TODAY.getFullYear(),TODAY.getMonth(),19], + new Date(TODAY.getFullYear(),TODAY.getMonth(),26) + ] + }), + picker_get__enable = $input_get__enable.pickadate( 'picker' ) +$( '#button__api-get--enable' ).on( 'click', function( event ) { + console.log( 'Base picker state:', picker_get__enable.get( 'enable' ) ) + console.log( 'Dates *not* to disabled:', picker_get__enable.get( 'disable' ) ) + event.stopPropagation() +}) + + + +/** + * API demo: set + */ + +//select: clear +var $input_set_clear = $( '#demo__api-set-clear' ).pickadate(), + picker_set_clear = $input_set_clear.pickadate( 'picker' ) +$( '#button__api-set-clear' ).on( 'click', function( event ) { + picker_set_clear.clear() + event.stopPropagation() +}) + +//select: date +var $input_set__select_date = $( '#demo__api-set--select-date' ).pickadate(), + picker_set__select_date = $input_set__select_date.pickadate( 'picker' ) +$( '#button__api-set--select-date-array' ).on( 'click', function( event ) { + picker_set__select_date.set( 'select', [TODAY.getFullYear(),TODAY.getMonth(),TODAY.getDate()] ) + event.stopPropagation() +}) +$( '#button__api-set--select-date-js' ).on( 'click', function( event ) { + var dateToSet = new Date( TODAY.getFullYear(), TODAY.getMonth(), TODAY.getDate() + 10 ) + picker_set__select_date.set( 'select', dateToSet ) + event.stopPropagation() +}) +$( '#button__api-set--select-date-integer' ).on( 'click', function( event ) { + picker_set__select_date.set( 'select', TODAY.getTime() ) + event.stopPropagation() +}) +$( '#button__api-set--select-date-string' ).on( 'click', function( event ) { + picker_set__select_date.set( 'select', '2014-04-20', { format: 'yyyy-mm-dd' } ) + event.stopPropagation() +}) + +//select: time +var $input_set__select_time = $( '#demo__api-set--select-time' ).pickatime(), + picker_set__select_time = $input_set__select_time.pickatime( 'picker' ) +$( '#button__api-set--select-time-array' ).on( 'click', function( event ) { + picker_set__select_time.set( 'select', [3,0] ) + event.stopPropagation() +}) +$( '#button__api-set--select-time-js' ).on( 'click', function( event ) { + picker_set__select_time.set( 'select', TODAY ) + event.stopPropagation() +}) +$( '#button__api-set--select-time-integer' ).on( 'click', function( event ) { + picker_set__select_time.set( 'select', 540 ) + event.stopPropagation() +}) +$( '#button__api-set--select-time-string' ).on( 'click', function( event ) { + picker_set__select_time.set( 'select', '04-30', { format: 'hh-i' } ) + event.stopPropagation() +}) + +//highlight: date +var $input_set__highlight_date = $( '#demo__api-set--highlight-date' ).pickadate(), + picker_set__highlight_date = $input_set__highlight_date.pickadate( 'picker' ) +$( '#button__api-set--highlight-date-array' ).on( 'click', function( event ) { + picker_set__highlight_date.set( 'highlight', [TODAY.getFullYear(),TODAY.getMonth(),TODAY.getDate()] ) + event.stopPropagation() +}) +$( '#button__api-set--highlight-date-js' ).on( 'click', function( event ) { + var dateToSet = new Date( TODAY.getFullYear(), TODAY.getMonth(), TODAY.getDate() + 10 ) + picker_set__highlight_date.set( 'highlight', dateToSet ) + event.stopPropagation() +}) +$( '#button__api-set--highlight-date-integer' ).on( 'click', function( event ) { + picker_set__highlight_date.set( 'highlight', TODAY ) + event.stopPropagation() +}) +$( '#button__api-set--highlight-date-string' ).on( 'click', function( event ) { + picker_set__highlight_date.set( 'highlight', '2014-04-20', { format: 'yyyy-mm-dd' } ) + event.stopPropagation() +}) + +//highlight: time +var $input_set__highlight_time = $( '#demo__api-set--highlight-time' ).pickatime(), + picker_set__highlight_time = $input_set__highlight_time.pickatime( 'picker' ) +$( '#button__api-set--highlight-time-array' ).on( 'click', function( event ) { + picker_set__highlight_time.set( 'highlight', [15,30] ) + event.stopPropagation() +}) +$( '#button__api-set--highlight-time-js' ).on( 'click', function( event ) { + picker_set__highlight_time.set( 'highlight', TODAY ) + event.stopPropagation() +}) +$( '#button__api-set--highlight-time-integer' ).on( 'click', function( event ) { + picker_set__highlight_time.set( 'highlight', 1080 ) + event.stopPropagation() +}) +$( '#button__api-set--highlight-time-string' ).on( 'click', function( event ) { + picker_set__highlight_time.set( 'highlight', '04-30', { format: 'hh-i' } ) + event.stopPropagation() +}) + +//view: date +var $input_set__view_date = $( '#demo__api-set--view-date' ).pickadate(), + picker_set__view_date = $input_set__view_date.pickadate( 'picker' ) +$( '#button__api-set--view-date-array' ).on( 'click', function( event ) { + picker_set__view_date.set( 'view', [2000,3,20] ) + event.stopPropagation() +}) +$( '#button__api-set--view-date-js' ).on( 'click', function( event ) { + picker_set__view_date.set( 'view', new Date(1988,7,14) ) + event.stopPropagation() +}) +$( '#button__api-set--view-date-integer' ).on( 'click', function( event ) { + picker_set__view_date.set( 'view', 1587355200000 ) + event.stopPropagation() +}) +$( '#button__api-set--view-date-string' ).on( 'click', function( event ) { + picker_set__view_date.set( 'view', '2014-04-20', { format: 'yyyy-mm-dd' } ) + event.stopPropagation() +}) + +//view: time +var $input_set__view_time = $( '#demo__api-set--view-time' ).pickatime(), + picker_set__view_time = $input_set__view_time.pickatime( 'picker' ) +$( '#button__api-set--view-time-array' ).on( 'click', function( event ) { + picker_set__view_time.set( 'view', [15,30] ) + event.stopPropagation() +}) +$( '#button__api-set--view-time-js' ).on( 'click', function( event ) { + picker_set__view_time.set( 'view', TODAY ) + event.stopPropagation() +}) +$( '#button__api-set--view-time-integer' ).on( 'click', function( event ) { + picker_set__view_time.set( 'view', 1080 ) + event.stopPropagation() +}) +$( '#button__api-set--view-time-string' ).on( 'click', function( event ) { + picker_set__view_time.set( 'view', '04-30', { format: 'hh-i' } ) + event.stopPropagation() +}) + +//min: date +var $input_set__min_date = $( '#demo__api-set--min-date' ).pickadate(), + picker_set__min_date = $input_set__min_date.pickadate( 'picker' ) +$( '#button__api-set--min-date-array' ).on( 'click', function( event ) { + picker_set__min_date.set( 'min', [2013,3,20] ) + event.stopPropagation() +}) +$( '#button__api-set--min-date-js' ).on( 'click', function( event ) { + picker_set__min_date.set( 'min', new Date(2013,7,14) ) + event.stopPropagation() +}) +$( '#button__api-set--min-date-string' ).on( 'click', function( event ) { + picker_set__min_date.set( 'min', '8 January, 2014' ) + event.stopPropagation() +}) +$( '#button__api-set--min-date-integer' ).on( 'click', function( event ) { + picker_set__min_date.set( 'min', -4 ) + event.stopPropagation() +}) +$( '#button__api-set--min-date-true' ).on( 'click', function( event ) { + picker_set__min_date.set( 'min', true ) + event.stopPropagation() +}) +$( '#button__api-set--min-date-false' ).on( 'click', function( event ) { + picker_set__min_date.set( 'min', false ) + event.stopPropagation() +}) + +//min: time +var $input_set__min_time = $( '#demo__api-set--min-time' ).pickatime(), + picker_set__min_time = $input_set__min_time.pickatime( 'picker' ) +$( '#button__api-set--min-time-array' ).on( 'click', function( event ) { + picker_set__min_time.set( 'min', [15,30] ) + event.stopPropagation() +}) +$( '#button__api-set--min-time-js' ).on( 'click', function( event ) { + picker_set__min_time.set( 'min', TODAY ) + event.stopPropagation() +}) +$( '#button__api-set--min-time-string' ).on( 'click', function( event ) { + picker_set__min_time.set( 'min', '4:30 PM' ) + event.stopPropagation() +}) +$( '#button__api-set--min-time-integer' ).on( 'click', function( event ) { + picker_set__min_time.set( 'min', -4 ) + event.stopPropagation() +}) +$( '#button__api-set--min-time-true' ).on( 'click', function( event ) { + picker_set__min_time.set( 'min', true ) + event.stopPropagation() +}) +$( '#button__api-set--min-time-false' ).on( 'click', function( event ) { + picker_set__min_time.set( 'min', false ) + event.stopPropagation() +}) + +//max: date +var $input_set__max_date = $( '#demo__api-set--max-date' ).pickadate(), + picker_set__max_date = $input_set__max_date.pickadate( 'picker' ) +$( '#button__api-set--max-date-array' ).on( 'click', function( event ) { + picker_set__max_date.set( 'max', [2013,3,20] ) + event.stopPropagation() +}) +$( '#button__api-set--max-date-js' ).on( 'click', function( event ) { + picker_set__max_date.set( 'max', new Date(2013,7,14) ) + event.stopPropagation() +}) +$( '#button__api-set--max-date-string' ).on( 'click', function( event ) { + picker_set__max_date.set( 'max', '20 April, 2016' ) + event.stopPropagation() +}) +$( '#button__api-set--max-date-integer' ).on( 'click', function( event ) { + picker_set__max_date.set( 'max', 4 ) + event.stopPropagation() +}) +$( '#button__api-set--max-date-true' ).on( 'click', function( event ) { + picker_set__max_date.set( 'max', true ) + event.stopPropagation() +}) +$( '#button__api-set--max-date-false' ).on( 'click', function( event ) { + picker_set__max_date.set( 'max', false ) + event.stopPropagation() +}) + +//max: time +var $input_set__max_time = $( '#demo__api-set--max-time' ).pickatime(), + picker_set__max_time = $input_set__max_time.pickatime( 'picker' ) +$( '#button__api-set--max-time-array' ).on( 'click', function( event ) { + picker_set__max_time.set( 'max', [15,30] ) + event.stopPropagation() +}) +$( '#button__api-set--max-time-js' ).on( 'click', function( event ) { + picker_set__max_time.set( 'max', TODAY ) + event.stopPropagation() +}) +$( '#button__api-set--max-time-string' ).on( 'click', function( event ) { + picker_set__max_time.set( 'max', '11:30 AM' ) + event.stopPropagation() +}) +$( '#button__api-set--max-time-integer' ).on( 'click', function( event ) { + picker_set__max_time.set( 'max', 4 ) + event.stopPropagation() +}) +$( '#button__api-set--max-time-true' ).on( 'click', function( event ) { + picker_set__max_time.set( 'max', true ) + event.stopPropagation() +}) +$( '#button__api-set--max-time-false' ).on( 'click', function( event ) { + picker_set__max_time.set( 'max', false ) + event.stopPropagation() +}) + +//disable-enable: date +var $input_set__disable_enable_date_specific = $( '#demo__api-set--disable-enable-date-specific' ).pickadate(), + picker_set__disable_enable_date_specific = $input_set__disable_enable_date_specific.pickadate( 'picker' ) +$( '#button__api-set--disable-date-specific' ).on( 'click', function( event ) { + picker_set__disable_enable_date_specific.set( 'disable', [ + [2014,9,3], [2014,9,9], [2014,9,20], + new Date(2013,9,13), new Date(2013,9,24) + ]) + event.stopPropagation() +}) +$( '#button__api-set--enable-date-specific' ).on( 'click', function( event ) { + picker_set__disable_enable_date_specific.set( 'enable', [ + [2014,9,9], + [2014,9,13], + new Date(2013,9,20) + ]) + event.stopPropagation() +}) +var $input_set__disable_enable_date_ranges = $( '#demo__api-set--disable-enable-date-ranges' ).pickadate(), + picker_set__disable_enable_date_ranges = $input_set__disable_enable_date_ranges.pickadate( 'picker' ) +$( '#button__api-set--disable-date-ranges' ).on( 'click', function( event ) { + picker_set__disable_enable_date_ranges.set( 'disable', [ + 1, 4, 7, + { from: [2014,2,14], to: [2014,2,27] } + ]) + event.stopPropagation() +}) +$( '#button__api-set--enable-date-ranges' ).on( 'click', function( event ) { + picker_set__disable_enable_date_ranges.set( 'enable', [ + 4, + { from: [2014,2,24], to: [2014,2,27] } + ]) + event.stopPropagation() +}) +var $input_set__disable_enable_date_flip = $( '#demo__api-set--disable-enable-date-flip' ).pickadate({ + disable: [ + [2014,9,9], + [2014,9,13], + new Date(2013,9,20), + 1, 4, 7, + { from: [2014,2,14], to: [2014,2,27] } + ] +}), + picker_set__disable_enable_date_flip = $input_set__disable_enable_date_flip.pickadate( 'picker' ) +$( '#button__api-set--disable-date-flip' ).on( 'click', function( event ) { + picker_set__disable_enable_date_flip.set( 'disable', 'flip' ) + event.stopPropagation() +}) +var $input_set__disable_enable_date_all = $( '#demo__api-set--disable-enable-date-all' ).pickadate(), + picker_set__disable_enable_date_all = $input_set__disable_enable_date_all.pickadate( 'picker' ) +$( '#button__api-set--disable-date-all' ).on( 'click', function( event ) { + picker_set__disable_enable_date_all.set( 'disable', true ) + event.stopPropagation() +}) +$( '#button__api-set--enable-date-all' ).on( 'click', function( event ) { + picker_set__disable_enable_date_all.set( 'enable', true ) + event.stopPropagation() +}) + +//disable-enable: time +var $input_set__disable_enable_time_specific = $( '#demo__api-set--disable-enable-time-specific' ).pickatime(), + picker_set__disable_enable_time_specific = $input_set__disable_enable_time_specific.pickatime( 'picker' ) +$( '#button__api-set--disable-time-specific' ).on( 'click', function( event ) { + picker_set__disable_enable_time_specific.set( 'disable', [ + [2,30], [4,30], [9,0], + new Date(2013,9,13,6), new Date(2013,9,13,12,30) + ]) + event.stopPropagation() +}) +$( '#button__api-set--enable-time-specific' ).on( 'click', function( event ) { + picker_set__disable_enable_time_specific.set( 'enable', [ + [4,30], [6,0], + new Date(2013,9,13,9) + ]) + event.stopPropagation() +}) +var $input_set__disable_enable_time_ranges = $( '#demo__api-set--disable-enable-time-ranges' ).pickatime(), + picker_set__disable_enable_time_ranges = $input_set__disable_enable_time_ranges.pickatime( 'picker' ) +$( '#button__api-set--disable-time-ranges' ).on( 'click', function( event ) { + picker_set__disable_enable_time_ranges.set( 'disable', [ + 1, 4, 7, + { from: [10,30], to: [18,0] } + ]) + event.stopPropagation() +}) +$( '#button__api-set--enable-time-ranges' ).on( 'click', function( event ) { + picker_set__disable_enable_time_ranges.set( 'enable', [ + 4, + { from: [14,0], to: [16,30] } + ]) + event.stopPropagation() +}) +var $input_set__disable_enable_time_flip = $( '#demo__api-set--disable-enable-time-flip' ).pickatime({ + disable: [ + [4,30], + [6,0], + new Date(2013,9,20,3), + 1, 8, 14, + { from: [15,30], to: [20,0] } + ] +}), + picker_set__disable_enable_time_flip = $input_set__disable_enable_time_flip.pickatime( 'picker' ) +$( '#button__api-set--disable-time-flip' ).on( 'click', function( event ) { + picker_set__disable_enable_time_flip.set( 'disable', 'flip' ) + event.stopPropagation() +}) +var $input_set__disable_enable_time_all = $( '#demo__api-set--disable-enable-time-all' ).pickatime(), + picker_set__disable_enable_time_all = $input_set__disable_enable_time_all.pickatime( 'picker' ) +$( '#button__api-set--disable-time-all' ).on( 'click', function( event ) { + picker_set__disable_enable_time_all.set( 'disable', true ) + event.stopPropagation() +}) +$( '#button__api-set--enable-time-all' ).on( 'click', function( event ) { + picker_set__disable_enable_time_all.set( 'enable', true ) + event.stopPropagation() +}) + +//enable-disable: range +var $input_set__enable_disable_in_range_date = $( '#demo__api-set--enable-disable-in-range-date' ).pickadate({ + disable: [ + 1, [2013, 10, 17, 'inverted'], + { from: [2014, 2, 2], to: [2014, 2, 28] }, + [2014, 2, 10, 'inverted'], + { from: [2014, 2, 14], to: [2014, 2, 23], inverted: true } + ] + }), + picker_set__enable_disable_in_range_date = $input_set__enable_disable_in_range_date.pickadate( 'picker' ) +var $input_set__enable_disable_in_range_time = $( '#demo__api-set--enable-disable-in-range-time' ).pickatime({ + disable: [ + 1, [1, 30, 'inverted'], + { from: [3,0], to: [18,0] }, + [4, 30, 'inverted'], + { from: [7,30], to: [11,30], inverted: true } + ] + }), + picker_set__enable_disable_in_range_time = $input_set__enable_disable_in_range_time.pickatime( 'picker' ) + +//interval: time +var $input_set__interval_time = $( '#demo__api-set--interval' ).pickatime(), + picker_set__interval_time = $input_set__interval_time.pickatime( 'picker' ) +$( '#button__api-set--interval-fifteen' ).on( 'click', function( event ) { + picker_set__interval_time.set( 'interval', 15 ) + event.stopPropagation() +}) +$( '#button__api-set--interval-twenty' ).on( 'click', function( event ) { + picker_set__interval_time.set( 'interval', 20 ) + event.stopPropagation() +}) +$( '#button__api-set--interval-onetwenty' ).on( 'click', function( event ) { + picker_set__interval_time.set( 'interval', 120 ) + event.stopPropagation() +}) + + + +/** + * API events and callbacks + */ + +// callback: options +var $input_callback_options = $( '#demo__api-callback-options' ).pickadate({ + onOpen: function() { + console.log('Opened up!') + }, + onClose: function() { + console.log('Closed now') + }, + onRender: function() { + console.log('Just rendered anew') + }, + onStart: function() { + console.log('Hello there :)') + }, + onStop: function() { + console.log('See ya') + }, + onSet: function(thingSet) { + console.log('Set stuff:', thingSet) + } + }), + picker_callback_options = $input_callback_options.pickadate( 'picker' ) +$( '#button__api-callback-options' ).on( 'click', function( event ) { + if ( this.innerHTML == 'Stop' ) { + picker_callback_options.stop() + this.innerHTML = 'Start' + } + else { + picker_callback_options.start() + this.innerHTML = 'Stop' + } + event.stopPropagation() +}) + + +// callback: bindings +var $input_callback_bindings = $( '#demo__api-callback-bindings' ).pickadate() + picker_callback_bindings = $input_callback_bindings.pickadate( 'picker' ) +if ( picker_callback_bindings ) { + picker_callback_bindings.on({ + open: function() { + console.log('Opened up!') + }, + close: function() { + console.log('Closed now') + }, + render: function() { + console.log('Just rendered anew') + }, + start: function() { + console.log('Hello there :)') + }, + stop: function() { + console.log('See ya') + }, + set: function(thingSet) { + console.log('Set stuff:', thingSet) + } + }) + $( '#button__api-callback-bindings' ).on( 'click', function( event ) { + if ( this.innerHTML == 'Stop' ) { + picker_callback_bindings.stop() + this.innerHTML = 'Start' + } + else { + picker_callback_bindings.start() + this.innerHTML = 'Stop' + } + event.stopPropagation() + }) +} + + +// callback: off +var $input_method_off = $( '#demo__api-method-off' ).pickadate(), + picker_method_off = $input_method_off.pickadate( 'picker' ) +if ( picker_method_off ) { + picker_method_off.on( 'open', function() { + console.log('Even when I’m opened, I’m not logged..') + }) + picker_method_off.off( 'open' ) +} + + +// trigger events +var $input_method_trigger__a = $( '#demo__api-method-trigger--a' ).pickadate(), + picker_method_trigger__a = $input_method_trigger__a.pickadate( 'picker' ) +if ( picker_method_trigger__a ) { + picker_method_trigger__a.on( 'open', function() { + console.log( 'This logs without opening!' ) + }) + $( '#button__api-method-trigger--a' ).on( 'click', function( event ) { + picker_method_trigger__a.trigger( 'open' ) + event.stopPropagation() + }) +} +var $input_method_trigger__b = $( '#demo__api-method-trigger--b' ).pickadate(), + picker_method_trigger__b = $input_method_trigger__b.pickadate( 'picker' ) +if ( picker_method_trigger__b ) { + picker_method_trigger__b.on( 'open', function(data) { + console.log( 'This logs without opening with this data:', data ) + }) + $( '#button__api-method-trigger--b' ).on( 'click', function( event ) { + picker_method_trigger__b.trigger( 'open', { some: 'value' } ) + event.stopPropagation() + }) +} + + + + +/** + * API objects + */ + +//$node +var $input_object__node = $( '#demo__api-object--node' ).pickadate(), + picker_object__node = $input_object__node.pickadate( 'picker' ) +$( '#button__api-object--node' ).on( 'click', function( event ) { + console.log( picker_object__node.$node ) + event.stopPropagation() +}) + +//$root +var $input_object__holder = $( '#demo__api-object--holder' ).pickadate(), + picker_object__holder = $input_object__holder.pickadate( 'picker' ) +$( '#button__api-object--holder' ).on( 'click', function( event ) { + console.log( picker_object__holder.$root ) + event.stopPropagation() +}) + + + +/* + * Initialize all the others + */ +$( '.js__datepicker' ).pickadate({ + + // Work-around for some mobile browsers clipping off the picker. + onOpen: function() { $('pre').css('overflow', 'hidden') }, + onClose: function() { $('pre').css('overflow', '') } +}) +$( '.js__timepicker' ).pickatime() + + + + + + + + +/* ========================================================================== + Theme switcher widget + ========================================================================== */ + +var themeSelected = window.localStorage ? localStorage.getItem( 'theme' ) : '', + $themeLinks = $( '#theme_base, #theme_date, #theme_time' ), + updateStylingLinks = function( value ) { + value = value || 'default' + $( '#show_theme_' + value ).attr( 'checked', true ) + $themeLinks.detach() + $themeLinks.each( function() { + this.href = this.href.replace( /(.+\/)(\w+)(.+)/, '$1' + value + '$3' ) + }) + $themeLinks.appendTo( 'head' ) + } + +if ( themeSelected ) { + updateStylingLinks( themeSelected ) +} + +$( '[name=show_theme]' ).on( 'change', function() { + var value = this.value + updateStylingLinks( value ) + if ( window.localStorage ) { + localStorage.setItem( 'theme', value ) + } +}) + + + diff --git a/js/pickadate.js-3.5.3/demo/scripts/rainbow.js b/js/pickadate.js-3.5.3/demo/scripts/rainbow.js new file mode 100644 index 0000000..3434e29 --- /dev/null +++ b/js/pickadate.js-3.5.3/demo/scripts/rainbow.js @@ -0,0 +1,1192 @@ +/** + * Copyright 2013 Craig Campbell + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Rainbow is a simple code syntax highlighter + * + * @preserve @version 1.2 + * @url rainbowco.de + */ +window['Rainbow'] = (function() { + + /** + * array of replacements to process at the end + * + * @type {Object} + */ + var replacements = {}, + + /** + * an array of start and end positions of blocks to be replaced + * + * @type {Object} + */ + replacement_positions = {}, + + /** + * an array of the language patterns specified for each language + * + * @type {Object} + */ + language_patterns = {}, + + /** + * an array of languages and whether they should bypass the default patterns + * + * @type {Object} + */ + bypass_defaults = {}, + + /** + * processing level + * + * replacements are stored at this level so if there is a sub block of code + * (for example php inside of html) it runs at a different level + * + * @type {number} + */ + CURRENT_LEVEL = 0, + + /** + * constant used to refer to the default language + * + * @type {number} + */ + DEFAULT_LANGUAGE = 0, + + /** + * used as counters so we can selectively call setTimeout + * after processing a certain number of matches/replacements + * + * @type {number} + */ + match_counter = 0, + + /** + * @type {number} + */ + replacement_counter = 0, + + /** + * @type {null|string} + */ + global_class, + + /** + * @type {null|Function} + */ + onHighlight; + + /** + * cross browser get attribute for an element + * + * @see http://stackoverflow.com/questions/3755227/cross-browser-javascript-getattribute-method + * + * @param {Node} el + * @param {string} attr attribute you are trying to get + * @returns {string|number} + */ + function _attr(el, attr, attrs, i) { + var result = (el.getAttribute && el.getAttribute(attr)) || 0; + + if (!result) { + attrs = el.attributes; + + for (i = 0; i < attrs.length; ++i) { + if (attrs[i].nodeName === attr) { + return attrs[i].nodeValue; + } + } + } + + return result; + } + + /** + * adds a class to a given code block + * + * @param {Element} el + * @param {string} class_name class name to add + * @returns void + */ + function _addClass(el, class_name) { + el.className += el.className ? ' ' + class_name : class_name; + } + + /** + * checks if a block has a given class + * + * @param {Element} el + * @param {string} class_name class name to check for + * @returns {boolean} + */ + function _hasClass(el, class_name) { + return (' ' + el.className + ' ').indexOf(' ' + class_name + ' ') > -1; + } + + /** + * gets the language for this block of code + * + * @param {Element} block + * @returns {string|null} + */ + function _getLanguageForBlock(block) { + + // if this doesn't have a language but the parent does then use that + // this means if for example you have:
+        // with a bunch of  blocks inside then you do not have
+        // to specify the language for each block
+        var language = _attr(block, 'data-language') || _attr(block.parentNode, 'data-language');
+
+        // this adds support for specifying language via a css class
+        // you can use the Google Code Prettify style: 
+        // or the HTML5 style: 

+        if (!language) {
+            var pattern = /\blang(?:uage)?-(\w+)/,
+                match = block.className.match(pattern) || block.parentNode.className.match(pattern);
+
+            if (match) {
+                language = match[1];
+            }
+        }
+
+        return language;
+    }
+
+    /**
+     * makes sure html entities are always used for tags
+     *
+     * @param {string} code
+     * @returns {string}
+     */
+    function _htmlEntities(code) {
+        // I'd rather do that at the template level.
+        return code;//.replace(//g, '>').replace(/&(?![\w\#]+;)/g, '&');
+    }
+
+    /**
+     * determines if a new match intersects with an existing one
+     *
+     * @param {number} start1    start position of existing match
+     * @param {number} end1      end position of existing match
+     * @param {number} start2    start position of new match
+     * @param {number} end2      end position of new match
+     * @returns {boolean}
+     */
+    function _intersects(start1, end1, start2, end2) {
+        if (start2 >= start1 && start2 < end1) {
+            return true;
+        }
+
+        return end2 > start1 && end2 < end1;
+    }
+
+    /**
+     * determines if two different matches have complete overlap with each other
+     *
+     * @param {number} start1   start position of existing match
+     * @param {number} end1     end position of existing match
+     * @param {number} start2   start position of new match
+     * @param {number} end2     end position of new match
+     * @returns {boolean}
+     */
+    function _hasCompleteOverlap(start1, end1, start2, end2) {
+
+        // if the starting and end positions are exactly the same
+        // then the first one should stay and this one should be ignored
+        if (start2 == start1 && end2 == end1) {
+            return false;
+        }
+
+        return start2 <= start1 && end2 >= end1;
+    }
+
+    /**
+     * determines if the match passed in falls inside of an existing match
+     * this prevents a regex pattern from matching inside of a bigger pattern
+     *
+     * @param {number} start - start position of new match
+     * @param {number} end - end position of new match
+     * @returns {boolean}
+     */
+    function _matchIsInsideOtherMatch(start, end) {
+        for (var key in replacement_positions[CURRENT_LEVEL]) {
+            key = parseInt(key, 10);
+
+            // if this block completely overlaps with another block
+            // then we should remove the other block and return false
+            if (_hasCompleteOverlap(key, replacement_positions[CURRENT_LEVEL][key], start, end)) {
+                delete replacement_positions[CURRENT_LEVEL][key];
+                delete replacements[CURRENT_LEVEL][key];
+            }
+
+            if (_intersects(key, replacement_positions[CURRENT_LEVEL][key], start, end)) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * takes a string of code and wraps it in a span tag based on the name
+     *
+     * @param {string} name     name of the pattern (ie keyword.regex)
+     * @param {string} code     block of code to wrap
+     * @returns {string}
+     */
+    function _wrapCodeInSpan(name, code) {
+        return '' + code + '';
+    }
+
+    /**
+     * finds out the position of group match for a regular expression
+     *
+     * @see http://stackoverflow.com/questions/1985594/how-to-find-index-of-groups-in-match
+     *
+     * @param {Object} match
+     * @param {number} group_number
+     * @returns {number}
+     */
+    function _indexOfGroup(match, group_number) {
+        var index = 0,
+            i;
+
+        for (i = 1; i < group_number; ++i) {
+            if (match[i]) {
+                index += match[i].length;
+            }
+        }
+
+        return index;
+    }
+
+    /**
+     * matches a regex pattern against a block of code
+     * finds all matches that should be processed and stores the positions
+     * of where they should be replaced within the string
+     *
+     * this is where pretty much all the work is done but it should not
+     * be called directly
+     *
+     * @param {RegExp} pattern
+     * @param {string} code
+     * @returns void
+     */
+    function _processPattern(regex, pattern, code, callback)
+    {
+        var match = regex.exec(code);
+
+        if (!match) {
+            return callback();
+        }
+
+        ++match_counter;
+
+        // treat match 0 the same way as name
+        if (!pattern['name'] && typeof pattern['matches'][0] == 'string') {
+            pattern['name'] = pattern['matches'][0];
+            delete pattern['matches'][0];
+        }
+
+        var replacement = match[0],
+            start_pos = match.index,
+            end_pos = match[0].length + start_pos,
+
+            /**
+             * callback to process the next match of this pattern
+             */
+            processNext = function() {
+                var nextCall = function() {
+                    _processPattern(regex, pattern, code, callback);
+                };
+
+                // every 100 items we process let's call set timeout
+                // to let the ui breathe a little
+                return match_counter % 100 > 0 ? nextCall() : setTimeout(nextCall, 0);
+            };
+
+        // if this is not a child match and it falls inside of another
+        // match that already happened we should skip it and continue processing
+        if (_matchIsInsideOtherMatch(start_pos, end_pos)) {
+            return processNext();
+        }
+
+        /**
+         * callback for when a match was successfully processed
+         *
+         * @param {string} replacement
+         * @returns void
+         */
+        var onMatchSuccess = function(replacement) {
+                // if this match has a name then wrap it in a span tag
+                if (pattern['name']) {
+                    replacement = _wrapCodeInSpan(pattern['name'], replacement);
+                }
+
+                // console.log('LEVEL', CURRENT_LEVEL, 'replace', match[0], 'with', replacement, 'at position', start_pos, 'to', end_pos);
+
+                // store what needs to be replaced with what at this position
+                if (!replacements[CURRENT_LEVEL]) {
+                    replacements[CURRENT_LEVEL] = {};
+                    replacement_positions[CURRENT_LEVEL] = {};
+                }
+
+                replacements[CURRENT_LEVEL][start_pos] = {
+                    'replace': match[0],
+                    'with': replacement
+                };
+
+                // store the range of this match so we can use it for comparisons
+                // with other matches later
+                replacement_positions[CURRENT_LEVEL][start_pos] = end_pos;
+
+                // process the next match
+                processNext();
+            },
+
+            // if this pattern has sub matches for different groups in the regex
+            // then we should process them one at a time by rerunning them through
+            // this function to generate the new replacement
+            //
+            // we run through them backwards because the match position of earlier
+            // matches will not change depending on what gets replaced in later
+            // matches
+            group_keys = keys(pattern['matches']),
+
+            /**
+             * callback for processing a sub group
+             *
+             * @param {number} i
+             * @param {Array} group_keys
+             * @param {Function} callback
+             */
+            processGroup = function(i, group_keys, callback) {
+                if (i >= group_keys.length) {
+                    return callback(replacement);
+                }
+
+                var processNextGroup = function() {
+                        processGroup(++i, group_keys, callback);
+                    },
+                    block = match[group_keys[i]];
+
+                // if there is no match here then move on
+                if (!block) {
+                    return processNextGroup();
+                }
+
+                var group = pattern['matches'][group_keys[i]],
+                    language = group['language'],
+
+                    /**
+                     * process group is what group we should use to actually process
+                     * this match group
+                     *
+                     * for example if the subgroup pattern looks like this
+                     * 2: {
+                     *     'name': 'keyword',
+                     *     'pattern': /true/g
+                     * }
+                     *
+                     * then we use that as is, but if it looks like this
+                     *
+                     * 2: {
+                     *     'name': 'keyword',
+                     *     'matches': {
+                     *          'name': 'special',
+                     *          'pattern': /whatever/g
+                     *      }
+                     * }
+                     *
+                     * we treat the 'matches' part as the pattern and keep
+                     * the name around to wrap it with later
+                     */
+                    process_group = group['name'] && group['matches'] ? group['matches'] : group,
+
+                    /**
+                     * takes the code block matched at this group, replaces it
+                     * with the highlighted block, and optionally wraps it with
+                     * a span with a name
+                     *
+                     * @param {string} block
+                     * @param {string} replace_block
+                     * @param {string|null} match_name
+                     */
+                    _replaceAndContinue = function(block, replace_block, match_name) {
+                        replacement = _replaceAtPosition(_indexOfGroup(match, group_keys[i]), block, match_name ? _wrapCodeInSpan(match_name, replace_block) : replace_block, replacement);
+                        processNextGroup();
+                    };
+
+                // if this is a sublanguage go and process the block using that language
+                if (language) {
+                    return _highlightBlockForLanguage(block, language, function(code) {
+                        _replaceAndContinue(block, code);
+                    });
+                }
+
+                // if this is a string then this match is directly mapped to selector
+                // so all we have to do is wrap it in a span and continue
+                if (typeof group === 'string') {
+                    return _replaceAndContinue(block, block, group);
+                }
+
+                // the process group can be a single pattern or an array of patterns
+                // _processCodeWithPatterns always expects an array so we convert it here
+                _processCodeWithPatterns(block, process_group.length ? process_group : [process_group], function(code) {
+                    _replaceAndContinue(block, code, group['matches'] ? group['name'] : 0);
+                });
+            };
+
+        processGroup(0, group_keys, onMatchSuccess);
+    }
+
+    /**
+     * should a language bypass the default patterns?
+     *
+     * if you call Rainbow.extend() and pass true as the third argument
+     * it will bypass the defaults
+     */
+    function _bypassDefaultPatterns(language)
+    {
+        return bypass_defaults[language];
+    }
+
+    /**
+     * returns a list of regex patterns for this language
+     *
+     * @param {string} language
+     * @returns {Array}
+     */
+    function _getPatternsForLanguage(language) {
+        var patterns = language_patterns[language] || [],
+            default_patterns = language_patterns[DEFAULT_LANGUAGE] || [];
+
+        return _bypassDefaultPatterns(language) ? patterns : patterns.concat(default_patterns);
+    }
+
+    /**
+     * substring replace call to replace part of a string at a certain position
+     *
+     * @param {number} position         the position where the replacement should happen
+     * @param {string} replace          the text we want to replace
+     * @param {string} replace_with     the text we want to replace it with
+     * @param {string} code             the code we are doing the replacing in
+     * @returns {string}
+     */
+    function _replaceAtPosition(position, replace, replace_with, code) {
+        var sub_string = code.substr(position);
+        return code.substr(0, position) + sub_string.replace(replace, replace_with);
+    }
+
+   /**
+     * sorts an object by index descending
+     *
+     * @param {Object} object
+     * @return {Array}
+     */
+    function keys(object) {
+        var locations = [],
+            replacement,
+            pos;
+
+        for(var location in object) {
+            if (object.hasOwnProperty(location)) {
+                locations.push(location);
+            }
+        }
+
+        // numeric descending
+        return locations.sort(function(a, b) {
+            return b - a;
+        });
+    }
+
+    /**
+     * processes a block of code using specified patterns
+     *
+     * @param {string} code
+     * @param {Array} patterns
+     * @returns void
+     */
+    function _processCodeWithPatterns(code, patterns, callback)
+    {
+        // we have to increase the level here so that the
+        // replacements will not conflict with each other when
+        // processing sub blocks of code
+        ++CURRENT_LEVEL;
+
+        // patterns are processed one at a time through this function
+        function _workOnPatterns(patterns, i)
+        {
+            // still have patterns to process, keep going
+            if (i < patterns.length) {
+                return _processPattern(patterns[i]['pattern'], patterns[i], code, function() {
+                    _workOnPatterns(patterns, ++i);
+                });
+            }
+
+            // we are done processing the patterns
+            // process the replacements and update the DOM
+            _processReplacements(code, function(code) {
+
+                // when we are done processing replacements
+                // we are done at this level so we can go back down
+                delete replacements[CURRENT_LEVEL];
+                delete replacement_positions[CURRENT_LEVEL];
+                --CURRENT_LEVEL;
+                callback(code);
+            });
+        }
+
+        _workOnPatterns(patterns, 0);
+    }
+
+    /**
+     * process replacements in the string of code to actually update the markup
+     *
+     * @param {string} code         the code to process replacements in
+     * @param {Function} onComplete   what to do when we are done processing
+     * @returns void
+     */
+    function _processReplacements(code, onComplete) {
+
+        /**
+         * processes a single replacement
+         *
+         * @param {string} code
+         * @param {Array} positions
+         * @param {number} i
+         * @param {Function} onComplete
+         * @returns void
+         */
+        function _processReplacement(code, positions, i, onComplete) {
+            if (i < positions.length) {
+                ++replacement_counter;
+                var pos = positions[i],
+                    replacement = replacements[CURRENT_LEVEL][pos];
+                code = _replaceAtPosition(pos, replacement['replace'], replacement['with'], code);
+
+                // process next function
+                var next = function() {
+                    _processReplacement(code, positions, ++i, onComplete);
+                };
+
+                // use a timeout every 250 to not freeze up the UI
+                return replacement_counter % 250 > 0 ? next() : setTimeout(next, 0);
+            }
+
+            onComplete(code);
+        }
+
+        var string_positions = keys(replacements[CURRENT_LEVEL]);
+        _processReplacement(code, string_positions, 0, onComplete);
+    }
+
+    /**
+     * takes a string of code and highlights it according to the language specified
+     *
+     * @param {string} code
+     * @param {string} language
+     * @param {Function} onComplete
+     * @returns void
+     */
+    function _highlightBlockForLanguage(code, language, onComplete) {
+        var patterns = _getPatternsForLanguage(language);
+        _processCodeWithPatterns(_htmlEntities(code), patterns, onComplete);
+    }
+
+    /**
+     * highlight an individual code block
+     *
+     * @param {Array} code_blocks
+     * @param {number} i
+     * @returns void
+     */
+    function _highlightCodeBlock(code_blocks, i, onComplete) {
+        if (i < code_blocks.length) {
+            var block = code_blocks[i],
+                language = _getLanguageForBlock(block);
+
+            if (!_hasClass(block, 'rainbow') && language) {
+                language = language.toLowerCase();
+
+                _addClass(block, 'rainbow');
+
+                return _highlightBlockForLanguage(block.innerHTML, language, function(code) {
+                    block.innerHTML = code;
+
+                    // reset the replacement arrays
+                    replacements = {};
+                    replacement_positions = {};
+
+                    // if you have a listener attached tell it that this block is now highlighted
+                    if (onHighlight) {
+                        onHighlight(block, language);
+                    }
+
+                    // process the next block
+                    setTimeout(function() {
+                        _highlightCodeBlock(code_blocks, ++i, onComplete);
+                    }, 0);
+                });
+            }
+            return _highlightCodeBlock(code_blocks, ++i, onComplete);
+        }
+
+        if (onComplete) {
+            onComplete();
+        }
+    }
+
+    /**
+     * start highlighting all the code blocks
+     *
+     * @returns void
+     */
+    function _highlight(node, onComplete) {
+
+        // the first argument can be an Event or a DOM Element
+        // I was originally checking instanceof Event but that makes it break
+        // when using mootools
+        //
+        // @see https://github.com/ccampbell/rainbow/issues/32
+        //
+        node = node && typeof node.getElementsByTagName == 'function' ? node : document;
+
+        var pre_blocks = node.getElementsByTagName('pre'),
+            code_blocks = node.getElementsByTagName('code'),
+            i,
+            final_pre_blocks = [],
+            final_code_blocks = [];
+
+        // first loop through all pre blocks to find which ones to highlight
+        // also strip whitespace
+        for (i = 0; i < pre_blocks.length; ++i) {
+
+            // strip whitespace around code tags when they are inside of a pre tag
+            // this makes the themes look better because you can't accidentally
+            // add extra linebreaks at the start and end
+            //
+            // when the pre tag contains a code tag then strip any extra whitespace
+            // for example
+            // 
+            //      var foo = true;
+            // 
+ // + // will become + //
var foo = true;
+ // + // if you want to preserve whitespace you can use a pre tag on its own + // without a code tag inside of it + if (pre_blocks[i].getElementsByTagName('code').length) { + pre_blocks[i].innerHTML = pre_blocks[i].innerHTML.replace(/^\s+/, '').replace(/\s+$/, ''); + continue; + } + + // if the pre block has no code blocks then we are going to want to + // process it directly + final_pre_blocks.push(pre_blocks[i]); + } + + // @see http://stackoverflow.com/questions/2735067/how-to-convert-a-dom-node-list-to-an-array-in-javascript + // we are going to process all blocks + for (i = 0; i < code_blocks.length; ++i) { + final_code_blocks.push(code_blocks[i]); + } + + _highlightCodeBlock(final_code_blocks.concat(final_pre_blocks), 0, onComplete); + } + + /** + * public methods + */ + return { + + /** + * extends the language pattern matches + * + * @param {*} language name of language + * @param {*} patterns array of patterns to add on + * @param {boolean|null} bypass if true this will bypass the default language patterns + */ + extend: function(language, patterns, bypass) { + + // if there is only one argument then we assume that we want to + // extend the default language rules + if (arguments.length == 1) { + patterns = language; + language = DEFAULT_LANGUAGE; + } + + bypass_defaults[language] = bypass; + language_patterns[language] = patterns.concat(language_patterns[language] || []); + }, + + /** + * call back to let you do stuff in your app after a piece of code has been highlighted + * + * @param {Function} callback + */ + onHighlight: function(callback) { + onHighlight = callback; + }, + + /** + * method to set a global class that will be applied to all spans + * + * @param {string} class_name + */ + addClass: function(class_name) { + global_class = class_name; + }, + + /** + * starts the magic rainbow + * + * @returns void + */ + color: function() { + + // if you want to straight up highlight a string you can pass the string of code, + // the language, and a callback function + if (typeof arguments[0] == 'string') { + return _highlightBlockForLanguage(arguments[0], arguments[1], arguments[2]); + } + + // if you pass a callback function then we rerun the color function + // on all the code and call the callback function on complete + if (typeof arguments[0] == 'function') { + return _highlight(0, arguments[0]); + } + + // otherwise we use whatever node you passed in with an optional + // callback function as the second parameter + _highlight(arguments[0], arguments[1]); + } + }; +}) (); + +/** + * adds event listener to start highlighting + */ +(function() { + if (document.addEventListener) { + return document.addEventListener('DOMContentLoaded', Rainbow.color, false); + } + window.attachEvent('onload', Rainbow.color); +}) (); + +// When using Google closure compiler in advanced mode some methods +// get renamed. This keeps a public reference to these methods so they can +// still be referenced from outside this library. +Rainbow["onHighlight"] = Rainbow.onHighlight; +Rainbow["addClass"] = Rainbow.addClass; + + +/** + * Generic language patterns + * + * @author Craig Campbell + * @version 1.0.10 + */ +Rainbow.extend([ + { + 'matches': { + 1: { + 'name': 'keyword.operator', + 'pattern': /\=/g + }, + 2: { + 'name': 'string', + 'matches': { + 'name': 'constant.character.escape', + 'pattern': /\\('|"){1}/g + } + } + }, + 'pattern': /(\(|\s|\[|\=|:)(('|")([^\\\1]|\\.)*?(\3))/gm + }, + { + 'name': 'comment', + 'pattern': /\/\*[\s\S]*?\*\/|(\/\/|\#)[\s\S]*?$/gm + }, + { + 'name': 'constant.numeric', + 'pattern': /\b(\d+(\.\d+)?(e(\+|\-)?\d+)?(f|d)?|0x[\da-f]+)\b/gi + }, + { + 'matches': { + 1: 'keyword' + }, + 'pattern': /\b(and|array|as|b(ool(ean)?|reak)|c(ase|atch|har|lass|on(st|tinue))|d(ef|elete|o(uble)?)|e(cho|lse(if)?|xit|xtends|xcept)|f(inally|loat|or(each)?|unction)|global|if|import|int(eger)?|long|new|object|or|pr(int|ivate|otected)|public|return|self|st(ring|ruct|atic)|switch|th(en|is|row)|try|(un)?signed|var|void|while)(?=\(|\b)/gi + }, + { + 'name': 'constant.language', + 'pattern': /true|false|null/g + }, + { + 'name': 'keyword.operator', + 'pattern': /\+|\!|\-|&(gt|lt|amp);|\||\*|\=/g + }, + { + 'matches': { + 1: 'function.call' + }, + 'pattern': /(\w+?)(?=\()/g + }, + { + 'matches': { + 1: 'storage.function', + 2: 'entity.name.function' + }, + // 'pattern': /(function)\s(.*?)(?=\()/g + 'pattern': /(function)(?=\s)(.*?)(?=\()/g // <<< discard the whitespace match after `function`. + } +]); + + +/** + * Javascript patterns + * + * @author Craig Campbell + * @version 1.0.8 + */ +Rainbow.extend('javascript', [ + + /** + * matches $. or $( + */ + { + 'name': 'selector', + 'pattern': /(\s|^)\$(?=\.|\()/g + }, + { + 'name': 'support', + 'pattern': /\b(window|document)\b/g + }, + { + 'matches': { + 1: 'support.property' + }, + 'pattern': /\.(length|node(Name|Value))\b/g + }, + { + 'matches': { + 1: 'support.function' + }, + 'pattern': /(setTimeout|setInterval)(?=\()/g + + }, + { + 'matches': { + 1: 'support.method' + }, + 'pattern': /\.(getAttribute|push|getElementById|getElementsByClassName|log|setTimeout|setInterval)(?=\()/g + }, + { + 'matches': { + 1: 'support.tag.script', + 2: [ + { + 'name': 'string', + 'pattern': /('|")(.*?)(\1)/g + }, + { + 'name': 'entity.tag.script', + 'pattern': /(\w+)/g + } + ], + 3: 'support.tag.script' + }, + 'pattern': /(<\/?)(script.*?)(>)/g + }, + + /** + * matches any escaped characters inside of a js regex pattern + * + * @see https://github.com/ccampbell/rainbow/issues/22 + * + * this was causing single line comments to fail so it now makes sure + * the opening / is not directly followed by a * + * + * @todo check that there is valid regex in match group 1 + */ + { + 'name': 'string.regexp', + 'matches': { + 1: 'string.regexp.open', + 2: { + 'name': 'constant.regexp.escape', + 'pattern': /\\(.){1}/g + }, + 3: 'string.regexp.close', + 4: 'string.regexp.modifier' + }, + 'pattern': /(\/)(?!\*)(.+)(\/)([igm]{0,3})/g + }, + + /** + * matches runtime function declarations + */ + { + 'matches': { + 1: 'storage', + 3: 'entity.function' + }, + 'pattern': /(var)?(\s|^)(\S*)(?=\s?=\s?function\()/g + }, + + /** + * matches constructor call + */ + { + 'matches': { + 1: 'keyword', + 2: 'entity.function' + }, + // Fix for not capturing the space after `new` + 'pattern': /(new\s+)(.*)(?=\(.+\)$)/g + }, + + /** + * matches any function call in the style functionName: function() + */ + { + 'name': 'entity.function', + 'pattern': /(\w+)(?=:\s{0,}function)/g + } +]); + + + + + +/** + * HTML patterns + * + * @author Craig Campbell + * @version 1.0.7 + */ +Rainbow.extend('html', [ + { + 'name': 'source.php.embedded', + 'matches': { + 2: { + 'language': 'php' + } + }, + 'pattern': /<\?=?(?!xml)(php)?([\s\S]*?)(\?>)/gm + }, + { + 'name': 'source.css.embedded', + 'matches': { + 0: { + 'language': 'css' + } + }, + 'pattern': /<style(.*?)>([\s\S]*?)<\/style>/gm + }, + { + 'name': 'source.js.embedded', + 'matches': { + 0: { + 'language': 'javascript' + } + }, + 'pattern': /<script(?! src)(.*?)>([\s\S]*?)<\/script>/gm + }, + { + 'name': 'comment.html', + 'pattern': /<\!--[\S\s]*?-->/g + }, + { + 'matches': { + 1: 'support.tag.open', + 2: 'support.tag.close' + }, + 'pattern': /(<)|(\/?\??>)/g + }, + { + 'name': 'support.tag', + 'matches': { + 1: 'support.tag', + 2: 'support.tag.special', + 3: 'support.tag-name' + }, + 'pattern': /(<\??)(\/|\!?)(\w+)/g + }, + { + 'matches': { + 1: 'support.attribute' + }, + 'pattern': /([a-z-]+)(?=\=)/gi + }, + { + 'matches': { + 1: 'support.operator', + 2: 'string.quote', + 3: 'string.value', + 4: 'string.quote' + }, + 'pattern': /(=)('|")(.*?)(\2)/g + }, + { + 'matches': { + 1: 'support.operator', + 2: 'support.value' + }, + 'pattern': /(=)([a-zA-Z\-0-9]*)\b/g + }, + { + 'matches': { + 1: 'support.attribute' + }, + 'pattern': /\s(\w+)(?=\s|>)(?![\s\S]*<)/g + } +], true); + + + + + +/** + * CSS patterns + * + * @author Craig Campbell + * @version 1.0.9 + */ +Rainbow.extend('css', [ + { + 'name': 'comment', + 'pattern': /\/\*[\s\S]*?\*\//gm + }, + { + 'name': 'constant.hex-color', + 'pattern': /#([a-f0-9]{3}|[a-f0-9]{6})(?=;|\s|,|\))/gi + }, + { + 'matches': { + 1: 'constant.numeric', + 2: 'keyword.unit' + }, + 'pattern': /(\d+)(px|em|cm|s|%)?/g + }, + { + 'name': 'string', + 'pattern': /('|")(.*?)\1/g + }, + { + 'name': 'support.css-property', + 'matches': { + 1: 'support.vendor-prefix' + }, + 'pattern': /(-o-|-moz-|-webkit-|-ms-)?[\w-]+(?=\s?:)(?!.*\{)/g + }, + { + 'matches': { + 1: [ + { + 'name': 'entity.name.sass', + 'pattern': /&/g + }, + { + 'name': 'direct-descendant', + 'pattern': />/g + }, + { + 'name': 'entity.name.class', + 'pattern': /\.[\w\-_]+/g + }, + { + 'name': 'entity.name.id', + 'pattern': /\#[\w\-_]+/g + }, + { + 'name': 'entity.name.pseudo', + 'pattern': /:[\w\-_]+/g + }, + { + 'name': 'entity.name.tag', + 'pattern': /\w+/g + } + ] + }, + 'pattern': /([\w\ ,\n:\.\#\&\;\-_]+)(?=.*\{)/g + }, + { + 'matches': { + 2: 'support.vendor-prefix', + 3: 'support.css-value' + }, + 'pattern': /(:|,)\s*(-o-|-moz-|-webkit-|-ms-)?([a-zA-Z-]*)(?=\b)(?!.*\{)/g + } +], true); + + + + +// Extend rainbow javascript +window.Rainbow.extend( 'javascript', [ + { + 'name': 'null', + 'pattern': /\b(null|undefined)\b/g + }, + { + 'name': 'line-break', + 'pattern': /\n/g + }, + { + 'name': 'line-space', + 'pattern': / +/g + }, + { + 'name': 'html-link', + 'pattern': /.+<\/a>/g + } +]); + + + + +// Extend rainbow html +window.Rainbow.extend( 'html', [ + { + 'name': 'line-break', + 'pattern': /\n/g + }, + { + 'name': 'line-space', + 'pattern': / +/g + } +]); + + + + +// Extend rainbow css +window.Rainbow.extend( 'css', [ + { + 'name': 'comment', + 'pattern': /\/\*[\s\S]*?\*\//gm + }, + { + 'matches': { + 1: 'constant.numeric', + 2: 'keyword.unit' + }, + 'pattern': /(-?\d+)(em|px|cm|s|%)?/g + } +], true ); + diff --git a/js/pickadate.js-3.5.3/demo/styles/css/main.css b/js/pickadate.js-3.5.3/demo/styles/css/main.css new file mode 100644 index 0000000..5f63cf5 --- /dev/null +++ b/js/pickadate.js-3.5.3/demo/styles/css/main.css @@ -0,0 +1,1335 @@ +/* ========================================================================== + $CONTENTS + ========================================================================== */ +/** + * VARIABLES.................. + * MIXINS..................... + * IMPORTS.................... + * BASE.......................Base stylings + * TYPOGRAPHY................. + * CODE-BLOCKS................ + * FORM-ELEMENTS.............. + * BUTTONS.................... + * LISTS...................... + * MENUS...................... + * GROUPS.....................Group sets of content + * TABLES..................... + * SECTIONS...................Blocks of content + * TARGETS....................Page focus targets + * RAINBOW....................Syntax highlighting + * TEXT-HELPERS............... + * DEMOS...................... + */ +/* ========================================================================== + $IMPORTS + ========================================================================== */ +/* ========================================================================== + $VARIABLES + ========================================================================== */ +/** + * Font families + */ +/** + * Colors + */ +/* #cbe7b6 */ +/* #d9d9d9 */ +/* #ededed */ +/* #bfbfbf */ +/* #ababab */ +/* #eeeec5 */ +/** + * Widths + */ +/* 300px */ +/* 540px */ +/* 740px */ +/** + * Transitions + */ +/* ========================================================================== + $MIXINS + ========================================================================== */ +/** + * Lists + */ +.list-item-inline { + display: inline-block; + margin-right: 1em; +} +/** + * Demo tags + */ +/** + * Clear fix + */ +.clearfix:before, +.clearfix:after { + content: " "; + display: table; +} +.clearfix:after { + clear: both; +} +/** + * Vendor prefixes + */ +/*! normalize.css v2.1.1 | MIT License | git.io/normalize */ +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ +/** + * Correct `block` display not defined in IE 8/9. + */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} +/** + * Correct `inline-block` display not defined in IE 8/9. + */ +audio, +canvas, +video { + display: inline-block; +} +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ +audio:not([controls]) { + display: none; + height: 0; +} +/** + * Address styling not present in IE 8/9. + */ +[hidden] { + display: none; +} +/* ========================================================================== + Base + ========================================================================== */ +/** + * 1. Prevent system color scheme's background color being used in Firefox, IE, + * and Opera. + * 2. Prevent system color scheme's text color being used in Firefox, IE, and + * Opera. + * 3. Set default font family to sans-serif. + * 4. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ +html { + background: #fff; + /* 1 */ + color: #000; + /* 2 */ + font-family: sans-serif; + /* 3 */ + -ms-text-size-adjust: 100%; + /* 4 */ + -webkit-text-size-adjust: 100%; + /* 4 */ +} +/** + * Remove default margin. + */ +body { + margin: 0; +} +/* ========================================================================== + Links + ========================================================================== */ +/** + * Address `outline` inconsistency between Chrome and other browsers. + */ +a:focus { + outline: thin dotted; +} +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ +a:active, +a:hover { + outline: 0; +} +/* ========================================================================== + Typography + ========================================================================== */ +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ +h1 { + font-size: 2em; + margin: 0.67em 0; +} +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ +abbr[title] { + border-bottom: 1px dotted; +} +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ +b, +strong { + font-weight: bold; +} +/** + * Address styling not present in Safari 5 and Chrome. + */ +dfn { + font-style: italic; +} +/** + * Address differences between Firefox and other browsers. + */ +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} +/** + * Address styling not present in IE 8/9. + */ +mark { + background: #ff0; + color: #000; +} +/** + * Correct font family set oddly in Safari 5 and Chrome. + */ +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} +/** + * Improve readability of pre-formatted text in all browsers. + */ +pre { + white-space: pre-wrap; +} +/** + * Set consistent quote types. + */ +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} +/** + * Address inconsistent and variable font size in all browsers. + */ +small { + font-size: 80%; +} +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +/* ========================================================================== + Embedded content + ========================================================================== */ +/** + * Remove border when inside `a` element in IE 8/9. + */ +img { + border: 0; +} +/** + * Correct overflow displayed oddly in IE 9. + */ +svg:not(:root) { + overflow: hidden; +} +/* ========================================================================== + Figures + ========================================================================== */ +/** + * Address margin not present in IE 8/9 and Safari 5. + */ +figure { + margin: 0; +} +/* ========================================================================== + Forms + ========================================================================== */ +/** + * Define consistent border, margin, and padding. + */ +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ +legend { + border: 0; + /* 1 */ + padding: 0; + /* 2 */ +} +/** + * 1. Correct font family not being inherited in all browsers. + * 2. Correct font size not being inherited in all browsers. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ +button, +input, +select, +textarea { + font-family: inherit; + /* 1 */ + font-size: 100%; + /* 2 */ + margin: 0; + /* 3 */ +} +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ +button, +input { + line-height: normal; +} +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. + * Correct `select` style inheritance in Firefox 4+ and Opera. + */ +button, +select { + text-transform: none; +} +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + /* 2 */ + cursor: pointer; + /* 3 */ +} +/** + * Re-set default cursor for disabled elements. + */ +button[disabled], +html input[disabled] { + cursor: default; +} +/** + * 1. Address box sizing set to `content-box` in IE 8/9. + * 2. Remove excess padding in IE 8/9. + */ +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ +} +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ +input[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + /* 2 */ + box-sizing: content-box; +} +/** + * Remove inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +/** + * Remove inner padding and border in Firefox 4+. + */ +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} +/** + * 1. Remove default vertical scrollbar in IE 8/9. + * 2. Improve readability and alignment in all browsers. + */ +textarea { + overflow: auto; + /* 1 */ + vertical-align: top; + /* 2 */ +} +/* ========================================================================== + Tables + ========================================================================== */ +/** + * Remove most spacing between table cells. + */ +table { + border-collapse: collapse; + border-spacing: 0; +} +/* ========================================================================== + $BASE + ========================================================================== */ +hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid #cccccc; + margin: 1em 0; + padding: 0; +} +img { + max-width: 100%; + height: auto; + vertical-align: middle; +} +/** + * Links + */ +a { + text-decoration: underline; + cursor: pointer; + color: #0089ec; + -webkit-transition: all linear 0.15s; + -moz-transition: all linear 0.15s; + transition: all linear 0.15s; +} +a:focus { + outline: 2px dotted; +} +p > a, +.heading__text > a { + text-decoration: none; +} +p > a:hover, +p > a:focus, +.heading__text > a:hover, +.heading__text > a:focus { + text-decoration: underline; +} +/* ========================================================================== + $TYPOGRAPHY + ========================================================================== */ +body { + font-family: "Helvetica Neue", sans-serif; + font-weight: 200; + font-size: 16px; + line-height: 1.6; +} +@media (min-width: 46.25em) { + body { + font-size: 20px; + } +} +h1, +h2, +h3, +h4, +h5, +h6, +.heading { + line-height: 1.4; + font-weight: 400; +} +h1, +h2, +.heading--one, +.heading--two { + letter-spacing: -1px; +} +h1, +.heading--one { + font-size: 2em; +} +@media (min-width: 18.75em) { + h1, + .heading--one { + font-size: 2.125em; + } +} +@media (min-width: 33.75em) { + h1, + .heading--one { + font-size: 2.4em; + } +} +h2, +.heading--two { + font-size: 1.5em; +} +@media (min-width: 33.75em) { + h2, + .heading--two { + font-size: 1.8em; + } +} +h3, +.heading--three { + font-size: 1.2em; +} +.heading--thin { + font-weight: 200; +} +.heading--splash { + width: 88%; + margin-left: auto; + margin-right: auto; + margin-top: .5em; +} +@media (min-width: 46.25em) { + .heading--splash { + margin-top: 1em; + } +} +/** + * Divider headings + */ +.heading--divide, +.heading--divide-center, +.heading--divide-first { + text-transform: lowercase; + margin-top: 2.5em; + border-top: 1px solid #d9d9d9; + padding-top: 1.5em; +} +@media (min-width: 33.75em) { + .heading--divide, + .heading--divide-center, + .heading--divide-first { + position: relative; + padding-top: 0; + border-top: 0; + } +} +.heading--divide code, +.heading--divide-center code, +.heading--divide-first code { + text-transform: initial; +} +.heading--divide-center { + text-align: center; +} +.heading--divide-first { + padding-top: 0; + border-top: 0; + margin-top: 1em; +} +@media (min-width: 33.75em) { + .heading--divide:after, + .heading--divide-center:after, + .heading--divide-first:after { + content: " "; + border-bottom: 1px solid #d9d9d9; + height: 0; + position: absolute; + bottom: .5em; + z-index: -1; + right: 0; + left: 0; + display: block; + } +} +@media (min-width: 33.75em) { + .heading--divide .heading__text, + .heading--divide-center .heading__text, + .heading--divide-first .heading__text { + background: #ffffff; + display: inline-block; + padding-right: .5em; + } +} +@media (min-width: 33.75em) { + .heading--divide-center .heading__text { + padding-left: .5em; + } +} +/** + * Anchor for a heading + */ +.heading__anchor, +.heading__anchor--bigger { + color: #bfbfbf; + font-weight: 100; + text-decoration: none; + margin-left: .5em; + font-style: italic; + font-size: .75em; + vertical-align: 3px; +} +.heading__anchor--bigger { + font-size: 1em; + vertical-align: 1px; +} +.heading__text .heading__anchor:hover, +.heading__text .heading__anchor:focus, +.heading__text .heading__anchor--bigger:hover, +.heading__text .heading__anchor--bigger:focus { + color: #0089ec; + text-decoration: none; +} +/* ========================================================================== + $CODE-BLOCKS + ========================================================================== */ +pre, +code { + font-family: Monaco, Consolas, "Liberation Mono", monospace; + border: 1px solid #e9ebeb; + background: #f5f8f8; + color: #333333; + font-size: .9em; + padding: 0 .125em; + word-break: break-word; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +pre { + white-space: pre; + padding: 1em; + text-align: left; + overflow: auto; + -webkit-overflow-scrolling: touch; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + padding-top: 30px; + position: relative; +} +pre:before { + content: "Code"; + position: absolute; + top: 0; + left: 0; + font-family: Monaco, Consolas, "Liberation Mono", monospace; + font-weight: 500; + font-size: 10px; + line-height: 1; + background: #ffffff; + padding: 5px 6px 4px 6px; + color: #989a99; + border-right: 1px solid #ededed; + border-bottom: 1px solid #ededed; + -webkit-border-radius: 0 0 4px 0; + -moz-border-radius: 0 0 4px 0; + border-radius: 0 0 4px 0; +} +pre > code { + display: table; + line-height: 1.5; + border: 0; + background: none; + padding: 0 4.2em 0 0; +} +pre > code[data-language]:before { + content: attr(data-language); + position: absolute; + top: 2px; + left: 42px; + font-size: 10px; + opacity: .5; + -webkit-transition: all 0.1s; + -moz-transition: all 0.1s; + transition: all 0.1s; +} +pre:hover > code[data-language]:before { + opacity: 1; +} +a code { + text-decoration: underline; +} +/* ========================================================================== + $FORM-ELEMENTS + ========================================================================== */ +fieldset { + position: relative; + border: 0; + margin: 1em 0 1.5em; + padding: 0; +} +label:hover, +label:focus { + color: #0089ec; +} +/** + * Inputs and textareas + */ +input[type=text], +input[type=password], +input[type=email], +input[type=date], +input[type=number], +input[type=search], +textarea { + border: 3px solid #cccccc; + padding: .6em 1em; + font-weight: 200; + width: 100%; + -webkit-appearance: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +textarea { + min-height: 2em; +} +input[type=text]:focus, +input[type=password]:focus, +input[type=email]:focus, +input[type=date]:focus, +input[type=number]:focus, +input[type=search]:focus, +textarea:focus { + outline: none; + border-color: #0089ec; +} +/** + * Radios and checkboxes + */ +input[type=checkbox], +input[type=radio] { + margin-right: 5px; + vertical-align: 1px; +} +/** + * Select drop-downs and search + */ +select { + border: 1px solid #999999; + background: #ffffff; + padding: 3px 5px; + height: 29px; + white-space: nowrap; +} +input[type=search] { + padding-left: 0; + padding-right: 0; + -webkit-border-radius: 14px; + -moz-border-radius: 14px; + border-radius: 14px; +} +/** + * Groups of fields + */ +.pre--demo { + margin-bottom: 0; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.fieldset--demo { + margin-top: 0; + padding: 1em; + background: #f8faf9; + border: 1px solid #ededed; + border-top: 0; + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; + padding-top: 30px; + position: relative; +} +.fieldset--demo:before { + content: "Demo"; + position: absolute; + top: 0; + left: 0; + font-family: Monaco, Consolas, "Liberation Mono", monospace; + font-weight: 500; + font-size: 10px; + line-height: 1; + background: #ffffff; + padding: 5px 6px 4px 6px; + color: #989a99; + border-right: 1px solid #ededed; + border-bottom: 1px solid #ededed; + -webkit-border-radius: 0 0 4px 0; + -moz-border-radius: 0 0 4px 0; + border-radius: 0 0 4px 0; +} +.fieldset__wrapper { + position: relative; +} +.fieldset--demo .fieldset__button { + margin-bottom: 1em; + margin-right: 1em; +} +.fieldset--splash .fieldset__input { + font-size: 1.2em; + text-align: center; +} +.fieldset--splash .fieldset__input { + margin: 0 auto; + width: 80%; +} +@media (min-width: 33.75em) { + .fieldset--splash .fieldset__input { + width: 70%; + } +} +/* ========================================================================== + $BUTTONS + ========================================================================== */ +.button { + display: inline-block; + border: 2px solid #0089ec; + background: #0089ec; + color: #ffffff; + text-decoration: none; + padding: .67em 1.25em; +} +.button:hover, +.button:focus { + text-decoration: none; + background: #55cc22; + border-color: #55cc22; +} +.button--small { + padding: 0.5em 1em; + font-size: .8em; +} +/* ========================================================================== + $LISTS + ========================================================================== */ +.list--checked > li:before { + content: "✔"; + position: absolute; + right: 100%; + font-size: 80%; + top: .3333333333em; + margin-right: 8px; + color: #55cc22; +} +.list--checked > li { + list-style: none; + position: relative; +} +/* ========================================================================== + $MENUS + ========================================================================== */ +.menu__list { + margin: 0; + list-style: none; + padding: 0; +} +.menu__list--header:before, +.menu__list--header:after { + content: " "; + display: table; +} +.menu__list--header:after { + clear: both; +} +/** + * Menu links + */ +.menu__link { + text-decoration: none; +} +/* Dimmed links */ +.menu__link--dimmed { + color: #ababab; +} +/* Active or dimmed and hovered/focused links */ +.menu__link--active, +.menu__link--dimmed:hover, +.menu__link--dimmed:focus { + color: #000000; +} +/* Touch friendly links */ +.menu__item--touch .menu__link { + margin-right: -20px; + padding-right: 20px; + margin-left: -20px; + padding-left: 20px; +} +/** + * Menu items + */ +.menu__item--logo { + float: left; + margin-right: 1em; +} +.menu__item--logo .menu__link { + display: block; + padding-bottom: 0.5em; +} +.menu__item--toggle { + float: right; +} +@media (min-width: 46.25em) { + .menu__item--toggle { + display: none; + } +} +.menu__item--toggle .menu__link { + display: block; + padding-top: 1em; + padding-bottom: 1em; +} +.menu__item--clear:before, +.menu__item--clear:after { + content: " "; + display: table; +} +.menu__item--clear:after { + clear: both; +} +@media (min-width: 46.25em) { + .menu__item--clear { + display: none; + } +} +@media (min-width: 46.25em) { + .menu__item--responsive { + float: left; + margin-right: 1em; + } + .menu__item--responsive:last-child { + margin-right: 0; + } +} +/* Trailing items sit separately */ +@media (min-width: 46.25em) { + .menu__item--trail { + float: right; + } +} +/** + * Header menu + */ +.menu--header { + font-size: 1.25em; + font-weight: 500; +} +@media (min-width: 46.25em) { + .menu--header { + font-size: .8em; + } +} +/* Add a border to the block links */ +.menu__item--responsive .menu__link { + border-top: 1px solid #ededed; + text-align: center; + display: block; + min-height: 3em; + line-height: 3; +} +@media (min-width: 46.25em) { + .menu__item--responsive .menu__link { + border-top: 0; + padding-top: 1em; + } +} +/* Add some spacing after the last block item */ +.menu__item:last-child .menu__link { + margin-bottom: 2em; +} +@media (min-width: 46.25em) { + .menu__item:last-child .menu__link { + margin-bottom: 0; + } +} +/** + * Theme switcher + */ +.theme-toggle__label { + cursor: pointer; + padding: 2px 5px 3px; + background: #ffffff; + border: 1px solid #d9d9d9; + border-bottom-color: #bfbfbf; + margin-right: -1px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} +.theme-toggle__label--first { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.theme-toggle__label--last { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; + margin-right: 0; +} +.theme-toggle__input:checked + .theme-toggle__label { + position: relative; + z-index: 1; + background: #0089ec; + border-color: #0089ec; + color: #ffffff; +} +/* ========================================================================== + $GROUPS + ========================================================================== */ +.groupset { + margin: 1em 0; +} +.groupset--flat { + margin: 0; +} +.groupset__item { + display: inline-block; + vertical-align: top; +} +.groupset__item--spaced { + margin-right: 1em; + margin-bottom: 1em; +} +.groupset__item--spaced:last-child { + margin-right: 0; +} +/* ========================================================================== + $TABLES + ========================================================================== */ +.table { + width: 100%; + margin: 1em 0; + text-align: left; + font-size: .8em; + line-height: 1.4; + border-collapse: separate; +} +.table th { + background: #f5f7f7; + font-weight: 500; + min-width: 40px; +} +.table th, +.table td { + border-color: #e8ebeb; + border-style: solid; + border-width: 1px 0 0 1px; + padding: .5em 1em; + vertical-align: top; +} +.table th:last-child, +.table td:last-child { + border-right-width: 1px; +} +.table thead:last-child tr:last-child th, +.table tbody:last-child tr:last-child td { + border-bottom-width: 1px; +} +.table thead:first-child tr:first-child th:first-child { + -webkit-border-radius: 4px 0 0 0; + -moz-border-radius: 4px 0 0 0; + border-radius: 4px 0 0 0; +} +.table thead:first-child tr:first-child th:last-child { + -webkit-border-radius: 0 4px 0 0; + -moz-border-radius: 0 4px 0 0; + border-radius: 0 4px 0 0; +} +.table tbody:last-child tr:last-child td:first-child { + -webkit-border-radius: 0 0 0 4px; + -moz-border-radius: 0 0 0 4px; + border-radius: 0 0 0 4px; +} +.table tbody:last-child tr:last-child td:last-child { + -webkit-border-radius: 0 0 4px 0; + -moz-border-radius: 0 0 4px 0; + border-radius: 0 0 4px 0; +} +/* ======================================================================== + $SECTIONS + ======================================================================== */ +/** + * Sections of content + */ +.section { + padding: 0 20px; +} +.section--header { + background: url(../../images/bg.png) #fafbfb 50% 0; + border-bottom: 2px solid #e9ebeb; +} +.section--footer { + margin-bottom: 8em; +} +/** + * Section block holder + */ +/* Block scoped with a max-width */ +.section__block--scoped { + max-width: 760px; + margin: 0 auto; +} +/* Notification blocks */ +.section__block--notification, +.section__block--notification-green { + background: #ffffdd; + border: 1px solid #eeeec5; + padding: 5px 30px; + margin-top: 1em; + margin-bottom: 1em; + color: #444422; +} +.section__block--notification-green { + background: #ecffdd; + border-color: #cbe7b6; + color: #334422; +} +/* ========================================================================== + $TARGETS + ========================================================================== */ +@media (max-width: 46.25em) { + .page-target__toggle { + display: inline-block; + vertical-align: top; + width: 28px; + height: 4px; + border-bottom: 12px double; + border-top: 12px double; + } +} +@media (max-width: 46.25em) { + .page-target:target .page-target__toggle { + width: 4px; + height: 28px; + border-bottom: 0; + border-top: 0; + border-right: 12px double; + border-left: 12px double; + } +} +@media (max-width: 46.25em) { + .page-target__display--flip, + .page-target:target .page-target__display { + display: none !important; + } +} +@media (max-width: 46.25em) { + .page-target:target .page-target__display--flip { + display: inherit !important; + } +} +@media (max-width: 46.25em) { + .page-target__reveal { + max-height: 0; + overflow: hidden; + -webkit-transition: all linear 0.15s; + -moz-transition: all linear 0.15s; + transition: all linear 0.15s; + } +} +@media (min-width: 46.25em) { + .page-target .page-target__reveal { + max-height: 7em; + } +} +@media (max-width: 46.25em) { + .page-target:target .page-target__reveal { + max-height: 7em; + } +} +/* ========================================================================== + $RAINBOW + ========================================================================== */ +.string { + color: #68c244; +} +.selector, +.function, +.method { + color: #0069bc; +} +.comment, +.comment a { + color: #0089ec; + font-style: italic; +} +.comment a { + padding: 2px 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.comment a:hover { + background: #0089ec; + color: #ffffff; +} +.constant, +.null { + color: #d40; +} +.tag-name, +.attribute { + color: #c50; +} +.keyword { + color: #b90690; +} +.rainbow, +.operator { + color: #585856; +} +.class, +.pseudo { + color: #68c244; +} +.css-property { + color: #0089ec; +} +.css-value { + color: #0069bc; +} +/* ========================================================================== + $TEXT-HELPERS + ========================================================================== */ +.text-dimmed, +.text-dimmed a, +a.text-dimmed { + color: #bfbfbf; +} +.text-dimmed a, +a.text-dimmed { + text-decoration: underline; +} +.text-dimmed a:hover, +a.text-dimmed:hover { + color: #999999; +} +.text-center { + text-align: center; +} +.text-warning { + color: #ee2200; +} +.text-tiny { + font-size: 75%; +} +/** + * Special fonts + */ +@font-face { + font-family: Peace; + src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRk9UVE8AAAy4AAsAAAAAEdQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAABCAAACYcAAA0Dci9b/EZGVE0AAAqQAAAAGgAAABxnZ2V2R0RFRgAACqwAAAAdAAAAIAAxAARPUy8yAAAKzAAAAFAAAABg1rvjhWNtYXAAAAscAAAASAAAAVq562KIaGVhZAAAC2QAAAAwAAAANv4xBnloaGVhAAALlAAAAB4AAAAkB6//iGhtdHgAAAu0AAAAEAAAABAKMwE5bWF4cAAAC8QAAAAGAAAABgAEUABuYW1lAAALzAAAAN8AAAGGT93z63Bvc3QAAAysAAAADAAAACAAAwAAeJxNVntY1VUWPffpD7jClcflIaCifWgaMJjiOEyg4nyaaISMIR8ZJhkaimNopPhGRa+ao6ZEWtqDnMbM+EwRSdC0FAUfYw6SjomgKO/n7773rH3Rvv7ZrMvvPPZeZ+11jkKo1UKhUEgL5mUtyspaLBRKoRAjTUFKU7DK5Kc26lRGndpoHWDJNZMmUGR6BAqhDxTvDggUukCd7CnUPEESHsIggpYtXhAZFTEJf/4WERHxdMlnKwuh2CxeVeT3zVDqQnWLdTnupLzaFEfK4PzjPsZ+RN1UQXTbK5uo7fUlRFUBB4ken04nOhueSiLoHxlEltRWEt6lgURdWb+RcHt0jKh5WSyjTKBsBwmtIp/ofniAkeiXxqWIR/L8iR55thOd/uooUfXoEqLK28l/RBVJZUQNmVVExRkRmHJ/nidiXXIiCc2HsUQPYlZji6BwieF4wMAWLDl1BQkPXrxpch0JryYFUWO8RMLnEbZpjakg4Tt0L8oafYKE36JdQM89AHrjDOrw/5WEv/quEXGHD2LgB/c49a0kDPqHJHRBnVj701wgfTrQP5uwQYiOhOuhKSQCnsN+mmMPiazuBcimYA+R7c0bJFwupBHZT7qS6Nc5SvodhhE56jBZO2obtlJPy0N0b67GJ9AvPGKwjUfH17wNh3o/Rs0Y8h8Thlw8TqL/9QxM0dTsQdRGVWO5lgSgfTpsURsItCWH0RwM34ZtbfOfkJB2zEJ+Hp8QPTyLsqbMsRC1/MtGIuqWGlRsTCMRmpIqMQxmiMwtE3eSGPj8Wmd6VxC9DxzDtpM8SegTI1D8xnoQEhLPqI4RanKfdhH7DxhOwnNQLqYE/3YeMTSomKjULY9E+Ns4+OzIJUgIKqJGMRHDJ2OzlnysqJ7hDSkpruDUPGKx0MgnFRrMSYHetqagnOE/JpGY/OI4EiHjA7Gu/nIcYv/0/Uh2Ak7C1S0OBay/Burt3YxuIl/dNqL2LzGcmk/dQexI1mN4zk1IbMxaop7+CSzzEpSeOfpFohXl0T5GrPrS9cP46F+LBAxxd0hEf32OxIA0ZBXpkoNqV6GG0A17gLL2M6rpK0T4xaVitov6DkcQTPZ7kF6/5cjMWosm0czJYQTqNAlfMMnbSCi/BRemEj2y6/0ynePWaPwjCgfaOxf9076yHmhmCaNGZDXHBL0brqDCVPTZ3e8OI/llJzYRvXfbwL0rNF0YQd9AFS6nCoGGBYCm7TuhlBNxGFuZjx4o7MjQEHUO0SL7DBTeM+kW5H8yHhvPz0BZ3jmM5jPKJZJ/xLFr9chDHiyQodmlFNHyOg7WnoCcrOWr8fOHUUDFCBauiCsn06+NGCgb8hHbK84jtx/QAA2b29EpeyG92omQjVv+UqAJV8DwzOWwgrUC3RqMpM5d/gliUMg7SKgKkJ/yOqSl3I30VQfC8GEdslfthwsp1mJptcNCQlQ4NfWZkefFI6paa0DBpXFMywmmZSeWjFoMXmZuv+mkS2qB0qURUaAr5SAOa7oH0M+ZWGYWMuxYhZ4TX9wBWVNLeKefIFIpG3m8EsAIwlXOwBZdB7qxWdJ49hh8Vc9O5tMey+e1HD8vosSeV5G+OjYPKKEBKPIYIziMKnsF0Ao0r/L7c0DfhSIh72ikYXsHiItzGbyBM4WkpeG9OMSAYbDK8oZDzgoE94yyEkpTzAWLyoVrEDToZIVtIfaBf5Bl4VkUlHYeh3ELKpaij/CZo6F8dkMsdRMuw9OsRSg3DCbmOS+JzWWcno1mDxxJ0boP6zyA3lVmX0Y1jAzYZQ2+qkNmOK1sI8d2yNp29RNsMfYShPIpqnAzKiWGuU6IDKawjbn9DKrqU+AaqyHtrpdK0dHV3swXjlE3DR0jF7KJnR76R2SOhThUTRtRUUMdRNV9qxKx5wzUYr7wGXcQ7KTLOAlo3zVGGGlN7ERhU20Y2Ga4hNiZ2oJFZhugyepZKLQct0BbrACJ2mJcdm0x5X0KoLZhyE9XXcMTN4MhXELUUP4X9LkGezVdG4LLopgXbxv4DN2HEw0qxW1pkrfDqc4iPRHTxq4wJg9G4tf/FThbKOwjIqCO0RFGB/kcoK7ol9dg4JTMKkRDMHrBEc9dsf95cFrUCNL8C9jSiw4zfxfBwSYgF+iDTMnsdj3rWaZl4HkcrriGxFFwRV/QULMM7is9Rk/XvN3MCHq7VQSkXr+D6GbXCZDSZQ/jVuWb3aHCVWlVTMFW3mWMtIzgA/a1EK/ZyWTvGjg8Pb5Q/4ygelTnjyagXtVeiWGxE5IYkR3Na1SS+PPLFUbJ+WZA46q/SeD2xALkGI/jVf4PMrCt3/k7gpErHgNZKuG9Cv0w7KxJ6/NMshyCMXbD9cncWosLfhguAXP08Gco7CPwkH6Hc7UiiwLIyvzaVZxYFcjoYNRWhgZoLbyPuk/54UMT1Nj1b1DadBclmB8k4cJwlKDC1gELJNaZ4z0kVohz7bysBNNjUFP7llJGsYxwKSgPZzMtqzHaNjuZJ3E15LBDUtZVS2C3HXgHCAFdUPeMWhxDxQQQPg/Gpl/5FlB6AKN0tlO0ikHlBX4G5rZgjjrbgTeZfSpfKJ+jGPtbIMLB9uQ8EZLgLvalnYy+B+LmprwUJGBK5DRMuxDtQ6BMEeUK9BqoFVve71tRiJVFzjFsnkjIdjy3L0khuh1cymygM8udRQHBusnGbzux4iAjiE3g7iD7mHVGVk4SF96VdQ9VTB7c5zFoyoN8CWx+2pSydBwMwJLJakSbd7a4Y0rTXC1HlomrLw7oybE3oZRpkxiFMIp7ag1ed8PBi9cqjqqCX7D9G3gFqsbBnMTtQqcPgrH3TXw51+10+qPuLITSE4AedcXzgSy7TzofR+xum55wDIBXKjfiQajehZbRhGb2uabQ+EPUylkwTM3mozywZx0bI+RKVhyUcIcvUa+Mh52huYqRjhHL5dJYIDa2zo+LuJeBekcq+Xzn82WOK0wH6qg3F/0vLbohPYNpAvyo8aZQ/xX9I6+J5tvWFxcZOhwvS+tHEKv8VSvCdLxc5MORCDFn+E3BFP/XlQcu9ubYH4ag9kWvdKOH8eBCpu1R8Yxwb7WPgGBdO6GYtsgw55sSSh8Fr3HHc5GaN3jhfx+HPPXHPvpCj0ruJtk0V77v86f08KHhs253ycqym02PyyJfCLaF2P7uI2vlvdu13ybeeLfKKMkvXJd95UHyyGhZb40aNNU4fek7CdKW61ahdTeaSe3IteT2c7fkeht9rJKxn1Hn+n95VHbFAHicY2BgYGQAgjO2i86D6LNTHgbDaABQgQemAAB4nGNgZGBg4ANiCQYQYGJgBEJmIGYB8xgABGsANgAAAHicY2BmVmWcwMDKwMHUxbSHgYGhB0IzPmAwZGRiYGBiYGVmgAFGAYYGOCcgzTWFwYGh4AMDc/b/ZoYo5myGWqAsI0iOKQ5IKAAhIwBpegzweJxjYGBgZoBgGQZGBhAIAfIYwXwWBgsgzcXAwcAEhAwMBeo8Hxj+/wergrP/T7rxVYAZqhcKGNkYUAXoAJjobB8hAAAMVQuIeJxjYGRgYADiI3WRpvH8Nl8ZuJlfAEUYzk55GIyg/zczv2DOBnI5GJhAogBc2wx3eJxjYGRgYM7+38wQxfyCgeGPBJAEiqAAFgCD8gU7AAAD6AAAA+gA+gJjAD8AAAAAAABQAAAEAAB4nHWOQWoCQRBF3+hoCAnBVciyIZtsZpieuBAPMAfIwr1IMwyoDa1CTuLKI2SZY+QAOUKO4XesTRY2FP3q96/6DTxyJONyMu6YGA/Eb8ZDXvk0zqV/GY944Md4LP1Pziy/l/LUT114IH4xHtJQGefST8Yjnvk2Hkv/pWNFZKOKbKFbxU2Mgg8CLQfWLElqQ3tYLwVN79v3d5Ij4KgpleaYq/7vu2qeGQVTVS2f511r4nbfxNQGV5eVmzvLFflZMS3qyst0628LpSZ2er9m+D6fRUi7Tjt8Wd2cPQMEZjnbAHicY2BmwAsAAH0ABA==) format('woff'), url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAANAIAAAwBQRkZUTWdnZXYAAAeYAAAAHEdERUYAMwAGAAAHeAAAACBPUy8y1pnhBgAAAVgAAABWY21hcLntZZEAAAHIAAABWmdhc3D//wADAAAHcAAAAAhnbHlmfzYpgAAAAzQAAAJ0aGVhZP4xBnkAAADcAAAANmhoZWEHr/+KAAABFAAAACRobXR4C4ABOQAAAbAAAAAYbG9jYQI2ASwAAAMkAAAADm1heHAATgC5AAABOAAAACBuYW1lT93z6wAABagAAAGGcG9zdD9Th6YAAAcwAAAAPgABAAAAAQAAe86y9F8PPPUACwPoAAAAAM2U4VMAAAAAzZThUwAA/4MD6ANrAAAACAACAAAAAAAAAAEAAANr/4MAWgPoAAD8GAPoAAEAAAAAAAAAAAAAAAAAAAAGAAEAAAAGALYABgAAAAAAAgAAAAEAAQAAAEAAAAAAAAAAAQMlAZAABQAIAooCvAAAAIwCigK8AAAB4AAxAQIAAAIABQMAAAAAAAAAAAABEACAAAAAAAAAAAAAUGZFZABAAHDwAANr/4MAWgNrAH2AAAABAAAAAAAAA+gAAAAAAAABTQAAA+gA+gJjAD8AAAAAAAAAAwAAAAMAAAAcAAEAAAAAAFQAAwABAAAAHAAEADgAAAAKAAgAAgACAAAAcCcM8AD//wAAAAAAcCcM8AD//wAA/5TY9xAFAAEAAAAAAAAAAAAAAAABBgAAAQAAAAAAAAABAgAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/AEsAToAAAAGAPr/5wLuArwALAA4AEoAVgCjALUAAAA2NTQmIyIPASYnJiMiBhUUFxYXJicmIyIGFRQWFw4BFRQWFx4BMzI2NTQmLwE3PgEzMhYVFAcGByciIyIGByYnJjU0NjMyFh8BJhcGByYnJicWFxYXBgcGFRQWMzI2NTQmJx4BMzI2NxUUFhc3NTQmNTQ2Nz4BNy4BKwEiJjU0NjMyFxYXHgEVFAYjIiYnLgE1NDYzMhYXFhcWFRQGIyInJicGFiYnLgE1NDYzMhYXHgEVFAYjAr8hHhkzRw8GDUcvGx8RESYNCgoIFTAHByckIyQfVi51lSQsYjIRHQ4LDRMTIZcKAgoKAyMREg0LDRcUNhYwDQwEBwYIEhMUFQ70AUAfFBwCAQUHBQUHBBoWAQ8lHg42CAEJBxVWTRASQDw7FAwKgWA1Vh0TFBwRBxoTEAoKDwkcIA0HA4wmFhQZGQsMHQ8UGw4IAeR1Fh0izywQJ9IkHxc7O2wHAwQvFgcYEQkuKydJIR4hn34/OgkTkTMvEA8NOztcFAQGXDk4Fw4QJTubAqwMDxAQEBAHAwQBCU0EBR48GhMDCwUBAgMEBSkxAgUDBS8QGz0WChQICwoeIQ8LDQ0RCSghbJErJxkzFBolFxoVEhEHBwwtEAgDByAeGjAMCxoZGSFFCQkPAAACAD//jAI/Al4ACwAdAAABNCYjIgYVFBYzMjYBETMVMzYzMhYVFAYjIiYnIxEBzUxDRktOQ0hH/nJsAi5ydX1zbDVeGgIBTUtsYlVQZmr+iwLERlSbeHGdKCn+/gAAAAABAAD/gwPoA2sAAgAAEQEhA+j8GANr/BgAAAAAAAAMAJYAAQAAAAAAAQAHABAAAQAAAAAAAgAHACgAAQAAAAAAAwAjAHgAAQAAAAAABAAHAKwAAQAAAAAABQALAMwAAQAAAAAABgAHAOgAAwABBAkAAQAOAAAAAwABBAkAAgAOABgAAwABBAkAAwBGADAAAwABBAkABAAOAJwAAwABBAkABQAWALQAAwABBAkABgAOANgAaQBjAG8AbQBvAG8AbgAAaWNvbW9vbgAAUgBlAGcAdQBsAGEAcgAAUmVndWxhcgAARgBvAG4AdABGAG8AcgBnAGUAIAAyAC4AMAAgADoAIABpAGMAbwBtAG8AbwBuACAAOgAgADEAOAAtADQALQAyADAAMQAzAABGb250Rm9yZ2UgMi4wIDogaWNvbW9vbiA6IDE4LTQtMjAxMwAAaQBjAG8AbQBvAG8AbgAAaWNvbW9vbgAAVgBlAHIAcwBpAG8AbgAgADEALgAwAABWZXJzaW9uIDEuMAAAaQBjAG8AbQBvAG8AbgAAaWNvbW9vbgAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAABAAIBAgBTAQMHdW5pMjcwQwd1bmlGMDAwAAAAAAAB//8AAgABAAAADgAAABgAAAAAAAIAAQADAAUAAQAEAAAAAgAAAAAAAQAAAADMPaLPAAAAAM2U4VMAAAAAzZThUw==) format('truetype'); + font-weight: normal; + font-style: normal; +} +.peace { + font-family: Peace, "Zapf Dingbats", dingbats; + speak: none; + line-height: .8; + vertical-align: -6px; + font-size: 1.4em; +} +.ampersand { + font-family: Baskerville, "Goudy Old Style", Palatino, "Book Antiqua", serif; + font-style: italic; +} +/** + * Logo stuff + */ +.logocon { + font-size: 60px; + display: inline-block; + line-height: 1; + height: .95em; + position: relative; + overflow: hidden; +} +.logocon__p, +.menu__link--dimmed:hover .logocon__p, +.menu__link--dimmed:focus .logocon__p { + font-family: Peace; + color: #000000; + display: inline; +} +.logocon__u, +.menu__link--dimmed:hover .logocon__u, +.menu__link--dimmed:focus .logocon__u { + position: absolute; + bottom: 0; + right: .05em; + background: #0089ec; + height: .09em; + left: .25em; +} +.menu__link--dimmed .logocon__p, +.menu__link--dimmed .logocon__u { + -webkit-transition: all linear 0.15s; + -moz-transition: all linear 0.15s; + transition: all linear 0.15s; +} +.menu__link--dimmed .logocon__p { + color: #bfbfbf; +} +.menu__link--dimmed .logocon__u { + background: #bfbfbf; +} +/* ========================================================================== + $DEMOS + ========================================================================== */ +#date_demo__translations_rtl + .picker { + direction: rtl; +} +#date_demo__translations_rtl + .picker .picker__nav--next { + right: auto; + left: -1em; +} +#date_demo__translations_rtl + .picker .picker__nav--prev { + left: auto; + right: -1em; +} +#date_demo__translations_rtl + .picker .picker__nav--next:before { + border-left: 0; + border-right: .75em solid #000; +} +#date_demo__translations_rtl + .picker .picker__nav--prev:before { + border-right: 0; + border-left: .75em solid #000; +} diff --git a/js/pickadate.js-3.5.3/demo/styles/less/_normalize.less b/js/pickadate.js-3.5.3/demo/styles/less/_normalize.less new file mode 100644 index 0000000..68e79f2 --- /dev/null +++ b/js/pickadate.js-3.5.3/demo/styles/less/_normalize.less @@ -0,0 +1,402 @@ +/*! normalize.css v2.1.1 | MIT License | git.io/normalize */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined in IE 8/9. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/** + * Correct `inline-block` display not defined in IE 8/9. + */ + +audio, +canvas, +video { + display: inline-block; +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +[hidden] { + display: none; +} + +/* ========================================================================== + Base + ========================================================================== */ + +/** + * 1. Prevent system color scheme's background color being used in Firefox, IE, + * and Opera. + * 2. Prevent system color scheme's text color being used in Firefox, IE, and + * Opera. + * 3. Set default font family to sans-serif. + * 4. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + background: #fff; /* 1 */ + color: #000; /* 2 */ + font-family: sans-serif; /* 3 */ + -ms-text-size-adjust: 100%; /* 4 */ + -webkit-text-size-adjust: 100%; /* 4 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/** + * Address `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Correct font family set oddly in Safari 5 and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} + +/** + * Improve readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre-wrap; +} + +/** + * Set consistent quote types. + */ + +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ========================================================================== + Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9. + */ + +img { + border: 0; +} + +/** + * Correct overflow displayed oddly in IE 9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* ========================================================================== + Figures + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari 5. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * 1. Correct font family not being inherited in all browsers. + * 2. Correct font size not being inherited in all browsers. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ + +button, +input, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +button, +input { + line-height: normal; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. + * Correct `select` style inheritance in Firefox 4+ and Opera. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * 1. Address box sizing set to `content-box` in IE 8/9. + * 2. Remove excess padding in IE 8/9. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * 1. Remove default vertical scrollbar in IE 8/9. + * 2. Improve readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/demo/styles/less/_variables.less b/js/pickadate.js-3.5.3/demo/styles/less/_variables.less new file mode 100644 index 0000000..86b9840 --- /dev/null +++ b/js/pickadate.js-3.5.3/demo/styles/less/_variables.less @@ -0,0 +1,144 @@ + +/* ========================================================================== + $VARIABLES + ========================================================================== */ + +/** + * Font families + */ +@code-family: Monaco, Consolas, "Liberation Mono", monospace; + +/** + * Colors + */ +@blue: #0089ec; + +@red: #e20; + +@black: #000; +@white: #fff; + +@green: #5c2; +@green-darker: #342; +@green-faded: #ecffdd; +@green-faded-darker: darken( desaturate( @green-faded, 50% ), 12.5% ); /* #cbe7b6 */ + +@dark-brown: #442; + +@grey: #ccc; +@grey-lighter: lighten( @grey, 5% ); /* #d9d9d9 */ +@grey-lightest: lighten( @grey-lighter, 8% ); /* #ededed */ +@grey-darker: darken( @grey, 5% ); /* #bfbfbf */ +@grey-darkest: darken( @grey-darker, 8% ); /* #ababab */ + +@medium-grey: #999; + +@dark-grey: #333; + +@yellow-faded: #ffd; +@yellow-faded-darker: darken( desaturate( @yellow-faded, 45% ), 8% ); /* #eeeec5 */ + + +/** + * Widths + */ +@breakpoint-tiny: 18.75em; /* 300px */ +@breakpoint-small: 33.75em; /* 540px */ +@breakpoint-medium: 46.25em; /* 740px */ +// @breakpoint-large: 72em; /* 1152px */ +// @breakpoint-huge: 80em; /* 1280px */ + +@gutter: 20px; + + +/** + * Transitions + */ +@smooth-fast: all linear .15s; + + + + + +/* ========================================================================== + $MIXINS + ========================================================================== */ + +/** + * Lists + */ +.list-item-inline { + display: inline-block; + margin-right: 1em; +} + + +/** + * Demo tags + */ +.demo-tag ( @tag-text ) { + padding-top: 30px; + position: relative; + + &:before { + content: @tag-text; + position: absolute; + top: 0; + left: 0; + font-family: @code-family; + font-weight: 500; + font-size: 10px; + line-height: 1; + background: @white; + padding: 5px 6px 4px 6px; + color: #989a99; + border-right: 1px solid @grey-lightest; + border-bottom: 1px solid @grey-lightest; + .border-radius( 0 0 4px 0 ); + } +} + + + +/** + * Clear fix + */ +.clearfix { + &:before, + &:after { + content: " "; + display: table; + } + &:after { + clear: both; + } +} + + + +/** + * Vendor prefixes + */ +.box-shadow ( @rest... ) { + -webkit-box-shadow: @rest; + -moz-box-shadow: @rest; + box-shadow: @rest; +} +.box-sizing ( @rest... ) { + -webkit-box-sizing: @rest; + -moz-box-sizing: @rest; + box-sizing: @rest; +} +.border-radius ( @rest... ) { + -webkit-border-radius: @rest; + -moz-border-radius: @rest; + border-radius: @rest; +} +.transition ( @rest... ) { + -webkit-transition: @rest; + -moz-transition: @rest; + transition: @rest; +} + + + diff --git a/js/pickadate.js-3.5.3/demo/styles/less/base.less b/js/pickadate.js-3.5.3/demo/styles/less/base.less new file mode 100644 index 0000000..effdefe --- /dev/null +++ b/js/pickadate.js-3.5.3/demo/styles/less/base.less @@ -0,0 +1,1076 @@ + +/* ========================================================================== + $CONTENTS + ========================================================================== */ + +/** + * VARIABLES.................. + * MIXINS..................... + * IMPORTS.................... + * BASE.......................Base stylings + * TYPOGRAPHY................. + * CODE-BLOCKS................ + * FORM-ELEMENTS.............. + * BUTTONS.................... + * LISTS...................... + * MENUS...................... + * GROUPS.....................Group sets of content + * TABLES..................... + * SECTIONS...................Blocks of content + * TARGETS....................Page focus targets + * RAINBOW....................Syntax highlighting + * TEXT-HELPERS............... + * DEMOS...................... + */ + + + +/* ========================================================================== + $IMPORTS + ========================================================================== */ + +@import "_variables.less"; +@import "_normalize.less"; + + + + + + + +/* ========================================================================== + $BASE + ========================================================================== */ + +hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid @grey; + margin: 1em 0; + padding: 0; +} + +img { + max-width: 100%; + height: auto; + vertical-align: middle; +} + + +/** + * Links + */ + +a { + text-decoration: underline; + cursor: pointer; + color: @blue; + + .transition( @smooth-fast ); +} +a:focus { + outline: 2px dotted; +} +p > a, +.heading__text > a { + text-decoration: none; +} +p > a:hover, +p > a:focus, +.heading__text > a:hover, +.heading__text > a:focus { + text-decoration: underline; +} + + + + + +/* ========================================================================== + $TYPOGRAPHY + ========================================================================== */ + +body { + font-family: "Helvetica Neue", sans-serif; + font-weight: 200; + font-size: 16px; + line-height: 1.6; + + @media ( min-width: @breakpoint-medium ) { + font-size: 20px; + } +} + + +h1, h2, h3, h4, h5, h6, +.heading { + line-height: 1.4; + font-weight: 400; +} + +h1, h2, +.heading--one, +.heading--two { + letter-spacing: -1px; +} + +h1, +.heading--one { + font-size: 2em; + + @media ( min-width: @breakpoint-tiny ) { + font-size: 2.125em; + } + + @media ( min-width: @breakpoint-small ) { + font-size: 2.4em; + } +} + +h2, +.heading--two { + font-size: 1.5em; + + @media ( min-width: @breakpoint-small ) { + font-size: 1.8em; + } +} + +h3, +.heading--three { + font-size: 1.2em; +} + + +.heading--thin { + font-weight: 200; +} + +.heading--splash { + width: 88%; + margin-left: auto; + margin-right: auto; + margin-top: .5em; + + @media ( min-width: @breakpoint-medium ) { + margin-top: 1em; + } +} + + + + +/** + * Divider headings + */ +.heading--divide, +.heading--divide-center, +.heading--divide-first { + text-transform: lowercase; + margin-top: 2.5em; + border-top: 1px solid @grey-lighter; + padding-top: 1.5em; + + @media ( min-width: @breakpoint-small ) { + position: relative; + padding-top: 0; + border-top: 0; + } + + code { + text-transform: initial; + } +} +.heading--divide-center { + text-align: center; +} +.heading--divide-first { + padding-top: 0; + border-top: 0; + margin-top: 1em; +} + +.heading--divide:after, +.heading--divide-center:after, +.heading--divide-first:after { + @media ( min-width: @breakpoint-small ) { + content: " "; + border-bottom: 1px solid @grey-lighter; + height: 0; + position: absolute; + bottom: .5em; + z-index: -1; + right: 0; + left: 0; + display: block; + } +} + +.heading--divide .heading__text, +.heading--divide-center .heading__text, +.heading--divide-first .heading__text { + @media ( min-width: @breakpoint-small ) { + background: @white; + display: inline-block; + padding-right: .5em; + } +} +.heading--divide-center .heading__text { + @media ( min-width: @breakpoint-small ) { + padding-left: .5em; + } +} + + + +/** + * Anchor for a heading + */ +.heading__anchor, +.heading__anchor--bigger { + color: @grey-darker; + font-weight: 100; + text-decoration: none; + margin-left: .5em; + font-style: italic; + font-size: .75em; + vertical-align: 3px; +} +.heading__anchor--bigger { + font-size: 1em; + vertical-align: 1px; +} +.heading__text .heading__anchor:hover, +.heading__text .heading__anchor:focus, +.heading__text .heading__anchor--bigger:hover, +.heading__text .heading__anchor--bigger:focus { + color: @blue; + text-decoration: none; +} + + + + + + + +/* ========================================================================== + $CODE-BLOCKS + ========================================================================== */ + +pre, +code { + font-family: @code-family; + border: 1px solid #e9ebeb; + background: #f5f8f8; + color: @dark-grey; + font-size: .9em; + padding: 0 .125em; + word-break: break-word; + .border-radius( 3px ); +} + +pre { + white-space: pre; + padding: 1em; + text-align: left; + overflow: auto; + -webkit-overflow-scrolling: touch; + .border-radius( 4px ); + .demo-tag( "Code" ); +} + +pre > code { + display: table; + line-height: 1.5; + border: 0; + background: none; + padding: 0 4.2em 0 0; +} + +pre > code[data-language]:before { + content: attr(data-language); + position: absolute; + top: 2px; + left: 42px; + font-size: 10px; + opacity: .5; + @transition: all .1s; + .transition( @transition ); +} +pre:hover > code[data-language]:before { + opacity: 1; +} + +a code { + text-decoration: underline; +} + + + + + + + +/* ========================================================================== + $FORM-ELEMENTS + ========================================================================== */ + +fieldset { + position: relative; + border: 0; + margin: 1em 0 1.5em; + padding: 0; +} + +label:hover, +label:focus { + color: @blue; +} + + +/** + * Inputs and textareas + */ + +input[type=text], +input[type=password], +input[type=email], +input[type=date], +input[type=number], +input[type=search], +textarea { + border: 3px solid @grey; + padding: .6em 1em; + font-weight: 200; + width: 100%; + -webkit-appearance: none; + + .box-shadow( none ); + .box-sizing( border-box ); +} + +textarea { + min-height: 2em; +} + +input[type=text]:focus, +input[type=password]:focus, +input[type=email]:focus, +input[type=date]:focus, +input[type=number]:focus, +input[type=search]:focus, +textarea:focus { + outline: none; + border-color: @blue; +} + + +/** + * Radios and checkboxes + */ + +input[type=checkbox], +input[type=radio] { + margin-right: 5px; + vertical-align: 1px; +} + + +/** + * Select drop-downs and search + */ + +select { + border: 1px solid @medium-grey; + background: @white; + padding: 3px 5px; + height: 29px; + white-space: nowrap; +} + +input[type=search] { + padding-left: 0; + padding-right: 0; + + .border-radius( 14px ); +} + + + + +/** + * Groups of fields + */ +.pre--demo { + margin-bottom: 0; + .border-radius( 4px 4px 0 0 ); +} +.fieldset--demo { + margin-top: 0; + padding: 1em; + background: #f8faf9; + border: 1px solid @grey-lightest; + border-top: 0; + .border-radius( 0 0 4px 4px ); + .demo-tag( "Demo" ); +} + +.fieldset__wrapper { + position: relative; +} + +.fieldset--demo .fieldset__button { + margin-bottom: 1em; + margin-right: 1em; +} + +.fieldset--splash .fieldset__input { + font-size: 1.2em; + text-align: center; +} +.fieldset--splash .fieldset__input { + margin: 0 auto; + width: 80%; + @media ( min-width: @breakpoint-small ) { + width: 70%; + } +} + + + + + + +/* ========================================================================== + $BUTTONS + ========================================================================== */ + +.button { + display: inline-block; + border: 2px solid @blue; + background: @blue; + color: @white; + text-decoration: none; + padding: .67em 1.25em; +} + +.button:hover, +.button:focus { + text-decoration: none; + background: @green; + border-color: @green; +} + +.button--small { + padding: 0.5em 1em; + font-size: .8em; +} + + + + + +/* ========================================================================== + $LISTS + ========================================================================== */ +.list {} +.list--checked {} + + .list--checked > li:before { + content: "✔"; + position: absolute; + right: 100%; + font-size: 80%; + top: .3333333333em; + margin-right: 8px; + color: @green; + } + .list--checked > li { + list-style: none; + position: relative; + } + + + + + +/* ========================================================================== + $MENUS + ========================================================================== */ + +.menu { + +} + +.menu__list { + margin: 0; + list-style: none; + padding: 0; +} + +.menu__list--header { + .clearfix; +} + + +/** + * Menu links + */ +.menu__link { + text-decoration: none; +} + +/* Dimmed links */ +.menu__link--dimmed { + color: @grey-darkest; +} + +/* Active or dimmed and hovered/focused links */ +.menu__link--active, +.menu__link--dimmed:hover, +.menu__link--dimmed:focus { + color: @black; +} + +/* Touch friendly links */ +.menu__item--touch .menu__link { + margin-right: -@gutter; + padding-right: @gutter; + margin-left: -@gutter; + padding-left: @gutter; +} + + +/** + * Menu items + */ + +.menu__item--logo { + float: left; + margin-right: 1em; + + .menu__link { + display: block; + padding-bottom: 0.5em; + } +} + +.menu__item--toggle { + float: right; + + @media ( min-width: @breakpoint-medium ) { + display: none; + } + + .menu__link { + display: block; + padding-top: 1em; + padding-bottom: 1em; + } +} + +.menu__item--clear { + .clearfix; + @media ( min-width: @breakpoint-medium ) { + display: none; + } +} + +.menu__item--responsive { + + @media ( min-width: @breakpoint-medium ) { + float: left; + margin-right: 1em; + &:last-child { + margin-right: 0; + } + } +} + +/* Trailing items sit separately */ +.menu__item--trail { + @media ( min-width: @breakpoint-medium ) { + float: right; + } +} + + +/** + * Header menu + */ +.menu--header { + font-size: 1.25em; + font-weight: 500; + + @media ( min-width: @breakpoint-medium ) { + font-size: .8em; + } +} + + + +/* Add a border to the block links */ +.menu__item--responsive .menu__link { + border-top: 1px solid @grey-lightest; + text-align: center; + display: block; + min-height: 3em; + line-height: 3; + + @media ( min-width: @breakpoint-medium ) { + border-top: 0; + padding-top: 1em; + } +} + + +/* Add some spacing after the last block item */ +.menu__item:last-child .menu__link { + margin-bottom: 2em; + + @media ( min-width: @breakpoint-medium ) { + margin-bottom: 0; + } +} + + + +/** + * Theme switcher + */ +.theme-toggle__label { + cursor: pointer; + padding: 2px 5px 3px; + background: @white; + border: 1px solid @grey-lighter; + border-bottom-color: @grey-darker; + margin-right: -1px; + .box-shadow( 0 1px 2px rgba(0,0,0,.05) ); +} +.theme-toggle__label--first { + .border-radius( 4px 0 0 4px ); +} +.theme-toggle__label--last { + .border-radius( 0 4px 4px 0 ); + margin-right: 0; +} +.theme-toggle__input:checked + .theme-toggle__label { + position: relative; + z-index: 1; + background: @blue; + border-color: @blue; + color: @white; +} + + + + + + + + +/* ========================================================================== + $GROUPS + ========================================================================== */ + +.groupset { + margin: 1em 0; +} +.groupset--flat { + margin: 0; +} +.groupset__item { + display: inline-block; + vertical-align: top; +} +.groupset__item--spaced { + margin-right: 1em; + margin-bottom: 1em; +} +.groupset__item--spaced:last-child { + margin-right: 0; +} + + + + + + + + +/* ========================================================================== + $TABLES + ========================================================================== */ + +.table { + width: 100%; + margin: 1em 0; + text-align: left; + font-size: .8em; + line-height: 1.4; + border-collapse: separate; +} + +.table th { + background: #f5f7f7; + font-weight: 500; + min-width: 40px; +} + +.table th, +.table td { + border-color: #e8ebeb; + border-style: solid; + border-width: 1px 0 0 1px; + padding: .5em 1em; + vertical-align: top; +} +.table th:last-child, +.table td:last-child { + border-right-width: 1px; +} +.table thead:last-child tr:last-child th, +.table tbody:last-child tr:last-child td { + border-bottom-width: 1px; +} + +.table thead:first-child tr:first-child th:first-child { + .border-radius( 4px 0 0 0 ); +} +.table thead:first-child tr:first-child th:last-child { + .border-radius( 0 4px 0 0 ); +} + +.table tbody:last-child tr:last-child td:first-child { + .border-radius( 0 0 0 4px ); +} +.table tbody:last-child tr:last-child td:last-child { + .border-radius( 0 0 4px 0 ); +} + + + + + + +/* ======================================================================== + $SECTIONS + ======================================================================== */ + +/** + * Sections of content + */ +.section { + padding: 0 @gutter; +} +.section--header { + background: url(../../images/bg.png) #fafbfb 50% 0; + border-bottom: 2px solid #e9ebeb; +} +.section--footer { + margin-bottom: 8em; +} + + +/** + * Section block holder + */ +.section__block { +} + +/* Block scoped with a max-width */ +.section__block--scoped { + max-width: 760px; + margin: 0 auto; +} + +/* Notification blocks */ +.section__block--notification, +.section__block--notification-green { + background: @yellow-faded; + border: 1px solid @yellow-faded-darker; + padding: 5px 30px; + margin-top: 1em; + margin-bottom: 1em; + color: @dark-brown; +} +.section__block--notification-green { + background: @green-faded; + border-color: @green-faded-darker; + color: @green-darker; +} + + + + + +/* ========================================================================== + $TARGETS + ========================================================================== */ + +.page-target__toggle { + @media ( max-width: @breakpoint-medium ) { + display: inline-block; + vertical-align: top; + width: 28px; + height: 4px; + border-bottom: 12px double; + border-top: 12px double; + } +} +.page-target:target .page-target__toggle { + @media ( max-width: @breakpoint-medium ) { + width: 4px; + height: 28px; + border-bottom: 0; + border-top: 0; + border-right: 12px double; + border-left: 12px double; + } +} + +.page-target__display--flip, +.page-target:target .page-target__display { + @media ( max-width: @breakpoint-medium ) { + display: none !important; + } +} +.page-target:target .page-target__display--flip { + @media ( max-width: @breakpoint-medium ) { + display: inherit !important; + } +} +.page-target__reveal { + @media ( max-width: @breakpoint-medium ) { + max-height: 0; + overflow: hidden; + .transition( @smooth-fast ); + } +} +.page-target .page-target__reveal { + @media ( min-width: @breakpoint-medium ) { + max-height: 7em; + } +} +.page-target:target .page-target__reveal { + @media ( max-width: @breakpoint-medium ) { + max-height: 7em; + } +} + + + + + + + +/* ========================================================================== + $RAINBOW + ========================================================================== */ + +.string { + color: #68c244; +} + +.selector, +.function, +.method { + color: #0069bc; +} + +.comment, +.comment a { + color: @blue; + font-style: italic; +} +.comment a { + padding: 2px 0; + .border-radius( 3px ); +} +.comment a:hover { + background: @blue; + color: @white; +} + +.constant, +.null { + color: #d40; +} + +.tag-name, +.attribute { + color: #c50; +} + +.keyword { + color: #b90690; +} + +.rainbow, +.operator { + color: #585856; +} + +.class, +.pseudo { + color: #68c244; +} + +.css-property { + color: @blue; +} + +.css-value { + color: #0069bc; +} + +.hex-color { + +} + + + + + + +/* ========================================================================== + $TEXT-HELPERS + ========================================================================== */ + +.text-dimmed, +.text-dimmed a, +a.text-dimmed { + color: @grey-darker; +} +.text-dimmed a, +a.text-dimmed { + text-decoration: underline; +} +.text-dimmed a:hover, +a.text-dimmed:hover { + color: @medium-grey; +} + +.text-center { + text-align: center; +} + +.text-warning { + color: @red; +} + +.text-tiny { + font-size: 75%; +} + + + +/** + * Special fonts + */ +@font-face { + font-family: Peace; + src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRk9UVE8AAAy4AAsAAAAAEdQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAABCAAACYcAAA0Dci9b/EZGVE0AAAqQAAAAGgAAABxnZ2V2R0RFRgAACqwAAAAdAAAAIAAxAARPUy8yAAAKzAAAAFAAAABg1rvjhWNtYXAAAAscAAAASAAAAVq562KIaGVhZAAAC2QAAAAwAAAANv4xBnloaGVhAAALlAAAAB4AAAAkB6//iGhtdHgAAAu0AAAAEAAAABAKMwE5bWF4cAAAC8QAAAAGAAAABgAEUABuYW1lAAALzAAAAN8AAAGGT93z63Bvc3QAAAysAAAADAAAACAAAwAAeJxNVntY1VUWPffpD7jClcflIaCifWgaMJjiOEyg4nyaaISMIR8ZJhkaimNopPhGRa+ao6ZEWtqDnMbM+EwRSdC0FAUfYw6SjomgKO/n7773rH3Rvv7ZrMvvPPZeZ+11jkKo1UKhUEgL5mUtyspaLBRKoRAjTUFKU7DK5Kc26lRGndpoHWDJNZMmUGR6BAqhDxTvDggUukCd7CnUPEESHsIggpYtXhAZFTEJf/4WERHxdMlnKwuh2CxeVeT3zVDqQnWLdTnupLzaFEfK4PzjPsZ+RN1UQXTbK5uo7fUlRFUBB4ken04nOhueSiLoHxlEltRWEt6lgURdWb+RcHt0jKh5WSyjTKBsBwmtIp/ofniAkeiXxqWIR/L8iR55thOd/uooUfXoEqLK28l/RBVJZUQNmVVExRkRmHJ/nidiXXIiCc2HsUQPYlZji6BwieF4wMAWLDl1BQkPXrxpch0JryYFUWO8RMLnEbZpjakg4Tt0L8oafYKE36JdQM89AHrjDOrw/5WEv/quEXGHD2LgB/c49a0kDPqHJHRBnVj701wgfTrQP5uwQYiOhOuhKSQCnsN+mmMPiazuBcimYA+R7c0bJFwupBHZT7qS6Nc5SvodhhE56jBZO2obtlJPy0N0b67GJ9AvPGKwjUfH17wNh3o/Rs0Y8h8Thlw8TqL/9QxM0dTsQdRGVWO5lgSgfTpsURsItCWH0RwM34ZtbfOfkJB2zEJ+Hp8QPTyLsqbMsRC1/MtGIuqWGlRsTCMRmpIqMQxmiMwtE3eSGPj8Wmd6VxC9DxzDtpM8SegTI1D8xnoQEhLPqI4RanKfdhH7DxhOwnNQLqYE/3YeMTSomKjULY9E+Ns4+OzIJUgIKqJGMRHDJ2OzlnysqJ7hDSkpruDUPGKx0MgnFRrMSYHetqagnOE/JpGY/OI4EiHjA7Gu/nIcYv/0/Uh2Ak7C1S0OBay/Burt3YxuIl/dNqL2LzGcmk/dQexI1mN4zk1IbMxaop7+CSzzEpSeOfpFohXl0T5GrPrS9cP46F+LBAxxd0hEf32OxIA0ZBXpkoNqV6GG0A17gLL2M6rpK0T4xaVitov6DkcQTPZ7kF6/5cjMWosm0czJYQTqNAlfMMnbSCi/BRemEj2y6/0ynePWaPwjCgfaOxf9076yHmhmCaNGZDXHBL0brqDCVPTZ3e8OI/llJzYRvXfbwL0rNF0YQd9AFS6nCoGGBYCm7TuhlBNxGFuZjx4o7MjQEHUO0SL7DBTeM+kW5H8yHhvPz0BZ3jmM5jPKJZJ/xLFr9chDHiyQodmlFNHyOg7WnoCcrOWr8fOHUUDFCBauiCsn06+NGCgb8hHbK84jtx/QAA2b29EpeyG92omQjVv+UqAJV8DwzOWwgrUC3RqMpM5d/gliUMg7SKgKkJ/yOqSl3I30VQfC8GEdslfthwsp1mJptcNCQlQ4NfWZkefFI6paa0DBpXFMywmmZSeWjFoMXmZuv+mkS2qB0qURUaAr5SAOa7oH0M+ZWGYWMuxYhZ4TX9wBWVNLeKefIFIpG3m8EsAIwlXOwBZdB7qxWdJ49hh8Vc9O5tMey+e1HD8vosSeV5G+OjYPKKEBKPIYIziMKnsF0Ao0r/L7c0DfhSIh72ikYXsHiItzGbyBM4WkpeG9OMSAYbDK8oZDzgoE94yyEkpTzAWLyoVrEDToZIVtIfaBf5Bl4VkUlHYeh3ELKpaij/CZo6F8dkMsdRMuw9OsRSg3DCbmOS+JzWWcno1mDxxJ0boP6zyA3lVmX0Y1jAzYZQ2+qkNmOK1sI8d2yNp29RNsMfYShPIpqnAzKiWGuU6IDKawjbn9DKrqU+AaqyHtrpdK0dHV3swXjlE3DR0jF7KJnR76R2SOhThUTRtRUUMdRNV9qxKx5wzUYr7wGXcQ7KTLOAlo3zVGGGlN7ERhU20Y2Ga4hNiZ2oJFZhugyepZKLQct0BbrACJ2mJcdm0x5X0KoLZhyE9XXcMTN4MhXELUUP4X9LkGezVdG4LLopgXbxv4DN2HEw0qxW1pkrfDqc4iPRHTxq4wJg9G4tf/FThbKOwjIqCO0RFGB/kcoK7ol9dg4JTMKkRDMHrBEc9dsf95cFrUCNL8C9jSiw4zfxfBwSYgF+iDTMnsdj3rWaZl4HkcrriGxFFwRV/QULMM7is9Rk/XvN3MCHq7VQSkXr+D6GbXCZDSZQ/jVuWb3aHCVWlVTMFW3mWMtIzgA/a1EK/ZyWTvGjg8Pb5Q/4ygelTnjyagXtVeiWGxE5IYkR3Na1SS+PPLFUbJ+WZA46q/SeD2xALkGI/jVf4PMrCt3/k7gpErHgNZKuG9Cv0w7KxJ6/NMshyCMXbD9cncWosLfhguAXP08Gco7CPwkH6Hc7UiiwLIyvzaVZxYFcjoYNRWhgZoLbyPuk/54UMT1Nj1b1DadBclmB8k4cJwlKDC1gELJNaZ4z0kVohz7bysBNNjUFP7llJGsYxwKSgPZzMtqzHaNjuZJ3E15LBDUtZVS2C3HXgHCAFdUPeMWhxDxQQQPg/Gpl/5FlB6AKN0tlO0ikHlBX4G5rZgjjrbgTeZfSpfKJ+jGPtbIMLB9uQ8EZLgLvalnYy+B+LmprwUJGBK5DRMuxDtQ6BMEeUK9BqoFVve71tRiJVFzjFsnkjIdjy3L0khuh1cymygM8udRQHBusnGbzux4iAjiE3g7iD7mHVGVk4SF96VdQ9VTB7c5zFoyoN8CWx+2pSydBwMwJLJakSbd7a4Y0rTXC1HlomrLw7oybE3oZRpkxiFMIp7ag1ed8PBi9cqjqqCX7D9G3gFqsbBnMTtQqcPgrH3TXw51+10+qPuLITSE4AedcXzgSy7TzofR+xum55wDIBXKjfiQajehZbRhGb2uabQ+EPUylkwTM3mozywZx0bI+RKVhyUcIcvUa+Mh52huYqRjhHL5dJYIDa2zo+LuJeBekcq+Xzn82WOK0wH6qg3F/0vLbohPYNpAvyo8aZQ/xX9I6+J5tvWFxcZOhwvS+tHEKv8VSvCdLxc5MORCDFn+E3BFP/XlQcu9ubYH4ag9kWvdKOH8eBCpu1R8Yxwb7WPgGBdO6GYtsgw55sSSh8Fr3HHc5GaN3jhfx+HPPXHPvpCj0ruJtk0V77v86f08KHhs253ycqym02PyyJfCLaF2P7uI2vlvdu13ybeeLfKKMkvXJd95UHyyGhZb40aNNU4fek7CdKW61ahdTeaSe3IteT2c7fkeht9rJKxn1Hn+n95VHbFAHicY2BgYGQAgjO2i86D6LNTHgbDaABQgQemAAB4nGNgZGBg4ANiCQYQYGJgBEJmIGYB8xgABGsANgAAAHicY2BmVmWcwMDKwMHUxbSHgYGhB0IzPmAwZGRiYGBiYGVmgAFGAYYGOCcgzTWFwYGh4AMDc/b/ZoYo5myGWqAsI0iOKQ5IKAAhIwBpegzweJxjYGBgZoBgGQZGBhAIAfIYwXwWBgsgzcXAwcAEhAwMBeo8Hxj+/wergrP/T7rxVYAZqhcKGNkYUAXoAJjobB8hAAAMVQuIeJxjYGRgYADiI3WRpvH8Nl8ZuJlfAEUYzk55GIyg/zczv2DOBnI5GJhAogBc2wx3eJxjYGRgYM7+38wQxfyCgeGPBJAEiqAAFgCD8gU7AAAD6AAAA+gA+gJjAD8AAAAAAABQAAAEAAB4nHWOQWoCQRBF3+hoCAnBVciyIZtsZpieuBAPMAfIwr1IMwyoDa1CTuLKI2SZY+QAOUKO4XesTRY2FP3q96/6DTxyJONyMu6YGA/Eb8ZDXvk0zqV/GY944Md4LP1Pziy/l/LUT114IH4xHtJQGefST8Yjnvk2Hkv/pWNFZKOKbKFbxU2Mgg8CLQfWLElqQ3tYLwVN79v3d5Ij4KgpleaYq/7vu2qeGQVTVS2f511r4nbfxNQGV5eVmzvLFflZMS3qyst0628LpSZ2er9m+D6fRUi7Tjt8Wd2cPQMEZjnbAHicY2BmwAsAAH0ABA==) format('woff'), + url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAANAIAAAwBQRkZUTWdnZXYAAAeYAAAAHEdERUYAMwAGAAAHeAAAACBPUy8y1pnhBgAAAVgAAABWY21hcLntZZEAAAHIAAABWmdhc3D//wADAAAHcAAAAAhnbHlmfzYpgAAAAzQAAAJ0aGVhZP4xBnkAAADcAAAANmhoZWEHr/+KAAABFAAAACRobXR4C4ABOQAAAbAAAAAYbG9jYQI2ASwAAAMkAAAADm1heHAATgC5AAABOAAAACBuYW1lT93z6wAABagAAAGGcG9zdD9Th6YAAAcwAAAAPgABAAAAAQAAe86y9F8PPPUACwPoAAAAAM2U4VMAAAAAzZThUwAA/4MD6ANrAAAACAACAAAAAAAAAAEAAANr/4MAWgPoAAD8GAPoAAEAAAAAAAAAAAAAAAAAAAAGAAEAAAAGALYABgAAAAAAAgAAAAEAAQAAAEAAAAAAAAAAAQMlAZAABQAIAooCvAAAAIwCigK8AAAB4AAxAQIAAAIABQMAAAAAAAAAAAABEACAAAAAAAAAAAAAUGZFZABAAHDwAANr/4MAWgNrAH2AAAABAAAAAAAAA+gAAAAAAAABTQAAA+gA+gJjAD8AAAAAAAAAAwAAAAMAAAAcAAEAAAAAAFQAAwABAAAAHAAEADgAAAAKAAgAAgACAAAAcCcM8AD//wAAAAAAcCcM8AD//wAA/5TY9xAFAAEAAAAAAAAAAAAAAAABBgAAAQAAAAAAAAABAgAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/AEsAToAAAAGAPr/5wLuArwALAA4AEoAVgCjALUAAAA2NTQmIyIPASYnJiMiBhUUFxYXJicmIyIGFRQWFw4BFRQWFx4BMzI2NTQmLwE3PgEzMhYVFAcGByciIyIGByYnJjU0NjMyFh8BJhcGByYnJicWFxYXBgcGFRQWMzI2NTQmJx4BMzI2NxUUFhc3NTQmNTQ2Nz4BNy4BKwEiJjU0NjMyFxYXHgEVFAYjIiYnLgE1NDYzMhYXFhcWFRQGIyInJicGFiYnLgE1NDYzMhYXHgEVFAYjAr8hHhkzRw8GDUcvGx8RESYNCgoIFTAHByckIyQfVi51lSQsYjIRHQ4LDRMTIZcKAgoKAyMREg0LDRcUNhYwDQwEBwYIEhMUFQ70AUAfFBwCAQUHBQUHBBoWAQ8lHg42CAEJBxVWTRASQDw7FAwKgWA1Vh0TFBwRBxoTEAoKDwkcIA0HA4wmFhQZGQsMHQ8UGw4IAeR1Fh0izywQJ9IkHxc7O2wHAwQvFgcYEQkuKydJIR4hn34/OgkTkTMvEA8NOztcFAQGXDk4Fw4QJTubAqwMDxAQEBAHAwQBCU0EBR48GhMDCwUBAgMEBSkxAgUDBS8QGz0WChQICwoeIQ8LDQ0RCSghbJErJxkzFBolFxoVEhEHBwwtEAgDByAeGjAMCxoZGSFFCQkPAAACAD//jAI/Al4ACwAdAAABNCYjIgYVFBYzMjYBETMVMzYzMhYVFAYjIiYnIxEBzUxDRktOQ0hH/nJsAi5ydX1zbDVeGgIBTUtsYlVQZmr+iwLERlSbeHGdKCn+/gAAAAABAAD/gwPoA2sAAgAAEQEhA+j8GANr/BgAAAAAAAAMAJYAAQAAAAAAAQAHABAAAQAAAAAAAgAHACgAAQAAAAAAAwAjAHgAAQAAAAAABAAHAKwAAQAAAAAABQALAMwAAQAAAAAABgAHAOgAAwABBAkAAQAOAAAAAwABBAkAAgAOABgAAwABBAkAAwBGADAAAwABBAkABAAOAJwAAwABBAkABQAWALQAAwABBAkABgAOANgAaQBjAG8AbQBvAG8AbgAAaWNvbW9vbgAAUgBlAGcAdQBsAGEAcgAAUmVndWxhcgAARgBvAG4AdABGAG8AcgBnAGUAIAAyAC4AMAAgADoAIABpAGMAbwBtAG8AbwBuACAAOgAgADEAOAAtADQALQAyADAAMQAzAABGb250Rm9yZ2UgMi4wIDogaWNvbW9vbiA6IDE4LTQtMjAxMwAAaQBjAG8AbQBvAG8AbgAAaWNvbW9vbgAAVgBlAHIAcwBpAG8AbgAgADEALgAwAABWZXJzaW9uIDEuMAAAaQBjAG8AbQBvAG8AbgAAaWNvbW9vbgAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAABAAIBAgBTAQMHdW5pMjcwQwd1bmlGMDAwAAAAAAAB//8AAgABAAAADgAAABgAAAAAAAIAAQADAAUAAQAEAAAAAgAAAAAAAQAAAADMPaLPAAAAAM2U4VMAAAAAzZThUw==) format('truetype'); + font-weight: normal; + font-style: normal; +} + +.peace { + font-family: Peace, "Zapf Dingbats", dingbats; + speak: none; + line-height: .8; + vertical-align: -6px; + font-size: 1.4em; +} + +.ampersand { + font-family: Baskerville, "Goudy Old Style", Palatino, "Book Antiqua", serif; + font-style: italic; +} + + + +/** + * Logo stuff + */ +.logocon { + font-size: 60px; + display: inline-block; + line-height: 1; + height: .95em; + position: relative; + overflow: hidden; +} + +.logocon__p, +.menu__link--dimmed:hover .logocon__p, +.menu__link--dimmed:focus .logocon__p { + font-family: Peace; + color: @black; + display: inline; +} +.logocon__u, +.menu__link--dimmed:hover .logocon__u, +.menu__link--dimmed:focus .logocon__u { + position: absolute; + bottom: 0; + right: .05em; + background: @blue; + height: .09em; + left: .25em; +} +.menu__link--dimmed .logocon__p, +.menu__link--dimmed .logocon__u { + .transition( @smooth-fast ); +} +.menu__link--dimmed .logocon__p { + color: @grey-darker; +} +.menu__link--dimmed .logocon__u { + background: @grey-darker; +} + + + + + + +/* ========================================================================== + $DEMOS + ========================================================================== */ + +// Right-to-left languages + #date_demo__translations_rtl + .picker { + direction: rtl; +} + #date_demo__translations_rtl + .picker .picker__nav--next { + right: auto; + left: -1em; +} +#date_demo__translations_rtl + .picker .picker__nav--prev { + left: auto; + right: -1em; +} +#date_demo__translations_rtl + .picker .picker__nav--next:before { + border-left: 0; + border-right: .75em solid #000; +} +#date_demo__translations_rtl + .picker .picker__nav--prev:before { + border-right: 0; + border-left: .75em solid #000; +} + + + + + + + + + + + + diff --git a/js/pickadate.js-3.5.3/index.htm b/js/pickadate.js-3.5.3/index.htm new file mode 100644 index 0000000..fbf7824 --- /dev/null +++ b/js/pickadate.js-3.5.3/index.htm @@ -0,0 +1,180 @@ + + + + + + + + + + + +pickadate.js + + + + + + + + + + + + + +
+ +
+ +
+ + +
+

pickadate.js

+

The mobile-friendly, responsive, and lightweight
jQuery date & time input picker.

+

Download pickadate.js v3.5.3

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

Demo§

+ +
// The date picker (read the docs)
+$('.datepicker').pickadate()
+
+ +
// The time picker (read the docs)
+$('.timepicker').pickatime()
+
+ +
+

There’s a tonne of options to customize the date and time pickers, such as month/year selectors, time intervals, etc.

+

There’s also a rich API to extend the functionality of the picker. Some examples are displayed on Codepen.

+
+ +
+

When using the “classic” theme, it is important to have a wrapper div with position: relative around the source input to ensure the picker is sized according to the input element it is bound to.

+
+ +
+ +
+ +

Features§

+ +
+
    +
  • Supports jQuery 1.7 and up.
  • +
  • Is ARIA-enabled to be WCAG 2.0 compliant. (added in v3.4)
  • +
  • Leaves a tiny footprint of 6kb JS and 2kb CSS. (minified and gzipped)
  • +
  • Comes with translations for 39 languages.
  • +
  • Has touch & keyboard friendliness.
  • +
  • Follows BEM style class naming.
  • +
  • Utilizes LESS based stylesheets.
  • +
  • Includes a Grunt based build system.
  • +
+
+ +
+ +
+ +

Browser Support§

+ +

Supports all modern browsers – and IE8+.

+

Specifically, v3 has been tested with Chrome MWA, Firefox MWA, Opera MWA, Safari Mi, Internet Explorer W, Blackberry 6.0+ and Android 3.2+ browsers.

+ + +

M = Mac, W = Windows, A = Android, i = iOS

+
+ +
+

Make sure to also include the legacy.js file along for the oldie browsers.

+
+ +
+ +
+ +

Community§

+ +

pickadate.js is an open source project, shared under an MIT license. All code and discussions are hosted on Github.

+

Contributions are very welcome – please read these pointers before submitting a bug report or feature request.

+

If you find this library useful and would like to see further development, consider supporting it.

+ +
+ +
+ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/legacy.js b/js/pickadate.js-3.5.3/lib/compressed/legacy.js new file mode 100644 index 0000000..a5c8fa5 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/legacy.js @@ -0,0 +1,10 @@ +/*! + * Legacy browser support + */ +[].map||(Array.prototype.map=function(a,b){for(var c=this,d=c.length,e=new Array(d),f=0;d>f;f++)f in c&&(e[f]=a.call(b,c[f],f,c));return e}),[].filter||(Array.prototype.filter=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=[],e=arguments[1],f=0;c>f;f++)if(f in b){var g=b[f];a.call(e,g,f,b)&&d.push(g)}return d}),[].indexOf||(Array.prototype.indexOf=function(a){if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!==d&&1/0!=d&&d!=-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1});/*! + * Cross-Browser Split 1.1.1 + * Copyright 2007-2012 Steven Levithan + * Available under the MIT License + * http://blog.stevenlevithan.com/archives/cross-browser-split + */ +var nativeSplit=String.prototype.split,compliantExecNpcg=void 0===/()??/.exec("")[1];String.prototype.split=function(a,b){var c=this;if("[object RegExp]"!==Object.prototype.toString.call(a))return nativeSplit.call(c,a,b);var d,e,f,g,h=[],i=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.extended?"x":"")+(a.sticky?"y":""),j=0;for(a=new RegExp(a.source,i+"g"),c+="",compliantExecNpcg||(d=new RegExp("^"+a.source+"$(?!\\s)",i)),b=void 0===b?-1>>>0:b>>>0;(e=a.exec(c))&&(f=e.index+e[0].length,!(f>j&&(h.push(c.slice(j,e.index)),!compliantExecNpcg&&e.length>1&&e[0].replace(d,function(){for(var a=1;a1&&e.index=b)));)a.lastIndex===e.index&&a.lastIndex++;return j===c.length?(g||!a.test(""))&&h.push(""):h.push(c.slice(j)),h.length>b?h.slice(0,b):h}; \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/picker.date.js b/js/pickadate.js-3.5.3/lib/compressed/picker.date.js new file mode 100644 index 0000000..828708a --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/picker.date.js @@ -0,0 +1,5 @@ +/*! + * Date picker for pickadate.js v3.5.3 + * http://amsul.github.io/pickadate.js/date.htm + */ +!function(a){"function"==typeof define&&define.amd?define(["picker","jquery"],a):"object"==typeof exports?module.exports=a(require("./picker.js"),require("jquery")):a(Picker,jQuery)}(function(a,b){function c(a,b){var c=this,d=a.$node[0],e=d.value,f=a.$node.data("value"),g=f||e,h=f?b.formatSubmit:b.format,i=function(){return d.currentStyle?"rtl"==d.currentStyle.direction:"rtl"==getComputedStyle(a.$root[0]).direction};c.settings=b,c.$node=a.$node,c.queue={min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse navigate create validate",view:"parse create validate viewset",disable:"deactivate",enable:"activate"},c.item={},c.item.clear=null,c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return a[0]===!0?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now"),g?c.set("select",g,{format:h}):c.set("select",null).set("highlight",c.item.now),c.key={40:7,38:-7,39:function(){return i()?-1:1},37:function(){return i()?1:-1},go:function(a){var b=c.item.highlight,d=new Date(b.year,b.month,b.date+a);c.set("highlight",[d.getFullYear(),d.getMonth(),d.getDate()],{interval:a}),this.render()}},a.on("render",function(){a.$root.find("."+b.klass.selectMonth).on("change",function(){var c=this.value;c&&(a.set("highlight",[a.get("view").year,c,a.get("highlight").date]),a.$root.find("."+b.klass.selectMonth).trigger("focus"))}),a.$root.find("."+b.klass.selectYear).on("change",function(){var c=this.value;c&&(a.set("highlight",[c,a.get("view").month,a.get("highlight").date]),a.$root.find("."+b.klass.selectYear).trigger("focus"))})},1).on("open",function(){var d="";c.disabled(c.get("now"))&&(d=":not(."+b.klass.buttonToday+")"),a.$root.find("button"+d+", select").attr("disabled",!1)},1).on("close",function(){a.$root.find("button, select").attr("disabled",!0)},1)}var d=7,e=6,f=a._;c.prototype.set=function(a,b,c){var d=this,e=d.item;return null===b?("clear"==a&&(a="select"),e[a]=b,d):(e["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",e.select,c):"highlight"==a?d.set("view",e.highlight,c):a.match(/^(flip|min|max|disable|enable)$/)&&(e.select&&d.disabled(e.select)&&d.set("select",e.select,c),e.highlight&&d.disabled(e.highlight)&&d.set("highlight",e.highlight,c)),d)},c.prototype.get=function(a){return this.item[a]},c.prototype.create=function(a,c,d){var e,g=this;return c=void 0===c?a:c,c==-1/0||1/0==c?e=c:b.isPlainObject(c)&&f.isInteger(c.pick)?c=c.obj:b.isArray(c)?(c=new Date(c[0],c[1],c[2]),c=f.isDate(c)?c:g.create().obj):c=f.isInteger(c)||f.isDate(c)?g.normalize(new Date(c),d):g.now(a,c,d),{year:e||c.getFullYear(),month:e||c.getMonth(),date:e||c.getDate(),day:e||c.getDay(),obj:e||c,pick:e||c.getTime()}},c.prototype.createRange=function(a,c){var d=this,e=function(a){return a===!0||b.isArray(a)||f.isDate(a)?d.create(a):a};return f.isInteger(a)||(a=e(a)),f.isInteger(c)||(c=e(c)),f.isInteger(a)&&b.isPlainObject(c)?a=[c.year,c.month,c.date+a]:f.isInteger(c)&&b.isPlainObject(a)&&(c=[a.year,a.month,a.date+c]),{from:e(a),to:e(c)}},c.prototype.withinRange=function(a,b){return a=this.createRange(a.from,a.to),b.pick>=a.from.pick&&b.pick<=a.to.pick},c.prototype.overlapRanges=function(a,b){var c=this;return a=c.createRange(a.from,a.to),b=c.createRange(b.from,b.to),c.withinRange(a,b.from)||c.withinRange(a,b.to)||c.withinRange(b,a.from)||c.withinRange(b,a.to)},c.prototype.now=function(a,b,c){return b=new Date,c&&c.rel&&b.setDate(b.getDate()+c.rel),this.normalize(b,c)},c.prototype.navigate=function(a,c,d){var e,f,g,h,i=b.isArray(c),j=b.isPlainObject(c),k=this.item.view;if(i||j){for(j?(f=c.year,g=c.month,h=c.date):(f=+c[0],g=+c[1],h=+c[2]),d&&d.nav&&k&&k.month!==g&&(f=k.year,g=k.month),e=new Date(f,g+(d&&d.nav?d.nav:0),1),f=e.getFullYear(),g=e.getMonth();new Date(f,g,h).getMonth()!==g;)h-=1;c=[f,g,h]}return c},c.prototype.normalize=function(a){return a.setHours(0,0,0,0),a},c.prototype.measure=function(a,b){var c=this;return b?"string"==typeof b?b=c.parse(a,b):f.isInteger(b)&&(b=c.now(a,b,{rel:b})):b="min"==a?-1/0:1/0,b},c.prototype.viewset=function(a,b){return this.create([b.year,b.month,1])},c.prototype.validate=function(a,c,d){var e,g,h,i,j=this,k=c,l=d&&d.interval?d.interval:1,m=-1===j.item.enable,n=j.item.min,o=j.item.max,p=m&&j.item.disable.filter(function(a){if(b.isArray(a)){var d=j.create(a).pick;dc.pick&&(g=!0)}return f.isInteger(a)}).length;if((!d||!d.nav)&&(!m&&j.disabled(c)||m&&j.disabled(c)&&(p||e||g)||!m&&(c.pick<=n.pick||c.pick>=o.pick)))for(m&&!p&&(!g&&l>0||!e&&0>l)&&(l*=-1);j.disabled(c)&&(Math.abs(l)>1&&(c.monthk.month)&&(c=k,l=l>0?1:-1),c.pick<=n.pick?(h=!0,l=1,c=j.create([n.year,n.month,n.date+(c.pick===n.pick?0:-1)])):c.pick>=o.pick&&(i=!0,l=-1,c=j.create([o.year,o.month,o.date+(c.pick===o.pick?0:1)])),!h||!i);)c=j.create([c.year,c.month,c.date+l]);return c},c.prototype.disabled=function(a){var c=this,d=c.item.disable.filter(function(d){return f.isInteger(d)?a.day===(c.settings.firstDay?d:d-1)%7:b.isArray(d)||f.isDate(d)?a.pick===c.create(d).pick:b.isPlainObject(d)?c.withinRange(d,a):void 0});return d=d.length&&!d.filter(function(a){return b.isArray(a)&&"inverted"==a[3]||b.isPlainObject(a)&&a.inverted}).length,-1===c.item.enable?!d:d||a.pickc.item.max.pick},c.prototype.parse=function(a,b,c){var d=this,e={};return b&&"string"==typeof b?(c&&c.format||(c=c||{},c.format=d.settings.format),d.formats.toArray(c.format).map(function(a){var c=d.formats[a],g=c?f.trigger(c,d,[b,e]):a.replace(/^!/,"").length;c&&(e[a]=b.substr(0,g)),b=b.substr(g)}),[e.yyyy||e.yy,+(e.mm||e.m)-1,e.dd||e.d]):b},c.prototype.formats=function(){function a(a,b,c){var d=a.match(/\w+/)[0];return c.mm||c.m||(c.m=b.indexOf(d)+1),d.length}function b(a){return a.match(/\w+/)[0].length}return{d:function(a,b){return a?f.digits(a):b.date},dd:function(a,b){return a?2:f.lead(b.date)},ddd:function(a,c){return a?b(a):this.settings.weekdaysShort[c.day]},dddd:function(a,c){return a?b(a):this.settings.weekdaysFull[c.day]},m:function(a,b){return a?f.digits(a):b.month+1},mm:function(a,b){return a?2:f.lead(b.month+1)},mmm:function(b,c){var d=this.settings.monthsShort;return b?a(b,d,c):d[c.month]},mmmm:function(b,c){var d=this.settings.monthsFull;return b?a(b,d,c):d[c.month]},yy:function(a,b){return a?2:(""+b.year).slice(2)},yyyy:function(a,b){return a?4:b.year},toArray:function(a){return a.split(/(d{1,4}|m{1,4}|y{4}|yy|!.)/g)},toString:function(a,b){var c=this;return c.formats.toArray(a).map(function(a){return f.trigger(c.formats[a],c,[0,b])||a.replace(/^!/,"")}).join("")}}}(),c.prototype.isDateExact=function(a,c){var d=this;return f.isInteger(a)&&f.isInteger(c)||"boolean"==typeof a&&"boolean"==typeof c?a===c:(f.isDate(a)||b.isArray(a))&&(f.isDate(c)||b.isArray(c))?d.create(a).pick===d.create(c).pick:b.isPlainObject(a)&&b.isPlainObject(c)?d.isDateExact(a.from,c.from)&&d.isDateExact(a.to,c.to):!1},c.prototype.isDateOverlap=function(a,c){var d=this,e=d.settings.firstDay?1:0;return f.isInteger(a)&&(f.isDate(c)||b.isArray(c))?(a=a%7+e,a===d.create(c).day+1):f.isInteger(c)&&(f.isDate(a)||b.isArray(a))?(c=c%7+e,c===d.create(a).day+1):b.isPlainObject(a)&&b.isPlainObject(c)?d.overlapRanges(a,c):!1},c.prototype.flipEnable=function(a){var b=this.item;b.enable=a||(-1==b.enable?1:-1)},c.prototype.deactivate=function(a,c){var d=this,e=d.item.disable.slice(0);return"flip"==c?d.flipEnable():c===!1?(d.flipEnable(1),e=[]):c===!0?(d.flipEnable(-1),e=[]):c.map(function(a){for(var c,g=0;gi;i+=1){if(h=e[i],d.isDateExact(h,a)){c=e[i]=null,j=!0;break}if(d.isDateOverlap(h,a)){b.isPlainObject(a)?(a.inverted=!0,c=a):b.isArray(a)?(c=a,c[3]||c.push("inverted")):f.isDate(a)&&(c=[a.getFullYear(),a.getMonth(),a.getDate(),"inverted"]);break}}if(c)for(i=0;g>i;i+=1)if(d.isDateExact(e[i],a)){e[i]=null;break}if(j)for(i=0;g>i;i+=1)if(d.isDateOverlap(e[i],a)){e[i]=null;break}c&&e.push(c)}),e.filter(function(a){return null!=a})},c.prototype.nodes=function(a){var b=this,c=b.settings,g=b.item,h=g.now,i=g.select,j=g.highlight,k=g.view,l=g.disable,m=g.min,n=g.max,o=function(a,b){return c.firstDay&&(a.push(a.shift()),b.push(b.shift())),f.node("thead",f.node("tr",f.group({min:0,max:d-1,i:1,node:"th",item:function(d){return[a[d],c.klass.weekdays,'scope=col title="'+b[d]+'"']}})))}((c.showWeekdaysFull?c.weekdaysFull:c.weekdaysShort).slice(0),c.weekdaysFull.slice(0)),p=function(a){return f.node("div"," ",c.klass["nav"+(a?"Next":"Prev")]+(a&&k.year>=n.year&&k.month>=n.month||!a&&k.year<=m.year&&k.month<=m.month?" "+c.klass.navDisabled:""),"data-nav="+(a||-1)+" "+f.ariaAttr({role:"button",controls:b.$node[0].id+"_table"})+' title="'+(a?c.labelMonthNext:c.labelMonthPrev)+'"')},q=function(){var d=c.showMonthsShort?c.monthsShort:c.monthsFull;return c.selectMonths?f.node("select",f.group({min:0,max:11,i:1,node:"option",item:function(a){return[d[a],0,"value="+a+(k.month==a?" selected":"")+(k.year==m.year&&an.month?" disabled":"")]}}),c.klass.selectMonth,(a?"":"disabled")+" "+f.ariaAttr({controls:b.$node[0].id+"_table"})+' title="'+c.labelMonthSelect+'"'):f.node("div",d[k.month],c.klass.month)},r=function(){var d=k.year,e=c.selectYears===!0?5:~~(c.selectYears/2);if(e){var g=m.year,h=n.year,i=d-e,j=d+e;if(g>i&&(j+=g-i,i=g),j>h){var l=i-g,o=j-h;i-=l>o?o:l,j=h}return f.node("select",f.group({min:i,max:j,i:1,node:"option",item:function(a){return[a,0,"value="+a+(d==a?" selected":"")]}}),c.klass.selectYear,(a?"":"disabled")+" "+f.ariaAttr({controls:b.$node[0].id+"_table"})+' title="'+c.labelYearSelect+'"')}return f.node("div",d,c.klass.year)};return f.node("div",(c.selectYears?r()+q():q()+r())+p()+p(1),c.klass.header)+f.node("table",o+f.node("tbody",f.group({min:0,max:e-1,i:1,node:"tr",item:function(a){var e=c.firstDay&&0===b.create([k.year,k.month,1]).day?-7:0;return[f.group({min:d*a-k.day+e+1,max:function(){return this.min+d-1},i:1,node:"td",item:function(a){a=b.create([k.year,k.month,a+(c.firstDay?1:0)]);var d=i&&i.pick==a.pick,e=j&&j.pick==a.pick,g=l&&b.disabled(a)||a.pickn.pick;return[f.node("div",a.date,function(b){return b.push(k.month==a.month?c.klass.infocus:c.klass.outfocus),h.pick==a.pick&&b.push(c.klass.now),d&&b.push(c.klass.selected),e&&b.push(c.klass.highlighted),g&&b.push(c.klass.disabled),b.join(" ")}([c.klass.day]),"data-pick="+a.pick+" "+f.ariaAttr({role:"gridcell",selected:d&&b.$node.val()===f.trigger(b.formats.toString,b,[c.format,a])?!0:null,activedescendant:e?!0:null,disabled:g?!0:null})),"",f.ariaAttr({role:"presentation"})]}})]}})),c.klass.table,'id="'+b.$node[0].id+'_table" '+f.ariaAttr({role:"grid",controls:b.$node[0].id,readonly:!0}))+f.node("div",f.node("button",c.today,c.klass.buttonToday,"type=button data-pick="+h.pick+(a&&!b.disabled(h)?"":" disabled")+" "+f.ariaAttr({controls:b.$node[0].id}))+f.node("button",c.clear,c.klass.buttonClear,"type=button data-clear=1"+(a?"":" disabled")+" "+f.ariaAttr({controls:b.$node[0].id}))+f.node("button",c.close,c.klass.buttonClose,"type=button data-close=true "+(a?"":" disabled")+" "+f.ariaAttr({controls:b.$node[0].id})),c.klass.footer)},c.defaults=function(a){return{labelMonthNext:"Next month",labelMonthPrev:"Previous month",labelMonthSelect:"Select a month",labelYearSelect:"Select a year",monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],today:"Today",clear:"Clear",close:"Close",format:"d mmmm, yyyy",klass:{table:a+"table",header:a+"header",navPrev:a+"nav--prev",navNext:a+"nav--next",navDisabled:a+"nav--disabled",month:a+"month",year:a+"year",selectMonth:a+"select--month",selectYear:a+"select--year",weekdays:a+"weekday",day:a+"day",disabled:a+"day--disabled",selected:a+"day--selected",highlighted:a+"day--highlighted",now:a+"day--today",infocus:a+"day--infocus",outfocus:a+"day--outfocus",footer:a+"footer",buttonClear:a+"button--clear",buttonToday:a+"button--today",buttonClose:a+"button--close"}}}(a.klasses().picker+"__"),a.extend("pickadate",c)}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/picker.js b/js/pickadate.js-3.5.3/lib/compressed/picker.js new file mode 100644 index 0000000..fb29939 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/picker.js @@ -0,0 +1,7 @@ +/*! + * pickadate.js v3.5.3, 2014/07/12 + * By Amsul, http://amsul.ca + * Hosted on http://amsul.github.io/pickadate.js + * Licensed under MIT + */ +!function(a){"function"==typeof define&&define.amd?define("picker",["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):this.Picker=a(jQuery)}(function(a){function b(f,g,h,k){function l(){return b._.node("div",b._.node("div",b._.node("div",b._.node("div",w.component.nodes(r.open),t.box),t.wrap),t.frame),t.holder)}function m(){u.data(g,w).addClass(t.input).val(u.data("value")?w.get("select",s.format):f.value).on("focus."+r.id+" click."+r.id,p),s.editable||u.on("keydown."+r.id,function(a){var b=a.keyCode,c=/^(8|46)$/.test(b);return 27==b?(w.close(),!1):void((32==b||c||!r.open&&w.component.key[b])&&(a.preventDefault(),a.stopPropagation(),c?w.clear().close():w.open()))}),e(f,{haspopup:!0,expanded:!1,readonly:!1,owns:f.id+"_root"+(w._hidden?" "+w._hidden.id:"")})}function n(){w.$root.on({focusin:function(a){w.$root.removeClass(t.focused),a.stopPropagation()},"mousedown click":function(b){var c=b.target;c!=w.$root.children()[0]&&(b.stopPropagation(),"mousedown"!=b.type||a(c).is(":input")||"OPTION"==c.nodeName||(b.preventDefault(),f.focus()))}}).on("click","[data-pick], [data-nav], [data-clear]",function(){var c=a(this),d=c.data(),e=c.hasClass(t.navDisabled)||c.hasClass(t.disabled),g=document.activeElement;g=g&&(g.type||g.href)&&g,(e||g&&!a.contains(w.$root[0],g))&&f.focus(),d.nav&&!e?w.set("highlight",w.component.item.highlight,{nav:d.nav}):b._.isInteger(d.pick)&&!e?w.set("select",d.pick).close(!0):d.clear&&w.clear().close(!0)}).on("click","[data-close]",function(){w.close(!0)}),e(w.$root[0],"hidden",!0)}function o(){var b;s.hiddenName===!0?(b=f.name,f.name=""):(b=["string"==typeof s.hiddenPrefix?s.hiddenPrefix:"","string"==typeof s.hiddenSuffix?s.hiddenSuffix:"_submit"],b=b[0]+f.name+b[1]),w._hidden=a('")[0],u.on("change."+r.id,function(){w._hidden.value=f.value?w.get("select",s.formatSubmit):""}).after(w._hidden)}function p(a){a.stopPropagation(),"focus"==a.type&&w.$root.addClass(t.focused),w.open()}if(!f)return b;var q=!1,r={id:f.id||"P"+Math.abs(~~(Math.random()*new Date))},s=h?a.extend(!0,{},h.defaults,k):k||{},t=a.extend({},b.klasses(),s.klass),u=a(f),v=function(){return this.start()},w=v.prototype={constructor:v,$node:u,start:function(){return r&&r.start?w:(r.methods={},r.start=!0,r.open=!1,r.type=f.type,f.autofocus=f==document.activeElement,f.readOnly=!s.editable,f.id=f.id||r.id,"text"!=f.type&&(f.type="text"),w.component=new h(w,s),w.$root=a(b._.node("div",l(),t.picker,'id="'+f.id+'_root"')),n(),s.formatSubmit&&o(),m(),s.container?a(s.container).append(w.$root):u.after(w.$root),w.on({start:w.component.onStart,render:w.component.onRender,stop:w.component.onStop,open:w.component.onOpen,close:w.component.onClose,set:w.component.onSet}).on({start:s.onStart,render:s.onRender,stop:s.onStop,open:s.onOpen,close:s.onClose,set:s.onSet}),q=c(w.$root.children()[0]),f.autofocus&&w.open(),w.trigger("start").trigger("render"))},render:function(a){return a?w.$root.html(l()):w.$root.find("."+t.box).html(w.component.nodes(r.open)),w.trigger("render")},stop:function(){return r.start?(w.close(),w._hidden&&w._hidden.parentNode.removeChild(w._hidden),w.$root.remove(),u.removeClass(t.input).removeData(g),setTimeout(function(){u.off("."+r.id)},0),f.type=r.type,f.readOnly=!1,w.trigger("stop"),r.methods={},r.start=!1,w):w},open:function(c){return r.open?w:(u.addClass(t.active),e(f,"expanded",!0),setTimeout(function(){w.$root.addClass(t.opened),e(w.$root[0],"hidden",!1)},0),c!==!1&&(r.open=!0,q&&j.css("overflow","hidden").css("padding-right","+="+d()),u.trigger("focus"),i.on("click."+r.id+" focusin."+r.id,function(a){var b=a.target;b!=f&&b!=document&&3!=a.which&&w.close(b===w.$root.children()[0])}).on("keydown."+r.id,function(c){var d=c.keyCode,e=w.component.key[d],g=c.target;27==d?w.close(!0):g!=f||!e&&13!=d?a.contains(w.$root[0],g)&&13==d&&(c.preventDefault(),g.click()):(c.preventDefault(),e?b._.trigger(w.component.key.go,w,[b._.trigger(e)]):w.$root.find("."+t.highlighted).hasClass(t.disabled)||w.set("select",w.component.item.highlight).close())})),w.trigger("open"))},close:function(a){return a&&(u.off("focus."+r.id).trigger("focus"),setTimeout(function(){u.on("focus."+r.id,p)},0)),u.removeClass(t.active),e(f,"expanded",!1),setTimeout(function(){w.$root.removeClass(t.opened+" "+t.focused),e(w.$root[0],"hidden",!0)},0),r.open?(r.open=!1,q&&j.css("overflow","").css("padding-right","-="+d()),i.off("."+r.id),w.trigger("close")):w},clear:function(a){return w.set("clear",null,a)},set:function(b,c,d){var e,f,g=a.isPlainObject(b),h=g?b:{};if(d=g&&a.isPlainObject(c)?c:d||{},b){g||(h[b]=c);for(e in h)f=h[e],e in w.component.item&&(void 0===f&&(f=null),w.component.set(e,f,d)),("select"==e||"clear"==e)&&u.val("clear"==e?"":w.get(e,s.format)).trigger("change");w.render()}return d.muted?w:w.trigger("set",h)},get:function(a,c){if(a=a||"value",null!=r[a])return r[a];if("value"==a)return f.value;if(a in w.component.item){if("string"==typeof c){var d=w.component.get(a);return d?b._.trigger(w.component.formats.toString,w.component,[c,d]):""}return w.component.get(a)}},on:function(b,c,d){var e,f,g=a.isPlainObject(b),h=g?b:{};if(b){g||(h[b]=c);for(e in h)f=h[e],d&&(e="_"+e),r.methods[e]=r.methods[e]||[],r.methods[e].push(f)}return w},off:function(){var a,b,c=arguments;for(a=0,namesCount=c.length;namesCount>a;a+=1)b=c[a],b in r.methods&&delete r.methods[b];return w},trigger:function(a,c){var d=function(a){var d=r.methods[a];d&&d.map(function(a){b._.trigger(a,w,[c])})};return d("_"+a),d(a),w}};return new v}function c(a){var b,c="position";return a.currentStyle?b=a.currentStyle[c]:window.getComputedStyle&&(b=getComputedStyle(a)[c]),"fixed"==b}function d(){if(j.height()<=h.height())return 0;var b=a('
').appendTo("body"),c=b[0].offsetWidth;b.css("overflow","scroll");var d=a('
').appendTo(b),e=d[0].offsetWidth;return b.remove(),c-e}function e(b,c,d){if(a.isPlainObject(c))for(var e in c)f(b,e,c[e]);else f(b,c,d)}function f(a,b,c){a.setAttribute(("role"==b?"":"aria-")+b,c)}function g(b,c){a.isPlainObject(b)||(b={attribute:c}),c="";for(var d in b){var e=("role"==d?"":"aria-")+d,f=b[d];c+=null==f?"":e+'="'+b[d]+'"'}return c}var h=a(window),i=a(document),j=a(document.documentElement);return b.klasses=function(a){return a=a||"picker",{picker:a,opened:a+"--opened",focused:a+"--focused",input:a+"__input",active:a+"__input--active",holder:a+"__holder",frame:a+"__frame",wrap:a+"__wrap",box:a+"__box"}},b._={group:function(a){for(var c,d="",e=b._.trigger(a.min,a);e<=b._.trigger(a.max,a,[e]);e+=a.i)c=b._.trigger(a.item,a,[e]),d+=b._.node(a.node,c[0],c[1],c[2]);return d},node:function(b,c,d,e){return c?(c=a.isArray(c)?c.join(""):c,d=d?' class="'+d+'"':"",e=e?" "+e:"","<"+b+d+e+">"+c+""):""},lead:function(a){return(10>a?"0":"")+a},trigger:function(a,b,c){return"function"==typeof a?a.apply(b,c||[]):a},digits:function(a){return/\d/.test(a[1])?2:1},isDate:function(a){return{}.toString.call(a).indexOf("Date")>-1&&this.isInteger(a.getDate())},isInteger:function(a){return{}.toString.call(a).indexOf("Number")>-1&&a%1===0},ariaAttr:g},b.extend=function(c,d){a.fn[c]=function(e,f){var g=this.data(c);return"picker"==e?g:g&&"string"==typeof e?b._.trigger(g[e],g,[f]):this.each(function(){var f=a(this);f.data(c)||new b(this,c,d,e)})},a.fn[c].defaults=d.defaults},b}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/picker.time.js b/js/pickadate.js-3.5.3/lib/compressed/picker.time.js new file mode 100644 index 0000000..9e0b6da --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/picker.time.js @@ -0,0 +1,5 @@ +/*! + * Time picker for pickadate.js v3.5.3 + * http://amsul.github.io/pickadate.js/time.htm + */ +!function(a){"function"==typeof define&&define.amd?define(["picker","jquery"],a):"object"==typeof exports?module.exports=a(require("./picker.js"),require("jquery")):a(Picker,jQuery)}(function(a,b){function c(a,b){var c=this,d=a.$node[0].value,e=a.$node.data("value"),f=e||d,g=e?b.formatSubmit:b.format;c.settings=b,c.$node=a.$node,c.queue={interval:"i",min:"measure create",max:"measure create",now:"now create",select:"parse create validate",highlight:"parse create validate",view:"parse create validate",disable:"deactivate",enable:"activate"},c.item={},c.item.clear=null,c.item.interval=b.interval||30,c.item.disable=(b.disable||[]).slice(0),c.item.enable=-function(a){return a[0]===!0?a.shift():-1}(c.item.disable),c.set("min",b.min).set("max",b.max).set("now"),f?c.set("select",f,{format:g,fromValue:!!d}):c.set("select",null).set("highlight",c.item.now),c.key={40:1,38:-1,39:1,37:-1,go:function(a){c.set("highlight",c.item.highlight.pick+a*c.item.interval,{interval:a*c.item.interval}),this.render()}},a.on("render",function(){var c=a.$root.children(),d=c.find("."+b.klass.viewset),e=function(a){return["webkit","moz","ms","o",""].map(function(b){return(b?"-"+b+"-":"")+a})},f=function(a,b){e("transform").map(function(c){a.css(c,b)}),e("transition").map(function(c){a.css(c,b)})};d.length&&(f(c,"none"),c[0].scrollTop=~~d.position().top-2*d[0].clientHeight,f(c,""))},1).on("open",function(){a.$root.find("button").attr("disabled",!1)},1).on("close",function(){a.$root.find("button").attr("disabled",!0)},1)}var d=24,e=60,f=12,g=d*e,h=a._;c.prototype.set=function(a,b,c){var d=this,e=d.item;return null===b?("clear"==a&&(a="select"),e[a]=b,d):(e["enable"==a?"disable":"flip"==a?"enable":a]=d.queue[a].split(" ").map(function(e){return b=d[e](a,b,c)}).pop(),"select"==a?d.set("highlight",e.select,c):"highlight"==a?d.set("view",e.highlight,c):"interval"==a?d.set("min",e.min,c).set("max",e.max,c):a.match(/^(flip|min|max|disable|enable)$/)&&("min"==a&&d.set("max",e.max,c),e.select&&d.disabled(e.select)&&d.set("select",e.select,c),e.highlight&&d.disabled(e.highlight)&&d.set("highlight",e.highlight,c)),d)},c.prototype.get=function(a){return this.item[a]},c.prototype.create=function(a,c,f){var i=this;return c=void 0===c?a:c,h.isDate(c)&&(c=[c.getHours(),c.getMinutes()]),b.isPlainObject(c)&&h.isInteger(c.pick)?c=c.pick:b.isArray(c)?c=+c[0]*e+ +c[1]:h.isInteger(c)||(c=i.now(a,c,f)),"max"==a&&c=a.from.pick&&b.pick<=a.to.pick},c.prototype.overlapRanges=function(a,b){var c=this;return a=c.createRange(a.from,a.to),b=c.createRange(b.from,b.to),c.withinRange(a,b.from)||c.withinRange(a,b.to)||c.withinRange(b,a.from)||c.withinRange(b,a.to)},c.prototype.now=function(a,b){var c,d=this.item.interval,f=new Date,g=f.getHours()*e+f.getMinutes(),i=h.isInteger(b);return g-=g%d,c=0>b&&-d>=d*b+g,g+="min"==a&&c?0:d,i&&(g+=d*(c&&"max"!=a?b+1:b)),g},c.prototype.normalize=function(a,b){var c=this.item.interval,d=this.item.min&&this.item.min.pick||0;return b-="min"==a?0:(b-d)%c},c.prototype.measure=function(a,c,f){var g=this;return c||(c="min"==a?[0,0]:[d-1,e-1]),"string"==typeof c?c=g.parse(a,c):c===!0||h.isInteger(c)?c=g.now(a,c,f):b.isPlainObject(c)&&h.isInteger(c.pick)&&(c=g.normalize(a,c.pick,f)),c},c.prototype.validate=function(a,b,c){var d=this,e=c&&c.interval?c.interval:d.item.interval;return d.disabled(b)&&(b=d.shift(b,e)),b=d.scope(b),d.disabled(b)&&(b=d.shift(b,-1*e)),b},c.prototype.disabled=function(a){var c=this,d=c.item.disable.filter(function(d){return h.isInteger(d)?a.hour==d:b.isArray(d)||h.isDate(d)?a.pick==c.create(d).pick:b.isPlainObject(d)?c.withinRange(d,a):void 0});return d=d.length&&!d.filter(function(a){return b.isArray(a)&&"inverted"==a[2]||b.isPlainObject(a)&&a.inverted}).length,-1===c.item.enable?!d:d||a.pickc.item.max.pick},c.prototype.shift=function(a,b){var c=this,d=c.item.min.pick,e=c.item.max.pick;for(b=b||c.item.interval;c.disabled(a)&&(a=c.create(a.pick+=b),!(a.pick<=d||a.pick>=e)););return a},c.prototype.scope=function(a){var b=this.item.min.pick,c=this.item.max.pick;return this.create(a.pick>c?c:a.pickb.time%g?"a.m.":"p.m."},A:function(a,b){return a?2:g/2>b.time%g?"AM":"PM"},toArray:function(a){return a.split(/(h{1,2}|H{1,2}|i|a|A|!.)/g)},toString:function(a,b){var c=this;return c.formats.toArray(a).map(function(a){return h.trigger(c.formats[a],c,[0,b])||a.replace(/^!/,"")}).join("")}},c.prototype.isTimeExact=function(a,c){var d=this;return h.isInteger(a)&&h.isInteger(c)||"boolean"==typeof a&&"boolean"==typeof c?a===c:(h.isDate(a)||b.isArray(a))&&(h.isDate(c)||b.isArray(c))?d.create(a).pick===d.create(c).pick:b.isPlainObject(a)&&b.isPlainObject(c)?d.isTimeExact(a.from,c.from)&&d.isTimeExact(a.to,c.to):!1},c.prototype.isTimeOverlap=function(a,c){var d=this;return h.isInteger(a)&&(h.isDate(c)||b.isArray(c))?a===d.create(c).hour:h.isInteger(c)&&(h.isDate(a)||b.isArray(a))?c===d.create(a).hour:b.isPlainObject(a)&&b.isPlainObject(c)?d.overlapRanges(a,c):!1},c.prototype.flipEnable=function(a){var b=this.item;b.enable=a||(-1==b.enable?1:-1)},c.prototype.deactivate=function(a,c){var d=this,e=d.item.disable.slice(0);return"flip"==c?d.flipEnable():c===!1?(d.flipEnable(1),e=[]):c===!0?(d.flipEnable(-1),e=[]):c.map(function(a){for(var c,f=0;fi;i+=1){if(g=e[i],d.isTimeExact(g,a)){c=e[i]=null,j=!0;break}if(d.isTimeOverlap(g,a)){b.isPlainObject(a)?(a.inverted=!0,c=a):b.isArray(a)?(c=a,c[2]||c.push("inverted")):h.isDate(a)&&(c=[a.getFullYear(),a.getMonth(),a.getDate(),"inverted"]);break}}if(c)for(i=0;f>i;i+=1)if(d.isTimeExact(e[i],a)){e[i]=null;break}if(j)for(i=0;f>i;i+=1)if(d.isTimeOverlap(e[i],a)){e[i]=null;break}c&&e.push(c)}),e.filter(function(a){return null!=a})},c.prototype.i=function(a,b){return h.isInteger(b)&&b>0?b:this.item.interval},c.prototype.nodes=function(a){var b=this,c=b.settings,d=b.item.select,e=b.item.highlight,f=b.item.view,g=b.item.disable;return h.node("ul",h.group({min:b.item.min.pick,max:b.item.max.pick,i:b.item.interval,node:"li",item:function(a){a=b.create(a);var i=a.pick,j=d&&d.pick==i,k=e&&e.pick==i,l=g&&b.disabled(a);return[h.trigger(b.formats.toString,b,[h.trigger(c.formatLabel,b,[a])||c.format,a]),function(a){return j&&a.push(c.klass.selected),k&&a.push(c.klass.highlighted),f&&f.pick==i&&a.push(c.klass.viewset),l&&a.push(c.klass.disabled),a.join(" ")}([c.klass.listItem]),"data-pick="+a.pick+" "+h.ariaAttr({role:"option",selected:j&&b.$node.val()===h.trigger(b.formats.toString,b,[c.format,a])?!0:null,activedescendant:k?!0:null,disabled:l?!0:null})]}})+h.node("li",h.node("button",c.clear,c.klass.buttonClear,"type=button data-clear=1"+(a?"":" disabled")+" "+h.ariaAttr({controls:b.$node[0].id})),"",h.ariaAttr({role:"presentation"})),c.klass.list,h.ariaAttr({role:"listbox",controls:b.$node[0].id}))},c.defaults=function(a){return{clear:"Clear",format:"h:i A",interval:30,klass:{picker:a+" "+a+"--time",holder:a+"__holder",list:a+"__list",listItem:a+"__list-item",disabled:a+"__list-item--disabled",selected:a+"__list-item--selected",highlighted:a+"__list-item--highlighted",viewset:a+"__list-item--viewset",now:a+"__list-item--now",buttonClear:a+"__button--clear"}}}(a.klasses().picker),a.extend("pickatime",c)}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/themes/classic.css b/js/pickadate.js-3.5.3/lib/compressed/themes/classic.css new file mode 100644 index 0000000..9b1e79e --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/themes/classic.css @@ -0,0 +1,4 @@ +.picker{font-size:16px;text-align:left;line-height:1.2;color:#000;position:absolute;z-index:10000;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.picker__input{cursor:default}.picker__input.picker__input--active{border-color:#0089ec}.picker__holder{width:100%;overflow-y:auto;-webkit-overflow-scrolling:touch}/*! + * Classic picker styling for pickadate.js + * Demo: http://amsul.github.io/pickadate.js + */.picker{width:100%}.picker__holder{position:absolute;background:#fff;border:1px solid #aaa;border-top-width:0;border-bottom-width:0;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;min-width:176px;max-width:466px;max-height:0;-ms-filter:"alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;opacity:0;-webkit-transform:translateY(-1em) perspective(600px) rotateX(10deg);-moz-transform:translateY(-1em) perspective(600px) rotateX(10deg);transform:translateY(-1em) perspective(600px) rotateX(10deg);-webkit-transition:-webkit-transform .15s ease-out,opacity .15s ease-out,max-height 0s .15s,border-width 0s .15s;-moz-transition:-moz-transform .15s ease-out,opacity .15s ease-out,max-height 0s .15s,border-width 0s .15s;transition:transform .15s ease-out,opacity .15s ease-out,max-height 0s .15s,border-width 0s .15s}.picker__frame{padding:1px}.picker__wrap{margin:-1px}.picker--opened .picker__holder{max-height:25em;-ms-filter:"alpha(Opacity=100)";filter:alpha(opacity=100);-moz-opacity:1;opacity:1;border-top-width:1px;border-bottom-width:1px;-webkit-transform:translateY(0) perspective(600px) rotateX(0);-moz-transform:translateY(0) perspective(600px) rotateX(0);transform:translateY(0) perspective(600px) rotateX(0);-webkit-transition:-webkit-transform .15s ease-out,opacity .15s ease-out,max-height 0s,border-width 0s;-moz-transition:-moz-transform .15s ease-out,opacity .15s ease-out,max-height 0s,border-width 0s;transition:transform .15s ease-out,opacity .15s ease-out,max-height 0s,border-width 0s;-webkit-box-shadow:0 6px 18px 1px rgba(0,0,0,.12);-moz-box-shadow:0 6px 18px 1px rgba(0,0,0,.12);box-shadow:0 6px 18px 1px rgba(0,0,0,.12)} \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/themes/classic.date.css b/js/pickadate.js-3.5.3/lib/compressed/themes/classic.date.css new file mode 100644 index 0000000..36ba080 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/themes/classic.date.css @@ -0,0 +1 @@ +.picker__box{padding:0 1em}.picker__header{text-align:center;position:relative;margin-top:.75em}.picker__month,.picker__year{font-weight:500;display:inline-block;margin-left:.25em;margin-right:.25em}.picker__year{color:#999;font-size:.8em;font-style:italic}.picker__select--month,.picker__select--year{border:1px solid #b7b7b7;height:2em;padding:.5em;margin-left:.25em;margin-right:.25em}@media (min-width:24.5em){.picker__select--month,.picker__select--year{margin-top:-.5em}}.picker__select--month{width:35%}.picker__select--year{width:22.5%}.picker__select--month:focus,.picker__select--year:focus{border-color:#0089ec}.picker__nav--next,.picker__nav--prev{position:absolute;padding:.5em 1.25em;width:1em;height:1em;box-sizing:content-box;top:-.25em}@media (min-width:24.5em){.picker__nav--next,.picker__nav--prev{top:-.33em}}.picker__nav--prev{left:-1em;padding-right:1.25em}@media (min-width:24.5em){.picker__nav--prev{padding-right:1.5em}}.picker__nav--next{right:-1em;padding-left:1.25em}@media (min-width:24.5em){.picker__nav--next{padding-left:1.5em}}.picker__nav--next:before,.picker__nav--prev:before{content:" ";border-top:.5em solid transparent;border-bottom:.5em solid transparent;border-right:.75em solid #000;width:0;height:0;display:block;margin:0 auto}.picker__nav--next:before{border-right:0;border-left:.75em solid #000}.picker__nav--next:hover,.picker__nav--prev:hover{cursor:pointer;color:#000;background:#b1dcfb}.picker__nav--disabled,.picker__nav--disabled:before,.picker__nav--disabled:before:hover,.picker__nav--disabled:hover{cursor:default;background:0 0;border-right-color:#f5f5f5;border-left-color:#f5f5f5}.picker__table{text-align:center;border-collapse:collapse;border-spacing:0;table-layout:fixed;font-size:inherit;width:100%;margin-top:.75em;margin-bottom:.5em}@media (min-height:33.875em){.picker__table{margin-bottom:.75em}}.picker__table td{margin:0;padding:0}.picker__weekday{width:14.285714286%;font-size:.75em;padding-bottom:.25em;color:#999;font-weight:500}@media (min-height:33.875em){.picker__weekday{padding-bottom:.5em}}.picker__day{padding:.3125em 0;font-weight:200;border:1px solid transparent}.picker__day--today{position:relative}.picker__day--today:before{content:" ";position:absolute;top:2px;right:2px;width:0;height:0;border-top:.5em solid #0059bc;border-left:.5em solid transparent}.picker__day--disabled:before{border-top-color:#aaa}.picker__day--outfocus{color:#ddd}.picker__day--infocus:hover,.picker__day--outfocus:hover{cursor:pointer;color:#000;background:#b1dcfb}.picker__day--highlighted{border-color:#0089ec}.picker--focused .picker__day--highlighted,.picker__day--highlighted:hover{cursor:pointer;color:#000;background:#b1dcfb}.picker--focused .picker__day--selected,.picker__day--selected,.picker__day--selected:hover{background:#0089ec;color:#fff}.picker--focused .picker__day--disabled,.picker__day--disabled,.picker__day--disabled:hover{background:#f5f5f5;border-color:#f5f5f5;color:#ddd;cursor:default}.picker__day--highlighted.picker__day--disabled,.picker__day--highlighted.picker__day--disabled:hover{background:#bbb}.picker__footer{text-align:center}.picker__button--clear,.picker__button--close,.picker__button--today{border:1px solid #fff;background:#fff;font-size:.8em;padding:.66em 0;font-weight:700;width:33%;display:inline-block;vertical-align:bottom}.picker__button--clear:hover,.picker__button--close:hover,.picker__button--today:hover{cursor:pointer;color:#000;background:#b1dcfb;border-bottom-color:#b1dcfb}.picker__button--clear:focus,.picker__button--close:focus,.picker__button--today:focus{background:#b1dcfb;border-color:#0089ec;outline:0}.picker__button--clear:before,.picker__button--close:before,.picker__button--today:before{position:relative;display:inline-block;height:0}.picker__button--clear:before,.picker__button--today:before{content:" ";margin-right:.45em}.picker__button--today:before{top:-.05em;width:0;border-top:.66em solid #0059bc;border-left:.66em solid transparent}.picker__button--clear:before{top:-.25em;width:.66em;border-top:3px solid #e20}.picker__button--close:before{content:"\D7";top:-.1em;vertical-align:top;font-size:1.1em;margin-right:.35em;color:#777}.picker__button--today[disabled],.picker__button--today[disabled]:hover{background:#f5f5f5;border-color:#f5f5f5;color:#ddd;cursor:default}.picker__button--today[disabled]:before{border-top-color:#aaa} \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/themes/classic.time.css b/js/pickadate.js-3.5.3/lib/compressed/themes/classic.time.css new file mode 100644 index 0000000..10cb576 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/themes/classic.time.css @@ -0,0 +1 @@ +.picker__list{list-style:none;padding:.75em 0 4.2em;margin:0}.picker__list-item{border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:-1px;position:relative;background:#fff;padding:.75em 1.25em}@media (min-height:46.75em){.picker__list-item{padding:.5em 1em}}.picker__list-item:hover{cursor:pointer;color:#000;background:#b1dcfb;border-color:#0089ec;z-index:10}.picker__list-item--highlighted{border-color:#0089ec;z-index:10}.picker--focused .picker__list-item--highlighted,.picker__list-item--highlighted:hover{cursor:pointer;color:#000;background:#b1dcfb}.picker--focused .picker__list-item--selected,.picker__list-item--selected,.picker__list-item--selected:hover{background:#0089ec;color:#fff;z-index:10}.picker--focused .picker__list-item--disabled,.picker__list-item--disabled,.picker__list-item--disabled:hover{background:#f5f5f5;color:#ddd;cursor:default;border-color:#ddd;z-index:auto}.picker--time .picker__button--clear{display:block;width:80%;margin:1em auto 0;padding:1em 1.25em;background:0 0;border:0;font-weight:500;font-size:.67em;text-align:center;text-transform:uppercase;color:#666}.picker--time .picker__button--clear:focus,.picker--time .picker__button--clear:hover{background:#b1dcfb;background:#e20;border-color:#e20;cursor:pointer;color:#fff;outline:0}.picker--time .picker__button--clear:before{top:-.25em;color:#666;font-size:1.25em;font-weight:700}.picker--time .picker__button--clear:focus:before,.picker--time .picker__button--clear:hover:before{color:#fff}.picker--time{min-width:256px;max-width:320px}.picker--time .picker__holder{background:#f2f2f2}@media (min-height:40.125em){.picker--time .picker__holder{font-size:.875em}}.picker--time .picker__box{padding:0;position:relative} \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/themes/default.css b/js/pickadate.js-3.5.3/lib/compressed/themes/default.css new file mode 100644 index 0000000..5017801 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/themes/default.css @@ -0,0 +1,4 @@ +.picker{font-size:16px;text-align:left;line-height:1.2;color:#000;position:absolute;z-index:10000;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.picker__input{cursor:default}.picker__input.picker__input--active{border-color:#0089ec}.picker__holder{width:100%;overflow-y:auto;-webkit-overflow-scrolling:touch}/*! + * Default mobile-first, responsive styling for pickadate.js + * Demo: http://amsul.github.io/pickadate.js + */.picker__frame,.picker__holder{bottom:0;left:0;right:0;top:100%}.picker__holder{position:fixed;-webkit-transition:background .15s ease-out,top 0s .15s;-moz-transition:background .15s ease-out,top 0s .15s;transition:background .15s ease-out,top 0s .15s;-webkit-backface-visibility:hidden}.picker__frame{position:absolute;margin:0 auto;min-width:256px;max-width:666px;width:100%;-ms-filter:"alpha(Opacity=0)";filter:alpha(opacity=0);-moz-opacity:0;opacity:0;-webkit-transition:all .15s ease-out;-moz-transition:all .15s ease-out;transition:all .15s ease-out}@media (min-height:33.875em){.picker__frame{overflow:visible;top:auto;bottom:-100%;max-height:80%}}@media (min-height:40.125em){.picker__frame{margin-bottom:7.5%}}.picker__wrap{display:table;width:100%;height:100%}@media (min-height:33.875em){.picker__wrap{display:block}}.picker__box{background:#fff;display:table-cell;vertical-align:middle}@media (min-height:26.5em){.picker__box{font-size:1.25em}}@media (min-height:33.875em){.picker__box{display:block;font-size:1.33em;border:1px solid #777;border-top-color:#898989;border-bottom-width:0;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;-webkit-box-shadow:0 12px 36px 16px rgba(0,0,0,.24);-moz-box-shadow:0 12px 36px 16px rgba(0,0,0,.24);box-shadow:0 12px 36px 16px rgba(0,0,0,.24)}}@media (min-height:40.125em){.picker__box{font-size:1.5em;border-bottom-width:1px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}}.picker--opened .picker__holder{top:0;zoom:1;background:rgba(0,0,0,.32);-webkit-transition:background .15s ease-out;-moz-transition:background .15s ease-out;transition:background .15s ease-out}.picker--opened .picker__frame{top:0;-ms-filter:"alpha(Opacity=100)";filter:alpha(opacity=100);-moz-opacity:1;opacity:1}@media (min-height:33.875em){.picker--opened .picker__frame{top:auto;bottom:0}} \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/themes/default.date.css b/js/pickadate.js-3.5.3/lib/compressed/themes/default.date.css new file mode 100644 index 0000000..36ba080 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/themes/default.date.css @@ -0,0 +1 @@ +.picker__box{padding:0 1em}.picker__header{text-align:center;position:relative;margin-top:.75em}.picker__month,.picker__year{font-weight:500;display:inline-block;margin-left:.25em;margin-right:.25em}.picker__year{color:#999;font-size:.8em;font-style:italic}.picker__select--month,.picker__select--year{border:1px solid #b7b7b7;height:2em;padding:.5em;margin-left:.25em;margin-right:.25em}@media (min-width:24.5em){.picker__select--month,.picker__select--year{margin-top:-.5em}}.picker__select--month{width:35%}.picker__select--year{width:22.5%}.picker__select--month:focus,.picker__select--year:focus{border-color:#0089ec}.picker__nav--next,.picker__nav--prev{position:absolute;padding:.5em 1.25em;width:1em;height:1em;box-sizing:content-box;top:-.25em}@media (min-width:24.5em){.picker__nav--next,.picker__nav--prev{top:-.33em}}.picker__nav--prev{left:-1em;padding-right:1.25em}@media (min-width:24.5em){.picker__nav--prev{padding-right:1.5em}}.picker__nav--next{right:-1em;padding-left:1.25em}@media (min-width:24.5em){.picker__nav--next{padding-left:1.5em}}.picker__nav--next:before,.picker__nav--prev:before{content:" ";border-top:.5em solid transparent;border-bottom:.5em solid transparent;border-right:.75em solid #000;width:0;height:0;display:block;margin:0 auto}.picker__nav--next:before{border-right:0;border-left:.75em solid #000}.picker__nav--next:hover,.picker__nav--prev:hover{cursor:pointer;color:#000;background:#b1dcfb}.picker__nav--disabled,.picker__nav--disabled:before,.picker__nav--disabled:before:hover,.picker__nav--disabled:hover{cursor:default;background:0 0;border-right-color:#f5f5f5;border-left-color:#f5f5f5}.picker__table{text-align:center;border-collapse:collapse;border-spacing:0;table-layout:fixed;font-size:inherit;width:100%;margin-top:.75em;margin-bottom:.5em}@media (min-height:33.875em){.picker__table{margin-bottom:.75em}}.picker__table td{margin:0;padding:0}.picker__weekday{width:14.285714286%;font-size:.75em;padding-bottom:.25em;color:#999;font-weight:500}@media (min-height:33.875em){.picker__weekday{padding-bottom:.5em}}.picker__day{padding:.3125em 0;font-weight:200;border:1px solid transparent}.picker__day--today{position:relative}.picker__day--today:before{content:" ";position:absolute;top:2px;right:2px;width:0;height:0;border-top:.5em solid #0059bc;border-left:.5em solid transparent}.picker__day--disabled:before{border-top-color:#aaa}.picker__day--outfocus{color:#ddd}.picker__day--infocus:hover,.picker__day--outfocus:hover{cursor:pointer;color:#000;background:#b1dcfb}.picker__day--highlighted{border-color:#0089ec}.picker--focused .picker__day--highlighted,.picker__day--highlighted:hover{cursor:pointer;color:#000;background:#b1dcfb}.picker--focused .picker__day--selected,.picker__day--selected,.picker__day--selected:hover{background:#0089ec;color:#fff}.picker--focused .picker__day--disabled,.picker__day--disabled,.picker__day--disabled:hover{background:#f5f5f5;border-color:#f5f5f5;color:#ddd;cursor:default}.picker__day--highlighted.picker__day--disabled,.picker__day--highlighted.picker__day--disabled:hover{background:#bbb}.picker__footer{text-align:center}.picker__button--clear,.picker__button--close,.picker__button--today{border:1px solid #fff;background:#fff;font-size:.8em;padding:.66em 0;font-weight:700;width:33%;display:inline-block;vertical-align:bottom}.picker__button--clear:hover,.picker__button--close:hover,.picker__button--today:hover{cursor:pointer;color:#000;background:#b1dcfb;border-bottom-color:#b1dcfb}.picker__button--clear:focus,.picker__button--close:focus,.picker__button--today:focus{background:#b1dcfb;border-color:#0089ec;outline:0}.picker__button--clear:before,.picker__button--close:before,.picker__button--today:before{position:relative;display:inline-block;height:0}.picker__button--clear:before,.picker__button--today:before{content:" ";margin-right:.45em}.picker__button--today:before{top:-.05em;width:0;border-top:.66em solid #0059bc;border-left:.66em solid transparent}.picker__button--clear:before{top:-.25em;width:.66em;border-top:3px solid #e20}.picker__button--close:before{content:"\D7";top:-.1em;vertical-align:top;font-size:1.1em;margin-right:.35em;color:#777}.picker__button--today[disabled],.picker__button--today[disabled]:hover{background:#f5f5f5;border-color:#f5f5f5;color:#ddd;cursor:default}.picker__button--today[disabled]:before{border-top-color:#aaa} \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/themes/default.time.css b/js/pickadate.js-3.5.3/lib/compressed/themes/default.time.css new file mode 100644 index 0000000..f1783ca --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/themes/default.time.css @@ -0,0 +1 @@ +.picker__list{list-style:none;padding:.75em 0 4.2em;margin:0}.picker__list-item{border-bottom:1px solid #ddd;border-top:1px solid #ddd;margin-bottom:-1px;position:relative;background:#fff;padding:.75em 1.25em}@media (min-height:46.75em){.picker__list-item{padding:.5em 1em}}.picker__list-item:hover{cursor:pointer;color:#000;background:#b1dcfb;border-color:#0089ec;z-index:10}.picker__list-item--highlighted{border-color:#0089ec;z-index:10}.picker--focused .picker__list-item--highlighted,.picker__list-item--highlighted:hover{cursor:pointer;color:#000;background:#b1dcfb}.picker--focused .picker__list-item--selected,.picker__list-item--selected,.picker__list-item--selected:hover{background:#0089ec;color:#fff;z-index:10}.picker--focused .picker__list-item--disabled,.picker__list-item--disabled,.picker__list-item--disabled:hover{background:#f5f5f5;color:#ddd;cursor:default;border-color:#ddd;z-index:auto}.picker--time .picker__button--clear{display:block;width:80%;margin:1em auto 0;padding:1em 1.25em;background:0 0;border:0;font-weight:500;font-size:.67em;text-align:center;text-transform:uppercase;color:#666}.picker--time .picker__button--clear:focus,.picker--time .picker__button--clear:hover{background:#b1dcfb;background:#e20;border-color:#e20;cursor:pointer;color:#fff;outline:0}.picker--time .picker__button--clear:before{top:-.25em;color:#666;font-size:1.25em;font-weight:700}.picker--time .picker__button--clear:focus:before,.picker--time .picker__button--clear:hover:before{color:#fff}.picker--time .picker__frame{min-width:256px;max-width:320px}.picker--time .picker__box{font-size:1em;background:#f2f2f2;padding:0}@media (min-height:40.125em){.picker--time .picker__box{margin-bottom:5em}} \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/themes/rtl.css b/js/pickadate.js-3.5.3/lib/compressed/themes/rtl.css new file mode 100644 index 0000000..0b9d69f --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/themes/rtl.css @@ -0,0 +1,3 @@ +/*! + * Styling for RTL (right-to-left) languages using pickadate.js + */.picker{direction:rtl}.picker__nav--next{right:auto;left:-1em}.picker__nav--prev{left:auto;right:-1em}.picker__nav--next:before{border-left:0;border-right:.75em solid #000}.picker__nav--prev:before{border-right:0;border-left:.75em solid #000} \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/ar.js b/js/pickadate.js-3.5.3/lib/compressed/translations/ar.js new file mode 100644 index 0000000..cf62b8d --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/ar.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],monthsShort:["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],weekdaysFull:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],weekdaysShort:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة","السبت"],today:"اليوم",clear:"مسح",format:"yyyy mmmm dd",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/bg_BG.js b/js/pickadate.js-3.5.3/lib/compressed/translations/bg_BG.js new file mode 100644 index 0000000..ca1d2f1 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/bg_BG.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември"],monthsShort:["янр","фев","мар","апр","май","юни","юли","авг","сеп","окт","ное","дек"],weekdaysFull:["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"],weekdaysShort:["нд","пн","вт","ср","чт","пт","сб"],today:"днес",clear:"изтривам",firstDay:1,format:"d mmmm yyyy г.",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/bs_BA.js b/js/pickadate.js-3.5.3/lib/compressed/translations/bs_BA.js new file mode 100644 index 0000000..7cbf3a1 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/bs_BA.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["januar","februar","mart","april","maj","juni","juli","august","septembar","oktobar","novembar","decembar"],monthsShort:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],weekdaysFull:["nedjelja","ponedjeljak","utorak","srijeda","cetvrtak","petak","subota"],weekdaysShort:["ne","po","ut","sr","če","pe","su"],today:"danas",clear:"izbrisati",firstDay:1,format:"dd. mmmm yyyy.",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/ca_ES.js b/js/pickadate.js-3.5.3/lib/compressed/translations/ca_ES.js new file mode 100644 index 0000000..583126b --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/ca_ES.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Gener","Febrer","Març","Abril","Maig","juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],monthsShort:["Gen","Feb","Mar","Abr","Mai","Jun","Jul","Ago","Set","Oct","Nov","Des"],weekdaysFull:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],weekdaysShort:["diu","dil","dim","dmc","dij","div","dis"],today:"avui",clear:"esborrar",firstDay:1,format:"dddd d !de mmmm !de yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/cs_CZ.js b/js/pickadate.js-3.5.3/lib/compressed/translations/cs_CZ.js new file mode 100644 index 0000000..1a67bfc --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/cs_CZ.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],monthsShort:["led","úno","bře","dub","kvě","čer","čvc","srp","zář","říj","lis","pro"],weekdaysFull:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],weekdaysShort:["ne","po","út","st","čt","pá","so"],today:"dnes",clear:"vymazat",firstDay:1,format:"d. mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/da_DK.js b/js/pickadate.js-3.5.3/lib/compressed/translations/da_DK.js new file mode 100644 index 0000000..adc6d38 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/da_DK.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],monthsShort:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],weekdaysFull:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],weekdaysShort:["søn","man","tir","ons","tor","fre","lør"],today:"i dag",clear:"slet",firstDay:1,format:"d. mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/de_DE.js b/js/pickadate.js-3.5.3/lib/compressed/translations/de_DE.js new file mode 100644 index 0000000..aa961d8 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/de_DE.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],weekdaysFull:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekdaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],today:"Heute",clear:"Löschen",firstDay:1,format:"dddd, dd. mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/el_GR.js b/js/pickadate.js-3.5.3/lib/compressed/translations/el_GR.js new file mode 100644 index 0000000..0228109 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/el_GR.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],monthsShort:["Ιαν","Φεβ","Μαρ","Απρ","Μαι","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],weekdaysFull:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],weekdaysShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],today:"σήμερα",clear:"Διαγραφή",firstDay:1,format:"d mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/es_ES.js b/js/pickadate.js-3.5.3/lib/compressed/translations/es_ES.js new file mode 100644 index 0000000..774ba68 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/es_ES.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],monthsShort:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],weekdaysFull:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],weekdaysShort:["dom","lun","mar","mié","jue","vie","sáb"],today:"hoy",clear:"borrar",firstDay:1,format:"dddd d !de mmmm !de yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/et_EE.js b/js/pickadate.js-3.5.3/lib/compressed/translations/et_EE.js new file mode 100644 index 0000000..30226ab --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/et_EE.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember"],monthsShort:["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets"],weekdaysFull:["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"],weekdaysShort:["püh","esm","tei","kol","nel","ree","lau"],today:"täna",clear:"kustutama",firstDay:1,format:"d. mmmm yyyy. a",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/eu_ES.js b/js/pickadate.js-3.5.3/lib/compressed/translations/eu_ES.js new file mode 100644 index 0000000..5407040 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/eu_ES.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua"],monthsShort:["urt","ots","mar","api","mai","eka","uzt","abu","ira","urr","aza","abe"],weekdaysFull:["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],weekdaysShort:["ig.","al.","ar.","az.","og.","or.","lr."],today:"gaur",clear:"garbitu",firstDay:1,format:"dddd, yyyy(e)ko mmmmren da",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/fi_FI.js b/js/pickadate.js-3.5.3/lib/compressed/translations/fi_FI.js new file mode 100644 index 0000000..d55e1bb --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/fi_FI.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu"],weekdaysFull:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],weekdaysShort:["su","ma","ti","ke","to","pe","la"],today:"tänään",clear:"tyhjennä",firstDay:1,format:"d.m.yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/fr_FR.js b/js/pickadate.js-3.5.3/lib/compressed/translations/fr_FR.js new file mode 100644 index 0000000..1e9e0cc --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/fr_FR.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fev","Mar","Avr","Mai","Juin","Juil","Aou","Sep","Oct","Nov","Dec"],weekdaysFull:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekdaysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],today:"Aujourd'hui",clear:"Effacer",firstDay:1,format:"dd mmmm yyyy",formatSubmit:"yyyy/mm/dd",labelMonthNext:"Mois suivant",labelMonthPrev:"Mois précédent",labelMonthSelect:"Sélectionner un mois",labelYearSelect:"Sélectionner une année"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/gl_ES.js b/js/pickadate.js-3.5.3/lib/compressed/translations/gl_ES.js new file mode 100644 index 0000000..d67e6ad --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/gl_ES.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Xaneiro","Febreiro","Marzo","Abril","Maio","Xuño","Xullo","Agosto","Setembro","Outubro","Novembro","Decembro"],monthsShort:["xan","feb","mar","abr","mai","xun","xul","ago","sep","out","nov","dec"],weekdaysFull:["domingo","luns","martes","mércores","xoves","venres","sábado"],weekdaysShort:["dom","lun","mar","mér","xov","ven","sab"],today:"hoxe",clear:"borrar",firstDay:1,format:"dddd d !de mmmm !de yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/he_IL.js b/js/pickadate.js-3.5.3/lib/compressed/translations/he_IL.js new file mode 100644 index 0000000..6d03986 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/he_IL.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],monthsShort:["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ"],weekdaysFull:["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום ששי","יום שבת"],weekdaysShort:["א","ב","ג","ד","ה","ו","ש"],today:"היום",clear:"למחוק",format:"yyyy mmmmב d dddd",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/hr_HR.js b/js/pickadate.js-3.5.3/lib/compressed/translations/hr_HR.js new file mode 100644 index 0000000..9115d13 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/hr_HR.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["sijećanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac"],monthsShort:["sij","velj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro"],weekdaysFull:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],weekdaysShort:["ned","pon","uto","sri","čet","pet","sub"],today:"danas",clear:"izbrisati",firstDay:1,format:"d. mmmm yyyy.",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/hu_HU.js b/js/pickadate.js-3.5.3/lib/compressed/translations/hu_HU.js new file mode 100644 index 0000000..5d6b68f --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/hu_HU.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december"],monthsShort:["jan","febr","márc","ápr","máj","jún","júl","aug","szept","okt","nov","dec"],weekdaysFull:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],weekdaysShort:["V","H","K","SZe","CS","P","SZo"],today:"Ma",clear:"Törlés",firstDay:1,format:"yyyy. mmmm dd.",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/id_ID.js b/js/pickadate.js-3.5.3/lib/compressed/translations/id_ID.js new file mode 100644 index 0000000..3cf2e6b --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/id_ID.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des"],weekdaysFull:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],weekdaysShort:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],today:"hari ini",clear:"menghapus",firstDay:1,format:"d mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/is_IS.js b/js/pickadate.js-3.5.3/lib/compressed/translations/is_IS.js new file mode 100644 index 0000000..cb9d91e --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/is_IS.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["janúar","febrúar","mars","apríl","maí","júní","júlí","ágúst","september","október","nóvember","desember"],monthsShort:["jan","feb","mar","apr","maí","jún","júl","ágú","sep","okt","nóv","des"],weekdaysFull:["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"],weekdaysShort:["sun","mán","þri","mið","fim","fös","lau"],today:"Í dag",clear:"Hreinsa",firstDay:1,format:"dd. mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/it_IT.js b/js/pickadate.js-3.5.3/lib/compressed/translations/it_IT.js new file mode 100644 index 0000000..eed9016 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/it_IT.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],monthsShort:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],weekdaysFull:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],weekdaysShort:["dom","lun","mar","mer","gio","ven","sab"],today:"oggi",clear:"cancellare",firstDay:1,format:"dddd d mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/ja_JP.js b/js/pickadate.js-3.5.3/lib/compressed/translations/ja_JP.js new file mode 100644 index 0000000..86d508d --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/ja_JP.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],weekdaysFull:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],weekdaysShort:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],today:"今日",clear:"消去",firstDay:1,format:"yyyy mm dd",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/ko_KR.js b/js/pickadate.js-3.5.3/lib/compressed/translations/ko_KR.js new file mode 100644 index 0000000..76eaa84 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/ko_KR.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],weekdaysFull:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],weekdaysShort:["일","월","화","수","목","금","토"],today:"오늘",clear:"취소",firstDay:1,format:"yyyy 년 mm 월 dd 일",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/ne_NP.js b/js/pickadate.js-3.5.3/lib/compressed/translations/ne_NP.js new file mode 100644 index 0000000..393df81 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/ne_NP.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["जनवरी","फेब्रुअरी","मार्च","अप्रिल","मे","जुन","जुलाई","अगस्त","सेप्टेम्बर","अक्टोबर","नोवेम्बर","डिसेम्बर"],monthsShort:["जन","फेब्रु","मार्च","अप्रिल","मे","जुन","जुल","अग","सेप्टे","अक्टो","नोभे","डिसे"],weekdaysFull:["सोमबार","मङ्लबार","बुधबार","बिहीबार","शुक्रबार","शनिबार","आईतबार"],weekdaysShort:["सोम","मंगल्","बुध","बिही","शुक्र","शनि","आईत"],numbers:["०","१","२","३","४","५","६","७","८","९"],today:"आज",clear:"मेटाउनुहोस्",format:"dddd, dd mmmm, yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/nl_NL.js b/js/pickadate.js-3.5.3/lib/compressed/translations/nl_NL.js new file mode 100644 index 0000000..59e6882 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/nl_NL.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],monthsShort:["jan","feb","maa","apr","mei","jun","jul","aug","sep","okt","nov","dec"],weekdaysFull:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],weekdaysShort:["zo","ma","di","wo","do","vr","za"],today:"vandaag",clear:"verwijderen",firstDay:1,format:"dddd d mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/no_NO.js b/js/pickadate.js-3.5.3/lib/compressed/translations/no_NO.js new file mode 100644 index 0000000..bdcf262 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/no_NO.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],monthsShort:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],weekdaysFull:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],weekdaysShort:["søn","man","tir","ons","tor","fre","lør"],today:"i dag",clear:"nullstill",firstDay:1,format:"dd. mmm. yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/pl_PL.js b/js/pickadate.js-3.5.3/lib/compressed/translations/pl_PL.js new file mode 100644 index 0000000..aacfc04 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/pl_PL.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],monthsShort:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],weekdaysFull:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],weekdaysShort:["N","Pn","Wt","Śr","Cz","Pt","So"],today:"dzisiaj",clear:"usunąć",firstDay:1,format:"d mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/pt_BR.js b/js/pickadate.js-3.5.3/lib/compressed/translations/pt_BR.js new file mode 100644 index 0000000..cab7934 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/pt_BR.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],monthsShort:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],weekdaysFull:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],weekdaysShort:["dom","seg","ter","qua","qui","sex","sab"],today:"hoje",clear:"excluir",format:"dddd, d !de mmmm !de yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/pt_PT.js b/js/pickadate.js-3.5.3/lib/compressed/translations/pt_PT.js new file mode 100644 index 0000000..5485df3 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/pt_PT.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],monthsShort:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],weekdaysFull:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],weekdaysShort:["dom","seg","ter","qua","qui","sex","sab"],today:"hoje",clear:"excluir",format:"d !de mmmm !de yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/ro_RO.js b/js/pickadate.js-3.5.3/lib/compressed/translations/ro_RO.js new file mode 100644 index 0000000..3a53e7f --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/ro_RO.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"],monthsShort:["ian","feb","mar","apr","mai","iun","iul","aug","sep","oct","noi","dec"],weekdaysFull:["duminică","luni","marţi","miercuri","joi","vineri","sâmbătă"],weekdaysShort:["D","L","Ma","Mi","J","V","S"],today:"azi",clear:"șterge",firstDay:1,format:"dd mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/ru_RU.js b/js/pickadate.js-3.5.3/lib/compressed/translations/ru_RU.js new file mode 100644 index 0000000..0b16e0b --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/ru_RU.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],weekdaysFull:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],weekdaysShort:["вс","пн","вт","ср","чт","пт","сб"],today:"сегодня",clear:"удалить",firstDay:1,format:"d mmmm yyyy г.",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/sk_SK.js b/js/pickadate.js-3.5.3/lib/compressed/translations/sk_SK.js new file mode 100644 index 0000000..f867b08 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/sk_SK.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december"],monthsShort:["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"],weekdaysFull:["nedeļľa","pondelok","utorok","streda","š̌švrtok","piatok","sobota"],weekdaysShort:["Ne","Po","Ut","St","Št","Pi","So"],today:"dnes",clear:"vymazať",firstDay:1,format:"d. mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/sl_SI.js b/js/pickadate.js-3.5.3/lib/compressed/translations/sl_SI.js new file mode 100644 index 0000000..5eac8e2 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/sl_SI.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december"],monthsShort:["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec"],weekdaysFull:["nedelja","ponedeljek","torek","sreda","četrtek","petek","sobota"],weekdaysShort:["ned","pon","tor","sre","čet","pet","sob"],today:"danes",clear:"izbriši",firstDay:1,format:"d. mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/sv_SE.js b/js/pickadate.js-3.5.3/lib/compressed/translations/sv_SE.js new file mode 100644 index 0000000..e537bb1 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/sv_SE.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],monthsShort:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],weekdaysFull:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],weekdaysShort:["sön","mån","tis","ons","tor","fre","lör"],today:"i dag",clear:"bort",firstDay:1,format:"d/m yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/th_TH.js b/js/pickadate.js-3.5.3/lib/compressed/translations/th_TH.js new file mode 100644 index 0000000..72f2e7d --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/th_TH.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],weekdaysFull:["อาทติย","จันทร","องัคาร","พุธ","พฤหสั บดี","ศกุร","เสาร"],weekdaysShort:["อ.","จ.","อ.","พ.","พฤ.","ศ.","ส."],today:"วันนี้",clear:"ลบ",format:"d mmmm yyyy",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/tr_TR.js b/js/pickadate.js-3.5.3/lib/compressed/translations/tr_TR.js new file mode 100644 index 0000000..f957781 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/tr_TR.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],weekdaysFull:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],weekdaysShort:["Pzr","Pzt","Sal","Çrş","Prş","Cum","Cmt"],today:"bugün",clear:"sil",firstDay:1,format:"dd mmmm yyyy dddd",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/uk_UA.js b/js/pickadate.js-3.5.3/lib/compressed/translations/uk_UA.js new file mode 100644 index 0000000..874e474 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/uk_UA.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"],monthsShort:["січ","лют","бер","кві","тра","чер","лип","сер","вер","жов","лис","гру"],weekdaysFull:["неділя","понеділок","вівторок","середа","четвер","п‘ятниця","субота"],weekdaysShort:["нд","пн","вт","ср","чт","пт","сб"],today:"сьогодні",clear:"викреслити",firstDay:1,format:"dd mmmm yyyy p.",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/vi_VN.js b/js/pickadate.js-3.5.3/lib/compressed/translations/vi_VN.js new file mode 100644 index 0000000..8ab8f07 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/vi_VN.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["Tháng Một","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai"],monthsShort:["Một","Hai","Ba","Tư","Năm","Sáu","Bảy","Tám","Chín","Mưới","Mười Một","Mười Hai"],weekdaysFull:["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"],weekdaysShort:["C.Nhật","T.Hai","T.Ba","T.Tư","T.Năm","T.Sáu","T.Bảy"],today:"Hôm Nay",clear:"Xoá",firstDay:1}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/zh_CN.js b/js/pickadate.js-3.5.3/lib/compressed/translations/zh_CN.js new file mode 100644 index 0000000..2eb9cea --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/zh_CN.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一","二","三","四","五","六","七","八","九","十","十一","十二"],weekdaysFull:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],weekdaysShort:["日","一","二","三","四","五","六"],today:"今日",clear:"删",firstDay:1,format:"yyyy 年 mm 月 dd 日",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/compressed/translations/zh_TW.js b/js/pickadate.js-3.5.3/lib/compressed/translations/zh_TW.js new file mode 100644 index 0000000..d8845a3 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/compressed/translations/zh_TW.js @@ -0,0 +1 @@ +jQuery.extend(jQuery.fn.pickadate.defaults,{monthsFull:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一","二","三","四","五","六","七","八","九","十","十一","十二"],weekdaysFull:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],weekdaysShort:["日","一","二","三","四","五","六"],today:"今天",clear:"清除",firstDay:1,format:"yyyy 年 mm 月 dd 日",formatSubmit:"yyyy/mm/dd"}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/legacy.js b/js/pickadate.js-3.5.3/lib/legacy.js new file mode 100644 index 0000000..6af504e --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/legacy.js @@ -0,0 +1,133 @@ + +/*jshint + asi: true, + unused: true, + boss: true, + loopfunc: true, + eqnull: true + */ + + +/*! + * Legacy browser support + */ + + +// Map array support +if ( ![].map ) { + Array.prototype.map = function ( callback, self ) { + var array = this, len = array.length, newArray = new Array( len ) + for ( var i = 0; i < len; i++ ) { + if ( i in array ) { + newArray[ i ] = callback.call( self, array[ i ], i, array ) + } + } + return newArray + } +} + + +// Filter array support +if ( ![].filter ) { + Array.prototype.filter = function( callback ) { + if ( this == null ) throw new TypeError() + var t = Object( this ), len = t.length >>> 0 + if ( typeof callback != 'function' ) throw new TypeError() + var newArray = [], thisp = arguments[ 1 ] + for ( var i = 0; i < len; i++ ) { + if ( i in t ) { + var val = t[ i ] + if ( callback.call( thisp, val, i, t ) ) newArray.push( val ) + } + } + return newArray + } +} + + +// Index of array support +if ( ![].indexOf ) { + Array.prototype.indexOf = function( searchElement ) { + if ( this == null ) throw new TypeError() + var t = Object( this ), len = t.length >>> 0 + if ( len === 0 ) return -1 + var n = 0 + if ( arguments.length > 1 ) { + n = Number( arguments[ 1 ] ) + if ( n != n ) { + n = 0 + } + else if ( n !== 0 && n != Infinity && n != -Infinity ) { + n = ( n > 0 || -1 ) * Math.floor( Math.abs( n ) ) + } + } + if ( n >= len ) return -1 + var k = n >= 0 ? n : Math.max( len - Math.abs( n ), 0 ) + for ( ; k < len; k++ ) { + if ( k in t && t[ k ] === searchElement ) return k + } + return -1 + } +} + + +/*! + * Cross-Browser Split 1.1.1 + * Copyright 2007-2012 Steven Levithan + * Available under the MIT License + * http://blog.stevenlevithan.com/archives/cross-browser-split + */ +var nativeSplit = String.prototype.split, compliantExecNpcg = /()??/.exec('')[1] === undefined +String.prototype.split = function(separator, limit) { + var str = this + if (Object.prototype.toString.call(separator) !== '[object RegExp]') { + return nativeSplit.call(str, separator, limit) + } + var output = [], + flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.extended ? 'x' : '') + + (separator.sticky ? 'y' : ''), + lastLastIndex = 0, + separator2, match, lastIndex, lastLength + separator = new RegExp(separator.source, flags + 'g') + str += '' + if (!compliantExecNpcg) { + separator2 = new RegExp('^' + separator.source + '$(?!\\s)', flags) + } + limit = limit === undefined ? -1 >>> 0 : limit >>> 0 + while (match = separator.exec(str)) { + lastIndex = match.index + match[0].length + if (lastIndex > lastLastIndex) { + output.push(str.slice(lastLastIndex, match.index)) + if (!compliantExecNpcg && match.length > 1) { + match[0].replace(separator2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) { + match[i] = undefined + } + } + }) + } + if (match.length > 1 && match.index < str.length) { + Array.prototype.push.apply(output, match.slice(1)) + } + lastLength = match[0].length + lastLastIndex = lastIndex + if (output.length >= limit) { + break + } + } + if (separator.lastIndex === match.index) { + separator.lastIndex++ + } + } + if (lastLastIndex === str.length) { + if (lastLength || !separator.test('')) { + output.push('') + } + } else { + output.push(str.slice(lastLastIndex)) + } + return output.length > limit ? output.slice(0, limit) : output +}; diff --git a/js/pickadate.js-3.5.3/lib/picker.date.js b/js/pickadate.js-3.5.3/lib/picker.date.js new file mode 100644 index 0000000..eedd009 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/picker.date.js @@ -0,0 +1,1349 @@ + +/*! + * Date picker for pickadate.js v3.5.3 + * http://amsul.github.io/pickadate.js/date.htm + */ + +(function ( factory ) { + + // AMD. + if ( typeof define == 'function' && define.amd ) + define( ['picker','jquery'], factory ) + + // Node.js/browserify. + else if ( typeof exports == 'object' ) + module.exports = factory( require('./picker.js'), require('jquery') ) + + // Browser globals. + else factory( Picker, jQuery ) + +}(function( Picker, $ ) { + + +/** + * Globals and constants + */ +var DAYS_IN_WEEK = 7, + WEEKS_IN_CALENDAR = 6, + _ = Picker._ + + + +/** + * The date picker constructor + */ +function DatePicker( picker, settings ) { + + var calendar = this, + element = picker.$node[ 0 ], + elementValue = element.value, + elementDataValue = picker.$node.data( 'value' ), + valueString = elementDataValue || elementValue, + formatString = elementDataValue ? settings.formatSubmit : settings.format, + isRTL = function() { + + return element.currentStyle ? + + // For IE. + element.currentStyle.direction == 'rtl' : + + // For normal browsers. + getComputedStyle( picker.$root[0] ).direction == 'rtl' + } + + calendar.settings = settings + calendar.$node = picker.$node + + // The queue of methods that will be used to build item objects. + calendar.queue = { + min: 'measure create', + max: 'measure create', + now: 'now create', + select: 'parse create validate', + highlight: 'parse navigate create validate', + view: 'parse create validate viewset', + disable: 'deactivate', + enable: 'activate' + } + + // The component's item object. + calendar.item = {} + + calendar.item.clear = null + calendar.item.disable = ( settings.disable || [] ).slice( 0 ) + calendar.item.enable = -(function( collectionDisabled ) { + return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1 + })( calendar.item.disable ) + + calendar. + set( 'min', settings.min ). + set( 'max', settings.max ). + set( 'now' ) + + // When there’s a value, set the `select`, which in turn + // also sets the `highlight` and `view`. + if ( valueString ) { + calendar.set( 'select', valueString, { format: formatString }) + } + + // If there’s no value, default to highlighting “today”. + else { + calendar. + set( 'select', null ). + set( 'highlight', calendar.item.now ) + } + + + // The keycode to movement mapping. + calendar.key = { + 40: 7, // Down + 38: -7, // Up + 39: function() { return isRTL() ? -1 : 1 }, // Right + 37: function() { return isRTL() ? 1 : -1 }, // Left + go: function( timeChange ) { + var highlightedObject = calendar.item.highlight, + targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange ) + calendar.set( + 'highlight', + [ targetDate.getFullYear(), targetDate.getMonth(), targetDate.getDate() ], + { interval: timeChange } + ) + this.render() + } + } + + + // Bind some picker events. + picker. + on( 'render', function() { + picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() { + var value = this.value + if ( value ) { + picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] ) + picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' ) + } + }) + picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() { + var value = this.value + if ( value ) { + picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] ) + picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' ) + } + }) + }, 1 ). + on( 'open', function() { + var includeToday = '' + if ( calendar.disabled( calendar.get('now') ) ) { + includeToday = ':not(.' + settings.klass.buttonToday + ')' + } + picker.$root.find( 'button' + includeToday + ', select' ).attr( 'disabled', false ) + }, 1 ). + on( 'close', function() { + picker.$root.find( 'button, select' ).attr( 'disabled', true ) + }, 1 ) + +} //DatePicker + + +/** + * Set a datepicker item object. + */ +DatePicker.prototype.set = function( type, value, options ) { + + var calendar = this, + calendarItem = calendar.item + + // If the value is `null` just set it immediately. + if ( value === null ) { + if ( type == 'clear' ) type = 'select' + calendarItem[ type ] = value + return calendar + } + + // Otherwise go through the queue of methods, and invoke the functions. + // Update this as the time unit, and set the final value as this item. + // * In the case of `enable`, keep the queue but set `disable` instead. + // And in the case of `flip`, keep the queue but set `enable` instead. + calendarItem[ ( type == 'enable' ? 'disable' : type == 'flip' ? 'enable' : type ) ] = calendar.queue[ type ].split( ' ' ).map( function( method ) { + value = calendar[ method ]( type, value, options ) + return value + }).pop() + + // Check if we need to cascade through more updates. + if ( type == 'select' ) { + calendar.set( 'highlight', calendarItem.select, options ) + } + else if ( type == 'highlight' ) { + calendar.set( 'view', calendarItem.highlight, options ) + } + else if ( type.match( /^(flip|min|max|disable|enable)$/ ) ) { + if ( calendarItem.select && calendar.disabled( calendarItem.select ) ) { + calendar.set( 'select', calendarItem.select, options ) + } + if ( calendarItem.highlight && calendar.disabled( calendarItem.highlight ) ) { + calendar.set( 'highlight', calendarItem.highlight, options ) + } + } + + return calendar +} //DatePicker.prototype.set + + +/** + * Get a datepicker item object. + */ +DatePicker.prototype.get = function( type ) { + return this.item[ type ] +} //DatePicker.prototype.get + + +/** + * Create a picker date object. + */ +DatePicker.prototype.create = function( type, value, options ) { + + var isInfiniteValue, + calendar = this + + // If there’s no value, use the type as the value. + value = value === undefined ? type : value + + + // If it’s infinity, update the value. + if ( value == -Infinity || value == Infinity ) { + isInfiniteValue = value + } + + // If it’s an object, use the native date object. + else if ( $.isPlainObject( value ) && _.isInteger( value.pick ) ) { + value = value.obj + } + + // If it’s an array, convert it into a date and make sure + // that it’s a valid date – otherwise default to today. + else if ( $.isArray( value ) ) { + value = new Date( value[ 0 ], value[ 1 ], value[ 2 ] ) + value = _.isDate( value ) ? value : calendar.create().obj + } + + // If it’s a number or date object, make a normalized date. + else if ( _.isInteger( value ) || _.isDate( value ) ) { + value = calendar.normalize( new Date( value ), options ) + } + + // If it’s a literal true or any other case, set it to now. + else /*if ( value === true )*/ { + value = calendar.now( type, value, options ) + } + + // Return the compiled object. + return { + year: isInfiniteValue || value.getFullYear(), + month: isInfiniteValue || value.getMonth(), + date: isInfiniteValue || value.getDate(), + day: isInfiniteValue || value.getDay(), + obj: isInfiniteValue || value, + pick: isInfiniteValue || value.getTime() + } +} //DatePicker.prototype.create + + +/** + * Create a range limit object using an array, date object, + * literal “true”, or integer relative to another time. + */ +DatePicker.prototype.createRange = function( from, to ) { + + var calendar = this, + createDate = function( date ) { + if ( date === true || $.isArray( date ) || _.isDate( date ) ) { + return calendar.create( date ) + } + return date + } + + // Create objects if possible. + if ( !_.isInteger( from ) ) { + from = createDate( from ) + } + if ( !_.isInteger( to ) ) { + to = createDate( to ) + } + + // Create relative dates. + if ( _.isInteger( from ) && $.isPlainObject( to ) ) { + from = [ to.year, to.month, to.date + from ]; + } + else if ( _.isInteger( to ) && $.isPlainObject( from ) ) { + to = [ from.year, from.month, from.date + to ]; + } + + return { + from: createDate( from ), + to: createDate( to ) + } +} //DatePicker.prototype.createRange + + +/** + * Check if a date unit falls within a date range object. + */ +DatePicker.prototype.withinRange = function( range, dateUnit ) { + range = this.createRange(range.from, range.to) + return dateUnit.pick >= range.from.pick && dateUnit.pick <= range.to.pick +} + + +/** + * Check if two date range objects overlap. + */ +DatePicker.prototype.overlapRanges = function( one, two ) { + + var calendar = this + + // Convert the ranges into comparable dates. + one = calendar.createRange( one.from, one.to ) + two = calendar.createRange( two.from, two.to ) + + return calendar.withinRange( one, two.from ) || calendar.withinRange( one, two.to ) || + calendar.withinRange( two, one.from ) || calendar.withinRange( two, one.to ) +} + + +/** + * Get the date today. + */ +DatePicker.prototype.now = function( type, value, options ) { + value = new Date() + if ( options && options.rel ) { + value.setDate( value.getDate() + options.rel ) + } + return this.normalize( value, options ) +} + + +/** + * Navigate to next/prev month. + */ +DatePicker.prototype.navigate = function( type, value, options ) { + + var targetDateObject, + targetYear, + targetMonth, + targetDate, + isTargetArray = $.isArray( value ), + isTargetObject = $.isPlainObject( value ), + viewsetObject = this.item.view/*, + safety = 100*/ + + + if ( isTargetArray || isTargetObject ) { + + if ( isTargetObject ) { + targetYear = value.year + targetMonth = value.month + targetDate = value.date + } + else { + targetYear = +value[0] + targetMonth = +value[1] + targetDate = +value[2] + } + + // If we’re navigating months but the view is in a different + // month, navigate to the view’s year and month. + if ( options && options.nav && viewsetObject && viewsetObject.month !== targetMonth ) { + targetYear = viewsetObject.year + targetMonth = viewsetObject.month + } + + // Figure out the expected target year and month. + targetDateObject = new Date( targetYear, targetMonth + ( options && options.nav ? options.nav : 0 ), 1 ) + targetYear = targetDateObject.getFullYear() + targetMonth = targetDateObject.getMonth() + + // If the month we’re going to doesn’t have enough days, + // keep decreasing the date until we reach the month’s last date. + while ( /*safety &&*/ new Date( targetYear, targetMonth, targetDate ).getMonth() !== targetMonth ) { + targetDate -= 1 + /*safety -= 1 + if ( !safety ) { + throw 'Fell into an infinite loop while navigating to ' + new Date( targetYear, targetMonth, targetDate ) + '.' + }*/ + } + + value = [ targetYear, targetMonth, targetDate ] + } + + return value +} //DatePicker.prototype.navigate + + +/** + * Normalize a date by setting the hours to midnight. + */ +DatePicker.prototype.normalize = function( value/*, options*/ ) { + value.setHours( 0, 0, 0, 0 ) + return value +} + + +/** + * Measure the range of dates. + */ +DatePicker.prototype.measure = function( type, value/*, options*/ ) { + + var calendar = this + + // If it’s anything false-y, remove the limits. + if ( !value ) { + value = type == 'min' ? -Infinity : Infinity + } + + // If it’s a string, parse it. + else if ( typeof value == 'string' ) { + value = calendar.parse( type, value ) + } + + // If it's an integer, get a date relative to today. + else if ( _.isInteger( value ) ) { + value = calendar.now( type, value, { rel: value } ) + } + + return value +} ///DatePicker.prototype.measure + + +/** + * Create a viewset object based on navigation. + */ +DatePicker.prototype.viewset = function( type, dateObject/*, options*/ ) { + return this.create([ dateObject.year, dateObject.month, 1 ]) +} + + +/** + * Validate a date as enabled and shift if needed. + */ +DatePicker.prototype.validate = function( type, dateObject, options ) { + + var calendar = this, + + // Keep a reference to the original date. + originalDateObject = dateObject, + + // Make sure we have an interval. + interval = options && options.interval ? options.interval : 1, + + // Check if the calendar enabled dates are inverted. + isFlippedBase = calendar.item.enable === -1, + + // Check if we have any enabled dates after/before now. + hasEnabledBeforeTarget, hasEnabledAfterTarget, + + // The min & max limits. + minLimitObject = calendar.item.min, + maxLimitObject = calendar.item.max, + + // Check if we’ve reached the limit during shifting. + reachedMin, reachedMax, + + // Check if the calendar is inverted and at least one weekday is enabled. + hasEnabledWeekdays = isFlippedBase && calendar.item.disable.filter( function( value ) { + + // If there’s a date, check where it is relative to the target. + if ( $.isArray( value ) ) { + var dateTime = calendar.create( value ).pick + if ( dateTime < dateObject.pick ) hasEnabledBeforeTarget = true + else if ( dateTime > dateObject.pick ) hasEnabledAfterTarget = true + } + + // Return only integers for enabled weekdays. + return _.isInteger( value ) + }).length/*, + + safety = 100*/ + + + + // Cases to validate for: + // [1] Not inverted and date disabled. + // [2] Inverted and some dates enabled. + // [3] Not inverted and out of range. + // + // Cases to **not** validate for: + // • Navigating months. + // • Not inverted and date enabled. + // • Inverted and all dates disabled. + // • ..and anything else. + if ( !options || !options.nav ) if ( + /* 1 */ ( !isFlippedBase && calendar.disabled( dateObject ) ) || + /* 2 */ ( isFlippedBase && calendar.disabled( dateObject ) && ( hasEnabledWeekdays || hasEnabledBeforeTarget || hasEnabledAfterTarget ) ) || + /* 3 */ ( !isFlippedBase && (dateObject.pick <= minLimitObject.pick || dateObject.pick >= maxLimitObject.pick) ) + ) { + + + // When inverted, flip the direction if there aren’t any enabled weekdays + // and there are no enabled dates in the direction of the interval. + if ( isFlippedBase && !hasEnabledWeekdays && ( ( !hasEnabledAfterTarget && interval > 0 ) || ( !hasEnabledBeforeTarget && interval < 0 ) ) ) { + interval *= -1 + } + + + // Keep looping until we reach an enabled date. + while ( /*safety &&*/ calendar.disabled( dateObject ) ) { + + /*safety -= 1 + if ( !safety ) { + throw 'Fell into an infinite loop while validating ' + dateObject.obj + '.' + }*/ + + + // If we’ve looped into the next/prev month with a large interval, return to the original date and flatten the interval. + if ( Math.abs( interval ) > 1 && ( dateObject.month < originalDateObject.month || dateObject.month > originalDateObject.month ) ) { + dateObject = originalDateObject + interval = interval > 0 ? 1 : -1 + } + + + // If we’ve reached the min/max limit, reverse the direction, flatten the interval and set it to the limit. + if ( dateObject.pick <= minLimitObject.pick ) { + reachedMin = true + interval = 1 + dateObject = calendar.create([ + minLimitObject.year, + minLimitObject.month, + minLimitObject.date + (dateObject.pick === minLimitObject.pick ? 0 : -1) + ]) + } + else if ( dateObject.pick >= maxLimitObject.pick ) { + reachedMax = true + interval = -1 + dateObject = calendar.create([ + maxLimitObject.year, + maxLimitObject.month, + maxLimitObject.date + (dateObject.pick === maxLimitObject.pick ? 0 : 1) + ]) + } + + + // If we’ve reached both limits, just break out of the loop. + if ( reachedMin && reachedMax ) { + break + } + + + // Finally, create the shifted date using the interval and keep looping. + dateObject = calendar.create([ dateObject.year, dateObject.month, dateObject.date + interval ]) + } + + } //endif + + + // Return the date object settled on. + return dateObject +} //DatePicker.prototype.validate + + +/** + * Check if a date is disabled. + */ +DatePicker.prototype.disabled = function( dateToVerify ) { + + var + calendar = this, + + // Filter through the disabled dates to check if this is one. + isDisabledMatch = calendar.item.disable.filter( function( dateToDisable ) { + + // If the date is a number, match the weekday with 0index and `firstDay` check. + if ( _.isInteger( dateToDisable ) ) { + return dateToVerify.day === ( calendar.settings.firstDay ? dateToDisable : dateToDisable - 1 ) % 7 + } + + // If it’s an array or a native JS date, create and match the exact date. + if ( $.isArray( dateToDisable ) || _.isDate( dateToDisable ) ) { + return dateToVerify.pick === calendar.create( dateToDisable ).pick + } + + // If it’s an object, match a date within the “from” and “to” range. + if ( $.isPlainObject( dateToDisable ) ) { + return calendar.withinRange( dateToDisable, dateToVerify ) + } + }) + + // If this date matches a disabled date, confirm it’s not inverted. + isDisabledMatch = isDisabledMatch.length && !isDisabledMatch.filter(function( dateToDisable ) { + return $.isArray( dateToDisable ) && dateToDisable[3] == 'inverted' || + $.isPlainObject( dateToDisable ) && dateToDisable.inverted + }).length + + // Check the calendar “enabled” flag and respectively flip the + // disabled state. Then also check if it’s beyond the min/max limits. + return calendar.item.enable === -1 ? !isDisabledMatch : isDisabledMatch || + dateToVerify.pick < calendar.item.min.pick || + dateToVerify.pick > calendar.item.max.pick + +} //DatePicker.prototype.disabled + + +/** + * Parse a string into a usable type. + */ +DatePicker.prototype.parse = function( type, value, options ) { + + var calendar = this, + parsingObject = {} + + // If it’s already parsed, we’re good. + if ( !value || typeof value != 'string' ) { + return value + } + + // We need a `.format` to parse the value with. + if ( !( options && options.format ) ) { + options = options || {} + options.format = calendar.settings.format + } + + // Convert the format into an array and then map through it. + calendar.formats.toArray( options.format ).map( function( label ) { + + var + // Grab the formatting label. + formattingLabel = calendar.formats[ label ], + + // The format length is from the formatting label function or the + // label length without the escaping exclamation (!) mark. + formatLength = formattingLabel ? _.trigger( formattingLabel, calendar, [ value, parsingObject ] ) : label.replace( /^!/, '' ).length + + // If there's a format label, split the value up to the format length. + // Then add it to the parsing object with appropriate label. + if ( formattingLabel ) { + parsingObject[ label ] = value.substr( 0, formatLength ) + } + + // Update the value as the substring from format length to end. + value = value.substr( formatLength ) + }) + + // Compensate for month 0index. + return [ + parsingObject.yyyy || parsingObject.yy, + +( parsingObject.mm || parsingObject.m ) - 1, + parsingObject.dd || parsingObject.d + ] +} //DatePicker.prototype.parse + + +/** + * Various formats to display the object in. + */ +DatePicker.prototype.formats = (function() { + + // Return the length of the first word in a collection. + function getWordLengthFromCollection( string, collection, dateObject ) { + + // Grab the first word from the string. + var word = string.match( /\w+/ )[ 0 ] + + // If there's no month index, add it to the date object + if ( !dateObject.mm && !dateObject.m ) { + dateObject.m = collection.indexOf( word ) + 1 + } + + // Return the length of the word. + return word.length + } + + // Get the length of the first word in a string. + function getFirstWordLength( string ) { + return string.match( /\w+/ )[ 0 ].length + } + + return { + + d: function( string, dateObject ) { + + // If there's string, then get the digits length. + // Otherwise return the selected date. + return string ? _.digits( string ) : dateObject.date + }, + dd: function( string, dateObject ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected date with a leading zero. + return string ? 2 : _.lead( dateObject.date ) + }, + ddd: function( string, dateObject ) { + + // If there's a string, then get the length of the first word. + // Otherwise return the short selected weekday. + return string ? getFirstWordLength( string ) : this.settings.weekdaysShort[ dateObject.day ] + }, + dddd: function( string, dateObject ) { + + // If there's a string, then get the length of the first word. + // Otherwise return the full selected weekday. + return string ? getFirstWordLength( string ) : this.settings.weekdaysFull[ dateObject.day ] + }, + m: function( string, dateObject ) { + + // If there's a string, then get the length of the digits + // Otherwise return the selected month with 0index compensation. + return string ? _.digits( string ) : dateObject.month + 1 + }, + mm: function( string, dateObject ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected month with 0index and leading zero. + return string ? 2 : _.lead( dateObject.month + 1 ) + }, + mmm: function( string, dateObject ) { + + var collection = this.settings.monthsShort + + // If there's a string, get length of the relevant month from the short + // months collection. Otherwise return the selected month from that collection. + return string ? getWordLengthFromCollection( string, collection, dateObject ) : collection[ dateObject.month ] + }, + mmmm: function( string, dateObject ) { + + var collection = this.settings.monthsFull + + // If there's a string, get length of the relevant month from the full + // months collection. Otherwise return the selected month from that collection. + return string ? getWordLengthFromCollection( string, collection, dateObject ) : collection[ dateObject.month ] + }, + yy: function( string, dateObject ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected year by slicing out the first 2 digits. + return string ? 2 : ( '' + dateObject.year ).slice( 2 ) + }, + yyyy: function( string, dateObject ) { + + // If there's a string, then the length is always 4. + // Otherwise return the selected year. + return string ? 4 : dateObject.year + }, + + // Create an array by splitting the formatting string passed. + toArray: function( formatString ) { return formatString.split( /(d{1,4}|m{1,4}|y{4}|yy|!.)/g ) }, + + // Format an object into a string using the formatting options. + toString: function ( formatString, itemObject ) { + var calendar = this + return calendar.formats.toArray( formatString ).map( function( label ) { + return _.trigger( calendar.formats[ label ], calendar, [ 0, itemObject ] ) || label.replace( /^!/, '' ) + }).join( '' ) + } + } +})() //DatePicker.prototype.formats + + + + +/** + * Check if two date units are the exact. + */ +DatePicker.prototype.isDateExact = function( one, two ) { + + var calendar = this + + // When we’re working with weekdays, do a direct comparison. + if ( + ( _.isInteger( one ) && _.isInteger( two ) ) || + ( typeof one == 'boolean' && typeof two == 'boolean' ) + ) { + return one === two + } + + // When we’re working with date representations, compare the “pick” value. + if ( + ( _.isDate( one ) || $.isArray( one ) ) && + ( _.isDate( two ) || $.isArray( two ) ) + ) { + return calendar.create( one ).pick === calendar.create( two ).pick + } + + // When we’re working with range objects, compare the “from” and “to”. + if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) { + return calendar.isDateExact( one.from, two.from ) && calendar.isDateExact( one.to, two.to ) + } + + return false +} + + +/** + * Check if two date units overlap. + */ +DatePicker.prototype.isDateOverlap = function( one, two ) { + + var calendar = this, + firstDay = calendar.settings.firstDay ? 1 : 0 + + // When we’re working with a weekday index, compare the days. + if ( _.isInteger( one ) && ( _.isDate( two ) || $.isArray( two ) ) ) { + one = one % 7 + firstDay + return one === calendar.create( two ).day + 1 + } + if ( _.isInteger( two ) && ( _.isDate( one ) || $.isArray( one ) ) ) { + two = two % 7 + firstDay + return two === calendar.create( one ).day + 1 + } + + // When we’re working with range objects, check if the ranges overlap. + if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) { + return calendar.overlapRanges( one, two ) + } + + return false +} + + +/** + * Flip the “enabled” state. + */ +DatePicker.prototype.flipEnable = function(val) { + var itemObject = this.item + itemObject.enable = val || (itemObject.enable == -1 ? 1 : -1) +} + + +/** + * Mark a collection of dates as “disabled”. + */ +DatePicker.prototype.deactivate = function( type, datesToDisable ) { + + var calendar = this, + disabledItems = calendar.item.disable.slice(0) + + + // If we’re flipping, that’s all we need to do. + if ( datesToDisable == 'flip' ) { + calendar.flipEnable() + } + + else if ( datesToDisable === false ) { + calendar.flipEnable(1) + disabledItems = [] + } + + else if ( datesToDisable === true ) { + calendar.flipEnable(-1) + disabledItems = [] + } + + // Otherwise go through the dates to disable. + else { + + datesToDisable.map(function( unitToDisable ) { + + var matchFound + + // When we have disabled items, check for matches. + // If something is matched, immediately break out. + for ( var index = 0; index < disabledItems.length; index += 1 ) { + if ( calendar.isDateExact( unitToDisable, disabledItems[index] ) ) { + matchFound = true + break + } + } + + // If nothing was found, add the validated unit to the collection. + if ( !matchFound ) { + if ( + _.isInteger( unitToDisable ) || + _.isDate( unitToDisable ) || + $.isArray( unitToDisable ) || + ( $.isPlainObject( unitToDisable ) && unitToDisable.from && unitToDisable.to ) + ) { + disabledItems.push( unitToDisable ) + } + } + }) + } + + // Return the updated collection. + return disabledItems +} //DatePicker.prototype.deactivate + + +/** + * Mark a collection of dates as “enabled”. + */ +DatePicker.prototype.activate = function( type, datesToEnable ) { + + var calendar = this, + disabledItems = calendar.item.disable, + disabledItemsCount = disabledItems.length + + // If we’re flipping, that’s all we need to do. + if ( datesToEnable == 'flip' ) { + calendar.flipEnable() + } + + else if ( datesToEnable === true ) { + calendar.flipEnable(1) + disabledItems = [] + } + + else if ( datesToEnable === false ) { + calendar.flipEnable(-1) + disabledItems = [] + } + + // Otherwise go through the disabled dates. + else { + + datesToEnable.map(function( unitToEnable ) { + + var matchFound, + disabledUnit, + index, + isExactRange + + // Go through the disabled items and try to find a match. + for ( index = 0; index < disabledItemsCount; index += 1 ) { + + disabledUnit = disabledItems[index] + + // When an exact match is found, remove it from the collection. + if ( calendar.isDateExact( disabledUnit, unitToEnable ) ) { + matchFound = disabledItems[index] = null + isExactRange = true + break + } + + // When an overlapped match is found, add the “inverted” state to it. + else if ( calendar.isDateOverlap( disabledUnit, unitToEnable ) ) { + if ( $.isPlainObject( unitToEnable ) ) { + unitToEnable.inverted = true + matchFound = unitToEnable + } + else if ( $.isArray( unitToEnable ) ) { + matchFound = unitToEnable + if ( !matchFound[3] ) matchFound.push( 'inverted' ) + } + else if ( _.isDate( unitToEnable ) ) { + matchFound = [ unitToEnable.getFullYear(), unitToEnable.getMonth(), unitToEnable.getDate(), 'inverted' ] + } + break + } + } + + // If a match was found, remove a previous duplicate entry. + if ( matchFound ) for ( index = 0; index < disabledItemsCount; index += 1 ) { + if ( calendar.isDateExact( disabledItems[index], unitToEnable ) ) { + disabledItems[index] = null + break + } + } + + // In the event that we’re dealing with an exact range of dates, + // make sure there are no “inverted” dates because of it. + if ( isExactRange ) for ( index = 0; index < disabledItemsCount; index += 1 ) { + if ( calendar.isDateOverlap( disabledItems[index], unitToEnable ) ) { + disabledItems[index] = null + break + } + } + + // If something is still matched, add it into the collection. + if ( matchFound ) { + disabledItems.push( matchFound ) + } + }) + } + + // Return the updated collection. + return disabledItems.filter(function( val ) { return val != null }) +} //DatePicker.prototype.activate + + +/** + * Create a string for the nodes in the picker. + */ +DatePicker.prototype.nodes = function( isOpen ) { + + var + calendar = this, + settings = calendar.settings, + calendarItem = calendar.item, + nowObject = calendarItem.now, + selectedObject = calendarItem.select, + highlightedObject = calendarItem.highlight, + viewsetObject = calendarItem.view, + disabledCollection = calendarItem.disable, + minLimitObject = calendarItem.min, + maxLimitObject = calendarItem.max, + + + // Create the calendar table head using a copy of weekday labels collection. + // * We do a copy so we don't mutate the original array. + tableHead = (function( collection, fullCollection ) { + + // If the first day should be Monday, move Sunday to the end. + if ( settings.firstDay ) { + collection.push( collection.shift() ) + fullCollection.push( fullCollection.shift() ) + } + + // Create and return the table head group. + return _.node( + 'thead', + _.node( + 'tr', + _.group({ + min: 0, + max: DAYS_IN_WEEK - 1, + i: 1, + node: 'th', + item: function( counter ) { + return [ + collection[ counter ], + settings.klass.weekdays, + 'scope=col title="' + fullCollection[ counter ] + '"' + ] + } + }) + ) + ) //endreturn + })( ( settings.showWeekdaysFull ? settings.weekdaysFull : settings.weekdaysShort ).slice( 0 ), settings.weekdaysFull.slice( 0 ) ), //tableHead + + + // Create the nav for next/prev month. + createMonthNav = function( next ) { + + // Otherwise, return the created month tag. + return _.node( + 'div', + ' ', + settings.klass[ 'nav' + ( next ? 'Next' : 'Prev' ) ] + ( + + // If the focused month is outside the range, disabled the button. + ( next && viewsetObject.year >= maxLimitObject.year && viewsetObject.month >= maxLimitObject.month ) || + ( !next && viewsetObject.year <= minLimitObject.year && viewsetObject.month <= minLimitObject.month ) ? + ' ' + settings.klass.navDisabled : '' + ), + 'data-nav=' + ( next || -1 ) + ' ' + + _.ariaAttr({ + role: 'button', + controls: calendar.$node[0].id + '_table' + }) + ' ' + + 'title="' + (next ? settings.labelMonthNext : settings.labelMonthPrev ) + '"' + ) //endreturn + }, //createMonthNav + + + // Create the month label. + createMonthLabel = function() { + + var monthsCollection = settings.showMonthsShort ? settings.monthsShort : settings.monthsFull + + // If there are months to select, add a dropdown menu. + if ( settings.selectMonths ) { + + return _.node( 'select', + _.group({ + min: 0, + max: 11, + i: 1, + node: 'option', + item: function( loopedMonth ) { + + return [ + + // The looped month and no classes. + monthsCollection[ loopedMonth ], 0, + + // Set the value and selected index. + 'value=' + loopedMonth + + ( viewsetObject.month == loopedMonth ? ' selected' : '' ) + + ( + ( + ( viewsetObject.year == minLimitObject.year && loopedMonth < minLimitObject.month ) || + ( viewsetObject.year == maxLimitObject.year && loopedMonth > maxLimitObject.month ) + ) ? + ' disabled' : '' + ) + ] + } + }), + settings.klass.selectMonth, + ( isOpen ? '' : 'disabled' ) + ' ' + + _.ariaAttr({ controls: calendar.$node[0].id + '_table' }) + ' ' + + 'title="' + settings.labelMonthSelect + '"' + ) + } + + // If there's a need for a month selector + return _.node( 'div', monthsCollection[ viewsetObject.month ], settings.klass.month ) + }, //createMonthLabel + + + // Create the year label. + createYearLabel = function() { + + var focusedYear = viewsetObject.year, + + // If years selector is set to a literal "true", set it to 5. Otherwise + // divide in half to get half before and half after focused year. + numberYears = settings.selectYears === true ? 5 : ~~( settings.selectYears / 2 ) + + // If there are years to select, add a dropdown menu. + if ( numberYears ) { + + var + minYear = minLimitObject.year, + maxYear = maxLimitObject.year, + lowestYear = focusedYear - numberYears, + highestYear = focusedYear + numberYears + + // If the min year is greater than the lowest year, increase the highest year + // by the difference and set the lowest year to the min year. + if ( minYear > lowestYear ) { + highestYear += minYear - lowestYear + lowestYear = minYear + } + + // If the max year is less than the highest year, decrease the lowest year + // by the lower of the two: available and needed years. Then set the + // highest year to the max year. + if ( maxYear < highestYear ) { + + var availableYears = lowestYear - minYear, + neededYears = highestYear - maxYear + + lowestYear -= availableYears > neededYears ? neededYears : availableYears + highestYear = maxYear + } + + return _.node( 'select', + _.group({ + min: lowestYear, + max: highestYear, + i: 1, + node: 'option', + item: function( loopedYear ) { + return [ + + // The looped year and no classes. + loopedYear, 0, + + // Set the value and selected index. + 'value=' + loopedYear + ( focusedYear == loopedYear ? ' selected' : '' ) + ] + } + }), + settings.klass.selectYear, + ( isOpen ? '' : 'disabled' ) + ' ' + _.ariaAttr({ controls: calendar.$node[0].id + '_table' }) + ' ' + + 'title="' + settings.labelYearSelect + '"' + ) + } + + // Otherwise just return the year focused + return _.node( 'div', focusedYear, settings.klass.year ) + } //createYearLabel + + + // Create and return the entire calendar. + return _.node( + 'div', + ( settings.selectYears ? createYearLabel() + createMonthLabel() : createMonthLabel() + createYearLabel() ) + + createMonthNav() + createMonthNav( 1 ), + settings.klass.header + ) + _.node( + 'table', + tableHead + + _.node( + 'tbody', + _.group({ + min: 0, + max: WEEKS_IN_CALENDAR - 1, + i: 1, + node: 'tr', + item: function( rowCounter ) { + + // If Monday is the first day and the month starts on Sunday, shift the date back a week. + var shiftDateBy = settings.firstDay && calendar.create([ viewsetObject.year, viewsetObject.month, 1 ]).day === 0 ? -7 : 0 + + return [ + _.group({ + min: DAYS_IN_WEEK * rowCounter - viewsetObject.day + shiftDateBy + 1, // Add 1 for weekday 0index + max: function() { + return this.min + DAYS_IN_WEEK - 1 + }, + i: 1, + node: 'td', + item: function( targetDate ) { + + // Convert the time date from a relative date to a target date. + targetDate = calendar.create([ viewsetObject.year, viewsetObject.month, targetDate + ( settings.firstDay ? 1 : 0 ) ]) + + var isSelected = selectedObject && selectedObject.pick == targetDate.pick, + isHighlighted = highlightedObject && highlightedObject.pick == targetDate.pick, + isDisabled = disabledCollection && calendar.disabled( targetDate ) || targetDate.pick < minLimitObject.pick || targetDate.pick > maxLimitObject.pick + + return [ + _.node( + 'div', + targetDate.date, + (function( klasses ) { + + // Add the `infocus` or `outfocus` classes based on month in view. + klasses.push( viewsetObject.month == targetDate.month ? settings.klass.infocus : settings.klass.outfocus ) + + // Add the `today` class if needed. + if ( nowObject.pick == targetDate.pick ) { + klasses.push( settings.klass.now ) + } + + // Add the `selected` class if something's selected and the time matches. + if ( isSelected ) { + klasses.push( settings.klass.selected ) + } + + // Add the `highlighted` class if something's highlighted and the time matches. + if ( isHighlighted ) { + klasses.push( settings.klass.highlighted ) + } + + // Add the `disabled` class if something's disabled and the object matches. + if ( isDisabled ) { + klasses.push( settings.klass.disabled ) + } + + return klasses.join( ' ' ) + })([ settings.klass.day ]), + 'data-pick=' + targetDate.pick + ' ' + _.ariaAttr({ + role: 'gridcell', + selected: isSelected && calendar.$node.val() === _.trigger( + calendar.formats.toString, + calendar, + [ settings.format, targetDate ] + ) ? true : null, + activedescendant: isHighlighted ? true : null, + disabled: isDisabled ? true : null + }) + ), + '', + _.ariaAttr({ role: 'presentation' }) + ] //endreturn + } + }) + ] //endreturn + } + }) + ), + settings.klass.table, + 'id="' + calendar.$node[0].id + '_table' + '" ' + _.ariaAttr({ + role: 'grid', + controls: calendar.$node[0].id, + readonly: true + }) + ) + + + // * For Firefox forms to submit, make sure to set the buttons’ `type` attributes as “button”. + _.node( + 'div', + _.node( 'button', settings.today, settings.klass.buttonToday, + 'type=button data-pick=' + nowObject.pick + + ( isOpen && !calendar.disabled(nowObject) ? '' : ' disabled' ) + ' ' + + _.ariaAttr({ controls: calendar.$node[0].id }) ) + + _.node( 'button', settings.clear, settings.klass.buttonClear, + 'type=button data-clear=1' + + ( isOpen ? '' : ' disabled' ) + ' ' + + _.ariaAttr({ controls: calendar.$node[0].id }) ) + + _.node('button', settings.close, settings.klass.buttonClose, + 'type=button data-close=true ' + + ( isOpen ? '' : ' disabled' ) + ' ' + + _.ariaAttr({ controls: calendar.$node[0].id }) ), + settings.klass.footer + ) //endreturn +} //DatePicker.prototype.nodes + + + + +/** + * The date picker defaults. + */ +DatePicker.defaults = (function( prefix ) { + + return { + + // The title label to use for the month nav buttons + labelMonthNext: 'Next month', + labelMonthPrev: 'Previous month', + + // The title label to use for the dropdown selectors + labelMonthSelect: 'Select a month', + labelYearSelect: 'Select a year', + + // Months and weekdays + monthsFull: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ], + monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ], + weekdaysFull: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ], + weekdaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ], + + // Today and clear + today: 'Today', + clear: 'Clear', + close: 'Close', + + // The format to show on the `input` element + format: 'd mmmm, yyyy', + + // Classes + klass: { + + table: prefix + 'table', + + header: prefix + 'header', + + navPrev: prefix + 'nav--prev', + navNext: prefix + 'nav--next', + navDisabled: prefix + 'nav--disabled', + + month: prefix + 'month', + year: prefix + 'year', + + selectMonth: prefix + 'select--month', + selectYear: prefix + 'select--year', + + weekdays: prefix + 'weekday', + + day: prefix + 'day', + disabled: prefix + 'day--disabled', + selected: prefix + 'day--selected', + highlighted: prefix + 'day--highlighted', + now: prefix + 'day--today', + infocus: prefix + 'day--infocus', + outfocus: prefix + 'day--outfocus', + + footer: prefix + 'footer', + + buttonClear: prefix + 'button--clear', + buttonToday: prefix + 'button--today', + buttonClose: prefix + 'button--close' + } + } +})( Picker.klasses().picker + '__' ) + + + + + +/** + * Extend the picker to add the date picker. + */ +Picker.extend( 'pickadate', DatePicker ) + + +})); + + + diff --git a/js/pickadate.js-3.5.3/lib/picker.js b/js/pickadate.js-3.5.3/lib/picker.js new file mode 100644 index 0000000..ee51a68 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/picker.js @@ -0,0 +1,1078 @@ +/*! + * pickadate.js v3.5.3, 2014/07/12 + * By Amsul, http://amsul.ca + * Hosted on http://amsul.github.io/pickadate.js + * Licensed under MIT + */ + +(function ( factory ) { + + // AMD. + if ( typeof define == 'function' && define.amd ) + define( 'picker', ['jquery'], factory ) + + // Node.js/browserify. + else if ( typeof exports == 'object' ) + module.exports = factory( require('jquery') ) + + // Browser globals. + else this.Picker = factory( jQuery ) + +}(function( $ ) { + +var $window = $( window ) +var $document = $( document ) +var $html = $( document.documentElement ) + + +/** + * The picker constructor that creates a blank picker. + */ +function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) { + + // If there’s no element, return the picker constructor. + if ( !ELEMENT ) return PickerConstructor + + + var + IS_DEFAULT_THEME = false, + + + // The state of the picker. + STATE = { + id: ELEMENT.id || 'P' + Math.abs( ~~(Math.random() * new Date()) ) + }, + + + // Merge the defaults and options passed. + SETTINGS = COMPONENT ? $.extend( true, {}, COMPONENT.defaults, OPTIONS ) : OPTIONS || {}, + + + // Merge the default classes with the settings classes. + CLASSES = $.extend( {}, PickerConstructor.klasses(), SETTINGS.klass ), + + + // The element node wrapper into a jQuery object. + $ELEMENT = $( ELEMENT ), + + + // Pseudo picker constructor. + PickerInstance = function() { + return this.start() + }, + + + // The picker prototype. + P = PickerInstance.prototype = { + + constructor: PickerInstance, + + $node: $ELEMENT, + + + /** + * Initialize everything + */ + start: function() { + + // If it’s already started, do nothing. + if ( STATE && STATE.start ) return P + + + // Update the picker states. + STATE.methods = {} + STATE.start = true + STATE.open = false + STATE.type = ELEMENT.type + + + // Confirm focus state, convert into text input to remove UA stylings, + // and set as readonly to prevent keyboard popup. + ELEMENT.autofocus = ELEMENT == document.activeElement + ELEMENT.readOnly = !SETTINGS.editable + ELEMENT.id = ELEMENT.id || STATE.id + if ( ELEMENT.type != 'text' ) { + ELEMENT.type = 'text' + } + + + // Create a new picker component with the settings. + P.component = new COMPONENT(P, SETTINGS) + + + // Create the picker root with a holder and then prepare it. + P.$root = $( PickerConstructor._.node('div', createWrappedComponent(), CLASSES.picker, 'id="' + ELEMENT.id + '_root"') ) + prepareElementRoot() + + + // If there’s a format for the hidden input element, create the element. + if ( SETTINGS.formatSubmit ) { + prepareElementHidden() + } + + + // Prepare the input element. + prepareElement() + + + // Insert the root as specified in the settings. + if ( SETTINGS.container ) $( SETTINGS.container ).append( P.$root ) + else $ELEMENT.after( P.$root ) + + + // Bind the default component and settings events. + P.on({ + start: P.component.onStart, + render: P.component.onRender, + stop: P.component.onStop, + open: P.component.onOpen, + close: P.component.onClose, + set: P.component.onSet + }).on({ + start: SETTINGS.onStart, + render: SETTINGS.onRender, + stop: SETTINGS.onStop, + open: SETTINGS.onOpen, + close: SETTINGS.onClose, + set: SETTINGS.onSet + }) + + + // Once we’re all set, check the theme in use. + IS_DEFAULT_THEME = isUsingDefaultTheme( P.$root.children()[ 0 ] ) + + + // If the element has autofocus, open the picker. + if ( ELEMENT.autofocus ) { + P.open() + } + + + // Trigger queued the “start” and “render” events. + return P.trigger( 'start' ).trigger( 'render' ) + }, //start + + + /** + * Render a new picker + */ + render: function( entireComponent ) { + + // Insert a new component holder in the root or box. + if ( entireComponent ) P.$root.html( createWrappedComponent() ) + else P.$root.find( '.' + CLASSES.box ).html( P.component.nodes( STATE.open ) ) + + // Trigger the queued “render” events. + return P.trigger( 'render' ) + }, //render + + + /** + * Destroy everything + */ + stop: function() { + + // If it’s already stopped, do nothing. + if ( !STATE.start ) return P + + // Then close the picker. + P.close() + + // Remove the hidden field. + if ( P._hidden ) { + P._hidden.parentNode.removeChild( P._hidden ) + } + + // Remove the root. + P.$root.remove() + + // Remove the input class, remove the stored data, and unbind + // the events (after a tick for IE - see `P.close`). + $ELEMENT.removeClass( CLASSES.input ).removeData( NAME ) + setTimeout( function() { + $ELEMENT.off( '.' + STATE.id ) + }, 0) + + // Restore the element state + ELEMENT.type = STATE.type + ELEMENT.readOnly = false + + // Trigger the queued “stop” events. + P.trigger( 'stop' ) + + // Reset the picker states. + STATE.methods = {} + STATE.start = false + + return P + }, //stop + + + /** + * Open up the picker + */ + open: function( dontGiveFocus ) { + + // If it’s already open, do nothing. + if ( STATE.open ) return P + + // Add the “active” class. + $ELEMENT.addClass( CLASSES.active ) + aria( ELEMENT, 'expanded', true ) + + // * A Firefox bug, when `html` has `overflow:hidden`, results in + // killing transitions :(. So add the “opened” state on the next tick. + // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=625289 + setTimeout( function() { + + // Add the “opened” class to the picker root. + P.$root.addClass( CLASSES.opened ) + aria( P.$root[0], 'hidden', false ) + + }, 0 ) + + // If we have to give focus, bind the element and doc events. + if ( dontGiveFocus !== false ) { + + // Set it as open. + STATE.open = true + + // Prevent the page from scrolling. + if ( IS_DEFAULT_THEME ) { + $html. + css( 'overflow', 'hidden' ). + css( 'padding-right', '+=' + getScrollbarWidth() ) + } + + // Pass focus to the element’s jQuery object. + $ELEMENT.trigger( 'focus' ) + + // Bind the document events. + $document.on( 'click.' + STATE.id + ' focusin.' + STATE.id, function( event ) { + + var target = event.target + + // If the target of the event is not the element, close the picker picker. + // * Don’t worry about clicks or focusins on the root because those don’t bubble up. + // Also, for Firefox, a click on an `option` element bubbles up directly + // to the doc. So make sure the target wasn't the doc. + // * In Firefox stopPropagation() doesn’t prevent right-click events from bubbling, + // which causes the picker to unexpectedly close when right-clicking it. So make + // sure the event wasn’t a right-click. + if ( target != ELEMENT && target != document && event.which != 3 ) { + + // If the target was the holder that covers the screen, + // keep the element focused to maintain tabindex. + P.close( target === P.$root.children()[0] ) + } + + }).on( 'keydown.' + STATE.id, function( event ) { + + var + // Get the keycode. + keycode = event.keyCode, + + // Translate that to a selection change. + keycodeToMove = P.component.key[ keycode ], + + // Grab the target. + target = event.target + + + // On escape, close the picker and give focus. + if ( keycode == 27 ) { + P.close( true ) + } + + + // Check if there is a key movement or “enter” keypress on the element. + else if ( target == ELEMENT && ( keycodeToMove || keycode == 13 ) ) { + + // Prevent the default action to stop page movement. + event.preventDefault() + + // Trigger the key movement action. + if ( keycodeToMove ) { + PickerConstructor._.trigger( P.component.key.go, P, [ PickerConstructor._.trigger( keycodeToMove ) ] ) + } + + // On “enter”, if the highlighted item isn’t disabled, set the value and close. + else if ( !P.$root.find( '.' + CLASSES.highlighted ).hasClass( CLASSES.disabled ) ) { + P.set( 'select', P.component.item.highlight ).close() + } + } + + + // If the target is within the root and “enter” is pressed, + // prevent the default action and trigger a click on the target instead. + else if ( $.contains( P.$root[0], target ) && keycode == 13 ) { + event.preventDefault() + target.click() + } + }) + } + + // Trigger the queued “open” events. + return P.trigger( 'open' ) + }, //open + + + /** + * Close the picker + */ + close: function( giveFocus ) { + + // If we need to give focus, do it before changing states. + if ( giveFocus ) { + // ....ah yes! It would’ve been incomplete without a crazy workaround for IE :| + // The focus is triggered *after* the close has completed - causing it + // to open again. So unbind and rebind the event at the next tick. + $ELEMENT.off( 'focus.' + STATE.id ).trigger( 'focus' ) + setTimeout( function() { + $ELEMENT.on( 'focus.' + STATE.id, focusToOpen ) + }, 0 ) + } + + // Remove the “active” class. + $ELEMENT.removeClass( CLASSES.active ) + aria( ELEMENT, 'expanded', false ) + + // * A Firefox bug, when `html` has `overflow:hidden`, results in + // killing transitions :(. So remove the “opened” state on the next tick. + // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=625289 + setTimeout( function() { + + // Remove the “opened” and “focused” class from the picker root. + P.$root.removeClass( CLASSES.opened + ' ' + CLASSES.focused ) + aria( P.$root[0], 'hidden', true ) + + }, 0 ) + + // If it’s already closed, do nothing more. + if ( !STATE.open ) return P + + // Set it as closed. + STATE.open = false + + // Allow the page to scroll. + if ( IS_DEFAULT_THEME ) { + $html. + css( 'overflow', '' ). + css( 'padding-right', '-=' + getScrollbarWidth() ) + } + + // Unbind the document events. + $document.off( '.' + STATE.id ) + + // Trigger the queued “close” events. + return P.trigger( 'close' ) + }, //close + + + /** + * Clear the values + */ + clear: function( options ) { + return P.set( 'clear', null, options ) + }, //clear + + + /** + * Set something + */ + set: function( thing, value, options ) { + + var thingItem, thingValue, + thingIsObject = $.isPlainObject( thing ), + thingObject = thingIsObject ? thing : {} + + // Make sure we have usable options. + options = thingIsObject && $.isPlainObject( value ) ? value : options || {} + + if ( thing ) { + + // If the thing isn’t an object, make it one. + if ( !thingIsObject ) { + thingObject[ thing ] = value + } + + // Go through the things of items to set. + for ( thingItem in thingObject ) { + + // Grab the value of the thing. + thingValue = thingObject[ thingItem ] + + // First, if the item exists and there’s a value, set it. + if ( thingItem in P.component.item ) { + if ( thingValue === undefined ) thingValue = null + P.component.set( thingItem, thingValue, options ) + } + + // Then, check to update the element value and broadcast a change. + if ( thingItem == 'select' || thingItem == 'clear' ) { + $ELEMENT. + val( thingItem == 'clear' ? '' : P.get( thingItem, SETTINGS.format ) ). + trigger( 'change' ) + } + } + + // Render a new picker. + P.render() + } + + // When the method isn’t muted, trigger queued “set” events and pass the `thingObject`. + return options.muted ? P : P.trigger( 'set', thingObject ) + }, //set + + + /** + * Get something + */ + get: function( thing, format ) { + + // Make sure there’s something to get. + thing = thing || 'value' + + // If a picker state exists, return that. + if ( STATE[ thing ] != null ) { + return STATE[ thing ] + } + + // Return the value, if that. + if ( thing == 'value' ) { + return ELEMENT.value + } + + // Check if a component item exists, return that. + if ( thing in P.component.item ) { + if ( typeof format == 'string' ) { + var thingValue = P.component.get( thing ) + return thingValue ? + PickerConstructor._.trigger( + P.component.formats.toString, + P.component, + [ format, thingValue ] + ) : '' + } + return P.component.get( thing ) + } + }, //get + + + + /** + * Bind events on the things. + */ + on: function( thing, method, internal ) { + + var thingName, thingMethod, + thingIsObject = $.isPlainObject( thing ), + thingObject = thingIsObject ? thing : {} + + if ( thing ) { + + // If the thing isn’t an object, make it one. + if ( !thingIsObject ) { + thingObject[ thing ] = method + } + + // Go through the things to bind to. + for ( thingName in thingObject ) { + + // Grab the method of the thing. + thingMethod = thingObject[ thingName ] + + // If it was an internal binding, prefix it. + if ( internal ) { + thingName = '_' + thingName + } + + // Make sure the thing methods collection exists. + STATE.methods[ thingName ] = STATE.methods[ thingName ] || [] + + // Add the method to the relative method collection. + STATE.methods[ thingName ].push( thingMethod ) + } + } + + return P + }, //on + + + + /** + * Unbind events on the things. + */ + off: function() { + var i, thingName, + names = arguments; + for ( i = 0, namesCount = names.length; i < namesCount; i += 1 ) { + thingName = names[i] + if ( thingName in STATE.methods ) { + delete STATE.methods[thingName] + } + } + return P + }, + + + /** + * Fire off method events. + */ + trigger: function( name, data ) { + var _trigger = function( name ) { + var methodList = STATE.methods[ name ] + if ( methodList ) { + methodList.map( function( method ) { + PickerConstructor._.trigger( method, P, [ data ] ) + }) + } + } + _trigger( '_' + name ) + _trigger( name ) + return P + } //trigger + } //PickerInstance.prototype + + + /** + * Wrap the picker holder components together. + */ + function createWrappedComponent() { + + // Create a picker wrapper holder + return PickerConstructor._.node( 'div', + + // Create a picker wrapper node + PickerConstructor._.node( 'div', + + // Create a picker frame + PickerConstructor._.node( 'div', + + // Create a picker box node + PickerConstructor._.node( 'div', + + // Create the components nodes. + P.component.nodes( STATE.open ), + + // The picker box class + CLASSES.box + ), + + // Picker wrap class + CLASSES.wrap + ), + + // Picker frame class + CLASSES.frame + ), + + // Picker holder class + CLASSES.holder + ) //endreturn + } //createWrappedComponent + + + + /** + * Prepare the input element with all bindings. + */ + function prepareElement() { + + $ELEMENT. + + // Store the picker data by component name. + data(NAME, P). + + // Add the “input” class name. + addClass(CLASSES.input). + + // If there’s a `data-value`, update the value of the element. + val( $ELEMENT.data('value') ? + P.get('select', SETTINGS.format) : + ELEMENT.value + ). + + // On focus/click, open the picker and adjust the root “focused” state. + on('focus.' + STATE.id + ' click.' + STATE.id, focusToOpen) + + + // Only bind keydown events if the element isn’t editable. + if ( !SETTINGS.editable ) { + + // Handle keyboard event based on the picker being opened or not. + $ELEMENT.on('keydown.' + STATE.id, function(event) { + + var keycode = event.keyCode, + + // Check if one of the delete keys was pressed. + isKeycodeDelete = /^(8|46)$/.test(keycode) + + // For some reason IE clears the input value on “escape”. + if ( keycode == 27 ) { + P.close() + return false + } + + // Check if `space` or `delete` was pressed or the picker is closed with a key movement. + if ( keycode == 32 || isKeycodeDelete || !STATE.open && P.component.key[keycode] ) { + + // Prevent it from moving the page and bubbling to doc. + event.preventDefault() + event.stopPropagation() + + // If `delete` was pressed, clear the values and close the picker. + // Otherwise open the picker. + if ( isKeycodeDelete ) { P.clear().close() } + else { P.open() } + } + }) + } + + + // Update the aria attributes. + aria(ELEMENT, { + haspopup: true, + expanded: false, + readonly: false, + owns: ELEMENT.id + '_root' + (P._hidden ? ' ' + P._hidden.id : '') + }) + } + + + /** + * Prepare the root picker element with all bindings. + */ + function prepareElementRoot() { + + P.$root. + + on({ + + // When something within the root is focused, stop from bubbling + // to the doc and remove the “focused” state from the root. + focusin: function( event ) { + P.$root.removeClass( CLASSES.focused ) + event.stopPropagation() + }, + + // When something within the root holder is clicked, stop it + // from bubbling to the doc. + 'mousedown click': function( event ) { + + var target = event.target + + // Make sure the target isn’t the root holder so it can bubble up. + if ( target != P.$root.children()[ 0 ] ) { + + event.stopPropagation() + + // * For mousedown events, cancel the default action in order to + // prevent cases where focus is shifted onto external elements + // when using things like jQuery mobile or MagnificPopup (ref: #249 & #120). + // Also, for Firefox, don’t prevent action on the `option` element. + if ( event.type == 'mousedown' && !$( target ).is( ':input' ) && target.nodeName != 'OPTION' ) { + + event.preventDefault() + + // Re-focus onto the element so that users can click away + // from elements focused within the picker. + ELEMENT.focus() + } + } + } + }). + + // If there’s a click on an actionable element, carry out the actions. + on( 'click', '[data-pick], [data-nav], [data-clear]', function() { + + var $target = $( this ), + targetData = $target.data(), + targetDisabled = $target.hasClass( CLASSES.navDisabled ) || $target.hasClass( CLASSES.disabled ), + + // * For IE, non-focusable elements can be active elements as well + // (http://stackoverflow.com/a/2684561). + activeElement = document.activeElement + activeElement = activeElement && ( activeElement.type || activeElement.href ) && activeElement + + // If it’s disabled or nothing inside is actively focused, re-focus the element. + if ( targetDisabled || activeElement && !$.contains( P.$root[0], activeElement ) ) { + ELEMENT.focus() + } + + // If something is superficially changed, update the `highlight` based on the `nav`. + if ( targetData.nav && !targetDisabled ) { + P.set( 'highlight', P.component.item.highlight, { nav: targetData.nav } ) + } + + // If something is picked, set `select` then close with focus. + else if ( PickerConstructor._.isInteger( targetData.pick ) && !targetDisabled ) { + P.set( 'select', targetData.pick ).close( true ) + } + + // If a “clear” button is pressed, empty the values and close with focus. + else if ( targetData.clear ) { + P.clear().close( true ) + } + }) + .on('click', '[data-close]', function () { + P.close(true); + }) //P.$root + + aria( P.$root[0], 'hidden', true ) + } + + + /** + * Prepare the hidden input element along with all bindings. + */ + function prepareElementHidden() { + + var name + + if ( SETTINGS.hiddenName === true ) { + name = ELEMENT.name + ELEMENT.name = '' + } + else { + name = [ + typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '', + typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit' + ] + name = name[0] + ELEMENT.name + name[1] + } + + P._hidden = $( + '' + )[0] + + $ELEMENT. + + // If the value changes, update the hidden input with the correct format. + on('change.' + STATE.id, function() { + P._hidden.value = ELEMENT.value ? + P.get('select', SETTINGS.formatSubmit) : + '' + }). + + // Insert the hidden input after the element. + after(P._hidden) + } + + + // Separated for IE + function focusToOpen( event ) { + + // Stop the event from propagating to the doc. + event.stopPropagation() + + // If it’s a focus event, add the “focused” class to the root. + if ( event.type == 'focus' ) { + P.$root.addClass( CLASSES.focused ) + } + + // And then finally open the picker. + P.open() + } + + + // Return a new picker instance. + return new PickerInstance() +} //PickerConstructor + + + +/** + * The default classes and prefix to use for the HTML classes. + */ +PickerConstructor.klasses = function( prefix ) { + prefix = prefix || 'picker' + return { + + picker: prefix, + opened: prefix + '--opened', + focused: prefix + '--focused', + + input: prefix + '__input', + active: prefix + '__input--active', + + holder: prefix + '__holder', + + frame: prefix + '__frame', + wrap: prefix + '__wrap', + + box: prefix + '__box' + } +} //PickerConstructor.klasses + + + +/** + * Check if the default theme is being used. + */ +function isUsingDefaultTheme( element ) { + + var theme, + prop = 'position' + + // For IE. + if ( element.currentStyle ) { + theme = element.currentStyle[prop] + } + + // For normal browsers. + else if ( window.getComputedStyle ) { + theme = getComputedStyle( element )[prop] + } + + return theme == 'fixed' +} + + + +/** + * Get the width of the browser’s scrollbar. + * Taken from: https://github.com/VodkaBears/Remodal/blob/master/src/jquery.remodal.js + */ +function getScrollbarWidth() { + + if ( $html.height() <= $window.height() ) { + return 0 + } + + var $outer = $( '
' ). + appendTo( 'body' ) + + // Get the width without scrollbars. + var widthWithoutScroll = $outer[0].offsetWidth + + // Force adding scrollbars. + $outer.css( 'overflow', 'scroll' ) + + // Add the inner div. + var $inner = $( '
' ).appendTo( $outer ) + + // Get the width with scrollbars. + var widthWithScroll = $inner[0].offsetWidth + + // Remove the divs. + $outer.remove() + + // Return the difference between the widths. + return widthWithoutScroll - widthWithScroll +} + + + +/** + * PickerConstructor helper methods. + */ +PickerConstructor._ = { + + /** + * Create a group of nodes. Expects: + * ` + { + min: {Integer}, + max: {Integer}, + i: {Integer}, + node: {String}, + item: {Function} + } + * ` + */ + group: function( groupObject ) { + + var + // Scope for the looped object + loopObjectScope, + + // Create the nodes list + nodesList = '', + + // The counter starts from the `min` + counter = PickerConstructor._.trigger( groupObject.min, groupObject ) + + + // Loop from the `min` to `max`, incrementing by `i` + for ( ; counter <= PickerConstructor._.trigger( groupObject.max, groupObject, [ counter ] ); counter += groupObject.i ) { + + // Trigger the `item` function within scope of the object + loopObjectScope = PickerConstructor._.trigger( groupObject.item, groupObject, [ counter ] ) + + // Splice the subgroup and create nodes out of the sub nodes + nodesList += PickerConstructor._.node( + groupObject.node, + loopObjectScope[ 0 ], // the node + loopObjectScope[ 1 ], // the classes + loopObjectScope[ 2 ] // the attributes + ) + } + + // Return the list of nodes + return nodesList + }, //group + + + /** + * Create a dom node string + */ + node: function( wrapper, item, klass, attribute ) { + + // If the item is false-y, just return an empty string + if ( !item ) return '' + + // If the item is an array, do a join + item = $.isArray( item ) ? item.join( '' ) : item + + // Check for the class + klass = klass ? ' class="' + klass + '"' : '' + + // Check for any attributes + attribute = attribute ? ' ' + attribute : '' + + // Return the wrapped item + return '<' + wrapper + klass + attribute + '>' + item + '' + }, //node + + + /** + * Lead numbers below 10 with a zero. + */ + lead: function( number ) { + return ( number < 10 ? '0': '' ) + number + }, + + + /** + * Trigger a function otherwise return the value. + */ + trigger: function( callback, scope, args ) { + return typeof callback == 'function' ? callback.apply( scope, args || [] ) : callback + }, + + + /** + * If the second character is a digit, length is 2 otherwise 1. + */ + digits: function( string ) { + return ( /\d/ ).test( string[ 1 ] ) ? 2 : 1 + }, + + + /** + * Tell if something is a date object. + */ + isDate: function( value ) { + return {}.toString.call( value ).indexOf( 'Date' ) > -1 && this.isInteger( value.getDate() ) + }, + + + /** + * Tell if something is an integer. + */ + isInteger: function( value ) { + return {}.toString.call( value ).indexOf( 'Number' ) > -1 && value % 1 === 0 + }, + + + /** + * Create ARIA attribute strings. + */ + ariaAttr: ariaAttr +} //PickerConstructor._ + + + +/** + * Extend the picker with a component and defaults. + */ +PickerConstructor.extend = function( name, Component ) { + + // Extend jQuery. + $.fn[ name ] = function( options, action ) { + + // Grab the component data. + var componentData = this.data( name ) + + // If the picker is requested, return the data object. + if ( options == 'picker' ) { + return componentData + } + + // If the component data exists and `options` is a string, carry out the action. + if ( componentData && typeof options == 'string' ) { + return PickerConstructor._.trigger( componentData[ options ], componentData, [ action ] ) + } + + // Otherwise go through each matched element and if the component + // doesn’t exist, create a new picker using `this` element + // and merging the defaults and options with a deep copy. + return this.each( function() { + var $this = $( this ) + if ( !$this.data( name ) ) { + new PickerConstructor( this, name, Component, options ) + } + }) + } + + // Set the defaults. + $.fn[ name ].defaults = Component.defaults +} //PickerConstructor.extend + + + +function aria(element, attribute, value) { + if ( $.isPlainObject(attribute) ) { + for ( var key in attribute ) { + ariaSet(element, key, attribute[key]) + } + } + else { + ariaSet(element, attribute, value) + } +} +function ariaSet(element, attribute, value) { + element.setAttribute( + (attribute == 'role' ? '' : 'aria-') + attribute, + value + ) +} +function ariaAttr(attribute, data) { + if ( !$.isPlainObject(attribute) ) { + attribute = { attribute: data } + } + data = '' + for ( var key in attribute ) { + var attr = (key == 'role' ? '' : 'aria-') + key, + attrVal = attribute[key] + data += attrVal == null ? '' : attr + '="' + attribute[key] + '"' + } + return data +} + + + +// Expose the picker constructor. +return PickerConstructor + + +})); + + + diff --git a/js/pickadate.js-3.5.3/lib/picker.time.js b/js/pickadate.js-3.5.3/lib/picker.time.js new file mode 100644 index 0000000..d2a07d6 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/picker.time.js @@ -0,0 +1,1014 @@ + +/*! + * Time picker for pickadate.js v3.5.3 + * http://amsul.github.io/pickadate.js/time.htm + */ + +(function ( factory ) { + + // AMD. + if ( typeof define == 'function' && define.amd ) + define( ['picker','jquery'], factory ) + + // Node.js/browserify. + else if ( typeof exports == 'object' ) + module.exports = factory( require('./picker.js'), require('jquery') ) + + // Browser globals. + else factory( Picker, jQuery ) + +}(function( Picker, $ ) { + + +/** + * Globals and constants + */ +var HOURS_IN_DAY = 24, + MINUTES_IN_HOUR = 60, + HOURS_TO_NOON = 12, + MINUTES_IN_DAY = HOURS_IN_DAY * MINUTES_IN_HOUR, + _ = Picker._ + + + +/** + * The time picker constructor + */ +function TimePicker( picker, settings ) { + + var clock = this, + elementValue = picker.$node[ 0 ].value, + elementDataValue = picker.$node.data( 'value' ), + valueString = elementDataValue || elementValue, + formatString = elementDataValue ? settings.formatSubmit : settings.format + + clock.settings = settings + clock.$node = picker.$node + + // The queue of methods that will be used to build item objects. + clock.queue = { + interval: 'i', + min: 'measure create', + max: 'measure create', + now: 'now create', + select: 'parse create validate', + highlight: 'parse create validate', + view: 'parse create validate', + disable: 'deactivate', + enable: 'activate' + } + + // The component's item object. + clock.item = {} + + clock.item.clear = null + clock.item.interval = settings.interval || 30 + clock.item.disable = ( settings.disable || [] ).slice( 0 ) + clock.item.enable = -(function( collectionDisabled ) { + return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1 + })( clock.item.disable ) + + clock. + set( 'min', settings.min ). + set( 'max', settings.max ). + set( 'now' ) + + // When there’s a value, set the `select`, which in turn + // also sets the `highlight` and `view`. + if ( valueString ) { + clock.set( 'select', valueString, { + format: formatString, + fromValue: !!elementValue + }) + } + + // If there’s no value, default to highlighting “today”. + else { + clock. + set( 'select', null ). + set( 'highlight', clock.item.now ) + } + + // The keycode to movement mapping. + clock.key = { + 40: 1, // Down + 38: -1, // Up + 39: 1, // Right + 37: -1, // Left + go: function( timeChange ) { + clock.set( + 'highlight', + clock.item.highlight.pick + timeChange * clock.item.interval, + { interval: timeChange * clock.item.interval } + ) + this.render() + } + } + + + // Bind some picker events. + picker. + on( 'render', function() { + var $pickerHolder = picker.$root.children(), + $viewset = $pickerHolder.find( '.' + settings.klass.viewset ), + vendors = function( prop ) { + return ['webkit', 'moz', 'ms', 'o', ''].map(function( vendor ) { + return ( vendor ? '-' + vendor + '-' : '' ) + prop + }) + }, + animations = function( $el, state ) { + vendors( 'transform' ).map(function( prop ) { + $el.css( prop, state ) + }) + vendors( 'transition' ).map(function( prop ) { + $el.css( prop, state ) + }) + } + if ( $viewset.length ) { + animations( $pickerHolder, 'none' ) + $pickerHolder[ 0 ].scrollTop = ~~$viewset.position().top - ( $viewset[ 0 ].clientHeight * 2 ) + animations( $pickerHolder, '' ) + } + }, 1 ). + on( 'open', function() { + picker.$root.find( 'button' ).attr( 'disabled', false ) + }, 1 ). + on( 'close', function() { + picker.$root.find( 'button' ).attr( 'disabled', true ) + }, 1 ) + +} //TimePicker + + +/** + * Set a timepicker item object. + */ +TimePicker.prototype.set = function( type, value, options ) { + + var clock = this, + clockItem = clock.item + + // If the value is `null` just set it immediately. + if ( value === null ) { + if ( type == 'clear' ) type = 'select' + clockItem[ type ] = value + return clock + } + + // Otherwise go through the queue of methods, and invoke the functions. + // Update this as the time unit, and set the final value as this item. + // * In the case of `enable`, keep the queue but set `disable` instead. + // And in the case of `flip`, keep the queue but set `enable` instead. + clockItem[ ( type == 'enable' ? 'disable' : type == 'flip' ? 'enable' : type ) ] = clock.queue[ type ].split( ' ' ).map( function( method ) { + value = clock[ method ]( type, value, options ) + return value + }).pop() + + // Check if we need to cascade through more updates. + if ( type == 'select' ) { + clock.set( 'highlight', clockItem.select, options ) + } + else if ( type == 'highlight' ) { + clock.set( 'view', clockItem.highlight, options ) + } + else if ( type == 'interval' ) { + clock. + set( 'min', clockItem.min, options ). + set( 'max', clockItem.max, options ) + } + else if ( type.match( /^(flip|min|max|disable|enable)$/ ) ) { + if ( type == 'min' ) { + clock.set( 'max', clockItem.max, options ) + } + if ( clockItem.select && clock.disabled( clockItem.select ) ) { + clock.set( 'select', clockItem.select, options ) + } + if ( clockItem.highlight && clock.disabled( clockItem.highlight ) ) { + clock.set( 'highlight', clockItem.highlight, options ) + } + } + + return clock +} //TimePicker.prototype.set + + +/** + * Get a timepicker item object. + */ +TimePicker.prototype.get = function( type ) { + return this.item[ type ] +} //TimePicker.prototype.get + + +/** + * Create a picker time object. + */ +TimePicker.prototype.create = function( type, value, options ) { + + var clock = this + + // If there’s no value, use the type as the value. + value = value === undefined ? type : value + + // If it’s a date object, convert it into an array. + if ( _.isDate( value ) ) { + value = [ value.getHours(), value.getMinutes() ] + } + + // If it’s an object, use the “pick” value. + if ( $.isPlainObject( value ) && _.isInteger( value.pick ) ) { + value = value.pick + } + + // If it’s an array, convert it into minutes. + else if ( $.isArray( value ) ) { + value = +value[ 0 ] * MINUTES_IN_HOUR + (+value[ 1 ]) + } + + // If no valid value is passed, set it to “now”. + else if ( !_.isInteger( value ) ) { + value = clock.now( type, value, options ) + } + + // If we’re setting the max, make sure it’s greater than the min. + if ( type == 'max' && value < clock.item.min.pick ) { + value += MINUTES_IN_DAY + } + + // If the value doesn’t fall directly on the interval, + // add one interval to indicate it as “passed”. + if ( type != 'min' && type != 'max' && (value - clock.item.min.pick) % clock.item.interval !== 0 ) { + value += clock.item.interval + } + + // Normalize it into a “reachable” interval. + value = clock.normalize( type, value, options ) + + // Return the compiled object. + return { + + // Divide to get hours from minutes. + hour: ~~( HOURS_IN_DAY + value / MINUTES_IN_HOUR ) % HOURS_IN_DAY, + + // The remainder is the minutes. + mins: ( MINUTES_IN_HOUR + value % MINUTES_IN_HOUR ) % MINUTES_IN_HOUR, + + // The time in total minutes. + time: ( MINUTES_IN_DAY + value ) % MINUTES_IN_DAY, + + // Reference to the “relative” value to pick. + pick: value + } +} //TimePicker.prototype.create + + +/** + * Create a range limit object using an array, date object, + * literal “true”, or integer relative to another time. + */ +TimePicker.prototype.createRange = function( from, to ) { + + var clock = this, + createTime = function( time ) { + if ( time === true || $.isArray( time ) || _.isDate( time ) ) { + return clock.create( time ) + } + return time + } + + // Create objects if possible. + if ( !_.isInteger( from ) ) { + from = createTime( from ) + } + if ( !_.isInteger( to ) ) { + to = createTime( to ) + } + + // Create relative times. + if ( _.isInteger( from ) && $.isPlainObject( to ) ) { + from = [ to.hour, to.mins + ( from * clock.settings.interval ) ]; + } + else if ( _.isInteger( to ) && $.isPlainObject( from ) ) { + to = [ from.hour, from.mins + ( to * clock.settings.interval ) ]; + } + + return { + from: createTime( from ), + to: createTime( to ) + } +} //TimePicker.prototype.createRange + + +/** + * Check if a time unit falls within a time range object. + */ +TimePicker.prototype.withinRange = function( range, timeUnit ) { + range = this.createRange(range.from, range.to) + return timeUnit.pick >= range.from.pick && timeUnit.pick <= range.to.pick +} + + +/** + * Check if two time range objects overlap. + */ +TimePicker.prototype.overlapRanges = function( one, two ) { + + var clock = this + + // Convert the ranges into comparable times. + one = clock.createRange( one.from, one.to ) + two = clock.createRange( two.from, two.to ) + + return clock.withinRange( one, two.from ) || clock.withinRange( one, two.to ) || + clock.withinRange( two, one.from ) || clock.withinRange( two, one.to ) +} + + +/** + * Get the time relative to now. + */ +TimePicker.prototype.now = function( type, value/*, options*/ ) { + + var interval = this.item.interval, + date = new Date(), + nowMinutes = date.getHours() * MINUTES_IN_HOUR + date.getMinutes(), + isValueInteger = _.isInteger( value ), + isBelowInterval + + // Make sure “now” falls within the interval range. + nowMinutes -= nowMinutes % interval + + // Check if the difference is less than the interval itself. + isBelowInterval = value < 0 && interval * value + nowMinutes <= -interval + + // Add an interval because the time has “passed”. + nowMinutes += type == 'min' && isBelowInterval ? 0 : interval + + // If the value is a number, adjust by that many intervals. + if ( isValueInteger ) { + nowMinutes += interval * ( + isBelowInterval && type != 'max' ? + value + 1 : + value + ) + } + + // Return the final calculation. + return nowMinutes +} //TimePicker.prototype.now + + +/** + * Normalize minutes to be “reachable” based on the min and interval. + */ +TimePicker.prototype.normalize = function( type, value/*, options*/ ) { + + var interval = this.item.interval, + minTime = this.item.min && this.item.min.pick || 0 + + // If setting min time, don’t shift anything. + // Otherwise get the value and min difference and then + // normalize the difference with the interval. + value -= type == 'min' ? 0 : ( value - minTime ) % interval + + // Return the adjusted value. + return value +} //TimePicker.prototype.normalize + + +/** + * Measure the range of minutes. + */ +TimePicker.prototype.measure = function( type, value, options ) { + + var clock = this + + // If it’s anything false-y, set it to the default. + if ( !value ) { + value = type == 'min' ? [ 0, 0 ] : [ HOURS_IN_DAY - 1, MINUTES_IN_HOUR - 1 ] + } + + // If it’s a string, parse it. + if ( typeof value == 'string' ) { + value = clock.parse( type, value ) + } + + // If it’s a literal true, or an integer, make it relative to now. + else if ( value === true || _.isInteger( value ) ) { + value = clock.now( type, value, options ) + } + + // If it’s an object already, just normalize it. + else if ( $.isPlainObject( value ) && _.isInteger( value.pick ) ) { + value = clock.normalize( type, value.pick, options ) + } + + return value +} ///TimePicker.prototype.measure + + +/** + * Validate an object as enabled. + */ +TimePicker.prototype.validate = function( type, timeObject, options ) { + + var clock = this, + interval = options && options.interval ? options.interval : clock.item.interval + + // Check if the object is disabled. + if ( clock.disabled( timeObject ) ) { + + // Shift with the interval until we reach an enabled time. + timeObject = clock.shift( timeObject, interval ) + } + + // Scope the object into range. + timeObject = clock.scope( timeObject ) + + // Do a second check to see if we landed on a disabled min/max. + // In that case, shift using the opposite interval as before. + if ( clock.disabled( timeObject ) ) { + timeObject = clock.shift( timeObject, interval * -1 ) + } + + // Return the final object. + return timeObject +} //TimePicker.prototype.validate + + +/** + * Check if an object is disabled. + */ +TimePicker.prototype.disabled = function( timeToVerify ) { + + var clock = this, + + // Filter through the disabled times to check if this is one. + isDisabledMatch = clock.item.disable.filter( function( timeToDisable ) { + + // If the time is a number, match the hours. + if ( _.isInteger( timeToDisable ) ) { + return timeToVerify.hour == timeToDisable + } + + // If it’s an array, create the object and match the times. + if ( $.isArray( timeToDisable ) || _.isDate( timeToDisable ) ) { + return timeToVerify.pick == clock.create( timeToDisable ).pick + } + + // If it’s an object, match a time within the “from” and “to” range. + if ( $.isPlainObject( timeToDisable ) ) { + return clock.withinRange( timeToDisable, timeToVerify ) + } + }) + + // If this time matches a disabled time, confirm it’s not inverted. + isDisabledMatch = isDisabledMatch.length && !isDisabledMatch.filter(function( timeToDisable ) { + return $.isArray( timeToDisable ) && timeToDisable[2] == 'inverted' || + $.isPlainObject( timeToDisable ) && timeToDisable.inverted + }).length + + // If the clock is "enabled" flag is flipped, flip the condition. + return clock.item.enable === -1 ? !isDisabledMatch : isDisabledMatch || + timeToVerify.pick < clock.item.min.pick || + timeToVerify.pick > clock.item.max.pick +} //TimePicker.prototype.disabled + + +/** + * Shift an object by an interval until we reach an enabled object. + */ +TimePicker.prototype.shift = function( timeObject, interval ) { + + var clock = this, + minLimit = clock.item.min.pick, + maxLimit = clock.item.max.pick/*, + safety = 1000*/ + + interval = interval || clock.item.interval + + // Keep looping as long as the time is disabled. + while ( /*safety &&*/ clock.disabled( timeObject ) ) { + + /*safety -= 1 + if ( !safety ) { + throw 'Fell into an infinite loop while shifting to ' + timeObject.hour + ':' + timeObject.mins + '.' + }*/ + + // Increase/decrease the time by the interval and keep looping. + timeObject = clock.create( timeObject.pick += interval ) + + // If we've looped beyond the limits, break out of the loop. + if ( timeObject.pick <= minLimit || timeObject.pick >= maxLimit ) { + break + } + } + + // Return the final object. + return timeObject +} //TimePicker.prototype.shift + + +/** + * Scope an object to be within range of min and max. + */ +TimePicker.prototype.scope = function( timeObject ) { + var minLimit = this.item.min.pick, + maxLimit = this.item.max.pick + return this.create( timeObject.pick > maxLimit ? maxLimit : timeObject.pick < minLimit ? minLimit : timeObject ) +} //TimePicker.prototype.scope + + +/** + * Parse a string into a usable type. + */ +TimePicker.prototype.parse = function( type, value, options ) { + + var hour, minutes, isPM, item, parseValue, + clock = this, + parsingObject = {} + + // If it’s already parsed, we’re good. + if ( !value || typeof value != 'string' ) { + return value + } + + // We need a `.format` to parse the value with. + if ( !( options && options.format ) ) { + options = options || {} + options.format = clock.settings.format + } + + // Convert the format into an array and then map through it. + clock.formats.toArray( options.format ).map( function( label ) { + + var + substring, + + // Grab the formatting label. + formattingLabel = clock.formats[ label ], + + // The format length is from the formatting label function or the + // label length without the escaping exclamation (!) mark. + formatLength = formattingLabel ? + _.trigger( formattingLabel, clock, [ value, parsingObject ] ) : + label.replace( /^!/, '' ).length + + // If there's a format label, split the value up to the format length. + // Then add it to the parsing object with appropriate label. + if ( formattingLabel ) { + substring = value.substr( 0, formatLength ) + parsingObject[ label ] = substring.match(/^\d+$/) ? +substring : substring + } + + // Update the time value as the substring from format length to end. + value = value.substr( formatLength ) + }) + + // Grab the hour and minutes from the parsing object. + for ( item in parsingObject ) { + parseValue = parsingObject[item] + if ( _.isInteger(parseValue) ) { + if ( item.match(/^(h|hh)$/i) ) { + hour = parseValue + if ( item == 'h' || item == 'hh' ) { + hour %= 12 + } + } + else if ( item == 'i' ) { + minutes = parseValue + } + } + else if ( item.match(/^a$/i) && parseValue.match(/^p/i) && ('h' in parsingObject || 'hh' in parsingObject) ) { + isPM = true + } + } + + // Calculate it in minutes and return. + return (isPM ? hour + 12 : hour) * MINUTES_IN_HOUR + minutes +} //TimePicker.prototype.parse + + +/** + * Various formats to display the object in. + */ +TimePicker.prototype.formats = { + + h: function( string, timeObject ) { + + // If there's string, then get the digits length. + // Otherwise return the selected hour in "standard" format. + return string ? _.digits( string ) : timeObject.hour % HOURS_TO_NOON || HOURS_TO_NOON + }, + hh: function( string, timeObject ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected hour in "standard" format with a leading zero. + return string ? 2 : _.lead( timeObject.hour % HOURS_TO_NOON || HOURS_TO_NOON ) + }, + H: function( string, timeObject ) { + + // If there's string, then get the digits length. + // Otherwise return the selected hour in "military" format as a string. + return string ? _.digits( string ) : '' + ( timeObject.hour % 24 ) + }, + HH: function( string, timeObject ) { + + // If there's string, then get the digits length. + // Otherwise return the selected hour in "military" format with a leading zero. + return string ? _.digits( string ) : _.lead( timeObject.hour % 24 ) + }, + i: function( string, timeObject ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected minutes. + return string ? 2 : _.lead( timeObject.mins ) + }, + a: function( string, timeObject ) { + + // If there's a string, then the length is always 4. + // Otherwise check if it's more than "noon" and return either am/pm. + return string ? 4 : MINUTES_IN_DAY / 2 > timeObject.time % MINUTES_IN_DAY ? 'a.m.' : 'p.m.' + }, + A: function( string, timeObject ) { + + // If there's a string, then the length is always 2. + // Otherwise check if it's more than "noon" and return either am/pm. + return string ? 2 : MINUTES_IN_DAY / 2 > timeObject.time % MINUTES_IN_DAY ? 'AM' : 'PM' + }, + + // Create an array by splitting the formatting string passed. + toArray: function( formatString ) { return formatString.split( /(h{1,2}|H{1,2}|i|a|A|!.)/g ) }, + + // Format an object into a string using the formatting options. + toString: function ( formatString, itemObject ) { + var clock = this + return clock.formats.toArray( formatString ).map( function( label ) { + return _.trigger( clock.formats[ label ], clock, [ 0, itemObject ] ) || label.replace( /^!/, '' ) + }).join( '' ) + } +} //TimePicker.prototype.formats + + + + +/** + * Check if two time units are the exact. + */ +TimePicker.prototype.isTimeExact = function( one, two ) { + + var clock = this + + // When we’re working with minutes, do a direct comparison. + if ( + ( _.isInteger( one ) && _.isInteger( two ) ) || + ( typeof one == 'boolean' && typeof two == 'boolean' ) + ) { + return one === two + } + + // When we’re working with time representations, compare the “pick” value. + if ( + ( _.isDate( one ) || $.isArray( one ) ) && + ( _.isDate( two ) || $.isArray( two ) ) + ) { + return clock.create( one ).pick === clock.create( two ).pick + } + + // When we’re working with range objects, compare the “from” and “to”. + if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) { + return clock.isTimeExact( one.from, two.from ) && clock.isTimeExact( one.to, two.to ) + } + + return false +} + + +/** + * Check if two time units overlap. + */ +TimePicker.prototype.isTimeOverlap = function( one, two ) { + + var clock = this + + // When we’re working with an integer, compare the hours. + if ( _.isInteger( one ) && ( _.isDate( two ) || $.isArray( two ) ) ) { + return one === clock.create( two ).hour + } + if ( _.isInteger( two ) && ( _.isDate( one ) || $.isArray( one ) ) ) { + return two === clock.create( one ).hour + } + + // When we’re working with range objects, check if the ranges overlap. + if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) { + return clock.overlapRanges( one, two ) + } + + return false +} + + +/** + * Flip the “enabled” state. + */ +TimePicker.prototype.flipEnable = function(val) { + var itemObject = this.item + itemObject.enable = val || (itemObject.enable == -1 ? 1 : -1) +} + + +/** + * Mark a collection of times as “disabled”. + */ +TimePicker.prototype.deactivate = function( type, timesToDisable ) { + + var clock = this, + disabledItems = clock.item.disable.slice(0) + + + // If we’re flipping, that’s all we need to do. + if ( timesToDisable == 'flip' ) { + clock.flipEnable() + } + + else if ( timesToDisable === false ) { + clock.flipEnable(1) + disabledItems = [] + } + + else if ( timesToDisable === true ) { + clock.flipEnable(-1) + disabledItems = [] + } + + // Otherwise go through the times to disable. + else { + + timesToDisable.map(function( unitToDisable ) { + + var matchFound + + // When we have disabled items, check for matches. + // If something is matched, immediately break out. + for ( var index = 0; index < disabledItems.length; index += 1 ) { + if ( clock.isTimeExact( unitToDisable, disabledItems[index] ) ) { + matchFound = true + break + } + } + + // If nothing was found, add the validated unit to the collection. + if ( !matchFound ) { + if ( + _.isInteger( unitToDisable ) || + _.isDate( unitToDisable ) || + $.isArray( unitToDisable ) || + ( $.isPlainObject( unitToDisable ) && unitToDisable.from && unitToDisable.to ) + ) { + disabledItems.push( unitToDisable ) + } + } + }) + } + + // Return the updated collection. + return disabledItems +} //TimePicker.prototype.deactivate + + +/** + * Mark a collection of times as “enabled”. + */ +TimePicker.prototype.activate = function( type, timesToEnable ) { + + var clock = this, + disabledItems = clock.item.disable, + disabledItemsCount = disabledItems.length + + // If we’re flipping, that’s all we need to do. + if ( timesToEnable == 'flip' ) { + clock.flipEnable() + } + + else if ( timesToEnable === true ) { + clock.flipEnable(1) + disabledItems = [] + } + + else if ( timesToEnable === false ) { + clock.flipEnable(-1) + disabledItems = [] + } + + // Otherwise go through the disabled times. + else { + + timesToEnable.map(function( unitToEnable ) { + + var matchFound, + disabledUnit, + index, + isRangeMatched + + // Go through the disabled items and try to find a match. + for ( index = 0; index < disabledItemsCount; index += 1 ) { + + disabledUnit = disabledItems[index] + + // When an exact match is found, remove it from the collection. + if ( clock.isTimeExact( disabledUnit, unitToEnable ) ) { + matchFound = disabledItems[index] = null + isRangeMatched = true + break + } + + // When an overlapped match is found, add the “inverted” state to it. + else if ( clock.isTimeOverlap( disabledUnit, unitToEnable ) ) { + if ( $.isPlainObject( unitToEnable ) ) { + unitToEnable.inverted = true + matchFound = unitToEnable + } + else if ( $.isArray( unitToEnable ) ) { + matchFound = unitToEnable + if ( !matchFound[2] ) matchFound.push( 'inverted' ) + } + else if ( _.isDate( unitToEnable ) ) { + matchFound = [ unitToEnable.getFullYear(), unitToEnable.getMonth(), unitToEnable.getDate(), 'inverted' ] + } + break + } + } + + // If a match was found, remove a previous duplicate entry. + if ( matchFound ) for ( index = 0; index < disabledItemsCount; index += 1 ) { + if ( clock.isTimeExact( disabledItems[index], unitToEnable ) ) { + disabledItems[index] = null + break + } + } + + // In the event that we’re dealing with an overlap of range times, + // make sure there are no “inverted” times because of it. + if ( isRangeMatched ) for ( index = 0; index < disabledItemsCount; index += 1 ) { + if ( clock.isTimeOverlap( disabledItems[index], unitToEnable ) ) { + disabledItems[index] = null + break + } + } + + // If something is still matched, add it into the collection. + if ( matchFound ) { + disabledItems.push( matchFound ) + } + }) + } + + // Return the updated collection. + return disabledItems.filter(function( val ) { return val != null }) +} //TimePicker.prototype.activate + + +/** + * The division to use for the range intervals. + */ +TimePicker.prototype.i = function( type, value/*, options*/ ) { + return _.isInteger( value ) && value > 0 ? value : this.item.interval +} + + +/** + * Create a string for the nodes in the picker. + */ +TimePicker.prototype.nodes = function( isOpen ) { + + var + clock = this, + settings = clock.settings, + selectedObject = clock.item.select, + highlightedObject = clock.item.highlight, + viewsetObject = clock.item.view, + disabledCollection = clock.item.disable + + return _.node( + 'ul', + _.group({ + min: clock.item.min.pick, + max: clock.item.max.pick, + i: clock.item.interval, + node: 'li', + item: function( loopedTime ) { + loopedTime = clock.create( loopedTime ) + var timeMinutes = loopedTime.pick, + isSelected = selectedObject && selectedObject.pick == timeMinutes, + isHighlighted = highlightedObject && highlightedObject.pick == timeMinutes, + isDisabled = disabledCollection && clock.disabled( loopedTime ) + return [ + _.trigger( clock.formats.toString, clock, [ _.trigger( settings.formatLabel, clock, [ loopedTime ] ) || settings.format, loopedTime ] ), + (function( klasses ) { + + if ( isSelected ) { + klasses.push( settings.klass.selected ) + } + + if ( isHighlighted ) { + klasses.push( settings.klass.highlighted ) + } + + if ( viewsetObject && viewsetObject.pick == timeMinutes ) { + klasses.push( settings.klass.viewset ) + } + + if ( isDisabled ) { + klasses.push( settings.klass.disabled ) + } + + return klasses.join( ' ' ) + })( [ settings.klass.listItem ] ), + 'data-pick=' + loopedTime.pick + ' ' + _.ariaAttr({ + role: 'option', + selected: isSelected && clock.$node.val() === _.trigger( + clock.formats.toString, + clock, + [ settings.format, loopedTime ] + ) ? true : null, + activedescendant: isHighlighted ? true : null, + disabled: isDisabled ? true : null + }) + ] + } + }) + + + // * For Firefox forms to submit, make sure to set the button’s `type` attribute as “button”. + _.node( + 'li', + _.node( + 'button', + settings.clear, + settings.klass.buttonClear, + 'type=button data-clear=1' + ( isOpen ? '' : ' disabled' ) + ' ' + + _.ariaAttr({ controls: clock.$node[0].id }) + ), + '', _.ariaAttr({ role: 'presentation' }) + ), + settings.klass.list, + _.ariaAttr({ role: 'listbox', controls: clock.$node[0].id }) + ) +} //TimePicker.prototype.nodes + + + + + + + +/* ========================================================================== + Extend the picker to add the component with the defaults. + ========================================================================== */ + +TimePicker.defaults = (function( prefix ) { + + return { + + // Clear + clear: 'Clear', + + // The format to show on the `input` element + format: 'h:i A', + + // The interval between each time + interval: 30, + + // Classes + klass: { + + picker: prefix + ' ' + prefix + '--time', + holder: prefix + '__holder', + + list: prefix + '__list', + listItem: prefix + '__list-item', + + disabled: prefix + '__list-item--disabled', + selected: prefix + '__list-item--selected', + highlighted: prefix + '__list-item--highlighted', + viewset: prefix + '__list-item--viewset', + now: prefix + '__list-item--now', + + buttonClear: prefix + '__button--clear' + } + } +})( Picker.klasses().picker ) + + + + + +/** + * Extend the picker to add the time picker. + */ +Picker.extend( 'pickatime', TimePicker ) + + +})); + + + diff --git a/js/pickadate.js-3.5.3/lib/themes-source/_variables.less b/js/pickadate.js-3.5.3/lib/themes-source/_variables.less new file mode 100644 index 0000000..c62577c --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes-source/_variables.less @@ -0,0 +1,208 @@ + +// ========================================================================== +// $VARIABLES +// ========================================================================== + + +// +// Base colors +// +@blue: #0089ec; +@blue-hover: #b1dcfb; +@black: #000; +@white: #fff; + + +// +// Backgrounds +// +@bg-white: @white; +@bg-grey-light: #f2f2f2; + + +// +// Borders +// +@border-grey: #777; +@border-grey-light: #ddd; +@border-select: darken( @border-grey-light, 15% ); + + +// +// Buttons +// +@clear-red: #e20; + + + + + +// +// Picker base +// + +// Make sure nothing is above the picker. +@picker-z-index: 10000; + +// Animation speeds. +@speed-animate-in: .15s; + +// Focused input border color. +@input-active-border: @blue; + +// Typography. +@base-font-size: 16px; +@base-line-height: 1.2; + +// Corners. +@picker-border-radius: 5px; + +// Drop shadows. +@picker-box-shadow: 0 12px 36px 16px rgba(0,0,0,.24); +@picker-box-shadow-light: 0 6px 18px 1px rgba(0,0,0,.12); + +// Height breakpoints. +@breakpoint-tiny: 26.5em; // 424px @ 16px +@breakpoint-small: 33.875em; // 542px @ 16px +@breakpoint-medium: 40.125em; // 642px @ 16px +@breakpoint-large: 46.75em; // 748px @ 16px + +// Width breakpoints. +@breakpoint-width-tiny: 24.5em; // 392px @ 16px + + + + +// +// Date picker options +// + +// The year and weekday labels. +@year-weekday-label: #999; + +// “Today” tag indicators. +@blue-tag: #0059bc; +@disabled-tag: #aaa; + +// Disabled things.. such as days, month nav, etc. +@disabled-things-bg: #f5f5f5; +@disabled-things-text: #ddd; +@disabled-highlighted-things-bg: #bbb; + + + + + +// +// Theme configurations +// + +// The “default” min & max widths. +@picker-min-width: 256px; +@picker-max-width: 666px; + +// The time picker min & max widths. +@time-min-width: @picker-min-width; +@time-max-width: 320px; + +// The “classic” theme settings. +@classic-max-width: @picker-max-width - 200px; +@classic-min-width: @picker-min-width - 80px; +@classic-max-height: 25em; +@classic-box-shadow: 0 6px 18px 1px rgba(0,0,0,.12); + + + + + + + + +// ========================================================================== +// $MIXINS +// ========================================================================== + + +// +// Common picker item states +// + +// Highlighted. +.picker-item-highlighted () { + border-color: @blue; +} + +// Hovered. +.picker-item-hovered () { + cursor: pointer; + color: @black; + background: @blue-hover; +} + +// Selected. +.picker-item-selected () { + background: @blue; + color: @white; +} + +// Disabled. +.picker-item-disabled () { + background: @disabled-things-bg; + border-color: @disabled-things-bg; + color: @disabled-things-text; + cursor: default; +} + + + + +// +// Opacity +// +.opacity( @decimal ) { + @percent: @decimal * 100; + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=@{percent})"; + filter: ~"alpha(opacity=@{percent})"; + -moz-opacity: @decimal; + opacity: @decimal; +} + + + +// +// Vendor prefixes +// +.box-shadow ( @rest... ) { + -webkit-box-shadow: @rest; + -moz-box-shadow: @rest; + box-shadow: @rest; +} +.box-sizing ( @rest... ) { + -webkit-box-sizing: @rest; + -moz-box-sizing: @rest; + box-sizing: @rest; +} +.border-radius ( @rest... ) { + -webkit-border-radius: @rest; + -moz-border-radius: @rest; + border-radius: @rest; +} +.transition ( ... ) { + -webkit-transition: @arguments; + -moz-transition: @arguments; + transition: @arguments; +} +.transform ( @rest... ) { + -webkit-transform: @rest; + -moz-transform: @rest; + transform: @rest; +} +.user-select ( @rest... ) { + -webkit-user-select: @rest; + -moz-user-select: @rest; + -ms-user-select: @rest; + user-select: @rest; +} + + + diff --git a/js/pickadate.js-3.5.3/lib/themes-source/base.date.less b/js/pickadate.js-3.5.3/lib/themes-source/base.date.less new file mode 100644 index 0000000..565dba7 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes-source/base.date.less @@ -0,0 +1,333 @@ + +/* ========================================================================== + $BASE-DATE-PICKER + ========================================================================== */ + +@import "_variables.less"; + + +/** + * The picker box. + */ +.picker__box { + padding: 0 1em; +} + + +/** + * The header containing the month and year stuff. + */ +.picker__header { + text-align: center; + position: relative; + margin-top: .75em; +} + + +/** + * The month and year labels. + */ +.picker__month, +.picker__year { + font-weight: 500; + display: inline-block; + margin-left: .25em; + margin-right: .25em; +} +.picker__year { + color: @year-weekday-label; + font-size: .8em; + font-style: italic; +} + + +/** + * The month and year selectors. + */ +.picker__select--month, +.picker__select--year { + border: 1px solid @border-select; + height: 2em; + padding: .5em; // For firefox + margin-left: .25em; + margin-right: .25em; + + // For `tiny` width screens, move it up a bit. + @media ( min-width: @breakpoint-width-tiny ) { + margin-top: -.5em; + } +} +.picker__select--month { + width: 35%; +} +.picker__select--year { + width: 22.5%; +} +.picker__select--month:focus, +.picker__select--year:focus { + border-color: @blue; +} + + +/** + * The month navigation buttons. + */ +.picker__nav--prev, +.picker__nav--next { + position: absolute; + padding: .5em 1.25em; + width: 1em; + height: 1em; + box-sizing: content-box; + top: -.25em; + + // For `tiny` width screens, move it up a bit. + @media ( min-width: @breakpoint-width-tiny ) { + top: -.33em; + } +} +.picker__nav--prev { + left: -1em; + padding-right: 1.25em; + + // For `tiny` width screens, increase the padding a bit. + @media ( min-width: @breakpoint-width-tiny ) { + padding-right: 1.5em; + } +} +.picker__nav--next { + right: -1em; + padding-left: 1.25em; + + // For `tiny` width screens, increase the padding a bit. + @media ( min-width: @breakpoint-width-tiny ) { + padding-left: 1.5em; + } +} +.picker__nav--prev:before, +.picker__nav--next:before { + content: " "; + border-top: .5em solid transparent; + border-bottom: .5em solid transparent; + border-right: .75em solid @black; + width: 0; + height: 0; + display: block; + margin: 0 auto; +} +.picker__nav--next:before { + border-right: 0; + border-left: .75em solid @black; +} + +// Hovered date picker items. +.picker__nav--prev:hover, +.picker__nav--next:hover { + .picker-item-hovered; +} + +// Disabled month nav. +.picker__nav--disabled, +.picker__nav--disabled:hover, +.picker__nav--disabled:before, +.picker__nav--disabled:before:hover { + cursor: default; + background: none; + border-right-color: @disabled-things-bg; + border-left-color: @disabled-things-bg; +} + + + + +/** + * The calendar table of dates + */ +.picker__table { + text-align: center; + border-collapse: collapse; + border-spacing: 0; + table-layout: fixed; + font-size: inherit; + width: 100%; + margin-top: .75em; + margin-bottom: .5em; + + // For `small` screens, increase the spacing a tad. + @media ( min-height: @breakpoint-small ) { + margin-bottom: .75em; + } +} + +// Remove browser stylings on a table cell. +.picker__table td { + margin: 0; + padding: 0; +} + + +/** + * The weekday labels + */ +.picker__weekday { + width: 14.285714286%; // 100/7 + font-size: .75em; + padding-bottom: .25em; + color: @year-weekday-label; + font-weight: 500; + + /* Increase the spacing a tad */ + @media ( min-height: @breakpoint-small ) { + padding-bottom: .5em; + } +} + + +/** + * The days on the calendar + */ +.picker__day { + padding: .3125em 0; + font-weight: 200; + border: 1px solid transparent; +} + +// Today. +.picker__day--today { + position: relative; +} +.picker__day--today:before { + content: " "; + position: absolute; + top: 2px; + right: 2px; + width: 0; + height: 0; + border-top: .5em solid @blue-tag; + border-left: .5em solid transparent; +} + +// Disabled day. +.picker__day--disabled:before { + border-top-color: @disabled-tag; +} + +// Out of focus days. +.picker__day--outfocus { + color: @disabled-things-text; +} + +// Hovered date picker items. +.picker__day--infocus:hover, +.picker__day--outfocus:hover { + .picker-item-hovered; +} + +// Highlighted and hovered/focused dates. +.picker__day--highlighted { + .picker-item-highlighted; +} +.picker__day--highlighted:hover, +.picker--focused .picker__day--highlighted { + .picker-item-hovered; +} + +// Selected and hovered/focused dates. +.picker__day--selected, +.picker__day--selected:hover, +.picker--focused .picker__day--selected { + .picker-item-selected; +} + +// Disabled dates. +.picker__day--disabled, +.picker__day--disabled:hover, +.picker--focused .picker__day--disabled { + .picker-item-disabled; +} + +// Disabled and highlighted dates. +.picker__day--highlighted.picker__day--disabled, +.picker__day--highlighted.picker__day--disabled:hover { + background: @disabled-highlighted-things-bg; +} + + +/** + * The footer containing the "today", "clear", and "close" buttons. + */ +.picker__footer { + text-align: center; +} + +// Today, clear, and close buttons. +.picker__button--today, +.picker__button--clear, +.picker__button--close { + border: 1px solid @white; + background: @white; + font-size: .8em; + padding: .66em 0; + font-weight: bold; + width: 33%; + display: inline-block; + vertical-align: bottom; +} +.picker__button--today:hover, +.picker__button--clear:hover, +.picker__button--close:hover { + .picker-item-hovered; + border-bottom-color: @blue-hover; +} +.picker__button--today:focus, +.picker__button--clear:focus, +.picker__button--close:focus { + background: @blue-hover; + border-color: @blue; + outline: none; +} + +// Today, clear, and close “indicators”. +.picker__button--today:before, +.picker__button--clear:before, +.picker__button--close:before { + position: relative; + display: inline-block; + height: 0; +} +.picker__button--today:before, +.picker__button--clear:before { + content: " "; + margin-right: .45em; +} +.picker__button--today:before { + top: -.05em; + width: 0; + border-top: .66em solid @blue-tag; + border-left: .66em solid transparent; +} +.picker__button--clear:before { + top: -.25em; + width: .66em; + border-top: 3px solid @clear-red; +} +.picker__button--close:before { + content: "\D7"; // × + top: -.1em; + vertical-align: top; + font-size: 1.1em; + margin-right: .35em; + color: @border-grey; +} + +// Today when “disabled”. +.picker__button--today[disabled], +.picker__button--today[disabled]:hover { + .picker-item-disabled; +} +.picker__button--today[disabled]:before { + border-top-color: @disabled-tag; +} + + + diff --git a/js/pickadate.js-3.5.3/lib/themes-source/base.less b/js/pickadate.js-3.5.3/lib/themes-source/base.less new file mode 100644 index 0000000..4ca710e --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes-source/base.less @@ -0,0 +1,55 @@ + +/* ========================================================================== + $BASE-PICKER + ========================================================================== */ + +@import "_variables.less"; + + +/** + * Note: the root picker element should *NOT* be styled more than what’s here. + */ +.picker { + + // The base font stylings. + font-size: @base-font-size; + text-align: left; + line-height: @base-line-height; + color: @black; + + // The picker shouldn’t affect or be affected by elements around it. + position: absolute; + z-index: @picker-z-index; + + // The picker shouldn’t be selectable. + .user-select( none ); +} + + +/** + * The picker input element. + */ +.picker__input { + cursor: default; +} + + +/** + * When the picker is opened, the input element is “activated”. + */ +.picker__input.picker__input--active { + border-color: @input-active-border; +} + + +/** + * The holder is the only “scrollable” top-level container element. + */ +.picker__holder { + width: 100%; + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} + + + diff --git a/js/pickadate.js-3.5.3/lib/themes-source/base.time.less b/js/pickadate.js-3.5.3/lib/themes-source/base.time.less new file mode 100644 index 0000000..5dfaa54 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes-source/base.time.less @@ -0,0 +1,118 @@ + +/* ========================================================================== + $BASE-TIME-PICKER + ========================================================================== */ + +@import "_variables.less"; + + +/** + * The list of times. + */ +.picker__list { + list-style: none; + padding: 0.75em 0 4.2em; + margin: 0; +} + + +/** + * The times on the clock. + */ +.picker__list-item { + border-bottom: 1px solid @border-grey-light; + border-top: 1px solid @border-grey-light; + margin-bottom: -1px; // Prevent border from doubling up. + position: relative; + background: @bg-white; + padding: .75em 1.25em; + + // For `large` screens, reduce the padding to show more in view. + @media ( min-height: @breakpoint-large ) { + padding: .5em 1em; + } +} + +/* Hovered time */ +.picker__list-item:hover { + .picker-item-hovered; + border-color: @blue; + z-index: 10; +} + +/* Highlighted and hovered/focused time */ +.picker__list-item--highlighted { + .picker-item-highlighted; + z-index: 10; +} +.picker__list-item--highlighted:hover, +.picker--focused .picker__list-item--highlighted { + .picker-item-hovered; +} + +/* Selected and hovered/focused time */ +.picker__list-item--selected, +.picker__list-item--selected:hover, +.picker--focused .picker__list-item--selected { + .picker-item-selected; + z-index: 10; +} + +/* Disabled time */ +.picker__list-item--disabled, +.picker__list-item--disabled:hover, +.picker--focused .picker__list-item--disabled { + .picker-item-disabled; + border-color: @border-grey-light; + z-index: auto; +} + + + + +/** + * The clear button + */ +.picker--time { + + .picker__button--clear { + display: block; + width: 80%; + margin: 1em auto 0; + padding: 1em 1.25em; + + background: none; + border: 0; + + font-weight: 500; + font-size: .67em; + text-align: center; + text-transform: uppercase; + color: #666; + } + + .picker__button--clear:hover, + .picker__button--clear:focus { + .picker-item-hovered; + background: @clear-red; + border-color: @clear-red; + cursor: pointer; + color: @white; + outline: none; + } + + .picker__button--clear:before { + top: -.25em; + color: #666; + font-size: 1.25em; + font-weight: bold; + } + + .picker__button--clear:hover:before, + .picker__button--clear:focus:before { + color: @white; + } +} + + + diff --git a/js/pickadate.js-3.5.3/lib/themes-source/classic.date.less b/js/pickadate.js-3.5.3/lib/themes-source/classic.date.less new file mode 100644 index 0000000..a8f834e --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes-source/classic.date.less @@ -0,0 +1,9 @@ + +/* ========================================================================== + $CLASSIC-DATE-PICKER + ========================================================================== */ + +@import "_variables.less"; + + + diff --git a/js/pickadate.js-3.5.3/lib/themes-source/classic.less b/js/pickadate.js-3.5.3/lib/themes-source/classic.less new file mode 100644 index 0000000..af0b326 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes-source/classic.less @@ -0,0 +1,119 @@ +/*! + * Classic picker styling for pickadate.js + * Demo: http://amsul.github.io/pickadate.js + */ + +@import "_variables.less"; + + +/** + * Note: the root picker element should *NOT* be styled more than what’s here. + */ +.picker { + + // Make it full-width so that it doesn’t collapse. + width: 100%; +} + + + +/** + * The holder is the base of the picker. + */ +.picker__holder { + + // The base stylings. + position: absolute; + background: @bg-white; + + // Add a light border - except top & bottom to let it collapse. + border: 1px solid lighten( @border-grey, 20% ); + border-top-width: 0; + border-bottom-width: 0; + + // Round the bottom corners. + .border-radius( 0 0 @picker-border-radius @picker-border-radius ); + + // Let’s not go 100% + 2px. + .box-sizing( border-box ); + + // Specify the min & max widths. + min-width: @classic-min-width; + max-width: @classic-max-width; + + // Hide everything to begin with. + max-height: 0; + .opacity( 0 ); + + // Tilt the picker. + .transform( translateY( -1em ) perspective( 600px ) rotateX( 10deg ) ); + + // Everything should be smoothly animated – the height & border should wait till the rest is done. + -webkit-transition: -webkit-transform @speed-animate-in ease-out, + opacity @speed-animate-in ease-out, + max-height 0s @speed-animate-in, + border-width 0s @speed-animate-in; + -moz-transition: -moz-transform @speed-animate-in ease-out, + opacity @speed-animate-in ease-out, + max-height 0s @speed-animate-in, + border-width 0s @speed-animate-in; + transition: transform @speed-animate-in ease-out, + opacity @speed-animate-in ease-out, + max-height 0s @speed-animate-in, + border-width 0s @speed-animate-in; +} + + + +/** + * The frame and wrap work together to ensure that + * clicks within the picker don’t reach the holder. + */ +.picker__frame { + padding: 1px; +} +.picker__wrap { + margin: -1px; +} + + + +/** + * When the picker opens... + */ +.picker--opened { + + .picker__holder { + + // Reveal the content. + max-height: @classic-max-height; + .opacity( 1 ); + + // Expand the top & bottom borders. + border-top-width: 1px; + border-bottom-width: 1px; + + // Straighten the picker. + .transform( translateY( 0 ) perspective( 600px ) rotateX( 0 ) ); + + // Everything should be smoothly animated – except the height & border. + -webkit-transition: -webkit-transform @speed-animate-in ease-out, + opacity @speed-animate-in ease-out, + max-height 0s, + border-width 0s; + -moz-transition: -moz-transform @speed-animate-in ease-out, + opacity @speed-animate-in ease-out, + max-height 0s, + border-width 0s; + transition: transform @speed-animate-in ease-out, + opacity @speed-animate-in ease-out, + max-height 0s, + border-width 0s; + + // Add a light shadow. + .box-shadow( @classic-box-shadow ); + } +} + + + diff --git a/js/pickadate.js-3.5.3/lib/themes-source/classic.time.less b/js/pickadate.js-3.5.3/lib/themes-source/classic.time.less new file mode 100644 index 0000000..615adfa --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes-source/classic.time.less @@ -0,0 +1,49 @@ + +/* ========================================================================== + $CLASSIC-TIME-PICKER + ========================================================================== */ + +@import "_variables.less"; + + +/** + * Note: the root picker element should __NOT__ be styled + * more than what’s here. Style the `.picker__holder` instead. + */ +.picker--time { + + // Adjust the min & max widths. + min-width: @time-min-width; + max-width: @time-max-width; +} + + +/** + * The holder is the base of the picker. + */ +.picker--time .picker__holder { + + // Add a slight background color. + background: @bg-grey-light; + + // For `medium` screens, reduce the font-size a bit to get more in view. + @media ( min-height: @breakpoint-medium ) { + font-size: .875em; + } +} + + +/** + * The box contains the list of times. + */ +.picker--time .picker__box { + + // Remove any stylings overflowing from the date picker. + padding: 0; + + // Make the “viewset” time position relative to the box. + position: relative; +} + + + diff --git a/js/pickadate.js-3.5.3/lib/themes-source/default.date.less b/js/pickadate.js-3.5.3/lib/themes-source/default.date.less new file mode 100644 index 0000000..5636ec5 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes-source/default.date.less @@ -0,0 +1,9 @@ + +/* ========================================================================== + $DEFAULT-DATE-PICKER + ========================================================================== */ + +@import "_variables.less"; + + + diff --git a/js/pickadate.js-3.5.3/lib/themes-source/default.less b/js/pickadate.js-3.5.3/lib/themes-source/default.less new file mode 100644 index 0000000..acbf7f5 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes-source/default.less @@ -0,0 +1,246 @@ +/*! + * Default mobile-first, responsive styling for pickadate.js + * Demo: http://amsul.github.io/pickadate.js + */ + +@import "_variables.less"; + + +/** + * Note: the root picker element should *NOT* be styled more than what’s here. + */ +.picker {} + + +/** + * Make the holder and frame fullscreen. + */ +.picker__holder, +.picker__frame { + bottom: 0; + left: 0; + right: 0; + + // Nudge everything off-screen to begin with. + top: 100%; +} + + +/** + * The holder should overlay the entire screen. + */ +.picker__holder { + + // Fill the screen and fix the position. + position: fixed; + + // Fade out the background, then immediately shift the holder out of view. + @transition: background @speed-animate-in ease-out, top 0s @speed-animate-in; + .transition( @transition ); + + // Avoid flickering of the page on webkit browsers + -webkit-backface-visibility: hidden; +} + + + +/** + * The frame that bounds the box contents of the picker. + */ +.picker__frame { + + position: absolute; + + // Specify the min & max widths and center align it. + margin: 0 auto; + min-width: @picker-min-width; + max-width: @picker-max-width; + width: 100%; // For IE9 & 10 to keep it centered. + + // Hide it to begin with. + .opacity( 0 ); + + // Animate the frame in and out of view. + .transition( all @speed-animate-in ease-out ); + + // For `small` screens... + @media ( min-height: @breakpoint-small ) { + + // Reveal what’s beyond to allow drop shadows, et al. + overflow: visible; + + // Align to the bottom edge instead of top. + top: auto; + bottom: -100%; + + // Prevent it from overflowing over the top edge. + max-height: 80%; + } + + // For `medium` screens... + @media ( min-height: @breakpoint-medium ) { + + // Move away from the bottom edge. + margin-bottom: 7.5%; + } +} + +/** + * The wrapper sets the stage to vertically align the box contents. + */ +.picker__wrap { + display: table; + width: 100%; + height: 100%; + + // For `small` screens, remove the “middle-aligned” styling + @media ( min-height: @breakpoint-small ) { + display: block; + } +} + + + +/** + * The box contains all the picker contents. + */ +.picker__box { + background: @bg-white; + + // To start with, vertically align to center + display: table-cell; + vertical-align: middle; + + // For `tiny` screens, increase the font size a bit + @media ( min-height: @breakpoint-tiny ) { + font-size: 1.25em; + } + + // For `small` screens... + @media ( min-height: @breakpoint-small ) { + + // Remove the “middle-aligned” styling + display: block; + + // Increase the font size a bit more + font-size: 1.33em; + + // Add the borders except the bottom one + border: 1px solid @border-grey; + border-top-color: lighten( @border-grey, 7% ); + border-bottom-width: 0; + + // Make ‘em rounded at the top corners + .border-radius( @picker-border-radius @picker-border-radius 0 0 ); + + // And finally, add a nice shadow + .box-shadow( @picker-box-shadow ); + } + + // For `medium` screens... + @media ( min-height: @breakpoint-medium ) { + + // Increase the font size. + font-size: 1.5em; + + // Reveal all borders and round all corners. + border-bottom-width: 1px; + .border-radius( @picker-border-radius ); + } +} + + +/** + * When the picker opens... + */ +.picker--opened { + + // Immediately move the holder to the top edge then fade in an overlay + .picker__holder { + + // Move it to the top edge + top: 0; + + // Show a translucent black background (order is important for IE) + background: transparent; + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#1E000000,endColorstr=#1E000000)"; // IE8 + zoom: 1; + background: rgba(0,0,0,.32); // Normal browsers + + // Animate in the background + @transition: background @speed-animate-in ease-out; + .transition( @transition ); + } + + + // Smoothly move the content to the top edge while fading it in + .picker__frame { + + // Move to the top edge + top: 0; + + // Ånd then reveal the content + .opacity( 1 ); + + // For `small` screens, move to the bottom edge instead + @media ( min-height: @breakpoint-small ) { + top: auto; + bottom: 0; + } + } +} + + + + + + +/** + * For `large` screens, transform into an inline picker. + */ +// @include min-screen( large ) { + +// .picker { +// width: 100%; +// } + +// .picker__holder, +// .picker--opened .picker__holder { +// background: @white; +// @include prefix( transition, all @speed-animate-in ease-out ); +// } + +// .picker__holder { +// font-size: 12px; +// position: relative; +// max-height: 0; +// border: 1px solid transparent; +// @include prefix( border-radius, @picker-border-radius ); +// @include prefix( box-sizing, border-box ); +// } +// .picker--opened .picker__holder { +// @include picker-holder-open; +// @include prefix( box-shadow, @picker-box-shadow-light ); +// } + +// .picker__frame, +// .picker--opened .picker__frame { +// max-width: none !important; +// } + +// .picker__frame { +// position: initial; +// margin: 0; +// @include opacity( 1 ); +// } + +// .picker__box { +// border: 0; +// margin-top: 0; +// @include prefix( border-radius, 0 ); +// @include prefix( box-shadow, none ); +// } +// } + + + diff --git a/js/pickadate.js-3.5.3/lib/themes-source/default.time.less b/js/pickadate.js-3.5.3/lib/themes-source/default.time.less new file mode 100644 index 0000000..3120cb6 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes-source/default.time.less @@ -0,0 +1,41 @@ + +/* ========================================================================== + $DEFAULT-TIME-PICKER + ========================================================================== */ + +@import "_variables.less"; + + +/** + * The frame the bounds the time picker. + */ +.picker--time .picker__frame { + + // Adjust the min & max widths. + min-width: @time-min-width; + max-width: @time-max-width; +} + + +/** + * The picker box. + */ +.picker--time .picker__box { + + // Keep the font-size small to show more in view. + font-size: 1em; + + // Add a slight background color. + background: @bg-grey-light; + + // Remove the side paddings. + padding: 0; + + // For `medium` screens, move it away from the bottom edge of the screen. + @media ( min-height: @breakpoint-medium ) { + margin-bottom: 5em; + } +} + + + diff --git a/js/pickadate.js-3.5.3/lib/themes-source/rtl.less b/js/pickadate.js-3.5.3/lib/themes-source/rtl.less new file mode 100644 index 0000000..01ec53f --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes-source/rtl.less @@ -0,0 +1,38 @@ +/*! + * Styling for RTL (right-to-left) languages using pickadate.js + */ + +@import "_variables.less"; + + +/** + * Switch the direction - only really necessary if + * it hasn’t already been applied higher up in the DOM. + */ +.picker { + direction: rtl; +} + + +/** + * Flip around the “next” and “previous” buttons. + */ +.picker__nav--next { + right: auto; + left: -1em; +} +.picker__nav--prev { + left: auto; + right: -1em; +} +.picker__nav--next:before { + border-left: 0; + border-right: .75em solid @black; +} +.picker__nav--prev:before { + border-right: 0; + border-left: .75em solid @black; +} + + + diff --git a/js/pickadate.js-3.5.3/lib/themes/classic.css b/js/pickadate.js-3.5.3/lib/themes/classic.css new file mode 100644 index 0000000..a7f799c --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes/classic.css @@ -0,0 +1,109 @@ +/* ========================================================================== + $BASE-PICKER + ========================================================================== */ +/** + * Note: the root picker element should *NOT* be styled more than what’s here. + */ +.picker { + font-size: 16px; + text-align: left; + line-height: 1.2; + color: #000000; + position: absolute; + z-index: 10000; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +/** + * The picker input element. + */ +.picker__input { + cursor: default; +} +/** + * When the picker is opened, the input element is “activated”. + */ +.picker__input.picker__input--active { + border-color: #0089ec; +} +/** + * The holder is the only “scrollable” top-level container element. + */ +.picker__holder { + width: 100%; + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} + +/*! + * Classic picker styling for pickadate.js + * Demo: http://amsul.github.io/pickadate.js + */ +/** + * Note: the root picker element should *NOT* be styled more than what’s here. + */ +.picker { + width: 100%; +} +/** + * The holder is the base of the picker. + */ +.picker__holder { + position: absolute; + background: #ffffff; + border: 1px solid #aaaaaa; + border-top-width: 0; + border-bottom-width: 0; + -webkit-border-radius: 0 0 5px 5px; + -moz-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + min-width: 176px; + max-width: 466px; + max-height: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; + -webkit-transform: translateY(-1em) perspective(600px) rotateX(10deg); + -moz-transform: translateY(-1em) perspective(600px) rotateX(10deg); + transform: translateY(-1em) perspective(600px) rotateX(10deg); + -webkit-transition: -webkit-transform 0.15s ease-out, opacity 0.15s ease-out, max-height 0s 0.15s, border-width 0s 0.15s; + -moz-transition: -moz-transform 0.15s ease-out, opacity 0.15s ease-out, max-height 0s 0.15s, border-width 0s 0.15s; + transition: transform 0.15s ease-out, opacity 0.15s ease-out, max-height 0s 0.15s, border-width 0s 0.15s; +} +/** + * The frame and wrap work together to ensure that + * clicks within the picker don’t reach the holder. + */ +.picker__frame { + padding: 1px; +} +.picker__wrap { + margin: -1px; +} +/** + * When the picker opens... + */ +.picker--opened .picker__holder { + max-height: 25em; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + filter: alpha(opacity=100); + -moz-opacity: 1; + opacity: 1; + border-top-width: 1px; + border-bottom-width: 1px; + -webkit-transform: translateY(0) perspective(600px) rotateX(0); + -moz-transform: translateY(0) perspective(600px) rotateX(0); + transform: translateY(0) perspective(600px) rotateX(0); + -webkit-transition: -webkit-transform 0.15s ease-out, opacity 0.15s ease-out, max-height 0s, border-width 0s; + -moz-transition: -moz-transform 0.15s ease-out, opacity 0.15s ease-out, max-height 0s, border-width 0s; + transition: transform 0.15s ease-out, opacity 0.15s ease-out, max-height 0s, border-width 0s; + -webkit-box-shadow: 0 6px 18px 1px rgba(0, 0, 0, 0.12); + -moz-box-shadow: 0 6px 18px 1px rgba(0, 0, 0, 0.12); + box-shadow: 0 6px 18px 1px rgba(0, 0, 0, 0.12); +} diff --git a/js/pickadate.js-3.5.3/lib/themes/classic.date.css b/js/pickadate.js-3.5.3/lib/themes/classic.date.css new file mode 100644 index 0000000..88e56ab --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes/classic.date.css @@ -0,0 +1,301 @@ +/* ========================================================================== + $BASE-DATE-PICKER + ========================================================================== */ +/** + * The picker box. + */ +.picker__box { + padding: 0 1em; +} +/** + * The header containing the month and year stuff. + */ +.picker__header { + text-align: center; + position: relative; + margin-top: .75em; +} +/** + * The month and year labels. + */ +.picker__month, +.picker__year { + font-weight: 500; + display: inline-block; + margin-left: .25em; + margin-right: .25em; +} +.picker__year { + color: #999999; + font-size: .8em; + font-style: italic; +} +/** + * The month and year selectors. + */ +.picker__select--month, +.picker__select--year { + border: 1px solid #b7b7b7; + height: 2em; + padding: .5em; + margin-left: .25em; + margin-right: .25em; +} +@media (min-width: 24.5em) { + .picker__select--month, + .picker__select--year { + margin-top: -0.5em; + } +} +.picker__select--month { + width: 35%; +} +.picker__select--year { + width: 22.5%; +} +.picker__select--month:focus, +.picker__select--year:focus { + border-color: #0089ec; +} +/** + * The month navigation buttons. + */ +.picker__nav--prev, +.picker__nav--next { + position: absolute; + padding: .5em 1.25em; + width: 1em; + height: 1em; + box-sizing: content-box; + top: -0.25em; +} +@media (min-width: 24.5em) { + .picker__nav--prev, + .picker__nav--next { + top: -0.33em; + } +} +.picker__nav--prev { + left: -1em; + padding-right: 1.25em; +} +@media (min-width: 24.5em) { + .picker__nav--prev { + padding-right: 1.5em; + } +} +.picker__nav--next { + right: -1em; + padding-left: 1.25em; +} +@media (min-width: 24.5em) { + .picker__nav--next { + padding-left: 1.5em; + } +} +.picker__nav--prev:before, +.picker__nav--next:before { + content: " "; + border-top: .5em solid transparent; + border-bottom: .5em solid transparent; + border-right: 0.75em solid #000000; + width: 0; + height: 0; + display: block; + margin: 0 auto; +} +.picker__nav--next:before { + border-right: 0; + border-left: 0.75em solid #000000; +} +.picker__nav--prev:hover, +.picker__nav--next:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +.picker__nav--disabled, +.picker__nav--disabled:hover, +.picker__nav--disabled:before, +.picker__nav--disabled:before:hover { + cursor: default; + background: none; + border-right-color: #f5f5f5; + border-left-color: #f5f5f5; +} +/** + * The calendar table of dates + */ +.picker__table { + text-align: center; + border-collapse: collapse; + border-spacing: 0; + table-layout: fixed; + font-size: inherit; + width: 100%; + margin-top: .75em; + margin-bottom: .5em; +} +@media (min-height: 33.875em) { + .picker__table { + margin-bottom: .75em; + } +} +.picker__table td { + margin: 0; + padding: 0; +} +/** + * The weekday labels + */ +.picker__weekday { + width: 14.285714286%; + font-size: .75em; + padding-bottom: .25em; + color: #999999; + font-weight: 500; + /* Increase the spacing a tad */ +} +@media (min-height: 33.875em) { + .picker__weekday { + padding-bottom: .5em; + } +} +/** + * The days on the calendar + */ +.picker__day { + padding: .3125em 0; + font-weight: 200; + border: 1px solid transparent; +} +.picker__day--today { + position: relative; +} +.picker__day--today:before { + content: " "; + position: absolute; + top: 2px; + right: 2px; + width: 0; + height: 0; + border-top: 0.5em solid #0059bc; + border-left: .5em solid transparent; +} +.picker__day--disabled:before { + border-top-color: #aaaaaa; +} +.picker__day--outfocus { + color: #dddddd; +} +.picker__day--infocus:hover, +.picker__day--outfocus:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +.picker__day--highlighted { + border-color: #0089ec; +} +.picker__day--highlighted:hover, +.picker--focused .picker__day--highlighted { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +.picker__day--selected, +.picker__day--selected:hover, +.picker--focused .picker__day--selected { + background: #0089ec; + color: #ffffff; +} +.picker__day--disabled, +.picker__day--disabled:hover, +.picker--focused .picker__day--disabled { + background: #f5f5f5; + border-color: #f5f5f5; + color: #dddddd; + cursor: default; +} +.picker__day--highlighted.picker__day--disabled, +.picker__day--highlighted.picker__day--disabled:hover { + background: #bbbbbb; +} +/** + * The footer containing the "today", "clear", and "close" buttons. + */ +.picker__footer { + text-align: center; +} +.picker__button--today, +.picker__button--clear, +.picker__button--close { + border: 1px solid #ffffff; + background: #ffffff; + font-size: .8em; + padding: .66em 0; + font-weight: bold; + width: 33%; + display: inline-block; + vertical-align: bottom; +} +.picker__button--today:hover, +.picker__button--clear:hover, +.picker__button--close:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; + border-bottom-color: #b1dcfb; +} +.picker__button--today:focus, +.picker__button--clear:focus, +.picker__button--close:focus { + background: #b1dcfb; + border-color: #0089ec; + outline: none; +} +.picker__button--today:before, +.picker__button--clear:before, +.picker__button--close:before { + position: relative; + display: inline-block; + height: 0; +} +.picker__button--today:before, +.picker__button--clear:before { + content: " "; + margin-right: .45em; +} +.picker__button--today:before { + top: -0.05em; + width: 0; + border-top: 0.66em solid #0059bc; + border-left: .66em solid transparent; +} +.picker__button--clear:before { + top: -0.25em; + width: .66em; + border-top: 3px solid #ee2200; +} +.picker__button--close:before { + content: "\D7"; + top: -0.1em; + vertical-align: top; + font-size: 1.1em; + margin-right: .35em; + color: #777777; +} +.picker__button--today[disabled], +.picker__button--today[disabled]:hover { + background: #f5f5f5; + border-color: #f5f5f5; + color: #dddddd; + cursor: default; +} +.picker__button--today[disabled]:before { + border-top-color: #aaaaaa; +} + +/* ========================================================================== + $CLASSIC-DATE-PICKER + ========================================================================== */ diff --git a/js/pickadate.js-3.5.3/lib/themes/classic.time.css b/js/pickadate.js-3.5.3/lib/themes/classic.time.css new file mode 100644 index 0000000..8737c78 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes/classic.time.css @@ -0,0 +1,131 @@ +/* ========================================================================== + $BASE-TIME-PICKER + ========================================================================== */ +/** + * The list of times. + */ +.picker__list { + list-style: none; + padding: 0.75em 0 4.2em; + margin: 0; +} +/** + * The times on the clock. + */ +.picker__list-item { + border-bottom: 1px solid #dddddd; + border-top: 1px solid #dddddd; + margin-bottom: -1px; + position: relative; + background: #ffffff; + padding: .75em 1.25em; +} +@media (min-height: 46.75em) { + .picker__list-item { + padding: .5em 1em; + } +} +/* Hovered time */ +.picker__list-item:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; + border-color: #0089ec; + z-index: 10; +} +/* Highlighted and hovered/focused time */ +.picker__list-item--highlighted { + border-color: #0089ec; + z-index: 10; +} +.picker__list-item--highlighted:hover, +.picker--focused .picker__list-item--highlighted { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +/* Selected and hovered/focused time */ +.picker__list-item--selected, +.picker__list-item--selected:hover, +.picker--focused .picker__list-item--selected { + background: #0089ec; + color: #ffffff; + z-index: 10; +} +/* Disabled time */ +.picker__list-item--disabled, +.picker__list-item--disabled:hover, +.picker--focused .picker__list-item--disabled { + background: #f5f5f5; + border-color: #f5f5f5; + color: #dddddd; + cursor: default; + border-color: #dddddd; + z-index: auto; +} +/** + * The clear button + */ +.picker--time .picker__button--clear { + display: block; + width: 80%; + margin: 1em auto 0; + padding: 1em 1.25em; + background: none; + border: 0; + font-weight: 500; + font-size: .67em; + text-align: center; + text-transform: uppercase; + color: #666; +} +.picker--time .picker__button--clear:hover, +.picker--time .picker__button--clear:focus { + color: #000000; + background: #b1dcfb; + background: #ee2200; + border-color: #ee2200; + cursor: pointer; + color: #ffffff; + outline: none; +} +.picker--time .picker__button--clear:before { + top: -0.25em; + color: #666; + font-size: 1.25em; + font-weight: bold; +} +.picker--time .picker__button--clear:hover:before, +.picker--time .picker__button--clear:focus:before { + color: #ffffff; +} + +/* ========================================================================== + $CLASSIC-TIME-PICKER + ========================================================================== */ +/** + * Note: the root picker element should __NOT__ be styled + * more than what’s here. Style the `.picker__holder` instead. + */ +.picker--time { + min-width: 256px; + max-width: 320px; +} +/** + * The holder is the base of the picker. + */ +.picker--time .picker__holder { + background: #f2f2f2; +} +@media (min-height: 40.125em) { + .picker--time .picker__holder { + font-size: .875em; + } +} +/** + * The box contains the list of times. + */ +.picker--time .picker__box { + padding: 0; + position: relative; +} diff --git a/js/pickadate.js-3.5.3/lib/themes/default.css b/js/pickadate.js-3.5.3/lib/themes/default.css new file mode 100644 index 0000000..3cf885f --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes/default.css @@ -0,0 +1,175 @@ +/* ========================================================================== + $BASE-PICKER + ========================================================================== */ +/** + * Note: the root picker element should *NOT* be styled more than what’s here. + */ +.picker { + font-size: 16px; + text-align: left; + line-height: 1.2; + color: #000000; + position: absolute; + z-index: 10000; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +/** + * The picker input element. + */ +.picker__input { + cursor: default; +} +/** + * When the picker is opened, the input element is “activated”. + */ +.picker__input.picker__input--active { + border-color: #0089ec; +} +/** + * The holder is the only “scrollable” top-level container element. + */ +.picker__holder { + width: 100%; + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} + +/*! + * Default mobile-first, responsive styling for pickadate.js + * Demo: http://amsul.github.io/pickadate.js + */ +/** + * Note: the root picker element should *NOT* be styled more than what’s here. + */ +/** + * Make the holder and frame fullscreen. + */ +.picker__holder, +.picker__frame { + bottom: 0; + left: 0; + right: 0; + top: 100%; +} +/** + * The holder should overlay the entire screen. + */ +.picker__holder { + position: fixed; + -webkit-transition: background 0.15s ease-out, top 0s 0.15s; + -moz-transition: background 0.15s ease-out, top 0s 0.15s; + transition: background 0.15s ease-out, top 0s 0.15s; + -webkit-backface-visibility: hidden; +} +/** + * The frame that bounds the box contents of the picker. + */ +.picker__frame { + position: absolute; + margin: 0 auto; + min-width: 256px; + max-width: 666px; + width: 100%; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; + -webkit-transition: all 0.15s ease-out; + -moz-transition: all 0.15s ease-out; + transition: all 0.15s ease-out; +} +@media (min-height: 33.875em) { + .picker__frame { + overflow: visible; + top: auto; + bottom: -100%; + max-height: 80%; + } +} +@media (min-height: 40.125em) { + .picker__frame { + margin-bottom: 7.5%; + } +} +/** + * The wrapper sets the stage to vertically align the box contents. + */ +.picker__wrap { + display: table; + width: 100%; + height: 100%; +} +@media (min-height: 33.875em) { + .picker__wrap { + display: block; + } +} +/** + * The box contains all the picker contents. + */ +.picker__box { + background: #ffffff; + display: table-cell; + vertical-align: middle; +} +@media (min-height: 26.5em) { + .picker__box { + font-size: 1.25em; + } +} +@media (min-height: 33.875em) { + .picker__box { + display: block; + font-size: 1.33em; + border: 1px solid #777777; + border-top-color: #898989; + border-bottom-width: 0; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; + -webkit-box-shadow: 0 12px 36px 16px rgba(0, 0, 0, 0.24); + -moz-box-shadow: 0 12px 36px 16px rgba(0, 0, 0, 0.24); + box-shadow: 0 12px 36px 16px rgba(0, 0, 0, 0.24); + } +} +@media (min-height: 40.125em) { + .picker__box { + font-size: 1.5em; + border-bottom-width: 1px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + } +} +/** + * When the picker opens... + */ +.picker--opened .picker__holder { + top: 0; + background: transparent; + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#1E000000,endColorstr=#1E000000)"; + zoom: 1; + background: rgba(0, 0, 0, 0.32); + -webkit-transition: background 0.15s ease-out; + -moz-transition: background 0.15s ease-out; + transition: background 0.15s ease-out; +} +.picker--opened .picker__frame { + top: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + filter: alpha(opacity=100); + -moz-opacity: 1; + opacity: 1; +} +@media (min-height: 33.875em) { + .picker--opened .picker__frame { + top: auto; + bottom: 0; + } +} +/** + * For `large` screens, transform into an inline picker. + */ diff --git a/js/pickadate.js-3.5.3/lib/themes/default.date.css b/js/pickadate.js-3.5.3/lib/themes/default.date.css new file mode 100644 index 0000000..0b29757 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes/default.date.css @@ -0,0 +1,301 @@ +/* ========================================================================== + $BASE-DATE-PICKER + ========================================================================== */ +/** + * The picker box. + */ +.picker__box { + padding: 0 1em; +} +/** + * The header containing the month and year stuff. + */ +.picker__header { + text-align: center; + position: relative; + margin-top: .75em; +} +/** + * The month and year labels. + */ +.picker__month, +.picker__year { + font-weight: 500; + display: inline-block; + margin-left: .25em; + margin-right: .25em; +} +.picker__year { + color: #999999; + font-size: .8em; + font-style: italic; +} +/** + * The month and year selectors. + */ +.picker__select--month, +.picker__select--year { + border: 1px solid #b7b7b7; + height: 2em; + padding: .5em; + margin-left: .25em; + margin-right: .25em; +} +@media (min-width: 24.5em) { + .picker__select--month, + .picker__select--year { + margin-top: -0.5em; + } +} +.picker__select--month { + width: 35%; +} +.picker__select--year { + width: 22.5%; +} +.picker__select--month:focus, +.picker__select--year:focus { + border-color: #0089ec; +} +/** + * The month navigation buttons. + */ +.picker__nav--prev, +.picker__nav--next { + position: absolute; + padding: .5em 1.25em; + width: 1em; + height: 1em; + box-sizing: content-box; + top: -0.25em; +} +@media (min-width: 24.5em) { + .picker__nav--prev, + .picker__nav--next { + top: -0.33em; + } +} +.picker__nav--prev { + left: -1em; + padding-right: 1.25em; +} +@media (min-width: 24.5em) { + .picker__nav--prev { + padding-right: 1.5em; + } +} +.picker__nav--next { + right: -1em; + padding-left: 1.25em; +} +@media (min-width: 24.5em) { + .picker__nav--next { + padding-left: 1.5em; + } +} +.picker__nav--prev:before, +.picker__nav--next:before { + content: " "; + border-top: .5em solid transparent; + border-bottom: .5em solid transparent; + border-right: 0.75em solid #000000; + width: 0; + height: 0; + display: block; + margin: 0 auto; +} +.picker__nav--next:before { + border-right: 0; + border-left: 0.75em solid #000000; +} +.picker__nav--prev:hover, +.picker__nav--next:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +.picker__nav--disabled, +.picker__nav--disabled:hover, +.picker__nav--disabled:before, +.picker__nav--disabled:before:hover { + cursor: default; + background: none; + border-right-color: #f5f5f5; + border-left-color: #f5f5f5; +} +/** + * The calendar table of dates + */ +.picker__table { + text-align: center; + border-collapse: collapse; + border-spacing: 0; + table-layout: fixed; + font-size: inherit; + width: 100%; + margin-top: .75em; + margin-bottom: .5em; +} +@media (min-height: 33.875em) { + .picker__table { + margin-bottom: .75em; + } +} +.picker__table td { + margin: 0; + padding: 0; +} +/** + * The weekday labels + */ +.picker__weekday { + width: 14.285714286%; + font-size: .75em; + padding-bottom: .25em; + color: #999999; + font-weight: 500; + /* Increase the spacing a tad */ +} +@media (min-height: 33.875em) { + .picker__weekday { + padding-bottom: .5em; + } +} +/** + * The days on the calendar + */ +.picker__day { + padding: .3125em 0; + font-weight: 200; + border: 1px solid transparent; +} +.picker__day--today { + position: relative; +} +.picker__day--today:before { + content: " "; + position: absolute; + top: 2px; + right: 2px; + width: 0; + height: 0; + border-top: 0.5em solid #0059bc; + border-left: .5em solid transparent; +} +.picker__day--disabled:before { + border-top-color: #aaaaaa; +} +.picker__day--outfocus { + color: #dddddd; +} +.picker__day--infocus:hover, +.picker__day--outfocus:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +.picker__day--highlighted { + border-color: #0089ec; +} +.picker__day--highlighted:hover, +.picker--focused .picker__day--highlighted { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +.picker__day--selected, +.picker__day--selected:hover, +.picker--focused .picker__day--selected { + background: #0089ec; + color: #ffffff; +} +.picker__day--disabled, +.picker__day--disabled:hover, +.picker--focused .picker__day--disabled { + background: #f5f5f5; + border-color: #f5f5f5; + color: #dddddd; + cursor: default; +} +.picker__day--highlighted.picker__day--disabled, +.picker__day--highlighted.picker__day--disabled:hover { + background: #bbbbbb; +} +/** + * The footer containing the "today", "clear", and "close" buttons. + */ +.picker__footer { + text-align: center; +} +.picker__button--today, +.picker__button--clear, +.picker__button--close { + border: 1px solid #ffffff; + background: #ffffff; + font-size: .8em; + padding: .66em 0; + font-weight: bold; + width: 33%; + display: inline-block; + vertical-align: bottom; +} +.picker__button--today:hover, +.picker__button--clear:hover, +.picker__button--close:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; + border-bottom-color: #b1dcfb; +} +.picker__button--today:focus, +.picker__button--clear:focus, +.picker__button--close:focus { + background: #b1dcfb; + border-color: #0089ec; + outline: none; +} +.picker__button--today:before, +.picker__button--clear:before, +.picker__button--close:before { + position: relative; + display: inline-block; + height: 0; +} +.picker__button--today:before, +.picker__button--clear:before { + content: " "; + margin-right: .45em; +} +.picker__button--today:before { + top: -0.05em; + width: 0; + border-top: 0.66em solid #0059bc; + border-left: .66em solid transparent; +} +.picker__button--clear:before { + top: -0.25em; + width: .66em; + border-top: 3px solid #ee2200; +} +.picker__button--close:before { + content: "\D7"; + top: -0.1em; + vertical-align: top; + font-size: 1.1em; + margin-right: .35em; + color: #777777; +} +.picker__button--today[disabled], +.picker__button--today[disabled]:hover { + background: #f5f5f5; + border-color: #f5f5f5; + color: #dddddd; + cursor: default; +} +.picker__button--today[disabled]:before { + border-top-color: #aaaaaa; +} + +/* ========================================================================== + $DEFAULT-DATE-PICKER + ========================================================================== */ diff --git a/js/pickadate.js-3.5.3/lib/themes/default.time.css b/js/pickadate.js-3.5.3/lib/themes/default.time.css new file mode 100644 index 0000000..0b159c8 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes/default.time.css @@ -0,0 +1,125 @@ +/* ========================================================================== + $BASE-TIME-PICKER + ========================================================================== */ +/** + * The list of times. + */ +.picker__list { + list-style: none; + padding: 0.75em 0 4.2em; + margin: 0; +} +/** + * The times on the clock. + */ +.picker__list-item { + border-bottom: 1px solid #dddddd; + border-top: 1px solid #dddddd; + margin-bottom: -1px; + position: relative; + background: #ffffff; + padding: .75em 1.25em; +} +@media (min-height: 46.75em) { + .picker__list-item { + padding: .5em 1em; + } +} +/* Hovered time */ +.picker__list-item:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; + border-color: #0089ec; + z-index: 10; +} +/* Highlighted and hovered/focused time */ +.picker__list-item--highlighted { + border-color: #0089ec; + z-index: 10; +} +.picker__list-item--highlighted:hover, +.picker--focused .picker__list-item--highlighted { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +/* Selected and hovered/focused time */ +.picker__list-item--selected, +.picker__list-item--selected:hover, +.picker--focused .picker__list-item--selected { + background: #0089ec; + color: #ffffff; + z-index: 10; +} +/* Disabled time */ +.picker__list-item--disabled, +.picker__list-item--disabled:hover, +.picker--focused .picker__list-item--disabled { + background: #f5f5f5; + border-color: #f5f5f5; + color: #dddddd; + cursor: default; + border-color: #dddddd; + z-index: auto; +} +/** + * The clear button + */ +.picker--time .picker__button--clear { + display: block; + width: 80%; + margin: 1em auto 0; + padding: 1em 1.25em; + background: none; + border: 0; + font-weight: 500; + font-size: .67em; + text-align: center; + text-transform: uppercase; + color: #666; +} +.picker--time .picker__button--clear:hover, +.picker--time .picker__button--clear:focus { + color: #000000; + background: #b1dcfb; + background: #ee2200; + border-color: #ee2200; + cursor: pointer; + color: #ffffff; + outline: none; +} +.picker--time .picker__button--clear:before { + top: -0.25em; + color: #666; + font-size: 1.25em; + font-weight: bold; +} +.picker--time .picker__button--clear:hover:before, +.picker--time .picker__button--clear:focus:before { + color: #ffffff; +} + +/* ========================================================================== + $DEFAULT-TIME-PICKER + ========================================================================== */ +/** + * The frame the bounds the time picker. + */ +.picker--time .picker__frame { + min-width: 256px; + max-width: 320px; +} +/** + * The picker box. + */ +.picker--time .picker__box { + font-size: 1em; + background: #f2f2f2; + padding: 0; +} +@media (min-height: 40.125em) { + .picker--time .picker__box { + margin-bottom: 5em; + } +} diff --git a/js/pickadate.js-3.5.3/lib/themes/rtl.css b/js/pickadate.js-3.5.3/lib/themes/rtl.css new file mode 100644 index 0000000..6de4820 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/themes/rtl.css @@ -0,0 +1,29 @@ +/*! + * Styling for RTL (right-to-left) languages using pickadate.js + */ +/** + * Switch the direction - only really necessary if + * it hasn’t already been applied higher up in the DOM. + */ +.picker { + direction: rtl; +} +/** + * Flip around the “next” and “previous” buttons. + */ +.picker__nav--next { + right: auto; + left: -1em; +} +.picker__nav--prev { + left: auto; + right: -1em; +} +.picker__nav--next:before { + border-left: 0; + border-right: 0.75em solid #000000; +} +.picker__nav--prev:before { + border-right: 0; + border-left: 0.75em solid #000000; +} diff --git a/js/pickadate.js-3.5.3/lib/translations/FORMATTING.md b/js/pickadate.js-3.5.3/lib/translations/FORMATTING.md new file mode 100644 index 0000000..3efb84a --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/FORMATTING.md @@ -0,0 +1,7 @@ +### The following convention is used for choosing a format for the translation files: + +1. Google for “Microsoft Style Guide LANGUAGE COUNTRY”. +2. Check the standard suggestions for Long Date Formats. +3. Set this as the `format` option using [pickadate’s formatting rules](http://amsul.ca/pickadate.js/date.htm#formatting-rules). + +Make sure `formatSubmit` is always `yyyy/mm/dd` to ensure our servers always get the value formatted the same. \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/NAMING.md b/js/pickadate.js-3.5.3/lib/translations/NAMING.md new file mode 100644 index 0000000..2376d6f --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/NAMING.md @@ -0,0 +1,21 @@ +### The following convention is used for naming the translation files: + +``` +LANGUAGE_COUNTRY.js +``` + +#### Where: + +``` +LANGUAGE = The lowercase ISO 639-1 language code. +``` + +> See http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes + +``` +COUNTRY = The uppercase ISO 3166-1 country code. +``` + +> See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + +When there is no `COUNTRY` in the filename, it is assumed the generic language is used in multiple countries. diff --git a/js/pickadate.js-3.5.3/lib/translations/ar.js b/js/pickadate.js-3.5.3/lib/translations/ar.js new file mode 100644 index 0000000..173246f --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/ar.js @@ -0,0 +1,12 @@ +// Arabic + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'يناير', 'فبراير', 'مارس', 'ابريل', 'مايو', 'يونيو', 'يوليو', 'اغسطس', 'سبتمبر', 'اكتوبر', 'نوفمبر', 'ديسمبر' ], + monthsShort: [ 'يناير', 'فبراير', 'مارس', 'ابريل', 'مايو', 'يونيو', 'يوليو', 'اغسطس', 'سبتمبر', 'اكتوبر', 'نوفمبر', 'ديسمبر' ], + weekdaysFull: [ 'الاحد', 'الاثنين', 'الثلاثاء', 'الاربعاء', 'الخميس', 'الجمعة', 'السبت' ], + weekdaysShort: [ 'الاحد', 'الاثنين', 'الثلاثاء', 'الاربعاء', 'الخميس', 'الجمعة', 'السبت' ], + today: 'اليوم', + clear: 'مسح', + format: 'yyyy mmmm dd', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/bg_BG.js b/js/pickadate.js-3.5.3/lib/translations/bg_BG.js new file mode 100644 index 0000000..a7b9295 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/bg_BG.js @@ -0,0 +1,13 @@ +// Bulgarian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'януари','февруари','март','април','май','юни','юли','август','септември','октомври','ноември','декември' ], + monthsShort: [ 'янр','фев','мар','апр','май','юни','юли','авг','сеп','окт','ное','дек' ], + weekdaysFull: [ 'неделя', 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота' ], + weekdaysShort: [ 'нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'днес', + clear: 'изтривам', + firstDay: 1, + format: 'd mmmm yyyy г.', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/bs_BA.js b/js/pickadate.js-3.5.3/lib/translations/bs_BA.js new file mode 100644 index 0000000..cf2a617 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/bs_BA.js @@ -0,0 +1,13 @@ +// Bosnian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januar', 'februar', 'mart', 'april', 'maj', 'juni', 'juli', 'august', 'septembar', 'oktobar', 'novembar', 'decembar' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'cetvrtak', 'petak', 'subota' ], + weekdaysShort: [ 'ne', 'po', 'ut', 'sr', 'če', 'pe', 'su' ], + today: 'danas', + clear: 'izbrisati', + firstDay: 1, + format: 'dd. mmmm yyyy.', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/ca_ES.js b/js/pickadate.js-3.5.3/lib/translations/ca_ES.js new file mode 100644 index 0000000..03b8197 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/ca_ES.js @@ -0,0 +1,13 @@ +// Catalan + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Gener', 'Febrer', 'Març', 'Abril', 'Maig', 'juny', 'Juliol', 'Agost', 'Setembre', 'Octubre', 'Novembre', 'Desembre' ], + monthsShort: [ 'Gen', 'Feb', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Oct', 'Nov', 'Des' ], + weekdaysFull: [ 'diumenge', 'dilluns', 'dimarts', 'dimecres', 'dijous', 'divendres', 'dissabte' ], + weekdaysShort: [ 'diu', 'dil', 'dim', 'dmc', 'dij', 'div', 'dis' ], + today: 'avui', + clear: 'esborrar', + firstDay: 1, + format: 'dddd d !de mmmm !de yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/cs_CZ.js b/js/pickadate.js-3.5.3/lib/translations/cs_CZ.js new file mode 100644 index 0000000..2c69b85 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/cs_CZ.js @@ -0,0 +1,13 @@ +// Czech + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec' ], + monthsShort: [ 'led', 'úno', 'bře', 'dub', 'kvě', 'čer', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro' ], + weekdaysFull: [ 'neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota' ], + weekdaysShort: [ 'ne', 'po', 'út', 'st', 'čt', 'pá', 'so' ], + today: 'dnes', + clear: 'vymazat', + firstDay: 1, + format: 'd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/da_DK.js b/js/pickadate.js-3.5.3/lib/translations/da_DK.js new file mode 100644 index 0000000..12defbf --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/da_DK.js @@ -0,0 +1,13 @@ +// Danish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag' ], + weekdaysShort: [ 'søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør' ], + today: 'i dag', + clear: 'slet', + firstDay: 1, + format: 'd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/de_DE.js b/js/pickadate.js-3.5.3/lib/translations/de_DE.js new file mode 100644 index 0000000..c42fbc7 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/de_DE.js @@ -0,0 +1,13 @@ +// German + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ], + monthsShort: [ 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez' ], + weekdaysFull: [ 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ], + weekdaysShort: [ 'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ], + today: 'Heute', + clear: 'Löschen', + firstDay: 1, + format: 'dddd, dd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/el_GR.js b/js/pickadate.js-3.5.3/lib/translations/el_GR.js new file mode 100644 index 0000000..4997296 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/el_GR.js @@ -0,0 +1,13 @@ +// Greek + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος' ], + monthsShort: [ 'Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαι', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ' ], + weekdaysFull: [ 'Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο' ], + weekdaysShort: [ 'Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ' ], + today: 'σήμερα', + clear: 'Διαγραφή', + firstDay: 1, + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/es_ES.js b/js/pickadate.js-3.5.3/lib/translations/es_ES.js new file mode 100644 index 0000000..e6ba56b --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/es_ES.js @@ -0,0 +1,13 @@ +// Spanish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre' ], + monthsShort: [ 'ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic' ], + weekdaysFull: [ 'domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb' ], + today: 'hoy', + clear: 'borrar', + firstDay: 1, + format: 'dddd d !de mmmm !de yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/et_EE.js b/js/pickadate.js-3.5.3/lib/translations/et_EE.js new file mode 100644 index 0000000..9fb3f76 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/et_EE.js @@ -0,0 +1,13 @@ +// Estonian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'jaanuar', 'veebruar', 'märts', 'aprill', 'mai', 'juuni', 'juuli', 'august', 'september', 'oktoober', 'november', 'detsember' ], + monthsShort: [ 'jaan', 'veebr', 'märts', 'apr', 'mai', 'juuni', 'juuli', 'aug', 'sept', 'okt', 'nov', 'dets' ], + weekdaysFull: [ 'pühapäev', 'esmaspäev', 'teisipäev', 'kolmapäev', 'neljapäev', 'reede', 'laupäev' ], + weekdaysShort: [ 'püh', 'esm', 'tei', 'kol', 'nel', 'ree', 'lau' ], + today: 'täna', + clear: 'kustutama', + firstDay: 1, + format: 'd. mmmm yyyy. a', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/eu_ES.js b/js/pickadate.js-3.5.3/lib/translations/eu_ES.js new file mode 100644 index 0000000..19d3ad7 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/eu_ES.js @@ -0,0 +1,13 @@ +// Basque + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'urtarrila', 'otsaila', 'martxoa', 'apirila', 'maiatza', 'ekaina', 'uztaila', 'abuztua', 'iraila', 'urria', 'azaroa', 'abendua' ], + monthsShort: [ 'urt', 'ots', 'mar', 'api', 'mai', 'eka', 'uzt', 'abu', 'ira', 'urr', 'aza', 'abe' ], + weekdaysFull: [ 'igandea', 'astelehena', 'asteartea', 'asteazkena', 'osteguna', 'ostirala', 'larunbata' ], + weekdaysShort: [ 'ig.', 'al.', 'ar.', 'az.', 'og.', 'or.', 'lr.' ], + today: 'gaur', + clear: 'garbitu', + firstDay: 1, + format: 'dddd, yyyy(e)ko mmmmren da', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/fi_FI.js b/js/pickadate.js-3.5.3/lib/translations/fi_FI.js new file mode 100644 index 0000000..702e246 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/fi_FI.js @@ -0,0 +1,13 @@ +// Finnish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'tammikuu', 'helmikuu', 'maaliskuu', 'huhtikuu', 'toukokuu', 'kesäkuu', 'heinäkuu', 'elokuu', 'syyskuu', 'lokakuu', 'marraskuu', 'joulukuu' ], + monthsShort: [ 'tammi', 'helmi', 'maalis', 'huhti', 'touko', 'kesä', 'heinä', 'elo', 'syys', 'loka', 'marras', 'joulu' ], + weekdaysFull: [ 'sunnuntai', 'maanantai', 'tiistai', 'keskiviikko', 'torstai', 'perjantai', 'lauantai' ], + weekdaysShort: [ 'su', 'ma', 'ti', 'ke', 'to', 'pe', 'la' ], + today: 'tänään', + clear: 'tyhjennä', + firstDay: 1, + format: 'd.m.yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/fr_FR.js b/js/pickadate.js-3.5.3/lib/translations/fr_FR.js new file mode 100644 index 0000000..175d544 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/fr_FR.js @@ -0,0 +1,17 @@ +// French + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre' ], + monthsShort: [ 'Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec' ], + weekdaysFull: [ 'Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi' ], + weekdaysShort: [ 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' ], + today: 'Aujourd\'hui', + clear: 'Effacer', + firstDay: 1, + format: 'dd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd', + labelMonthNext: 'Mois suivant', + labelMonthPrev: 'Mois précédent', + labelMonthSelect: 'Sélectionner un mois', + labelYearSelect: 'Sélectionner une année' +}); diff --git a/js/pickadate.js-3.5.3/lib/translations/gl_ES.js b/js/pickadate.js-3.5.3/lib/translations/gl_ES.js new file mode 100644 index 0000000..09f213c --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/gl_ES.js @@ -0,0 +1,13 @@ +// Galician + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Xaneiro', 'Febreiro', 'Marzo', 'Abril', 'Maio', 'Xuño', 'Xullo', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Decembro' ], + monthsShort: [ 'xan', 'feb', 'mar', 'abr', 'mai', 'xun', 'xul', 'ago', 'sep', 'out', 'nov', 'dec' ], + weekdaysFull: [ 'domingo', 'luns', 'martes', 'mércores', 'xoves', 'venres', 'sábado' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mér', 'xov', 'ven', 'sab' ], + today: 'hoxe', + clear: 'borrar', + firstDay: 1, + format: 'dddd d !de mmmm !de yyyy', + formatSubmit: 'yyyy/mm/dd' +}); diff --git a/js/pickadate.js-3.5.3/lib/translations/he_IL.js b/js/pickadate.js-3.5.3/lib/translations/he_IL.js new file mode 100644 index 0000000..7a2a1d5 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/he_IL.js @@ -0,0 +1,12 @@ +// Hebrew + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר' ], + monthsShort: [ 'ינו', 'פבר', 'מרץ', 'אפר', 'מאי', 'יונ', 'יול', 'אוג', 'ספט', 'אוק', 'נוב', 'דצמ' ], + weekdaysFull: [ 'יום ראשון', 'יום שני', 'יום שלישי', 'יום רביעי', 'יום חמישי', 'יום ששי', 'יום שבת' ], + weekdaysShort: [ 'א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ש' ], + today: 'היום', + clear: 'למחוק', + format: 'yyyy mmmmב d dddd', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/hr_HR.js b/js/pickadate.js-3.5.3/lib/translations/hr_HR.js new file mode 100644 index 0000000..4334ea6 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/hr_HR.js @@ -0,0 +1,13 @@ +// Croatian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'sijećanj', 'veljača', 'ožujak', 'travanj', 'svibanj', 'lipanj', 'srpanj', 'kolovoz', 'rujan', 'listopad', 'studeni', 'prosinac' ], + monthsShort: [ 'sij', 'velj', 'ožu', 'tra', 'svi', 'lip', 'srp', 'kol', 'ruj', 'lis', 'stu', 'pro' ], + weekdaysFull: [ 'nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota' ], + weekdaysShort: [ 'ned', 'pon', 'uto', 'sri', 'čet', 'pet', 'sub' ], + today: 'danas', + clear: 'izbrisati', + firstDay: 1, + format: 'd. mmmm yyyy.', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/hu_HU.js b/js/pickadate.js-3.5.3/lib/translations/hu_HU.js new file mode 100644 index 0000000..daf8305 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/hu_HU.js @@ -0,0 +1,13 @@ +// Hungarian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december' ], + monthsShort: [ 'jan', 'febr', 'márc', 'ápr', 'máj', 'jún', 'júl', 'aug', 'szept', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'vasárnap', 'hétfő', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat' ], + weekdaysShort: [ 'V', 'H', 'K', 'SZe', 'CS', 'P', 'SZo' ], + today: 'Ma', + clear: 'Törlés', + firstDay: 1, + format: 'yyyy. mmmm dd.', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/id_ID.js b/js/pickadate.js-3.5.3/lib/translations/id_ID.js new file mode 100644 index 0000000..f83efa8 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/id_ID.js @@ -0,0 +1,13 @@ +// Indonesian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember' ], + monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des' ], + weekdaysFull: [ 'Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu' ], + weekdaysShort: [ 'Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab' ], + today: 'hari ini', + clear: 'menghapus', + firstDay: 1, + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/is_IS.js b/js/pickadate.js-3.5.3/lib/translations/is_IS.js new file mode 100644 index 0000000..89afa73 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/is_IS.js @@ -0,0 +1,13 @@ +// Icelandic + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'janúar', 'febrúar', 'mars', 'apríl', 'maí', 'júní', 'júlí', 'ágúst', 'september', 'október', 'nóvember', 'desember' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maí', 'jún', 'júl', 'ágú', 'sep', 'okt', 'nóv', 'des' ], + weekdaysFull: [ 'sunnudagur', 'mánudagur', 'þriðjudagur', 'miðvikudagur', 'fimmtudagur', 'föstudagur', 'laugardagur' ], + weekdaysShort: [ 'sun', 'mán', 'þri', 'mið', 'fim', 'fös', 'lau' ], + today: 'Í dag', + clear: 'Hreinsa', + firstDay: 1, + format: 'dd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/it_IT.js b/js/pickadate.js-3.5.3/lib/translations/it_IT.js new file mode 100644 index 0000000..77df696 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/it_IT.js @@ -0,0 +1,13 @@ +// Italian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre' ], + monthsShort: [ 'gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic' ], + weekdaysFull: [ 'domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab' ], + today: 'oggi', + clear: 'cancellare', + firstDay: 1, + format: 'dddd d mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/ja_JP.js b/js/pickadate.js-3.5.3/lib/translations/ja_JP.js new file mode 100644 index 0000000..bc9133f --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/ja_JP.js @@ -0,0 +1,13 @@ +// Japanese + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ], + monthsShort: [ '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ], + weekdaysFull: [ '日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日' ], + weekdaysShort: [ '日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日' ], + today: '今日', + clear: '消去', + firstDay: 1, + format: 'yyyy mm dd', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/ko_KR.js b/js/pickadate.js-3.5.3/lib/translations/ko_KR.js new file mode 100644 index 0000000..fb525f0 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/ko_KR.js @@ -0,0 +1,13 @@ +// Korean + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ '1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월' ], + monthsShort: [ '1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월' ], + weekdaysFull: [ '일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일' ], + weekdaysShort: [ '일', '월', '화', '수', '목', '금', '토' ], + today: '오늘', + clear: '취소', + firstDay: 1, + format: 'yyyy 년 mm 월 dd 일', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/ne_NP.js b/js/pickadate.js-3.5.3/lib/translations/ne_NP.js new file mode 100644 index 0000000..3ef4223 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/ne_NP.js @@ -0,0 +1,13 @@ +// Nepali + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'जनवरी', 'फेब्रुअरी', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुलाई', 'अगस्त', 'सेप्टेम्बर', 'अक्टोबर', 'नोवेम्बर', 'डिसेम्बर' ], + monthsShort: [ 'जन', 'फेब्रु', 'मार्च', 'अप्रिल', 'मे', 'जुन', 'जुल', 'अग', 'सेप्टे', 'अक्टो', 'नोभे', 'डिसे' ], + weekdaysFull: [ 'सोमबार', 'मङ्लबार', 'बुधबार', 'बिहीबार', 'शुक्रबार', 'शनिबार', 'आईतबार' ], + weekdaysShort: [ 'सोम', 'मंगल्', 'बुध', 'बिही', 'शुक्र', 'शनि', 'आईत' ], + numbers: [ '०', '१', '२', '३', '४', '५', '६', '७', '८', '९' ], + today: 'आज', + clear: 'मेटाउनुहोस्', + format: 'dddd, dd mmmm, yyyy', + formatSubmit: 'yyyy/mm/dd' +}); diff --git a/js/pickadate.js-3.5.3/lib/translations/nl_NL.js b/js/pickadate.js-3.5.3/lib/translations/nl_NL.js new file mode 100644 index 0000000..757b887 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/nl_NL.js @@ -0,0 +1,13 @@ +// Dutch + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'maa', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag' ], + weekdaysShort: [ 'zo', 'ma', 'di', 'wo', 'do', 'vr', 'za' ], + today: 'vandaag', + clear: 'verwijderen', + firstDay: 1, + format: 'dddd d mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/no_NO.js b/js/pickadate.js-3.5.3/lib/translations/no_NO.js new file mode 100644 index 0000000..e2e0687 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/no_NO.js @@ -0,0 +1,13 @@ +// Norwegian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des' ], + weekdaysFull: [ 'søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag' ], + weekdaysShort: [ 'søn','man','tir', 'ons', 'tor', 'fre', 'lør' ], + today: 'i dag', + clear: 'nullstill', + firstDay: 1, + format: 'dd. mmm. yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/pl_PL.js b/js/pickadate.js-3.5.3/lib/translations/pl_PL.js new file mode 100644 index 0000000..cefbf5a --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/pl_PL.js @@ -0,0 +1,13 @@ +// Polish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień' ], + monthsShort: [ 'sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru' ], + weekdaysFull: [ 'niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota' ], + weekdaysShort: [ 'N', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So' ], + today: 'dzisiaj', + clear: 'usunąć', + firstDay: 1, + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/pt_BR.js b/js/pickadate.js-3.5.3/lib/translations/pt_BR.js new file mode 100644 index 0000000..b8523e3 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/pt_BR.js @@ -0,0 +1,12 @@ +// Brazilian Portuguese + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro' ], + monthsShort: [ 'jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez' ], + weekdaysFull: [ 'domingo', 'segunda-feira', 'terça-feira', 'quarta-feira', 'quinta-feira', 'sexta-feira', 'sábado' ], + weekdaysShort: [ 'dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sab' ], + today: 'hoje', + clear: 'excluir', + format: 'dddd, d !de mmmm !de yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/pt_PT.js b/js/pickadate.js-3.5.3/lib/translations/pt_PT.js new file mode 100644 index 0000000..fddbc96 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/pt_PT.js @@ -0,0 +1,12 @@ +// Portuguese + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro' ], + monthsShort: [ 'jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez' ], + weekdaysFull: [ 'domingo', 'segunda', 'terça', 'quarta', 'quinta', 'sexta', 'sábado' ], + weekdaysShort: [ 'dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sab' ], + today: 'hoje', + clear: 'excluir', + format: 'd !de mmmm !de yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/ro_RO.js b/js/pickadate.js-3.5.3/lib/translations/ro_RO.js new file mode 100644 index 0000000..f06f1c0 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/ro_RO.js @@ -0,0 +1,13 @@ +// Romanian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie', 'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie' ], + monthsShort: [ 'ian', 'feb', 'mar', 'apr', 'mai', 'iun', 'iul', 'aug', 'sep', 'oct', 'noi', 'dec' ], + weekdaysFull: [ 'duminică', 'luni', 'marţi', 'miercuri', 'joi', 'vineri', 'sâmbătă' ], + weekdaysShort: [ 'D', 'L', 'Ma', 'Mi', 'J', 'V', 'S' ], + today: 'azi', + clear: 'șterge', + firstDay: 1, + format: 'dd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/ru_RU.js b/js/pickadate.js-3.5.3/lib/translations/ru_RU.js new file mode 100644 index 0000000..984dc1f --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/ru_RU.js @@ -0,0 +1,13 @@ +// Russian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Января', 'Февраля', 'Марта', 'Апреля', 'Мая', 'Июня', 'Июля', 'Августа', 'Сентября', 'Октября', 'Ноября', 'Декабря' ], + monthsShort: [ 'Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек' ], + weekdaysFull: [ 'воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота' ], + weekdaysShort: [ 'вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'сегодня', + clear: 'удалить', + firstDay: 1, + format: 'd mmmm yyyy г.', + formatSubmit: 'yyyy/mm/dd' +}); diff --git a/js/pickadate.js-3.5.3/lib/translations/sk_SK.js b/js/pickadate.js-3.5.3/lib/translations/sk_SK.js new file mode 100644 index 0000000..e243c48 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/sk_SK.js @@ -0,0 +1,13 @@ +// Slovak + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december' ], + monthsShort: [ 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII' ], + weekdaysFull: [ 'nedeļľa', 'pondelok', 'utorok', 'streda', 'š̌švrtok', 'piatok', 'sobota' ], + weekdaysShort: [ 'Ne', 'Po', 'Ut', 'St', 'Št', 'Pi', 'So' ], + today: 'dnes', + clear: 'vymazať', + firstDay: 1, + format: 'd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/sl_SI.js b/js/pickadate.js-3.5.3/lib/translations/sl_SI.js new file mode 100644 index 0000000..d20256f --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/sl_SI.js @@ -0,0 +1,13 @@ +// Slovenian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januar', 'februar', 'marec', 'april', 'maj', 'junij', 'julij', 'avgust', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'avg', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'nedelja', 'ponedeljek', 'torek', 'sreda', 'četrtek', 'petek', 'sobota' ], + weekdaysShort: [ 'ned', 'pon', 'tor', 'sre', 'čet', 'pet', 'sob' ], + today: 'danes', + clear: 'izbriši', + firstDay: 1, + format: 'd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/sv_SE.js b/js/pickadate.js-3.5.3/lib/translations/sv_SE.js new file mode 100644 index 0000000..ddb9be1 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/sv_SE.js @@ -0,0 +1,13 @@ +// Swedish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag' ], + weekdaysShort: [ 'sön', 'mån', 'tis', 'ons', 'tor', 'fre', 'lör' ], + today: 'i dag', + clear: 'bort', + firstDay: 1, + format: 'd/m yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/th_TH.js b/js/pickadate.js-3.5.3/lib/translations/th_TH.js new file mode 100644 index 0000000..ff27dfd --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/th_TH.js @@ -0,0 +1,12 @@ +// Thai + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม' ], + monthsShort: [ 'ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.' ], + weekdaysFull: [ 'อาทติย', 'จันทร', 'องัคาร', 'พุธ', 'พฤหสั บดี', 'ศกุร', 'เสาร' ], + weekdaysShort: [ 'อ.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.' ], + today: 'วันนี้', + clear: 'ลบ', + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/tr_TR.js b/js/pickadate.js-3.5.3/lib/translations/tr_TR.js new file mode 100644 index 0000000..c97a97e --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/tr_TR.js @@ -0,0 +1,13 @@ +// Turkish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık' ], + monthsShort: [ 'Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara' ], + weekdaysFull: [ 'Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi' ], + weekdaysShort: [ 'Pzr', 'Pzt', 'Sal', 'Çrş', 'Prş', 'Cum', 'Cmt' ], + today: 'bugün', + clear: 'sil', + firstDay: 1, + format: 'dd mmmm yyyy dddd', + formatSubmit: 'yyyy/mm/dd' +}); diff --git a/js/pickadate.js-3.5.3/lib/translations/uk_UA.js b/js/pickadate.js-3.5.3/lib/translations/uk_UA.js new file mode 100644 index 0000000..c224401 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/uk_UA.js @@ -0,0 +1,13 @@ +// Ukrainian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'січень', 'лютий', 'березень', 'квітень', 'травень', 'червень', 'липень', 'серпень', 'вересень', 'жовтень', 'листопад', 'грудень' ], + monthsShort: [ 'січ', 'лют', 'бер', 'кві', 'тра', 'чер', 'лип', 'сер', 'вер', 'жов', 'лис', 'гру' ], + weekdaysFull: [ 'неділя', 'понеділок', 'вівторок', 'середа', 'четвер', 'п‘ятниця', 'субота' ], + weekdaysShort: [ 'нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'сьогодні', + clear: 'викреслити', + firstDay: 1, + format: 'dd mmmm yyyy p.', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/vi_VN.js b/js/pickadate.js-3.5.3/lib/translations/vi_VN.js new file mode 100644 index 0000000..a71888d --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/vi_VN.js @@ -0,0 +1,11 @@ +// Vietnamese + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu', 'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai' ], + monthsShort: [ 'Một', 'Hai', 'Ba', 'Tư', 'Năm', 'Sáu', 'Bảy', 'Tám', 'Chín', 'Mưới', 'Mười Một', 'Mười Hai' ], + weekdaysFull: [ 'Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy' ], + weekdaysShort: [ 'C.Nhật', 'T.Hai', 'T.Ba', 'T.Tư', 'T.Năm', 'T.Sáu', 'T.Bảy' ], + today: 'Hôm Nay', + clear: 'Xoá', + firstDay: 1 +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/zh_CN.js b/js/pickadate.js-3.5.3/lib/translations/zh_CN.js new file mode 100644 index 0000000..65e857d --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/zh_CN.js @@ -0,0 +1,13 @@ +// Simplified Chinese + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月' ], + monthsShort: [ '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二' ], + weekdaysFull: [ '星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六' ], + weekdaysShort: [ '日', '一', '二', '三', '四', '五', '六' ], + today: '今日', + clear: '删', + firstDay: 1, + format: 'yyyy 年 mm 月 dd 日', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/lib/translations/zh_TW.js b/js/pickadate.js-3.5.3/lib/translations/zh_TW.js new file mode 100644 index 0000000..f7651d3 --- /dev/null +++ b/js/pickadate.js-3.5.3/lib/translations/zh_TW.js @@ -0,0 +1,13 @@ +// Traditional Chinese + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月' ], + monthsShort: [ '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二' ], + weekdaysFull: [ '星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六' ], + weekdaysShort: [ '日', '一', '二', '三', '四', '五', '六' ], + today: '今天', + clear: '清除', + firstDay: 1, + format: 'yyyy 年 mm 月 dd 日', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/package.json b/js/pickadate.js-3.5.3/package.json new file mode 100644 index 0000000..bff14b3 --- /dev/null +++ b/js/pickadate.js-3.5.3/package.json @@ -0,0 +1,59 @@ +{ + "name": "pickadate", + "version": "3.5.3", + "title": "pickadate.js", + "description": "The mobile-friendly, responsive, and lightweight jQuery date & time input picker.", + "author": { + "name": "Amsul", + "email": "reach@amsul.ca", + "url": "http://amsul.ca" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://amsul.ca/MIT" + } + ], + "keywords": [ + "date", + "time", + "picker", + "input", + "responsive" + ], + "ignore": [ + "*.md", + "*.htm", + "_docs", + "demo", + "tests", + "v2-(deprecated)" + ], + "main": "lib/picker.js", + "homepage": "http://amsul.github.io/pickadate.js", + "docs": "http://amsul.github.io/pickadate.js", + "demo": "http://amsul.github.io/pickadate.js", + "bugs": "https://github.com/amsul/pickadate.js/issues", + "repository": { + "type": "git", + "url": "https://github.com/amsul/pickadate.js.git" + }, + "dependencies": { + "jquery": ">=1.7" + }, + "devDependencies": { + "grunt": "^0.4.5", + "phantomjs": "^1.9.7-5", + "zlib-browserify": "0.0.3", + "grunt-contrib-watch": "^0.6.1", + "grunt-contrib-jshint": "^0.10.0", + "grunt-contrib-qunit": "^0.4.0", + "grunt-contrib-copy": "^0.5.0", + "grunt-contrib-less": "^0.11.0", + "grunt-contrib-cssmin": "^0.9.0", + "grunt-contrib-uglify": "^0.4.0" + }, + "scripts": { + "test": "grunt travis --verbose" + } +} diff --git a/js/pickadate.js-3.5.3/pickadate.fr_FR.js b/js/pickadate.js-3.5.3/pickadate.fr_FR.js new file mode 100644 index 0000000..74355bf --- /dev/null +++ b/js/pickadate.js-3.5.3/pickadate.fr_FR.js @@ -0,0 +1,13 @@ +// French + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre' ], + monthsShort: [ 'jan', 'fev', 'mar', 'avr', 'mai', 'juin', 'juil', 'aou', 'sep', 'oct', 'nov', 'dec' ], + weekdaysFull: [ 'dimanche', 'lundi', 'mardy', 'mercredi', 'jeudi', 'vendredi', 'samedi' ], + weekdaysShort: [ 'dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam' ], + today: 'aujourd\'hui', + clear: 'effacer', + firstDay: 1, + format: 'dd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/pickadate.jquery.json b/js/pickadate.js-3.5.3/pickadate.jquery.json new file mode 100644 index 0000000..bff14b3 --- /dev/null +++ b/js/pickadate.js-3.5.3/pickadate.jquery.json @@ -0,0 +1,59 @@ +{ + "name": "pickadate", + "version": "3.5.3", + "title": "pickadate.js", + "description": "The mobile-friendly, responsive, and lightweight jQuery date & time input picker.", + "author": { + "name": "Amsul", + "email": "reach@amsul.ca", + "url": "http://amsul.ca" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://amsul.ca/MIT" + } + ], + "keywords": [ + "date", + "time", + "picker", + "input", + "responsive" + ], + "ignore": [ + "*.md", + "*.htm", + "_docs", + "demo", + "tests", + "v2-(deprecated)" + ], + "main": "lib/picker.js", + "homepage": "http://amsul.github.io/pickadate.js", + "docs": "http://amsul.github.io/pickadate.js", + "demo": "http://amsul.github.io/pickadate.js", + "bugs": "https://github.com/amsul/pickadate.js/issues", + "repository": { + "type": "git", + "url": "https://github.com/amsul/pickadate.js.git" + }, + "dependencies": { + "jquery": ">=1.7" + }, + "devDependencies": { + "grunt": "^0.4.5", + "phantomjs": "^1.9.7-5", + "zlib-browserify": "0.0.3", + "grunt-contrib-watch": "^0.6.1", + "grunt-contrib-jshint": "^0.10.0", + "grunt-contrib-qunit": "^0.4.0", + "grunt-contrib-copy": "^0.5.0", + "grunt-contrib-less": "^0.11.0", + "grunt-contrib-cssmin": "^0.9.0", + "grunt-contrib-uglify": "^0.4.0" + }, + "scripts": { + "test": "grunt travis --verbose" + } +} diff --git a/js/pickadate.js-3.5.3/tests/dev/date.htm b/js/pickadate.js-3.5.3/tests/dev/date.htm new file mode 100644 index 0000000..3ae7344 --- /dev/null +++ b/js/pickadate.js-3.5.3/tests/dev/date.htm @@ -0,0 +1,81 @@ + + + + + + + + + + +Pickadate.js + + + + + + + + + + +
+ +
+
+

+ +




+ + +
+
+ +























+ +
+ + + + + + + + + + + + + + diff --git a/js/pickadate.js-3.5.3/tests/dev/time.htm b/js/pickadate.js-3.5.3/tests/dev/time.htm new file mode 100644 index 0000000..c332fc1 --- /dev/null +++ b/js/pickadate.js-3.5.3/tests/dev/time.htm @@ -0,0 +1,76 @@ + + + + + + + + + + +Pickadate.js + + + + + + + + + + +
+ +
+
+

+ + +
+
+ +























+ +
+ + + + + + + + + + + + + + diff --git a/js/pickadate.js-3.5.3/tests/jquery.1.7.0.js b/js/pickadate.js-3.5.3/tests/jquery.1.7.0.js new file mode 100644 index 0000000..3871534 --- /dev/null +++ b/js/pickadate.js-3.5.3/tests/jquery.1.7.0.js @@ -0,0 +1,9300 @@ +/*! + * jQuery JavaScript Library v1.7 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Nov 3 16:18:21 2011 -0400 + */ +(function( window, undefined ) { + +// Use the correct document accordingly with window argument (sandbox) +var document = window.document, + navigator = window.navigator, + location = window.location; +var jQuery = (function() { + +// Define a local copy of jQuery +var jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // A central reference to the root jQuery(document) + rootjQuery, + + // A simple way to check for HTML strings or ID strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, + + // Check if a string has a non-whitespace character in it + rnotwhite = /\S/, + + // Used for trimming whitespace + trimLeft = /^\s+/, + trimRight = /\s+$/, + + // Check for digits + rdigit = /\d/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, + rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + + // Useragent RegExp + rwebkit = /(webkit)[ \/]([\w.]+)/, + ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, + rmsie = /(msie) ([\w.]+)/, + rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, + + // Matches dashed string for camelizing + rdashAlpha = /-([a-z]|[0-9])/ig, + rmsPrefix = /^-ms-/, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return ( letter + "" ).toUpperCase(); + }, + + // Keep a UserAgent string for use with jQuery.browser + userAgent = navigator.userAgent, + + // For matching the engine and version of the browser + browserMatch, + + // The deferred used on DOM ready + readyList, + + // The ready event handler + DOMContentLoaded, + + // Save a reference to some core methods + toString = Object.prototype.toString, + hasOwn = Object.prototype.hasOwnProperty, + push = Array.prototype.push, + slice = Array.prototype.slice, + trim = String.prototype.trim, + indexOf = Array.prototype.indexOf, + + // [[Class]] -> type pairs + class2type = {}; + +jQuery.fn = jQuery.prototype = { + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem, ret, doc; + + // Handle $(""), $(null), or $(undefined) + if ( !selector ) { + return this; + } + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + } + + // The body element only exists once, optimize finding it + if ( selector === "body" && !context && document.body ) { + this.context = document; + this[0] = document.body; + this.selector = selector; + this.length = 1; + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + // Are we dealing with HTML string or an ID? + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = quickExpr.exec( selector ); + } + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + doc = ( context ? context.ownerDocument || context : document ); + + // If a single string is passed in and it's a single tag + // just do a createElement and skip the rest + ret = rsingleTag.exec( selector ); + + if ( ret ) { + if ( jQuery.isPlainObject( context ) ) { + selector = [ document.createElement( ret[1] ) ]; + jQuery.fn.attr.call( selector, context, true ); + + } else { + selector = [ doc.createElement( ret[1] ) ]; + } + + } else { + ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); + selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes; + } + + return jQuery.merge( this, selector ); + + // HANDLE: $("#id") + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The current version of jQuery being used + jquery: "1.7", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return slice.call( this, 0 ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems, name, selector ) { + // Build a new jQuery matched element set + var ret = this.constructor(); + + if ( jQuery.isArray( elems ) ) { + push.apply( ret, elems ); + + } else { + jQuery.merge( ret, elems ); + } + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + ret.context = this.context; + + if ( name === "find" ) { + ret.selector = this.selector + ( this.selector ? " " : "" ) + selector; + } else if ( name ) { + ret.selector = this.selector + "." + name + "(" + selector + ")"; + } + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Attach the listeners + jQuery.bindReady(); + + // Add the callback + readyList.add( fn ); + + return this; + }, + + eq: function( i ) { + return i === -1 ? + this.slice( i ) : + this.slice( i, +i + 1 ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ), + "slice", slice.call(arguments).join(",") ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + // Either a released hold or an DOMready/load event and not yet ready + if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready, 1 ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.fireWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger( "ready" ).unbind( "ready" ); + } + } + }, + + bindReady: function() { + if ( readyList ) { + return; + } + + readyList = jQuery.Callbacks( "once memory" ); + + // Catch cases where $(document).ready() is called after the + // browser event has already occurred. + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + return setTimeout( jQuery.ready, 1 ); + } + + // Mozilla, Opera and webkit nightlies currently support this event + if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", jQuery.ready, false ); + + // If IE event model is used + } else if ( document.attachEvent ) { + // ensure firing before onload, + // maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", DOMContentLoaded ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", jQuery.ready ); + + // If IE and not a frame + // continually check to see if the document is ready + var toplevel = false; + + try { + toplevel = window.frameElement == null; + } catch(e) {} + + if ( document.documentElement.doScroll && toplevel ) { + doScrollCheck(); + } + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + // A crude way of determining if an object is a window + isWindow: function( obj ) { + return obj && typeof obj === "object" && "setInterval" in obj; + }, + + isNumeric: function( obj ) { + return obj != null && rdigit.test( obj ) && !isNaN( obj ); + }, + + type: function( obj ) { + return obj == null ? + String( obj ) : + class2type[ toString.call(obj) ] || "object"; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !hasOwn.call(obj, "constructor") && + !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + for ( var name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw msg; + }, + + parseJSON: function( data ) { + if ( typeof data !== "string" || !data ) { + return null; + } + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + + } + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && rnotwhite.test( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, + length = object.length, + isObj = length === undefined || jQuery.isFunction( object ); + + if ( args ) { + if ( isObj ) { + for ( name in object ) { + if ( callback.apply( object[ name ], args ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.apply( object[ i++ ], args ) === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isObj ) { + for ( name in object ) { + if ( callback.call( object[ name ], name, object[ name ] ) === false ) { + break; + } + } + } else { + for ( ; i < length; ) { + if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { + break; + } + } + } + } + + return object; + }, + + // Use native String.trim function wherever possible + trim: trim ? + function( text ) { + return text == null ? + "" : + trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); + }, + + // results is for internal usage only + makeArray: function( array, results ) { + var ret = results || []; + + if ( array != null ) { + // The window, strings (and functions) also have 'length' + // The extra typeof function check is to prevent crashes + // in Safari 2 (See: #3039) + // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 + var type = jQuery.type( array ); + + if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { + push.call( ret, array ); + } else { + jQuery.merge( ret, array ); + } + } + + return ret; + }, + + inArray: function( elem, array, i ) { + var len; + + if ( array ) { + if ( indexOf ) { + return indexOf.call( array, elem, i ); + } + + len = array.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in array && array[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var i = first.length, + j = 0; + + if ( typeof second.length === "number" ) { + for ( var l = second.length; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var ret = [], retVal; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( var i = 0, length = elems.length; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, key, ret = [], + i = 0, + length = elems.length, + // jquery objects are treated as arrays + isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( key in elems ) { + value = callback( elems[ key ], key, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return ret.concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + if ( typeof context === "string" ) { + var tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + var args = slice.call( arguments, 2 ), + proxy = function() { + return fn.apply( context, args.concat( slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; + + return proxy; + }, + + // Mutifunctional method to get and set values to a collection + // The value/s can optionally be executed if it's a function + access: function( elems, key, value, exec, fn, pass ) { + var length = elems.length; + + // Setting many attributes + if ( typeof key === "object" ) { + for ( var k in key ) { + jQuery.access( elems, k, key[k], exec, fn, value ); + } + return elems; + } + + // Setting one attribute + if ( value !== undefined ) { + // Optionally, function values get executed if exec is true + exec = !pass && exec && jQuery.isFunction(value); + + for ( var i = 0; i < length; i++ ) { + fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); + } + + return elems; + } + + // Getting an attribute + return length ? fn( elems[0], key ) : undefined; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // Use of jQuery.browser is frowned upon. + // More details: http://docs.jquery.com/Utilities/jQuery.browser + uaMatch: function( ua ) { + ua = ua.toLowerCase(); + + var match = rwebkit.exec( ua ) || + ropera.exec( ua ) || + rmsie.exec( ua ) || + ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || + []; + + return { browser: match[1] || "", version: match[2] || "0" }; + }, + + sub: function() { + function jQuerySub( selector, context ) { + return new jQuerySub.fn.init( selector, context ); + } + jQuery.extend( true, jQuerySub, this ); + jQuerySub.superclass = this; + jQuerySub.fn = jQuerySub.prototype = this(); + jQuerySub.fn.constructor = jQuerySub; + jQuerySub.sub = this.sub; + jQuerySub.fn.init = function init( selector, context ) { + if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { + context = jQuerySub( context ); + } + + return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); + }; + jQuerySub.fn.init.prototype = jQuerySub.fn; + var rootjQuerySub = jQuerySub(document); + return jQuerySub; + }, + + browser: {} +}); + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +browserMatch = jQuery.uaMatch( userAgent ); +if ( browserMatch.browser ) { + jQuery.browser[ browserMatch.browser ] = true; + jQuery.browser.version = browserMatch.version; +} + +// Deprecated, use jQuery.browser.webkit instead +if ( jQuery.browser.webkit ) { + jQuery.browser.safari = true; +} + +// IE doesn't match non-breaking spaces with \s +if ( rnotwhite.test( "\xA0" ) ) { + trimLeft = /^[\s\xA0]+/; + trimRight = /[\s\xA0]+$/; +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); + +// Cleanup functions for the document ready method +if ( document.addEventListener ) { + DOMContentLoaded = function() { + document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); + jQuery.ready(); + }; + +} else if ( document.attachEvent ) { + DOMContentLoaded = function() { + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( document.readyState === "complete" ) { + document.detachEvent( "onreadystatechange", DOMContentLoaded ); + jQuery.ready(); + } + }; +} + +// The DOM ready check for Internet Explorer +function doScrollCheck() { + if ( jQuery.isReady ) { + return; + } + + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch(e) { + setTimeout( doScrollCheck, 1 ); + return; + } + + // and execute any waiting functions + jQuery.ready(); +} + +// Expose jQuery as an AMD module, but only for AMD loaders that +// understand the issues with loading multiple versions of jQuery +// in a page that all might call define(). The loader will indicate +// they have special allowances for multiple jQuery versions by +// specifying define.amd.jQuery = true. Register as a named module, +// since jQuery can be concatenated with other files that may use define, +// but not use a proper concatenation script that understands anonymous +// AMD modules. A named AMD is safest and most robust way to register. +// Lowercase jquery is used because AMD module names are derived from +// file names, and jQuery is normally delivered in a lowercase file name. +if ( typeof define === "function" && define.amd && define.amd.jQuery ) { + define( "jquery", [], function () { return jQuery; } ); +} + +return jQuery; + +})(); + + +// String to Object flags format cache +var flagsCache = {}; + +// Convert String-formatted flags into Object-formatted ones and store in cache +function createFlags( flags ) { + var object = flagsCache[ flags ] = {}, + i, length; + flags = flags.split( /\s+/ ); + for ( i = 0, length = flags.length; i < length; i++ ) { + object[ flags[i] ] = true; + } + return object; +} + +/* + * Create a callback list using the following parameters: + * + * flags: an optional list of space-separated flags that will change how + * the callback list behaves + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible flags: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( flags ) { + + // Convert flags from String-formatted to Object-formatted + // (we check in cache first) + flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {}; + + var // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = [], + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list is currently firing + firing, + // First callback to fire (used internally by add and fireWith) + firingStart, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // Add one or several callbacks to the list + add = function( args ) { + var i, + length, + elem, + type, + actual; + for ( i = 0, length = args.length; i < length; i++ ) { + elem = args[ i ]; + type = jQuery.type( elem ); + if ( type === "array" ) { + // Inspect recursively + add( elem ); + } else if ( type === "function" ) { + // Add if not in unique mode and callback is not in + if ( !flags.unique || !self.has( elem ) ) { + list.push( elem ); + } + } + } + }, + // Fire callbacks + fire = function( context, args ) { + args = args || []; + memory = !flags.memory || [ context, args ]; + firing = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) { + memory = true; // Mark as halted + break; + } + } + firing = false; + if ( list ) { + if ( !flags.once ) { + if ( stack && stack.length ) { + memory = stack.shift(); + self.fireWith( memory[ 0 ], memory[ 1 ] ); + } + } else if ( memory === true ) { + self.disable(); + } else { + list = []; + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + var length = list.length; + add( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away, unless previous + // firing was halted (stopOnFalse) + } else if ( memory && memory !== true ) { + firingStart = length; + fire( memory[ 0 ], memory[ 1 ] ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + var args = arguments, + argIndex = 0, + argLength = args.length; + for ( ; argIndex < argLength ; argIndex++ ) { + for ( var i = 0; i < list.length; i++ ) { + if ( args[ argIndex ] === list[ i ] ) { + // Handle firingIndex and firingLength + if ( firing ) { + if ( i <= firingLength ) { + firingLength--; + if ( i <= firingIndex ) { + firingIndex--; + } + } + } + // Remove the element + list.splice( i--, 1 ); + // If we have some unicity property then + // we only need to do this once + if ( flags.unique ) { + break; + } + } + } + } + } + return this; + }, + // Control if a given callback is in the list + has: function( fn ) { + if ( list ) { + var i = 0, + length = list.length; + for ( ; i < length; i++ ) { + if ( fn === list[ i ] ) { + return true; + } + } + } + return false; + }, + // Remove all callbacks from the list + empty: function() { + list = []; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory || memory === true ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( stack ) { + if ( firing ) { + if ( !flags.once ) { + stack.push( [ context, args ] ); + } + } else if ( !( flags.once && memory ) ) { + fire( context, args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!memory; + } + }; + + return self; +}; + + + + +var // Static reference to slice + sliceDeferred = [].slice; + +jQuery.extend({ + + Deferred: function( func ) { + var doneList = jQuery.Callbacks( "once memory" ), + failList = jQuery.Callbacks( "once memory" ), + progressList = jQuery.Callbacks( "memory" ), + state = "pending", + lists = { + resolve: doneList, + reject: failList, + notify: progressList + }, + promise = { + done: doneList.add, + fail: failList.add, + progress: progressList.add, + + state: function() { + return state; + }, + + // Deprecated + isResolved: doneList.fired, + isRejected: failList.fired, + + then: function( doneCallbacks, failCallbacks, progressCallbacks ) { + deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks ); + return this; + }, + always: function() { + return deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments ); + }, + pipe: function( fnDone, fnFail, fnProgress ) { + return jQuery.Deferred(function( newDefer ) { + jQuery.each( { + done: [ fnDone, "resolve" ], + fail: [ fnFail, "reject" ], + progress: [ fnProgress, "notify" ] + }, function( handler, data ) { + var fn = data[ 0 ], + action = data[ 1 ], + returned; + if ( jQuery.isFunction( fn ) ) { + deferred[ handler ](function() { + returned = fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); + } + }); + } else { + deferred[ handler ]( newDefer[ action ] ); + } + }); + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + if ( obj == null ) { + obj = promise; + } else { + for ( var key in promise ) { + obj[ key ] = promise[ key ]; + } + } + return obj; + } + }, + deferred = promise.promise({}), + key; + + for ( key in lists ) { + deferred[ key ] = lists[ key ].fire; + deferred[ key + "With" ] = lists[ key ].fireWith; + } + + // Handle state + deferred.done( function() { + state = "resolved"; + }, failList.disable, progressList.lock ).fail( function() { + state = "rejected"; + }, doneList.disable, progressList.lock ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( firstParam ) { + var args = sliceDeferred.call( arguments, 0 ), + i = 0, + length = args.length, + pValues = new Array( length ), + count = length, + pCount = length, + deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? + firstParam : + jQuery.Deferred(), + promise = deferred.promise(); + function resolveFunc( i ) { + return function( value ) { + args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + if ( !( --count ) ) { + deferred.resolveWith( deferred, args ); + } + }; + } + function progressFunc( i ) { + return function( value ) { + pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; + deferred.notifyWith( promise, pValues ); + }; + } + if ( length > 1 ) { + for ( ; i < length; i++ ) { + if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) { + args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) ); + } else { + --count; + } + } + if ( !count ) { + deferred.resolveWith( deferred, args ); + } + } else if ( deferred !== firstParam ) { + deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); + } + return promise; + } +}); + + + + +jQuery.support = (function() { + + var div = document.createElement( "div" ), + documentElement = document.documentElement, + all, + a, + select, + opt, + input, + marginDiv, + support, + fragment, + body, + testElementParent, + testElement, + testElementStyle, + tds, + events, + eventName, + i, + isSupported; + + // Preliminary tests + div.setAttribute("className", "t"); + div.innerHTML = "
a"; + + + all = div.getElementsByTagName( "*" ); + a = div.getElementsByTagName( "a" )[ 0 ]; + + // Can't get basic test support + if ( !all || !all.length || !a ) { + return {}; + } + + // First batch of supports tests + select = document.createElement( "select" ); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName( "input" )[ 0 ]; + + support = { + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: ( div.firstChild.nodeType === 3 ), + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName( "tbody" ).length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName( "link" ).length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: ( a.getAttribute( "href" ) === "/a" ), + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.55/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Make sure unknown elements (like HTML5 elems) are handled appropriately + unknownElems: !!div.getElementsByTagName( "nav" ).length, + + // Make sure that if no value is specified for a checkbox + // that it defaults to "on". + // (WebKit defaults to "" instead) + checkOn: ( input.value === "on" ), + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // Tests for enctype support on a form(#6743) + enctype: !!document.createElement("form").enctype, + + // Will be defined later + submitBubbles: true, + changeBubbles: true, + focusinBubbles: false, + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Test to see if it's possible to delete an expando from an element + // Fails in Internet Explorer + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { + div.attachEvent( "onclick", function() { + // Cloning a node shouldn't copy over any + // bound event handlers (IE does this) + support.noCloneEvent = false; + }); + div.cloneNode( true ).fireEvent( "onclick" ); + } + + // Check if a radio maintains its value + // after being appended to the DOM + input = document.createElement("input"); + input.value = "t"; + input.setAttribute("type", "radio"); + support.radioValue = input.value === "t"; + + input.setAttribute("checked", "checked"); + div.appendChild( input ); + fragment = document.createDocumentFragment(); + fragment.appendChild( div.lastChild ); + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + div.innerHTML = ""; + + // Figure out if the W3C box model works as expected + div.style.width = div.style.paddingLeft = "1px"; + + // We don't want to do body-related feature tests on frameset + // documents, which lack a body. So we use + // document.getElementsByTagName("body")[0], which is undefined in + // frameset documents, while document.body isn’t. (7398) + body = document.getElementsByTagName("body")[ 0 ]; + // We use our own, invisible, body unless the body is already present + // in which case we use a div (#9239) + testElement = document.createElement( body ? "div" : "body" ); + testElementStyle = { + visibility: "hidden", + width: 0, + height: 0, + border: 0, + margin: 0, + background: "none" + }; + if ( body ) { + jQuery.extend( testElementStyle, { + position: "absolute", + left: "-999px", + top: "-999px" + }); + } + for ( i in testElementStyle ) { + testElement.style[ i ] = testElementStyle[ i ]; + } + testElement.appendChild( div ); + testElementParent = body || documentElement; + testElementParent.insertBefore( testElement, testElementParent.firstChild ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + support.boxModel = div.offsetWidth === 2; + + if ( "zoom" in div.style ) { + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + // (IE < 8 does this) + div.style.display = "inline"; + div.style.zoom = 1; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); + + // Check if elements with layout shrink-wrap their children + // (IE 6 does this) + div.style.display = ""; + div.innerHTML = "
"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); + } + + div.innerHTML = "
t
"; + tds = div.getElementsByTagName( "td" ); + + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + // (only IE 8 fails this test) + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Check if empty table cells still have offsetWidth/Height + // (IE < 8 fail this test) + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + div.innerHTML = ""; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. For more + // info see bug #3333 + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + if ( document.defaultView && document.defaultView.getComputedStyle ) { + marginDiv = document.createElement( "div" ); + marginDiv.style.width = "0"; + marginDiv.style.marginRight = "0"; + div.appendChild( marginDiv ); + support.reliableMarginRight = + ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; + } + + // Technique from Juriy Zaytsev + // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/ + // We only care about the case where non-standard event systems + // are used, namely in IE. Short-circuiting here helps us to + // avoid an eval call (in setAttribute) which can cause CSP + // to go haywire. See: https://developer.mozilla.org/en/Security/CSP + if ( div.attachEvent ) { + for( i in { + submit: 1, + change: 1, + focusin: 1 + } ) { + eventName = "on" + i; + isSupported = ( eventName in div ); + if ( !isSupported ) { + div.setAttribute( eventName, "return;" ); + isSupported = ( typeof div[ eventName ] === "function" ); + } + support[ i + "Bubbles" ] = isSupported; + } + } + + // Run fixed position tests at doc ready to avoid a crash + // related to the invisible body in IE8 + jQuery(function() { + var container, outer, inner, table, td, offsetSupport, + conMarginTop = 1, + ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;", + vb = "visibility:hidden;border:0;", + style = "style='" + ptlm + "border:5px solid #000;padding:0;'", + html = "
" + + "" + + "
"; + + // Reconstruct a container + body = document.getElementsByTagName("body")[0]; + if ( !body ) { + // Return for frameset docs that don't have a body + // These tests cannot be done + return; + } + + container = document.createElement("div"); + container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px"; + body.insertBefore( container, body.firstChild ); + + // Construct a test element + testElement = document.createElement("div"); + testElement.style.cssText = ptlm + vb; + + testElement.innerHTML = html; + container.appendChild( testElement ); + outer = testElement.firstChild; + inner = outer.firstChild; + td = outer.nextSibling.firstChild.firstChild; + + offsetSupport = { + doesNotAddBorder: ( inner.offsetTop !== 5 ), + doesAddBorderForTableAndCells: ( td.offsetTop === 5 ) + }; + + inner.style.position = "fixed"; + inner.style.top = "20px"; + + // safari subtracts parent border width here which is 5px + offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 ); + inner.style.position = inner.style.top = ""; + + outer.style.overflow = "hidden"; + outer.style.position = "relative"; + + offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 ); + offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop ); + + body.removeChild( container ); + testElement = container = null; + + jQuery.extend( support, offsetSupport ); + }); + + testElement.innerHTML = ""; + testElementParent.removeChild( testElement ); + + // Null connected elements to avoid leaks in IE + testElement = fragment = select = opt = body = marginDiv = div = input = null; + + return support; +})(); + +// Keep track of boxModel +jQuery.boxModel = jQuery.support.boxModel; + + + + +var rbrace = /^(?:\{.*\}|\[.*\])$/, + rmultiDash = /([A-Z])/g; + +jQuery.extend({ + cache: {}, + + // Please use with caution + uuid: 0, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var privateCache, thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando, + isEvents = name === "events"; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ jQuery.expando ] = id = ++jQuery.uuid; + } else { + id = jQuery.expando; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + privateCache = thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Users should not attempt to inspect the internal events object using jQuery.data, + // it is undocumented and subject to change. But does anyone listen? No. + if ( isEvents && !thisCache[ name ] ) { + return privateCache.events; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; + }, + + removeData: function( elem, name, pvt /* Internal Use Only */ ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, l, + + // Reference to internal data cache key + internalKey = jQuery.expando, + + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + + // See jQuery.data for more information + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support space separated names + if ( jQuery.isArray( name ) ) { + name = name; + } else if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split( " " ); + } + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject(cache[ id ]) ) { + return; + } + } + + // Browsers that fail expando deletion also refuse to delete expandos on + // the window, but it will allow it on all other JS objects; other browsers + // don't care + // Ensure that `cache` is not a window object #10080 + if ( jQuery.support.deleteExpando || !cache.setInterval ) { + delete cache[ id ]; + } else { + cache[ id ] = null; + } + + // We destroyed the cache and need to eliminate the expando on the node to avoid + // false lookups in the cache for entries that no longer exist + if ( isNode ) { + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( jQuery.support.deleteExpando ) { + delete elem[ jQuery.expando ]; + } else if ( elem.removeAttribute ) { + elem.removeAttribute( jQuery.expando ); + } else { + elem[ jQuery.expando ] = null; + } + } + }, + + // For internal use only. + _data: function( elem, name, data ) { + return jQuery.data( elem, name, data, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + if ( elem.nodeName ) { + var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; + + if ( match ) { + return !(match === true || elem.getAttribute("classid") !== match); + } + } + + return true; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var parts, attr, name, + data = null; + + if ( typeof key === "undefined" ) { + if ( this.length ) { + data = jQuery.data( this[0] ); + + if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) { + attr = this[0].attributes; + for ( var i = 0, l = attr.length; i < l; i++ ) { + name = attr[i].name; + + if ( name.indexOf( "data-" ) === 0 ) { + name = jQuery.camelCase( name.substring(5) ); + + dataAttr( this[0], name, data[ name ] ); + } + } + jQuery._data( this[0], "parsedAttrs", true ); + } + } + + return data; + + } else if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + // Try to fetch any internally stored data first + if ( data === undefined && this.length ) { + data = jQuery.data( this[0], key ); + data = dataAttr( this[0], key, data ); + } + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + + } else { + return this.each(function() { + var $this = jQuery( this ), + args = [ parts[0], value ]; + + $this.triggerHandler( "setData" + parts[1] + "!", args ); + jQuery.data( this, key, value ); + $this.triggerHandler( "changeData" + parts[1] + "!", args ); + }); + } + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + jQuery.isNumeric( data ) ? parseFloat( data ) : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + for ( var name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} + + + + +function handleQueueMarkDefer( elem, type, src ) { + var deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + defer = jQuery._data( elem, deferDataKey ); + if ( defer && + ( src === "queue" || !jQuery._data(elem, queueDataKey) ) && + ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) { + // Give room for hard-coded callbacks to fire first + // and eventually mark/queue something else on the element + setTimeout( function() { + if ( !jQuery._data( elem, queueDataKey ) && + !jQuery._data( elem, markDataKey ) ) { + jQuery.removeData( elem, deferDataKey, true ); + defer.fire(); + } + }, 0 ); + } +} + +jQuery.extend({ + + _mark: function( elem, type ) { + if ( elem ) { + type = ( type || "fx" ) + "mark"; + jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 ); + } + }, + + _unmark: function( force, elem, type ) { + if ( force !== true ) { + type = elem; + elem = force; + force = false; + } + if ( elem ) { + type = type || "fx"; + var key = type + "mark", + count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 ); + if ( count ) { + jQuery._data( elem, key, count ); + } else { + jQuery.removeData( elem, key, true ); + handleQueueMarkDefer( elem, type, "mark" ); + } + } + }, + + queue: function( elem, type, data ) { + var q; + if ( elem ) { + type = ( type || "fx" ) + "queue"; + q = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !q || jQuery.isArray(data) ) { + q = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + q.push( data ); + } + } + return q || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + fn = queue.shift(), + hooks = {}; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + } + + if ( fn ) { + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + jQuery._data( elem, type + ".run", hooks ); + fn.call( elem, function() { + jQuery.dequeue( elem, type ); + }, hooks ); + } + + if ( !queue.length ) { + jQuery.removeData( elem, type + "queue " + type + ".run", true ); + handleQueueMarkDefer( elem, type, "queue" ); + } + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + } + + if ( data === undefined ) { + return jQuery.queue( this[0], type ); + } + return this.each(function() { + var queue = jQuery.queue( this, type, data ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, object ) { + if ( typeof type !== "string" ) { + object = type; + type = undefined; + } + type = type || "fx"; + var defer = jQuery.Deferred(), + elements = this, + i = elements.length, + count = 1, + deferDataKey = type + "defer", + queueDataKey = type + "queue", + markDataKey = type + "mark", + tmp; + function resolve() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + } + while( i-- ) { + if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || + ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || + jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && + jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) { + count++; + tmp.add( resolve ); + } + } + resolve(); + return defer.promise(); + } +}); + + + + +var rclass = /[\n\t\r]/g, + rspace = /\s+/, + rreturn = /\r/g, + rtype = /^(?:button|input)$/i, + rfocusable = /^(?:button|input|object|select|textarea)$/i, + rclickable = /^a(?:rea)?$/i, + rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + nodeHook, boolHook, fixSpecified; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.attr ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, name, value, true, jQuery.prop ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classNames, i, l, elem, + setClass, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call(this, j, this.className) ); + }); + } + + if ( value && typeof value === "string" ) { + classNames = value.split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 ) { + if ( !elem.className && classNames.length === 1 ) { + elem.className = value; + + } else { + setClass = " " + elem.className + " "; + + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { + setClass += classNames[ c ] + " "; + } + } + elem.className = jQuery.trim( setClass ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classNames, i, l, elem, className, c, cl; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call(this, j, this.className) ); + }); + } + + if ( (value && typeof value === "string") || value === undefined ) { + classNames = ( value || "" ).split( rspace ); + + for ( i = 0, l = this.length; i < l; i++ ) { + elem = this[ i ]; + + if ( elem.nodeType === 1 && elem.className ) { + if ( value ) { + className = (" " + elem.className + " ").replace( rclass, " " ); + for ( c = 0, cl = classNames.length; c < cl; c++ ) { + className = className.replace(" " + classNames[ c ] + " ", " "); + } + elem.className = jQuery.trim( className ); + + } else { + elem.className = ""; + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.split( rspace ); + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space seperated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + } else if ( type === "undefined" || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // toggle whole className + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var hooks, ret, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return undefined; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var self = jQuery(this), val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, i, max, option, + index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type === "select-one"; + + // Nothing was selected + if ( index < 0 ) { + return null; + } + + // Loop through all the selected options + i = one ? index : 0; + max = one ? index + 1 : options.length; + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Don't return options that are disabled or in a disabled optgroup + if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && + (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + // Fixes Bug #2551 -- select.val() broken in IE after form.reset() + if ( one && !values.length && options.length ) { + return jQuery( options[ index ] ).val(); + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attrFn: { + val: true, + css: true, + html: true, + text: true, + data: true, + width: true, + height: true, + offset: true + }, + + attr: function( elem, name, value, pass ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return undefined; + } + + if ( pass && name in jQuery.attrFn ) { + return jQuery( elem )[ name ]( value ); + } + + // Fallback to prop when attributes are not supported + if ( !("getAttribute" in elem) ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return undefined; + + } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, "" + value ); + return value; + } + + } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + ret = elem.getAttribute( name ); + + // Non-existent attributes return null, we normalize to undefined + return ret === null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var propName, attrNames, name, l, + i = 0; + + if ( elem.nodeType === 1 ) { + attrNames = ( value || "" ).split( rspace ); + l = attrNames.length; + + for ( ; i < l; i++ ) { + name = attrNames[ i ].toLowerCase(); + propName = jQuery.propFix[ name ] || name; + + // See #9699 for explanation of this approach (setting first, then removal) + jQuery.attr( elem, name, "" ); + elem.removeAttribute( getSetAttribute ? name : propName ); + + // Set corresponding property to false for boolean attributes + if ( rboolean.test( name ) && propName in elem ) { + elem[ propName ] = false; + } + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + // We can't allow the type property to be changed (since it causes problems in IE) + if ( rtype.test( elem.nodeName ) && elem.parentNode ) { + jQuery.error( "type property can't be changed" ); + } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to it's default in case type is set after value + // This is for element creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + }, + // Use the value property for back compat + // Use the nodeHook for button elements in IE6/7 (#1954) + value: { + get: function( elem, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.get( elem, name ); + } + return name in elem ? + elem.value : + null; + }, + set: function( elem, value, name ) { + if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { + return nodeHook.set( elem, value, name ); + } + // Does not return so that setAttribute is also used + elem.value = value; + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return undefined; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional) +jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex; + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + // Align boolean attributes with corresponding properties + // Fall back to attribute presence where some booleans are not supported + var attrNode, + property = jQuery.prop( elem, name ); + return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + var propName; + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + // value is true since we know at this point it's type boolean and not false + // Set boolean attributes to the same name and set the DOM property + propName = jQuery.propFix[ name ] || name; + if ( propName in elem ) { + // Only set the IDL specifically if it already exists on the element + elem[ propName ] = true; + } + + elem.setAttribute( name, name.toLowerCase() ); + } + return name; + } +}; + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + fixSpecified = { + name: true, + id: true + }; + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret; + ret = elem.getAttributeNode( name ); + return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ? + ret.nodeValue : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + ret = document.createAttribute( name ); + elem.setAttributeNode( ret ); + } + return ( ret.nodeValue = value + "" ); + } + }; + + // Apply the nodeHook to tabindex + jQuery.attrHooks.tabindex.set = nodeHook.set; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + if ( value === "" ) { + value = "false"; + } + nodeHook.set( elem, value, name ); + } + }; +} + + +// Some attributes require a special call on IE +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret === null ? undefined : ret; + } + }); + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Normalize to lowercase since IE uppercases css property names + return elem.style.cssText.toLowerCase() || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = "" + value ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); + + + + +var rnamespaces = /\.(.*)$/, + rformElems = /^(?:textarea|input|select)$/i, + rperiod = /\./g, + rspaces = / /g, + rescape = /[^\w\s.|`]/g, + rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/, + rhoverHack = /\bhover(\.\S+)?/, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/, + quickParse = function( selector ) { + var quick = rquickIs.exec( selector ); + if ( quick ) { + // 0 1 2 3 + // [ _, tag, id, class ] + quick[1] = ( quick[1] || "" ).toLowerCase(); + quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" ); + } + return quick; + }, + quickIs = function( elem, m ) { + return ( + (!m[1] || elem.nodeName.toLowerCase() === m[1]) && + (!m[2] || elem.id === m[2]) && + (!m[3] || m[3].test( elem.className )) + ); + }, + hoverHack = function( events ) { + return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" ); + }; + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + add: function( elem, types, handler, data, selector ) { + + var elemData, eventHandle, events, + t, tns, type, namespaces, handleObj, + handleObjIn, quick, handlers, special; + + // Don't attach events to noData or text/comment nodes (allow plain objects tho) + if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + events = elemData.events; + if ( !events ) { + elemData.events = events = {}; + } + eventHandle = elemData.handle; + if ( !eventHandle ) { + elemData.handle = eventHandle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = hoverHack(types).split( " " ); + for ( t = 0; t < types.length; t++ ) { + + tns = rtypenamespace.exec( types[t] ) || []; + type = tns[1]; + namespaces = ( tns[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: tns[1], + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + namespace: namespaces.join(".") + }, handleObjIn ); + + // Delegated event; pre-analyze selector so it's processed quickly on event dispatch + if ( selector ) { + handleObj.quick = quickParse( selector ); + if ( !handleObj.quick && jQuery.expr.match.POS.test( selector ) ) { + handleObj.isPositional = true; + } + } + + // Init the event handler queue if we're the first + handlers = events[ type ]; + if ( !handlers ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + global: {}, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector ) { + + var elemData = jQuery.hasData( elem ) && jQuery._data( elem ), + t, tns, type, namespaces, origCount, + j, events, special, handle, eventType, handleObj; + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = hoverHack( types || "" ).split(" "); + for ( t = 0; t < types.length; t++ ) { + tns = rtypenamespace.exec( types[t] ) || []; + type = tns[1]; + namespaces = tns[2]; + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + namespaces = namespaces? "." + namespaces : ""; + for ( j in events ) { + jQuery.event.remove( elem, j + namespaces, handler, selector ); + } + return; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector? special.delegateType : special.bindType ) || type; + eventType = events[ type ] || []; + origCount = eventType.length; + namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + + // Only need to loop for special events or selective removal + if ( handler || namespaces || selector || special.remove ) { + for ( j = 0; j < eventType.length; j++ ) { + handleObj = eventType[ j ]; + + if ( !handler || handler.guid === handleObj.guid ) { + if ( !namespaces || namespaces.test( handleObj.namespace ) ) { + if ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) { + eventType.splice( j--, 1 ); + + if ( handleObj.selector ) { + eventType.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + } + } + } else { + // Removing all events + eventType.length = 0; + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( eventType.length === 0 && origCount !== eventType.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + handle = elemData.handle; + if ( handle ) { + handle.elem = null; + } + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery.removeData( elem, [ "events", "handle" ], true ); + } + }, + + // Events that are safe to short-circuit if no handlers are attached. + // Native DOM events should not be added, they may have inline handlers. + customEvent: { + "getData": true, + "setData": true, + "changeData": true + }, + + trigger: function( event, data, elem, onlyHandlers ) { + // Don't do events on text and comment nodes + if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) { + return; + } + + // Event object or event type + var type = event.type || event, + namespaces = [], + cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType; + + if ( type.indexOf( "!" ) >= 0 ) { + // Exclusive events trigger only for the exact event (no namespaces) + type = type.slice(0, -1); + exclusive = true; + } + + if ( type.indexOf( "." ) >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + + if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { + // No jQuery handlers for this event type, and it can't have inline handlers + return; + } + + // Caller can pass in an Event, Object, or just an event type string + event = typeof event === "object" ? + // jQuery.Event object + event[ jQuery.expando ] ? event : + // Object literal + new jQuery.Event( type, event ) : + // Just the event type (string) + new jQuery.Event( type ); + + event.type = type; + event.isTrigger = true; + event.exclusive = exclusive; + event.namespace = namespaces.join( "." ); + event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null; + ontype = type.indexOf( ":" ) < 0 ? "on" + type : ""; + + // triggerHandler() and global events don't bubble or run the default action + if ( onlyHandlers || !elem ) { + event.preventDefault(); + } + + // Handle a global trigger + if ( !elem ) { + + // TODO: Stop taunting the data cache; remove global events and always attach to document + cache = jQuery.cache; + for ( i in cache ) { + if ( cache[ i ].events && cache[ i ].events[ type ] ) { + jQuery.event.trigger( event, data, cache[ i ].handle.elem, true ); + } + } + return; + } + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data != null ? jQuery.makeArray( data ) : []; + data.unshift( event ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + eventPath = [[ elem, special.bindType || type ]]; + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + old = null; + for ( cur = elem.parentNode; cur; cur = cur.parentNode ) { + eventPath.push([ cur, bubbleType ]); + old = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( old && old === elem.ownerDocument ) { + eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]); + } + } + + // Fire handlers on the event path + for ( i = 0; i < eventPath.length; i++ ) { + + cur = eventPath[i][0]; + event.type = eventPath[i][1]; + + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) ) { + handle.apply( cur, data ); + } + + if ( event.isPropagationStopped() ) { + break; + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + // IE<9 dies on focus/blur to hidden element (#1486) + if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + old = elem[ ontype ]; + + if ( old ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + elem[ type ](); + jQuery.event.triggered = undefined; + + if ( old ) { + elem[ ontype ] = old; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event || window.event ); + + var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []), + delegateCount = handlers.delegateCount, + args = [].slice.call( arguments, 0 ), + run_all = !event.exclusive && !event.namespace, + specialHandle = ( jQuery.event.special[ event.type ] || {} ).handle, + handlerQueue = [], + i, j, cur, ret, selMatch, matched, matches, handleObj, sel, hit, related; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Determine handlers that should run if there are delegated events + // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861) + if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) { + + for ( cur = event.target; cur != this; cur = cur.parentNode || this ) { + selMatch = {}; + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + sel = handleObj.selector; + hit = selMatch[ sel ]; + + if ( handleObj.isPositional ) { + // Since .is() does not work for positionals; see http://jsfiddle.net/eJ4yd/3/ + hit = ( hit || (selMatch[ sel ] = jQuery( sel )) ).index( cur ) >= 0; + } else if ( hit === undefined ) { + hit = selMatch[ sel ] = ( handleObj.quick ? quickIs( cur, handleObj.quick ) : jQuery( cur ).is( sel ) ); + } + if ( hit ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, matches: matches }); + } + } + } + + // Add the remaining (directly-bound) handlers + if ( handlers.length > delegateCount ) { + handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) }); + } + + // Run delegates first; they may want to stop propagation beneath us + for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) { + matched = handlerQueue[ i ]; + event.currentTarget = matched.elem; + + for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) { + handleObj = matched.matches[ j ]; + + // Triggered event must either 1) be non-exclusive and have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) { + + event.data = handleObj.data; + event.handleObj = handleObj; + + ret = ( specialHandle || handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + event.result = ret; + if ( ret === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + return event.result; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + // *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 *** + props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "), + filter: function( event, original ) { + var eventDoc, doc, body, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, + originalEvent = event, + fixHook = jQuery.event.fixHooks[ event.type ] || {}, + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = jQuery.Event( originalEvent ); + + for ( i = copy.length; i; ) { + prop = copy[ --i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Target should not be a text node (#504, Safari) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8) + if ( event.metaKey === undefined ) { + event.metaKey = event.ctrlKey; + } + + return fixHook.filter? fixHook.filter( event, originalEvent ) : event; + }, + + special: { + ready: { + // Make sure the ready event is setup + setup: jQuery.bindReady + }, + + focus: { + delegateType: "focusin", + noBubble: true + }, + blur: { + delegateType: "focusout", + noBubble: true + }, + + beforeunload: { + setup: function( data, namespaces, eventHandle ) { + // We only want to do this special case on windows + if ( jQuery.isWindow( this ) ) { + this.onbeforeunload = eventHandle; + } + }, + + teardown: function( namespaces, eventHandle ) { + if ( this.onbeforeunload === eventHandle ) { + this.onbeforeunload = null; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +// Some plugins are using, but it's undocumented/deprecated and will be removed. +// The 1.7 special event interface should provide all the hooks needed now. +jQuery.event.handle = jQuery.event.dispatch; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + if ( elem.detachEvent ) { + elem.detachEvent( "on" + type, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +function returnFalse() { + return false; +} +function returnTrue() { + return true; +} + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + preventDefault: function() { + this.isDefaultPrevented = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + + // if preventDefault exists run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // otherwise set the returnValue property of the original event to false (IE) + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + this.isPropagationStopped = returnTrue; + + var e = this.originalEvent; + if ( !e ) { + return; + } + // if stopPropagation exists run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + // otherwise set the cancelBubble property of the original event to true (IE) + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = jQuery.event.special[ fix ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var target = this, + related = event.relatedTarget, + handleObj = event.handleObj, + selector = handleObj.selector, + oldType, ret; + + // For a real mouseover/out, always call the handler; for + // mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || handleObj.origType === event.type || (related !== target && !jQuery.contains( target, related )) ) { + oldType = event.type; + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = oldType; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !form._submit_attached ) { + jQuery.event.add( form, "submit._submit", function( event ) { + // Form was submitted, bubble the event up the tree + if ( this.parentNode ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + }); + form._submit_attached = true; + } + }); + // return undefined since we don't need an event listener + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed ) { + this._just_changed = false; + jQuery.event.simulate( "change", this, event, true ); + } + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + elem._change_attached = true; + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on.call( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + var handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( var type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + live: function( types, data, fn ) { + jQuery( this.context ).on( types, this.selector, data, fn ); + return this; + }, + die: function( types, fn ) { + jQuery( this.context ).off( types, this.selector || "**", fn ); + return this; + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + if ( this[0] ) { + return jQuery.event.trigger( type, data, this[0], true ); + } + }, + + toggle: function( fn ) { + // Save reference to arguments for access in closure + var args = arguments, + guid = fn.guid || jQuery.guid++, + i = 0, + toggler = function( event ) { + // Figure out which function to execute + var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i; + jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 ); + + // Make sure that clicks stop + event.preventDefault(); + + // and execute the function + return args[ lastToggle ].apply( this, arguments ) || false; + }; + + // link all the functions, so any of them can unbind this click handler + toggler.guid = guid; + while ( i < args.length ) { + args[ i++ ].guid = guid; + } + + return this.click( toggler ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + } +}); + +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + if ( fn == null ) { + fn = data; + data = null; + } + + return arguments.length > 0 ? + this.bind( name, data, fn ) : + this.trigger( name ); + }; + + if ( jQuery.attrFn ) { + jQuery.attrFn[ name ] = true; + } + + if ( rkeyEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks; + } + + if ( rmouseEvent.test( name ) ) { + jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks; + } +}); + + + +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){ + +var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, + expando = "sizcache" + (Math.random() + '').replace('.', ''), + done = 0, + toString = Object.prototype.toString, + hasDuplicate = false, + baseHasDuplicate = true, + rBackslash = /\\/g, + rReturn = /\r\n/g, + rNonWord = /\W/; + +// Here we check if the JavaScript engine is using some sort of +// optimization where it does not always call our comparision +// function. If that is the case, discard the hasDuplicate value. +// Thus far that includes Google Chrome. +[0, 0].sort(function() { + baseHasDuplicate = false; + return 0; +}); + +var Sizzle = function( selector, context, results, seed ) { + results = results || []; + context = context || document; + + var origContext = context; + + if ( context.nodeType !== 1 && context.nodeType !== 9 ) { + return []; + } + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + var m, set, checkSet, extra, ret, cur, pop, i, + prune = true, + contextXML = Sizzle.isXML( context ), + parts = [], + soFar = selector; + + // Reset the position of the chunker regexp (start from head) + do { + chunker.exec( "" ); + m = chunker.exec( soFar ); + + if ( m ) { + soFar = m[3]; + + parts.push( m[1] ); + + if ( m[2] ) { + extra = m[3]; + break; + } + } + } while ( m ); + + if ( parts.length > 1 && origPOS.exec( selector ) ) { + + if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { + set = posProcess( parts[0] + parts[1], context, seed ); + + } else { + set = Expr.relative[ parts[0] ] ? + [ context ] : + Sizzle( parts.shift(), context ); + + while ( parts.length ) { + selector = parts.shift(); + + if ( Expr.relative[ selector ] ) { + selector += parts.shift(); + } + + set = posProcess( selector, set, seed ); + } + } + + } else { + // Take a shortcut and set the context if the root selector is an ID + // (but not if it'll be faster if the inner selector is an ID) + if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && + Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { + + ret = Sizzle.find( parts.shift(), context, contextXML ); + context = ret.expr ? + Sizzle.filter( ret.expr, ret.set )[0] : + ret.set[0]; + } + + if ( context ) { + ret = seed ? + { expr: parts.pop(), set: makeArray(seed) } : + Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); + + set = ret.expr ? + Sizzle.filter( ret.expr, ret.set ) : + ret.set; + + if ( parts.length > 0 ) { + checkSet = makeArray( set ); + + } else { + prune = false; + } + + while ( parts.length ) { + cur = parts.pop(); + pop = cur; + + if ( !Expr.relative[ cur ] ) { + cur = ""; + } else { + pop = parts.pop(); + } + + if ( pop == null ) { + pop = context; + } + + Expr.relative[ cur ]( checkSet, pop, contextXML ); + } + + } else { + checkSet = parts = []; + } + } + + if ( !checkSet ) { + checkSet = set; + } + + if ( !checkSet ) { + Sizzle.error( cur || selector ); + } + + if ( toString.call(checkSet) === "[object Array]" ) { + if ( !prune ) { + results.push.apply( results, checkSet ); + + } else if ( context && context.nodeType === 1 ) { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { + results.push( set[i] ); + } + } + + } else { + for ( i = 0; checkSet[i] != null; i++ ) { + if ( checkSet[i] && checkSet[i].nodeType === 1 ) { + results.push( set[i] ); + } + } + } + + } else { + makeArray( checkSet, results ); + } + + if ( extra ) { + Sizzle( extra, origContext, results, seed ); + Sizzle.uniqueSort( results ); + } + + return results; +}; + +Sizzle.uniqueSort = function( results ) { + if ( sortOrder ) { + hasDuplicate = baseHasDuplicate; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( var i = 1; i < results.length; i++ ) { + if ( results[i] === results[ i - 1 ] ) { + results.splice( i--, 1 ); + } + } + } + } + + return results; +}; + +Sizzle.matches = function( expr, set ) { + return Sizzle( expr, null, null, set ); +}; + +Sizzle.matchesSelector = function( node, expr ) { + return Sizzle( expr, null, null, [node] ).length > 0; +}; + +Sizzle.find = function( expr, context, isXML ) { + var set, i, len, match, type, left; + + if ( !expr ) { + return []; + } + + for ( i = 0, len = Expr.order.length; i < len; i++ ) { + type = Expr.order[i]; + + if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { + left = match[1]; + match.splice( 1, 1 ); + + if ( left.substr( left.length - 1 ) !== "\\" ) { + match[1] = (match[1] || "").replace( rBackslash, "" ); + set = Expr.find[ type ]( match, context, isXML ); + + if ( set != null ) { + expr = expr.replace( Expr.match[ type ], "" ); + break; + } + } + } + } + + if ( !set ) { + set = typeof context.getElementsByTagName !== "undefined" ? + context.getElementsByTagName( "*" ) : + []; + } + + return { set: set, expr: expr }; +}; + +Sizzle.filter = function( expr, set, inplace, not ) { + var match, anyFound, + type, found, item, filter, left, + i, pass, + old = expr, + result = [], + curLoop = set, + isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); + + while ( expr && set.length ) { + for ( type in Expr.filter ) { + if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { + filter = Expr.filter[ type ]; + left = match[1]; + + anyFound = false; + + match.splice(1,1); + + if ( left.substr( left.length - 1 ) === "\\" ) { + continue; + } + + if ( curLoop === result ) { + result = []; + } + + if ( Expr.preFilter[ type ] ) { + match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); + + if ( !match ) { + anyFound = found = true; + + } else if ( match === true ) { + continue; + } + } + + if ( match ) { + for ( i = 0; (item = curLoop[i]) != null; i++ ) { + if ( item ) { + found = filter( item, match, i, curLoop ); + pass = not ^ found; + + if ( inplace && found != null ) { + if ( pass ) { + anyFound = true; + + } else { + curLoop[i] = false; + } + + } else if ( pass ) { + result.push( item ); + anyFound = true; + } + } + } + } + + if ( found !== undefined ) { + if ( !inplace ) { + curLoop = result; + } + + expr = expr.replace( Expr.match[ type ], "" ); + + if ( !anyFound ) { + return []; + } + + break; + } + } + } + + // Improper expression + if ( expr === old ) { + if ( anyFound == null ) { + Sizzle.error( expr ); + + } else { + break; + } + } + + old = expr; + } + + return curLoop; +}; + +Sizzle.error = function( msg ) { + throw "Syntax error, unrecognized expression: " + msg; +}; + +/** + * Utility function for retreiving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +var getText = Sizzle.getText = function( elem ) { + var i, node, + nodeType = elem.nodeType, + ret = ""; + + if ( nodeType ) { + if ( nodeType === 1 ) { + // Use textContent || innerText for elements + if ( typeof elem.textContent === 'string' ) { + return elem.textContent; + } else if ( typeof elem.innerText === 'string' ) { + // Replace IE's carriage returns + return elem.innerText.replace( rReturn, '' ); + } else { + // Traverse it's children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + } else { + + // If no nodeType, this is expected to be an array + for ( i = 0; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + if ( node.nodeType !== 8 ) { + ret += getText( node ); + } + } + } + return ret; +}; + +var Expr = Sizzle.selectors = { + order: [ "ID", "NAME", "TAG" ], + + match: { + ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, + NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, + ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, + TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, + CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, + POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, + PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ + }, + + leftMatch: {}, + + attrMap: { + "class": "className", + "for": "htmlFor" + }, + + attrHandle: { + href: function( elem ) { + return elem.getAttribute( "href" ); + }, + type: function( elem ) { + return elem.getAttribute( "type" ); + } + }, + + relative: { + "+": function(checkSet, part){ + var isPartStr = typeof part === "string", + isTag = isPartStr && !rNonWord.test( part ), + isPartStrNotTag = isPartStr && !isTag; + + if ( isTag ) { + part = part.toLowerCase(); + } + + for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { + if ( (elem = checkSet[i]) ) { + while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} + + checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? + elem || false : + elem === part; + } + } + + if ( isPartStrNotTag ) { + Sizzle.filter( part, checkSet, true ); + } + }, + + ">": function( checkSet, part ) { + var elem, + isPartStr = typeof part === "string", + i = 0, + l = checkSet.length; + + if ( isPartStr && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + var parent = elem.parentNode; + checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; + } + } + + } else { + for ( ; i < l; i++ ) { + elem = checkSet[i]; + + if ( elem ) { + checkSet[i] = isPartStr ? + elem.parentNode : + elem.parentNode === part; + } + } + + if ( isPartStr ) { + Sizzle.filter( part, checkSet, true ); + } + } + }, + + "": function(checkSet, part, isXML){ + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); + }, + + "~": function( checkSet, part, isXML ) { + var nodeCheck, + doneName = done++, + checkFn = dirCheck; + + if ( typeof part === "string" && !rNonWord.test( part ) ) { + part = part.toLowerCase(); + nodeCheck = part; + checkFn = dirNodeCheck; + } + + checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); + } + }, + + find: { + ID: function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }, + + NAME: function( match, context ) { + if ( typeof context.getElementsByName !== "undefined" ) { + var ret = [], + results = context.getElementsByName( match[1] ); + + for ( var i = 0, l = results.length; i < l; i++ ) { + if ( results[i].getAttribute("name") === match[1] ) { + ret.push( results[i] ); + } + } + + return ret.length === 0 ? null : ret; + } + }, + + TAG: function( match, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( match[1] ); + } + } + }, + preFilter: { + CLASS: function( match, curLoop, inplace, result, not, isXML ) { + match = " " + match[1].replace( rBackslash, "" ) + " "; + + if ( isXML ) { + return match; + } + + for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { + if ( elem ) { + if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { + if ( !inplace ) { + result.push( elem ); + } + + } else if ( inplace ) { + curLoop[i] = false; + } + } + } + + return false; + }, + + ID: function( match ) { + return match[1].replace( rBackslash, "" ); + }, + + TAG: function( match, curLoop ) { + return match[1].replace( rBackslash, "" ).toLowerCase(); + }, + + CHILD: function( match ) { + if ( match[1] === "nth" ) { + if ( !match[2] ) { + Sizzle.error( match[0] ); + } + + match[2] = match[2].replace(/^\+|\s*/g, ''); + + // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' + var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( + match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || + !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); + + // calculate the numbers (first)n+(last) including if they are negative + match[2] = (test[1] + (test[2] || 1)) - 0; + match[3] = test[3] - 0; + } + else if ( match[2] ) { + Sizzle.error( match[0] ); + } + + // TODO: Move to normal caching system + match[0] = done++; + + return match; + }, + + ATTR: function( match, curLoop, inplace, result, not, isXML ) { + var name = match[1] = match[1].replace( rBackslash, "" ); + + if ( !isXML && Expr.attrMap[name] ) { + match[1] = Expr.attrMap[name]; + } + + // Handle if an un-quoted value was used + match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); + + if ( match[2] === "~=" ) { + match[4] = " " + match[4] + " "; + } + + return match; + }, + + PSEUDO: function( match, curLoop, inplace, result, not ) { + if ( match[1] === "not" ) { + // If we're dealing with a complex expression, or a simple one + if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { + match[3] = Sizzle(match[3], null, null, curLoop); + + } else { + var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); + + if ( !inplace ) { + result.push.apply( result, ret ); + } + + return false; + } + + } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { + return true; + } + + return match; + }, + + POS: function( match ) { + match.unshift( true ); + + return match; + } + }, + + filters: { + enabled: function( elem ) { + return elem.disabled === false && elem.type !== "hidden"; + }, + + disabled: function( elem ) { + return elem.disabled === true; + }, + + checked: function( elem ) { + return elem.checked === true; + }, + + selected: function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + parent: function( elem ) { + return !!elem.firstChild; + }, + + empty: function( elem ) { + return !elem.firstChild; + }, + + has: function( elem, i, match ) { + return !!Sizzle( match[3], elem ).length; + }, + + header: function( elem ) { + return (/h\d/i).test( elem.nodeName ); + }, + + text: function( elem ) { + var attr = elem.getAttribute( "type" ), type = elem.type; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); + }, + + radio: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; + }, + + checkbox: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; + }, + + file: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; + }, + + password: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; + }, + + submit: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "submit" === elem.type; + }, + + image: function( elem ) { + return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; + }, + + reset: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && "reset" === elem.type; + }, + + button: function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && "button" === elem.type || name === "button"; + }, + + input: function( elem ) { + return (/input|select|textarea|button/i).test( elem.nodeName ); + }, + + focus: function( elem ) { + return elem === elem.ownerDocument.activeElement; + } + }, + setFilters: { + first: function( elem, i ) { + return i === 0; + }, + + last: function( elem, i, match, array ) { + return i === array.length - 1; + }, + + even: function( elem, i ) { + return i % 2 === 0; + }, + + odd: function( elem, i ) { + return i % 2 === 1; + }, + + lt: function( elem, i, match ) { + return i < match[3] - 0; + }, + + gt: function( elem, i, match ) { + return i > match[3] - 0; + }, + + nth: function( elem, i, match ) { + return match[3] - 0 === i; + }, + + eq: function( elem, i, match ) { + return match[3] - 0 === i; + } + }, + filter: { + PSEUDO: function( elem, match, i, array ) { + var name = match[1], + filter = Expr.filters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + + } else if ( name === "contains" ) { + return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0; + + } else if ( name === "not" ) { + var not = match[3]; + + for ( var j = 0, l = not.length; j < l; j++ ) { + if ( not[j] === elem ) { + return false; + } + } + + return true; + + } else { + Sizzle.error( name ); + } + }, + + CHILD: function( elem, match ) { + var first, last, + doneName, parent, cache, + count, diff, + type = match[1], + node = elem; + + switch ( type ) { + case "only": + case "first": + while ( (node = node.previousSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + if ( type === "first" ) { + return true; + } + + node = elem; + + case "last": + while ( (node = node.nextSibling) ) { + if ( node.nodeType === 1 ) { + return false; + } + } + + return true; + + case "nth": + first = match[2]; + last = match[3]; + + if ( first === 1 && last === 0 ) { + return true; + } + + doneName = match[0]; + parent = elem.parentNode; + + if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) { + count = 0; + + for ( node = parent.firstChild; node; node = node.nextSibling ) { + if ( node.nodeType === 1 ) { + node.nodeIndex = ++count; + } + } + + parent[ expando ] = doneName; + } + + diff = elem.nodeIndex - last; + + if ( first === 0 ) { + return diff === 0; + + } else { + return ( diff % first === 0 && diff / first >= 0 ); + } + } + }, + + ID: function( elem, match ) { + return elem.nodeType === 1 && elem.getAttribute("id") === match; + }, + + TAG: function( elem, match ) { + return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match; + }, + + CLASS: function( elem, match ) { + return (" " + (elem.className || elem.getAttribute("class")) + " ") + .indexOf( match ) > -1; + }, + + ATTR: function( elem, match ) { + var name = match[1], + result = Sizzle.attr ? + Sizzle.attr( elem, name ) : + Expr.attrHandle[ name ] ? + Expr.attrHandle[ name ]( elem ) : + elem[ name ] != null ? + elem[ name ] : + elem.getAttribute( name ), + value = result + "", + type = match[2], + check = match[4]; + + return result == null ? + type === "!=" : + !type && Sizzle.attr ? + result != null : + type === "=" ? + value === check : + type === "*=" ? + value.indexOf(check) >= 0 : + type === "~=" ? + (" " + value + " ").indexOf(check) >= 0 : + !check ? + value && result !== false : + type === "!=" ? + value !== check : + type === "^=" ? + value.indexOf(check) === 0 : + type === "$=" ? + value.substr(value.length - check.length) === check : + type === "|=" ? + value === check || value.substr(0, check.length + 1) === check + "-" : + false; + }, + + POS: function( elem, match, i, array ) { + var name = match[2], + filter = Expr.setFilters[ name ]; + + if ( filter ) { + return filter( elem, i, match, array ); + } + } + } +}; + +var origPOS = Expr.match.POS, + fescape = function(all, num){ + return "\\" + (num - 0 + 1); + }; + +for ( var type in Expr.match ) { + Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); + Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); +} + +var makeArray = function( array, results ) { + array = Array.prototype.slice.call( array, 0 ); + + if ( results ) { + results.push.apply( results, array ); + return results; + } + + return array; +}; + +// Perform a simple check to determine if the browser is capable of +// converting a NodeList to an array using builtin methods. +// Also verifies that the returned array holds DOM nodes +// (which is not the case in the Blackberry browser) +try { + Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; + +// Provide a fallback method if it does not work +} catch( e ) { + makeArray = function( array, results ) { + var i = 0, + ret = results || []; + + if ( toString.call(array) === "[object Array]" ) { + Array.prototype.push.apply( ret, array ); + + } else { + if ( typeof array.length === "number" ) { + for ( var l = array.length; i < l; i++ ) { + ret.push( array[i] ); + } + + } else { + for ( ; array[i]; i++ ) { + ret.push( array[i] ); + } + } + } + + return ret; + }; +} + +var sortOrder, siblingCheck; + +if ( document.documentElement.compareDocumentPosition ) { + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { + return a.compareDocumentPosition ? -1 : 1; + } + + return a.compareDocumentPosition(b) & 4 ? -1 : 1; + }; + +} else { + sortOrder = function( a, b ) { + // The nodes are identical, we can exit early + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Fallback to using sourceIndex (in IE) if it's available on both nodes + } else if ( a.sourceIndex && b.sourceIndex ) { + return a.sourceIndex - b.sourceIndex; + } + + var al, bl, + ap = [], + bp = [], + aup = a.parentNode, + bup = b.parentNode, + cur = aup; + + // If the nodes are siblings (or identical) we can do a quick check + if ( aup === bup ) { + return siblingCheck( a, b ); + + // If no parents were found then the nodes are disconnected + } else if ( !aup ) { + return -1; + + } else if ( !bup ) { + return 1; + } + + // Otherwise they're somewhere else in the tree so we need + // to build up a full list of the parentNodes for comparison + while ( cur ) { + ap.unshift( cur ); + cur = cur.parentNode; + } + + cur = bup; + + while ( cur ) { + bp.unshift( cur ); + cur = cur.parentNode; + } + + al = ap.length; + bl = bp.length; + + // Start walking down the tree looking for a discrepancy + for ( var i = 0; i < al && i < bl; i++ ) { + if ( ap[i] !== bp[i] ) { + return siblingCheck( ap[i], bp[i] ); + } + } + + // We ended someplace up the tree so do a sibling check + return i === al ? + siblingCheck( a, bp[i], -1 ) : + siblingCheck( ap[i], b, 1 ); + }; + + siblingCheck = function( a, b, ret ) { + if ( a === b ) { + return ret; + } + + var cur = a.nextSibling; + + while ( cur ) { + if ( cur === b ) { + return -1; + } + + cur = cur.nextSibling; + } + + return 1; + }; +} + +// Check to see if the browser returns elements by name when +// querying by getElementById (and provide a workaround) +(function(){ + // We're going to inject a fake input element with a specified name + var form = document.createElement("div"), + id = "script" + (new Date()).getTime(), + root = document.documentElement; + + form.innerHTML = ""; + + // Inject it into the root element, check its status, and remove it quickly + root.insertBefore( form, root.firstChild ); + + // The workaround has to do additional checks after a getElementById + // Which slows things down for other browsers (hence the branching) + if ( document.getElementById( id ) ) { + Expr.find.ID = function( match, context, isXML ) { + if ( typeof context.getElementById !== "undefined" && !isXML ) { + var m = context.getElementById(match[1]); + + return m ? + m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? + [m] : + undefined : + []; + } + }; + + Expr.filter.ID = function( elem, match ) { + var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); + + return elem.nodeType === 1 && node && node.nodeValue === match; + }; + } + + root.removeChild( form ); + + // release memory in IE + root = form = null; +})(); + +(function(){ + // Check to see if the browser returns only elements + // when doing getElementsByTagName("*") + + // Create a fake element + var div = document.createElement("div"); + div.appendChild( document.createComment("") ); + + // Make sure no comments are found + if ( div.getElementsByTagName("*").length > 0 ) { + Expr.find.TAG = function( match, context ) { + var results = context.getElementsByTagName( match[1] ); + + // Filter out possible comments + if ( match[1] === "*" ) { + var tmp = []; + + for ( var i = 0; results[i]; i++ ) { + if ( results[i].nodeType === 1 ) { + tmp.push( results[i] ); + } + } + + results = tmp; + } + + return results; + }; + } + + // Check to see if an attribute returns normalized href attributes + div.innerHTML = ""; + + if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && + div.firstChild.getAttribute("href") !== "#" ) { + + Expr.attrHandle.href = function( elem ) { + return elem.getAttribute( "href", 2 ); + }; + } + + // release memory in IE + div = null; +})(); + +if ( document.querySelectorAll ) { + (function(){ + var oldSizzle = Sizzle, + div = document.createElement("div"), + id = "__sizzle__"; + + div.innerHTML = "

"; + + // Safari can't handle uppercase or unicode characters when + // in quirks mode. + if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { + return; + } + + Sizzle = function( query, context, extra, seed ) { + context = context || document; + + // Only use querySelectorAll on non-XML documents + // (ID selectors don't work in non-HTML documents) + if ( !seed && !Sizzle.isXML(context) ) { + // See if we find a selector to speed up + var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); + + if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { + // Speed-up: Sizzle("TAG") + if ( match[1] ) { + return makeArray( context.getElementsByTagName( query ), extra ); + + // Speed-up: Sizzle(".CLASS") + } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { + return makeArray( context.getElementsByClassName( match[2] ), extra ); + } + } + + if ( context.nodeType === 9 ) { + // Speed-up: Sizzle("body") + // The body element only exists once, optimize finding it + if ( query === "body" && context.body ) { + return makeArray( [ context.body ], extra ); + + // Speed-up: Sizzle("#ID") + } else if ( match && match[3] ) { + var elem = context.getElementById( match[3] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id === match[3] ) { + return makeArray( [ elem ], extra ); + } + + } else { + return makeArray( [], extra ); + } + } + + try { + return makeArray( context.querySelectorAll(query), extra ); + } catch(qsaError) {} + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + var oldContext = context, + old = context.getAttribute( "id" ), + nid = old || id, + hasParent = context.parentNode, + relativeHierarchySelector = /^\s*[+~]/.test( query ); + + if ( !old ) { + context.setAttribute( "id", nid ); + } else { + nid = nid.replace( /'/g, "\\$&" ); + } + if ( relativeHierarchySelector && hasParent ) { + context = context.parentNode; + } + + try { + if ( !relativeHierarchySelector || hasParent ) { + return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); + } + + } catch(pseudoError) { + } finally { + if ( !old ) { + oldContext.removeAttribute( "id" ); + } + } + } + } + + return oldSizzle(query, context, extra, seed); + }; + + for ( var prop in oldSizzle ) { + Sizzle[ prop ] = oldSizzle[ prop ]; + } + + // release memory in IE + div = null; + })(); +} + +(function(){ + var html = document.documentElement, + matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; + + if ( matches ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9 fails this) + var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), + pseudoWorks = false; + + try { + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( document.documentElement, "[test!='']:sizzle" ); + + } catch( pseudoError ) { + pseudoWorks = true; + } + + Sizzle.matchesSelector = function( node, expr ) { + // Make sure that attribute selectors are quoted + expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); + + if ( !Sizzle.isXML( node ) ) { + try { + if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { + var ret = matches.call( node, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || !disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9, so check for that + node.document && node.document.nodeType !== 11 ) { + return ret; + } + } + } catch(e) {} + } + + return Sizzle(expr, null, null, [node]).length > 0; + }; + } +})(); + +(function(){ + var div = document.createElement("div"); + + div.innerHTML = "
"; + + // Opera can't find a second classname (in 9.6) + // Also, make sure that getElementsByClassName actually exists + if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { + return; + } + + // Safari caches class attributes, doesn't catch changes (in 3.2) + div.lastChild.className = "e"; + + if ( div.getElementsByClassName("e").length === 1 ) { + return; + } + + Expr.order.splice(1, 0, "CLASS"); + Expr.find.CLASS = function( match, context, isXML ) { + if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { + return context.getElementsByClassName(match[1]); + } + }; + + // release memory in IE + div = null; +})(); + +function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 && !isXML ){ + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( elem.nodeName.toLowerCase() === cur ) { + match = elem; + break; + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { + for ( var i = 0, l = checkSet.length; i < l; i++ ) { + var elem = checkSet[i]; + + if ( elem ) { + var match = false; + + elem = elem[dir]; + + while ( elem ) { + if ( elem[ expando ] === doneName ) { + match = checkSet[elem.sizset]; + break; + } + + if ( elem.nodeType === 1 ) { + if ( !isXML ) { + elem[ expando ] = doneName; + elem.sizset = i; + } + + if ( typeof cur !== "string" ) { + if ( elem === cur ) { + match = true; + break; + } + + } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { + match = elem; + break; + } + } + + elem = elem[dir]; + } + + checkSet[i] = match; + } + } +} + +if ( document.documentElement.contains ) { + Sizzle.contains = function( a, b ) { + return a !== b && (a.contains ? a.contains(b) : true); + }; + +} else if ( document.documentElement.compareDocumentPosition ) { + Sizzle.contains = function( a, b ) { + return !!(a.compareDocumentPosition(b) & 16); + }; + +} else { + Sizzle.contains = function() { + return false; + }; +} + +Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; + + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +var posProcess = function( selector, context, seed ) { + var match, + tmpSet = [], + later = "", + root = context.nodeType ? [context] : context; + + // Position selectors must be done after the filter + // And so must :not(positional) so we move all PSEUDOs to the end + while ( (match = Expr.match.PSEUDO.exec( selector )) ) { + later += match[0]; + selector = selector.replace( Expr.match.PSEUDO, "" ); + } + + selector = Expr.relative[selector] ? selector + "*" : selector; + + for ( var i = 0, l = root.length; i < l; i++ ) { + Sizzle( selector, root[i], tmpSet, seed ); + } + + return Sizzle.filter( later, tmpSet ); +}; + +// EXPOSE +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +Sizzle.selectors.attrMap = {}; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.filters; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})(); + + +var runtil = /Until$/, + rparentsprev = /^(?:parents|prevUntil|prevAll)/, + // Note: This RegExp should be improved, or likely pulled from Sizzle + rmultiselector = /,/, + isSimple = /^.[^:#\[\.,]*$/, + slice = Array.prototype.slice, + POS = jQuery.expr.match.POS, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var self = this, + i, l; + + if ( typeof selector !== "string" ) { + return jQuery( selector ).filter(function() { + for ( i = 0, l = self.length; i < l; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }); + } + + var ret = this.pushStack( "", "find", selector ), + length, n, r; + + for ( i = 0, l = this.length; i < l; i++ ) { + length = ret.length; + jQuery.find( selector, this[i], ret ); + + if ( i > 0 ) { + // Make sure that the results are unique + for ( n = length; n < ret.length; n++ ) { + for ( r = 0; r < length; r++ ) { + if ( ret[r] === ret[n] ) { + ret.splice(n--, 1); + break; + } + } + } + } + } + + return ret; + }, + + has: function( target ) { + var targets = jQuery( target ); + return this.filter(function() { + for ( var i = 0, l = targets.length; i < l; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false), "not", selector); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true), "filter", selector ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + POS.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var ret = [], i, l, cur = this[0]; + + // Array (deprecated as of jQuery 1.7) + if ( jQuery.isArray( selectors ) ) { + var level = 1; + + while ( cur && cur.ownerDocument && cur !== context ) { + for ( i = 0; i < selectors.length; i++ ) { + + if ( jQuery( cur ).is( selectors[ i ] ) ) { + ret.push({ selector: selectors[ i ], elem: cur, level: level }); + } + } + + cur = cur.parentNode; + level++; + } + + return ret; + } + + // String + var pos = POS.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( i = 0, l = this.length; i < l; i++ ) { + cur = this[i]; + + while ( cur ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + + } else { + cur = cur.parentNode; + if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { + break; + } + } + } + } + + ret = ret.length > 1 ? jQuery.unique( ret ) : ret; + + return this.pushStack( ret, "closest", selectors ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? + all : + jQuery.unique( all ) ); + }, + + andSelf: function() { + return this.add( this.prevObject ); + } +}); + +// A painfully simple check to see if an element is disconnected +// from a document (should be improved, where feasible). +function isDisconnected( node ) { + return !node || !node.parentNode || node.parentNode.nodeType === 11; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return jQuery.nth( elem, 2, "nextSibling" ); + }, + prev: function( elem ) { + return jQuery.nth( elem, 2, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( elem.parentNode.firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.makeArray( elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ), + // The variable 'args' was introduced in + // https://github.com/jquery/jquery/commit/52a0238 + // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. + // http://code.google.com/p/v8/issues/detail?id=1050 + args = slice.call(arguments); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret, name, args.join(",") ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + nth: function( cur, result, dir, elem ) { + result = result || 1; + var num = 0; + + for ( ; cur; cur = cur[dir] ) { + if ( cur.nodeType === 1 && ++num === result ) { + break; + } + } + + return cur; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem, i ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem, i ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} + + + + +function createSafeFragment( document ) { + var list = nodeNames.split( " " ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr article aside audio canvas datalist details figcaption figure footer " + + "header hgroup mark meter nav output progress section summary time video", + rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, + rtagName = /<([\w:]+)/, + rtbody = /", "" ], + legend: [ 1, "
", "
" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + col: [ 2, "", "
" ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }, + safeFragment = createSafeFragment( document ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// IE can't serialize and + + + + + + + + + \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/tests/units/base.js b/js/pickadate.js-3.5.3/tests/units/base.js new file mode 100644 index 0000000..0cc1221 --- /dev/null +++ b/js/pickadate.js-3.5.3/tests/units/base.js @@ -0,0 +1,502 @@ + +/*jshint + debug: true, + devel: true, + browser: true, + asi: true, + unused: true, + eqnull: true, + eqeqeq: true + */ + + +var $DOM = $( '#qunit-fixture' ), + $INPUT = $( '' ), + isInteger = function( value ) { + return {}.toString.call( value ).indexOf( 'Number' ) > -1 && value % 1 === 0 + } + + + +/* ========================================================================== + Base picker tests + ========================================================================== */ + + +module( 'Base setup', { + setup: function() { + $DOM.append( $INPUT.clone() ) + this.$input = $DOM.find( 'input' ).pickadate() + this.picker = this.$input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Input stage and attributes', function() { + + var input = this.picker.$node[ 0 ] + + ok( input.type === 'text', 'Type updated' ) + ok( input.readOnly === true, 'Readonly set' ) + ok( input.value === '', 'No value' ) + ok( this.picker.$root.length, 'Root holder exists' ) + ok( !this.picker._hidden, 'Hidden input doesn’t exist' ) +}) + +test( 'Picker states', function() { + + var picker = this.picker + + ok( picker.get( 'start' ) === true, 'Started' ) + ok( picker.get( 'open' ) === false, 'Closed to start with' ) + + picker.open() + ok( picker.get( 'open' ) === true, 'Opened with trigger' ) + + picker.$root.find( 'button' )[0].focus() + ok( picker.get( 'open' ) === true, 'Remains open with focus within' ) + + picker.$root.click() + ok( picker.get( 'open' ) === true, 'Remains open with click within' ) + + picker.close() + ok( picker.get( 'open' ) === false, 'Closed with trigger' ) + + picker.stop() + ok( picker.get( 'start' ) === false, 'Stopped with trigger' ) + + picker.start() + ok( picker.get( 'start' ) === true, 'Started with trigger' ) +}) + +test( 'Picker properties', function() { + + var picker = this.picker + + strictEqual( picker.get( 'type' ), 'password', 'Original type is saved' ) + notStrictEqual( picker.get( 'min' ).pick, null, 'Has “min”' ) + notStrictEqual( picker.get( 'max' ).pick, null, 'Has “max”' ) + strictEqual( picker.get( 'select' ), null, 'Has no “select”' ) + ok( isInteger( picker.get( 'highlight' ).pick ), 'Has “highlight”' ) + ok( isInteger( picker.get( 'view' ).pick ), 'Has “view”' ) + ok( isInteger( picker.get( 'now' ).pick ), 'Has “now”' ) + deepEqual( picker.get( 'disable' ), [], 'Default “disable” collection is empty' ) +}) + +test( 'Picker alternate API', function() { + + var $input = this.$input + var picker = this.picker + + strictEqual( $input.pickadate( 'get', 'start' ), picker.get( 'start' ), 'Methods are passed forward' ) + strictEqual( $input.pickadate( 'component' ), picker.component, 'Objects are passed forward' ) +}) + + + + + +module( 'Formatting setup', { + setup: function() { + $DOM.append( $INPUT.clone().attr( 'name', 'picker' ) ) + var $input = $DOM.find( 'input' ).pickadate({ + formatSubmit: 'yyyy/mm/dd' + }) + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Default hidden prefix & suffix', function() { + var picker = this.picker + strictEqual( picker.$node[0].name + '_submit', picker._hidden.name, 'Correct hidden element `name`' ) +}) + +module( 'Formatting setup', { + setup: function() { + $DOM.append( $INPUT.clone().attr( 'name', 'picker' ) ) + var $input = $DOM.find( 'input' ).pickadate({ + formatSubmit: 'yyyy/mm/dd', + hiddenPrefix: 'prefixed__', + hiddenSuffix: '__suffixed' + }) + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Custom hidden prefix & suffix', function() { + var picker = this.picker + strictEqual( 'prefixed__' + picker.$node[0].name + '__suffixed', picker._hidden.name, 'Correct hidden element `name`' ) +}) + +module( 'Formatting setup', { + setup: function() { + $DOM.append( $INPUT.clone().attr( 'name', 'picker' ) ) + var $input = $DOM.find( 'input' ).pickadate({ + formatSubmit: 'yyyy/mm/dd', + hiddenPrefix: '', + hiddenSuffix: '' + }) + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'No hidden prefix & suffix', function() { + var picker = this.picker + strictEqual( picker.$node[0].name, picker._hidden.name, 'Correct hidden element `name`' ) +}) + +module( 'Formatting setup', { + setup: function() { + $DOM.append( $INPUT.clone().attr( 'name', 'picker' ) ) + var $input = $DOM.find( 'input' ).pickadate({ + formatSubmit: 'yyyy/mm/dd', + hiddenName: true + }) + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Hidden name replaces visible name', function() { + var picker = this.picker + strictEqual( picker.$node[0].name, '', 'Visible element has no `name`') + strictEqual(picker._hidden.name, 'picker', 'Correct hidden element `name`' ) +}) + + + + + +module( 'Container setup', { + setup: function() { + $DOM.append( $INPUT.clone().attr( 'name', 'picker' ), $( '
' ) ) + var $input = $DOM.find( 'input' ).pickadate({ + formatSubmit: 'yyyy/mm/dd', + container: '#outlet' + }) + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Picker root outlet', function() { + var picker = this.picker + strictEqual( picker.$root[0].parentNode.id, 'outlet', 'Correct root outlet' ) +}) + + + + + + +module( 'Base events', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var thisModule = this, + $input = $DOM.find( 'input' ).pickadate({ + onStart: function() { + thisModule.started = true + thisModule.restarted = true + thisModule.inputType = this.$node[ 0 ].type + }, + onRender: function() { + thisModule.rendered = true + }, + onOpen: function() { + thisModule.opened = true + }, + onClose: function() { + thisModule.closed = true + }, + onStop: function() { + thisModule.stopped = true + thisModule.inputType = this.$node[ 0 ].type + }, + onSet: function( thing ) { + thisModule.selected = thing + } + }) + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'As options', function() { + + var thisModule = this, + picker = thisModule.picker + + strictEqual( thisModule.started, picker.get( 'start' ) === true, 'Fired: `onStart`' ) + strictEqual( thisModule.inputType, 'text', 'Updated input type' ) + strictEqual( thisModule.rendered, picker.get( 'start' ) === true, 'Fired: `onRender`' ) + + picker.open() + strictEqual( thisModule.opened, picker.get( 'open' ) === true, 'Fired: `onOpen`' ) + + picker.close() + strictEqual( thisModule.closed, picker.get( 'open' ) === false, 'Fired: `onClose`' ) + + picker.stop() + strictEqual( thisModule.stopped, picker.get( 'start' ) === false, 'Fired: `onStop`' ) + strictEqual( thisModule.inputType, $INPUT[ 0 ].type, 'Restored input type' ) + + picker.start() + strictEqual( thisModule.restarted, picker.get( 'start' ) === true, 'Restarted: `onStart`' ) + + picker.set() + deepEqual( thisModule.selected, {}, 'Fired: `onSet`' ) +}) + +test( 'As individual methods', 6, function() { + + var picker = this.picker + + // Register the events + picker. + on( 'open', function() { + ok( true, 'Opened' ) + }). + on( 'close', function() { + ok( true, 'Closed' ) + }). + on( 'render', function() { + ok( true, 'Rendered' ) + }). + on( 'set', function() { + ok( true, 'Set' ) + }). + on( 'stop', function() { + ok( true, 'Stopped' ) + }). + on( 'start', function() { + ok( true, 'Started' ) + }) + + picker. + trigger( 'start' ). + trigger( 'open' ). + trigger( 'render' ). + trigger( 'set' ). + trigger( 'close' ) +}) + +test( 'As multiple methods', 6, function() { + + var picker = this.picker + + // Register the events + picker.on({ + open: function() { + ok( true, 'Opened' ) + }, + close: function() { + ok( true, 'Closed' ) + }, + render: function() { + ok( true, 'Rendered' ) + }, + set: function() { + ok( true, 'Set' ) + }, + stop: function() { + ok( true, 'Stopped' ) + }, + start: function() { + ok( true, 'Started' ) + } + }) + + picker. + trigger( 'start' ). + trigger( 'open' ). + trigger( 'render' ). + trigger( 'set' ). + trigger( 'close' ) +}) + +test( 'As muted methods', 1, function() { + + var picker = this.picker + + // Bind the callback. + picker.on('set', function() { + ok( true, 'An outspoken method' ) + }) + + // Do the selections. + picker.set('select', new Date()) + picker.set('select', new Date(), { muted: true }) + picker.set({ select: new Date() }, { muted: true }) +}) + +test( 'Clear as muted', function() { + + var picker = this.picker + var called = false + + // Bind the callback. + picker.on('set', function() { + called = true + }) + + picker.clear({ muted: true }) + + ok( !called, 'Callback not called' ) +}) + +test( 'Open with alternate focus', function() { + + var picker = this.picker, + klasses = Picker.klasses() + + stop() + picker.open( false ) + setTimeout( function() { + ok( !picker.get( 'open' ) && picker.$node[0].className === klasses.input + ' ' + klasses.active && picker.$root[0].className === klasses.picker + ' ' + klasses.opened && document.activeElement !== picker.$node[0], 'Opened without focus' ) + start() + }, 0 ) +}) + +test( 'Close with alternate focus', function() { + + var picker = this.picker, + klasses = Picker.klasses() + + stop() + picker.close( true ) + setTimeout( function() { + ok( !picker.get( 'open' ) && picker.$node[0].className === klasses.input && picker.$root[0].className === klasses.picker && document.activeElement === picker.$node[0], 'Closed with focus' ) + start() + }, 0 ) +}) + +test( 'Switch off', function() { + + var truthy = true, + picker = this.picker + + picker.on('open', function() { + truthy = false + }) + picker.off('open') + + strictEqual( truthy, true, 'Method turned off' ) +}) + + + + + + +module( 'Base mouse events', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickadate() + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Open and close', function() { + + var picker = this.picker + + picker.$node.click() + ok( picker.get( 'open' ) === true, 'Opened with click in' ) + + $( 'body' ).click() + ok( picker.get( 'open' ) === false, 'Closed with click out' ) +}) + + + + + + +module( 'Base keyboard events', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickadate() + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Open and close', function() { + + var picker = this.picker + + picker.$node.focus() + ok( picker.get( 'open' ) === true, 'Opened with key in' ) + + picker.$node.blur() + $DOM.focusin() + ok( picker.get( 'open' ) === false, 'Closed with key out' ) + + picker.$node.trigger({ type: 'keydown', keyCode: 40 }) + ok( picker.get( 'open' ) === true, 'Opened after arrow “down”' ) + + picker.$node.trigger({ type: 'keydown', keyCode: 27 }) + ok( picker.get( 'open' ) === false, 'Closed after “escape”' ) + + picker.$node.trigger({ type: 'keydown', keyCode: 38 }) + ok( picker.get( 'open' ) === true, 'Opened after arrow “up”' ) + + picker.$node.trigger({ type: 'keydown', keyCode: 8 }) + ok( picker.get( 'open' ) === false, 'Closed after “backspace”' ) + + picker.$node.trigger({ type: 'keydown', keyCode: 37 }) + ok( picker.get( 'open' ) === true, 'Opened after arrow “left”' ) + + picker.$node.trigger({ type: 'keydown', keyCode: 46 }) + ok( picker.get( 'open' ) === false, 'Closed after “alt. backspace”' ) + + picker.$node.trigger({ type: 'keydown', keyCode: 39 }) + ok( picker.get( 'open' ) === true, 'Opened after arrow “right”' ) +}) + +test( 'Set and clear', function() { + + var picker = this.picker + + picker.open() + picker.$node.trigger({ type: 'keydown', keyCode: 13 }) + strictEqual( picker.get( 'value' ), picker.get( 'select', $.fn.pickadate.defaults.format ), 'Set value as default selection after “enter”' ) + + picker.$node.trigger({ type: 'keydown', keyCode: 8 }) + strictEqual( picker.get( 'value' ), '', 'Clear input value after “backspace”' ) +}) + + + + diff --git a/js/pickadate.js-3.5.3/tests/units/date.js b/js/pickadate.js-3.5.3/tests/units/date.js new file mode 100644 index 0000000..a7e9b5c --- /dev/null +++ b/js/pickadate.js-3.5.3/tests/units/date.js @@ -0,0 +1,1405 @@ + +/*jshint + debug: true, + devel: true, + browser: true, + asi: true, + unused: true, + eqnull: true, + eqeqeq: true + */ + + +var $DOM = $( '#qunit-fixture' ), + $INPUT = $( '' ) + + + +/* ========================================================================== + Date picker tests + ========================================================================== */ + + +module( 'Date picker setup', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickadate() + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Calendar stage', function() { + strictEqual( this.picker.$root.find( '.' + $.fn.pickadate.defaults.klass.table + ' [data-pick]' ).length, 42, '42 selectables dates' ) +}) + +test( 'Properties', function() { + + var picker = this.picker, + today = new Date() + + today.setHours( 0, 0, 0, 0 ) + + strictEqual( picker.get( 'min' ).pick, -Infinity, 'Default “min” is -Infinity' ) + strictEqual( picker.get( 'max' ).pick, Infinity, 'Default “max’ is +Infinity' ) + strictEqual( picker.get( 'now' ).pick, today.getTime(), 'Default “now” is ' + picker.get( 'now', 'yyyy/mm/dd' ) ) + deepEqual( picker.get( 'select' ), null, 'Default “select” is `null`' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), 'Default “highlight” is “now”' ) + strictEqual( picker.get( 'view' ).pick, today.setDate( 1 ), 'Default “view” is ' + picker.get( 'view', 'yyyy/mm/dd' ) ) +}) + +test( 'First weekday', function() { + + var picker = this.picker, + $input = picker.$node + + strictEqual( picker.$root.find( '.' + $.fn.pickadate.defaults.klass.weekdays ).first().text(), $.fn.pickadate.defaults.weekdaysShort[0], 'Sunday is first day' ) + + picker.stop().$node.pickadate({ firstDay: 1 }) + strictEqual( $input.pickadate( 'picker' ).$root.find( '.' + $.fn.pickadate.defaults.klass.weekdays ).first().text(), $.fn.pickadate.defaults.weekdaysShort[1], 'Monday is first day' ) + + picker.set( 'select', [ 2013, 8, 14 ] ) + strictEqual( picker.$root.find( 'td' ).first().text(), '1', 'Months starting on Sunday shift back a week' ) +}) + +test( 'Formats', function() { + + var picker = this.picker, + today = new Date(), + leadZero = function( number ) { + return ( number < 10 ? '0' : '' ) + number + }, + formats = { + d: function() { + return '' + today.getDate() + }, + dd: function() { + return leadZero( today.getDate() ) + }, + ddd: function() { + return $.fn.pickadate.defaults.weekdaysShort[ today.getDay() ] + }, + dddd: function() { + return $.fn.pickadate.defaults.weekdaysFull[ today.getDay() ] + }, + m: function() { + return '' + ( today.getMonth() + 1 ) + }, + mm: function() { + return leadZero( ( today.getMonth() + 1 ) ) + }, + mmm: function() { + return $.fn.pickadate.defaults.monthsShort[ today.getMonth() ] + }, + mmmm: function() { + return $.fn.pickadate.defaults.monthsFull[ today.getMonth() ] + }, + yy: function() { + return ( '' + today.getFullYear() ).slice(2) + }, + yyyy: function() { + return '' + today.getFullYear() + } + } + + today.setHours(0,0,0,0) + + ;([ 'd', 'dd', 'ddd', 'dddd', 'm', 'mm', 'mmm', 'mmmm', 'yy', 'yyyy' ]).forEach( function( format ) { + var expect = formats[ format ]() + deepEqual( picker.get( 'now', format ), expect, '`' + format + '`: ' + expect ) + }) +}) + +module( 'Date picker setup', { + teardown: function() { + $DOM.empty() + } +}) + +test( 'Editable', function() { + + $DOM.append( $INPUT.clone() ).append( $INPUT.clone() ) + + var $input1 = $DOM.find( 'input' ).eq(0).pickadate() + var $input2 = $DOM.find( 'input' ).eq(1).pickadate({ + editable: true + }) + + strictEqual( $input1[0].readOnly, true, 'Editable: false' ) + strictEqual( $input2[0].readOnly, false, 'Editable: true' ) +}) + +test( 'Disable today with `min` as `true`', function() { + + $DOM.append( $INPUT.clone() ) + + var today = new Date() + var $input = $DOM.find( 'input' ).pickadate({ + min: true, + disable: [ today ] + }) + var picker = $input.pickadate('picker') + var highlighted = picker.get('highlight') + + deepEqual( + [today.getFullYear(), today.getMonth(), today.getDate() + 1], + [highlighted.year, highlighted.month, highlighted.date], + 'Able to disable today' + ) +}) + +test( 'Disable today with `max` as `true`', function() { + + $DOM.append( $INPUT.clone() ) + + var today = new Date() + var $input = $DOM.find( 'input' ).pickadate({ + max: true, + disable: [ today ] + }) + var picker = $input.pickadate('picker') + var highlighted = picker.get('highlight') + + deepEqual( + [today.getFullYear(), today.getMonth(), today.getDate() - 1], + [highlighted.year, highlighted.month, highlighted.date], + 'Able to disable today' + ) +}) + + + + +module( 'Date picker `set`', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickadate() + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( '`clear`', function() { + + var picker = this.picker + + strictEqual( picker.get('select'), null, 'Starts off without a selection' ) + + picker.set('select', new Date()) + notStrictEqual( picker.get('select'), null, 'A selection has been added' ) + + picker.clear() + strictEqual( picker.get('select'), null, 'Clears out selection' ) +}) + + +test( '`select`', function() { + + var picker = this.picker, + today = new Date(), + playdate = new Date( today.getFullYear(), today.getMonth(), today.getDate() + 40 ) + + today.setHours(0,0,0,0) + + // Using numbers + picker.set( 'select', playdate.getTime() ) + deepEqual( picker.get( 'select' ).obj, playdate, '`select` using a number: ' + playdate ) + strictEqual( picker.get( 'value' ), picker.get( 'select', $.fn.pickadate.defaults.format ), '`value` matches' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'select' ), '`highlight` updated' ) + strictEqual( picker.get( 'view', 'yyyy/mm/dd' ), picker.get( 'highlight', 'yyyy/mm/01' ), '`view` updated' ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) + + // Using arrays + playdate.setDate( playdate.getDate() + 40 ) + picker.set( 'select', [playdate.getFullYear(),playdate.getMonth(),playdate.getDate()] ) + deepEqual( picker.get( 'select' ).obj, playdate, '`select` using an array: ' + playdate ) + strictEqual( picker.get( 'value' ), picker.get( 'select', $.fn.pickadate.defaults.format ), '`value` matches' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'select' ), '`highlight` updated' ) + strictEqual( picker.get( 'view', 'yyyy/mm/dd' ), picker.get( 'highlight', 'yyyy/mm/01' ), '`view` updated' ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) + + // Using JavaScript date objects + playdate.setDate( playdate.getDate() + 40 ) + picker.set( 'select', playdate ) + deepEqual( picker.get( 'select' ).obj, playdate, '`select` using a JS date object: ' + playdate ) + strictEqual( picker.get( 'value' ), picker.get( 'select', $.fn.pickadate.defaults.format ), '`value` matches' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'select' ), '`highlight` updated' ) + strictEqual( picker.get( 'view', 'yyyy/mm/dd' ), picker.get( 'highlight', 'yyyy/mm/01' ), '`view` updated' ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) +}) + +test( '`highlight`', function() { + + var picker = this.picker, + today = new Date(), + playdate = new Date( today.getFullYear(), today.getMonth(), today.getDate() + 40 ) + + today.setHours(0,0,0,0) + + // Using numbers + picker.set( 'highlight', playdate.getTime() ) + deepEqual( picker.get( 'highlight' ).obj, playdate, '`highlight` using a number: ' + playdate ) + strictEqual( picker.get( 'view', 'yyyy/mm/dd' ), picker.get( 'highlight', 'yyyy/mm/01' ), '`view` updated: ' + picker.get( 'view', 'yyyy/mm/dd' ) ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) + + // Using arrays + playdate.setDate( playdate.getDate() + 40 ) + picker.set( 'highlight', [playdate.getFullYear(),playdate.getMonth(),playdate.getDate()] ) + deepEqual( picker.get( 'highlight' ).obj, playdate, '`highlight` using an array: ' + playdate ) + strictEqual( picker.get( 'view', 'yyyy/mm/dd' ), picker.get( 'highlight', 'yyyy/mm/01' ), '`view` updated: ' + picker.get( 'view', 'yyyy/mm/dd' ) ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) + + // Using JavaScript date objects + playdate.setDate( playdate.getDate() + 40 ) + picker.set( 'highlight', playdate ) + deepEqual( picker.get( 'highlight' ).obj, playdate, '`highlight` using a JS date object: ' + playdate ) + strictEqual( picker.get( 'view', 'yyyy/mm/dd' ), picker.get( 'highlight', 'yyyy/mm/01' ), '`view` updated: ' + picker.get( 'view', 'yyyy/mm/dd' ) ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) +}) + +test( '`view`', function() { + + var picker = this.picker, + today = new Date(), + playdate = new Date( today.getFullYear(), today.getMonth(), today.getDate() + 40 ) + + today.setHours(0,0,0,0) + + // Using numbers + picker.set( 'view', playdate.getTime() ) + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` using a number: ' + playdate ) + deepEqual( picker.get( 'highlight' ).obj, today, '`highlight` unaffected' ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) + + // Using arrays + playdate.setDate( playdate.getDate() + 40 ) + picker.set( 'view', [playdate.getFullYear(),playdate.getMonth(),playdate.getDate()] ) + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` using a number: ' + playdate ) + deepEqual( picker.get( 'highlight' ).obj, today, '`highlight` unaffected' ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) + + + // Using JavaScript date objects + playdate.setDate( playdate.getDate() + 40 ) + picker.set( 'view', playdate ) + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` using a JS date object: ' + playdate ) + deepEqual( picker.get( 'highlight' ).obj, today, '`highlight` unaffected' ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) +}) + +test( '`min`', function() { + + var picker = this.picker, + today = new Date(), + playdate = new Date( today.getFullYear(), today.getMonth(), today.getDate() - 40 ) + + today.setHours(0,0,0,0) + + // Using negative numbers + picker.set( 'min', -40 ) + deepEqual( picker.get( 'min' ).obj, playdate, '`min` using a negative number: ' + playdate ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + + playdate.setDate( 1 ) + playdate.setMonth( today.getMonth() ) + playdate.setFullYear( today.getFullYear() ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) + + // Using positive numbers + picker.set( 'min', 40 ) + playdate.setDate( today.getDate() + 40 ) + deepEqual( picker.get( 'min' ).obj, playdate, '`min` using a positive number: ' + playdate ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'min' ), '`highlight` updated' ) + + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` updated' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) + + // Using arrays + playdate.setDate( playdate.getDate() + 40 ) + picker.set( 'min', [playdate.getFullYear(),playdate.getMonth(),playdate.getDate()] ) + deepEqual( picker.get( 'min' ).obj, playdate, '`min` using an array: ' + playdate ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'min' ), '`highlight` updated' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` updated' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) + + // Using JavaScript date objects + playdate.setDate( playdate.getDate() + 40 ) + picker.set( 'min', playdate ) + deepEqual( picker.get( 'min' ).obj, playdate, '`min` using a JS date object: ' + playdate ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'min' ), '`highlight` updated' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` updated' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) +}) + +test( '`min` using booleans', function() { + + var picker = this.picker, + today = new Date(), + playdate = new Date( today.getFullYear(), today.getMonth(), 1 ) + + today.setHours(0,0,0,0) + + // Using `true` + picker.set( 'min', true ) + deepEqual( picker.get( 'min' ).obj, today, '`min` using `true`: ' + today ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) + + // Using `false` + picker.set( 'min', false ) + deepEqual( picker.get( 'min' ).obj, -Infinity, '`min` using `false`: ' + -Infinity ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'max' ).pick, Infinity, '`max` unaffected' ) +}) + +test( '`min` using strings', function() { + + var picker = this.picker + + var min = picker.get('min') + strictEqual( min.pick, -Infinity, 'No `min` date' ) + + picker.set( 'min', '8 January, 2013' ) + + min = picker.get('min') + deepEqual( [min.year, min.month, min.date], [2013, 0, 8], '`min` updated' ) +}) + +test( '`max`', function() { + + var picker = this.picker, + today = new Date(), + playdate = new Date( today.getFullYear(), today.getMonth(), today.getDate() + 40 ) + + today.setHours(0,0,0,0) + + // Using positive numbers + picker.set( 'max', 40 ) + deepEqual( picker.get( 'max' ).obj, playdate, '`max` using a positive number: ' + playdate ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + + playdate.setYear( today.getFullYear() ) + playdate.setMonth( today.getMonth() ) + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + + // Using negative numbers + picker.set( 'max', -40 ) + playdate.setDate( today.getDate() - 40 ) + deepEqual( picker.get( 'max' ).obj, playdate, '`max` using a negative number: ' + playdate ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'max' ), '`highlight` updated' ) + + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + + // Using arrays + playdate.setDate( playdate.getDate() - 40 ) + picker.set( 'max', [playdate.getFullYear(),playdate.getMonth(),playdate.getDate()] ) + deepEqual( picker.get( 'max' ).obj, playdate, '`max` using an array: ' + playdate ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'max' ), '`highlight` updated' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` updated' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + + // Using JavaScript date objects + playdate.setDate( playdate.getDate() - 40 ) + picker.set( 'max', playdate ) + deepEqual( picker.get( 'max' ).obj, playdate, '`max` using a JS date object: ' + playdate ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'max' ), '`highlight` updated' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` updated' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) +}) + +test( '`max` using booleans', function() { + + var picker = this.picker, + today = new Date(), + playdate = new Date( today.getFullYear(), today.getMonth(), 1 ) + + today.setHours(0,0,0,0) + + // Using `true` + picker.set( 'max', true ) + deepEqual( picker.get( 'max' ).obj, today, '`max` using `true`: ' + today ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) + + // Using `false` + picker.set( 'max', false ) + deepEqual( picker.get( 'max' ).obj, Infinity, '`max` using `false`: ' + Infinity ) + deepEqual( picker.get( 'now' ).obj, today, '`now` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ).obj, playdate, '`view` unaffected' ) + strictEqual( picker.get( 'value' ), '', '`value` unaffected' ) + deepEqual( picker.get( 'min' ).pick, -Infinity, '`min` unaffected' ) +}) + +test( '`max` using strings', function() { + + var picker = this.picker + + var max = picker.get('max') + strictEqual( max.pick, Infinity, 'No `max` date' ) + + picker.set( 'max', '8 January, 2013' ) + + max = picker.get('max') + deepEqual( [max.year, max.month, max.date], [2013, 0, 8], '`max` updated' ) +}) + +test( '`disable` and `enable` using integers', function() { + + var today = new Date(), + disableCollection = [1,4,7], + picker = this.picker, + $root = picker.$root + + today.setHours(0,0,0,0) + + picker.set( 'disable', disableCollection ) + + if ( disableCollection.indexOf( today.getDay() + 1 ) > -1 ) { + notDeepEqual( picker.get( 'highlight' ), picker.get( 'now' ), 'Shifted disabled `highlight`: ' + picker.get( 'highlight' ).obj ) + } + + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled dates added to collection' ) + + $root.find( 'tr' ).each( function( indexRow, tableRow ) { + $( tableRow ).find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( disableCollection.indexOf( indexCell + 1 ) > -1 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Disabled as day of week: ' + ( indexCell + 1 ) + '. Date: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Enabled as day of week: ' + ( indexCell + 1 ) + '. Date: ' + tableCell.innerHTML ) + } + }) + }) + + picker.set( 'enable', [1] ) + deepEqual( picker.get( 'disable' ), [4,7], 'Disabled date removed from collection' ) + + $root.find( 'tr' ).each( function( indexRow, tableRow ) { + $( tableRow ).find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( [4,7].indexOf( indexCell + 1 ) > -1 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Disabled as day of week: ' + ( indexCell + 1 ) + '. Date: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Enabled as day of week: ' + ( indexCell + 1 ) + '. Date: ' + tableCell.innerHTML ) + } + }) + }) + + picker.set( 'enable', 'flip' ) + deepEqual( picker.get( 'disable' ), [4,7], 'Disabled collection `enable` flipped' ) + strictEqual( picker.get( 'enable' ), -1, 'Inverted `enable`') + + $root.find( 'tr' ).each( function( indexRow, tableRow ) { + $( tableRow ).find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( [4,7].indexOf( indexCell + 1 ) < 0 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Disabled as day of week: ' + ( indexCell + 1 ) + '. Date: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Enabled as day of week: ' + ( indexCell + 1 ) + '. Date: ' + tableCell.innerHTML ) + } + }) + }) + + picker.set( 'disable', 'flip' ) + deepEqual( picker.get( 'disable' ), [4,7], 'Disabled collection `disable` flipped' ) + strictEqual( picker.get( 'enable' ), 1, 'Inverted back `enable`') + + $root.find( 'tr' ).each( function( indexRow, tableRow ) { + $( tableRow ).find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( [4,7].indexOf( indexCell + 1 ) > -1 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Disabled as day of week: ' + ( indexCell + 1 ) + '. Date: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Enabled as day of week: ' + ( indexCell + 1 ) + '. Date: ' + tableCell.innerHTML ) + } + }) + }) +}) + +test( '`disable` and `enable` using arrays', function() { + + var today = new Date(), + nowYear = today.getFullYear(), + nowMonth = today.getMonth(), + disableCollection = [ [nowYear,nowMonth,1],[nowYear,nowMonth,25],[nowYear,nowMonth,17] ], + picker = this.picker, + viewday = picker.get( 'view' ).day, + $root = picker.$root + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled dates added to collection' ) + + $root.find( 'td [data-pick]' ).each( function( indexCell, tableCell ) { + var index = indexCell - viewday + 1 + if ( index === 1 || index === 17 || index === 25 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is enabled: ' + tableCell.innerHTML ) + } + }) + + picker.set( 'enable', [ [nowYear,nowMonth,17] ] ) + disableCollection = [ [nowYear,nowMonth,1],[nowYear,nowMonth,25] ] + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled date removed from collection' ) + + $root.find( 'td [data-pick]' ).each( function( indexCell, tableCell ) { + var index = indexCell - viewday + 1 + if ( index === 1 || index === 25 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is enabled: ' + tableCell.innerHTML ) + } + }) + + + picker.set( 'enable', 'flip' ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled collection `enable` flipped' ) + deepEqual( picker.get( 'enable' ), -1, 'Base state disabled' ) + + $root.find( 'td [data-pick]' ).each( function( indexCell, tableCell ) { + var index = indexCell - viewday + 1 + if ( index !== 1 && index !== 25 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is enabled: ' + tableCell.innerHTML ) + } + }) + + + picker.set( 'disable', 'flip' ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled collection `disable` flipped' ) + deepEqual( picker.get( 'enable' ), 1, 'Base state enabled' ) + + $root.find( 'td [data-pick]' ).each( function( indexCell, tableCell ) { + var index = indexCell - viewday + 1 + if ( index === 1 || index === 25 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is enabled: ' + tableCell.innerHTML ) + } + }) +}) + +test( '`disable` and `enable` using JS dates', function() { + + var now = new Date(), + nowYear = now.getFullYear(), + nowMonth = now.getMonth(), + disableCollection = [ new Date(nowYear,nowMonth,1), new Date(nowYear,nowMonth,17), new Date(nowYear,nowMonth,25) ], + picker = this.picker, + viewday = picker.get( 'view' ).day, + $root = picker.$root + + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled dates added to collection' ) + + $root.find( 'td [data-pick]' ).each( function( indexCell, tableCell ) { + var index = indexCell - viewday + 1 + if ( index === 1 || index === 17 || index === 25 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is enabled: ' + tableCell.innerHTML ) + } + }) + + + picker.set( 'enable', [ new Date(nowYear,nowMonth,17) ] ) + deepEqual( picker.get( 'disable' ), [ new Date(nowYear,nowMonth,1), new Date(nowYear,nowMonth,25) ], 'Disabled date removed from collection' ) + + $root.find( 'td [data-pick]' ).each( function( indexCell, tableCell ) { + var index = indexCell - viewday + 1 + if ( index === 1 || index === 25 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is enabled: ' + tableCell.innerHTML ) + } + }) + + + picker.set( 'enable', 'flip' ) + deepEqual( picker.get( 'disable' ), [ new Date(nowYear,nowMonth,1), new Date(nowYear,nowMonth,25) ], 'Disabled collection `enable` flipped' ) + + $root.find( 'td [data-pick]' ).each( function( indexCell, tableCell ) { + var index = indexCell - viewday + 1 + if ( index !== 1 && index !== 25 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is enabled: ' + tableCell.innerHTML ) + } + }) + + + picker.set( 'disable', 'flip' ) + deepEqual( picker.get( 'disable' ), [ new Date(nowYear,nowMonth,1), new Date(nowYear,nowMonth,25) ], 'Disabled collection `disable` flipped' ) + + $root.find( 'td [data-pick]' ).each( function( indexCell, tableCell ) { + var index = indexCell - viewday + 1 + if ( index === 1 || index === 25 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is enabled: ' + tableCell.innerHTML ) + } + }) +}) + +test( '`disable` and `enable` using booleans', function() { + + var now = new Date(), + nowYear = now.getFullYear(), + nowMonth = now.getMonth(), + disableCollection = [ [nowYear,nowMonth,1],[nowYear,nowMonth,17],[nowYear,nowMonth,25] ], + picker = this.picker, + $root = picker.$root + + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled dates added to collection' ) + + picker.set('disable', false) + deepEqual( picker.get('disable'), [], 'Disabled collection reset' ) + strictEqual( $root.find( '.' + $.fn.pickadate.defaults.klass.disabled ).length, 0, 'No dates disabled' ) + + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled dates added to collection' ) + + picker.set('disable', true) + deepEqual( picker.get('disable'), [], 'Disabled collection reset' ) + deepEqual( picker.get('enable'), -1, 'Disabled collection `enable` flipped' ) + strictEqual( $root.find( '.' + $.fn.pickadate.defaults.klass.disabled ).length, 42, 'All dates disabled' ) + + + picker.set( 'enable', 'flip' ) + deepEqual( picker.get('enable'), 1, 'Disabled collection `enable` flipped' ) + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get('disable'), disableCollection, 'Disabled dates added to collection' ) + + + picker.set('enable', true) + deepEqual( picker.get('disable'), [], 'Disabled collection reset' ) + strictEqual( $root.find( '.' + $.fn.pickadate.defaults.klass.disabled ).length, 0, 'No dates disabled' ) + + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get('disable'), disableCollection, 'Disabled dates added to collection' ) + + + picker.set('enable', false) + deepEqual( picker.get('disable'), [], 'Disabled collection reset' ) + deepEqual( picker.get('enable'), -1, 'Disabled collection `enable` flipped' ) + strictEqual( $root.find( '.' + $.fn.pickadate.defaults.klass.disabled ).length, 42, 'All dates disabled' ) +}) + +test( '`disable` and `enable` using ranges', function() { + + var picker = this.picker, + $root = picker.$root, + disableCollection, viewday + + picker.set( 'view', [2014,2,1] ) + viewday = picker.get( 'view' ).day + 1 + + disableCollection = [ { from: [2014,2,4], to: [2014,2,14] } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range' ) + + $root.find( 'td [data-pick]' ).each( function( indexCell, tableCell ) { + var index = indexCell - viewday + if ( index >= 2 && index <= 12 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is enabled: ' + tableCell.innerHTML ) + } + }) + + picker.set( 'enable', disableCollection ) + deepEqual( picker.get( 'disable' ), [], 'Cleared disabled range' ) + strictEqual( $root.find( '.' + $.fn.pickadate.defaults.klass.disabled ).length, 0, 'No dates disabled' ) + + + disableCollection = [ { from: new Date(2014,2,7), to: new Date(2014,2,17) } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range updated' ) + + $root.find( 'td [data-pick]' ).each( function( indexCell, tableCell ) { + var index = indexCell - viewday + if ( index >= 5 && index <= 15 ) { + ok( $( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickadate.defaults.klass.disabled ), 'Date is enabled: ' + tableCell.innerHTML ) + } + }) + + picker.set( 'enable', disableCollection ) + deepEqual( picker.get( 'disable' ), [], 'Cleared disabled range' ) + strictEqual( $root.find( '.' + $.fn.pickadate.defaults.klass.disabled ).length, 0, 'No dates disabled' ) +}) + +test( '`disable` and `enable` using relative ranges', function() { + + var picker = this.picker, + $root = picker.$root, + today = picker.get( 'now' ).obj, + yearToday = today.getFullYear(), + monthToday = today.getMonth(), + dateToday = today.getDate(), + backDay = [ yearToday, monthToday, dateToday - 10 ], + forwardDay = new Date( yearToday, monthToday, dateToday + 10 ), + disableCollection, index, $dates, disabledDate, previousMonth + + disableCollection = [ { from: true, to: forwardDay } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range relative to today with date object' ) + + $dates = $root.find('.' + $.fn.pickadate.defaults.klass.disabled) + for ( index = 0, datesCount = $dates.length; index < datesCount; index += 1 ) { + disabledDate = +$dates[index].innerHTML + disabledDate = new Date(yearToday, monthToday, disabledDate) + ok( disabledDate >= today && + disabledDate <= new Date(yearToday, monthToday, dateToday + 10), + 'Date is disabled: ' + disabledDate + ); + } + + picker.set( 'enable', disableCollection ) + deepEqual( picker.get( 'disable' ), [], 'Cleared disabled range' ) + ok( !$root.find( '.' + $.fn.pickadate.defaults.klass.disabled ).length, 'No dates disabled' ) + + disableCollection = [ { from: backDay, to: true } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range relative to today with array' ) + + $dates = $root.find('.' + $.fn.pickadate.defaults.klass.disabled) + for ( index = 0, datesCount = $dates.length; index < datesCount; index += 1 ) { + disabledDate = +$dates[index].innerHTML + previousMonth = disabledDate > dateToday ? 1 : 0 + disabledDate = new Date(yearToday, monthToday - previousMonth, disabledDate) + ok( disabledDate <= today && + disabledDate >= new Date(yearToday, monthToday, dateToday - 10), + 'Date is disabled: ' + disabledDate + ); + } + + picker.set( 'enable', disableCollection ) + deepEqual( picker.get( 'disable' ), [], 'Cleared disabled range' ) + ok( !$root.find( '.' + $.fn.pickadate.defaults.klass.disabled ).length, 'No dates disabled' ) + + disableCollection = [ { from: true, to: 10 } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range relative to today with positive integer' ) + + $dates = $root.find('.' + $.fn.pickadate.defaults.klass.disabled) + for ( index = 0, datesCount = $dates.length; index < datesCount; index += 1 ) { + disabledDate = +$dates[index].innerHTML + disabledDate = new Date(yearToday, monthToday, disabledDate) + ok( disabledDate >= today && + disabledDate <= new Date(yearToday, monthToday, dateToday + 10), + 'Date is disabled: ' + disabledDate + ); + } + + picker.set( 'enable', disableCollection ) + deepEqual( picker.get( 'disable' ), [], 'Cleared disabled range' ) + ok( !$root.find( '.' + $.fn.pickadate.defaults.klass.disabled ).length, 'No dates disabled' ) + + disableCollection = [ { from: -10, to: true } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range relative to today with negative integer' ) + + $dates = $root.find('.' + $.fn.pickadate.defaults.klass.disabled) + for ( index = 0, datesCount = $dates.length; index < datesCount; index += 1 ) { + disabledDate = +$dates[index].innerHTML + previousMonth = disabledDate > dateToday ? 1 : 0 + disabledDate = new Date(yearToday, monthToday - previousMonth, disabledDate) + ok( disabledDate <= today && + disabledDate >= new Date(yearToday, monthToday, dateToday - 10), + 'Date is disabled: ' + disabledDate + ); + } +}) + +test( '`disable` and `enable` using overlapping ranges', function() { + + var picker = this.picker, + $root = picker.$root, + disableCollection + + picker.set( 'view', [2014,2,1] ) + + picker.set( 'disable', [ + { from: [2014,2,4], to: [2014,2,28] } + ]) + picker.set( 'enable', [ + { from: [2014,2,14], to: [2014,2,18] } + ]) + + disableCollection = [ + { from: [2014,2,4], to: [2014,2,28] }, + { from: [2014,2,14], to: [2014,2,18], inverted: true } + ] + deepEqual( picker.get( 'disable' ), disableCollection, 'Inverted range within disabled range' ) + + $dates = $root.find('.' + $.fn.pickadate.defaults.klass.disabled) + for ( index = 0, datesCount = $dates.length; index < datesCount; index += 1 ) { + disabledDate = +$dates[index].innerHTML + ok( disabledDate >= 4 && disabledDate < 14 || + disabledDate > 18 && disabledDate <= 28, + 'Date is disabled: ' + disabledDate + ); + } + + picker.set( 'disable', false ) + picker.set( 'disable', [ + { from: [2014,2,4], to: [2014,2,28] } + ]) + picker.set( 'enable', [ + { from: [2014,2,1], to: [2014,2,14] } + ]) + + disableCollection = [ + { from: [2014,2,4], to: [2014,2,28] }, + { from: [2014,2,1], to: [2014,2,14], inverted: true } + ] + deepEqual( picker.get( 'disable' ), disableCollection, 'Inverted range before and within disabled range' ) + + $dates = $root.find('.' + $.fn.pickadate.defaults.klass.disabled) + for ( index = 0, datesCount = $dates.length; index < datesCount; index += 1 ) { + disabledDate = +$dates[index].innerHTML + ok( disabledDate >= 14 && disabledDate <= 28, + 'Date is disabled: ' + disabledDate + ); + } + + picker.set( 'disable', false ) + picker.set( 'disable', [ + { from: [2014,2,4], to: [2014,2,20] } + ]) + picker.set( 'enable', [ + { from: [2014,2,16], to: [2014,2,24] } + ]) + + disableCollection = [ + { from: [2014,2,4], to: [2014,2,20] }, + { from: [2014,2,16], to: [2014,2,24], inverted: true } + ] + deepEqual( picker.get( 'disable' ), disableCollection, 'Inverted range after and within disabled range' ) + + $dates = $root.find('.' + $.fn.pickadate.defaults.klass.disabled) + for ( index = 0, datesCount = $dates.length; index < datesCount; index += 1 ) { + disabledDate = +$dates[index].innerHTML + ok( disabledDate >= 4 && disabledDate < 16, + 'Date is disabled: ' + disabledDate + ); + } +}) + +test( '`disable` and `enable` repeatedly', function() { + + var now = new Date(2014,3,6), + nowYear = now.getFullYear(), + nowMonth = now.getMonth(), + nowDate = now.getDate(), + picker = this.picker, + disabledCollection = [ + [nowYear,nowMonth,1], + [nowYear,nowMonth,17], + new Date(nowYear,nowMonth,25), + 1, + { from: [nowYear,nowMonth,4], to: [nowYear,nowMonth,10] }, + { from: [nowYear,nowMonth,8], to: [nowYear,nowMonth,12] } + ], + collectionToEnable + + picker.set( 'disable', disabledCollection ) + picker.set( 'disable', disabledCollection ) + deepEqual( picker.get( 'disable' ), disabledCollection, 'Collection without duplicates' ) + + collectionToEnable = [ + [nowYear,nowMonth,17], + [nowYear,nowMonth,25], + now, + { from: [nowYear,nowMonth,8], to: [nowYear,nowMonth,12] } + ] + picker.set( 'enable', collectionToEnable ) + disabledCollection = [ + [nowYear,nowMonth,1], + 1, + { from: [nowYear,nowMonth,4], to: [nowYear,nowMonth,10] }, + [nowYear,nowMonth,nowDate,'inverted'], + { from: [nowYear,nowMonth,8], to: [nowYear,nowMonth,12], inverted: true } + ] + deepEqual( picker.get( 'disable' ), disabledCollection, 'Collection enabled various values' ) + + picker.set( 'enable', collectionToEnable ) + deepEqual( picker.get( 'disable' ), disabledCollection, 'Collection without duplicates' ) + + collectionToEnable = disabledCollection + picker.set( 'enable', collectionToEnable ) + deepEqual( picker.get( 'disable' ), [], 'Collection cleared - including inverted range overlaps' ) + + picker.set( 'enable', collectionToEnable ) + deepEqual( picker.get( 'disable' ), [], 'Collection kept clear' ) +}) + + + + +module( 'Date picker `set` beyond limits', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickadate({ + min: -40, + max: 40 + }) + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( '`select`', function() { + + var picker = this.picker, + today = new Date() + + today.setHours(0,0,0,0) + + picker.set( 'select', new Date( today.getFullYear(), today.getMonth(), today.getDate() - 60 ) ) + deepEqual( picker.get( 'select' ), picker.get( 'min' ), 'Able to not `select` beyond lower limit' ) + + picker.set( 'select', new Date( today.getFullYear(), today.getMonth(), today.getDate() + 60 ) ) + deepEqual( picker.get( 'select' ), picker.get( 'max' ), 'Able to not `select` beyond upper limit' ) +}) + +test( '`highlight`', function() { + + var picker = this.picker, + today = new Date() + + today.setHours(0,0,0,0) + + picker.set( 'highlight', new Date( today.getFullYear(), today.getMonth(), today.getDate() - 60 ) ) + deepEqual( picker.get( 'highlight' ), picker.get( 'min' ), 'Able to not `highlight` beyond lower limit' ) + + picker.set( 'highlight', new Date( today.getFullYear(), today.getMonth(), today.getDate() + 60 ) ) + deepEqual( picker.get( 'highlight' ), picker.get( 'max' ), 'Able to not `highlight` beyond upper limit' ) +}) + +test( '`view`', function() { + + var picker = this.picker, + today = new Date(), + viewset, + min = picker.get( 'min' ), + max = picker.get( 'max' ) + + today.setHours(0,0,0,0) + + picker.set( 'view', new Date( today.getFullYear(), today.getMonth(), today.getDate() - 60 ) ) + viewset = picker.get( 'view' ) + deepEqual( [viewset.year,viewset.month,viewset.date], [min.year,min.month,1], 'Able to not `view` beyond lower limit' ) + + picker.set( 'view', new Date( today.getFullYear(), today.getMonth(), today.getDate() + 60 ) ) + viewset = picker.get( 'view' ) + deepEqual( [viewset.year,viewset.month,viewset.date], [max.year,max.month,1], 'Able to not `view` beyond upper limit' ) +}) + + + + +module( 'Date picker mouse events', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickadate() + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Select', function() { + + var picker = this.picker, + $root = picker.$root, + viewsetObject = picker.get( 'view' ), + monthStartDay = viewsetObject.day, + monthEndDate = new Date( viewsetObject.year, viewsetObject.month + 1, 0 ).getDate() + + for ( var i = monthStartDay; i < monthStartDay + monthEndDate; i += 1 ) { + $root.find( '.' + $.fn.pickadate.defaults.klass.day ).eq( i ).click() + strictEqual( picker.get( 'select' ).pick, new Date( viewsetObject.year, viewsetObject.month, viewsetObject.date + i - monthStartDay ).getTime(), 'Selected ' + picker.get( 'select', 'yyyy/mm/dd' ) ) + strictEqual( picker.get( 'value' ), picker.get( 'select', $.fn.pickadate.defaults.format ), 'Input value updated to ' + picker.get( 'value' ) ) + } +}) + +test( 'Highlight', function() { + + var picker = this.picker, + $root = picker.$root, + today = new Date(), + playdate = new Date() + + today.setHours(0,0,0,0) + playdate.setHours(0,0,0,0) + + $root.find( '.' + $.fn.pickadate.defaults.klass.navPrev ).click() + playdate.setMonth( playdate.getMonth() - 1 ) + deepEqual( picker.get( 'highlight' ).obj, playdate, 'Previous month: ' + playdate ) + deepEqual( picker.get( 'select' ), null, 'Select unaffected' ) + + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, 'View updated' ) + + $root.find( '.' + $.fn.pickadate.defaults.klass.navNext ).click() + $root.find( '.' + $.fn.pickadate.defaults.klass.navNext ).click() + playdate.setMonth( today.getMonth() + 1 ) + + playdate = new Date(today.getFullYear(), today.getMonth() + 1, today.getDate()) + while ( playdate.getMonth() > today.getMonth() + 1 ) { + playdate = new Date(playdate.getFullYear(), playdate.getMonth(), playdate.getDate() - 1) + } + deepEqual( picker.get( 'highlight' ).obj, playdate, 'Next month: ' + playdate ) + deepEqual( picker.get( 'select' ), null, 'Select unaffected' ) + + playdate.setDate( 1 ) + deepEqual( picker.get( 'view' ).obj, playdate, 'View updated' ) +}) + +test( 'Today', function() { + + var picker = this.picker + + picker.open() + + picker.$root.find( '.' + $.fn.pickadate.defaults.klass.buttonToday ).click() + strictEqual( picker.get( 'value' ), picker.get( 'select', $.fn.pickadate.defaults.format ), 'Value set to today' ) +}) + +test( 'Clear', function() { + + var picker = this.picker + + picker.open() + + picker.set( 'select', new Date() ) + strictEqual( picker.get( 'value' ), picker.get( 'select', $.fn.pickadate.defaults.format ), 'Value updated' ) + + picker.$root.find( '.' + $.fn.pickadate.defaults.klass.buttonClear ).click() + strictEqual( picker.get( 'value' ), '', 'Value cleared' ) +}) + + + + +module( 'Date picker keyboard events', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickadate() + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Select', function() { + + var picker = this.picker, + $input = picker.$node, + playdate = new Date() + + playdate.setHours(0,0,0,0) + + for ( var i = 0; i < 10; i += 1 ) { + + // Open the picker. + picker.open() + + // Update the playdate. + playdate.setDate( playdate.getDate() + 10 ) + + // Set the highlight. + picker.set( 'highlight', playdate ) + + // Keydown to select the highlighted item. + $input.trigger({ type: 'keydown', keyCode: 13 }) + + // Check if the select is the same as the highlight. + deepEqual( picker.get( 'select' ), picker.get( 'highlight' ), 'Select updated to: ' + picker.get( 'select' ).obj ) + } +}) + +test( 'Highlight', function() { + + var picker = this.picker, + $input = picker.$node, + playdate = new Date() + + // Open the picker + picker.open() + + // Down + for ( var i = 0; i < 10; i += 1 ) { + + $input.trigger({ type: 'keydown', keyCode: 40 }) + playdate.setDate( playdate.getDate() + 7 ) + strictEqual( picker.get( 'highlight' ).date, playdate.getDate(), 'Keyed "down" to: ' + picker.get( 'highlight', 'yyyy/mm/dd' ) ) + strictEqual( picker.get( 'view' ).month, picker.get( 'highlight' ).month, 'Updated "view" to: ' + picker.get( 'view', 'yyyy/mm/dd' ) ) + } + + // Up + for ( var j = 0; j < 10; j += 1 ) { + + $input.trigger({ type: 'keydown', keyCode: 38 }) + playdate.setDate( playdate.getDate() - 7 ) + strictEqual( picker.get( 'highlight' ).date, playdate.getDate(), 'Keyed "up" to: ' + picker.get( 'highlight', 'yyyy/mm/dd' ) ) + strictEqual( picker.get( 'view' ).month, picker.get( 'highlight' ).month, 'Updated "view" to: ' + picker.get( 'view', 'yyyy/mm/dd' ) ) + } + + // Left + for ( var k = 0; k < 10; k += 1 ) { + + $input.trigger({ type: 'keydown', keyCode: 37 }) + playdate.setDate( playdate.getDate() - 1 ) + ok( picker.get( 'highlight' ).date === playdate.getDate() && picker.get( 'highlight' ).day === playdate.getDay(), 'Keyed "left" to: ' + picker.get( 'highlight', 'yyyy/mm/dd' ) ) + strictEqual( picker.get( 'view' ).month, picker.get( 'highlight' ).month, 'Updated "view" to: ' + picker.get( 'view', 'yyyy/mm/dd' ) ) + } + + // Right + for ( var l = 0; l < 10; l += 1 ) { + + $input.trigger({ type: 'keydown', keyCode: 39 }) + playdate.setDate( playdate.getDate() + 1 ) + ok( picker.get( 'highlight' ).date === playdate.getDate() && picker.get( 'highlight' ).day === playdate.getDay(), 'Keyed "right" to: ' + picker.get( 'highlight', 'yyyy/mm/dd' ) ) + strictEqual( picker.get( 'view' ).month, picker.get( 'highlight' ).month, 'Updated "view" to: ' + picker.get( 'view', 'yyyy/mm/dd' ) ) + } +}) + + + + +module( 'Date picker with a visible value', { + setup: function() { + $DOM.append( $INPUT.clone().val( '14 August, 1988' ) ) + var $input = $DOM.find( 'input' ).pickadate() + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( '`value` to select, highlight, and view', function() { + var picker = this.picker + ok( !picker._hidden, 'No hidden input' ) + deepEqual( picker.get( 'select' ).obj, new Date(1988,7,14), 'Selects date' ) + deepEqual( picker.get( 'highlight' ).obj, new Date(1988,7,14), 'Highlights date' ) + deepEqual( picker.get( 'view' ).obj, new Date(1988,7,1), 'Viewsets date' ) +}) + + +module( 'Date picker with a simple format', { + setup: function() { + $DOM.append( $INPUT.clone().val( '1988-08-14' ) ) + var $input = $DOM.find( 'input' ).pickadate({ + format: 'yyyy-mm-dd' + }) + this.picker = $input.pickadate( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( '`value` to select, highlight, and view', function() { + var picker = this.picker + ok( !picker._hidden, 'No hidden input' ) + deepEqual( picker.get( 'select' ).obj, new Date(1988,7,14), 'Selects date' ) + deepEqual( picker.get( 'highlight' ).obj, new Date(1988,7,14), 'Highlights date' ) + deepEqual( picker.get( 'view' ).obj, new Date(1988,7,1), 'Viewsets date' ) +}) + + + + +module( 'Date picker with a hidden value', { + teardown: function() { + $DOM.empty() + } +}) + +test( '`value` to select, highlight, and view', function() { + + $DOM.append( $INPUT.clone().val( '14 August, 1988' ) ) + var $input = $DOM.find( 'input' ).pickadate({ + formatSubmit: 'yyyy/mm/dd' + }) + var picker = $input.pickadate( 'picker' ) + + ok( picker._hidden, 'Has hidden input' ) + strictEqual( picker._hidden.value, '1988/08/14', 'Hidden input value' ) + deepEqual( picker.get( 'select' ).obj, new Date(1988,7,14), 'Selects date' ) + deepEqual( picker.get( 'highlight' ).obj, new Date(1988,7,14), 'Highlights date' ) + deepEqual( picker.get( 'view' ).obj, new Date(1988,7,1), 'Viewsets date' ) +}) + +test( '`data-value` to select, highlight, and view', function() { + + $DOM.append( $INPUT.clone().data( 'value', '1988/08/14' ) ) + var $input = $DOM.find( 'input' ).pickadate({ + formatSubmit: 'yyyy/mm/dd' + }) + var picker = $input.pickadate( 'picker' ) + + ok( picker._hidden, 'Has hidden input' ) + strictEqual( picker._hidden.value, '1988/08/14', 'Hidden input value' ) + deepEqual( picker.get( 'select' ).obj, new Date(1988,7,14), 'Selects date' ) + deepEqual( picker.get( 'highlight' ).obj, new Date(1988,7,14), 'Highlights date' ) + deepEqual( picker.get( 'view' ).obj, new Date(1988,7,1), 'Viewsets date' ) +}) + +module( 'Closing date picker with value already populated', { + setup: function() { + $DOM.append($INPUT.clone().val('14 August, 1988')); + var $input = $DOM.find('input').pickadate(); + this.picker = $input.pickadate('picker'); + }, + teardown: function() { + this.picker.stop(); + $DOM.empty(); + } +}); + +test('Close Button should keep the currently selected date', function() { + var picker = this.picker, + currentDate = new Date(); + + picker.open(); + picker.set('select', currentDate ); + picker.$root.find('.' + $.fn.pickadate.defaults.klass.buttonClose).click(); + + var actualDate = new Date(picker.get('value')).toLocaleDateString(); + strictEqual(actualDate, currentDate.toLocaleDateString(), 'Value should be still the current date'); +}); + +test('Close Button should close the modal', function() { + var picker = this.picker, + currentDate = new Date('08 May 2012'); + + picker.open(); + picker.set('select', currentDate); + picker.$root.find('.' + $.fn.pickadate.defaults.klass.buttonClose).click(); + + strictEqual(picker.get('open'), false, 'Picker should be closed'); +}); + diff --git a/js/pickadate.js-3.5.3/tests/units/time.js b/js/pickadate.js-3.5.3/tests/units/time.js new file mode 100644 index 0000000..9c96521 --- /dev/null +++ b/js/pickadate.js-3.5.3/tests/units/time.js @@ -0,0 +1,1238 @@ + +/*jshint + debug: true, + devel: true, + browser: true, + asi: true, + unused: true, + eqnull: true, + eqeqeq: true + */ + + +var $DOM = $( '#qunit-fixture' ), + $INPUT = $( '' ) + + + +/* ========================================================================== + Time picker tests + ========================================================================== */ + + +module( 'Time picker setup', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickatime() + this.picker = $input.pickatime( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Clock stage', function() { + strictEqual( this.picker.$root.find( '[data-pick]' ).length, 48, '48 selectable times' ) +}) + +test( 'Properties', function() { + + var picker = this.picker, + today = new Date(), + interval = picker.get( 'interval' ), + nowMinutes = today.getHours() * 60 + today.getMinutes() + + strictEqual( interval, 30, 'Default interval is 30' ) + + strictEqual( picker.get( 'min' ).pick, 0, 'Default “min” is midnight' ) + strictEqual( picker.get( 'max' ).pick, 1410, 'Default “max” is 23:30' ) + strictEqual( picker.get( 'now' ).pick, interval + nowMinutes - ( nowMinutes % interval ), 'Default “now” is: ' + picker.get( 'now', 'HH:i' ) ) + deepEqual( picker.get( 'select' ), null, 'Default “select” is `null`' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), 'Default “highlight” is “now”' ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), 'Default “view” is “highlight”' ) +}) + +test( 'Formats', function() { + + var minutesInDay = 24*60 + + var picker = this.picker, + interval = $.fn.pickatime.defaults.interval, + today = new Date(), + minutes = today.getHours() * 60 + today.getMinutes(), + leadZero = function( number ) { + return ( number < 10 ? '0' : '' ) + number + }, + toHours = function( mins ) { + var hours = ~~( mins/60 ) % 12 + return hours ? hours : 12 + }, + formats = { + h: function() { + return '' + toHours( minutes ) + }, + hh: function() { + return leadZero( toHours( minutes ) ) + }, + H: function() { + return '' + ( ~~( minutes/60 ) % 24 ) + }, + HH: function() { + return leadZero( ~~( minutes/60 ) % 24 ) + }, + i: function() { + return leadZero( minutes%60 ) + }, + a: function() { + return minutesInDay / 2 > minutes % minutesInDay ? 'a.m.' : 'p.m.' + }, + A: function() { + return minutesInDay / 2 > minutes % minutesInDay ? 'AM' : 'PM' + } + } + + minutes = interval + minutes - minutes % interval + + ;([ 'h', 'hh', 'H', 'HH', 'i', 'a', 'A' ]).forEach( function( format ) { + var expect = formats[ format ]() + deepEqual( picker.get( 'now', format ), expect, '`' + format + '`: ' + expect ) + }) + +}) + +module( 'Time picker setup', { + teardown: function() { + $DOM.empty() + } +}) + +test( 'Editable', function() { + + $DOM.append( $INPUT.clone()).append( $INPUT.clone() ) + + var $input1 = $DOM.find( 'input' ).eq(0).pickatime() + var $input2 = $DOM.find( 'input' ).eq(1).pickatime({ + editable: true + }) + + strictEqual( $input1[0].readOnly, true, 'Editable: false' ) + strictEqual( $input2[0].readOnly, false, 'Editable: true' ) +}) + + + + +module( 'Time picker `set`', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickatime() + this.picker = $input.pickatime( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( '`interval`', function() { + + var picker = this.picker, + $root = picker.$root + + picker.set( 'interval', 120 ) + strictEqual( picker.get( 'interval' ), 120, '`interval` updated' ) + strictEqual( picker.get( 'min' ).pick % 120, 0, '`min` updated' ) + strictEqual( picker.get( 'max' ).pick % 120, 0, '`max` updated' ) + strictEqual( $root.find( '.' + $.fn.pickatime.defaults.klass.listItem ).length, 12, '12 selectable times' ) + + picker.set( 'interval', 'lol' ) + strictEqual( picker.get( 'interval' ), 120, 'Interval unaffected by non-integer' ) +}) + +test( '`clear`', function() { + + var picker = this.picker + + strictEqual( picker.get('select'), null, 'Starts off without a selection' ) + + picker.set('select', new Date()) + notStrictEqual( picker.get('select'), null, 'A selection has been added' ) + + picker.clear() + strictEqual( picker.get('select'), null, 'Clears out selection' ) +}) + +test( '`select`', function() { + + var picker = this.picker + + // Using numbers + picker.set( 'select', 180 ) + strictEqual( picker.get( 'select' ).pick, 180, '`select` using a number: ' + picker.get( 'select', 'HH:i' ) ) + strictEqual( picker.get( 'highlight' ).pick, 180, '`highlight` updated' ) + strictEqual( picker.get( 'view' ).pick, 180, '`view` updated' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + strictEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) + + // Using JavaScript date objects + var dateObject = new Date() + dateObject.setHours(4,20) + picker.set( 'select', dateObject ) + strictEqual( picker.get('select').pick, 270, '`select` using a JS date object: ' + picker.get( 'select', 'HH:i' ) ) + strictEqual( picker.get( 'highlight' ).pick, 270, '`highlight` updated' ) + strictEqual( picker.get( 'view' ).pick, 270, '`view` updated' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + strictEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) + + // Using arrays + picker.set( 'select', [9,0] ) + strictEqual( picker.get( 'select' ).pick, 540, '`select` using an array: ' + picker.get( 'select', 'HH:i' ) ) + strictEqual( picker.get( 'highlight' ).pick, 540, '`highlight` updated' ) + strictEqual( picker.get( 'view' ).pick, 540, '`view` updated' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + strictEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) +}) + +test( '`highlight`', function() { + + var picker = this.picker + + // Using numbers + picker.set( 'highlight', 180 ) + strictEqual( picker.get( 'highlight' ).pick, 180, '`highlight` using a number: ' + picker.get( 'highlight', 'HH:i' ) ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` updated' ) + strictEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + strictEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) + + // Using JavaScript date objects + var dateObject = new Date() + dateObject.setHours(4,20) + picker.set( 'highlight', dateObject ) + strictEqual( picker.get('highlight').pick, 270, '`highlight` using a JS date object: ' + picker.get( 'highlight', 'HH:i' ) ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` updated' ) + strictEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + strictEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) + + // Using arrays + picker.set( 'highlight', [9,0] ) + strictEqual( picker.get( 'highlight' ).pick, 540, '`highlight` using an array: ' + picker.get( 'highlight', 'HH:i' ) ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` updated' ) + strictEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + strictEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) +}) + +test( '`view`', function() { + + var picker = this.picker + + // Using numbers + picker.set( 'view', 180 ) + strictEqual( picker.get( 'view' ).pick, 180, '`view` using a number: ' + picker.get( 'view', 'HH:i' ) ) + strictEqual( picker.get( 'highlight' ).pick, picker.get( 'now' ).pick, '`highlight` unaffected' ) + strictEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + strictEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) + + // Using JavaScript date objects + var dateObject = new Date() + dateObject.setHours(4,20) + picker.set( 'view', dateObject ) + strictEqual( picker.get('view').pick, 270, '`view` using a JS date object: ' + picker.get( 'view', 'HH:i' ) ) + strictEqual( picker.get( 'highlight' ).pick, picker.get( 'now' ).pick, '`highlight` unaffected' ) + strictEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + strictEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) + + // Using arrays + picker.set( 'view', [9,0] ) + strictEqual( picker.get( 'view' ).pick, 540, '`view` using an array: ' + picker.get( 'view', 'HH:i' ) ) + strictEqual( picker.get( 'highlight' ).pick, picker.get( 'now' ).pick, '`highlight` unaffected' ) + strictEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + strictEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) +}) + +test( '`min` using integers', function() { + + var picker = this.picker, + interval = 30 + + // Using negative numbers + picker.set( 'min', -3 ) + strictEqual( picker.get( 'min' ).pick, picker.get( 'now' ).pick + ( interval * -3 ), '`min` using a negative number: ' + picker.get( 'min', 'HH:i' ) ) + + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + if ( picker.get( 'min' ).pick > picker.get( 'now' ).pick ) { + deepEqual( picker.get( 'highlight' ), picker.get( 'min' ), '`highlight` updated' ) + deepEqual( picker.get( 'view' ), picker.get( 'min' ), '`view` updated' ) + } + else { + strictEqual( picker.get( 'highlight' ).pick, picker.get( 'now' ).pick, '`highlight` unaffected' ) + strictEqual( picker.get( 'view' ).pick, picker.get( 'now' ).pick, '`view` unaffected' ) + } + strictEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) + + + // Using positive numbers + picker.set( 'min', 3 ) + strictEqual( picker.get( 'min' ).pick, picker.get( 'now' ).pick + ( interval * 3 ), '`min` using a positive number: ' + picker.get( 'min', 'HH:i' ) ) + + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'min' ), '`highlight` updated' ) + deepEqual( picker.get( 'view' ), picker.get( 'min' ), '`view` updated' ) + + if ( picker.get( 'min' ).pick > 1410 ) { + strictEqual( picker.get( 'max' ).pick, 1410 + 1440, '`max` updated' ) + } + else { + strictEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) + } +}) + +test( '`min` using booleans', function() { + + var picker = this.picker + + // Boolean true + picker.set( 'min', true ) + deepEqual( picker.get( 'min' ), picker.get( 'now' ), '`min` using `true`: ' + picker.get( 'min', 'HH:i' ) ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'min' ), '`highlight` updated' ) + deepEqual( picker.get( 'view' ), picker.get( 'min' ), '`view` updated' ) + deepEqual( picker.get( 'max' ).time, 1410, '`max` unaffected' ) + + // Boolean false + picker.set( 'min', false ) + strictEqual( picker.get( 'min' ).time, 0, '`min` using `false`: ' + picker.get( 'min', 'HH:i' ) ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ), picker.get( 'now' ), '`view` unaffected' ) + deepEqual( picker.get( 'max' ).time, 1410, '`max` unaffected' ) +}) + +test( '`min` using arrays', function() { + + var picker = this.picker + + // Using arrays + picker.set( 'min', [2,0] ) + strictEqual( picker.get( 'min' ).pick, 120, '`min` using an array: ' + picker.get( 'min', 'HH:i' ) ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + if ( picker.get( 'min' ).pick > picker.get( 'now' ).pick ) { + deepEqual( picker.get( 'highlight' ), picker.get( 'min' ), '`highlight` updated' ) + deepEqual( picker.get( 'view' ), picker.get( 'min' ), '`view` updated' ) + } + else { + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` updated' ) + } + deepEqual( picker.get( 'max' ).pick, 1410, '`max` unaffected' ) +}) + +test( '`min` using JS dates', function() { + + var picker = this.picker + + // Using JavaScript date objects + var dateObject = new Date() + dateObject.setHours(4,30) + picker.set( 'min', dateObject ) + strictEqual( picker.get( 'min' ).pick, 270, '`min` using a JS date: ' + picker.get( 'min', 'HH:i' ) ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + if ( picker.get( 'min' ).pick > picker.get( 'now' ).pick ) { + deepEqual( picker.get( 'highlight' ), picker.get( 'min' ), '`highlight` updated' ) + deepEqual( picker.get( 'view' ), picker.get( 'min' ), '`view` updated' ) + } + else { + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` updated' ) + } + deepEqual( picker.get( 'max' ).pick, 1410, '`max` updated' ) +}) + +test( '`min` using strings', function() { + + var picker = this.picker + + var min = picker.get('min') + strictEqual( min.pick, 0, 'No `min` time' ) + + picker.set( 'min', '3:30 PM' ) + + min = picker.get('min') + deepEqual( [min.hour, min.mins], [15, 30], '`min` updated' ) +}) + +test( '`max` using integers', function() { + + var picker = this.picker, + interval = 30 + + // Using positive numbers + picker.set( 'max', 3 ) + strictEqual( picker.get( 'max' ).pick, picker.get( 'now' ).pick + ( interval * 3 ), '`max` using a positive number: ' + picker.get( 'max', 'HH:i' ) ) + + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` unaffected' ) + + + // Using negative numbers + picker.set( 'max', -3 ) + + var maxPickTime = picker.get( 'now' ).pick + ( interval * -3 ) + // If it's less than `min` time, add a day. + maxPickTime += maxPickTime < 0 ? 1440 : 0 + strictEqual( picker.get( 'max' ).pick, maxPickTime, '`max` using a negative number: ' + picker.get( 'max', 'HH:i' ) ) + + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + if ( picker.get( 'max' ).pick < picker.get( 'now' ).pick ) { + deepEqual( picker.get( 'highlight' ), picker.get( 'max' ), '`highlight` updated' ) + deepEqual( picker.get( 'view' ), picker.get( 'max' ), '`view` updated' ) + } + else { + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` unaffected' ) + } +}) + +test( '`max` using booleans', function() { + + var picker = this.picker + + // Boolean true + picker.set( 'max', true ) + deepEqual( picker.get( 'max' ), picker.get( 'now' ), '`max` using `true`: ' + picker.get( 'max', 'HH:i' ) ) + strictEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'highlight' ).pick, picker.get( 'now' ).pick, '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` unaffected' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) + + // Boolean false + picker.set( 'max', false ) + deepEqual( picker.get( 'max' ).pick, 1410, '`max` using `false`: ' + picker.get( 'max', 'HH:i' ) ) + strictEqual( picker.get( 'select' ), null, '`select` unaffected' ) + strictEqual( picker.get( 'highlight' ).pick, picker.get( 'now' ).pick, '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` unaffected' ) + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) +}) + +test( '`max` using arrays', function() { + + var picker = this.picker + + // Using arrays + picker.set( 'max', [14,30] ) + strictEqual( picker.get( 'max' ).pick, 870, '`max` using an array: ' + picker.get( 'max', 'HH:i' ) ) + strictEqual( picker.get( 'select' ), null, '`select` unaffected' ) + if ( picker.get( 'max' ).pick < picker.get( 'now' ).pick ) { + deepEqual( picker.get( 'highlight' ), picker.get( 'max' ), '`highlight` updated' ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` updated' ) + } + else { + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` unaffected' ) + } + strictEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) +}) + +test( '`max` using JS dates', function() { + + var picker = this.picker + + // Using JavaScript date objects + var dateObject = new Date() + dateObject.setHours(16,20) + picker.set( 'max', dateObject ) + strictEqual( picker.get( 'max' ).pick, 960, '`max` using a JS date: ' + picker.get( 'max', 'HH:i' ) ) + deepEqual( picker.get( 'select' ), null, '`select` unaffected' ) + if ( picker.get( 'max' ).pick < picker.get( 'now' ).pick ) { + deepEqual( picker.get( 'highlight' ), picker.get( 'max' ), '`highlight` updated' ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` updated' ) + } + else { + deepEqual( picker.get( 'highlight' ), picker.get( 'now' ), '`highlight` unaffected' ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), '`view` unaffected' ) + } + deepEqual( picker.get( 'min' ).pick, 0, '`min` unaffected' ) +}) + +test( '`max` using strings', function() { + + var picker = this.picker + + var max = picker.get('max') + strictEqual( max.pick, 1410, 'No `max` time' ) + + picker.set( 'max', '3:30 PM' ) + + max = picker.get('max') + deepEqual( [max.hour, max.mins], [15, 30], '`max` updated' ) +}) + +test( '`disable` and `enable` using integers', function() { + + var disableCollection = [1,4,7], + picker = this.picker, + $root = picker.$root + + picker.set( 'disable', disableCollection ) + + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled times added' ) + + $root.find( '[data-pick]' ).each( function() { + var $this = $( this ), + hour = ~~( $this.data('pick')/60 ) + if ( disableCollection.indexOf( hour ) > -1 ) { + ok( $this.hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Disabled time: ' + $this.html() ) + } + else { + ok( !$this.hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Enabled time: ' + $this.html() ) + } + }) + + picker.set( 'enable', [1] ) + deepEqual( picker.get( 'disable' ), [4,7], 'Disabled time removed' ) + + $root.find( '[data-pick]' ).each( function() { + var $this = $( this ), + hour = ~~( $this.data('pick')/60 ) + if ( [4,7].indexOf( hour ) > -1 ) { + ok( $this.hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Disabled time: ' + $this.html() ) + } + else { + ok( !$this.hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Enabled time: ' + $this.html() ) + } + }) + + picker.set( 'enable', 'flip' ) + deepEqual( picker.get( 'disable' ), [4,7], 'Disabled collection `enable` flipped' ) + + $root.find( '[data-pick]' ).each( function() { + var $this = $( this ), + hour = ~~( $this.data('pick')/60 ) + if ( [4,7].indexOf( hour ) < 0 ) { + ok( $this.hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Disabled time: ' + $this.html() ) + } + else { + ok( !$this.hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Enabled time: ' + $this.html() ) + } + }) + + picker.set( 'disable', 'flip' ) + deepEqual( picker.get( 'disable' ), [4,7], 'Disabled collection `disable` flipped' ) + + $root.find( '[data-pick]' ).each( function() { + var $this = $( this ), + hour = ~~( $this.data('pick')/60 ) + if ( [4,7].indexOf( hour ) > -1 ) { + ok( $this.hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Disabled time: ' + $this.html() ) + } + else { + ok( !$this.hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Enabled time: ' + $this.html() ) + } + }) +}) + +test( '`disable` and `enable` using arrays', function() { + + var picker = this.picker, + $root = picker.$root, + disableCollection = [ [1,0],[18,0],[23,30],[4,30] ] + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled times added' ) + + $root.find( '.' + $.fn.pickatime.defaults.klass.listItem ).each( function( index, item ) { + if ( index === 2 || index === 9 || index === 36 || index === 47 ) { + ok( $( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + item.innerHTML ) + } + else { + ok( !$( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + item.innerHTML ) + } + }) + + disableCollection.pop() + picker.set( 'enable', [ [4,30] ] ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled time removed' ) + + $root.find( '.' + $.fn.pickatime.defaults.klass.listItem ).each( function( index, item ) { + if ( index === 2 || index === 36 || index === 47 ) { + ok( $( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + item.innerHTML ) + } + else { + ok( !$( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + item.innerHTML ) + } + }) + + picker.set( 'enable', 'flip' ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled collection `enable` flipped' ) + deepEqual( picker.get( 'enable' ), -1, 'Base state disabled' ) + + $root.find( '[data-pick]' ).each( function( index, item ) { + if ( index !== 2 && index !== 36 && index !== 47 ) { + ok( $( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + item.innerHTML ) + } + else { + ok( !$( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + item.innerHTML ) + } + }) + + picker.set( 'disable', 'flip' ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled collection `disable` flipped' ) + deepEqual( picker.get( 'enable' ), 1, 'Base state enabled' ) + + $root.find( '[data-pick]' ).each( function( index, item ) { + if ( index === 2 || index === 36 || index === 47 ) { + ok( $( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + item.innerHTML ) + } + else { + ok( !$( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + item.innerHTML ) + } + }) + + + picker.set( 'disable', [1] ) + var disabledTimeArray = [ 1, 30 ] + picker.set( 'enable', [ disabledTimeArray ] ) + disabledTimeArray.push( 'inverted' ) + disableCollection = disableCollection.concat([ 1, disabledTimeArray ]) + deepEqual( picker.get('disable'), disableCollection, 'Disabled collection with specified time inverted' ) +}) + +test( '`disable` and `enable` using JS times', function() { + + var disableCollection = [ new Date(2014,2,2,1), new Date(2014,2,2,17,30), new Date(2014,2,2,3) ], + picker = this.picker, + $root = picker.$root + + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled times added' ) + + $root.find( '.' + $.fn.pickatime.defaults.klass.listItem ).each( function( index, item ) { + if ( index === 2 || index === 6 || index === 35 ) { + ok( $( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + item.innerHTML ) + } + else { + ok( !$( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + item.innerHTML ) + } + }) + + + picker.set( 'enable', [ new Date(2014,2,2,17,30) ] ) + deepEqual( picker.get( 'disable' ), [ new Date(2014,2,2,1), new Date(2014,2,2,3) ], 'Disabled time removed' ) + + $root.find( '.' + $.fn.pickatime.defaults.klass.listItem ).each( function( index, item ) { + if ( index === 2 || index === 6 ) { + ok( $( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + item.innerHTML ) + } + else { + ok( !$( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + item.innerHTML ) + } + }) + + + picker.set( 'enable', 'flip' ) + deepEqual( picker.get( 'disable' ), [ new Date(2014,2,2,1), new Date(2014,2,2,3) ], 'Disabled collection `enable` flipped' ) + + $root.find( '[data-pick]' ).each( function( index, item ) { + if ( index !== 2 && index !== 6 ) { + ok( $( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + item.innerHTML ) + } + else { + ok( !$( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + item.innerHTML ) + } + }) + + + picker.set( 'disable', 'flip' ) + deepEqual( picker.get( 'disable' ), [ new Date(2014,2,2,1), new Date(2014,2,2,3) ], 'Disabled collection `disable` flipped' ) + + $root.find( '[data-pick]' ).each( function( index, item ) { + if ( index === 2 || index === 6 ) { + ok( $( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + item.innerHTML ) + } + else { + ok( !$( item ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + item.innerHTML ) + } + }) +}) + +test( '`disable` and `enable` using booleans', function() { + + var picker = this.picker, + $root = picker.$root, + disableCollection = [ [1,0],[4,30],[18,0],[23,30] ] + + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled times added to collection' ) + + picker.set('disable', false) + deepEqual( picker.get('disable'), [], 'Disabled collection reset' ) + strictEqual( $root.find( '.' + $.fn.pickatime.defaults.klass.disabled ).length, 0, 'No times disabled' ) + + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled times added to collection' ) + + picker.set('disable', true) + deepEqual( picker.get('disable'), [], 'Disabled collection reset' ) + deepEqual( picker.get('enable'), -1, 'Disabled collection `enable` flipped' ) + strictEqual( $root.find( '.' + $.fn.pickatime.defaults.klass.disabled ).length, 48, 'All times disabled' ) + + + picker.set( 'enable', 'flip' ) + deepEqual( picker.get('enable'), 1, 'Disabled collection `enable` flipped' ) + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get('disable'), disableCollection, 'Disabled times added to collection' ) + + + picker.set('enable', true) + deepEqual( picker.get('disable'), [], 'Disabled collection reset' ) + strictEqual( $root.find( '.' + $.fn.pickatime.defaults.klass.disabled ).length, 0, 'No times disabled' ) + + + picker.set( 'disable', disableCollection ) + deepEqual( picker.get('disable'), disableCollection, 'Disabled times added to collection' ) + + + picker.set('enable', false) + deepEqual( picker.get('disable'), [], 'Disabled collection reset' ) + deepEqual( picker.get('enable'), -1, 'Disabled collection `enable` flipped' ) + strictEqual( $root.find( '.' + $.fn.pickatime.defaults.klass.disabled ).length, 48, 'All times disabled' ) +}) + +test( '`disable` and `enable` using ranges', function() { + + var picker = this.picker, + $root = picker.$root, + disableCollection + + disableCollection = [ { from: [2,0], to: [14,30] } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range' ) + + $root.find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( indexCell >= 4 && indexCell <= 29 ) { + ok( $( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + tableCell.innerHTML ) + } + }) + + picker.set( 'enable', disableCollection ) + deepEqual( picker.get( 'disable' ), [], 'Cleared disabled range' ) + strictEqual( $root.find( '.' + $.fn.pickatime.defaults.klass.disabled ).length, 0, 'No times disabled' ) + + + disableCollection = [ { from: new Date(2014,2,7,5,30), to: new Date(2014,2,7,19) } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range updated' ) + + $root.find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( indexCell >= 11 && indexCell <= 38 ) { + ok( $( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + tableCell.innerHTML ) + } + }) + + picker.set( 'enable', disableCollection ) + deepEqual( picker.get( 'disable' ), [], 'Cleared disabled range' ) + strictEqual( $root.find( '.' + $.fn.pickatime.defaults.klass.disabled ).length, 0, 'No times disabled' ) +}) + +test( '`disable` and `enable` using relative ranges', function() { + + var picker = this.picker, + $root = picker.$root, + now = picker.get( 'now' ), + interval = picker.get( 'interval' ), + backTime = [ now.hour, now.mins - (10*interval) ], + forwardTime = [ now.hour, now.mins + (10*interval) ], + nowIntervals = ( (now.hour*60) + now.mins ) / interval, + backIntervals = ( (backTime[0]*60) + backTime[1] ) / interval, + forwardIntervals = ( (forwardTime[0]*60) + forwardTime[1] ) / interval, + disableCollection + + disableCollection = [ { from: true, to: forwardTime } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range relative to now with date object' ) + + $root.find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( indexCell >= nowIntervals && indexCell <= forwardIntervals ) { + ok( $( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + tableCell.innerHTML ) + } + }) + + picker.set( 'enable', disableCollection ) + deepEqual( picker.get( 'disable' ), [], 'Cleared disabled range' ) + strictEqual( $root.find( '.' + $.fn.pickatime.defaults.klass.disabled ).length, 0, 'No times disabled' ) + + disableCollection = [ { from: backTime, to: true } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range relative to now with array' ) + + $root.find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( indexCell <= nowIntervals && indexCell >= backIntervals ) { + ok( $( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + tableCell.innerHTML ) + } + }) + + picker.set( 'enable', disableCollection ) + deepEqual( picker.get( 'disable' ), [], 'Cleared disabled range' ) + strictEqual( $root.find( '.' + $.fn.pickatime.defaults.klass.disabled ).length, 0, 'No times disabled' ) + + disableCollection = [ { from: true, to: 10 } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range relative to now with positive integer' ) + + $root.find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( indexCell >= nowIntervals && indexCell <= nowIntervals + 10 ) { + ok( $( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + tableCell.innerHTML ) + } + }) + + picker.set( 'enable', disableCollection ) + deepEqual( picker.get( 'disable' ), [], 'Cleared disabled range' ) + strictEqual( $root.find( '.' + $.fn.pickatime.defaults.klass.disabled ).length, 0, 'No times disabled' ) + + disableCollection = [ { from: -10, to: true } ] + picker.set( 'disable', disableCollection ) + deepEqual( picker.get( 'disable' ), disableCollection, 'Disabled range relative to now with negative integer' ) + + $root.find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( indexCell <= nowIntervals && indexCell >= nowIntervals - 10 ) { + ok( $( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + tableCell.innerHTML ) + } + }) +}) + +test( '`disable` and `enable` using overlapping ranges', function() { + + var picker = this.picker, + $root = picker.$root + + picker.set( 'disable', [ + { from: [2,0], to: [10,30] } + ]) + picker.set( 'enable', [ + { from: [5,30], to: [7,30] } + ]) + + disableCollection = [ + { from: [2,0], to: [10,30] }, + { from: [5,30], to: [7,30], inverted: true } + ] + deepEqual( picker.get( 'disable' ), disableCollection, 'Inverted range within disabled range' ) + + $root.find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( indexCell >= 4 && indexCell < 11 || indexCell > 15 && indexCell <= 21 ) { + ok( $( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + tableCell.innerHTML ) + } + }) + + picker.set( 'disable', false ) + picker.set( 'disable', [ + { from: [2,0], to: [10,30] } + ]) + picker.set( 'enable', [ + { from: [0,30], to: [7,30] } + ]) + + disableCollection = [ + { from: [2,0], to: [10,30] }, + { from: [0,30], to: [7,30], inverted: true } + ] + deepEqual( picker.get( 'disable' ), disableCollection, 'Inverted range before and within disabled range' ) + + $root.find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( indexCell > 15 && indexCell <= 21 ) { + ok( $( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + tableCell.innerHTML ) + } + }) + + picker.set( 'disable', false ) + picker.set( 'disable', [ + { from: [2,0], to: [10,30] } + ]) + picker.set( 'enable', [ + { from: [7,30], to: [14,0] } + ]) + + disableCollection = [ + { from: [2,0], to: [10,30] }, + { from: [7,30], to: [14,0], inverted: true } + ] + deepEqual( picker.get( 'disable' ), disableCollection, 'Inverted range after and within disabled range' ) + + $root.find( '[data-pick]' ).each( function( indexCell, tableCell ) { + if ( indexCell >= 4 && indexCell < 15 ) { + ok( $( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is disabled: ' + tableCell.innerHTML ) + } + else { + ok( !$( tableCell ).hasClass( $.fn.pickatime.defaults.klass.disabled ), 'Time is enabled: ' + tableCell.innerHTML ) + } + }) +}) + +test( '`disable` and `enable` repeatedly', function() { + + var now = new Date(2014,3,20,4,30), + picker = this.picker, + disabledCollection = [ + [14,0], + [16,30], + new Date(2014,3,20,22), + 1, + { from: [3,0], to: [7,30] }, + { from: [6,0], to: [11,30] } + ], + collectionToEnable + + picker.set( 'disable', disabledCollection ) + picker.set( 'disable', disabledCollection ) + deepEqual( picker.get( 'disable' ), disabledCollection, 'Collection without duplicates' ) + + collectionToEnable = [ + [16,30], + [22,0], + now, + [1,30], + { from: [6,0], to: [11,30] } + ] + picker.set( 'enable', collectionToEnable ) + disabledCollection = [ + [14,0], + 1, + { from: [3,0], to: [7,30] }, + [1,30,'inverted'], + { from: [6,0], to: [11,30], inverted: true } + ] + deepEqual( picker.get( 'disable' ), disabledCollection, 'Collection enabled various values' ) + + picker.set( 'enable', collectionToEnable ) + deepEqual( picker.get( 'disable' ), disabledCollection, 'Collection without duplicates' ) + + collectionToEnable = disabledCollection + picker.set( 'enable', collectionToEnable ) + deepEqual( picker.get( 'disable' ), [], 'Collection cleared - including inverted range overlaps' ) + + picker.set( 'enable', collectionToEnable ) + deepEqual( picker.get( 'disable' ), [], 'Collection kept clear' ) +}) + + + + +module( 'Time picker `set` beyond limits', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).val( '5:30 a.m.' ).pickatime({ + min: [2,30], + max: [17,0] + }) + this.picker = $input.pickatime( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( '`select`', function() { + + var picker = this.picker + + picker.set( 'select', [1,0] ) + deepEqual( picker.get( 'select' ), picker.get( 'min' ), 'Able to not `select` beyond lower limit' ) + + picker.set( 'select', [19,0] ) + deepEqual( picker.get( 'select' ), picker.get( 'max' ), 'Able to not `select` beyond upper limit' ) +}) + +test( '`highlight`', function() { + + var picker = this.picker + + picker.set( 'highlight', [1,0] ) + deepEqual( picker.get( 'highlight' ), picker.get( 'min' ), 'Able to not `highlight` beyond lower limit' ) + + picker.set( 'highlight', [19,0] ) + deepEqual( picker.get( 'highlight' ), picker.get( 'max' ), 'Able to not `highlight` beyond upper limit' ) +}) + +test( '`view`', function() { + + var picker = this.picker + + picker.set( 'view', [1,0] ) + deepEqual( picker.get( 'view' ), picker.get( 'min' ), 'Able to not `view` beyond lower limit' ) + + picker.set( 'view', [19,0] ) + deepEqual( picker.get( 'view' ), picker.get( 'max' ), 'Able to not `view` beyond upper limit' ) +}) + + + + +module( 'Time picker `set` outsite interval scope', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickatime() + this.picker = $input.pickatime( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( '`select`', function() { + + var picker = this.picker + + picker.set( 'select', [1,10] ) + var selected = picker.get('select') + deepEqual( [selected.hour, selected.mins], [1,30], 'Scoped `select` into interval range' ) + + picker.set( 'select', [19,49] ) + selected = picker.get('select') + deepEqual( [selected.hour, selected.mins], [20,0], 'Scoped `select` into interval range' ) +}) + +test( '`highlight`', function() { + + var picker = this.picker + + picker.set( 'highlight', [1,10] ) + var highlighted = picker.get('highlight') + deepEqual( [highlighted.hour, highlighted.mins], [1,30], 'Scoped `highlight` into interval range' ) + + picker.set( 'highlight', [19,49] ) + highlighted = picker.get('highlight') + deepEqual( [highlighted.hour, highlighted.mins], [20,0], 'Scoped `highlight` into interval range' ) +}) + +test( '`view`', function() { + + var picker = this.picker + + picker.set( 'view', [1,10] ) + var viewset = picker.get('view') + deepEqual( [viewset.hour, viewset.mins], [1,30], 'Scoped `view` into interval range' ) + + picker.set( 'view', [19,49] ) + viewset = picker.get('view') + deepEqual( [viewset.hour, viewset.mins], [20,0], 'Scoped `view` into interval range' ) +}) + + + + +module( 'Time picker mouse events', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickatime() + this.picker = $input.pickatime( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Select', function() { + + var picker = this.picker, + $root = picker.$root, + interval = picker.get( 'interval' ) + + for ( var i = 0; i < 48; i += 1 ) { + $root.find( '.' + $.fn.pickatime.defaults.klass.listItem ).eq( i ).click() + strictEqual( picker.get( 'select' ).pick, i * interval, 'Selected ' + picker.get( 'select', 'h:i A' ) ) + strictEqual( picker.get( 'value' ), picker.get( 'select', 'h:i A' ), 'Input value updated to ' + picker.get( 'value' ) ) + } +}) + +test( 'Clear', function() { + + var picker = this.picker + + picker.set( 'select', [2,0] ) + strictEqual( picker.get( 'value' ), picker.get( 'select', $.fn.pickatime.defaults.format ), 'Value updated' ) + + picker.open() + picker.$root.find( '.' + $.fn.pickatime.defaults.klass.buttonClear ).click() + strictEqual( picker.get( 'value' ), '', 'Value cleared' ) +}) + + + + +module( 'Time picker keyboard events', { + setup: function() { + $DOM.append( $INPUT.clone() ) + var $input = $DOM.find( 'input' ).pickatime() + this.picker = $input.pickatime( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( 'Select', function() { + + var picker = this.picker, + $input = picker.$node + + for ( var i = 0; i < 48; i += 1 ) { + + // Open the picker. + picker.open() + + // Set the highlight. + picker.set( 'highlight', i * 30 ) + + // Keydown to select the highlighted item. + $input.trigger({ type: 'keydown', keyCode: 13 }) + + // Check if the select is the same as the highlight. + deepEqual( picker.get( 'select' ), picker.get( 'highlight' ), 'Select updated to: ' + picker.get( 'select', 'HH:i' ) ) + } +}) + +test( 'Highlight', function() { + + var picker = this.picker, + $input = picker.$node + + // Open the picker + picker.open() + + // Set the highlight to the start. + picker.set('highlight', 0) + + // Down + for ( var i = 1; i < 48; i += 1 ) { + $input.trigger({ type: 'keydown', keyCode: 40 }) + strictEqual( picker.get( 'highlight' ).pick, 30 * i, 'Key “down” to `highlight`: ' + picker.get( 'highlight', 'h:i A' ) ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), 'Updated `view`' ) + } + + // Up + for ( var j = 2; j < 49; j += 1 ) { + $input.trigger({ type: 'keydown', keyCode: 38 }) + strictEqual( picker.get( 'highlight' ).pick, 1440 - 30 * j, 'Key “up” to `highlight`: ' + picker.get( 'highlight', 'h:i A' ) ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), 'Updated `view`' ) + } + + // Right + for ( var k = 1; k < 48; k += 1 ) { + $input.trigger({ type: 'keydown', keyCode: 39 }) + strictEqual( picker.get( 'highlight' ).pick, 30 * k, 'Key “right” to `highlight`: ' + picker.get( 'highlight', 'h:i A' ) ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), 'Updated `view`' ) + } + + // Left + for ( var l = 2; l < 49; l += 1 ) { + $input.trigger({ type: 'keydown', keyCode: 37 }) + strictEqual( picker.get( 'highlight' ).pick, 1440 - 30 * l, 'Key “up” to `highlight`: ' + picker.get( 'highlight', 'h:i A' ) ) + deepEqual( picker.get( 'view' ), picker.get( 'highlight' ), 'Updated `view`' ) + } +}) + + + + +module( 'Time picker with a visible value', { + setup: function() { + $DOM.append( $INPUT.clone().val( '2:00 p.m.' ) ) + var $input = $DOM.find( 'input' ).pickatime() + this.picker = $input.pickatime( 'picker' ) + }, + teardown: function() { + this.picker.stop() + $DOM.empty() + } +}) + +test( '`value` to select, highlight, and view', function() { + var picker = this.picker + ok( !picker._hidden, 'No hidden input' ) + strictEqual( picker.get( 'select' ).pick, 840, 'Selects time' ) + strictEqual( picker.get( 'highlight' ).pick, 840, 'Highlights time' ) + strictEqual( picker.get( 'view' ).pick, 840, 'Viewsets time' ) +}) + + + + +module( 'Time picker with a hidden value', { + teardown: function() { + $DOM.empty() + } +}) + +test( '`value` to select, highlight, and view', function() { + + $DOM.append( $INPUT.clone().val( '2:00 p.m.' ) ) + var $input = $DOM.find( 'input' ).pickatime({ + formatSubmit: 'HH:i' + }) + var picker = $input.pickatime( 'picker' ) + + ok( picker._hidden, 'Has hidden input' ) + strictEqual( picker._hidden.value, '14:00', 'Hidden input value' ) + strictEqual( picker.get( 'select' ).pick, 840, 'Selects time' ) + strictEqual( picker.get( 'highlight' ).pick, 840, 'Highlights time' ) + strictEqual( picker.get( 'view' ).pick, 840, 'Viewsets time' ) +}) + +test( '`data-value` to select, highlight, and view', function() { + + $DOM.append( $INPUT.clone().data( 'value', '14:00' ) ) + var $input = $DOM.find( 'input' ).pickatime({ + formatSubmit: 'HH:i' + }) + var picker = $input.pickatime( 'picker' ) + + ok( picker._hidden, 'Has hidden input' ) + strictEqual( picker._hidden.value, '14:00', 'Hidden input value' ) + strictEqual( picker.get( 'select' ).pick, 840, 'Selects time' ) + strictEqual( picker.get( 'highlight' ).pick, 840, 'Highlights time' ) + strictEqual( picker.get( 'view' ).pick, 840, 'Viewsets time' ) +}) + + + diff --git a/js/pickadate.js-3.5.3/time.htm b/js/pickadate.js-3.5.3/time.htm new file mode 100644 index 0000000..ac44c40 --- /dev/null +++ b/js/pickadate.js-3.5.3/time.htm @@ -0,0 +1,591 @@ + + + + + + + + + + + +pickadate.js / time + + + + + + + + + + + + + +
+ +
+ +
+ + + +
+ + + + + + + +
+ + +
+ +

The Time Picker§

+ +

The basic setup requires targetting an input element and invoking the picker:

+ +
$('.timepicker').pickatime()
+
+ +
+ + +
+ +

Options§

+

With the basic invocation above, these are the default settings:

+ +
// Translations and clear button
+clear: 'Clear',
+
+// Formats
+format: 'h:i A',
+formatLabel: undefined,
+formatSubmit: undefined,
+hiddenPrefix: undefined,
+hiddenSuffix: '_submit',
+
+// Editable input
+editable: undefined,
+
+// Time intervals
+interval: 30,
+
+// Time limits
+min: undefined,
+max: undefined,
+
+// Disable times
+disable: undefined,
+
+// Root container
+container: undefined,
+
+// Events
+onStart: undefined,
+onRender: undefined,
+onOpen: undefined,
+onClose: undefined,
+onSet: undefined,
+onStop: undefined,
+
+// Classes
+klass: {
+
+    // The element states
+    input: 'picker__input',
+    active: 'picker__input--active',
+
+    // The root picker and states *
+    picker: 'picker picker--time',
+    opened: 'picker--opened',
+    focused: 'picker--focused',
+
+    // The picker holder
+    holder: 'picker__holder',
+
+    // The picker frame, wrapper, and box
+    frame: 'picker__frame',
+    wrap: 'picker__wrap',
+    box: 'picker__box',
+
+    // List of times
+    list: 'picker__list',
+    listItem: 'picker__list-item',
+
+    // Time states
+    disabled: 'picker__list-item--disabled',
+    selected: 'picker__list-item--selected',
+    highlighted: 'picker__list-item--highlighted',
+    viewset: 'picker__list-item--viewset',
+    now: 'picker__list-item--now',
+
+    // Clear button
+    buttonClear: 'picker__button--clear',
+}
+ +
+

* It is important to not add any stylings to the picker’s root element. Instead, target the .picker__holder element (or any other within) based on the state of the root element.

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

Translations§

+

Coming soon...

+ +
+ +
+ + +
+ +
+ +

Clear Button§

+

Change the text or hide the button completely by passing a false-y value:

+ +
$('.timepicker').pickatime({
+    clear: ''
+})
+ +
+ +
+ +
+ + +
+ +
+ +

Formats§

+

Display a human-friendly label and input format and use an alternate one to submit.

+

This is done by creating a new hidden input element with the same name attribute as the original and an optional prefix/suffix:

+ +
$('.timepicker').pickatime({
+    // Escape any “rule” characters with an exclamation mark (!).
+    format: 'T!ime selected: h:i a',
+    formatLabel: '<b>h</b>:i <!i>a</!i>',
+    formatSubmit: 'HH:i',
+    hiddenPrefix: 'prefix__',
+    hiddenSuffix: '__suffix'
+})
+ +
+ +

The formatLabel option is unique. It can contain HTML and it can also be a function if you want to create the label during run-time:

+ + + +
$('.timepicker').pickatime({
+    formatLabel: function(time) {
+        var hours = ( time.pick - this.get('now').pick ) / 60,
+            label = hours < 0 ? ' !hours to now' : hours > 0 ? ' !hours from now' : 'now'
+        return  'h:i a <sm!all>' + ( hours ? Math.abs(hours) : '' ) + label + '</sm!all>'
+    }
+})
+ +
+ +

Send the hidden value only§

+

A majority of the time, the value that needs to be sent to the server is just the hidden value – and not the visible one. To make this happen, use the hiddenName option.

+

This essentially nullifies the hiddenPrefix and hiddenSuffix, strips the name attribute from the source input, and then sets it as the name of the hidden input:

+ +
$('.timepicker').pickatime({
+    formatSubmit: 'HH:i',
+    hiddenName: true
+})
+ +
+ +

Formatting Rules§

+

The following rules can be used to format any time:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RuleDescriptionResult
hHour in 12-hour format1 – 12
hhHour in 12-hour format with a leading zero01 – 12
HHour in 24-hour format0 – 23
HHHour in 24-hour format with a leading zero00 – 23
iMinutes00 – 59
aDay time perioda.m. / p.m.
ADay time period in uppercaseAM / PM
+ +
+ +
+ + +
+ +
+ +

Editable input§

+

By default, typing into the input is disabled by giving it a readOnly attribute. Doing so ensures that virtual keyboards don’t pop open on touch devices. It is also a confirmation that values passed to the server will be of a consistent format.

+

However, this behavior can be changed using the editable option:

+ +
$('.timepicker').pickatime({
+    editable: true
+})
+ +
+ +
+

An important thing to note here is that this disables keyboard bindings on the input element, such as arrow keys opening the picker. You will have to add your own bindings as you see fit.

+
+ +

Using HTML5 attributes§

+

Because each input is readOnly by default, HTML5 attributes, such as required and pattern, do not get enforced.

+

To enable default browser behavior on these attributes, set the editable property to true.

+ +
+ +
+ + +
+ +
+ +

Intervals§

+

Choose the minutes interval between each time in the list:

+ +
$('.timepicker').pickatime({
+    interval: 150
+})
+ +
+ +
+ +
+ + +
+ +
+ +

Time Limits§

+

Set the minimum and maximum selectable times on the picker.

+ +

Using JavaScript dates§

+ +
$('.datepicker').pickadate({
+    min: new Date(2013,3,20,7),
+    max: new Date(2013,7,14,18,30)
+})
+ +
+ +

Using arrays formatted as [HOUR,MINUTE]§

+ +
$('.timepicker').pickatime({
+    min: [7,30],
+    max: [14,0]
+})
+ +
+ +

Using integers or a boolean§

+ +
$('.timepicker').pickatime({
+    // An integer (positive/negative) sets it as intervals relative from now.
+    min: -5,
+    // `true` sets it to now. `false` removes any limits.
+    max: true
+})
+ +
+ +
+ +
+ + +
+ +
+ +

Disable Times§

+

Disable a specific or arbitrary set of times selectable on the picker.

+ +

Using JavaScript dates§

+ +
$('.timepicker').pickatime({
+    disable: [
+        new Date(2014,3,20,4,30),
+        new Date(2014,3,20,9)
+    ]
+})
+ +
+ +

Using arrays formatted as [HOUR,MINUTE]§

+ +
$('.timepicker').pickatime({
+    disable: [
+        [0,30],
+        [2,0],
+        [8,30],
+        [9,0]
+    ]
+})
+ +
+ +

Using integers as hours (0 to 23)§

+ +
$('.timepicker').pickatime({
+    disable: [
+        3, 5, 7
+    ]
+})
+ +
+ +

Using objects as a range of times§

+ +
$('.timepicker').pickatime({
+    disable: [
+        { from: [2,0], to: [5,30] }
+    ]
+})
+ +
+ +

The values for from & to can be:

+
    +
  • A JavaScript Date object,
  • +
  • An array formatted as [HOUR,MINUTE],
  • +
  • And true to set it as “now”.
  • +
+

The values can also be integers representing time intervals relative to the other:

+
    +
  • to can only be positive:
    { from: [3,0], to: 10 }
  • +
  • from can only be negative:
    { from: -10, to: true }
  • +
+ +

Disabling all with a set of exceptions§

+

Enable only a specific or arbitrary set of times by setting true as the first item in the collection:

+ +
$('.timepicker').pickatime({
+    disable: [
+        true,
+        3, 5, 7,
+        [0,30],
+        [2,0],
+        [8,30],
+        [9,0]
+    ]
+})
+ +
+ +

Disabling ranges with exceptions§

+

Enable times that fall within a range of disabled times by adding the inverted parameter to the item within the collection:

+ +
$('.timepicker').pickatime({
+    disable: [
+        1,
+        [1, 30, 'inverted'],
+        { from: [4, 30], to: [10, 30] },
+        [6, 30, 'inverted'],
+        { from: [8, 0], to: [9, 0], inverted: true }
+    ]
+})
+ +
+ +
+ +
+ + + +
+ +
+ +

container§

+

By default, the picker’s root element is inserted right after the input element. Specify where to insert the root element by passing any valid CSS selector to this option:

+ +
+ +
$('.timepicker').pickatime({
+    container: '#root-outlet'
+})
+ +
+ +
+

This is especially important when the input falls within a label element because click events bubble up to the label element and re-open the picker.

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

events§

+

Fire off events as the user interacts with the picker:

+ +
$('.timepicker').pickatime({
+    onStart: function() {
+        console.log('Hello there :)')
+    },
+    onRender: function() {
+        console.log('Whoa.. rendered anew')
+    },
+    onOpen: function() {
+        console.log('Opened up')
+    },
+    onClose: function() {
+        console.log('Closed now')
+    },
+    onStop: function() {
+        console.log('See ya.')
+    },
+    onSet: function(context) {
+        console.log('Just set stuff:', context)
+    }
+})
+ +
+ +

The onSet event is the only callback that is passed a context argument that provides details as to which properties are being “set”.

+

Within scope of all six of these events, this refers to the picker.

+

To learn more on how to use the picker object, read the API documentation.

+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/demo/TreehouseShowFeature.png b/js/pickadate.js-3.5.3/v2-(deprecated)/demo/TreehouseShowFeature.png new file mode 100644 index 0000000..e63199e Binary files /dev/null and b/js/pickadate.js-3.5.3/v2-(deprecated)/demo/TreehouseShowFeature.png differ diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/demo/jquery.js b/js/pickadate.js-3.5.3/v2-(deprecated)/demo/jquery.js new file mode 100644 index 0000000..83589da --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/demo/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v1.8.3 jquery.com | jquery.org/license */ +(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
t
",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
","
"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/demo/rainbow.js b/js/pickadate.js-3.5.3/v2-(deprecated)/demo/rainbow.js new file mode 100644 index 0000000..c21daf7 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/demo/rainbow.js @@ -0,0 +1,2 @@ + /* Rainbow v1.1.8 rainbowco.de | included languages: generic, javascript, html, css */ + window.Rainbow=function(){function q(a){var b,c=a.getAttribute&&a.getAttribute("data-language")||0;if(!c){a=a.attributes;for(b=0;b=e[d][c])delete e[d][c],delete j[d][c];if(a>=c&&ac&&b'+b+""}function s(a,b,c,h){var f=a.exec(c);if(f){++t;!b.name&&"string"==typeof b.matches[0]&&(b.name=b.matches[0],delete b.matches[0]);var k=f[0],i=f.index,u=f[0].length+i,g=function(){function f(){s(a,b,c,h)}t%100>0?f():setTimeout(f,0)};if(C(i,u))g();else{var m=v(b.matches),l=function(a,c,h){if(a>=c.length)h(k);else{var d=f[c[a]];if(d){var e=b.matches[c[a]],i=e.language,g=e.name&&e.matches?e.matches:e,j=function(b,d,e){var i;i=0;var g;for(g=1;g/g,">").replace(/&(?![\w\#]+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),b,c)}function o(a,b,c){if(b code { + display: table; + line-height: 1.5; + border: 0; + background: none; + padding: 0 4.2em 0 0; +} + + + + + + +/* ========================================================================== + $BUTTONS + ========================================================================== */ + +.button, +.button-full, +.button-full--secondary { + display: inline-block; + border: 0; + background: #0089ec; + color: #fff; + text-decoration: none; + padding: 8px 18px; +} + +.button-full, +.button-full--secondary { + padding: .66em 18px; + text-align: center; + display: block; + font-size: 1.4em; +} + +.button-full--secondary { + font-size: 1.15em; + background: #74c346; +} + +.button-header { + font-size: 14px; + letter-spacing: 0; + margin-left: 1em; + vertical-align: 8px; + font-weight: 500; +} + + + + + + + + +/* ========================================================================== + $DEMO-STUFF + ========================================================================== */ + +.list-inline { + margin: 2em 0; + padding: 0; + list-style: none; +} +.list-inline > li { + margin-right: .5em; + float: left; +} + +.button-pill { + text-decoration: none; + background: #aaa; + color: #fff; + font-size: .75em; + padding: 3px 6px 2px; + + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.button-pill:hover { + background: #0089ec; +} + + +.input-clear { + width: 2em; + height: 2em; + line-height: 2em; + background: #ccc; + color: #fff; + text-align: center; + position: absolute; + top: .75em; + right: .75em; + display: inline-block; + text-decoration: none; + + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + border-radius: 50%; +} + +.input-clear:hover { + background: #666; +} + + +.peace { + position: relative; + display: inline-block; + background: red; + width: 0; + left: .66em; + top: .66em; +} +.peace:after { + content: "\270C"; + font-size: 4em; + color: #e5e5e5; +} + + + + + +/** + * Syntax highlighting + */ + +.string { + color: #68c244; +} + +.selector, +.function, +.method { + color: #0069bc; +} + +.comment, +.comment a { + /*color: #8e69c9;*/ + color: #0089ec; + font-style: italic; +} + +.constant { + color: #d40; +} + +.tag-name, +.attribute { + color: #c50; +} + +.keyword { + color: #b90690; +} + +.rainbow, +.operator { + color: #585856; +} + + + + + + +/* ========================================================================== + $HELPERS + ========================================================================== */ + +.dimmed, +a.dimmed { + color: #999; +} + +.warning { + color: #e20; +} + +.alignleft { + float: left; +} + +.alignright { + float: right; +} + +.aligncenter { + text-align: center; +} + + +/** + * Clear fix from HTML5 Boilerplate + */ + +.clear:before, +.clear:after { + content: " "; + display: table; +} + +.clear:after { + clear: both; +} + + + + + + + + + + + + + diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/docs.htm b/js/pickadate.js-3.5.3/v2-(deprecated)/docs.htm new file mode 100644 index 0000000..66518a4 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/docs.htm @@ -0,0 +1,1300 @@ + + + + + + + + + + +Pickadate.js • Documentation + + + + + + + + + + +
+ +

pickadate.jsBack to v3

+

A mobile-friendly, responsive, and lightweight jQuery dateinput picker
9.6kb min, 4.0kb gzipped

+ +

Download pickadate.js v2.1.8 (for old browsers) or view the themes

+

Jump to api documentation

+ +
+ + +
+ +

§Default options

+ +
// Strings and translations
+monthsFull: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ],
+monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ],
+weekdaysFull: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ],
+weekdaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ],
+
+// Display strings
+monthPrev: '&amp;#9664;',
+monthNext: '&amp;#9654;',
+showMonthsFull: true,
+showWeekdaysShort: true,
+
+// Today and clear
+today: 'Today',
+clear: 'Clear',
+
+// Date formats
+format: 'd mmmm, yyyy',
+formatSubmit: false,
+hiddenSuffix: '_submit',
+
+// First day of week
+firstDay: 0,
+
+// Month & year dropdown selectors
+monthSelector: false,
+yearSelector: false,
+
+// Date ranges
+dateMin: false,
+dateMax: false,
+
+// Dates disabled
+datesDisabled: false,
+
+// Disable picker
+disablePicker: false,
+
+// Calendar events
+onStart: null,
+onOpen: null,
+onClose: null,
+onSelect: null,
+onRender: null,
+
+// Themes
+klass: {
+    active: 'pickadate__active',
+    input: 'pickadate__input',
+
+    // Picker holder states
+    holder: 'pickadate__holder',
+    opened: 'pickadate__holder--opened',
+    focused: 'pickadate__holder--focused',
+
+    // Picker frame and wrapper
+    frame: 'pickadate__frame',
+    wrap: 'pickadate__wrap',
+
+    // Picker calendar
+    calendar: 'pickadate__calendar',
+
+    // Picker header
+    header: 'pickadate__header',
+
+    // Month navigation
+    monthPrev: 'pickadate__nav--prev',
+    monthNext: 'pickadate__nav--next',
+
+    // Month & year labels
+    month: 'pickadate__month',
+    year: 'pickadate__year',
+
+    // Select menus
+    selectMonth: 'pickadate__select--month',
+    selectYear: 'pickadate__select--year',
+
+    // Picker table
+    table: 'pickadate__table',
+
+    // Weekday labels
+    weekdays: 'pickadate__weekday',
+
+    // Calendar body
+    body: 'pickadate__body',
+
+    // Day states
+    day: 'pickadate__day',
+    dayDisabled: 'pickadate__day--disabled',
+    daySelected: 'pickadate__day--selected',
+    dayHighlighted: 'pickadate__day--highlighted',
+    dayToday: 'pickadate__day--today',
+    dayInfocus: 'pickadate__day--infocus',
+    dayOutfocus: 'pickadate__day--outfocus',
+
+    // Footer
+    footer: 'pickadate__footer',
+
+    // Today and clear buttons
+    buttonClear: 'pickadate__button--clear',
+    buttonToday: 'pickadate__button--today'
+}
+ +
+ + +
+ +

§Simple setup

+ +

For the basic setup with the default options, invoke the picker on an input element. The type of the element doesn’t matter, but it must be an input element.

+ +
$( '.datepicker' ).pickadate()
+ +
+ +
+ +

A core behaviour is to give the input field a readonly attribute. This is done to prevent the keyboard from popping up on smartphones and also to maintain “pretty” dates that are simple to handle.

+ +

If you require the input to be editable, I would suggest using a date parsing library (such as datejs) along with the pickadate.js api to achieve this effect.

+ +
+ + +
+ +

§Custom month and weekday tags

+ +
$( '.datepicker' ).pickadate({
+    monthPrev: '&amp;larr;',
+    monthNext: '&amp;rarr;',
+    weekdaysShort: [ 'Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa' ],
+    showMonthsFull: false
+})
+ +
+ +
+ +
+ + +
+ +

§Today and clear buttons

+ +

As a default, today is set to 'Today' and clear is set to 'Clear'.

+ +

If either of the options is false, the button is not displayed.

+ +
$( '.datepicker' ).pickadate({
+    today: false,
+    clear: 'Clear date'
+})
+ +
+ +
+ +

For a custom “clear” button, check out the api for the clear method.

+ +
+ + +
+ +

§Any language support

+ +

You can add support for any language in one of two ways.

+ +

(1) By passing the months and weekdays as an array for each invocation:

+ +
$( '.datepicker' ).pickadate({
+    formatSubmit: 'dd/mm/yyyy',
+    monthsFull: [ 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre' ],
+    monthsShort: [ 'Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec' ],
+    weekdaysShort: [ 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' ],
+    today: 'aujourd\'hui',
+    clear: 'effacer'
+})
+ +

(2) Or by globally extending the default picker options for all instances:

+ +
$.extend( $.fn.pickadate.defaults, {
+    formatSubmit: 'dd/mm/yyyy',
+    monthsFull: [ 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre' ],
+    monthsShort: [ 'Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec' ],
+    weekdaysShort: [ 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' ],
+    today: 'aujourd\'hui',
+    clear: 'effacer'
+})
+ +
+ +
+ +

There are extensions for 28 languages already available.

+ +

The data-value attribute and formatSubmit option are both required to parse your dates correctly. Read more

+ +
+ + +
+ +

§Custom date formats

+ +
$( '.datepicker' ).pickadate({
+    format: 'You selected: dddd, dd mmm, yyyy',
+    formatSubmit: 'yyyy/mm/dd'
+})
+ +

Display human-friendly date formats while using a different format to submit to the server. Pick a date:

+ +
+ +
+ +

This is done by creating a hidden input field using the name attribute of the original input element plus the string set in the hiddenSuffix option.

+ +

As a default, hiddenSuffix is '_submit'.

+ +

The dates can be formatted using the following rules:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RuleResultExample
dDate1-31
ddDate with leading zero01-31
dddWeekday – shortSun-Sat
ddddWeekday – fullSunday-Saturday
mMonth1-12
mmMonth with leading zero01-12
mmmMonth name – shortJan-Dec
mmmmMonth name – fullJanuary-December
yyYear – short *00-99
yyyyYear – full2000-2999
+ + +

* The “short” year ( yy ) format is quite vague and should be avoided within formatSubmit so dates can be accurately parsed.

+ + + + +
+ +

§Custom format parsing

+ +

If your input field has a custom date format or language that doesn't easily parse as a date, you can specify the date using the data-value attribute:

+ +
&lt;input value="August 14" data-value="1988/08/14" class="datepicker" type="text">
+ +
+ +
+ +

The data-value attribute must be formatted using the formatSubmit option:

+ +
$( '.datepicker' ).pickadate({
+    format: 'mmmm dd',
+    formatSubmit: 'yyyy/mm/dd'
+})
+ +
+ + +
+ +

§Set Monday as the first day

+ +
$( '.datepicker' ).pickadate({
+    firstDay: 1
+})
+
+ +

Set firstDay to 1 for Monday and 0 for Sunday.

+ +
+ +
+ +
+ + +
+ +

§Month and year dropdowns

+ +
$( '.datepicker' ).pickadate({
+    monthSelector: true,
+    yearSelector: true
+})
+ +

If monthSelector or yearSelector is true, a select menu is displayed:

+ +
+ +
+ +

To change the number of years in the dropdown, set yearSelector as an even integer (half before the year in focus and half after). If set to true, it defaults to 10.

+ +
$( '.datepicker' ).pickadate({
+    yearSelector: 4
+})
+ +
+ +
+ +
+ + +
+ +

§Minimum and maximum date range

+ +
$( '.datepicker' ).pickadate({
+    dateMin: [ 2012, 10, 14 ],
+    dateMax: 5
+})
+ +
+ +
+ +

dateMin and dateMax can be either

+
    +
  1. an array representing a date ([ yyyy, mm, dd ])
  2. +
  3. a boolean (true or false)
  4. +
  5. or an integer
  6. +
+ +

If dateMax or dateMin is true, the range limit is set to today.

+ +

If dateMax or dateMin is false, the range limit is removed.

+ +

If dateMax or dateMin is an integer, it represents the relative number of days till the min or max date.

+ +
$( '.datepicker' ).pickadate({
+    dateMin: -8,
+    dateMax: true
+})
+ +
+ +
+ +
+ + +
+ +

§Disable arbitrary dates

+ +

Pass an array of arbitrary dates (each formatted as [ yyyy, mm, dd ]) to disable them.

+ +
$( '.datepicker' ).pickadate({
+    datesDisabled: [
+        [ 2013, 3, 2 ],
+        [ 2013, 3, 5 ],
+        [ 2013, 3, 28 ]
+    ]
+})
+ +
+ +
+ +
+ + +
+ +

§Disable days of the week

+ +

Disable certain days of the week, such as all Saturdays (7th day of week) and Sundays (1st day of week), by passing an integer between 1 and 7:

+ +
$( '.datepicker' ).pickadate({
+    datesDisabled: [
+        1, 7,
+        [ 2013, 3, 2 ],
+        [ 2013, 3, 5 ],
+        [ 2013, 3, 28 ]
+    ]
+})
+ +
+ +
+ +
+ + +
+ +

§Disable all dates.. except some

+ +

Alternatively, disable all the dates in the calendar, except the ones specified if you set true as the first item in the array.

+ +
$( '.datepicker' ).pickadate({
+    datesDisabled: [
+        true,
+        1, 7,
+        [ 2013, 3, 2 ],
+        [ 2013, 3, 5 ],
+        [ 2013, 3, 28 ]
+    ]
+})
+ +
+ +
+ +
+ + +
+ +

§Disable picker for native calendar

+ +
$( '.datepicker' ).pickadate({
+    disablePicker: true
+})
+ +
+ +
+ +

Some mobile browsers have good native support for type="date".

+

If you want to selectively disable the picker for these browsers, I would suggest detecing for support with something like Modernizr and then setting disablePicker to true.

+ +
+ + +
+ +

§Do stuff on calendar events

+ +
$( '.datepicker' ).pickadate({
+    onOpen: function() {
+        console.log( 'Opened' )
+    },
+    onClose: function() {
+        console.log( 'Closed' )
+    },
+    onSelect: function() {
+        console.log( 'Selected: ' + this.getDate() )
+    },
+    onStart: function() {
+        console.log( 'Hello there :)' )
+    },
+    onRender: function() {
+      console.log( 'New calendar rendered!' )
+    }
+})
+ +

Have events trigger as the user interacts with the picker.

+ +

Within scope of these methods, this refers to the calendar picker. Open up your console and pick a date:

+ +
+ +
+ +
+ + +
+ +

§api

+ +

There are 5 basic events in the options:

+ +
    +
  1. onStart: invoked when the picker is initiated.
  2. +
  3. onOpen: invoked when the picker is opened.
  4. +
  5. onSelect: invoked when a date is selected or cleared.
  6. +
  7. onClose: invoked when the picker is closed.
  8. +
  9. onRender: invoked when the picker is rendered, including month changes.
  10. +
+ +

Within the scope of these methods, this refers to the calendar object.

+ +
$( '.datepicker' ).pickadate({
+    onStart: function() {
+        var calendar = this
+    }
+})
+ +

Alternatively, you can grab the calendar object like this:

+ +
var input = $( '.datepicker' ).pickadate()
+var calendar = input.data( 'pickadate' )
+
+ +

The following methods are available on the calendar object:

+ +
    +
  1. open
  2. +
  3. close
  4. +
  5. isOpen
  6. +
  7. show
  8. +
  9. clear
  10. +
  11. getDate
  12. +
  13. setDate
  14. +
  15. getDateLimit
  16. +
  17. setDateLimit
  18. +
+ +

You can also grab the jQuery object of the input element from the calendar like this:

+ +
this.$node
+ +

The $ prefix is used to signify a jQuery object.

+ +
+ + +
+ +

§Open & close calendar

+ +
calendar.open()
+calendar.close()
+ +

+ + +

+ +
+ +
+ +

If you want to open the calendar on page load, you can add the autofocus attribute to the input element:

+ +
&lt;input autofocus class="datepicker" type="text">
+ +
+ + +
+ +

§Check if calendar is open

+ +
calendar.isOpen()
+ +

This method returns a true or false based on the state of the calendar.

+ +

+ +

+ +
+ +
+ +
+ + +
+ +

§Show a specific month

+ +
calendar.show( month, year )
+ +

month and year have to be integers representing the month and year to show on the calendar.

+ +

year is optional. If none is specified, it shows the month of the year already in focus.

+ +
calendar.show( 4 )
+ +

+ +

+ +
+ +
+ +

This method does not open the calendar. However, the methods are chainable. So you can do this:

+ +
calendar.show( 10, 2015 ).open()
+ +

+ +

+ +
+ +
+ +
+ + +
+ +

§Clear the date

+ +
calendar.clear()
+ +

Clears the selected date value from the input element.

+ +

+ +

+ +
+ +
+ +

With some custom stylings and api mastery, you can do something like this:

+ +
// Grab the clear button and bind the event
+// to clear the input value on click
+var clearButton = $( '#clearButton' ).on({ + click: function() { + inputElement.data( 'pickadate' ).clear() + } +}) + +// Grab the input element and trigger the picker
+// with the onStart and onSelect methods to
+// toggle the clear button visibility
+var inputElement = $( '.datepicker' ).pickadate({ + format: 'dd mmmm, yyyy', + formatSubmit: 'yyyy-mm-dd', + clear: false, + onStart: showOrHideClear, + onSelect: showOrHideClear +}) + +// Check if the input element has a value
+// and show or hide the button as needed
+function showOrHideClear() { + if ( this.$node.val() ) clearButton.show() + else clearButton.hide() +}
+ +
+ × + +
+ +
+ + +
+ +

§Get the date

+ +

Get the date selected on the calendar:

+ +
calendar.getDate()
+ +

+ +

+ +
+ +
+ +

Optionally, you can pass a format in which you would like to get the date:

+ +
calendar.getDate( 'yyyy-mm-dd' )
+ +

+ +

+ +
+ +
+ +

To get the underlying JavaScript Date object, set format to true:

+ +
calendar.getDate( true )
+ +

+ +

+ +
+ +
+ +
+ + +
+ +

§Set the date

+ +
calendar.setDate( year, month, date, superficial )
+ +

year, month, date are required integers representing the date to select on the calendar.

+ +
calendar.setDate( 2020, 2, 14 )
+ +

+ +

+ +
+ +
+ + +

superficial is optional. If superficial is true, the date will only be superficially selected. This means the input value won't change.

+ +
calendar.setDate( 2020, 2, 14, true )
+ +

+ +

+ +
+ +
+ +
+ + +
+ +

§Get the min or max date

+ +
calendar.getDateLimit( upper, format )
+ +

upper is optional. If upper is true, it returns the maximum date. Otherwise it gets the minimum date.

+ +

format is also optional. If none is specified, it falls back to the default format option in your invocation. Dates can be formatted with these rules.

+ +
calendar.getDateLimit()
+calendar.getDateLimit( true, 'yyyy-mm-dd' )
+ +

+ + +

+ +
+ +
+ +
+ + +
+ +

§Set the min or max date

+ +
calendar.setDateLimit( date, upper )
+ +

date is a required array, integer, or boolean – similar to the dateMin and dateMax options in your invocation. This date is used to set the limit.

+ +

upper is optional. If upper is true, it will set the date as the maximum date selectable. Otherwise it sets it as the minimum date selectable.

+ +
calendar.setDateLimit( 40 )
+calendar.setDateLimit( [ 2013, 6, 23 ], true )
+ +

+ + +

+ +
+ +
+ +
+ + +
+ +

§From & to calendars

+ +

Using the calendar API, you can create two calendars with a “from” and “to” interaction.

+ +
+

+ +
+ +
+

+ +
+ +
// When a date is selected on the "from" picker,
+// get the date and split into an array.
+// Then set the lower limit of the "to" picker.
+var picker_from = $( '#picker_from' ).pickadate({ + onSelect: function() { + var fromDate = createDateArray( this.getDate( 'yyyy-mm-dd' ) ) + picker_to.data( 'pickadate' ).setDateLimit( fromDate ) + } +}) + +// When a date is selected on the "to" picker,
+// get the date and split into an array.
+// Then set the upper limit of the "from" picker.
+var picker_to = $( '#picker_to' ).pickadate({ + onSelect: function() { + var toDate = createDateArray( this.getDate( 'yyyy-mm-dd' ) ) + picker_from.data( 'pickadate' ).setDateLimit( toDate, 1 ) + } +}) + + +// Create an array from the date while parsing each date unit as an integer
+function createDateArray( date ) { + return date.split( '-' ).map(function( value ) { return +value }) +}
+ +
+ + +
+ +

Download pickadate.js v2.1.8

+

View calendar themes

+ +

Browser support: IE7+, Chrome, Firefox, Safari, Opera, iOS Safari, Android browser

+

Dependency: jQuery 1.7+

+
+

Note on browser support
The pickadate.js script supports IE 9+ by default. To support IE 7+ and other old browsers, use the pickadate.legacy.js script instead.

+

View project on Github

+ +
+ + +
+

Featured on The Treehouse Show

+

Made by Amsul

+
+ + + + + + + + + + + + + + + diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/index.htm b/js/pickadate.js-3.5.3/v2-(deprecated)/index.htm new file mode 100644 index 0000000..beef7bb --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/index.htm @@ -0,0 +1,94 @@ + + + + + + + + + + +Pickadate.js + + + + + + + + + + +
+ +

pickadate.jsBack to v3

+

A mobile-friendly, responsive, and lightweight jQuery dateinput picker
9.6kb min, 4.0kb gzipped

+ +

As easy as: $('.datepicker').pickadate().

+

Go ahead… pick a date.

+ +
+ +
+ + + + +
+

Download pickadate.js v2.1.8

+

View calendar themes

+ +

Browser support: IE7+, Chrome, Firefox, Safari, Opera, iOS Safari, Android browser

+

Dependency: jQuery 1.7+

+
+

Read the docs or view project on Github

+
+ +
+ + +
+

Featured on The Treehouse Show

+

Made by Amsul

+
+ + + + + + + + + + + + + diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/NAMING b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/NAMING new file mode 100644 index 0000000..25f31b4 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/NAMING @@ -0,0 +1,8 @@ +The naming convention for translation files: + + pickadate.LANGUAGE_COUNTRY.js + +Where: + + LANGUAGE = The lowercase ISO 639-1 language code. See http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes + COUNTRY = The uppercase ISO 3166-1 country code. See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.bg_BG.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.bg_BG.js new file mode 100644 index 0000000..7598b26 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.bg_BG.js @@ -0,0 +1,13 @@ +// Bulgarian + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'януари','февруари','март','април','май','юни','юли','август','септември','октомври','ноември','декември' ], + monthsShort: [ 'янр','фев','мар','апр','май','юни','юли','авг','сеп','окт','ное','дек' ], + weekdaysFull: [ 'неделя', 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота' ], + weekdaysShort: [ 'нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'днес', + clear: 'изтривам', + firstDay: 1, + format: 'd mmmm yyyy г.', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.bs_BA.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.bs_BA.js new file mode 100644 index 0000000..165cf79 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.bs_BA.js @@ -0,0 +1,13 @@ +// Bosnian + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'januar', 'februar', 'mart', 'april', 'maj', 'juni', 'juli', 'august', 'septembar', 'oktobar', 'novembar', 'decembar' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'cetvrtak', 'petak', 'subota' ], + weekdaysShort: [ 'ne', 'po', 'ut', 'sr', 'če', 'pe', 'su' ], + today: 'danas', + clear: 'izbrisati', + firstDay: 1, + format: 'dd. mmmm yyyy.', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.ca_ES.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.ca_ES.js new file mode 100644 index 0000000..b0902f0 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.ca_ES.js @@ -0,0 +1,13 @@ +// Catalan + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'Gener', 'Febrer', 'Març', 'Abril', 'Maig', 'juny', 'Juliol', 'Agost', 'Setembre', 'Octubre', 'Novembre', 'Desembre' ], + monthsShort: [ 'Gen', 'Feb', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Oct', 'Nov', 'Des' ], + weekdaysFull: [ 'diumenge', 'dilluns', 'dimarts', 'dimecres', 'dijous', 'divendres', 'dissabte' ], + weekdaysShort: [ 'diu', 'dil', 'dim', 'dmc', 'dij', 'div', 'dis' ], + today: 'avui', + clear: 'esborrar', + firstDay: 1, + format: 'dddd d de mmmm de yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.cs_CZ.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.cs_CZ.js new file mode 100644 index 0000000..f519a93 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.cs_CZ.js @@ -0,0 +1,13 @@ +// Czech + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec' ], + monthsShort: [ 'led', 'úno', 'bře', 'dub', 'kvě', 'čer', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro' ], + weekdaysFull: [ 'neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota' ], + weekdaysShort: [ 'ne', 'po', 'út', 'st', 'čt', 'pá', 'so' ], + today: 'dnes', + clear: 'vymazat', + firstDay: 1, + format: 'd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.da_DK.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.da_DK.js new file mode 100644 index 0000000..3fc74af --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.da_DK.js @@ -0,0 +1,13 @@ +// Danish + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag' ], + weekdaysShort: [ 'søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør' ], + today: 'i dag', + clear: 'slet', + firstDay: 1, + format: 'd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.de_DE.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.de_DE.js new file mode 100644 index 0000000..d52a86a --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.de_DE.js @@ -0,0 +1,13 @@ +// German + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ], + monthsShort: [ 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez' ], + weekdaysFull: [ 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ], + weekdaysShort: [ 'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ], + today: 'Heute', + clear: 'Löschen', + firstDay: 1, + format: 'dddd, dd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.el_GR.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.el_GR.js new file mode 100644 index 0000000..329c014 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.el_GR.js @@ -0,0 +1,13 @@ +// Greek + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος' ], + monthsShort: [ 'Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαι', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ' ], + weekdaysFull: [ 'Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο' ], + weekdaysShort: [ 'Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ' ], + today: 'σήμερα', + clear: 'Διαγραφή', + firstDay: 1, + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.es_ES.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.es_ES.js new file mode 100644 index 0000000..1c3cc2a --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.es_ES.js @@ -0,0 +1,13 @@ +// Spanish + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre' ], + monthsShort: [ 'Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic' ], + weekdaysFull: [ 'domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sab' ], + today: 'hoy', + clear: 'borrar', + firstDay: 1, + format: 'dddd d de mmmm de yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.et_EE.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.et_EE.js new file mode 100644 index 0000000..fee62be --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.et_EE.js @@ -0,0 +1,13 @@ +// Estonian + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'jaanuar', 'veebruar', 'märts', 'aprill', 'mai', 'juuni', 'juuli', 'august', 'september', 'oktoober', 'november', 'detsember' ], + monthsShort: [ 'jaan', 'veebr', 'märts', 'apr', 'mai', 'juuni', 'juuli', 'aug', 'sept', 'okt', 'nov', 'dets' ], + weekdaysFull: [ 'pühapäev', 'esmaspäev', 'teisipäev', 'kolmapäev', 'neljapäev', 'reede', 'laupäev' ], + weekdaysShort: [ 'püh', 'esm', 'tei', 'kol', 'nel', 'ree', 'lau' ], + today: 'täna', + clear: 'kustutama', + firstDay: 1, + format: 'd. mmmm yyyy. a', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.eu_ES.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.eu_ES.js new file mode 100644 index 0000000..1877ead --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.eu_ES.js @@ -0,0 +1,13 @@ +// Basque + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'urtarrila', 'otsaila', 'martxoa', 'apirila', 'maiatza', 'ekaina', 'uztaila', 'abuztua', 'iraila', 'urria', 'azaroa', 'abendua' ], + monthsShort: [ 'urt', 'ots', 'mar', 'api', 'mai', 'eka', 'uzt', 'abu', 'ira', 'urr', 'aza', 'abe' ], + weekdaysFull: [ 'igandea', 'astelehena', 'asteartea', 'asteazkena', 'osteguna', 'ostirala', 'larunbata' ], + weekdaysShort: [ 'ig.', 'al.', 'ar.', 'az.', 'og.', 'or.', 'lr.' ], + today: 'gaur', + clear: 'garbitu', + firstDay: 1, + format: 'dddd, yyyy(e)ko mmmmren da', + formatSubmit: 'yyyy/mm/dd' +}) diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.fi_FI.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.fi_FI.js new file mode 100644 index 0000000..7c01fb1 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.fi_FI.js @@ -0,0 +1,13 @@ +// Finnish + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'tammikuu', 'helmikuu', 'maaliskuu', 'huhtikuu', 'toukokuu', 'kesäkuu', 'heinäkuu', 'elokuu', 'syyskuu', 'lokakuu', 'marraskuu', 'joulukuu' ], + monthsShort: [ 'tammi', 'helmi', 'maalis', 'huhti', 'touko', 'kesä', 'heinä', 'elo', 'syys', 'loka', 'marras', 'joulu' ], + weekdaysFull: [ 'sunnuntai', 'maanantai', 'tiistai', 'keskiviikko', 'torstai', 'perjantai', 'lauantai' ], + weekdaysShort: [ 'su', 'ma', 'ti', 'ke', 'to', 'pe', 'la' ], + today: 'tänään', + clear: 'tyhjennä', + firstDay: 1, + format: 'd.m.yyyy', + formatSubmit: 'yyyy/mm/dd' +}) diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.fr_FR.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.fr_FR.js new file mode 100644 index 0000000..74355bf --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.fr_FR.js @@ -0,0 +1,13 @@ +// French + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre' ], + monthsShort: [ 'jan', 'fev', 'mar', 'avr', 'mai', 'juin', 'juil', 'aou', 'sep', 'oct', 'nov', 'dec' ], + weekdaysFull: [ 'dimanche', 'lundi', 'mardy', 'mercredi', 'jeudi', 'vendredi', 'samedi' ], + weekdaysShort: [ 'dim', 'lun', 'mar', 'mer', 'jeu', 'ven', 'sam' ], + today: 'aujourd\'hui', + clear: 'effacer', + firstDay: 1, + format: 'dd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.he_IL.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.he_IL.js new file mode 100644 index 0000000..78ea831 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.he_IL.js @@ -0,0 +1,12 @@ +// Hebrew + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר' ], + monthsShort: [ 'ינו', 'פבר', 'מרץ', 'אפר', 'מאי', 'יונ', 'יול', 'אוג', 'ספט', 'אוק', 'נוב', 'דצמ' ], + weekdaysFull: [ 'יום ראשון', 'יום שני', 'יום שלישי', 'יום רביעי', 'יום חמישי', 'יום ששי', 'יום שבת' ], + weekdaysShort: [ 'א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ש' ], + today: 'היום', + clear: 'למחוק', + format: 'yyyy mmmmב d dddd', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.hr_HR.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.hr_HR.js new file mode 100644 index 0000000..b6e972a --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.hr_HR.js @@ -0,0 +1,13 @@ +// Croatian + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'sijećanj', 'veljača', 'ožujak', 'travanj', 'svibanj', 'lipanj', 'srpanj', 'kolovoz', 'rujan', 'listopad', 'studeni', 'prosinac' ], + monthsShort: [ 'sij', 'velj', 'ožu', 'tra', 'svi', 'lip', 'srp', 'kol', 'ruj', 'lis', 'stu', 'pro' ], + weekdaysFull: [ 'nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota' ], + weekdaysShort: [ 'ned', 'pon', 'uto', 'sri', 'čet', 'pet', 'sub' ], + today: 'danas', + clear: 'izbrisati', + firstDay: 1, + format: 'd. mmmm yyyy.', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.hu_HU.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.hu_HU.js new file mode 100644 index 0000000..b4c22cc --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.hu_HU.js @@ -0,0 +1,13 @@ +// Hungarian + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'január', 'február', 'március', 'aprilis', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december' ], + monthsShort: [ 'jan', 'febr', 'márc', 'apr', 'máj', 'jún', 'júl', 'aug', 'szept', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'vasámap', 'hétfö', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat' ], + weekdaysShort: [ 'V', 'H', 'K', 'SZ', 'CS', 'P', 'SZ' ], + today: 'ma', + clear: 'töröl', + firstDay: 1, + format: 'yyyy. mmmm dd.', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.id_ID.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.id_ID.js new file mode 100644 index 0000000..5615dd6 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.id_ID.js @@ -0,0 +1,13 @@ +// Indonesian + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember' ], + monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des' ], + weekdaysFull: [ 'Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu' ], + weekdaysShort: [ 'Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab' ], + today: 'hari ini', + clear: 'menghapus', + firstDay: 1, + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.it_IT.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.it_IT.js new file mode 100644 index 0000000..3bcb7d4 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.it_IT.js @@ -0,0 +1,13 @@ +// Italian + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre' ], + monthsShort: [ 'gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic' ], + weekdaysFull: [ 'domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab' ], + today: 'oggi', + clear: 'cancellare', + firstDay: 1, + format: 'dddd d mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.nl_NL.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.nl_NL.js new file mode 100644 index 0000000..72c4078 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.nl_NL.js @@ -0,0 +1,13 @@ +// Dutch + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'maa', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag' ], + weekdaysShort: [ 'zo', 'ma', 'di', 'wo', 'do', 'vr', 'za' ], + today: 'vandaag', + clear: 'verwijderen', + firstDay: 1, + format: 'dddd d mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.no_NO.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.no_NO.js new file mode 100644 index 0000000..323e71d --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.no_NO.js @@ -0,0 +1,13 @@ +// Norwegian + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'janaur', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des' ], + weekdaysFull: [ 'søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag' ], + weekdaysShort: [ 'søn','man','tir', 'ons', 'tor', 'fre', 'lør' ], + today: 'i dag', + clear: 'slette', + firstDay: 1, + format: 'dd. mmm. yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.pl_PL.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.pl_PL.js new file mode 100644 index 0000000..cfea468 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.pl_PL.js @@ -0,0 +1,13 @@ +// Polish + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień' ], + monthsShort: [ 'sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru' ], + weekdaysFull: [ 'niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piąąek', 'sobota' ], + weekdaysShort: [ 'N', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So' ], + today: 'dzisiaj', + clear: 'usunąć', + firstDay: 1, + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.pt_BR.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.pt_BR.js new file mode 100644 index 0000000..1d36b70 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.pt_BR.js @@ -0,0 +1,12 @@ +// Brazilian Portuguese + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro' ], + monthsShort: [ 'jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez' ], + weekdaysFull: [ 'domingo', 'segunda-feira', 'terça-feira', 'quarta-feira', 'quinta-feira', 'sexta-feira', 'sábado' ], + weekdaysShort: [ 'dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sab' ], + today: 'hoje', + clear: 'excluir', + format: 'dddd, d de mmmm de yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.pt_PT.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.pt_PT.js new file mode 100644 index 0000000..827e521 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.pt_PT.js @@ -0,0 +1,12 @@ +// Portuguese + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro' ], + monthsShort: [ 'jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez' ], + weekdaysFull: [ 'domingo', 'segunda', 'terça', 'quarta', 'quinta', 'sexta', 'sábado' ], + weekdaysShort: [ 'dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sab' ], + today: 'hoje', + clear: 'excluir', + format: 'd de mmmm de yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.ro_RO.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.ro_RO.js new file mode 100644 index 0000000..3619298 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.ro_RO.js @@ -0,0 +1,13 @@ +// Romanian + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie', 'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie' ], + monthsShort: [ 'ian', 'feb', 'mar', 'apr', 'mai', 'iun', 'iul', 'aug', 'sep', 'oct', 'noi', 'dec' ], + weekdaysFull: [ 'duminică', 'luni', 'marţi', 'miercuri', 'joi', 'vineri', 'sâmbătă' ], + weekdaysShort: [ 'D', 'L', 'Ma', 'Mi', 'J', 'V', 'S' ], + today: 'azi', + clear: 'șterge', + firstDay: 1, + format: 'dd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.ru_RU.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.ru_RU.js new file mode 100644 index 0000000..a19c943 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.ru_RU.js @@ -0,0 +1,13 @@ +// Russian + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'Января', 'Февраля', 'Марта', 'Апреля', 'Мая', 'Июня', 'Июля', 'Августа', 'Сентября', 'Октября', 'Ноября', 'Декабря' ], + monthsShort: [ 'Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек' ], + weekdaysFull: [ 'воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота' ], + weekdaysShort: [ 'вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'сегодня', + clear: 'удалить', + firstDay: 1, + format: 'd mmmm yyyy г.', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.sk_SK.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.sk_SK.js new file mode 100644 index 0000000..e4cefbf --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.sk_SK.js @@ -0,0 +1,13 @@ +// Slovak + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december' ], + monthsShort: [ 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII' ], + weekdaysFull: [ 'nedeļľa', 'pondelok', 'utorok', 'streda', 'š̌švrtok', 'piatok', 'sobota' ], + weekdaysShort: [ 'Ne', 'Po', 'Ut', 'St', 'Št', 'Pi', 'So' ], + today: 'dnes', + clear: 'vymazať', + firstDay: 1, + format: 'd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.sv_SE.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.sv_SE.js new file mode 100644 index 0000000..921780b --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.sv_SE.js @@ -0,0 +1,13 @@ +// Swedish + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag' ], + weekdaysShort: [ 'sön', 'mån', 'tis', 'ons', 'tor', 'fre', 'lör' ], + today: 'idag', + clear: 'rensa', + firstDay: 1, + format: 'd mmmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.th_TH.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.th_TH.js new file mode 100644 index 0000000..aae27ef --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.th_TH.js @@ -0,0 +1,12 @@ +// Thai + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม' ], + monthsShort: [ 'ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.' ], + weekdaysFull: [ 'อาทติย', 'จันทร', 'องัคาร', 'พุธ', 'พฤหสั บดี', 'ศกุร', 'เสาร' ], + weekdaysShort: [ 'อ.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.' ], + today: 'วันนี้', + clear: 'ลบ', + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.tr_TR.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.tr_TR.js new file mode 100644 index 0000000..a82ba1e --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.tr_TR.js @@ -0,0 +1,13 @@ +// Turkish + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık' ], + monthsShort: [ 'Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara' ], + weekdaysFull: [ 'Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi' ], + weekdaysShort: [ 'Pzr', 'Pzt', 'Sal', 'Çrş', 'Prş', 'Cum', 'Cmt' ], + today: 'bugün', + clear: 'sil', + firstDay: 1, + format: 'dd mmmm yyyy dddd', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.uk_UA.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.uk_UA.js new file mode 100644 index 0000000..b67c944 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.uk_UA.js @@ -0,0 +1,13 @@ +// Ukrainian + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'січень', 'лютий', 'березень', 'квітень', 'травень', 'червень', 'липень', 'серпень', 'вересень', 'жовтень', 'листопад', 'грудень' ], + monthsShort: [ 'січ', 'лют', 'бер', 'кві', 'тра', 'чер', 'лип', 'сер', 'вер', 'жов', 'лис', 'гру' ], + weekdaysFull: [ 'неділя', 'понеділок', 'вівторок', 'середа', 'четвер', 'п‘ятниця', 'субота' ], + weekdaysShort: [ 'нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'сьогодні', + clear: 'викреслити', + firstDay: 1, + format: 'dd mmmm yyyy p.', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.zh_CN.js b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.zh_CN.js new file mode 100644 index 0000000..7ceeaa3 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/pickadate.js/translations/pickadate.zh_CN.js @@ -0,0 +1,13 @@ +// Simplified Chinese + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月' ], + monthsShort: [ '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二' ], + weekdaysFull: [ '星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六' ], + weekdaysShort: [ '日', '一', '二', '三', '四', '五', '六' ], + today: '今日', + clear: '删', + firstDay: 1, + format: 'yyyy 年 mm 月 dd 日', + formatSubmit: 'yyyy/mm/dd' +}) \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/source/pickadate.js b/js/pickadate.js-3.5.3/v2-(deprecated)/source/pickadate.js new file mode 100644 index 0000000..5433c89 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/source/pickadate.js @@ -0,0 +1,1670 @@ +/*! + * pickadate.js v2.1.8 - 25 March, 2013 + * By Amsul (http://amsul.ca) + * Hosted on https://github.com/amsul/pickadate.js + * Licensed under MIT ("expat" flavour) license. + */ + +/*jshint + debug: true, + devel: true, + browser: true, + asi: true, + unused: true, + eqnull: true + */ + + + +;(function( $, document, undefined ) { + + 'use strict'; + + + + var + + // Globals & constants + DAYS_IN_WEEK = 7, + WEEKS_IN_CALENDAR = 6, + DAYS_IN_CALENDAR = WEEKS_IN_CALENDAR * DAYS_IN_WEEK, + + STRING_DIV = 'div', + STRING_PREFIX_DATEPICKER = 'pickadate__', + + isIE = navigator.userAgent.match( /MSIE/ ), + + $document = $( document ), + + $body = $( document.body ), + + + /** + * The picker constructor that accepts the + * jQuery element and the merged settings + */ + Picker = function( $ELEMENT, SETTINGS ) { + + var + // Pseudo picker constructor + Picker = function() {}, + + + // The picker prototype + P = Picker.prototype = { + + constructor: Picker, + + $node: $ELEMENT, + + /** + * Initialize everything + */ + init: function() { + + + // Bind all the events to the element, + // and then insert everything after it + $ELEMENT.on({ + 'focus click': function() { + + // If it's not IE or it is IE and the calendar is not + // being force closed, then open the calendar + if ( !isIE || ( isIE && !CALENDAR._IE ) ) { + P.open() + } + + // Add the focused state to the holder + $HOLDER.addClass( CLASSES.focused ) + + // Then flip the IE force close to false + CALENDAR._IE = 0 + }, + blur: function() { + $HOLDER.removeClass( CLASSES.focused ) + }, + change: function() { + + // If there's a hidden input, update the value with formatting or clear it + if ( ELEMENT_HIDDEN ) { + ELEMENT_HIDDEN.value = ELEMENT.value ? getDateFormatted( SETTINGS.formatSubmit ) : '' + } + }, + keydown: function( event ) { + + var + // Grab the keycode + keycode = event.keyCode, + + // Check if one of the delete keys was pressed + isKeycodeDelete = keycode == 8 || keycode == 46 + + // If backspace was pressed or the calendar is closed and the keycode + // warrants a date change, prevent it from going any further. + if ( isKeycodeDelete || !CALENDAR.isOpen && KEYCODE_TO_DATE[ keycode ] ) { + + // Prevent it from moving the page + event.preventDefault() + + // Prevent it from propagating to document + eventPreventPropagation( event ) + + // If backspace was pressed, clear the values and close the picker + if ( isKeycodeDelete ) { + P.clear().close() + } + + // Otherwise open the calendar + else { + P.open() + } + } + } + }).after( [ $HOLDER, ELEMENT_HIDDEN ] ) + + + // If the element has autofocus, open the calendar + if ( ELEMENT.autofocus ) { + P.open() + } + + + // Update the calendar items + CALENDAR.items = getUpdatedCalendarItems() + + + // Trigger the `onStart` method within scope of the picker + triggerFunction( SETTINGS.onStart, P ) + + // Trigger the `onRender` method within scope of the picker + triggerFunction( SETTINGS.onRender, P ) + + return P + }, //init + + + /** + * Open the calendar + */ + open: function() { + + // If it's already open, do nothing + if ( CALENDAR.isOpen ) return P + + + // Set calendar as open + CALENDAR.isOpen = 1 + + + // Toggle the tabindex of "focusable" calendar items + toggleCalendarElements( 0 ) + + + // Make sure the element has focus and then + // add the "active" class to the element + $ELEMENT.focus().addClass( CLASSES.inputActive ) + + // Add the "opened" class to the calendar holder + $HOLDER.addClass( CLASSES.opened ) + + // Add the "active" class to the body + $body.addClass( CLASSES.bodyActive ) + + + // Bind all the events to the document + // while namespacing it with the calendar ID + $document.on( 'focusin.P' + CALENDAR.id, function( event ) { + + // If the target is not within the holder, + // and is not the element, then close the picker + if ( !$HOLDER.find( event.target ).length && event.target != ELEMENT ) P.close() + + }).on( 'click.P' + CALENDAR.id, function( event ) { + + // If the target of the click is not the element, + // then close the calendar picker + // * We don't worry about clicks on the holder + // because those are stopped from bubbling to the doc + if ( event.target != ELEMENT ) P.close() + + }).on( 'keydown.P' + CALENDAR.id, function( event ) { + + var + // Get the keycode + keycode = event.keyCode, + + // Translate that to a date change + keycodeToDate = KEYCODE_TO_DATE[ keycode ] + + + // On escape, focus back onto the element and close the picker + if ( keycode == 27 ) { + ELEMENT.focus() + P.close() + } + + + // If the target is the element and there's a keycode to date + // translation or the enter key was pressed + else if ( event.target == ELEMENT && ( keycodeToDate || keycode == 13 ) ) { + + // Prevent the default action to stop it from moving the page + event.preventDefault() + + // If the keycode translates to a date change, superficially select + // the date by incrementally (by date change) creating new validated dates. + // * Truthy second argument makes it a superficial selection + if ( keycodeToDate ) { + setDateSelected( createValidatedDate( [ MONTH_FOCUSED.YEAR, MONTH_FOCUSED.MONTH, DATE_HIGHLIGHTED.DATE + keycodeToDate ], keycodeToDate ), 1 ) + } + + // Otherwise it's the enter key so set the element value as the + // highlighted date, render a new calendar, and then close it + else { + setElementsValue( DATE_HIGHLIGHTED ) + calendarRender() + P.close() + } + + } //if ELEMENT + }) + + + // Trigger the onOpen method within scope of the picker + triggerFunction( SETTINGS.onOpen, P ) + + return P + }, //open + + + /** + * Close the calendar + */ + close: function() { + + // If it's already closed, do nothing + if ( !CALENDAR.isOpen ) return P + + + // Set calendar as closed + CALENDAR.isOpen = 0 + + + // Toggle the tabindex of "focusable" calendar items + toggleCalendarElements( -1 ) + + + // Remove the "active" class from the element + $ELEMENT.removeClass( CLASSES.inputActive ) + + // Remove the "opened" class from the calendar holder + $HOLDER.removeClass( CLASSES.opened ) + + // Remove the "active" class from the body + $body.removeClass( CLASSES.bodyActive ) + + + // Unbind the Picker events from the document + $document.off( '.P' + CALENDAR.id ) + + + // Trigger the onClose method within scope of the picker + triggerFunction( SETTINGS.onClose, P ) + + return P + }, //close + + + /** + * Return whether the calendar is open + */ + isOpen: function() { + return CALENDAR.isOpen === 1; + }, //isOpen + + + /** + * Show a month in focus with 0index compensation + */ + show: function( month, year ) { + showMonth( --month, year ) + return P + }, //show + + + /** + * Clear the value of the input elements + */ + clear: function() { + + // Clear the elements value + setElementsValue( 0 ) + + // Render a new calendar + calendarRender() + + return P + }, //clear + + + /** + * Get the selected date in any format. + */ + getDate: function( format ) { + + // If the format is a literal true, return the underlying JS Date object. + // If the element has no value, just return an empty string. + // Otherwise return the formatted date. + return format === true ? DATE_SELECTED.OBJ : !ELEMENT.value ? '' : getDateFormatted( format ) + }, //getDate + + + /** + * Set the date with month 0index compensation + * and an option to do a superficial selection + */ + setDate: function( year, month, date, isSuperficial ) { + setDateSelected( createValidatedDate([ year, --month, date ]), isSuperficial ) + return P + }, //setDate + + + /** + * Get the min or max date based on `upper` being truthy or falsey + */ + getDateLimit: function( upper, format ) { + return getDateFormatted( format, upper ? DATE_MAX : DATE_MIN ) + }, //getDateLimit + + + /** + * Set the min or max date based on `upper` being truthy or falsey. + */ + setDateLimit: function( limit, upper ) { + + // If it's the upper limit + if ( upper ) { + + // Set the max date + DATE_MAX = createBoundaryDate( limit, upper ) + + // If focused month is more than max date set it to max date + if ( MONTH_FOCUSED.TIME > DATE_MAX.TIME ) { + MONTH_FOCUSED = DATE_MAX + } + } + + // Otherwise it's the lower limit + else { + + // So set the min date + DATE_MIN = createBoundaryDate( limit ) + + // If focused month is less than min date set it to min date + if ( MONTH_FOCUSED.TIME < DATE_MIN.TIME ) { + MONTH_FOCUSED = DATE_MIN + } + } + + // Render a new calendar + calendarRender() + + return P + } //setDateLimit + }, //Picker.prototype + + + // The element node + ELEMENT = (function( element ) { + + // Confirm the focus state, convert the element into + // a regular text input to remove user-agent stylings, + // and then set it as readonly to prevent keyboard popup + element.autofocus = ( element == document.activeElement ) + element.type = 'text' + element.readOnly = true + return element + })( $ELEMENT[ 0 ] ), //ELEMENT + + + // The calendar object + CALENDAR = { + id: ~~( Math.random() * 1e9 ) + }, //CALENDAR + + + // The classes + CLASSES = SETTINGS.klass, + + + // The date in various formats + DATE_FORMATS = (function() { + + // Get the length of the first word + function getFirstWordLength( string ) { + return string.match( /\w+/ )[ 0 ].length + } + + // If the second character is a digit, length is 2 otherwise 1. + function getDigitsLength( string ) { + return ( /\d/ ).test( string[ 1 ] ) ? 2 : 1 + } + + // Get the length of the month from a string + function getMonthLength( string, dateObj, collection ) { + + // Grab the first word + var word = string.match( /\w+/ )[ 0 ] + + // If there's no index for the date object's month, + // find it in the relevant months collection and add 1 + // because we subtract 1 when we create the date object + if ( !dateObj.mm && !dateObj.m ) { + dateObj.m = collection.indexOf( word ) + 1 + } + + // Return the length of the word + return word.length + } + + + // Return the date formats object + return { + d: function( string ) { + + // If there's string, then get the digits length. + // Otherwise return the selected date. + return string ? getDigitsLength( string ) : this.DATE + }, + dd: function( string ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected date with a leading zero. + return string ? 2 : leadZero( this.DATE ) + }, + ddd: function( string ) { + + // If there's a string, then get the length of the first word. + // Otherwise return the short selected weekday. + return string ? getFirstWordLength( string ) : SETTINGS.weekdaysShort[ this.DAY ] + }, + dddd: function( string ) { + + // If there's a string, then get the length of the first word. + // Otherwise return the full selected weekday. + return string ? getFirstWordLength( string ) : SETTINGS.weekdaysFull[ this.DAY ] + }, + m: function( string ) { + + // If there's a string, then get the length of the digits + // Otherwise return the selected month with 0index compensation. + return string ? getDigitsLength( string ) : this.MONTH + 1 + }, + mm: function( string ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected month with 0index and leading zero. + return string ? 2 : leadZero( this.MONTH + 1 ) + }, + mmm: function( string, dateObject ) { + + var collection = SETTINGS.monthsShort + + // If there's a string, get length of the relevant month string + // from the short months collection. Otherwise return the + // selected month from that collection. + return string ? getMonthLength( string, dateObject, collection ) : collection[ this.MONTH ] + }, + mmmm: function( string, dateObject ) { + + var collection = SETTINGS.monthsFull + + // If there's a string, get length of the relevant month string + // from the full months collection. Otherwise return the + // selected month from that collection. + return string ? getMonthLength( string, dateObject, collection ) : collection[ this.MONTH ] + }, + yy: function( string ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected year by slicing out the first 2 digits. + return string ? 2 : ( '' + this.YEAR ).slice( 2 ) + }, + yyyy: function( string ) { + + // If there's a string, then the length is always 4. + // Otherwise return the selected year. + return string ? 4 : this.YEAR + }, + + // Create an array by splitting the format passed + toArray: function( format ) { return format.split( /(?=\b)(d{1,4}|m{1,4}|y{4}|yy)+(\b)/g ) } + + } //endreturn + })(), //DATE_FORMATS + + + // Create calendar object for today + DATE_TODAY = createDate(), + + + // Create the min date + DATE_MIN = createBoundaryDate( SETTINGS.dateMin ), + + + // Create the max date + // * A truthy second argument creates max date + DATE_MAX = createBoundaryDate( SETTINGS.dateMax, 1 ), + + + // Create a pseudo min and max date for disabled + // calendars as the respective opposite limit + PSEUDO_DATE_MIN = DATE_MAX, + PSEUDO_DATE_MAX = DATE_MIN, + + + // Create a collection of dates to disable + DATES_TO_DISABLE = (function( datesCollection ) { + + // If a collection was passed, we need to create calendar date objects + if ( Array.isArray( datesCollection ) ) { + + // If the "all" flag is true, remove the flag from the collection + // and flip the condition of which dates to disable + if ( datesCollection[ 0 ] === true ) { + CALENDAR.off = datesCollection.shift() + } + + // Map through the dates passed and return the collection + return datesCollection.map( function( date ) { + + // If the date is a number, we need to disable weekdays + if ( !isNaN( date ) ) { + + // So flip the "off days" boolean + CALENDAR.offDays = 1 + + // If the first day flag is truthy, we maintain the + // 0index of the date by getting the remainder from 7. + // Otherwise return the date with 0index compensation. + return SETTINGS.firstDay ? date % DAYS_IN_WEEK : --date + } + + // Otherwise assume it's an array and fix the month 0index + --date[ 1 ] + + // Then create and return the date, + // replacing it in the collection + return createDate( date ) + }) + } + })( SETTINGS.datesDisabled ), //DATES_TO_DISABLE + + + // Create a function that will filter through the dates + // and return true if looped date is to be disabled + DISABLED_DATES = (function() { + + // Check if the looped date should be disabled + // based on the time being the same as a disabled date + // or the day index being within the collection + var isDisabledDate = function( date ) { + return this.TIME == date.TIME || DATES_TO_DISABLE.indexOf( this.DAY ) > -1 + } + + + // If all calendar dates should be disabled + if ( CALENDAR.off ) { + + // Map through all the dates to disable + DATES_TO_DISABLE.map( function( loopDate ) { + + // If the looped date is less than the latest lowest date + // and greater than the minimum date, then set it as the lowest date + if ( loopDate.TIME < PSEUDO_DATE_MIN.TIME && loopDate.TIME > DATE_MIN.TIME ) { + PSEUDO_DATE_MIN = loopDate + } + + // If the looped date is more than the latest highest date + // and less than the maximum date, then set it as the highest date + if ( loopDate.TIME > PSEUDO_DATE_MAX.TIME && loopDate.TIME <= DATE_MAX.TIME ) { + PSEUDO_DATE_MAX = loopDate + } + }) + + // Finally, return a function that maps each date + // in the collection of dates to not disable. + return function( date, i, collection ) { + + // Map the array of disabled dates and check if this is not one + return ( collection.map( isDisabledDate, this ).indexOf( true ) < 0 ) + } + } + + + // Otherwise just return the function that checks if a date is disabled + return isDisabledDate + })(), //DISABLED_DATES + + + // Create calendar object for the highlighted day + DATE_HIGHLIGHTED = (function( dateDataValue, dateEntered ) { + + // If there a date `data-value` + if ( dateDataValue ) { + + // Set the date entered to an empty object + dateEntered = {} + + // Map through the submit format array + DATE_FORMATS.toArray( SETTINGS.formatSubmit ).map( function( formatItem ) { + + // If the formatting length function exists, invoke it + // with the `data-value` and the date we are creating. + // Otherwise it's the length of the formatting item being mapped + var formattingLength = DATE_FORMATS[ formatItem ] ? DATE_FORMATS[ formatItem ]( dateDataValue, dateEntered ) : formatItem.length + + // If the formatting length function exists, slice up + // the value and pass it into the date we're creating. + if ( DATE_FORMATS[ formatItem ] ) { + dateEntered[ formatItem ] = dateDataValue.slice( 0, formattingLength ) + } + + // Update the remainder of the string by slicing away the format length + dateDataValue = dateDataValue.slice( formattingLength ) + }) + + // Finally, create an array with the date entered while + // parsing each item as an integer and compensating for 0index + dateEntered = [ +(dateEntered.yyyy || dateEntered.yy), +(dateEntered.mm || dateEntered.m) - 1, +(dateEntered.dd || dateEntered.d) ] + } + + + // Otherwise, try to natively parse the date in the input + else { + dateEntered = Date.parse( dateEntered ) + } + + + // If there's a valid date in the input or the dateEntered + // is now an array, create a validated date with it. + // Otherwise set the highlighted date to today after validating. + return createValidatedDate( dateEntered && ( !isNaN( dateEntered ) || Array.isArray( dateEntered ) ) ? dateEntered : DATE_TODAY ) + })( ELEMENT.getAttribute( 'data-value' ), ELEMENT.value ), + + + // The date selected is initially the date highlighted + DATE_SELECTED = DATE_HIGHLIGHTED, + + + // Month focused is based on highlighted date + MONTH_FOCUSED = DATE_HIGHLIGHTED, + + + // If there's a format for the hidden input element, create the element + // using the name of the original input plus suffix and update the value + // with whatever is entered in the input on load. Otherwise set it to null. + ELEMENT_HIDDEN = SETTINGS.formatSubmit ? $( '' ).val( ELEMENT.value ? getDateFormatted( SETTINGS.formatSubmit ) : '' )[ 0 ] : null, + + + // Create the calendar table head with weekday labels + // by "copying" the weekdays collection based on the settings. + // * We do a copy so we don't mutate the original array. + TABLE_HEAD = (function( weekdaysCollection ) { + + // If the first day should be Monday, then grab + // Sunday and push it to the end of the collection + if ( SETTINGS.firstDay ) { + weekdaysCollection.push( weekdaysCollection.splice( 0, 1 )[ 0 ] ) + } + + // Go through each day of the week and return a wrapped header row. + // Take the result and apply anoth table head wrapper to group it all. + return createNode( 'thead', + createNode( 'tr', + weekdaysCollection.map( function( weekday ) { + return createNode( 'th', weekday, CLASSES.weekdays ) + }) + ) + ) + })( ( SETTINGS.showWeekdaysShort ? SETTINGS.weekdaysShort : SETTINGS.weekdaysFull ).slice( 0 ) ), //TABLE_HEAD + + + // Create the calendar holder with a new wrapped calendar and bind the events + $HOLDER = $( createNode( STRING_DIV, createCalendarWrapped(), CLASSES.holder ) ).on( 'mousedown', function( event ) { + + // If the target of the event is not one of the calendar items, + // prevent default action to keep focus on the input element + if ( CALENDAR.items.indexOf( event.target ) < 0 ) { + event.preventDefault() + } + }).on( 'click', function( event ) { + + // If the calendar is closed and there appears to be no click, do nothing + // * This is done to prevent the "enter" key propagating as a click. + // On all browsers (except old IEs) the client click x & y are 0. + if ( !CALENDAR.isOpen && !event.clientX && !event.clientY ) { + return + } + + var + dateToSelect, + + // Get the jQuery target + $target = $( event.target ), + + // Get the target data + targetData = $target.data() + + + // Stop the event from bubbling to the document + eventPreventPropagation( event ) + + + // Put focus back onto the element + ELEMENT.focus() + + // For IE, set the calendar to force close + // * This needs to be after `ELEMENT.focus()` + CALENDAR._IE = 1 + + + // If a navigator button was clicked, + // show the month in the relative direction + if ( targetData.nav ) { + showMonth( MONTH_FOCUSED.MONTH + targetData.nav ) + } + + // If a clear button was clicked, + // clear the elements value and then close it + else if ( targetData.clear ) { + P.clear().close() + } + + // If a date was clicked + else if ( targetData.date ) { + + // Split the target data into an array + dateToSelect = targetData.date.split( '/' ) + + // Set the date and then close the calendar + P.setDate( +dateToSelect[ 0 ], +dateToSelect[ 1 ], +dateToSelect[ 2 ] ).close() + } + + // If the target is the holder, close the picker + else if ( $target[ 0 ] == $HOLDER[ 0 ] ) { + P.close() + } + }), // $HOLDER + + + // Translate a keycode to a relative change in date + KEYCODE_TO_DATE = { + + // Down + 40: 7, + + // Up + 38: -7, + + // Right + 39: 1, + + // Left + 37: -1 + } //KEYCODE_TO_DATE + + + + /** + * Create a bounding date allowed on the calendar + * * A truthy second argument creates the upper boundary + */ + function createBoundaryDate( limit, upper ) { + + // If the limit is set to true, just return today + if ( limit === true ) { + return DATE_TODAY + } + + // If the limit is an array, construct the date by fixing month 0index + if ( Array.isArray( limit ) ) { + --limit[ 1 ] + return createDate( limit ) + } + + // If there is a limit and its a number, create a + // calendar date relative to today by adding the limit + if ( limit && !isNaN( limit ) ) { + return createDate([ DATE_TODAY.YEAR, DATE_TODAY.MONTH, DATE_TODAY.DATE + limit ]) + } + + // Otherwise create an infinite date + return createDate( 0, upper ? Infinity : -Infinity ) + } //createBoundaryDate + + + /** + * Create a validated date + */ + function createValidatedDate( datePassed, direction, skipMonthCheck ) { + + + // If the date passed isn't a date, create one + datePassed = !datePassed.TIME ? createDate( datePassed ) : datePassed + + + // If the calendar "disabled" flag is truthy and there are only disabled weekdays + if ( CALENDAR.off && !CALENDAR.offDays ) { + + // If the date is less than the pseudo min date or greater than pseudo max date, + // set it as the pseudo date limit. Otherwise keep it the same. + datePassed = datePassed.TIME < PSEUDO_DATE_MIN.TIME ? PSEUDO_DATE_MIN : datePassed.TIME > PSEUDO_DATE_MAX.TIME ? PSEUDO_DATE_MAX : datePassed + } + + // Otherwise if there are disabled dates + else if ( DATES_TO_DISABLE ) { + + // Create a reference to the original date passed + var originalDate = datePassed + + // Check if this date is disabled. If it is, + // then keep adding the direction (or 1) to the date + // until we get to a date that's enabled. + while ( DATES_TO_DISABLE.filter( DISABLED_DATES, datePassed ).length ) { + + // Otherwise create the next date based on the direction + datePassed = createDate([ datePassed.YEAR, datePassed.MONTH, datePassed.DATE + ( direction || 1 ) ]) + + // Check if the month check should be skipped to avoid extra loops. + // Otherwise if we've gone through to another month, create a new + // date based on the direction being less than zero (rather than more). + // Then set this new date as the original and looped date. + if ( !skipMonthCheck && datePassed.MONTH != originalDate.MONTH ) { + originalDate = datePassed = createDate([ originalDate.YEAR, originalDate.MONTH, direction < 0 ? --originalDate.DATE : ++originalDate.DATE ]) + } + } + } + + + // If it's less that min date, set it to min date + // by creating a validated date by adding one + // until we find an enabled date + // * A truthy third argument skips the month check + if ( datePassed.TIME < DATE_MIN.TIME ) { + datePassed = createValidatedDate( DATE_MIN, 1, 1 ) + } + + + // If it's more than max date, set it to max date + // by creating a validated date by subtracting one + // until we find an enabled date + // * A truthy third argument skips the month check + else if ( datePassed.TIME > DATE_MAX.TIME ) { + datePassed = createValidatedDate( DATE_MAX, -1, 1 ) + } + + + // Finally, return the date + return datePassed + } //createValidatedDate + + + /** + * Create the nav for next/prev month + */ + function createMonthNav( next ) { + + // If the focused month is outside the range, return an empty string + if ( ( next && MONTH_FOCUSED.YEAR >= DATE_MAX.YEAR && MONTH_FOCUSED.MONTH >= DATE_MAX.MONTH ) || ( !next && MONTH_FOCUSED.YEAR <= DATE_MIN.YEAR && MONTH_FOCUSED.MONTH <= DATE_MIN.MONTH ) ) { + return '' + } + + // Otherwise, return the created month tag + var monthTag = 'month' + ( next ? 'Next' : 'Prev' ) + return createNode( STRING_DIV, SETTINGS[ monthTag ], CLASSES[ monthTag ], 'data-nav=' + ( next || -1 ) ) + } //createMonthNav + + + /** + * Create the month label + */ + function createMonthLabel( monthsCollection ) { + + + // If there's a need for a month selector + return SETTINGS.monthSelector ? + + // Create the dom string node for a select element + createNode( 'select', + + // Map through the months collection + monthsCollection.map( function( month, monthIndex ) { + + // Create a dom string node for each option + return createNode( 'option', + + // With the month and no classes + month, 0, + + // Set the value and selected index + 'value=' + monthIndex + ( MONTH_FOCUSED.MONTH == monthIndex ? ' selected' : '' ) + + + // Plus the disabled attribute if it's outside the range + getMonthInRange( monthIndex, MONTH_FOCUSED.YEAR, ' disabled', '' ) + ) + }), + + // The month selector class + CLASSES.selectMonth, + + // And some tabindex + getTabindexState() + + // Otherwise just return the month focused + ) : createNode( STRING_DIV, monthsCollection[ MONTH_FOCUSED.MONTH ], CLASSES.month ) + } //createMonthLabel + + + /** + * Create the year label + */ + function createYearLabel() { + + var + yearFocused = MONTH_FOCUSED.YEAR, + yearsInSelector = SETTINGS.yearSelector + + + // If there is a need for a years selector + // then create a dropdown within the valid range + if ( yearsInSelector ) { + + // If year selector setting is true, default to 5. + // Otherwise divide the years in selector in half + // to get half before and half after + yearsInSelector = yearsInSelector === true ? 5 : ~~( yearsInSelector / 2 ) + + var + // Create a collection to hold the years + yearsCollection = [], + + // The lowest year possible is the difference between + // the focused year and the number of years in the selector + lowestYear = yearFocused - yearsInSelector, + + // The first year is the lower of the two numbers: + // the lowest year or the minimum year. + firstYear = getNumberInRange( lowestYear, DATE_MIN.YEAR ), + + // The highest year is the sum of the focused year + // and the years in selector plus the left over years. + highestYear = yearFocused + yearsInSelector + ( firstYear - lowestYear ), + + // The last year is the higher of the two numbers: + // the highest year or the maximum year. + lastYear = getNumberInRange( highestYear, DATE_MAX.YEAR, 1 ) + + + // In case there are leftover years to put in the selector, + // we need to get the lower of the two numbers: + // the lowest year minus leftovers, or the minimum year + firstYear = getNumberInRange( lowestYear - ( highestYear - lastYear ), DATE_MIN.YEAR ) + + + // Add the years to the collection by looping through the range + for ( var index = 0; index <= lastYear - firstYear; index += 1 ) { + yearsCollection.push( firstYear + index ) + } + + + // Create the dom string node for a select element + return createNode( 'select', + + // Map through the years collection + yearsCollection.map( function( year ) { + + // Create a dom string node for each option + return createNode( 'option', + + // With the year and no classes + year, 0, + + // Set the value and selected index + 'value=' + year + ( yearFocused == year ? ' selected' : '' ) + ) + }), + + // The year selector class + CLASSES.selectYear, + + // And some tabindex + getTabindexState() + ) + } + + + // Otherwise just return the year focused + return createNode( STRING_DIV, yearFocused, CLASSES.year ) + } //createYearLabel + + + /** + * Create the calendar table body + */ + function createTableBody() { + + var + // The loop date object + loopDate, + + // A pseudo index will be the divider between + // the previous month and the focused month + pseudoIndex, + + // An array that will hold the classes + // and binding for each looped date + classAndBinding, + + // Collection of the dates visible on the calendar + // * This gets discarded at the end + calendarDates = [], + + // Weeks visible on the calendar + calendarWeeks = '', + + // Count the number of days in the focused month + // by getting the 0-th date of the next month + countMonthDays = createDate([ MONTH_FOCUSED.YEAR, MONTH_FOCUSED.MONTH + 1, 0 ]).DATE, + + // Count the days to shift the start of the month + // by getting the day the first of the month falls on + // and subtracting 1 to compensate for day 1index + // or 2 if "Monday" should be the first day. + countShiftby = createDate([ MONTH_FOCUSED.YEAR, MONTH_FOCUSED.MONTH, 1 ]).DAY + ( SETTINGS.firstDay ? -2 : -1 ) + + + // If the count to shift by is less than the first day + // of the month, then add a week. + countShiftby += countShiftby < -1 ? 7 : 0 + + + // Go through all the days in the calendar + // and map a calendar date + for ( var index = 0; index < DAYS_IN_CALENDAR; index += 1 ) { + + // Get the distance between the index and the count + // to shift by. This will serve as the separator + // between the previous, current, and next months. + pseudoIndex = index - countShiftby + + + // Create a calendar date with a negative or positive pseudoIndex + loopDate = createDate([ MONTH_FOCUSED.YEAR, MONTH_FOCUSED.MONTH, pseudoIndex ]) + + + // Set the date class and bindings on the looped date. + // If the pseudoIndex is greater than zero, + // and less or equal to the days in the month, + // we need dates from the focused month. + classAndBinding = createDateClassAndBinding( loopDate, ( pseudoIndex > 0 && pseudoIndex <= countMonthDays ) ) + + + // Create the looped date wrapper, + // and then create the table cell wrapper + // and finally pass it to the calendar array + calendarDates.push( createNode( 'td', createNode( STRING_DIV, loopDate.DATE, classAndBinding[ 0 ], classAndBinding[ 1 ] ) ) ) + + + // Check if it's the end of a week. + // * We add 1 for 0index compensation + if ( ( index % DAYS_IN_WEEK ) + 1 == DAYS_IN_WEEK ) { + + // Wrap the week and append it into the calendar weeks + calendarWeeks += createNode( 'tr', calendarDates.splice( 0, DAYS_IN_WEEK ) ) + } + + } //endfor + + + + // Join the dates and wrap the calendar body + return createNode( 'tbody', calendarWeeks, CLASSES.body ) + } //createTableBody + + + + /** + * Create the class and data binding for a looped date node. + * Returns an array with 2 items: + * 1) The classes string + * 2) The data binding string + */ + function createDateClassAndBinding( loopDate, isMonthFocused ) { + + var + // State check for date + isDateDisabled, + + // Create a collection for the classes + // with the default classes already included + klassCollection = [ + + // The generic day class + CLASSES.day, + + // The class for in or out of focus + ( isMonthFocused ? CLASSES.dayInfocus : CLASSES.dayOutfocus ) + ] + + + // If it's less than the minimum date or greater than the maximum date, + // or if there are dates to disable and this looped date is one of them, + // flip the "disabled" state to truthy and add the "disabled" class + if ( loopDate.TIME < DATE_MIN.TIME || loopDate.TIME > DATE_MAX.TIME || ( DATES_TO_DISABLE && DATES_TO_DISABLE.filter( DISABLED_DATES, loopDate ).length ) ) { + isDateDisabled = 1 + klassCollection.push( CLASSES.dayDisabled ) + } + + + // If it's today, add the class + if ( loopDate.TIME == DATE_TODAY.TIME ) { + klassCollection.push( CLASSES.dayToday ) + } + + + // If it's the highlighted date, add the class + if ( loopDate.TIME == DATE_HIGHLIGHTED.TIME ) { + klassCollection.push( CLASSES.dayHighlighted ) + } + + + // If it's the selected date, add the class + if ( loopDate.TIME == DATE_SELECTED.TIME ) { + klassCollection.push( CLASSES.daySelected ) + } + + + // Return an array with the classes and data binding + return [ + + // Return the classes joined + // by a single whitespace + klassCollection.join( ' ' ), + + // Create the data binding object + // with the value as a string + 'data-' + ( isDateDisabled ? 'disabled' : 'date' ) + '=' + [ + loopDate.YEAR, + loopDate.MONTH + 1, // add 1 to display an accurate date + loopDate.DATE + ].join( '/' ) + ] + } //createDateClassAndBinding + + + /** + * Create the "today" and "clear" buttons + */ + function createTodayAndClear() { + return createNode( 'button', SETTINGS.today, CLASSES.buttonToday, 'data-date=' + getDateFormatted( 'yyyy/mm/dd', DATE_TODAY ) + ' ' + getTabindexState() ) + createNode( 'button', SETTINGS.clear, CLASSES.buttonClear, 'data-clear=1 ' + getTabindexState() ) + } //createTodayAndClear + + + /** + * Create the wrapped calendar using the collection + * of all calendar items and a new table body + */ + function createCalendarWrapped() { + + // Create a calendar wrapper node + return createNode( STRING_DIV, + + // Create a calendar frame + createNode( STRING_DIV, + + // Create a calendar box node + createNode( STRING_DIV, + + // The calendar header + createNode( STRING_DIV, + + // The prev/next month tags + // * Truthy argument creates "next" tag + createMonthNav() + createMonthNav( 1 ) + + + // Create the month label + createMonthLabel( SETTINGS.showMonthsFull ? SETTINGS.monthsFull : SETTINGS.monthsShort ) + + + // Create the year label + createYearLabel(), + + // The header class + CLASSES.header + ) + + + // The calendar table with table head + // and a new calendar table body + createNode( 'table', [ TABLE_HEAD, createTableBody() ], CLASSES.table ) + + + // Create the "today" and "clear" buttons + createNode( STRING_DIV, createTodayAndClear(), CLASSES.footer ), + + // Calendar class + CLASSES.calendar + ), + + // Calendar wrap class + CLASSES.wrap + ), + + // Calendar frame class + CLASSES.frame + ) //endreturn + } //calendarWrapped + + + /** + * Get the number that's allowed within an upper or lower limit. + * * A truthy third argument tests against the upper limit. + */ + function getNumberInRange( number, limit, upper ) { + + // If we need to test against the upper limit + // and number is less than the limit, + // or we need to test against the lower limit + // and number is more than the limit, + // return the number. Otherwise return the limit. + return ( upper && number < limit ) || ( !upper && number > limit ) ? number : limit + } //getNumberInRange + + + /** + * Return a month by comparing with the date range. + * If outside the range, returns the "alternate" or "range" value. + * Otherwise returns the "in range" value or the month itself. + */ + function getMonthInRange( month, year, alternateValue, inRangeValue ) { + + // If the month is less than the min month, + // then return the alternate value or min month. + if ( year <= DATE_MIN.YEAR && month < DATE_MIN.MONTH ) { + return alternateValue || DATE_MIN.MONTH + } + + // If the month is more than the max month, + // then return the alternate value or max month. + if ( year >= DATE_MAX.YEAR && month > DATE_MAX.MONTH ) { + return alternateValue || DATE_MAX.MONTH + } + + // Otherwise return the "in range" value or the month itself. + // * We test `inRangeValue` against null because we need to + // test against null and undefined. 0 should be allowed. + return inRangeValue != null ? inRangeValue : month + } //getMonthInRange + + + /** + * Get the tabindex based on the calendar open/closed state + */ + function getTabindexState() { + return 'tabindex=' + ( CALENDAR.isOpen ? 0 : -1 ) + } + + + /** + * Get any date in any format. Defaults to getting + * the superficially selected date. + */ + function getDateFormatted( format, date ) { + + // Otherwise go through the date formats array and + // convert the format passed into an array to map + // which we join into a string at the end. + return DATE_FORMATS.toArray( format || SETTINGS.format ).map( function( value ) { + + // Trigger the date formats function + // or just return value itself. + return triggerFunction( DATE_FORMATS[ value ], date || DATE_SELECTED ) || value + }).join( '' ) + } //getDateFormatted + + + /** + * Set a date as selected or superficially selected + */ + function setDateSelected( dateTargeted, isSuperficial ) { + + // Set the target as the highlight + DATE_HIGHLIGHTED = dateTargeted + + // Set the target as the focus + MONTH_FOCUSED = dateTargeted + + // If it's not just a superficial selection, + // update the input elements values + if ( !isSuperficial ) { + setElementsValue( dateTargeted ) + } + + // Then render a new calendar + calendarRender() + } //setDateSelected + + + /** + * Set the date in the input element and trigger a change event + */ + function setElementsValue( dateTargeted ) { + + // If there's a date targeted, update the selected date + DATE_SELECTED = dateTargeted || DATE_SELECTED + + // Set the element value as the formatted date + // if there was a date targeted. Otherwise clear it. + // And then broadcast a change event. + $ELEMENT.val( dateTargeted ? getDateFormatted() : '' ).trigger( 'change' ) + + // Trigger the onSelect method within scope of the picker + triggerFunction( SETTINGS.onSelect, P ) + } //setElementsValue + + + /** + * Find something within the calendar holder + */ + function $findInHolder( klass ) { + return $HOLDER.find( '.' + klass ) + } //$findInHolder + + + /** + * Show the month visible on the calendar + */ + function showMonth( month, year ) { + + // Ensure we have a year to work with + year = year || MONTH_FOCUSED.YEAR + + // Get the month to be within + // the minimum and maximum date limits + month = getMonthInRange( month, year ) + + // Set the month to show in focus + // * We set the date to 1st of the month + // because date doesn't matter here + MONTH_FOCUSED = createDate([ year, month, 1 ]) + + // Then render a new calendar + calendarRender() + } //showMonth + + + /** + * Toggle the calendar elements as "tab-able" by mapping + * through the calendar items and updating the tabindex. + */ + function toggleCalendarElements( tabindex ) { + CALENDAR.items.map( function( item ) { + if ( item ) item.tabIndex = tabindex + }) + } //toggleCalendarElements + + + /** + * Get an updated collection of calendar items. + */ + function getUpdatedCalendarItems() { + + return [ + + // The month selector + $findInHolder( CLASSES.selectMonth ).on({ + + // *** For iOS *** + click: eventPreventPropagation, + + // Bind the change event + change: function() { + + // Show the month by floating the option selected + showMonth( +this.value ) + + // Find the new month selector and focus back on it + $findInHolder( CLASSES.selectMonth ).focus() + } + })[ 0 ], + + // The year selector + $findInHolder( CLASSES.selectYear ).on({ + + // *** For iOS *** + click: eventPreventPropagation, + + // Bind the change event + change: function() { + + // Show the year by floating the option selected and month in focus + showMonth( MONTH_FOCUSED.MONTH, +this.value ) + + // Find the new year selector and focus back on it + $findInHolder( CLASSES.selectYear ).focus() + } + })[ 0 ], + + // The "today" button + $findInHolder( CLASSES.buttonToday )[ 0 ], + + // The "clear" button + $findInHolder( CLASSES.buttonClear )[ 0 ] + ] + } //getUpdatedCalendarItems + + + /** + * Render a new calendar + */ + function calendarRender() { + + // Create a new wrapped calendar and place it within the holder + $HOLDER.html( createCalendarWrapped() ) + + // Update the calendar items + CALENDAR.items = getUpdatedCalendarItems() + + // Trigger the onRender method within scope of the picker + triggerFunction( SETTINGS.onRender, P ) + } //calendarRender + + + /** + * Prevent an event from propagating further + */ + function eventPreventPropagation( event ) { + event.stopPropagation() + } //eventPreventPropagation + + + // Return a new initialized picker + return new P.init() + } //Picker + + + + + + /** + * Helper functions + */ + + // Check if a value is a function and trigger it, if that + function triggerFunction( callback, scope ) { + if ( typeof callback == 'function' ) { + return callback.call( scope ) + } + } + + // Return numbers below 10 with a leading zero + function leadZero( number ) { + return ( number < 10 ? '0': '' ) + number + } + + // Create a dom node string + function createNode( wrapper, item, klass, attribute ) { + + // If the item is false-y, just return an empty string + if ( !item ) return '' + + // If the item is an array, do a join + item = Array.isArray( item ) ? item.join( '' ) : item + + // Check for the class + klass = klass ? ' class="' + klass + '"' : '' + + // Check for any attributes + attribute = attribute ? ' ' + attribute : '' + + // Return the wrapped item + return '<' + wrapper + klass + attribute + '>' + item + '' + } //createNode + + // Create a calendar date + function createDate( datePassed, unlimited ) { + + // If the date passed is an array + if ( Array.isArray( datePassed ) ) { + + // Create the date + datePassed = new Date( datePassed[ 0 ], datePassed[ 1 ], datePassed[ 2 ] ) + } + + // If the date passed is a number + else if ( !isNaN( datePassed ) ) { + + // Create the date + datePassed = new Date( datePassed ) + } + + + // Otherwise if it's not unlimited + else if ( !unlimited ) { + + // Set the date to today + datePassed = new Date() + + // Set the time to midnight (for comparison purposes) + datePassed.setHours( 0, 0, 0, 0 ) + } + + + // Return the calendar date object + return { + YEAR: unlimited || datePassed.getFullYear(), + MONTH: unlimited || datePassed.getMonth(), + DATE: unlimited || datePassed.getDate(), + DAY: unlimited || datePassed.getDay(), + TIME: unlimited || datePassed.getTime(), + OBJ: unlimited || datePassed + } + } //createDate + + + + + /** + * Extend jQuery + */ + $.fn.pickadate = function( options ) { + + var pickadate = 'pickadate' + + // Merge the options with a deep copy + options = $.extend( true, {}, $.fn.pickadate.defaults, options ) + + // Check if it should be disabled + // for browsers that natively support `type=date` + if ( options.disablePicker ) { return this } + + return this.each( function() { + var $this = $( this ) + if ( this.nodeName == 'INPUT' && !$this.data( pickadate ) ) { + $this.data( pickadate, new Picker( $this, options ) ) + } + }) + } //$.fn.pickadate + + + + /** + * Default options for the picker + */ + $.fn.pickadate.defaults = { + + monthsFull: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ], + monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ], + + weekdaysFull: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ], + weekdaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ], + + // Display strings + monthPrev: '◀', + monthNext: '▶', + showMonthsFull: 1, + showWeekdaysShort: 1, + + // Today and clear + today: 'Today', + clear: 'Clear', + + // Date format to show on the input element + format: 'd mmmm, yyyy', + + // Date format to send to the server + formatSubmit: 0, + + // Hidden element name suffix + hiddenSuffix: '_submit', + + // First day of the week: 0 = Sunday, 1 = Monday + firstDay: 0, + + // Month & year dropdown selectors + monthSelector: 0, + yearSelector: 0, + + // Date ranges + dateMin: 0, + dateMax: 0, + + // Dates to disable + datesDisabled: 0, + + // Disable for browsers with native date support + disablePicker: 0, + + // Events + onOpen: 0, + onClose: 0, + onSelect: 0, + onStart: 0, + onRender: 0, + + + // Classes + klass: { + + bodyActive: STRING_PREFIX_DATEPICKER + 'active', + + inputActive: STRING_PREFIX_DATEPICKER + 'input--active', + + holder: STRING_PREFIX_DATEPICKER + 'holder', + opened: STRING_PREFIX_DATEPICKER + 'holder--opened', + focused: STRING_PREFIX_DATEPICKER + 'holder--focused', + + frame: STRING_PREFIX_DATEPICKER + 'frame', + wrap: STRING_PREFIX_DATEPICKER + 'wrap', + + calendar: STRING_PREFIX_DATEPICKER + 'calendar', + + table: STRING_PREFIX_DATEPICKER + 'table', + + header: STRING_PREFIX_DATEPICKER + 'header', + + monthPrev: STRING_PREFIX_DATEPICKER + 'nav--prev', + monthNext: STRING_PREFIX_DATEPICKER + 'nav--next', + + month: STRING_PREFIX_DATEPICKER + 'month', + year: STRING_PREFIX_DATEPICKER + 'year', + + selectMonth: STRING_PREFIX_DATEPICKER + 'select--month', + selectYear: STRING_PREFIX_DATEPICKER + 'select--year', + + weekdays: STRING_PREFIX_DATEPICKER + 'weekday', + + body: STRING_PREFIX_DATEPICKER + 'body', + + day: STRING_PREFIX_DATEPICKER + 'day', + dayDisabled: STRING_PREFIX_DATEPICKER + 'day--disabled', + daySelected: STRING_PREFIX_DATEPICKER + 'day--selected', + dayHighlighted: STRING_PREFIX_DATEPICKER + 'day--highlighted', + dayToday: STRING_PREFIX_DATEPICKER + 'day--today', + dayInfocus: STRING_PREFIX_DATEPICKER + 'day--infocus', + dayOutfocus: STRING_PREFIX_DATEPICKER + 'day--outfocus', + + footer: STRING_PREFIX_DATEPICKER + 'footer', + + buttonClear: STRING_PREFIX_DATEPICKER + 'button--clear', + buttonToday: STRING_PREFIX_DATEPICKER + 'button--today' + } + } //$.fn.pickadate.defaults + + + +})( jQuery, document ); + + + + + + diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/source/pickadate.legacy.js b/js/pickadate.js-3.5.3/v2-(deprecated)/source/pickadate.legacy.js new file mode 100644 index 0000000..a7850d2 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/source/pickadate.legacy.js @@ -0,0 +1,1805 @@ +/*! + * pickadate.js v2.1.8 - 25 March, 2013 + * By Amsul (http://amsul.ca) + * Hosted on https://github.com/amsul/pickadate.js + * Licensed under MIT ("expat" flavour) license. + */ + +/*jshint + debug: true, + devel: true, + browser: true, + asi: true, + unused: true, + eqnull: true + */ + + + +;(function( $, document, undefined ) { + + 'use strict'; + + + + var + + // Globals & constants + DAYS_IN_WEEK = 7, + WEEKS_IN_CALENDAR = 6, + DAYS_IN_CALENDAR = WEEKS_IN_CALENDAR * DAYS_IN_WEEK, + + STRING_DIV = 'div', + STRING_PREFIX_DATEPICKER = 'pickadate__', + + isIE = navigator.userAgent.match( /MSIE/ ), + + $document = $( document ), + + $body = $( document.body ), + + + /** + * The picker constructor that accepts the + * jQuery element and the merged settings + */ + Picker = function( $ELEMENT, SETTINGS ) { + + var + // Pseudo picker constructor + Picker = function() {}, + + + // The picker prototype + P = Picker.prototype = { + + constructor: Picker, + + $node: $ELEMENT, + + /** + * Initialize everything + */ + init: function() { + + + // Bind all the events to the element, + // and then insert everything after it + $ELEMENT.on({ + 'focus click': function() { + + // If it's not IE or it is IE and the calendar is not + // being force closed, then open the calendar + if ( !isIE || ( isIE && !CALENDAR._IE ) ) { + P.open() + } + + // Add the focused state to the holder + $HOLDER.addClass( CLASSES.focused ) + + // Then flip the IE force close to false + CALENDAR._IE = 0 + }, + blur: function() { + $HOLDER.removeClass( CLASSES.focused ) + }, + change: function() { + + // If there's a hidden input, update the value with formatting or clear it + if ( ELEMENT_HIDDEN ) { + ELEMENT_HIDDEN.value = ELEMENT.value ? getDateFormatted( SETTINGS.formatSubmit ) : '' + } + }, + keydown: function( event ) { + + var + // Grab the keycode + keycode = event.keyCode, + + // Check if one of the delete keys was pressed + isKeycodeDelete = keycode == 8 || keycode == 46 + + // If backspace was pressed or the calendar is closed and the keycode + // warrants a date change, prevent it from going any further. + if ( isKeycodeDelete || !CALENDAR.isOpen && KEYCODE_TO_DATE[ keycode ] ) { + + // Prevent it from moving the page + event.preventDefault() + + // Prevent it from propagating to document + eventPreventPropagation( event ) + + // If backspace was pressed, clear the values and close the picker + if ( isKeycodeDelete ) { + P.clear().close() + } + + // Otherwise open the calendar + else { + P.open() + } + } + } + }).after( [ $HOLDER, ELEMENT_HIDDEN ] ) + + + // If the element has autofocus, open the calendar + if ( ELEMENT.autofocus ) { + P.open() + } + + + // Update the calendar items + CALENDAR.items = getUpdatedCalendarItems() + + + // Trigger the `onStart` method within scope of the picker + triggerFunction( SETTINGS.onStart, P ) + + // Trigger the `onRender` method within scope of the picker + triggerFunction( SETTINGS.onRender, P ) + + return P + }, //init + + + /** + * Open the calendar + */ + open: function() { + + // If it's already open, do nothing + if ( CALENDAR.isOpen ) return P + + + // Set calendar as open + CALENDAR.isOpen = 1 + + + // Toggle the tabindex of "focusable" calendar items + toggleCalendarElements( 0 ) + + + // Make sure the element has focus and then + // add the "active" class to the element + $ELEMENT.focus().addClass( CLASSES.inputActive ) + + // Add the "opened" class to the calendar holder + $HOLDER.addClass( CLASSES.opened ) + + // Add the "active" class to the body + $body.addClass( CLASSES.bodyActive ) + + + // Bind all the events to the document + // while namespacing it with the calendar ID + $document.on( 'focusin.P' + CALENDAR.id, function( event ) { + + // If the target is not within the holder, + // and is not the element, then close the picker + if ( !$HOLDER.find( event.target ).length && event.target != ELEMENT ) P.close() + + }).on( 'click.P' + CALENDAR.id, function( event ) { + + // If the target of the click is not the element, + // then close the calendar picker + // * We don't worry about clicks on the holder + // because those are stopped from bubbling to the doc + if ( event.target != ELEMENT ) P.close() + + }).on( 'keydown.P' + CALENDAR.id, function( event ) { + + var + // Get the keycode + keycode = event.keyCode, + + // Translate that to a date change + keycodeToDate = KEYCODE_TO_DATE[ keycode ] + + + // On escape, focus back onto the element and close the picker + if ( keycode == 27 ) { + ELEMENT.focus() + P.close() + } + + + // If the target is the element and there's a keycode to date + // translation or the enter key was pressed + else if ( event.target == ELEMENT && ( keycodeToDate || keycode == 13 ) ) { + + // Prevent the default action to stop it from moving the page + event.preventDefault() + + // If the keycode translates to a date change, superficially select + // the date by incrementally (by date change) creating new validated dates. + // * Truthy second argument makes it a superficial selection + if ( keycodeToDate ) { + setDateSelected( createValidatedDate( [ MONTH_FOCUSED.YEAR, MONTH_FOCUSED.MONTH, DATE_HIGHLIGHTED.DATE + keycodeToDate ], keycodeToDate ), 1 ) + } + + // Otherwise it's the enter key so set the element value as the + // highlighted date, render a new calendar, and then close it + else { + setElementsValue( DATE_HIGHLIGHTED ) + calendarRender() + P.close() + } + + } //if ELEMENT + }) + + + // Trigger the onOpen method within scope of the picker + triggerFunction( SETTINGS.onOpen, P ) + + return P + }, //open + + + /** + * Close the calendar + */ + close: function() { + + // If it's already closed, do nothing + if ( !CALENDAR.isOpen ) return P + + + // Set calendar as closed + CALENDAR.isOpen = 0 + + + // Toggle the tabindex of "focusable" calendar items + toggleCalendarElements( -1 ) + + + // Remove the "active" class from the element + $ELEMENT.removeClass( CLASSES.inputActive ) + + // Remove the "opened" class from the calendar holder + $HOLDER.removeClass( CLASSES.opened ) + + // Remove the "active" class from the body + $body.removeClass( CLASSES.bodyActive ) + + + // Unbind the Picker events from the document + $document.off( '.P' + CALENDAR.id ) + + + // Trigger the onClose method within scope of the picker + triggerFunction( SETTINGS.onClose, P ) + + return P + }, //close + + + /** + * Return whether the calendar is open + */ + isOpen: function() { + return CALENDAR.isOpen === 1; + }, //isOpen + + + /** + * Show a month in focus with 0index compensation + */ + show: function( month, year ) { + showMonth( --month, year ) + return P + }, //show + + + /** + * Clear the value of the input elements + */ + clear: function() { + + // Clear the elements value + setElementsValue( 0 ) + + // Render a new calendar + calendarRender() + + return P + }, //clear + + + /** + * Get the selected date in any format. + */ + getDate: function( format ) { + + // If the format is a literal true, return the underlying JS Date object. + // If the element has no value, just return an empty string. + // Otherwise return the formatted date. + return format === true ? DATE_SELECTED.OBJ : !ELEMENT.value ? '' : getDateFormatted( format ) + }, //getDate + + + /** + * Set the date with month 0index compensation + * and an option to do a superficial selection + */ + setDate: function( year, month, date, isSuperficial ) { + setDateSelected( createValidatedDate([ year, --month, date ]), isSuperficial ) + return P + }, //setDate + + + /** + * Get the min or max date based on `upper` being truthy or falsey + */ + getDateLimit: function( upper, format ) { + return getDateFormatted( format, upper ? DATE_MAX : DATE_MIN ) + }, //getDateLimit + + + /** + * Set the min or max date based on `upper` being truthy or falsey. + */ + setDateLimit: function( limit, upper ) { + + // If it's the upper limit + if ( upper ) { + + // Set the max date + DATE_MAX = createBoundaryDate( limit, upper ) + + // If focused month is more than max date set it to max date + if ( MONTH_FOCUSED.TIME > DATE_MAX.TIME ) { + MONTH_FOCUSED = DATE_MAX + } + } + + // Otherwise it's the lower limit + else { + + // So set the min date + DATE_MIN = createBoundaryDate( limit ) + + // If focused month is less than min date set it to min date + if ( MONTH_FOCUSED.TIME < DATE_MIN.TIME ) { + MONTH_FOCUSED = DATE_MIN + } + } + + // Render a new calendar + calendarRender() + + return P + } //setDateLimit + }, //Picker.prototype + + + // The element node + ELEMENT = (function( element ) { + + // Confirm the focus state, convert the element into + // a regular text input to remove user-agent stylings, + // and then set it as readonly to prevent keyboard popup + element.autofocus = ( element == document.activeElement ) + element.type = 'text' + element.readOnly = true + return element + })( $ELEMENT[ 0 ] ), //ELEMENT + + + // The calendar object + CALENDAR = { + id: ~~( Math.random() * 1e9 ) + }, //CALENDAR + + + // The classes + CLASSES = SETTINGS.klass, + + + // The date in various formats + DATE_FORMATS = (function() { + + // Get the length of the first word + function getFirstWordLength( string ) { + return string.match( /\w+/ )[ 0 ].length + } + + // If the second character is a digit, length is 2 otherwise 1. + function getDigitsLength( string ) { + return ( /\d/ ).test( string[ 1 ] ) ? 2 : 1 + } + + // Get the length of the month from a string + function getMonthLength( string, dateObj, collection ) { + + // Grab the first word + var word = string.match( /\w+/ )[ 0 ] + + // If there's no index for the date object's month, + // find it in the relevant months collection and add 1 + // because we subtract 1 when we create the date object + if ( !dateObj.mm && !dateObj.m ) { + dateObj.m = collection.indexOf( word ) + 1 + } + + // Return the length of the word + return word.length + } + + + // Return the date formats object + return { + d: function( string ) { + + // If there's string, then get the digits length. + // Otherwise return the selected date. + return string ? getDigitsLength( string ) : this.DATE + }, + dd: function( string ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected date with a leading zero. + return string ? 2 : leadZero( this.DATE ) + }, + ddd: function( string ) { + + // If there's a string, then get the length of the first word. + // Otherwise return the short selected weekday. + return string ? getFirstWordLength( string ) : SETTINGS.weekdaysShort[ this.DAY ] + }, + dddd: function( string ) { + + // If there's a string, then get the length of the first word. + // Otherwise return the full selected weekday. + return string ? getFirstWordLength( string ) : SETTINGS.weekdaysFull[ this.DAY ] + }, + m: function( string ) { + + // If there's a string, then get the length of the digits + // Otherwise return the selected month with 0index compensation. + return string ? getDigitsLength( string ) : this.MONTH + 1 + }, + mm: function( string ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected month with 0index and leading zero. + return string ? 2 : leadZero( this.MONTH + 1 ) + }, + mmm: function( string, dateObject ) { + + var collection = SETTINGS.monthsShort + + // If there's a string, get length of the relevant month string + // from the short months collection. Otherwise return the + // selected month from that collection. + return string ? getMonthLength( string, dateObject, collection ) : collection[ this.MONTH ] + }, + mmmm: function( string, dateObject ) { + + var collection = SETTINGS.monthsFull + + // If there's a string, get length of the relevant month string + // from the full months collection. Otherwise return the + // selected month from that collection. + return string ? getMonthLength( string, dateObject, collection ) : collection[ this.MONTH ] + }, + yy: function( string ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected year by slicing out the first 2 digits. + return string ? 2 : ( '' + this.YEAR ).slice( 2 ) + }, + yyyy: function( string ) { + + // If there's a string, then the length is always 4. + // Otherwise return the selected year. + return string ? 4 : this.YEAR + }, + + // Create an array by splitting the format passed + toArray: function( format ) { return format.split( /(?=\b)(d{1,4}|m{1,4}|y{4}|yy)+(\b)/g ) } + + } //endreturn + })(), //DATE_FORMATS + + + // Create calendar object for today + DATE_TODAY = createDate(), + + + // Create the min date + DATE_MIN = createBoundaryDate( SETTINGS.dateMin ), + + + // Create the max date + // * A truthy second argument creates max date + DATE_MAX = createBoundaryDate( SETTINGS.dateMax, 1 ), + + + // Create a pseudo min and max date for disabled + // calendars as the respective opposite limit + PSEUDO_DATE_MIN = DATE_MAX, + PSEUDO_DATE_MAX = DATE_MIN, + + + // Create a collection of dates to disable + DATES_TO_DISABLE = (function( datesCollection ) { + + // If a collection was passed, we need to create calendar date objects + if ( Array.isArray( datesCollection ) ) { + + // If the "all" flag is true, remove the flag from the collection + // and flip the condition of which dates to disable + if ( datesCollection[ 0 ] === true ) { + CALENDAR.off = datesCollection.shift() + } + + // Map through the dates passed and return the collection + return datesCollection.map( function( date ) { + + // If the date is a number, we need to disable weekdays + if ( !isNaN( date ) ) { + + // So flip the "off days" boolean + CALENDAR.offDays = 1 + + // If the first day flag is truthy, we maintain the + // 0index of the date by getting the remainder from 7. + // Otherwise return the date with 0index compensation. + return SETTINGS.firstDay ? date % DAYS_IN_WEEK : --date + } + + // Otherwise assume it's an array and fix the month 0index + --date[ 1 ] + + // Then create and return the date, + // replacing it in the collection + return createDate( date ) + }) + } + })( SETTINGS.datesDisabled ), //DATES_TO_DISABLE + + + // Create a function that will filter through the dates + // and return true if looped date is to be disabled + DISABLED_DATES = (function() { + + // Check if the looped date should be disabled + // based on the time being the same as a disabled date + // or the day index being within the collection + var isDisabledDate = function( date ) { + return this.TIME == date.TIME || DATES_TO_DISABLE.indexOf( this.DAY ) > -1 + } + + + // If all calendar dates should be disabled + if ( CALENDAR.off ) { + + // Map through all the dates to disable + DATES_TO_DISABLE.map( function( loopDate ) { + + // If the looped date is less than the latest lowest date + // and greater than the minimum date, then set it as the lowest date + if ( loopDate.TIME < PSEUDO_DATE_MIN.TIME && loopDate.TIME > DATE_MIN.TIME ) { + PSEUDO_DATE_MIN = loopDate + } + + // If the looped date is more than the latest highest date + // and less than the maximum date, then set it as the highest date + if ( loopDate.TIME > PSEUDO_DATE_MAX.TIME && loopDate.TIME <= DATE_MAX.TIME ) { + PSEUDO_DATE_MAX = loopDate + } + }) + + // Finally, return a function that maps each date + // in the collection of dates to not disable. + return function( date, i, collection ) { + + // Map the array of disabled dates and check if this is not one + return ( collection.map( isDisabledDate, this ).indexOf( true ) < 0 ) + } + } + + + // Otherwise just return the function that checks if a date is disabled + return isDisabledDate + })(), //DISABLED_DATES + + + // Create calendar object for the highlighted day + DATE_HIGHLIGHTED = (function( dateDataValue, dateEntered ) { + + // If there a date `data-value` + if ( dateDataValue ) { + + // Set the date entered to an empty object + dateEntered = {} + + // Map through the submit format array + DATE_FORMATS.toArray( SETTINGS.formatSubmit ).map( function( formatItem ) { + + // If the formatting length function exists, invoke it + // with the `data-value` and the date we are creating. + // Otherwise it's the length of the formatting item being mapped + var formattingLength = DATE_FORMATS[ formatItem ] ? DATE_FORMATS[ formatItem ]( dateDataValue, dateEntered ) : formatItem.length + + // If the formatting length function exists, slice up + // the value and pass it into the date we're creating. + if ( DATE_FORMATS[ formatItem ] ) { + dateEntered[ formatItem ] = dateDataValue.slice( 0, formattingLength ) + } + + // Update the remainder of the string by slicing away the format length + dateDataValue = dateDataValue.slice( formattingLength ) + }) + + // Finally, create an array with the date entered while + // parsing each item as an integer and compensating for 0index + dateEntered = [ +(dateEntered.yyyy || dateEntered.yy), +(dateEntered.mm || dateEntered.m) - 1, +(dateEntered.dd || dateEntered.d) ] + } + + + // Otherwise, try to natively parse the date in the input + else { + dateEntered = Date.parse( dateEntered ) + } + + + // If there's a valid date in the input or the dateEntered + // is now an array, create a validated date with it. + // Otherwise set the highlighted date to today after validating. + return createValidatedDate( dateEntered && ( !isNaN( dateEntered ) || Array.isArray( dateEntered ) ) ? dateEntered : DATE_TODAY ) + })( ELEMENT.getAttribute( 'data-value' ), ELEMENT.value ), + + + // The date selected is initially the date highlighted + DATE_SELECTED = DATE_HIGHLIGHTED, + + + // Month focused is based on highlighted date + MONTH_FOCUSED = DATE_HIGHLIGHTED, + + + // If there's a format for the hidden input element, create the element + // using the name of the original input plus suffix and update the value + // with whatever is entered in the input on load. Otherwise set it to null. + ELEMENT_HIDDEN = SETTINGS.formatSubmit ? $( '' ).val( ELEMENT.value ? getDateFormatted( SETTINGS.formatSubmit ) : '' )[ 0 ] : null, + + + // Create the calendar table head with weekday labels + // by "copying" the weekdays collection based on the settings. + // * We do a copy so we don't mutate the original array. + TABLE_HEAD = (function( weekdaysCollection ) { + + // If the first day should be Monday, then grab + // Sunday and push it to the end of the collection + if ( SETTINGS.firstDay ) { + weekdaysCollection.push( weekdaysCollection.splice( 0, 1 )[ 0 ] ) + } + + // Go through each day of the week and return a wrapped header row. + // Take the result and apply anoth table head wrapper to group it all. + return createNode( 'thead', + createNode( 'tr', + weekdaysCollection.map( function( weekday ) { + return createNode( 'th', weekday, CLASSES.weekdays ) + }) + ) + ) + })( ( SETTINGS.showWeekdaysShort ? SETTINGS.weekdaysShort : SETTINGS.weekdaysFull ).slice( 0 ) ), //TABLE_HEAD + + + // Create the calendar holder with a new wrapped calendar and bind the events + $HOLDER = $( createNode( STRING_DIV, createCalendarWrapped(), CLASSES.holder ) ).on( 'mousedown', function( event ) { + + // If the target of the event is not one of the calendar items, + // prevent default action to keep focus on the input element + if ( CALENDAR.items.indexOf( event.target ) < 0 ) { + event.preventDefault() + } + }).on( 'click', function( event ) { + + // If the calendar is closed and there appears to be no click, do nothing + // * This is done to prevent the "enter" key propagating as a click. + // On all browsers (except old IEs) the client click x & y are 0. + if ( !CALENDAR.isOpen && !event.clientX && !event.clientY ) { + return + } + + var + dateToSelect, + + // Get the jQuery target + $target = $( event.target ), + + // Get the target data + targetData = $target.data() + + + // Stop the event from bubbling to the document + eventPreventPropagation( event ) + + + // Put focus back onto the element + ELEMENT.focus() + + // For IE, set the calendar to force close + // * This needs to be after `ELEMENT.focus()` + CALENDAR._IE = 1 + + + // If a navigator button was clicked, + // show the month in the relative direction + if ( targetData.nav ) { + showMonth( MONTH_FOCUSED.MONTH + targetData.nav ) + } + + // If a clear button was clicked, + // clear the elements value and then close it + else if ( targetData.clear ) { + P.clear().close() + } + + // If a date was clicked + else if ( targetData.date ) { + + // Split the target data into an array + dateToSelect = targetData.date.split( '/' ) + + // Set the date and then close the calendar + P.setDate( +dateToSelect[ 0 ], +dateToSelect[ 1 ], +dateToSelect[ 2 ] ).close() + } + + // If the target is the holder, close the picker + else if ( $target[ 0 ] == $HOLDER[ 0 ] ) { + P.close() + } + }), // $HOLDER + + + // Translate a keycode to a relative change in date + KEYCODE_TO_DATE = { + + // Down + 40: 7, + + // Up + 38: -7, + + // Right + 39: 1, + + // Left + 37: -1 + } //KEYCODE_TO_DATE + + + + /** + * Create a bounding date allowed on the calendar + * * A truthy second argument creates the upper boundary + */ + function createBoundaryDate( limit, upper ) { + + // If the limit is set to true, just return today + if ( limit === true ) { + return DATE_TODAY + } + + // If the limit is an array, construct the date by fixing month 0index + if ( Array.isArray( limit ) ) { + --limit[ 1 ] + return createDate( limit ) + } + + // If there is a limit and its a number, create a + // calendar date relative to today by adding the limit + if ( limit && !isNaN( limit ) ) { + return createDate([ DATE_TODAY.YEAR, DATE_TODAY.MONTH, DATE_TODAY.DATE + limit ]) + } + + // Otherwise create an infinite date + return createDate( 0, upper ? Infinity : -Infinity ) + } //createBoundaryDate + + + /** + * Create a validated date + */ + function createValidatedDate( datePassed, direction, skipMonthCheck ) { + + + // If the date passed isn't a date, create one + datePassed = !datePassed.TIME ? createDate( datePassed ) : datePassed + + + // If the calendar "disabled" flag is truthy and there are only disabled weekdays + if ( CALENDAR.off && !CALENDAR.offDays ) { + + // If the date is less than the pseudo min date or greater than pseudo max date, + // set it as the pseudo date limit. Otherwise keep it the same. + datePassed = datePassed.TIME < PSEUDO_DATE_MIN.TIME ? PSEUDO_DATE_MIN : datePassed.TIME > PSEUDO_DATE_MAX.TIME ? PSEUDO_DATE_MAX : datePassed + } + + // Otherwise if there are disabled dates + else if ( DATES_TO_DISABLE ) { + + // Create a reference to the original date passed + var originalDate = datePassed + + // Check if this date is disabled. If it is, + // then keep adding the direction (or 1) to the date + // until we get to a date that's enabled. + while ( DATES_TO_DISABLE.filter( DISABLED_DATES, datePassed ).length ) { + + // Otherwise create the next date based on the direction + datePassed = createDate([ datePassed.YEAR, datePassed.MONTH, datePassed.DATE + ( direction || 1 ) ]) + + // Check if the month check should be skipped to avoid extra loops. + // Otherwise if we've gone through to another month, create a new + // date based on the direction being less than zero (rather than more). + // Then set this new date as the original and looped date. + if ( !skipMonthCheck && datePassed.MONTH != originalDate.MONTH ) { + originalDate = datePassed = createDate([ originalDate.YEAR, originalDate.MONTH, direction < 0 ? --originalDate.DATE : ++originalDate.DATE ]) + } + } + } + + + // If it's less that min date, set it to min date + // by creating a validated date by adding one + // until we find an enabled date + // * A truthy third argument skips the month check + if ( datePassed.TIME < DATE_MIN.TIME ) { + datePassed = createValidatedDate( DATE_MIN, 1, 1 ) + } + + + // If it's more than max date, set it to max date + // by creating a validated date by subtracting one + // until we find an enabled date + // * A truthy third argument skips the month check + else if ( datePassed.TIME > DATE_MAX.TIME ) { + datePassed = createValidatedDate( DATE_MAX, -1, 1 ) + } + + + // Finally, return the date + return datePassed + } //createValidatedDate + + + /** + * Create the nav for next/prev month + */ + function createMonthNav( next ) { + + // If the focused month is outside the range, return an empty string + if ( ( next && MONTH_FOCUSED.YEAR >= DATE_MAX.YEAR && MONTH_FOCUSED.MONTH >= DATE_MAX.MONTH ) || ( !next && MONTH_FOCUSED.YEAR <= DATE_MIN.YEAR && MONTH_FOCUSED.MONTH <= DATE_MIN.MONTH ) ) { + return '' + } + + // Otherwise, return the created month tag + var monthTag = 'month' + ( next ? 'Next' : 'Prev' ) + return createNode( STRING_DIV, SETTINGS[ monthTag ], CLASSES[ monthTag ], 'data-nav=' + ( next || -1 ) ) + } //createMonthNav + + + /** + * Create the month label + */ + function createMonthLabel( monthsCollection ) { + + + // If there's a need for a month selector + return SETTINGS.monthSelector ? + + // Create the dom string node for a select element + createNode( 'select', + + // Map through the months collection + monthsCollection.map( function( month, monthIndex ) { + + // Create a dom string node for each option + return createNode( 'option', + + // With the month and no classes + month, 0, + + // Set the value and selected index + 'value=' + monthIndex + ( MONTH_FOCUSED.MONTH == monthIndex ? ' selected' : '' ) + + + // Plus the disabled attribute if it's outside the range + getMonthInRange( monthIndex, MONTH_FOCUSED.YEAR, ' disabled', '' ) + ) + }), + + // The month selector class + CLASSES.selectMonth, + + // And some tabindex + getTabindexState() + + // Otherwise just return the month focused + ) : createNode( STRING_DIV, monthsCollection[ MONTH_FOCUSED.MONTH ], CLASSES.month ) + } //createMonthLabel + + + /** + * Create the year label + */ + function createYearLabel() { + + var + yearFocused = MONTH_FOCUSED.YEAR, + yearsInSelector = SETTINGS.yearSelector + + + // If there is a need for a years selector + // then create a dropdown within the valid range + if ( yearsInSelector ) { + + // If year selector setting is true, default to 5. + // Otherwise divide the years in selector in half + // to get half before and half after + yearsInSelector = yearsInSelector === true ? 5 : ~~( yearsInSelector / 2 ) + + var + // Create a collection to hold the years + yearsCollection = [], + + // The lowest year possible is the difference between + // the focused year and the number of years in the selector + lowestYear = yearFocused - yearsInSelector, + + // The first year is the lower of the two numbers: + // the lowest year or the minimum year. + firstYear = getNumberInRange( lowestYear, DATE_MIN.YEAR ), + + // The highest year is the sum of the focused year + // and the years in selector plus the left over years. + highestYear = yearFocused + yearsInSelector + ( firstYear - lowestYear ), + + // The last year is the higher of the two numbers: + // the highest year or the maximum year. + lastYear = getNumberInRange( highestYear, DATE_MAX.YEAR, 1 ) + + + // In case there are leftover years to put in the selector, + // we need to get the lower of the two numbers: + // the lowest year minus leftovers, or the minimum year + firstYear = getNumberInRange( lowestYear - ( highestYear - lastYear ), DATE_MIN.YEAR ) + + + // Add the years to the collection by looping through the range + for ( var index = 0; index <= lastYear - firstYear; index += 1 ) { + yearsCollection.push( firstYear + index ) + } + + + // Create the dom string node for a select element + return createNode( 'select', + + // Map through the years collection + yearsCollection.map( function( year ) { + + // Create a dom string node for each option + return createNode( 'option', + + // With the year and no classes + year, 0, + + // Set the value and selected index + 'value=' + year + ( yearFocused == year ? ' selected' : '' ) + ) + }), + + // The year selector class + CLASSES.selectYear, + + // And some tabindex + getTabindexState() + ) + } + + + // Otherwise just return the year focused + return createNode( STRING_DIV, yearFocused, CLASSES.year ) + } //createYearLabel + + + /** + * Create the calendar table body + */ + function createTableBody() { + + var + // The loop date object + loopDate, + + // A pseudo index will be the divider between + // the previous month and the focused month + pseudoIndex, + + // An array that will hold the classes + // and binding for each looped date + classAndBinding, + + // Collection of the dates visible on the calendar + // * This gets discarded at the end + calendarDates = [], + + // Weeks visible on the calendar + calendarWeeks = '', + + // Count the number of days in the focused month + // by getting the 0-th date of the next month + countMonthDays = createDate([ MONTH_FOCUSED.YEAR, MONTH_FOCUSED.MONTH + 1, 0 ]).DATE, + + // Count the days to shift the start of the month + // by getting the day the first of the month falls on + // and subtracting 1 to compensate for day 1index + // or 2 if "Monday" should be the first day. + countShiftby = createDate([ MONTH_FOCUSED.YEAR, MONTH_FOCUSED.MONTH, 1 ]).DAY + ( SETTINGS.firstDay ? -2 : -1 ) + + + // If the count to shift by is less than the first day + // of the month, then add a week. + countShiftby += countShiftby < -1 ? 7 : 0 + + + // Go through all the days in the calendar + // and map a calendar date + for ( var index = 0; index < DAYS_IN_CALENDAR; index += 1 ) { + + // Get the distance between the index and the count + // to shift by. This will serve as the separator + // between the previous, current, and next months. + pseudoIndex = index - countShiftby + + + // Create a calendar date with a negative or positive pseudoIndex + loopDate = createDate([ MONTH_FOCUSED.YEAR, MONTH_FOCUSED.MONTH, pseudoIndex ]) + + + // Set the date class and bindings on the looped date. + // If the pseudoIndex is greater than zero, + // and less or equal to the days in the month, + // we need dates from the focused month. + classAndBinding = createDateClassAndBinding( loopDate, ( pseudoIndex > 0 && pseudoIndex <= countMonthDays ) ) + + + // Create the looped date wrapper, + // and then create the table cell wrapper + // and finally pass it to the calendar array + calendarDates.push( createNode( 'td', createNode( STRING_DIV, loopDate.DATE, classAndBinding[ 0 ], classAndBinding[ 1 ] ) ) ) + + + // Check if it's the end of a week. + // * We add 1 for 0index compensation + if ( ( index % DAYS_IN_WEEK ) + 1 == DAYS_IN_WEEK ) { + + // Wrap the week and append it into the calendar weeks + calendarWeeks += createNode( 'tr', calendarDates.splice( 0, DAYS_IN_WEEK ) ) + } + + } //endfor + + + + // Join the dates and wrap the calendar body + return createNode( 'tbody', calendarWeeks, CLASSES.body ) + } //createTableBody + + + + /** + * Create the class and data binding for a looped date node. + * Returns an array with 2 items: + * 1) The classes string + * 2) The data binding string + */ + function createDateClassAndBinding( loopDate, isMonthFocused ) { + + var + // State check for date + isDateDisabled, + + // Create a collection for the classes + // with the default classes already included + klassCollection = [ + + // The generic day class + CLASSES.day, + + // The class for in or out of focus + ( isMonthFocused ? CLASSES.dayInfocus : CLASSES.dayOutfocus ) + ] + + + // If it's less than the minimum date or greater than the maximum date, + // or if there are dates to disable and this looped date is one of them, + // flip the "disabled" state to truthy and add the "disabled" class + if ( loopDate.TIME < DATE_MIN.TIME || loopDate.TIME > DATE_MAX.TIME || ( DATES_TO_DISABLE && DATES_TO_DISABLE.filter( DISABLED_DATES, loopDate ).length ) ) { + isDateDisabled = 1 + klassCollection.push( CLASSES.dayDisabled ) + } + + + // If it's today, add the class + if ( loopDate.TIME == DATE_TODAY.TIME ) { + klassCollection.push( CLASSES.dayToday ) + } + + + // If it's the highlighted date, add the class + if ( loopDate.TIME == DATE_HIGHLIGHTED.TIME ) { + klassCollection.push( CLASSES.dayHighlighted ) + } + + + // If it's the selected date, add the class + if ( loopDate.TIME == DATE_SELECTED.TIME ) { + klassCollection.push( CLASSES.daySelected ) + } + + + // Return an array with the classes and data binding + return [ + + // Return the classes joined + // by a single whitespace + klassCollection.join( ' ' ), + + // Create the data binding object + // with the value as a string + 'data-' + ( isDateDisabled ? 'disabled' : 'date' ) + '=' + [ + loopDate.YEAR, + loopDate.MONTH + 1, // add 1 to display an accurate date + loopDate.DATE + ].join( '/' ) + ] + } //createDateClassAndBinding + + + /** + * Create the "today" and "clear" buttons + */ + function createTodayAndClear() { + return createNode( 'button', SETTINGS.today, CLASSES.buttonToday, 'data-date=' + getDateFormatted( 'yyyy/mm/dd', DATE_TODAY ) + ' ' + getTabindexState() ) + createNode( 'button', SETTINGS.clear, CLASSES.buttonClear, 'data-clear=1 ' + getTabindexState() ) + } //createTodayAndClear + + + /** + * Create the wrapped calendar using the collection + * of all calendar items and a new table body + */ + function createCalendarWrapped() { + + // Create a calendar wrapper node + return createNode( STRING_DIV, + + // Create a calendar frame + createNode( STRING_DIV, + + // Create a calendar box node + createNode( STRING_DIV, + + // The calendar header + createNode( STRING_DIV, + + // The prev/next month tags + // * Truthy argument creates "next" tag + createMonthNav() + createMonthNav( 1 ) + + + // Create the month label + createMonthLabel( SETTINGS.showMonthsFull ? SETTINGS.monthsFull : SETTINGS.monthsShort ) + + + // Create the year label + createYearLabel(), + + // The header class + CLASSES.header + ) + + + // The calendar table with table head + // and a new calendar table body + createNode( 'table', [ TABLE_HEAD, createTableBody() ], CLASSES.table ) + + + // Create the "today" and "clear" buttons + createNode( STRING_DIV, createTodayAndClear(), CLASSES.footer ), + + // Calendar class + CLASSES.calendar + ), + + // Calendar wrap class + CLASSES.wrap + ), + + // Calendar frame class + CLASSES.frame + ) //endreturn + } //calendarWrapped + + + /** + * Get the number that's allowed within an upper or lower limit. + * * A truthy third argument tests against the upper limit. + */ + function getNumberInRange( number, limit, upper ) { + + // If we need to test against the upper limit + // and number is less than the limit, + // or we need to test against the lower limit + // and number is more than the limit, + // return the number. Otherwise return the limit. + return ( upper && number < limit ) || ( !upper && number > limit ) ? number : limit + } //getNumberInRange + + + /** + * Return a month by comparing with the date range. + * If outside the range, returns the "alternate" or "range" value. + * Otherwise returns the "in range" value or the month itself. + */ + function getMonthInRange( month, year, alternateValue, inRangeValue ) { + + // If the month is less than the min month, + // then return the alternate value or min month. + if ( year <= DATE_MIN.YEAR && month < DATE_MIN.MONTH ) { + return alternateValue || DATE_MIN.MONTH + } + + // If the month is more than the max month, + // then return the alternate value or max month. + if ( year >= DATE_MAX.YEAR && month > DATE_MAX.MONTH ) { + return alternateValue || DATE_MAX.MONTH + } + + // Otherwise return the "in range" value or the month itself. + // * We test `inRangeValue` against null because we need to + // test against null and undefined. 0 should be allowed. + return inRangeValue != null ? inRangeValue : month + } //getMonthInRange + + + /** + * Get the tabindex based on the calendar open/closed state + */ + function getTabindexState() { + return 'tabindex=' + ( CALENDAR.isOpen ? 0 : -1 ) + } + + + /** + * Get any date in any format. Defaults to getting + * the superficially selected date. + */ + function getDateFormatted( format, date ) { + + // Otherwise go through the date formats array and + // convert the format passed into an array to map + // which we join into a string at the end. + return DATE_FORMATS.toArray( format || SETTINGS.format ).map( function( value ) { + + // Trigger the date formats function + // or just return value itself. + return triggerFunction( DATE_FORMATS[ value ], date || DATE_SELECTED ) || value + }).join( '' ) + } //getDateFormatted + + + /** + * Set a date as selected or superficially selected + */ + function setDateSelected( dateTargeted, isSuperficial ) { + + // Set the target as the highlight + DATE_HIGHLIGHTED = dateTargeted + + // Set the target as the focus + MONTH_FOCUSED = dateTargeted + + // If it's not just a superficial selection, + // update the input elements values + if ( !isSuperficial ) { + setElementsValue( dateTargeted ) + } + + // Then render a new calendar + calendarRender() + } //setDateSelected + + + /** + * Set the date in the input element and trigger a change event + */ + function setElementsValue( dateTargeted ) { + + // If there's a date targeted, update the selected date + DATE_SELECTED = dateTargeted || DATE_SELECTED + + // Set the element value as the formatted date + // if there was a date targeted. Otherwise clear it. + // And then broadcast a change event. + $ELEMENT.val( dateTargeted ? getDateFormatted() : '' ).trigger( 'change' ) + + // Trigger the onSelect method within scope of the picker + triggerFunction( SETTINGS.onSelect, P ) + } //setElementsValue + + + /** + * Find something within the calendar holder + */ + function $findInHolder( klass ) { + return $HOLDER.find( '.' + klass ) + } //$findInHolder + + + /** + * Show the month visible on the calendar + */ + function showMonth( month, year ) { + + // Ensure we have a year to work with + year = year || MONTH_FOCUSED.YEAR + + // Get the month to be within + // the minimum and maximum date limits + month = getMonthInRange( month, year ) + + // Set the month to show in focus + // * We set the date to 1st of the month + // because date doesn't matter here + MONTH_FOCUSED = createDate([ year, month, 1 ]) + + // Then render a new calendar + calendarRender() + } //showMonth + + + /** + * Toggle the calendar elements as "tab-able" by mapping + * through the calendar items and updating the tabindex. + */ + function toggleCalendarElements( tabindex ) { + CALENDAR.items.map( function( item ) { + if ( item ) item.tabIndex = tabindex + }) + } //toggleCalendarElements + + + /** + * Get an updated collection of calendar items. + */ + function getUpdatedCalendarItems() { + + return [ + + // The month selector + $findInHolder( CLASSES.selectMonth ).on({ + + // *** For iOS *** + click: eventPreventPropagation, + + // Bind the change event + change: function() { + + // Show the month by floating the option selected + showMonth( +this.value ) + + // Find the new month selector and focus back on it + $findInHolder( CLASSES.selectMonth ).focus() + } + })[ 0 ], + + // The year selector + $findInHolder( CLASSES.selectYear ).on({ + + // *** For iOS *** + click: eventPreventPropagation, + + // Bind the change event + change: function() { + + // Show the year by floating the option selected and month in focus + showMonth( MONTH_FOCUSED.MONTH, +this.value ) + + // Find the new year selector and focus back on it + $findInHolder( CLASSES.selectYear ).focus() + } + })[ 0 ], + + // The "today" button + $findInHolder( CLASSES.buttonToday )[ 0 ], + + // The "clear" button + $findInHolder( CLASSES.buttonClear )[ 0 ] + ] + } //getUpdatedCalendarItems + + + /** + * Render a new calendar + */ + function calendarRender() { + + // Create a new wrapped calendar and place it within the holder + $HOLDER.html( createCalendarWrapped() ) + + // Update the calendar items + CALENDAR.items = getUpdatedCalendarItems() + + // Trigger the onRender method within scope of the picker + triggerFunction( SETTINGS.onRender, P ) + } //calendarRender + + + /** + * Prevent an event from propagating further + */ + function eventPreventPropagation( event ) { + event.stopPropagation() + } //eventPreventPropagation + + + // Return a new initialized picker + return new P.init() + } //Picker + + + + + + /** + * Helper functions + */ + + // Check if a value is a function and trigger it, if that + function triggerFunction( callback, scope ) { + if ( typeof callback == 'function' ) { + return callback.call( scope ) + } + } + + // Return numbers below 10 with a leading zero + function leadZero( number ) { + return ( number < 10 ? '0': '' ) + number + } + + // Create a dom node string + function createNode( wrapper, item, klass, attribute ) { + + // If the item is false-y, just return an empty string + if ( !item ) return '' + + // If the item is an array, do a join + item = Array.isArray( item ) ? item.join( '' ) : item + + // Check for the class + klass = klass ? ' class="' + klass + '"' : '' + + // Check for any attributes + attribute = attribute ? ' ' + attribute : '' + + // Return the wrapped item + return '<' + wrapper + klass + attribute + '>' + item + '' + } //createNode + + // Create a calendar date + function createDate( datePassed, unlimited ) { + + // If the date passed is an array + if ( Array.isArray( datePassed ) ) { + + // Create the date + datePassed = new Date( datePassed[ 0 ], datePassed[ 1 ], datePassed[ 2 ] ) + } + + // If the date passed is a number + else if ( !isNaN( datePassed ) ) { + + // Create the date + datePassed = new Date( datePassed ) + } + + + // Otherwise if it's not unlimited + else if ( !unlimited ) { + + // Set the date to today + datePassed = new Date() + + // Set the time to midnight (for comparison purposes) + datePassed.setHours( 0, 0, 0, 0 ) + } + + + // Return the calendar date object + return { + YEAR: unlimited || datePassed.getFullYear(), + MONTH: unlimited || datePassed.getMonth(), + DATE: unlimited || datePassed.getDate(), + DAY: unlimited || datePassed.getDay(), + TIME: unlimited || datePassed.getTime(), + OBJ: unlimited || datePassed + } + } //createDate + + + + + /** + * Extend jQuery + */ + $.fn.pickadate = function( options ) { + + var pickadate = 'pickadate' + + // Merge the options with a deep copy + options = $.extend( true, {}, $.fn.pickadate.defaults, options ) + + // Check if it should be disabled + // for browsers that natively support `type=date` + if ( options.disablePicker ) { return this } + + return this.each( function() { + var $this = $( this ) + if ( this.nodeName == 'INPUT' && !$this.data( pickadate ) ) { + $this.data( pickadate, new Picker( $this, options ) ) + } + }) + } //$.fn.pickadate + + + + /** + * Default options for the picker + */ + $.fn.pickadate.defaults = { + + monthsFull: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ], + monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ], + + weekdaysFull: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ], + weekdaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ], + + // Display strings + monthPrev: '◀', + monthNext: '▶', + showMonthsFull: 1, + showWeekdaysShort: 1, + + // Today and clear + today: 'Today', + clear: 'Clear', + + // Date format to show on the input element + format: 'd mmmm, yyyy', + + // Date format to send to the server + formatSubmit: 0, + + // Hidden element name suffix + hiddenSuffix: '_submit', + + // First day of the week: 0 = Sunday, 1 = Monday + firstDay: 0, + + // Month & year dropdown selectors + monthSelector: 0, + yearSelector: 0, + + // Date ranges + dateMin: 0, + dateMax: 0, + + // Dates to disable + datesDisabled: 0, + + // Disable for browsers with native date support + disablePicker: 0, + + // Events + onOpen: 0, + onClose: 0, + onSelect: 0, + onStart: 0, + onRender: 0, + + + // Classes + klass: { + + bodyActive: STRING_PREFIX_DATEPICKER + 'active', + + inputActive: STRING_PREFIX_DATEPICKER + 'input--active', + + holder: STRING_PREFIX_DATEPICKER + 'holder', + opened: STRING_PREFIX_DATEPICKER + 'holder--opened', + focused: STRING_PREFIX_DATEPICKER + 'holder--focused', + + frame: STRING_PREFIX_DATEPICKER + 'frame', + wrap: STRING_PREFIX_DATEPICKER + 'wrap', + + calendar: STRING_PREFIX_DATEPICKER + 'calendar', + + table: STRING_PREFIX_DATEPICKER + 'table', + + header: STRING_PREFIX_DATEPICKER + 'header', + + monthPrev: STRING_PREFIX_DATEPICKER + 'nav--prev', + monthNext: STRING_PREFIX_DATEPICKER + 'nav--next', + + month: STRING_PREFIX_DATEPICKER + 'month', + year: STRING_PREFIX_DATEPICKER + 'year', + + selectMonth: STRING_PREFIX_DATEPICKER + 'select--month', + selectYear: STRING_PREFIX_DATEPICKER + 'select--year', + + weekdays: STRING_PREFIX_DATEPICKER + 'weekday', + + body: STRING_PREFIX_DATEPICKER + 'body', + + day: STRING_PREFIX_DATEPICKER + 'day', + dayDisabled: STRING_PREFIX_DATEPICKER + 'day--disabled', + daySelected: STRING_PREFIX_DATEPICKER + 'day--selected', + dayHighlighted: STRING_PREFIX_DATEPICKER + 'day--highlighted', + dayToday: STRING_PREFIX_DATEPICKER + 'day--today', + dayInfocus: STRING_PREFIX_DATEPICKER + 'day--infocus', + dayOutfocus: STRING_PREFIX_DATEPICKER + 'day--outfocus', + + footer: STRING_PREFIX_DATEPICKER + 'footer', + + buttonClear: STRING_PREFIX_DATEPICKER + 'button--clear', + buttonToday: STRING_PREFIX_DATEPICKER + 'button--today' + } + } //$.fn.pickadate.defaults + + + + + + /** + * Legacy browser support + */ + + /** + * Cross-Browser Split 1.1.1 + * Copyright 2007-2012 Steven Levithan + * Available under the MIT License + * http://blog.stevenlevithan.com/archives/cross-browser-split + */ + var nativeSplit = String.prototype.split, compliantExecNpcg = /()??/.exec('')[1] === undefined + String.prototype.split = function(separator, limit) { + var str = this + if (Object.prototype.toString.call(separator) !== '[object RegExp]') { + return nativeSplit.call(str, separator, limit) + } + var output = [], + flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.extended ? 'x' : '') + + (separator.sticky ? 'y' : ''), + lastLastIndex = 0, + separator2, match, lastIndex, lastLength + separator = new RegExp(separator.source, flags + 'g') + str += '' + if (!compliantExecNpcg) { + separator2 = new RegExp('^' + separator.source + '$(?!\\s)', flags) + } + limit = limit === undefined ? -1 >>> 0 : limit >>> 0 + while (match = separator.exec(str)) { + lastIndex = match.index + match[0].length + if (lastIndex > lastLastIndex) { + output.push(str.slice(lastLastIndex, match.index)) + if (!compliantExecNpcg && match.length > 1) { + match[0].replace(separator2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) { + match[i] = undefined + } + } + }) + } + if (match.length > 1 && match.index < str.length) { + Array.prototype.push.apply(output, match.slice(1)) + } + lastLength = match[0].length + lastLastIndex = lastIndex + if (output.length >= limit) { + break + } + } + if (separator.lastIndex === match.index) { + separator.lastIndex++ + } + } + if (lastLastIndex === str.length) { + if (lastLength || !separator.test('')) { + output.push('') + } + } else { + output.push(str.slice(lastLastIndex)) + } + return output.length > limit ? output.slice(0, limit) : output + } + + + // isArray support + if ( !Array.isArray ) { + Array.isArray = function( value ) { + return {}.toString.call( value ) == '[object Array]' + } + } + + + // Map array support + if ( ![].map ) { + Array.prototype.map = function ( callback, self ) { + var array = this, len = array.length, newArray = new Array( len ) + for ( var i = 0; i < len; i++ ) { + if ( i in array ) { + newArray[ i ] = callback.call( self, array[ i ], i, array ) + } + } + return newArray + } + } + + + // Filter array support + if ( ![].filter ) { + Array.prototype.filter = function( callback ) { + if ( this == null ) throw new TypeError() + var t = Object( this ), len = t.length >>> 0 + if ( typeof callback != 'function' ) throw new TypeError() + var newArray = [], thisp = arguments[ 1 ] + for ( var i = 0; i < len; i++ ) { + if ( i in t ) { + var val = t[ i ] + if ( callback.call( thisp, val, i, t ) ) newArray.push( val ) + } + } + return newArray + } + } + + + // Index of array support + if ( ![].indexOf ) { + Array.prototype.indexOf = function( searchElement ) { + if ( this == null ) throw new TypeError() + var t = Object( this ), len = t.length >>> 0 + if ( len === 0 ) return -1 + var n = 0 + if ( arguments.length > 1 ) { + n = Number( arguments[ 1 ] ) + if ( n != n ) { + n = 0 + } + else if ( n != 0 && n != Infinity && n != -Infinity ) { + n = ( n > 0 || -1 ) * Math.floor( Math.abs( n ) ) + } + } + if ( n >= len ) return -1 + var k = n >= 0 ? n : Math.max( len - Math.abs( n ), 0 ) + for ( ; k < len; k++ ) { + if ( k in t && t[ k ] === searchElement ) return k + } + return -1 + } + } + + + +})( jQuery, document ); + + + + + + diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/source/pickadate.legacy.min.js b/js/pickadate.js-3.5.3/v2-(deprecated)/source/pickadate.legacy.min.js new file mode 100644 index 0000000..2419987 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/source/pickadate.legacy.min.js @@ -0,0 +1,7 @@ +/*! + * pickadate.js v2.1.8 - 25 March, 2013 + * By Amsul (http://amsul.ca) + * Hosted on https://github.com/amsul/pickadate.js + * Licensed under MIT ("expat" flavour) license. + */ +;(function(d,k,f){var g=7,o=6,e=o*g,j="div",i="pickadate__",l=navigator.userAgent.match(/MSIE/),p=d(k),n=d(k.body),h=function(K,ah){var Q=function(){},z=Q.prototype={constructor:Q,$node:K,init:function(){K.on({"focus click":function(){if(!l||(l&&!ab._IE)){z.open()}I.addClass(S.focused);ab._IE=0},blur:function(){I.removeClass(S.focused)},change:function(){if(R){R.value=Z.value?N(ah.formatSubmit):""}},keydown:function(ak){var P=ak.keyCode,al=P==8||P==46;if(al||!ab.isOpen&&B[P]){ak.preventDefault();W(ak);if(al){z.clear().close()}else{z.open()}}}}).after([I,R]);if(Z.autofocus){z.open()}ab.items=v();a(ah.onStart,z);a(ah.onRender,z);return z},open:function(){if(ab.isOpen){return z}ab.isOpen=1;u(0);K.focus().addClass(S.inputActive);I.addClass(S.opened);n.addClass(S.bodyActive);p.on("focusin.P"+ab.id,function(P){if(!I.find(P.target).length&&P.target!=Z){z.close()}}).on("click.P"+ab.id,function(P){if(P.target!=Z){z.close()}}).on("keydown.P"+ab.id,function(ak){var P=ak.keyCode,al=B[P];if(P==27){Z.focus();z.close()}else{if(ak.target==Z&&(al||P==13)){ak.preventDefault();if(al){F(t([aa.YEAR,aa.MONTH,D.DATE+al],al),1)}else{aj(D);ag();z.close()}}}});a(ah.onOpen,z);return z},close:function(){if(!ab.isOpen){return z}ab.isOpen=0;u(-1);K.removeClass(S.inputActive);I.removeClass(S.opened);n.removeClass(S.bodyActive);p.off(".P"+ab.id);a(ah.onClose,z);return z},isOpen:function(){return ab.isOpen===1},show:function(ak,P){O(--ak,P);return z},clear:function(){aj(0);ag();return z},getDate:function(P){return P===true?U.OBJ:!Z.value?"":N(P)},setDate:function(ak,am,P,al){F(t([ak,--am,P]),al);return z},getDateLimit:function(P,ak){return N(ak,P?af:C)},setDateLimit:function(P,ak){if(ak){af=Y(P,ak);if(aa.TIME>af.TIME){aa=af}}else{C=Y(P);if(aa.TIME-1};if(ab.off){w.map(function(ak){if(ak.TIMEC.TIME){L=ak}if(ak.TIME>x.TIME&&ak.TIME<=af.TIME){x=ak}});return function(ak,al,am){return(am.map(P,this).indexOf(true)<0)}}return P})(),D=(function(ak,P){if(ak){P={};M.toArray(ah.formatSubmit).map(function(am){var al=M[am]?M[am](ak,P):am.length;if(M[am]){P[am]=ak.slice(0,al)}ak=ak.slice(al)});P=[+(P.yyyy||P.yy),+(P.mm||P.m)-1,+(P.dd||P.d)]}else{P=Date.parse(P)}return t(P&&(!isNaN(P)||Array.isArray(P))?P:s)})(Z.getAttribute("data-value"),Z.value),U=D,aa=D,R=ah.formatSubmit?d("").val(Z.value?N(ah.formatSubmit):"")[0]:null,X=(function(P){if(ah.firstDay){P.push(P.splice(0,1)[0])}return r("thead",r("tr",P.map(function(ak){return r("th",ak,S.weekdays)})))})((ah.showWeekdaysShort?ah.weekdaysShort:ah.weekdaysFull).slice(0)),I=d(r(j,G(),S.holder)).on("mousedown",function(P){if(ab.items.indexOf(P.target)<0){P.preventDefault()}}).on("click",function(ak){if(!ab.isOpen&&!ak.clientX&&!ak.clientY){return}var al,P=d(ak.target),am=P.data();W(ak);Z.focus();ab._IE=1;if(am.nav){O(aa.MONTH+am.nav)}else{if(am.clear){z.clear().close()}else{if(am.date){al=am.date.split("/");z.setDate(+al[0],+al[1],+al[2]).close()}else{if(P[0]==I[0]){z.close()}}}}}),B={40:7,38:-7,39:1,37:-1};function Y(P,ak){if(P===true){return s}if(Array.isArray(P)){--P[1];return c(P)}if(P&&!isNaN(P)){return c([s.YEAR,s.MONTH,s.DATE+P])}return c(0,ak?Infinity:-Infinity)}function t(ak,am,P){ak=!ak.TIME?c(ak):ak;if(ab.off&&!ab.offDays){ak=ak.TIMEx.TIME?x:ak}else{if(w){var al=ak;while(w.filter(H,ak).length){ak=c([ak.YEAR,ak.MONTH,ak.DATE+(am||1)]);if(!P&&ak.MONTH!=al.MONTH){al=ak=c([al.YEAR,al.MONTH,am<0?--al.DATE:++al.DATE])}}}}if(ak.TIMEaf.TIME){ak=t(af,-1,1)}}return ak}function y(ak){if((ak&&aa.YEAR>=af.YEAR&&aa.MONTH>=af.MONTH)||(!ak&&aa.YEAR<=C.YEAR&&aa.MONTH<=C.MONTH)){return""}var P="month"+(ak?"Next":"Prev");return r(j,ah[P],S[P],"data-nav="+(ak||-1))}function J(P){return ah.monthSelector?r("select",P.map(function(ak,al){return r("option",ak,0,"value="+al+(aa.MONTH==al?" selected":"")+A(al,aa.YEAR," disabled",""))}),S.selectMonth,V()):r(j,P[aa.MONTH],S.month)}function ad(){var aq=aa.YEAR,ao=ah.yearSelector;if(ao){ao=ao===true?5:~~(ao/2);var al=[],P=aq-ao,ap=ae(P,C.YEAR),an=aq+ao+(ap-P),am=ae(an,af.YEAR,1);ap=ae(P-(an-am),C.YEAR);for(var ak=0;ak<=am-ap;ak+=1){al.push(ap+ak)}return r("select",al.map(function(ar){return r("option",ar,0,"value="+ar+(aq==ar?" selected":""))}),S.selectYear,V())}return r(j,aq,S.year)}function E(){var ak,aq,am,ap=[],ao="",P=c([aa.YEAR,aa.MONTH+1,0]).DATE,an=c([aa.YEAR,aa.MONTH,1]).DAY+(ah.firstDay?-2:-1);an+=an<-1?7:0;for(var al=0;al0&&aq<=P));ap.push(r("td",r(j,ak.DATE,am[0],am[1])));if((al%g)+1==g){ao+=r("tr",ap.splice(0,g))}}return r("tbody",ao,S.body)}function T(ak,al){var am,P=[S.day,(al?S.dayInfocus:S.dayOutfocus)];if(ak.TIMEaf.TIME||(w&&w.filter(H,ak).length)){am=1;P.push(S.dayDisabled)}if(ak.TIME==s.TIME){P.push(S.dayToday)}if(ak.TIME==D.TIME){P.push(S.dayHighlighted)}if(ak.TIME==U.TIME){P.push(S.daySelected)}return[P.join(" "),"data-"+(am?"disabled":"date")+"="+[ak.YEAR,ak.MONTH+1,ak.DATE].join("/")]}function ai(){return r("button",ah.today,S.buttonToday,"data-date="+N("yyyy/mm/dd",s)+" "+V())+r("button",ah.clear,S.buttonClear,"data-clear=1 "+V())}function G(){return r(j,r(j,r(j,r(j,y()+y(1)+J(ah.showMonthsFull?ah.monthsFull:ah.monthsShort)+ad(),S.header)+r("table",[X,E()],S.table)+r(j,ai(),S.footer),S.calendar),S.wrap),S.frame)}function ae(al,P,ak){return(ak&&alP)?al:P}function A(am,ak,P,al){if(ak<=C.YEAR&&am=af.YEAR&&am>af.MONTH){return P||af.MONTH}return al!=null?al:am}function V(){return"tabindex="+(ab.isOpen?0:-1)}function N(ak,P){return M.toArray(ak||ah.format).map(function(al){return a(M[al],P||U)||al}).join("")}function F(ak,P){D=ak;aa=ak;if(!P){aj(ak)}ag()}function aj(P){U=P||U;K.val(P?N():"").trigger("change");a(ah.onSelect,z)}function ac(P){return I.find("."+P)}function O(ak,P){P=P||aa.YEAR;ak=A(ak,P);aa=c([P,ak,1]);ag()}function u(P){ab.items.map(function(ak){if(ak){ak.tabIndex=P}})}function v(){return[ac(S.selectMonth).on({click:W,change:function(){O(+this.value);ac(S.selectMonth).focus()}})[0],ac(S.selectYear).on({click:W,change:function(){O(aa.MONTH,+this.value);ac(S.selectYear).focus()}})[0],ac(S.buttonToday)[0],ac(S.buttonClear)[0]]}function ag(){I.html(G());ab.items=v();a(ah.onRender,z)}function W(P){P.stopPropagation()}return new z.init()};function a(t,s){if(typeof t=="function"){return t.call(s)}}function b(s){return(s<10?"0":"")+s}function r(v,u,s,t){if(!u){return""}u=Array.isArray(u)?u.join(""):u;s=s?' class="'+s+'"':"";t=t?" "+t:"";return"<"+v+s+t+">"+u+""}function c(t,s){if(Array.isArray(t)){t=new Date(t[0],t[1],t[2])}else{if(!isNaN(t)){t=new Date(t)}else{if(!s){t=new Date();t.setHours(0,0,0,0)}}}return{YEAR:s||t.getFullYear(),MONTH:s||t.getMonth(),DATE:s||t.getDate(),DAY:s||t.getDay(),TIME:s||t.getTime(),OBJ:s||t}}d.fn.pickadate=function(s){var t="pickadate";s=d.extend(true,{},d.fn.pickadate.defaults,s);if(s.disablePicker){return this}return this.each(function(){var u=d(this);if(this.nodeName=="INPUT"&&!u.data(t)){u.data(t,new h(u,s))}})};d.fn.pickadate.defaults={monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],monthPrev:"◀",monthNext:"▶",showMonthsFull:1,showWeekdaysShort:1,today:"Today",clear:"Clear",format:"d mmmm, yyyy",formatSubmit:0,hiddenSuffix:"_submit",firstDay:0,monthSelector:0,yearSelector:0,dateMin:0,dateMax:0,datesDisabled:0,disablePicker:0,onOpen:0,onClose:0,onSelect:0,onStart:0,onRender:0,klass:{bodyActive:i+"active",inputActive:i+"input--active",holder:i+"holder",opened:i+"holder--opened",focused:i+"holder--focused",frame:i+"frame",wrap:i+"wrap",calendar:i+"calendar",table:i+"table",header:i+"header",monthPrev:i+"nav--prev",monthNext:i+"nav--next",month:i+"month",year:i+"year",selectMonth:i+"select--month",selectYear:i+"select--year",weekdays:i+"weekday",body:i+"body",day:i+"day",dayDisabled:i+"day--disabled",daySelected:i+"day--selected",dayHighlighted:i+"day--highlighted",dayToday:i+"day--today",dayInfocus:i+"day--infocus",dayOutfocus:i+"day--outfocus",footer:i+"footer",buttonClear:i+"button--clear",buttonToday:i+"button--today"}};var m=String.prototype.split,q=/()??/.exec("")[1]===f;String.prototype.split=function(x,w){var A=this;if(Object.prototype.toString.call(x)!=="[object RegExp]"){return m.call(A,x,w)}var u=[],v=(x.ignoreCase?"i":"")+(x.multiline?"m":"")+(x.extended?"x":"")+(x.sticky?"y":""),s=0,t,y,z,B;x=new RegExp(x.source,v+"g");A+="";if(!q){t=new RegExp("^"+x.source+"$(?!\\s)",v)}w=w===f?-1>>>0:w>>>0;while(y=x.exec(A)){z=y.index+y[0].length;if(z>s){u.push(A.slice(s,y.index));if(!q&&y.length>1){y[0].replace(t,function(){for(var C=1;C1&&y.index=w){break}}if(x.lastIndex===y.index){x.lastIndex++}}if(s===A.length){if(B||!x.test("")){u.push("")}}else{u.push(A.slice(s))}return u.length>w?u.slice(0,w):u};if(!Array.isArray){Array.isArray=function(s){return{}.toString.call(s)=="[object Array]"}}if(![].map){Array.prototype.map=function(x,u){var w=this,t=w.length,s=new Array(t);for(var v=0;v>>0;if(typeof z!="function"){throw new TypeError()}var s=[],w=arguments[1];for(var v=0;v>>0;if(s===0){return -1}var x=0;if(arguments.length>1){x=Number(arguments[1]);if(x!=x){x=0}else{if(x!=0&&x!=Infinity&&x!=-Infinity){x=(x>0||-1)*Math.floor(Math.abs(x))}}}if(x>=s){return -1}var u=x>=0?x:Math.max(s-Math.abs(x),0);for(;uad.TIME){Y=ad}}else{A=W(P);if(Y.TIME-1};if(Z.off){u.map(function(ai){if(ai.TIMEA.TIME){J=ai}if(ai.TIME>v.TIME&&ai.TIME<=ad.TIME){v=ai}});return function(ai,aj,ak){return(ak.map(P,this).indexOf(true)<0)}}return P})(),B=(function(ai,P){if(ai){P={};K.toArray(af.formatSubmit).map(function(ak){var aj=K[ak]?K[ak](ai,P):ak.length;if(K[ak]){P[ak]=ai.slice(0,aj)}ai=ai.slice(aj)});P=[+(P.yyyy||P.yy),+(P.mm||P.m)-1,+(P.dd||P.d)]}else{P=Date.parse(P)}return r(P&&(!isNaN(P)||Array.isArray(P))?P:q)})(X.getAttribute("data-value"),X.value),S=B,Y=B,O=af.formatSubmit?g("").val(X.value?L(af.formatSubmit):"")[0]:null,V=(function(P){if(af.firstDay){P.push(P.splice(0,1)[0])}return m("thead",m("tr",P.map(function(ai){return m("th",ai,Q.weekdays)})))})((af.showWeekdaysShort?af.weekdaysShort:af.weekdaysFull).slice(0)),G=g(m(o,E(),Q.holder)).on("mousedown",function(P){if(Z.items.indexOf(P.target)<0){P.preventDefault()}}).on("click",function(ai){if(!Z.isOpen&&!ai.clientX&&!ai.clientY){return}var aj,P=g(ai.target),ak=P.data();U(ai);X.focus();Z._IE=1;if(ak.nav){M(Y.MONTH+ak.nav)}else{if(ak.clear){x.clear().close()}else{if(ak.date){aj=ak.date.split("/");x.setDate(+aj[0],+aj[1],+aj[2]).close()}else{if(P[0]==G[0]){x.close()}}}}}),z={40:7,38:-7,39:1,37:-1};function W(P,ai){if(P===true){return q}if(Array.isArray(P)){--P[1];return l(P)}if(P&&!isNaN(P)){return l([q.YEAR,q.MONTH,q.DATE+P])}return l(0,ai?Infinity:-Infinity)}function r(ai,ak,P){ai=!ai.TIME?l(ai):ai;if(Z.off&&!Z.offDays){ai=ai.TIMEv.TIME?v:ai}else{if(u){var aj=ai;while(u.filter(F,ai).length){ai=l([ai.YEAR,ai.MONTH,ai.DATE+(ak||1)]);if(!P&&ai.MONTH!=aj.MONTH){aj=ai=l([aj.YEAR,aj.MONTH,ak<0?--aj.DATE:++aj.DATE])}}}}if(ai.TIMEad.TIME){ai=r(ad,-1,1)}}return ai}function w(ai){if((ai&&Y.YEAR>=ad.YEAR&&Y.MONTH>=ad.MONTH)||(!ai&&Y.YEAR<=A.YEAR&&Y.MONTH<=A.MONTH)){return""}var P="month"+(ai?"Next":"Prev");return m(o,af[P],Q[P],"data-nav="+(ai||-1))}function H(P){return af.monthSelector?m("select",P.map(function(ai,aj){return m("option",ai,0,"value="+aj+(Y.MONTH==aj?" selected":"")+y(aj,Y.YEAR," disabled",""))}),Q.selectMonth,T()):m(o,P[Y.MONTH],Q.month)}function ab(){var ao=Y.YEAR,am=af.yearSelector;if(am){am=am===true?5:~~(am/2);var aj=[],P=ao-am,an=ac(P,A.YEAR),al=ao+am+(an-P),ak=ac(al,ad.YEAR,1);an=ac(P-(al-ak),A.YEAR);for(var ai=0;ai<=ak-an;ai+=1){aj.push(an+ai)}return m("select",aj.map(function(ap){return m("option",ap,0,"value="+ap+(ao==ap?" selected":""))}),Q.selectYear,T())}return m(o,ao,Q.year)}function C(){var ai,ao,ak,an=[],am="",P=l([Y.YEAR,Y.MONTH+1,0]).DATE,al=l([Y.YEAR,Y.MONTH,1]).DAY+(af.firstDay?-2:-1);al+=al<-1?7:0;for(var aj=0;aj0&&ao<=P));an.push(m("td",m(o,ai.DATE,ak[0],ak[1])));if((aj%p)+1==p){am+=m("tr",an.splice(0,p))}}return m("tbody",am,Q.body)}function R(ai,aj){var ak,P=[Q.day,(aj?Q.dayInfocus:Q.dayOutfocus)];if(ai.TIMEad.TIME||(u&&u.filter(F,ai).length)){ak=1;P.push(Q.dayDisabled)}if(ai.TIME==q.TIME){P.push(Q.dayToday)}if(ai.TIME==B.TIME){P.push(Q.dayHighlighted)}if(ai.TIME==S.TIME){P.push(Q.daySelected)}return[P.join(" "),"data-"+(ak?"disabled":"date")+"="+[ai.YEAR,ai.MONTH+1,ai.DATE].join("/")]}function ag(){return m("button",af.today,Q.buttonToday,"data-date="+L("yyyy/mm/dd",q)+" "+T())+m("button",af.clear,Q.buttonClear,"data-clear=1 "+T())}function E(){return m(o,m(o,m(o,m(o,w()+w(1)+H(af.showMonthsFull?af.monthsFull:af.monthsShort)+ab(),Q.header)+m("table",[V,C()],Q.table)+m(o,ag(),Q.footer),Q.calendar),Q.wrap),Q.frame)}function ac(aj,P,ai){return(ai&&ajP)?aj:P}function y(ak,ai,P,aj){if(ai<=A.YEAR&&ak=ad.YEAR&&ak>ad.MONTH){return P||ad.MONTH}return aj!=null?aj:ak}function T(){return"tabindex="+(Z.isOpen?0:-1)}function L(ai,P){return K.toArray(ai||af.format).map(function(aj){return c(K[aj],P||S)||aj}).join("")}function D(ai,P){B=ai;Y=ai;if(!P){ah(ai)}ae()}function ah(P){S=P||S;I.val(P?L():"").trigger("change");c(af.onSelect,x)}function aa(P){return G.find("."+P)}function M(ai,P){P=P||Y.YEAR;ai=y(ai,P);Y=l([P,ai,1]);ae()}function s(P){Z.items.map(function(ai){if(ai){ai.tabIndex=P}})}function t(){return[aa(Q.selectMonth).on({click:U,change:function(){M(+this.value);aa(Q.selectMonth).focus()}})[0],aa(Q.selectYear).on({click:U,change:function(){M(Y.MONTH,+this.value);aa(Q.selectYear).focus()}})[0],aa(Q.buttonToday)[0],aa(Q.buttonClear)[0]]}function ae(){G.html(E());Z.items=t();c(af.onRender,x)}function U(P){P.stopPropagation()}return new x.init()};function c(r,q){if(typeof r=="function"){return r.call(q)}}function e(q){return(q<10?"0":"")+q}function m(t,s,q,r){if(!s){return""}s=Array.isArray(s)?s.join(""):s;q=q?' class="'+q+'"':"";r=r?" "+r:"";return"<"+t+q+r+">"+s+""}function l(r,q){if(Array.isArray(r)){r=new Date(r[0],r[1],r[2])}else{if(!isNaN(r)){r=new Date(r)}else{if(!q){r=new Date();r.setHours(0,0,0,0)}}}return{YEAR:q||r.getFullYear(),MONTH:q||r.getMonth(),DATE:q||r.getDate(),DAY:q||r.getDay(),TIME:q||r.getTime(),OBJ:q||r}}g.fn.pickadate=function(q){var r="pickadate";q=g.extend(true,{},g.fn.pickadate.defaults,q);if(q.disablePicker){return this}return this.each(function(){var s=g(this);if(this.nodeName=="INPUT"&&!s.data(r)){s.data(r,new k(s,q))}})};g.fn.pickadate.defaults={monthsFull:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdaysFull:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],monthPrev:"◀",monthNext:"▶",showMonthsFull:1,showWeekdaysShort:1,today:"Today",clear:"Clear",format:"d mmmm, yyyy",formatSubmit:0,hiddenSuffix:"_submit",firstDay:0,monthSelector:0,yearSelector:0,dateMin:0,dateMax:0,datesDisabled:0,disablePicker:0,onOpen:0,onClose:0,onSelect:0,onStart:0,onRender:0,klass:{bodyActive:n+"active",inputActive:n+"input--active",holder:n+"holder",opened:n+"holder--opened",focused:n+"holder--focused",frame:n+"frame",wrap:n+"wrap",calendar:n+"calendar",table:n+"table",header:n+"header",monthPrev:n+"nav--prev",monthNext:n+"nav--next",month:n+"month",year:n+"year",selectMonth:n+"select--month",selectYear:n+"select--year",weekdays:n+"weekday",body:n+"body",day:n+"day",dayDisabled:n+"day--disabled",daySelected:n+"day--selected",dayHighlighted:n+"day--highlighted",dayToday:n+"day--today",dayInfocus:n+"day--infocus",dayOutfocus:n+"day--outfocus",footer:n+"footer",buttonClear:n+"button--clear",buttonToday:n+"button--today"}}})(jQuery,document); \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/themes.htm b/js/pickadate.js-3.5.3/v2-(deprecated)/themes.htm new file mode 100644 index 0000000..2099d30 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/themes.htm @@ -0,0 +1,1483 @@ + + + + + + + + + +Pickadate.js • Themes + + + + + + + + + + + + + + + + + + + + + + + +
+ +

pickadate.jsBack to v3

+

A mobile-friendly, responsive, and lightweight jQuery dateinput picker
9.6kb min, 4.0kb gzipped

+ +

Download pickadate.js v2.1.8 (for old browsers) or read the docs

+ +
+ + +
+ +

§Default

+ +
+ +
+ +
+ + +
+ +

For all the themes below, you can scroll the picker into view with something like this:

+ +
$( '.datepicker' ).pickadate({
+    onOpen: function() {
+        scrollPageTo( this.$node )
+    }
+})
+
+function scrollPageTo( $node ) {
+    $( 'html, body' ).animate({
+        scrollTop: ~~$node.offset().top - 60
+    }, 150)
+}
+ +
+ + +
+ +

§Classic

+ +
+ +
+ +
+ + +
+ +

§Inline

+ +
+ +
+ +
+ + +
+ +

§Inline fixed

+ +
+ +
+ +
+ + +
+

Download pickadate.js v2.1.8

+ +

Browser support: IE7+, Chrome, Firefox, Safari, Opera, iOS Safari, Android browser

+

Dependency: jQuery 1.7+

+
+

Read the docs or view project on Github

+
+ + +
+

Featured on The Treehouse Show

+

Made by Amsul

+
+ + + + + + + + + + + + + diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.01.default.css b/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.01.default.css new file mode 100644 index 0000000..e78bf8a --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.01.default.css @@ -0,0 +1,467 @@ + + +/** + * Default mobile-first, responsive styling for pickadate.js + * Demo: http://amsul.github.com/pickadate.js/themes.htm#default + */ + +/** + * Colors used: + * + * #0089ec -> Base blue + * #b1dcfb -> Hover blue bg + * + * #0059bc -> Dark blue for "today" tag + * #aaa -> Light grey for "today" tag if disabled + * + * #f5f5f5 -> Dimmed grey bg for disabled days + * #ddd -> Less dimmed grey for text in disabled & outfocus days + * + * #777 -> Grey for calendar border + * #888 -> Slightly lighter grey for calendar top border + * + * #999 -> Medium grey used for year & weekday labels + * + * #e20 -> Red used for "clear" icon + * + * #000 -> Black + * #fff -> White + * + */ + + +/** + * When the calendar is open + */ + +/* Prevent the page from scrolling */ +/*body*/.pickadate__active { + overflow: hidden; +} + +/* And add the "active" state to the input */ +/*input*/.pickadate__input--active { + border-color: #0089ec !important; +} + + + +/** + * The holder that fills the entire screen + */ +.pickadate__holder { + + /* The base font-size */ + font-size: 16px; + + line-height: 1.2; + color: #000; + + position: fixed; + z-index: 10000; + + width: 100%; + height: 100%; + + /* Fade out the background, then immediately hide the holder */ + -webkit-transition: background .15s ease-out, top 0s .2s; + -moz-transition: background .15s ease-out, top 0s .2s; + transition: background .15s ease-out, top 0s .2s; +} + +/** + * The frame that bounds the calendar + */ +.pickadate__frame { + min-width: 256px; + max-width: 666px; + width: 100%; + margin: 0 auto; + + position: absolute; + + /* Allow the frame to be scrolled in case the screen is too small */ + overflow: auto; + -webkit-overflow-scrolling: touch; + + /* Animate the frame in and out of view */ + -webkit-transition: all .15s ease-out; + -moz-transition: all .15s ease-out; + transition: all .15s ease-out; +} + +/** + * Make the calendar holder and frame fullscreen + */ +.pickadate__holder, +.pickadate__frame { + top: 100%; + bottom: 0; + left: 0; + right: 0; +} + + +/** + * When the calendar opens + */ +.pickadate__holder--opened { + + /* Show a translucent black background (order is important for IE) */ + background: transparent; + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#1E000000,endColorstr=#1E000000)"; /* IE8 */ + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#1E000000,endColorstr=#1E000000); /* IE6 & 7 */ + zoom: 1; + background: rgba(0,0,0,.32); /* Normal browsers */ + + /* Animate in the background */ + -webkit-transition: background .15s ease-out; + -moz-transition: background .15s ease-out; + transition: background .15s ease-out; +} + +/* Bring the holder and frame into view */ +.pickadate__holder--opened, +.pickadate__holder--opened .pickadate__frame { + top: 0; +} + + + + + + + +/** + * The calendar wrapper + */ +.pickadate__wrap { + display: table; + width: 100%; + height: 100%; +} + +/** + * The calendar itself + */ +.pickadate__calendar { + display: table-cell; + vertical-align: middle; + background: #fff; + padding: 1em; +} + + + +/** + * The calendar table of dates + */ +.pickadate__table { + text-align: center; + border-collapse: collapse; + border-spacing: 0; + table-layout: fixed; + font-size: inherit; + width: 100%; + margin-top: .5em; +} + +/* Remove browser stylings on a table cell */ +.pickadate__table td { + margin: 0; + padding: 0; +} + + + +/** + * The header containing the month and year tags/selectors + */ +.pickadate__header { + text-align: center; + position: relative; +} + +.pickadate__nav--prev, +.pickadate__nav--next { + position: absolute; + top: -.1em; + padding: .5em; + margin: -.5em; + text-align: center; + min-width: 24px; + height: 24px; + line-height: 26px; +} +.pickadate__nav--prev { + left: 0; +} +.pickadate__nav--next { + right: 0; +} + +.pickadate__month, +.pickadate__year { + font-weight: 500; + display: inline-block; +} +.pickadate__year { + color: #999; + font-size: .8em; + font-style: italic; + margin-left: .5em; +} + +.pickadate__select--month, +.pickadate__select--year { + font-size: .8em; + border: 1px solid #ccc; + height: 2.5em; + padding: .66em .25em; /* For firefox */ + margin-top: -.5em; +} +.pickadate__select--month { + width: 35%; +} +.pickadate__select--year { + width: 22.5%; + margin-left: .5em; +} +.pickadate__select--month:focus, +.pickadate__select--year:focus { + border-color: #0089ec; +} + + + + +/** + * The weekday labels + */ +.pickadate__weekday { + width: 14.285714286%; /* 100/7 */ + font-size: .75em; + padding-bottom: .25em; + color: #999; + font-weight: 500; +} + + +/** + * The days on the calendar + */ +.pickadate__day { + padding: .33em 0 .25em; + font-weight: 100; + border: 1px solid #fff; + margin-bottom: 1px; +} + +/** + * The various states of a day + */ +.pickadate__day--today { + color: #0089ec; + position: relative; +} +.pickadate__day--today:before { + content: " "; + position: absolute; + top: 2px; + right: 2px; + width: 0; + height: 0; + border-top: .5em solid #0059bc; + border-left: .5em solid transparent; +} +.pickadate__day--selected, +.pickadate__day--selected:hover { + border-color: #0089ec; +} +.pickadate__day--highlighted { + background: #fff; +} +.pickadate__day--disabled:before { + border-top-color: #aaa; +} +.pickadate__day--outfocus { + color: #ddd; + + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; + filter: alpha(opacity=75); + -moz-opacity: .75; + opacity: .75; +} + + + + + +/** + * The footer containing the "today" and "clear" buttons + */ +.pickadate__footer { + text-align: center; + margin: .25em 0 -.75em; +} + +.pickadate__button--today, +.pickadate__button--clear { + border: 1px solid #fff; + background: #fff; + font-size: .8em; + padding: .66em 0; + margin: 0 2.5%; + font-weight: bold; + width: 40%; +} +.pickadate__button--today:before, +.pickadate__button--clear:before { + position: relative; + display: inline-block; + height: 0; +} +.pickadate__button--today:before { + content: " "; + margin-right: .45em; + top: -.05em; + width: 0; + border-top: .66em solid #0059bc; + border-left: .66em solid transparent; +} +.pickadate__button--clear:before { + content: "\D7"; + margin-right: .35em; + top: -.1em; + color: #e20; + vertical-align: top; + font-size: 1.1em; +} +.pickadate__button--today:focus, +.pickadate__button--clear:focus { + background: #b1dcfb; + border-color: #0089ec; + outline: none; +} + + + + +/** + * The hover effect on any buttons + */ +.pickadate__day--infocus:hover, +.pickadate__day--outfocus:hover, +.pickadate__nav--prev:hover, +.pickadate__nav--next:hover, +.pickadate__button--today:hover, +.pickadate__button--clear:hover { + cursor: pointer; + color: #000; + background: #b1dcfb; +} +.pickadate__day--disabled, +.pickadate__day--disabled:hover { + background: #f5f5f5; + border-color: #f5f5f5; + color: #ddd; + cursor: default; +} +.pickadate__day--highlighted:hover, +.pickadate__holder--focused .pickadate__day--highlighted { + background: #0089ec; + color: #fff; +} + + + + +/** + * Adjust the calendar for not so tiny screens + * by just increasing the font size a bit + */ +@media (min-height: 342px) { + .pickadate__calendar { + font-size: 1.25em; + } +} + + +/** + * For bigger viewports, adjust the calendar + * to not cover the entire screen + */ +@media (min-height: 424px) { + + /* Align the frame to the bottom, rather than top */ + .pickadate__frame { + overflow: visible; + top: auto; + bottom: -100%; + } + .pickadate__holder--opened .pickadate__frame { + top: auto; + bottom: 0; + } + + + /* Remove the calendar middle-aligned styling */ + .pickadate__wrap, + .pickadate__calendar { + display: block; + } + .pickadate__calendar { + + /* Increase the font size a bit more */ + font-size: 1.33em; + + /* Add the borders except the bottom one */ + border: 1px solid #777; + border-top-color: #888; + border-bottom-width: 0; + + /* Make 'em rounded at the top corners */ + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; + + /* And finally, add a nice shadow */ + -webkit-box-shadow: 0 12px 36px 16px rgba(0,0,0,.24); + -moz-box-shadow: 0 12px 36px 16px rgba(0,0,0,.24); + box-shadow: 0 12px 36px 16px rgba(0,0,0,.24); + } + + + /* Increase the spacing a tad */ + .pickadate__table { + margin-top: .75em; + } + .pickadate__weekday { + padding-bottom: .5em; + } + .pickadate__footer { + margin: .5em 0 -.5em; + } +} + + +/** + * For bigger monitors still, move it away + * from the bottom edge of the screen + * and round the top and bottom corners. + */ +@media (min-height: 542px) { + + .pickadate__frame { + margin-bottom: 5%; + } + + .pickadate__calendar { + font-size: 1.5em; + border-bottom-width: 1px; + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + } +} diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.02.classic.css b/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.02.classic.css new file mode 100644 index 0000000..a3b90d1 --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.02.classic.css @@ -0,0 +1,331 @@ + + +/** + * Classic styling for pickadate.js + * Demo: http://amsul.github.com/pickadate.js/themes.htm#classic + */ + +/** + * Colors used: + * + * #0089ec -> Base blue + * #b1dcfb -> Hover blue bg + * + * #0059bc -> Dark blue for "today" tag + * #aaa -> Light grey for "today" tag if disabled + * + * #f5f5f5 -> Dimmed grey bg for disabled days + * #ddd -> Less dimmed grey for text in disabled & outfocus days + * + * #777 -> Grey for calendar border + * #888 -> Slightly lighter grey for calendar top border + * + * #999 -> Medium grey used for year & weekday labels + * + * #e20 -> Red used for "clear" icon + * + * #000 -> Black + * #fff -> White + * + */ + + +/** + * When the calendar is open + */ + +/* And add the "active" state to the input */ +/*input*/.pickadate__input--active { + border-color: #0089ec !important; +} + + + +/** + * The picker holder + */ +.pickadate__holder { + + /* The base font-size */ + font-size: 16px; + + line-height: 1.2; + color: #000; + + position: absolute; + z-index: 10000; + + width: 100%; + height: 0; +} + + +/** + * The frame that bounds the calendar + */ +.pickadate__frame { + position: relative; + max-width: 420px; + min-width: 256px; + max-height: 0; + overflow-y: hidden; + + -webkit-transition: all .15s ease-out; + -moz-transition: all .15s ease-out; + transition: all .15s ease-out; +} + + +/** + * When the calendar opens + */ +.pickadate__holder--opened .pickadate__frame { + top: .5em; + max-height: 25em; + + -webkit-box-shadow: 0 6px 18px 1px rgba(0,0,0,.12); + -moz-box-shadow: 0 6px 18px 1px rgba(0,0,0,.12); + box-shadow: 0 6px 18px 1px rgba(0,0,0,.12); +} + + +/** + * The calendar itself + */ + +.pickadate__calendar { + color: #000; + background: #fff; + + padding: 1em; + font-size: 1em; + + /* Add the borders */ + border: 1px solid #ccc; + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + + + +/** + * The calendar table of dates + */ +.pickadate__table { + text-align: center; + border-collapse: collapse; + border-spacing: 0; + table-layout: fixed; + font-size: inherit; + width: 100%; + margin-top: .75em; +} + +/* Remove browser stylings on a table cell */ +.pickadate__table td { + margin: 0; + padding: 0; +} + + + +/** + * The header containing the month and year tags/selectors + */ +.pickadate__header { + text-align: center; + position: relative; +} + +.pickadate__nav--prev, +.pickadate__nav--next { + position: absolute; + top: -.1em; + padding: .5em; + margin: -.5em; + text-align: center; + min-width: 24px; + height: 24px; + line-height: 26px; +} +.pickadate__nav--prev { + left: 0; +} +.pickadate__nav--next { + right: 0; +} + + +.pickadate__month, +.pickadate__year { + font-weight: 500; + display: inline-block; +} +.pickadate__year { + color: #999; + font-size: .8em; + font-style: italic; + margin-left: .5em; +} + + + +.pickadate__select--month, +.pickadate__select--year { + font-size: .8em; + border: 1px solid #ccc; + height: 2.5em; + margin-top: -.5em; +} +.pickadate__select--month { + width: 35%; +} +.pickadate__select--year { + width: 22.5%; + margin-left: .5em; +} +.pickadate__select--month:focus, +.pickadate__select--year:focus { + border-color: #0089ec; +} + + + + +/** + * The weekday labels + */ +.pickadate__weekday { + width: 14.285714286%; /* 100/7 */ + font-size: .75em; + padding-bottom: .5em; + color: #999; + font-weight: 500; +} + + +/** + * The days on the calendar + */ +.pickadate__day { + padding: .33em 0 .25em; + font-weight: 100; + border: 1px solid #fff; + margin-bottom: 1px; +} + +/** + * The various states of a day + */ +.pickadate__day--today { + color: #0089ec; + position: relative; +} +.pickadate__day--today:before { + content: " "; + position: absolute; + top: 2px; + right: 2px; + width: 0; + height: 0; + border-top: .5em solid #0059bc; + border-left: .5em solid transparent; +} +.pickadate__day--selected, +.pickadate__day--selected:hover { + border-color: #0089ec; +} +.pickadate__day--highlighted { + background: #fff; +} +.pickadate__day--disabled:before { + border-top-color: #aaa; +} +.pickadate__day--outfocus { + color: #ddd; + + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; + filter: alpha(opacity=75); + -moz-opacity: .75; + opacity: .75; +} + + + +/** + * The footer containing the "today" and "clear" buttons + */ +.pickadate__footer { + text-align: center; + margin: .5em 0 -.5em; +} + +.pickadate__button--today, +.pickadate__button--clear { + border: 1px solid #fff; + background: #fff; + font-size: .8em; + padding: .66em 0; + margin: 0 2.5%; + font-weight: bold; + width: 40%; +} +.pickadate__button--today:before, +.pickadate__button--clear:before { + position: relative; + display: inline-block; + height: 0; +} +.pickadate__button--today:before { + content: " "; + margin-right: .45em; + top: -.05em; + width: 0; + border-top: .66em solid #0059bc; + border-left: .66em solid transparent; +} +.pickadate__button--clear:before { + content: "\D7"; + margin-right: .35em; + top: -.1em; + color: #e20; + vertical-align: top; + font-size: 1.1em; +} +.pickadate__button--today:focus, +.pickadate__button--clear:focus { + background: #b1dcfb; + border-color: #0089ec; + outline: none; +} + + + + +/** + * The hover effect on any buttons + */ +.pickadate__day--infocus:hover, +.pickadate__day--outfocus:hover, +.pickadate__nav--prev:hover, +.pickadate__nav--next:hover, +.pickadate__button--today:hover, +.pickadate__button--clear:hover { + cursor: pointer; + color: #000; + background: #b1dcfb; +} +.pickadate__day--disabled, +.pickadate__day--disabled:hover { + background: #f5f5f5; + border-color: #f5f5f5; + color: #ddd; + cursor: default; +} +.pickadate__day--highlighted:hover, +.pickadate__holder--focused .pickadate__day--highlighted { + background: #0089ec; + color: #fff; +} \ No newline at end of file diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.03.inline.css b/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.03.inline.css new file mode 100644 index 0000000..ea7b24e --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.03.inline.css @@ -0,0 +1,316 @@ + + +/** + * Inline styling for pickadate.js + * Demo: http://amsul.github.com/pickadate.js/themes.htm#inline + */ + +/** + * Colors used: + * + * #0089ec -> Base blue + * #b1dcfb -> Hover blue bg + * + * #0059bc -> Dark blue for "today" tag + * #aaa -> Light grey for "today" tag if disabled + * + * #f5f5f5 -> Dimmed grey bg for disabled days + * #ddd -> Less dimmed grey for text in disabled & outfocus days + * + * #777 -> Grey for calendar border + * #888 -> Slightly lighter grey for calendar top border + * + * #999 -> Medium grey used for year & weekday labels + * + * #e20 -> Red used for "clear" icon + * + * #000 -> Black + * #fff -> White + * + */ + + +/** + * When the calendar is open + */ + +/* And add the "active" state to the input */ +/*input*/.pickadate__input--active { + border-color: #0089ec !important; +} + + + +/** + * The picker holder + */ +.pickadate__holder { + + /* The base font-size */ + font-size: 16px; + + line-height: 1.2; + color: #000; +} + + +/** + * The frame that bounds the calendar + */ +.pickadate__frame { + position: relative; + min-width: 256px; + max-height: 0; + overflow-y: hidden; + + -webkit-transition: all .15s ease-out; + -moz-transition: all .15s ease-out; + transition: all .15s ease-out; +} + + +/** + * When the calendar opens + */ +.pickadate__holder--opened .pickadate__frame { + top: .5em; + max-height: 25em; +} + + +/** + * The calendar itself + */ + +.pickadate__calendar { + color: #000; + background: #fff; + + padding: 1em; + font-size: 1em; + + /* Add the borders */ + border: 1px solid #ccc; +} + + + +/** + * The calendar table of dates + */ +.pickadate__table { + text-align: center; + border-collapse: collapse; + border-spacing: 0; + table-layout: fixed; + font-size: inherit; + width: 100%; + margin-top: .75em; +} + +/* Remove browser stylings on a table cell */ +.pickadate__table td { + margin: 0; + padding: 0; +} + + + +/** + * The header containing the month and year tags/selectors + */ +.pickadate__header { + text-align: center; + position: relative; +} + +.pickadate__nav--prev, +.pickadate__nav--next { + position: absolute; + top: -.1em; + padding: .5em; + margin: -.5em; + text-align: center; + min-width: 24px; + height: 24px; + line-height: 26px; +} +.pickadate__nav--prev { + left: 0; +} +.pickadate__nav--next { + right: 0; +} + + +.pickadate__month, +.pickadate__year { + font-weight: 500; + display: inline-block; +} +.pickadate__year { + color: #999; + font-size: .8em; + font-style: italic; + margin-left: .5em; +} + + + +.pickadate__select--month, +.pickadate__select--year { + font-size: .8em; + border: 1px solid #ccc; + height: 2.5em; + margin-top: -.5em; +} +.pickadate__select--month { + width: 35%; +} +.pickadate__select--year { + width: 22.5%; + margin-left: .5em; +} +.pickadate__select--month:focus, +.pickadate__select--year:focus { + border-color: #0089ec; +} + + + + +/** + * The weekday labels + */ +.pickadate__weekday { + width: 14.285714286%; /* 100/7 */ + font-size: .75em; + padding-bottom: .5em; + color: #999; + font-weight: 500; +} + + +/** + * The days on the calendar + */ +.pickadate__day { + padding: .33em 0 .25em; + font-weight: 100; + border: 1px solid #fff; + margin-bottom: 1px; +} + +/** + * The various states of a day + */ +.pickadate__day--today { + color: #0089ec; + position: relative; +} +.pickadate__day--today:before { + content: " "; + position: absolute; + top: 2px; + right: 2px; + width: 0; + height: 0; + border-top: .5em solid #0059bc; + border-left: .5em solid transparent; +} +.pickadate__day--selected, +.pickadate__day--selected:hover { + border-color: #0089ec; +} +.pickadate__day--highlighted { + background: #fff; +} +.pickadate__day--disabled:before { + border-top-color: #aaa; +} +.pickadate__day--outfocus { + color: #ddd; + + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; + filter: alpha(opacity=75); + -moz-opacity: .75; + opacity: .75; +} + + + +/** + * The footer containing the "today" and "clear" buttons + */ +.pickadate__footer { + text-align: center; + margin: .5em 0 -.5em; +} + +.pickadate__button--today, +.pickadate__button--clear { + border: 1px solid #fff; + background: #fff; + font-size: .8em; + padding: .66em 0; + margin: 0 2.5%; + font-weight: bold; + width: 40%; +} +.pickadate__button--today:before, +.pickadate__button--clear:before { + position: relative; + display: inline-block; + height: 0; +} +.pickadate__button--today:before { + content: " "; + margin-right: .45em; + top: -.05em; + width: 0; + border-top: .66em solid #0059bc; + border-left: .66em solid transparent; +} +.pickadate__button--clear:before { + content: "\D7"; + margin-right: .35em; + top: -.1em; + color: #e20; + vertical-align: top; + font-size: 1.1em; +} +.pickadate__button--today:focus, +.pickadate__button--clear:focus { + background: #b1dcfb; + border-color: #0089ec; + outline: none; +} + + + + +/** + * The hover effect on any buttons + */ +.pickadate__day--infocus:hover, +.pickadate__day--outfocus:hover, +.pickadate__nav--prev:hover, +.pickadate__nav--next:hover, +.pickadate__button--today:hover, +.pickadate__button--clear:hover { + cursor: pointer; + color: #000; + background: #b1dcfb; +} +.pickadate__day--disabled, +.pickadate__day--disabled:hover { + background: #f5f5f5; + border-color: #f5f5f5; + color: #ddd; + cursor: default; +} +.pickadate__day--highlighted:hover, +.pickadate__holder--focused .pickadate__day--highlighted { + background: #0089ec; + color: #fff; +} diff --git a/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.04.inline-fixed.css b/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.04.inline-fixed.css new file mode 100644 index 0000000..f9ec68a --- /dev/null +++ b/js/pickadate.js-3.5.3/v2-(deprecated)/themes/pickadate.04.inline-fixed.css @@ -0,0 +1,306 @@ + + +/** + * Inline fixed styling for pickadate.js + * Demo: http://amsul.github.com/pickadate.js/themes.htm#inline_fixed + */ + +/** + * Colors used: + * + * #0089ec -> Base blue + * #b1dcfb -> Hover blue bg + * + * #0059bc -> Dark blue for "today" tag + * #aaa -> Light grey for "today" tag if disabled + * + * #f5f5f5 -> Dimmed grey bg for disabled days + * #ddd -> Less dimmed grey for text in disabled & outfocus days + * + * #777 -> Grey for calendar border + * #888 -> Slightly lighter grey for calendar top border + * + * #999 -> Medium grey used for year & weekday labels + * + * #e20 -> Red used for "clear" icon + * + * #000 -> Black + * #fff -> White + * + */ + + +/** + * When the calendar is open + */ + +/* And add the "active" state to the input */ +/*input*/.pickadate__input--active { + border-color: #0089ec !important; +} + + + +/** + * The picker holder + */ +.pickadate__holder { + + /* The base font-size */ + font-size: 16px; + + line-height: 1.2; + color: #000; +} + + +/** + * The frame that bounds the calendar + */ +.pickadate__frame { + position: relative; + min-width: 256px; + top: .5em; + + -webkit-transition: all .15s ease-out; + -moz-transition: all .15s ease-out; + transition: all .15s ease-out; +} + + +/** + * The calendar itself + */ + +.pickadate__calendar { + color: #000; + background: #fff; + + padding: 1em; + font-size: 1em; + + /* Add the borders */ + border: 1px solid #ccc; +} + + + +/** + * The calendar table of dates + */ +.pickadate__table { + text-align: center; + border-collapse: collapse; + border-spacing: 0; + table-layout: fixed; + font-size: inherit; + width: 100%; + margin-top: .75em; +} + +/* Remove browser stylings on a table cell */ +.pickadate__table td { + margin: 0; + padding: 0; +} + + + +/** + * The header containing the month and year tags/selectors + */ +.pickadate__header { + text-align: center; + position: relative; +} + +.pickadate__nav--prev, +.pickadate__nav--next { + position: absolute; + top: -.1em; + padding: .5em; + margin: -.5em; + text-align: center; + min-width: 24px; + height: 24px; + line-height: 26px; +} +.pickadate__nav--prev { + left: 0; +} +.pickadate__nav--next { + right: 0; +} + + +.pickadate__month, +.pickadate__year { + font-weight: 500; + display: inline-block; +} +.pickadate__year { + color: #999; + font-size: .8em; + font-style: italic; + margin-left: .5em; +} + + + +.pickadate__select--month, +.pickadate__select--year { + font-size: .8em; + border: 1px solid #ccc; + height: 2.5em; + margin-top: -.5em; +} +.pickadate__select--month { + width: 35%; +} +.pickadate__select--year { + width: 22.5%; + margin-left: .5em; +} +.pickadate__select--month:focus, +.pickadate__select--year:focus { + border-color: #0089ec; +} + + + + +/** + * The weekday labels + */ +.pickadate__weekday { + width: 14.285714286%; /* 100/7 */ + font-size: .75em; + padding-bottom: .5em; + color: #999; + font-weight: 500; +} + + +/** + * The days on the calendar + */ +.pickadate__day { + padding: .33em 0 .25em; + font-weight: 100; + border: 1px solid #fff; + margin-bottom: 1px; +} + +/** + * The various states of a day + */ +.pickadate__day--today { + color: #0089ec; + position: relative; +} +.pickadate__day--today:before { + content: " "; + position: absolute; + top: 2px; + right: 2px; + width: 0; + height: 0; + border-top: .5em solid #0059bc; + border-left: .5em solid transparent; +} +.pickadate__day--selected, +.pickadate__day--selected:hover { + border-color: #0089ec; +} +.pickadate__day--highlighted { + background: #fff; +} +.pickadate__day--disabled:before { + border-top-color: #aaa; +} +.pickadate__day--outfocus { + color: #ddd; + + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; + filter: alpha(opacity=75); + -moz-opacity: .75; + opacity: .75; +} + + + +/** + * The footer containing the "today" and "clear" buttons + */ +.pickadate__footer { + text-align: center; + margin: .5em 0 -.5em; +} + +.pickadate__button--today, +.pickadate__button--clear { + border: 1px solid #fff; + background: #fff; + font-size: .8em; + padding: .66em 0; + margin: 0 2.5%; + font-weight: bold; + width: 40%; +} +.pickadate__button--today:before, +.pickadate__button--clear:before { + position: relative; + display: inline-block; + height: 0; +} +.pickadate__button--today:before { + content: " "; + margin-right: .45em; + top: -.05em; + width: 0; + border-top: .66em solid #0059bc; + border-left: .66em solid transparent; +} +.pickadate__button--clear:before { + content: "\D7"; + margin-right: .35em; + top: -.1em; + color: #e20; + vertical-align: top; + font-size: 1.1em; +} +.pickadate__button--today:focus, +.pickadate__button--clear:focus { + background: #b1dcfb; + border-color: #0089ec; + outline: none; +} + + + + +/** + * The hover effect on any buttons + */ +.pickadate__day--infocus:hover, +.pickadate__day--outfocus:hover, +.pickadate__nav--prev:hover, +.pickadate__nav--next:hover, +.pickadate__button--today:hover, +.pickadate__button--clear:hover { + cursor: pointer; + color: #000; + background: #b1dcfb; +} +.pickadate__day--disabled, +.pickadate__day--disabled:hover { + background: #f5f5f5; + border-color: #f5f5f5; + color: #ddd; + cursor: default; +} +.pickadate__day--highlighted:hover, +.pickadate__holder--focused .pickadate__day--highlighted { + background: #0089ec; + color: #fff; +} diff --git a/js/script.js b/js/script.js new file mode 100644 index 0000000..cba4a90 --- /dev/null +++ b/js/script.js @@ -0,0 +1,132 @@ +$(function() { + //Affichage du calendrier en français à la one again + $( "#calendrier").datepicker({ + firstDay: 1, + altField: "#datepicker", + closeText: 'Fermer', + prevText: 'Précédent', + nextText: 'Suivant', + currentText: 'Aujourd\'hui', + monthNames: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'], + monthNamesShort: ['Janv.', 'Févr.', 'Mars', 'Avril', 'Mai', 'Juin', 'Juil.', 'Août', 'Sept.', 'Oct.', 'Nov.', 'Déc.'], + dayNames: ['Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi'], + dayNamesShort: ['Dim.', 'Lun.', 'Mar.', 'Mer.', 'Jeu.', 'Ven.', 'Sam.'], + dayNamesMin: ['D', 'L', 'M', 'M', 'J', 'V', 'S'], + weekHeader: 'Sem.', + dateFormat: 'dd/mm/yy' + }); + + //Rends les tâches draggable + $('ul').sortable({ + cursor: "move", + opacity: 0.35, + update: function(mouseup, item){ + fonctionListeTaches(); + }, + }); + $( '#gauche>button').click(function() {fonctionAjoutTache();}); + $( '.moins' ).click(function() {fonctionEffacer($(this).parent());}); // voir le machin live + $('.nbre').change(function(){fonctionControle($(this));}); + $('#generer>button').click(function() {fonctionGantt();}); +}); + +//Fonction pour faire la liste les tâches +function fonctionListeTaches(){ + $('li').each(function(i){ + j = parseInt(i)+1; + $(this).attr('id',j); + }) + $('.moins').unbind('click'); + $('.nbre').unbind('change'); + $( '.moins' ).click(function() {fonctionEffacer($(this).parent());}); + $('.nbre').change(function(){fonctionControle($(this));}); +} + +// Ajouter un tâche +function fonctionAjoutTache() { + nouvelleTache =$('li:first').clone(); + $("ul").append(nouvelleTache); + fonctionListeTaches(); +} + +//Supprimer une tâche +function fonctionEffacer(li){ + if ($('ul').children().length > 1){ + li.remove(); + fonctionListeTaches(); + }else{alert("Un projet doit contenir au moins une tâche, suppression impossible.");} +} + +//Vérifier qu'on saisit bien un nombre dans le champs nombre de semaines +function fonctionControle(sem){ + var input = sem.val(); + var regex = new RegExp("^[0-9]+$"); + if (!regex.test(input)) { + sem.css('background-color','red'); + alert("Il faut saisir ici un nombre de semaine(s) : uniquement des chiffres !"); + sem.val('1'); + sem.css('background-color','white'); + } +} + +// Initialisation, puis appel des fonctions nécessaires pour faire le graphique +function fonctionGantt() { + $('#mois').html(''); + $('#lignes').html(''); + nbreSemaines = 0; + if ($('#calendrier').val() == ""){ + alert('Sélectionnez une date de début de projet'); + return; + } + fonctionDates(); + fonctionDessin(); +} + +// Calculs sur les dates : il faut calculer la largeur du graph en nombre de jours et pas en mois. +function fonctionDates(){ + dateDebut = new Date($('#calendrier').datepicker('getDate')); + dateFin = new Date($('#calendrier').datepicker('getDate')); + $('.nbre').each(function(i){ + nbreSemaines = nbreSemaines + parseInt($(this).val()); + }) + dateFin.setDate(dateFin.getDate()+nbreSemaines*7); + dureeEnJours = (dateFin.getTime() - dateDebut.getTime())/86400000; + if (dureeEnJours > 365){ + alert("Si votre projet dure plus d'un an c'est qu'il est mal conçu, il faut le découper en plusieurs projets"); + return; + } + moisDebut = dateDebut.getMonth(); + moisFin = dateFin.getMonth(); + if (dateFin.getFullYear() > dateDebut.getFullYear()){moisFin = moisFin+12;} + nbreMois = moisFin-moisDebut; +} + +//Dessin du gantt +function fonctionDessin() { + mois = [["jan",31],["fév",28],["mar",31],["avr",30],["mai",31],["juin",30],["juil",31],["aoû",31],["sep",30],["oct",31],["nov",30],["déc",31]]; + //Pour faire varier la taille du graph en fonction de la durée du projet + echelle = Math.round(365/dureeEnJours)*1,5; + if (echelle > 6){echelle = 6;} + //Libellés des mois (je devrais faire une boucle en utilisant les dates plutôt, je sais pas faire...) + for (var i=moisDebut; i<=moisFin; i++){ + if ((dateDebut.getYear()%4 ==0 && i<13) || (dateFin.getYear()%4 ==0 && i>13)){mois[1][1] == 29;}//pour les années bisextiles + $('#mois').append('
'+mois[i%12][0]+'
'); + largeurMois = mois[i%12][1]/10*echelle; + $('#mois>div:last').css('width',largeurMois+'em') + } + debutGraph = dateDebut.getDate()/10*echelle; + var j =1; + nbreJoursTache=0; + //Boucle pour afficher les libellés et les graphiques + while ($('#'+j).length){ + libelle = $('#'+j+'>input:nth-child(2)').val(); + nbreJoursTache = parseInt($('#'+j+'>input:nth-child(3)').val())*7; + longueurGraph = nbreJoursTache/10*echelle; + //Écriture du libellé et du graph sur une seule ligne + ligne = '

'+libelle+'
 

' + $('#lignes').append(ligne); + if (j%2==0){$('#lignes>p:last').css('background-color','grey');} + debutGraph = debutGraph + longueurGraph; + j++; + } +}