fomantic-ui-sass 2.8.2 → 2.8.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/app/assets/fonts/semantic-ui/brand-icons.eot +0 -0
  4. data/app/assets/fonts/semantic-ui/brand-icons.svg +928 -689
  5. data/app/assets/fonts/semantic-ui/brand-icons.ttf +0 -0
  6. data/app/assets/fonts/semantic-ui/brand-icons.woff +0 -0
  7. data/app/assets/fonts/semantic-ui/brand-icons.woff2 +0 -0
  8. data/app/assets/fonts/semantic-ui/icons.eot +0 -0
  9. data/app/assets/fonts/semantic-ui/icons.svg +610 -426
  10. data/app/assets/fonts/semantic-ui/icons.ttf +0 -0
  11. data/app/assets/fonts/semantic-ui/icons.woff +0 -0
  12. data/app/assets/fonts/semantic-ui/icons.woff2 +0 -0
  13. data/app/assets/fonts/semantic-ui/outline-icons.eot +0 -0
  14. data/app/assets/fonts/semantic-ui/outline-icons.svg +22 -18
  15. data/app/assets/fonts/semantic-ui/outline-icons.ttf +0 -0
  16. data/app/assets/fonts/semantic-ui/outline-icons.woff +0 -0
  17. data/app/assets/fonts/semantic-ui/outline-icons.woff2 +0 -0
  18. data/app/assets/javascripts/semantic-ui/calendar.js +249 -60
  19. data/app/assets/javascripts/semantic-ui/checkbox.js +2 -2
  20. data/app/assets/javascripts/semantic-ui/dimmer.js +3 -3
  21. data/app/assets/javascripts/semantic-ui/dropdown.js +98 -62
  22. data/app/assets/javascripts/semantic-ui/form.js +97 -35
  23. data/app/assets/javascripts/semantic-ui/modal.js +9 -1
  24. data/app/assets/javascripts/semantic-ui/popup.js +8 -7
  25. data/app/assets/javascripts/semantic-ui/progress.js +20 -24
  26. data/app/assets/javascripts/semantic-ui/search.js +30 -2
  27. data/app/assets/javascripts/semantic-ui/slider.js +8 -8
  28. data/app/assets/javascripts/semantic-ui/tab.js +3 -2
  29. data/app/assets/javascripts/semantic-ui/toast.js +11 -9
  30. data/app/assets/javascripts/semantic-ui/visibility.js +1 -1
  31. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +86 -93
  32. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +8 -6
  33. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +36 -35
  34. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +4 -4
  35. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +39 -23
  36. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +9 -3
  37. data/app/assets/stylesheets/semantic-ui/elements/_emoji.scss +1 -1
  38. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +8 -8
  39. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +159 -18
  40. data/app/assets/stylesheets/semantic-ui/elements/_image.scss +33 -4
  41. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +68 -68
  42. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +38 -2
  43. data/app/assets/stylesheets/semantic-ui/elements/_list.scss +12 -12
  44. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +7 -1
  45. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +16 -9
  46. data/app/assets/stylesheets/semantic-ui/elements/_text.scss +15 -0
  47. data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +16 -9
  48. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +1 -0
  49. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +26 -23
  50. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +123 -32
  51. data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +6 -6
  52. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +13 -6
  53. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +36 -7
  54. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +32 -3
  55. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +90 -0
  56. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +1 -0
  57. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +2 -1
  58. data/app/assets/stylesheets/semantic-ui/modules/_slider.scss +9 -0
  59. data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +7 -7
  60. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +34 -34
  61. data/app/assets/stylesheets/semantic-ui/views/_card.scss +1 -1
  62. data/app/assets/stylesheets/semantic-ui/views/_feed.scss +5 -5
  63. data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +4 -4
  64. data/lib/fomantic/ui/sass/version.rb +2 -2
  65. metadata +6 -6
Binary file
@@ -1,8 +1,12 @@
1
1
  <?xml version="1.0" standalone="no"?>
2
+ <!--
3
+ Font Awesome Free 5.12.0 by @fontawesome - https://fontawesome.com
4
+ License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
5
+ -->
2
6
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
7
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
4
8
  <metadata>
5
- Created by FontForge 20190112 at Mon Jan 28 12:50:36 2019
9
+ Created by FontForge 20190801 at Tue Dec 10 16:09:21 2019
6
10
  By Robert Madole
7
11
  Copyright (c) Font Awesome
8
12
  </metadata>
@@ -18,7 +22,7 @@ Copyright (c) Font Awesome
18
22
  descent="-64"
19
23
  bbox="-0.0663408 -64.0662 640.01 448.1"
20
24
  underline-thickness="25"
21
- underline-position="-51"
25
+ underline-position="-50"
22
26
  unicode-range="U+0020-F5C8"
23
27
  />
24
28
  <missing-glyph />
@@ -54,7 +58,7 @@ d="M336 448c26.5098 0 48 -21.4902 48 -48v-464l-192 112l-192 -112v464c0 26.5098 2
54
58
  d="M464 384c26.5098 0 48 -21.4902 48 -48v-288c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h416zM458 48c3.31152 0 6 2.68848 6 6v276c0 3.31152 -2.68848 6 -6 6h-404c-3.31152 0 -6 -2.68848 -6 -6v-276
55
59
  c0 -3.31152 2.68848 -6 6 -6h404zM128 296c22.0908 0 40 -17.9092 40 -40s-17.9092 -40 -40 -40s-40 17.9092 -40 40s17.9092 40 40 40zM96 96v48l39.5137 39.5146c4.6875 4.68652 12.2852 4.68652 16.9717 0l39.5146 -39.5146l119.514 119.515
56
60
  c4.6875 4.68652 12.2852 4.68652 16.9717 0l87.5146 -87.5146v-80h-320z" />
57
- <glyph glyph-name="edit" unicode="&#xf044;" horiz-adv-x="575"
61
+ <glyph glyph-name="edit" unicode="&#xf044;" horiz-adv-x="576"
58
62
  d="M402.3 103.1l32 32c5 5 13.7002 1.5 13.7002 -5.69922v-145.4c0 -26.5 -21.5 -48 -48 -48h-352c-26.5 0 -48 21.5 -48 48v352c0 26.5 21.5 48 48 48h273.5c7.09961 0 10.7002 -8.59961 5.7002 -13.7002l-32 -32c-1.5 -1.5 -3.5 -2.2998 -5.7002 -2.2998h-241.5v-352h352
59
63
  v113.5c0 2.09961 0.799805 4.09961 2.2998 5.59961zM558.9 304.9l-262.601 -262.601l-90.3994 -10c-26.2002 -2.89941 -48.5 19.2002 -45.6006 45.6006l10 90.3994l262.601 262.601c22.8994 22.8994 59.8994 22.8994 82.6992 0l43.2002 -43.2002
60
64
  c22.9004 -22.9004 22.9004 -60 0.100586 -82.7998zM460.1 274l-58.0996 58.0996l-185.8 -185.899l-7.2998 -65.2998l65.2998 7.2998zM524.9 353.7l-43.2002 43.2002c-4.10059 4.09961 -10.7998 4.09961 -14.7998 0l-30.9004 -30.9004l58.0996 -58.0996l30.9004 30.8994
@@ -97,7 +101,7 @@ l20.6006 -21.7998l-10.6006 -28.0996c-5.5 -14.5 -12.5996 -28.1006 -19.8994 -40.20
97
101
  <glyph glyph-name="folder" unicode="&#xf07b;"
98
102
  d="M464 320c26.5098 0 48 -21.4902 48 -48v-224c0 -26.5098 -21.4902 -48 -48 -48h-416c-26.5098 0 -48 21.4902 -48 48v288c0 26.5098 21.4902 48 48 48h146.74c8.49023 0 16.6299 -3.37012 22.6299 -9.37012l54.6299 -54.6299h192zM464 48v224h-198.62
99
103
  c-8.49023 0 -16.6299 3.37012 -22.6299 9.37012l-54.6299 54.6299h-140.12v-288h416z" />
100
- <glyph glyph-name="folder-open" unicode="&#xf07c;" horiz-adv-x="575"
104
+ <glyph glyph-name="folder-open" unicode="&#xf07c;" horiz-adv-x="576"
101
105
  d="M527.9 224c37.6992 0 60.6992 -41.5 40.6992 -73.4004l-79.8994 -128c-8.7998 -14.0996 -24.2002 -22.5996 -40.7002 -22.5996h-400c-26.5 0 -48 21.5 -48 48v288c0 26.5 21.5 48 48 48h160l64 -64h160c26.5 0 48 -21.5 48 -48v-48h47.9004zM48 330v-233.4l62.9004 104.2
102
106
  c8.69922 14.4004 24.2998 23.2002 41.0996 23.2002h280v42c0 3.2998 -2.7002 6 -6 6h-173.9l-64 64h-134.1c-3.2998 0 -6 -2.7002 -6 -6zM448 48l80 128h-378.8l-77.2002 -128h376z" />
103
107
  <glyph glyph-name="chart-bar" unicode="&#xf080;"
@@ -113,7 +117,7 @@ c0.400391 0.399414 22.4004 24.1992 37.7002 54.8994c-27.5 27.2002 -44 61.2002 -44
113
117
  l19.7998 -4.5c16 -3.69922 32.5 -5.59961 49 -5.59961c86.7002 0 160 51.2998 160 112s-73.2998 112 -160 112s-160 -51.2998 -160 -112c0 -28.7002 16.2002 -50.5996 29.7002 -64l24.7998 -24.5l-15.5 -31.0996c-2.59961 -5.10059 -5.2998 -10.1006 -8 -14.8008
114
118
  c14.5996 5.10059 29 12.3008 43.0996 21.4004zM498.3 96c13.5 13.4004 29.7002 35.2998 29.7002 64c0 49.2002 -48.2998 91.5 -112.7 106c0.299805 -3.2998 0.700195 -6.59961 0.700195 -10c0 -80.9004 -78 -147.5 -179.3 -158.3
115
119
  c29.0996 -29.6006 77.2998 -49.7002 131.3 -49.7002c16.5 0 33 1.90039 49 5.59961l19.9004 4.60059l17.0996 -11.1006c14.0996 -9.09961 28.5 -16.2998 43.0996 -21.3994c-2.69922 4.7002 -5.39941 9.7002 -8 14.7998l-15.5 31.0996z" />
116
- <glyph glyph-name="star-half" unicode="&#xf089;" horiz-adv-x="308"
120
+ <glyph glyph-name="star-half" unicode="&#xf089;" horiz-adv-x="576"
117
121
  d="M288 62.7002v-54.2998l-130.7 -68.6006c-23.3994 -12.2998 -50.8994 7.60059 -46.3994 33.7002l25 145.5l-105.7 103c-19 18.5 -8.5 50.7998 17.7002 54.5996l146.1 21.2002l65.2998 132.4c5.90039 11.8994 17.2998 17.7998 28.7002 17.7998v-68.0996l-62.2002 -126
118
122
  l-139 -20.2002l100.601 -98l-23.7002 -138.4z" />
119
123
  <glyph glyph-name="lemon" unicode="&#xf094;"
@@ -137,7 +141,7 @@ c8.58398 0 16.373 -3.04785 22.1201 -8h2.67871c6.96387 0 14.8623 6.19336 30.1816
137
141
  v-0.0839844c0 -6.21777 -0.974609 -16.2148 -2.17578 -22.3154h86.1768zM428.8 192c18.9756 0 35.2002 16.2246 35.2002 35.2002c0 18.7002 -16.7754 35.2002 -35.2002 35.2002h-158.399c0 17.3242 26.3994 35.1992 26.3994 70.3994c0 26.4004 -20.625 35.2002 -44 35.2002
138
142
  c-8.79395 0 -20.4443 -32.7119 -34.9258 -56.0996c-9.07422 -14.5752 -19.5244 -27.2256 -30.7988 -39.875c-16.1094 -18.374 -33.8359 -36.6328 -59.0752 -39.5967v-176.753c42.79 -3.7627 74.5088 -39.6758 120 -39.6758h21.2988
139
143
  c40.5244 0 57.124 22.1973 50.6006 61.3252c14.6113 8.00098 24.1514 33.9785 12.9248 53.625c19.3652 18.2246 17.7871 46.3809 4.9502 61.0498h91.0254zM88 64c0 13.2549 -10.7451 24 -24 24s-24 -10.7451 -24 -24s10.7451 -24 24 -24s24 10.7451 24 24z" />
140
- <glyph glyph-name="hand-point-left" unicode="&#xf0a5;" horiz-adv-x="511"
144
+ <glyph glyph-name="hand-point-left" unicode="&#xf0a5;"
141
145
  d="M0 227.2c0 45.0986 38.1006 83.2002 83.2002 83.2002h86.1758c-1.3623 6.91016 -2.17578 14.374 -2.17578 22.3994c0 47.9141 35.0723 83.2002 92 83.2002c45.3135 0 57.002 -48.5371 75.7061 -78.7852c7.73438 -12.4121 16.9951 -23.3154 25.8506 -33.2529
142
146
  l0.130859 -0.145508l0.128906 -0.148438c15.3213 -17.4746 23.2197 -23.668 30.1836 -23.668h2.67871c5.74707 4.95215 13.5361 8 22.1201 8h64c17.6729 0 32 -12.8936 32 -28.7998v-230.4c0 -15.9062 -14.3271 -28.7998 -32 -28.7998h-64
143
147
  c-8.58398 0 -16.373 3.04785 -22.1201 8h-2.67871c-28.6885 0 -67.1367 -40 -127.2 -40h-21.2988c-62.542 0 -98.8008 38.6582 -99.9404 91.1445c-12.4814 17.8135 -18.4922 40.7852 -15.9844 62.791c-2.96094 5.8125 -6.51367 15.6973 -7.92969 22.0645h-35.6465
@@ -261,14 +265,14 @@ h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416z" />
261
265
  d="M288 200v-28c0 -6.59961 -5.40039 -12 -12 -12h-168c-6.59961 0 -12 5.40039 -12 12v28c0 6.59961 5.40039 12 12 12h168c6.59961 0 12 -5.40039 12 -12zM276 128c6.59961 0 12 -5.40039 12 -12v-28c0 -6.59961 -5.40039 -12 -12 -12h-168c-6.59961 0 -12 5.40039 -12 12
262
266
  v28c0 6.59961 5.40039 12 12 12h168zM384 316.1v-332.1c0 -26.5 -21.5 -48 -48 -48h-288c-26.5 0 -48 21.5 -48 48v416c0 26.5 21.5 48 48 48h204.1c12.7002 0 24.9004 -5.09961 33.9004 -14.0996l83.9004 -83.9004c9 -8.90039 14.0996 -21.2002 14.0996 -33.9004z
263
267
  M256 396.1v-76.0996h76.0996zM336 -16v288h-104c-13.2998 0 -24 10.7002 -24 24v104h-160v-416h288z" />
264
- <glyph glyph-name="thumbs-up" unicode="&#xf164;" horiz-adv-x="480"
268
+ <glyph glyph-name="thumbs-up" unicode="&#xf164;"
265
269
  d="M466.27 161.31c4.6748 -22.6465 0.864258 -44.5371 -8.98926 -62.9893c2.95898 -23.8682 -4.02148 -48.5654 -17.3398 -66.9902c-0.954102 -55.9072 -35.8232 -95.3301 -112.94 -95.3301c-7 0 -15 0.00976562 -22.2197 0.00976562
266
270
  c-102.742 0 -133.293 38.9395 -177.803 39.9404c-3.56934 -13.7764 -16.085 -23.9502 -30.9775 -23.9502h-64c-17.6729 0 -32 14.3271 -32 32v240c0 17.6729 14.3271 32 32 32h98.7598c19.1455 16.9531 46.0137 60.6533 68.7598 83.4004
267
271
  c13.667 13.667 10.1533 108.6 71.7607 108.6c57.5801 0 95.2695 -31.9355 95.2695 -104.73c0 -18.4092 -3.92969 -33.7295 -8.84961 -46.5391h36.4795c48.6025 0 85.8203 -41.5654 85.8203 -85.5801c0 -19.1504 -4.95996 -34.9902 -13.7305 -49.8408zM404.52 107.48
268
272
  c21.5811 20.3838 18.6992 51.0645 5.21094 65.6191c9.44922 0 22.3594 18.9102 22.2695 37.8105c-0.0898438 18.9102 -16.71 37.8203 -37.8203 37.8203h-103.989c0 37.8193 28.3594 55.3691 28.3594 94.5391c0 23.75 0 56.7305 -47.2695 56.7305
269
273
  c-18.9102 -18.9102 -9.45996 -66.1797 -37.8203 -94.54c-26.5596 -26.5703 -66.1797 -97.46 -94.54 -97.46h-10.9199v-186.17c53.6113 0 100.001 -37.8203 171.64 -37.8203h37.8203c35.5117 0 60.8203 17.1201 53.1201 65.9004
270
274
  c15.2002 8.16016 26.5 36.4395 13.9395 57.5703zM88 16c0 13.2549 -10.7451 24 -24 24s-24 -10.7451 -24 -24s10.7451 -24 24 -24s24 10.7451 24 24z" />
271
- <glyph glyph-name="thumbs-down" unicode="&#xf165;" horiz-adv-x="480"
275
+ <glyph glyph-name="thumbs-down" unicode="&#xf165;"
272
276
  d="M466.27 222.69c8.77051 -14.8506 13.7305 -30.6904 13.7305 -49.8408c0 -44.0146 -37.2178 -85.5801 -85.8203 -85.5801h-36.4795c4.91992 -12.8096 8.84961 -28.1299 8.84961 -46.5391c0 -72.7949 -37.6895 -104.73 -95.2695 -104.73
273
277
  c-61.6074 0 -58.0938 94.9326 -71.7607 108.6c-22.7461 22.7471 -49.6133 66.4473 -68.7598 83.4004h-7.05176c-5.5332 -9.56152 -15.8662 -16 -27.708 -16h-64c-17.6729 0 -32 14.3271 -32 32v240c0 17.6729 14.3271 32 32 32h64c8.11328 0 15.5146 -3.02539 21.1553 -8
274
278
  h10.8447c40.9971 0 73.1953 39.9902 176.78 39.9902c7.21973 0 15.2197 0.00976562 22.2197 0.00976562c77.1172 0 111.986 -39.4229 112.94 -95.3301c13.3184 -18.4248 20.2979 -43.1221 17.3398 -66.9902c9.85352 -18.4521 13.6641 -40.3428 8.98926 -62.9893zM64 152
@@ -282,7 +286,7 @@ c-11.0996 7.5 -17.7998 20 -17.7998 33.5s6.59961 26 17.7998 33.5996l59.7998 40.5l
282
286
  l40.4004 -59.8994l70.8994 13.6992c13 2.60059 26.6006 -1.59961 36.2002 -11.0996c9.5 -9.59961 13.7002 -23.2002 11.0996 -36.4004l-13.6992 -71zM381.3 140.5l76.7998 52.0996l-76.7998 52l17.6006 91.1006l-91 -17.6006l-51.9004 76.9004l-51.7998 -76.7998
283
287
  l-91 17.5996l17.5996 -91.2002l-76.7998 -52l76.7998 -52l-17.5996 -91.1992l90.8994 17.5996l51.9004 -77l51.9004 76.9004l91 -17.6006zM256 296c57.2998 0 104 -46.7002 104 -104s-46.7002 -104 -104 -104s-104 46.7002 -104 104s46.7002 104 104 104zM256 136
284
288
  c30.9004 0 56 25.0996 56 56s-25.0996 56 -56 56s-56 -25.0996 -56 -56s25.0996 -56 56 -56z" />
285
- <glyph glyph-name="moon" unicode="&#xf186;" horiz-adv-x="511"
289
+ <glyph glyph-name="moon" unicode="&#xf186;"
286
290
  d="M279.135 -64c-141.424 0 -256 114.64 -256 256c0 141.425 114.641 256 256 256c13.0068 -0.00195312 33.9443 -1.91797 46.7354 -4.27734c44.0205 -8.13086 53.7666 -66.8691 15.0215 -88.9189c-41.374 -23.5439 -67.4336 -67.4121 -67.4336 -115.836
287
291
  c0 -83.5234 75.9238 -146.475 158.272 -130.792c43.6904 8.32129 74.5186 -42.5693 46.248 -77.4004c-47.8613 -58.9717 -120.088 -94.7754 -198.844 -94.7754zM279.135 400c-114.875 0 -208 -93.125 -208 -208s93.125 -208 208 -208
288
292
  c65.2314 0 123.439 30.0361 161.575 77.0244c-111.611 -21.2568 -215.252 64.0957 -215.252 177.943c0 67.5127 36.9326 126.392 91.6934 157.555c-12.3271 2.27637 -25.0312 3.47754 -38.0166 3.47754z" />
@@ -431,14 +435,14 @@ c-44.1123 0 -80 35.8877 -80 80v8c0 30.8779 25.1211 56 56 56h293.917c24.5 0 47.08
431
435
  c-4.41113 0 -8 -3.58887 -8 -8v-8c0 -17.6445 14.3555 -32 32 -32h213.471c25.2021 0 42.626 -25.293 33.6299 -48.8457l-24.5518 -64.2812c-7.05371 -18.4658 -25.0732 -30.873 -44.8398 -30.873h-113.709c-22.0557 0 -40 -17.9443 -40 -40c0 -4.41113 3.58887 -8 8 -8
432
436
  h131.552h0.0517578c7.44141 0 19.1074 -2.19238 26.041 -4.89355l99.752 -38.7881c18.5898 -7.22852 30.6035 -24.7881 30.6035 -44.7363v-23.582h128z" />
433
437
  <glyph glyph-name="hand-spock" unicode="&#xf259;"
434
- d="M21.0957 66.21c-26.9688 25.3818 -28.2471 67.7461 -2.87109 94.707c24.1982 25.7139 64.2881 28.2373 91.4824 5.72168l-31.04 136.509c-9.38379 41.2803 21.4336 81.0127 64.0713 81.8438c1.74414 28.9062 22.2656 54.4912 51.8818 61.2949
435
- c36.001 8.27539 72.0176 -14.2266 80.3037 -50.2959l21.6748 -131.99l16.9014 105.25c9.02344 36.0947 45.4473 57.7021 81.25 48.75c27.3066 -6.82715 45.7061 -29.1357 49.8496 -53.9922c43.2285 0.212891 75.6436 -40.1133 65.5439 -82.5244l-31.7295 -133.41
436
- c-0.938477 -3.94141 -1.41406 -7.99414 -1.41406 -12.0449v-36.8389v-0.00683594c0 -9.29102 -2.14355 -24.0596 -4.78516 -32.9668l-31.8145 -107.312c-4.02734 -13.585 -16.5107 -22.9043 -30.6807 -22.9043h-237.6c-7.00586 0 -16.8311 3.89648 -21.9316 8.69824z
437
- M53.1641 128.021c-7.17969 -7.62891 -6.81543 -19.6777 0.813477 -26.8574l124.487 -117.164h219.311l28.4199 95.8613c1.86133 6.27637 2.80469 12.7793 2.80469 19.3281v36.8389c0.000976562 6.48047 1.21973 16.8574 2.71973 23.1621l31.7549 133.407
438
- c5.83105 24.4893 -31.1445 33.25 -36.9658 8.80273l-26.9229 -113.105c-1.61523 -6.78711 -8.58887 -12.2949 -15.5645 -12.2949h-9.69434c-10.4072 0 -18.043 9.79199 -15.5225 19.8799l38.127 152.512c6.09766 24.376 -30.7607 33.6396 -36.8643 9.21777l-42.3721 -169.49
439
- c-1.67285 -6.68945 -8.62695 -12.1191 -15.5225 -12.1191h-13.2168v0c-7.0332 0 -14.0195 5.5625 -15.5938 12.417l-45.2207 196.828c-5.64453 24.5684 -42.6572 15.9609 -37.0342 -8.50781l41.6191 -181.153c2.30078 -10.0156 -5.31738 -19.583 -15.5938 -19.583h-8.60352
440
- h-0.000976562c-7.0498 0 -14.04 5.5791 -15.6025 12.4541l-30.3984 133.757c-5.55273 24.4395 -42.6504 16.1963 -37.0547 -8.4209l34.1299 -150.172c0.263672 -1.16309 0.397461 -2.35352 0.397461 -3.5459v-69.4795c0 -13.9941 -16.7754 -21.2432 -26.9658 -11.6523
441
- l-53.0117 49.8936c-7.61523 7.16699 -19.6377 6.85938 -26.8564 -0.8125z" />
438
+ d="M501.03 331.824c6.05762 -9.77832 10.9746 -27.0498 10.9746 -38.5518c0 -4.80664 -0.915039 -12.499 -2.04297 -17.1709l-57.623 -241.963c-12.748 -54.1729 -68.2627 -98.1387 -123.915 -98.1387h-0.345703h-107.455h-0.224609
439
+ c-33.8135 0 -81.2148 18.834 -105.807 42.041l-91.3652 85.9766c-12.8213 12.0469 -23.2266 36.1016 -23.2266 53.6943c0 16.1299 8.97266 38.7529 20.0273 50.499c5.31836 5.66406 29.875 29.3926 68.1152 21.8477l-24.3594 82.1973
440
+ c-1.68164 5.66406 -3.0459 15.0576 -3.0459 20.9668c0 37.5938 30.417 70.502 67.8955 73.4551c-0.204102 2.03125 -0.369141 5.33691 -0.369141 7.37891c0 31.627 24.8594 63.6895 55.4902 71.5684c43.248 10.9785 80.5645 -17.7012 89.6602 -53.0723l13.6836 -53.207
441
+ l4.64648 22.6602c6.76074 32.417 39.123 58.8115 72.2373 58.916c8.73438 0 56.625 -3.26953 70.7383 -54.0801c15.0664 0.710938 46.9199 -3.50977 66.3105 -35.0176zM463.271 287.219c7.86914 32.9844 -42.1211 45.2695 -50.0859 11.9219l-24.8008 -104.146
442
+ c-4.38867 -18.4141 -31.7783 -11.8926 -28.0557 6.2168l28.5479 139.166c7.39844 36.0703 -43.3076 45.0703 -50.1182 11.9629l-31.791 -154.971c-3.54883 -17.3086 -28.2832 -18.0469 -32.7109 -0.804688l-47.3262 184.035
443
+ c-8.43359 32.8105 -58.3691 20.2676 -49.8652 -12.8359l42.4414 -165.039c4.81641 -18.7207 -23.3711 -26.9121 -28.9648 -8.00781l-31.3438 105.779c-9.6875 32.6465 -59.1191 18.2578 -49.3867 -14.625l36.0137 -121.539
444
+ c5.61816 -18.9521 10.1777 -50.377 10.1777 -70.1436v-0.00878906c0 -6.54297 -8.05664 -10.9355 -13.4824 -5.82617l-51.123 48.1074c-24.7852 23.4082 -60.0527 -14.1875 -35.2793 -37.4902l91.3691 -85.9805c16.9629 -16.0068 49.6592 -28.998 72.9824 -28.998h0.154297
445
+ h107.455h0.216797c34.7402 0 69.3936 27.4443 77.3525 61.2598z" />
442
446
  <glyph glyph-name="hand-pointer" unicode="&#xf25a;" horiz-adv-x="448"
443
447
  d="M358.182 268.639c43.1934 16.6348 89.8184 -15.7949 89.8184 -62.6387v-84c-0.000976562 -4.25 -0.775391 -11.0615 -1.72754 -15.2041l-27.4297 -118.999c-6.98242 -30.2969 -33.7549 -51.7969 -64.5566 -51.7969h-178.286c-21.2588 0 -41.3682 10.4102 -53.791 27.8457
444
448
  l-109.699 154.001c-21.2432 29.8193 -14.8047 71.3574 14.5498 93.1523c18.8115 13.9658 42.1748 16.2822 62.083 8.87207v161.129c0 36.9443 29.7363 67 66.2861 67s66.2861 -30.0557 66.2861 -67v-73.6338c20.4131 2.85742 41.4678 -3.94238 56.5947 -19.6289
@@ -730,7 +734,7 @@ c-3.69922 0 -7 2.60059 -7.7998 6.2002c-0.899414 3.7998 1.10059 7.7002 4.7002 9.2
730
734
  c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.19922c-3.59961 1.5 -5.59961 5.40039 -4.7002 9.2002c0.799805 3.7998 4.40039 6.60059 8.2002 6.2002c42.7002 -2.5 71.5 -24.7998 71.5 -44zM328 296
731
735
  c23.7998 0 52.7002 -29.2998 55.7998 -71.4004c0.299805 -3.7998 -2 -7.19922 -5.59961 -8.2998c-3.10059 -1 -7.2002 0 -9.2998 3.7002l-9.5 17c-7.7002 13.7002 -19.2002 21.5996 -31.5 21.5996c-12.3008 0 -23.8008 -7.89941 -31.5 -21.5996l-9.5 -17
732
736
  c-1.80078 -3.2002 -5.80078 -4.7002 -9.30078 -3.7002c-3.59961 1.10059 -5.89941 4.60059 -5.59961 8.2998c3.2998 42.1006 32.2002 71.4004 56 71.4004z" />
733
- <glyph glyph-name="kiss-wink-heart" unicode="&#xf598;" horiz-adv-x="503"
737
+ <glyph glyph-name="kiss-wink-heart" unicode="&#xf598;" horiz-adv-x="504"
734
738
  d="M304 139.5c0 -13 -13.4004 -27.2998 -35.0996 -36.4004c21.7998 -8.69922 35.1992 -23 35.1992 -36c0 -19.1992 -28.6992 -41.5 -71.5 -44h-0.5c-3.69922 0 -7 2.60059 -7.7998 6.2002c-0.899414 3.7998 1.10059 7.7002 4.7002 9.2002l17 7.2002
735
739
  c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.2002c-6 2.59961 -5.7002 12.3994 0 14.7998l17 7.2002c12.9004 5.5 20.7002 13.5 20.7002 21.5s-7.7998 16 -20.7998 21.5l-16.9004 7.19922c-3.59961 1.5 -5.59961 5.40039 -4.7002 9.2002
736
740
  c0.799805 3.7998 4.40039 6.60059 8.2002 6.2002c42.7002 -2.5 71.5 -24.7998 71.5 -44zM374.5 223c-14.7998 13.2002 -46.2002 13.2002 -61 0l-9.5 -8.5c-2.5 -2.2998 -7.90039 -4.7002 -13.7002 -1.59961c-4.39941 2.39941 -6.89941 7.39941 -6.09961 12.3994
@@ -42,7 +42,8 @@ $.fn.calendar = function(parameters) {
42
42
  '15': {'row': 2, 'column': 2 },
43
43
  '20': {'row': 3, 'column': 1 },
44
44
  '30': {'row': 2, 'column': 1 }
45
- }
45
+ },
46
+ numberText = ['','one','two','three','four','five','six','seven','eight']
46
47
  ;
47
48
 
48
49
  $allModules
@@ -74,7 +75,10 @@ $.fn.calendar = function(parameters) {
74
75
 
75
76
  isTouch,
76
77
  isTouchDown = false,
78
+ isInverted = $module.hasClass(className.inverted),
77
79
  focusDateUsedForRange = false,
80
+ selectionComplete = false,
81
+ classObserver,
78
82
  module
79
83
  ;
80
84
 
@@ -92,6 +96,7 @@ $.fn.calendar = function(parameters) {
92
96
  module.create.calendar();
93
97
 
94
98
  module.bind.events();
99
+ module.observeChanges();
95
100
  module.instantiate();
96
101
  },
97
102
 
@@ -105,6 +110,7 @@ $.fn.calendar = function(parameters) {
105
110
  module.verbose('Destroying previous calendar for', element);
106
111
  $module.removeData(moduleNamespace);
107
112
  module.unbind.events();
113
+ module.disconnect.classObserver();
108
114
  },
109
115
 
110
116
  setup: {
@@ -116,6 +122,7 @@ $.fn.calendar = function(parameters) {
116
122
  module.set.maxDate($module.data(metadata.maxDate));
117
123
  }
118
124
  module.setting('type', module.get.type());
125
+ module.setting('on', settings.on || ($input.length ? 'focus' : 'click'));
119
126
  },
120
127
  popup: function () {
121
128
  if (settings.inline) {
@@ -139,12 +146,19 @@ $.fn.calendar = function(parameters) {
139
146
  $container = $('<div/>').addClass(className.popup)[domPositionFunction]($activatorParent);
140
147
  }
141
148
  $container.addClass(className.calendar);
142
- var onVisible = settings.onVisible;
149
+ if(isInverted){
150
+ $container.addClass(className.inverted);
151
+ }
152
+ var onVisible = function () {
153
+ module.refreshTooltips();
154
+ return settings.onVisible.apply($container, arguments);
155
+ };
143
156
  var onHidden = settings.onHidden;
144
157
  if (!$input.length) {
145
158
  //no input, $container has to handle focus/blur
146
159
  $container.attr('tabindex', '0');
147
160
  onVisible = function () {
161
+ module.refreshTooltips();
148
162
  module.focus();
149
163
  return settings.onVisible.apply($container, arguments);
150
164
  };
@@ -156,14 +170,15 @@ $.fn.calendar = function(parameters) {
156
170
  var onShow = function () {
157
171
  //reset the focus date onShow
158
172
  module.set.focusDate(module.get.date());
159
- module.set.mode(settings.startMode);
173
+ module.set.mode(module.get.validatedMode(settings.startMode));
160
174
  return settings.onShow.apply($container, arguments);
161
175
  };
162
- var on = settings.on || ($input.length ? 'focus' : 'click');
176
+ var on = module.setting('on');
163
177
  var options = $.extend({}, settings.popupOptions, {
164
178
  popup: $container,
165
179
  on: on,
166
180
  hoverable: on === 'hover',
181
+ closable: on === 'click',
167
182
  onShow: onShow,
168
183
  onVisible: onVisible,
169
184
  onHide: settings.onHide,
@@ -175,6 +190,7 @@ $.fn.calendar = function(parameters) {
175
190
  if ($activator.length && !settings.inline) {
176
191
  return;
177
192
  }
193
+ settings.inline = true;
178
194
  $container = $('<div/>').addClass(className.calendar).appendTo($module);
179
195
  if (!$input.length) {
180
196
  $container.attr('tabindex', '0');
@@ -184,6 +200,7 @@ $.fn.calendar = function(parameters) {
184
200
  if (settings.touchReadonly && $input.length && isTouch) {
185
201
  $input.prop('readonly', true);
186
202
  }
203
+ module.check.disabled();
187
204
  },
188
205
  date: function () {
189
206
  var date;
@@ -195,6 +212,21 @@ $.fn.calendar = function(parameters) {
195
212
  date = parser.date($input.val(), settings);
196
213
  }
197
214
  module.set.date(date, settings.formatInput, false);
215
+ module.set.mode(module.get.mode(), false);
216
+ }
217
+ },
218
+
219
+ trigger: {
220
+ change: function() {
221
+ var
222
+ inputElement = $input[0]
223
+ ;
224
+ if(inputElement) {
225
+ var events = document.createEvent('HTMLEvents');
226
+ module.verbose('Triggering native change event');
227
+ events.initEvent('change', true, false);
228
+ inputElement.dispatchEvent(events);
229
+ }
198
230
  }
199
231
  },
200
232
 
@@ -202,33 +234,38 @@ $.fn.calendar = function(parameters) {
202
234
  calendar: function () {
203
235
  var i, r, c, p, row, cell, pageGrid;
204
236
 
205
- var mode = module.get.mode();
206
- var today = new Date();
207
- var date = module.get.date();
208
- var focusDate = module.get.focusDate();
209
- var display = focusDate || date || settings.initialDate || today;
210
- display = module.helper.dateInRange(display);
237
+ var
238
+ mode = module.get.mode(),
239
+ today = new Date(),
240
+ date = module.get.date(),
241
+ focusDate = module.get.focusDate(),
242
+ display = module.helper.dateInRange(focusDate || date || settings.initialDate || today)
243
+ ;
211
244
 
212
245
  if (!focusDate) {
213
246
  focusDate = display;
214
247
  module.set.focusDate(focusDate, false, false);
215
248
  }
216
249
 
217
- var isYear = mode === 'year';
218
- var isMonth = mode === 'month';
219
- var isDay = mode === 'day';
220
- var isHour = mode === 'hour';
221
- var isMinute = mode === 'minute';
222
- var isTimeOnly = settings.type === 'time';
250
+ var
251
+ isYear = mode === 'year',
252
+ isMonth = mode === 'month',
253
+ isDay = mode === 'day',
254
+ isHour = mode === 'hour',
255
+ isMinute = mode === 'minute',
256
+ isTimeOnly = settings.type === 'time'
257
+ ;
223
258
 
224
259
  var multiMonth = Math.max(settings.multiMonth, 1);
225
260
  var monthOffset = !isDay ? 0 : module.get.monthOffset();
226
261
 
227
- var minute = display.getMinutes();
228
- var hour = display.getHours();
229
- var day = display.getDate();
230
- var startMonth = display.getMonth() + monthOffset;
231
- var year = display.getFullYear();
262
+ var
263
+ minute = display.getMinutes(),
264
+ hour = display.getHours(),
265
+ day = display.getDate(),
266
+ startMonth = display.getMonth() + monthOffset,
267
+ year = display.getFullYear()
268
+ ;
232
269
 
233
270
  var columns = isDay ? settings.showWeekNumbers ? 8 : 7 : isHour ? 4 : timeGap['column'];
234
271
  var rows = isDay || isHour ? 6 : timeGap['row'];
@@ -254,23 +291,27 @@ $.fn.calendar = function(parameters) {
254
291
  rows = Math.ceil(requiredCells / 7);
255
292
  }
256
293
 
257
- var yearChange = isYear ? 10 : isMonth ? 1 : 0;
258
- var monthChange = isDay ? 1 : 0;
259
- var dayChange = isHour || isMinute ? 1 : 0;
260
- var prevNextDay = isHour || isMinute ? day : 1;
261
- var prevDate = new Date(year - yearChange, month - monthChange, prevNextDay - dayChange, hour);
262
- var nextDate = new Date(year + yearChange, month + monthChange, prevNextDay + dayChange, hour);
263
-
264
- var prevLast = isYear ? new Date(Math.ceil(year / 10) * 10 - 9, 0, 0) :
265
- isMonth ? new Date(year, 0, 0) : isDay ? new Date(year, month, 0) : new Date(year, month, day, -1);
266
- var nextFirst = isYear ? new Date(Math.ceil(year / 10) * 10 + 1, 0, 1) :
267
- isMonth ? new Date(year + 1, 0, 1) : isDay ? new Date(year, month + 1, 1) : new Date(year, month, day + 1);
294
+ var
295
+ yearChange = isYear ? 10 : isMonth ? 1 : 0,
296
+ monthChange = isDay ? 1 : 0,
297
+ dayChange = isHour || isMinute ? 1 : 0,
298
+ prevNextDay = isHour || isMinute ? day : 1,
299
+ prevDate = new Date(year - yearChange, month - monthChange, prevNextDay - dayChange, hour),
300
+ nextDate = new Date(year + yearChange, month + monthChange, prevNextDay + dayChange, hour),
301
+ prevLast = isYear ? new Date(Math.ceil(year / 10) * 10 - 9, 0, 0) :
302
+ isMonth ? new Date(year, 0, 0) : isDay ? new Date(year, month, 0) : new Date(year, month, day, -1),
303
+ nextFirst = isYear ? new Date(Math.ceil(year / 10) * 10 + 1, 0, 1) :
304
+ isMonth ? new Date(year + 1, 0, 1) : isDay ? new Date(year, month + 1, 1) : new Date(year, month, day + 1)
305
+ ;
268
306
 
269
307
  var tempMode = mode;
270
308
  if (isDay && settings.showWeekNumbers){
271
309
  tempMode += ' andweek';
272
310
  }
273
- var table = $('<table/>').addClass(className.table).addClass(tempMode).appendTo(container);
311
+ var table = $('<table/>').addClass(className.table).addClass(tempMode).addClass(numberText[columns] + ' column').appendTo(container);
312
+ if(isInverted){
313
+ table.addClass(className.inverted);
314
+ }
274
315
  var textColumns = columns;
275
316
  //no header for time-only mode
276
317
  if (!isTimeOnly) {
@@ -340,7 +381,13 @@ $.fn.calendar = function(parameters) {
340
381
  var disabledDate = module.helper.findDayAsObject(cellDate, mode, settings.disabledDates);
341
382
  if (disabledDate !== null && disabledDate[metadata.message]) {
342
383
  cell.attr("data-tooltip", disabledDate[metadata.message]);
343
- cell.attr("data-position", tooltipPosition);
384
+ cell.attr("data-position", disabledDate[metadata.position] || tooltipPosition);
385
+ if(disabledDate[metadata.inverted] || (isInverted && disabledDate[metadata.inverted] === undefined)) {
386
+ cell.attr("data-inverted", '');
387
+ }
388
+ if(disabledDate[metadata.variation]) {
389
+ cell.attr("data-variation", disabledDate[metadata.variation]);
390
+ }
344
391
  }
345
392
  } else {
346
393
  var eventDate = module.helper.findDayAsObject(cellDate, mode, settings.eventDates);
@@ -348,7 +395,13 @@ $.fn.calendar = function(parameters) {
348
395
  cell.addClass(eventDate[metadata.class] || settings.eventClass);
349
396
  if (eventDate[metadata.message]) {
350
397
  cell.attr("data-tooltip", eventDate[metadata.message]);
351
- cell.attr("data-position", tooltipPosition);
398
+ cell.attr("data-position", eventDate[metadata.position] || tooltipPosition);
399
+ if(eventDate[metadata.inverted] || (isInverted && eventDate[metadata.inverted] === undefined)) {
400
+ cell.attr("data-inverted", '');
401
+ }
402
+ if(eventDate[metadata.variation]) {
403
+ cell.attr("data-variation", eventDate[metadata.variation]);
404
+ }
352
405
  }
353
406
  }
354
407
  }
@@ -387,6 +440,10 @@ $.fn.calendar = function(parameters) {
387
440
  }
388
441
 
389
442
  module.update.focus(false, table);
443
+
444
+ if(settings.inline){
445
+ module.refreshTooltips();
446
+ }
390
447
  }
391
448
  }
392
449
  },
@@ -428,6 +485,20 @@ $.fn.calendar = function(parameters) {
428
485
  module.create.calendar();
429
486
  },
430
487
 
488
+ refreshTooltips: function() {
489
+ var winWidth = $(window).width();
490
+ $container.find('td[data-position]').each(function () {
491
+ var cell = $(this);
492
+ var tooltipWidth = window.getComputedStyle(cell[0], ':after').width.replace(/[^0-9\.]/g,'');
493
+ var tooltipPosition = cell.attr('data-position');
494
+ // use a fallback width of 250 (calendar width) for IE/Edge (which return "auto")
495
+ var calcPosition = (winWidth - cell.width() - (parseInt(tooltipWidth,10) || 250)) > cell.offset().left ? 'right' : 'left';
496
+ if(tooltipPosition.indexOf(calcPosition) === -1) {
497
+ cell.attr('data-position',tooltipPosition.replace(/(left|right)/,calcPosition));
498
+ }
499
+ });
500
+ },
501
+
431
502
  bind: {
432
503
  events: function () {
433
504
  module.debug('Binding events');
@@ -440,7 +511,6 @@ $.fn.calendar = function(parameters) {
440
511
  $input.on('input' + eventNamespace, module.event.inputChange);
441
512
  $input.on('focus' + eventNamespace, module.event.inputFocus);
442
513
  $input.on('blur' + eventNamespace, module.event.inputBlur);
443
- $input.on('click' + eventNamespace, module.event.inputClick);
444
514
  $input.on('keydown' + eventNamespace, module.event.keydown);
445
515
  } else {
446
516
  $container.on('keydown' + eventNamespace, module.event.keydown);
@@ -569,9 +639,57 @@ $.fn.calendar = function(parameters) {
569
639
  var text = formatter.datetime(date, settings);
570
640
  $input.val(text);
571
641
  }
642
+ if(selectionComplete){
643
+ module.trigger.change();
644
+ selectionComplete = false;
645
+ }
572
646
  },
573
- inputClick: function () {
574
- module.popup('show');
647
+ class: {
648
+ mutation: function(mutations) {
649
+ mutations.forEach(function(mutation) {
650
+ if(mutation.attributeName === "class") {
651
+ module.check.disabled();
652
+ }
653
+ });
654
+ }
655
+ }
656
+ },
657
+
658
+ observeChanges: function() {
659
+ if('MutationObserver' in window) {
660
+ classObserver = new MutationObserver(module.event.class.mutation);
661
+ module.debug('Setting up mutation observer', classObserver);
662
+ module.observe.class();
663
+ }
664
+ },
665
+
666
+ disconnect: {
667
+ classObserver: function() {
668
+ if($input.length && classObserver) {
669
+ classObserver.disconnect();
670
+ }
671
+ }
672
+ },
673
+
674
+ observe: {
675
+ class: function() {
676
+ if($input.length && classObserver) {
677
+ classObserver.observe($module[0], {
678
+ attributes : true
679
+ });
680
+ }
681
+ }
682
+ },
683
+
684
+ is: {
685
+ disabled: function() {
686
+ return $module.hasClass(className.disabled);
687
+ }
688
+ },
689
+
690
+ check: {
691
+ disabled: function(){
692
+ $input.attr('tabindex',module.is.disabled() ? -1 : 0);
575
693
  }
576
694
  },
577
695
 
@@ -618,6 +736,9 @@ $.fn.calendar = function(parameters) {
618
736
  mode: function () {
619
737
  //only returns valid modes for the current settings
620
738
  var mode = $module.data(metadata.mode) || settings.startMode;
739
+ return module.get.validatedMode(mode);
740
+ },
741
+ validatedMode: function(mode){
621
742
  var validModes = module.get.validModes();
622
743
  if ($.inArray(mode, validModes) >= 0) {
623
744
  return mode;
@@ -735,7 +856,7 @@ $.fn.calendar = function(parameters) {
735
856
  module.set.monthOffset(monthOffset, false);
736
857
  }
737
858
  }
738
- var changed = module.set.dataKeyValue(metadata.focusDate, date, refreshCalendar);
859
+ var changed = module.set.dataKeyValue(metadata.focusDate, date, !!date && refreshCalendar);
739
860
  updateFocus = (updateFocus !== false && changed && refreshCalendar === false) || focusDateUsedForRange != updateRange;
740
861
  focusDateUsedForRange = updateRange;
741
862
  if (updateFocus) {
@@ -794,13 +915,18 @@ $.fn.calendar = function(parameters) {
794
915
  (settings.type === 'year' && mode === 'year');
795
916
  if (complete) {
796
917
  var canceled = module.set.date(date) === false;
797
- if (!canceled && settings.closable) {
798
- module.popup('hide');
799
- //if this is a range calendar, show the end date calendar popup and focus the input
800
- var endModule = module.get.calendarModule(settings.endCalendar);
801
- if (endModule) {
802
- endModule.popup('show');
803
- endModule.focus();
918
+ if (!canceled) {
919
+ selectionComplete = true;
920
+ if(settings.closable) {
921
+ module.popup('hide');
922
+ //if this is a range calendar, focus the container or input. This will open the popup from its event listeners.
923
+ var endModule = module.get.calendarModule(settings.endCalendar);
924
+ if (endModule) {
925
+ if (endModule.setting('on') !== 'focus') {
926
+ endModule.popup('show');
927
+ }
928
+ endModule.focus();
929
+ }
804
930
  }
805
931
  }
806
932
  } else {
@@ -809,7 +935,7 @@ $.fn.calendar = function(parameters) {
809
935
  module.set.mode(newMode);
810
936
  if (mode === 'hour' || (mode === 'day' && module.get.date())) {
811
937
  //the user has chosen enough to consider a valid date/time has been chosen
812
- module.set.date(date);
938
+ module.set.date(date, true, false);
813
939
  } else {
814
940
  module.set.focusDate(date);
815
941
  }
@@ -845,15 +971,38 @@ $.fn.calendar = function(parameters) {
845
971
 
846
972
  helper: {
847
973
  isDisabled: function(date, mode) {
848
- return mode === 'day' && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
974
+ return (mode === 'day' || mode === 'month' || mode === 'year') && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
849
975
  if(typeof d === 'string') {
850
976
  d = module.helper.sanitiseDate(d);
851
977
  }
852
978
  if (d instanceof Date) {
853
979
  return module.helper.dateEqual(date, d, mode);
854
980
  }
855
- if (d !== null && typeof d === 'object' && d[metadata.date]) {
856
- return module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode);
981
+ if (d !== null && typeof d === 'object') {
982
+ if (d[metadata.year]) {
983
+ if (typeof d[metadata.year] === 'number') {
984
+ return date.getFullYear() == d[metadata.year];
985
+ } else if (Array.isArray(d[metadata.year])) {
986
+ return d[metadata.year].indexOf(date.getFullYear()) > -1;
987
+ }
988
+ } else if (d[metadata.month]) {
989
+ if (typeof d[metadata.month] === 'number') {
990
+ return date.getMonth() == d[metadata.month];
991
+ } else if (Array.isArray(d[metadata.month])) {
992
+ return d[metadata.month].indexOf(date.getMonth()) > -1;
993
+ } else if (d[metadata.month] instanceof Date) {
994
+ var sdate = module.helper.sanitiseDate(d[metadata.month]);
995
+ return (date.getMonth() == sdate.getMonth()) && (date.getFullYear() == sdate.getFullYear())
996
+ }
997
+ } else if (d[metadata.date] && mode === 'day') {
998
+ if (d[metadata.date] instanceof Date) {
999
+ return module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode);
1000
+ } else if (Array.isArray(d[metadata.date])) {
1001
+ return d[metadata.date].some(function(idate) {
1002
+ return module.helper.dateEqual(date, idate, mode);
1003
+ });
1004
+ }
1005
+ }
857
1006
  }
858
1007
  }));
859
1008
  },
@@ -875,10 +1024,9 @@ $.fn.calendar = function(parameters) {
875
1024
  }
876
1025
  },
877
1026
  findDayAsObject: function(date, mode, dates) {
878
- if (mode === 'day') {
879
- var i = 0, il = dates.length;
1027
+ if (mode === 'day' || mode === 'month' || mode === 'year') {
880
1028
  var d;
881
- for (; i < il; i++) {
1029
+ for (var i = 0; i < dates.length; i++) {
882
1030
  d = dates[i];
883
1031
  if(typeof d === 'string') {
884
1032
  d = module.helper.sanitiseDate(d);
@@ -888,8 +1036,37 @@ $.fn.calendar = function(parameters) {
888
1036
  dateObject[metadata.date] = d;
889
1037
  return dateObject;
890
1038
  }
891
- else if (d !== null && typeof d === 'object' && d[metadata.date] && module.helper.dateEqual(date,module.helper.sanitiseDate(d[metadata.date]), mode) ) {
892
- return d;
1039
+ else if (d !== null && typeof d === 'object') {
1040
+ if (d[metadata.year]) {
1041
+ if (typeof d[metadata.year] === 'number' && date.getFullYear() == d[metadata.year]) {
1042
+ return d;
1043
+ } else if (Array.isArray(d[metadata.year])) {
1044
+ if (d[metadata.year].indexOf(date.getFullYear()) > -1) {
1045
+ return d;
1046
+ }
1047
+ }
1048
+ } else if (d[metadata.month]) {
1049
+ if (typeof d[metadata.month] === 'number' && date.getMonth() == d[metadata.month]) {
1050
+ return d;
1051
+ } else if (Array.isArray(d[metadata.month])) {
1052
+ if (d[metadata.month].indexOf(date.getMonth()) > -1) {
1053
+ return d;
1054
+ }
1055
+ } else if (d[metadata.month] instanceof Date) {
1056
+ var sdate = module.helper.sanitiseDate(d[metadata.month]);
1057
+ if ((date.getMonth() == sdate.getMonth()) && (date.getFullYear() == sdate.getFullYear())) {
1058
+ return d;
1059
+ }
1060
+ }
1061
+ } else if (d[metadata.date] && mode === 'day') {
1062
+ if (d[metadata.date] instanceof Date && module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode)) {
1063
+ return d;
1064
+ } else if (Array.isArray(d[metadata.date])) {
1065
+ if(d[metadata.date].some(function(idate) { return module.helper.dateEqual(date, idate, mode); })) {
1066
+ return d;
1067
+ }
1068
+ }
1069
+ }
893
1070
  }
894
1071
  }
895
1072
  }
@@ -1286,16 +1463,21 @@ $.fn.calendar.settings = {
1286
1463
  if (!text) {
1287
1464
  return null;
1288
1465
  }
1289
- text = ('' + text).trim().toLowerCase();
1466
+ text = String(text).trim();
1290
1467
  if (text.length === 0) {
1291
1468
  return null;
1292
1469
  }
1470
+ if(text.match(/^[0-9]{4}[\/\-\.][0-9]{2}[\/\-\.][0-9]{2}$/)){
1471
+ text = text.replace(/[\/\-\.]/g,'/') + ' 00:00:00';
1472
+ }
1293
1473
  // Reverse date and month in some cases
1294
- text = settings.monthFirst ? text : text.replace(/[\/\-\.]/g,'/').replace(/([0-9]+)\/([0-9]+)/,'$2/$1');
1474
+ text = settings.monthFirst || !text.match(/^[0-9]{2}[\/\-\.]/) ? text : text.replace(/[\/\-\.]/g,'/').replace(/([0-9]+)\/([0-9]+)/,'$2/$1');
1295
1475
  var textDate = new Date(text);
1296
- if(!isNaN(textDate.getDate())) {
1476
+ var numberOnly = text.match(/^[0-9]+$/) !== null;
1477
+ if(!numberOnly && !isNaN(textDate.getDate())) {
1297
1478
  return textDate;
1298
1479
  }
1480
+ text = text.toLowerCase();
1299
1481
 
1300
1482
  var i, j, k;
1301
1483
  var minute = -1, hour = -1, day = -1, month = -1, year = -1;
@@ -1549,6 +1731,7 @@ $.fn.calendar.settings = {
1549
1731
  grid: 'ui equal width grid',
1550
1732
  column: 'column',
1551
1733
  table: 'ui celled center aligned unstackable table',
1734
+ inverted: 'inverted',
1552
1735
  prev: 'prev link',
1553
1736
  next: 'next link',
1554
1737
  prevIcon: 'chevron left icon',
@@ -1562,7 +1745,8 @@ $.fn.calendar.settings = {
1562
1745
  rangeCell: 'range',
1563
1746
  focusCell: 'focus',
1564
1747
  todayCell: 'today',
1565
- today: 'today link'
1748
+ today: 'today link',
1749
+ disabled: 'disabled'
1566
1750
  },
1567
1751
 
1568
1752
  metadata: {
@@ -1576,7 +1760,12 @@ $.fn.calendar.settings = {
1576
1760
  type: 'type',
1577
1761
  monthOffset: 'monthOffset',
1578
1762
  message: 'message',
1579
- class: 'class'
1763
+ class: 'class',
1764
+ inverted: 'inverted',
1765
+ variation: 'variation',
1766
+ position: 'position',
1767
+ month: 'month',
1768
+ year: 'year'
1580
1769
  },
1581
1770
 
1582
1771
  eventClass: 'blue'