fomantic-ui-sass 2.8.1.1 → 2.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/app/assets/fonts/semantic-ui/brand-icons.eot +0 -0
  4. data/app/assets/fonts/semantic-ui/brand-icons.svg +213 -85
  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 +419 -130
  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 +11 -11
  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 +110 -47
  19. data/app/assets/javascripts/semantic-ui/checkbox.js +1 -1
  20. data/app/assets/javascripts/semantic-ui/dropdown.js +46 -46
  21. data/app/assets/javascripts/semantic-ui/form.js +63 -27
  22. data/app/assets/javascripts/semantic-ui/modal.js +9 -1
  23. data/app/assets/javascripts/semantic-ui/popup.js +8 -7
  24. data/app/assets/javascripts/semantic-ui/search.js +29 -2
  25. data/app/assets/javascripts/semantic-ui/slider.js +6 -6
  26. data/app/assets/javascripts/semantic-ui/tab.js +3 -2
  27. data/app/assets/javascripts/semantic-ui/toast.js +11 -9
  28. data/app/assets/javascripts/semantic-ui/visibility.js +1 -1
  29. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +63 -24
  30. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +8 -6
  31. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +28 -28
  32. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +36 -20
  33. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +9 -3
  34. data/app/assets/stylesheets/semantic-ui/elements/_emoji.scss +6130 -6133
  35. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +153 -18
  36. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +44 -44
  37. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +38 -2
  38. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +1 -1
  39. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +7 -0
  40. data/app/assets/stylesheets/semantic-ui/elements/_text.scss +3 -0
  41. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +1 -0
  42. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +12 -9
  43. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +15 -7
  44. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +10 -3
  45. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +34 -7
  46. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +32 -3
  47. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +90 -0
  48. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +1 -0
  49. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +34 -34
  50. data/lib/fomantic/ui/sass/version.rb +2 -2
  51. metadata +3 -3
@@ -1,12 +1,12 @@
1
1
  <?xml version="1.0" standalone="no"?>
2
2
  <!--
3
- Font Awesome Free 5.9.0 by @fontawesome - https://fontawesome.com
3
+ Font Awesome Free 5.13.0 by @fontawesome - https://fontawesome.com
4
4
  License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
5
5
  -->
6
6
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
7
7
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
8
8
  <metadata>
9
- Created by FontForge 20190112 at Tue Jun 4 15:16:44 2019
9
+ Created by FontForge 20190801 at Mon Mar 23 10:45:51 2020
10
10
  By Robert Madole
11
11
  Copyright (c) Font Awesome
12
12
  </metadata>
@@ -22,7 +22,7 @@ Copyright (c) Font Awesome
22
22
  descent="-64"
23
23
  bbox="-0.0663408 -64.0662 640.01 448.1"
24
24
  underline-thickness="25"
25
- underline-position="-51"
25
+ underline-position="-50"
26
26
  unicode-range="U+0020-F5C8"
27
27
  />
28
28
  <missing-glyph />
@@ -435,14 +435,14 @@ c-44.1123 0 -80 35.8877 -80 80v8c0 30.8779 25.1211 56 56 56h293.917c24.5 0 47.08
435
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
436
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" />
437
437
  <glyph glyph-name="hand-spock" unicode="&#xf259;"
438
- 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
439
- 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
440
- 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
441
- 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
442
- 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
443
- 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
444
- 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
445
- 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" />
446
446
  <glyph glyph-name="hand-pointer" unicode="&#xf25a;" horiz-adv-x="448"
447
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
448
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
@@ -116,6 +116,7 @@ $.fn.calendar = function(parameters) {
116
116
  module.set.maxDate($module.data(metadata.maxDate));
117
117
  }
118
118
  module.setting('type', module.get.type());
119
+ module.setting('on', settings.on || ($input.length ? 'focus' : 'click'));
119
120
  },
120
121
  popup: function () {
121
122
  if (settings.inline) {
@@ -159,11 +160,12 @@ $.fn.calendar = function(parameters) {
159
160
  module.set.mode(settings.startMode);
160
161
  return settings.onShow.apply($container, arguments);
161
162
  };
162
- var on = settings.on || ($input.length ? 'focus' : 'click');
163
+ var on = module.setting('on');
163
164
  var options = $.extend({}, settings.popupOptions, {
164
165
  popup: $container,
165
166
  on: on,
166
167
  hoverable: on === 'hover',
168
+ closable: on === 'click',
167
169
  onShow: onShow,
168
170
  onVisible: onVisible,
169
171
  onHide: settings.onHide,
@@ -202,33 +204,38 @@ $.fn.calendar = function(parameters) {
202
204
  calendar: function () {
203
205
  var i, r, c, p, row, cell, pageGrid;
204
206
 
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);
207
+ var
208
+ mode = module.get.mode(),
209
+ today = new Date(),
210
+ date = module.get.date(),
211
+ focusDate = module.get.focusDate(),
212
+ display = module.helper.dateInRange(focusDate || date || settings.initialDate || today)
213
+ ;
211
214
 
212
215
  if (!focusDate) {
213
216
  focusDate = display;
214
217
  module.set.focusDate(focusDate, false, false);
215
218
  }
216
219
 
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';
220
+ var
221
+ isYear = mode === 'year',
222
+ isMonth = mode === 'month',
223
+ isDay = mode === 'day',
224
+ isHour = mode === 'hour',
225
+ isMinute = mode === 'minute',
226
+ isTimeOnly = settings.type === 'time'
227
+ ;
223
228
 
224
229
  var multiMonth = Math.max(settings.multiMonth, 1);
225
230
  var monthOffset = !isDay ? 0 : module.get.monthOffset();
226
231
 
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();
232
+ var
233
+ minute = display.getMinutes(),
234
+ hour = display.getHours(),
235
+ day = display.getDate(),
236
+ startMonth = display.getMonth() + monthOffset,
237
+ year = display.getFullYear()
238
+ ;
232
239
 
233
240
  var columns = isDay ? settings.showWeekNumbers ? 8 : 7 : isHour ? 4 : timeGap['column'];
234
241
  var rows = isDay || isHour ? 6 : timeGap['row'];
@@ -254,17 +261,18 @@ $.fn.calendar = function(parameters) {
254
261
  rows = Math.ceil(requiredCells / 7);
255
262
  }
256
263
 
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);
264
+ var
265
+ yearChange = isYear ? 10 : isMonth ? 1 : 0,
266
+ monthChange = isDay ? 1 : 0,
267
+ dayChange = isHour || isMinute ? 1 : 0,
268
+ prevNextDay = isHour || isMinute ? day : 1,
269
+ prevDate = new Date(year - yearChange, month - monthChange, prevNextDay - dayChange, hour),
270
+ nextDate = new Date(year + yearChange, month + monthChange, prevNextDay + dayChange, hour),
271
+ prevLast = isYear ? new Date(Math.ceil(year / 10) * 10 - 9, 0, 0) :
272
+ isMonth ? new Date(year, 0, 0) : isDay ? new Date(year, month, 0) : new Date(year, month, day, -1),
273
+ nextFirst = isYear ? new Date(Math.ceil(year / 10) * 10 + 1, 0, 1) :
274
+ isMonth ? new Date(year + 1, 0, 1) : isDay ? new Date(year, month + 1, 1) : new Date(year, month, day + 1)
275
+ ;
268
276
 
269
277
  var tempMode = mode;
270
278
  if (isDay && settings.showWeekNumbers){
@@ -440,7 +448,6 @@ $.fn.calendar = function(parameters) {
440
448
  $input.on('input' + eventNamespace, module.event.inputChange);
441
449
  $input.on('focus' + eventNamespace, module.event.inputFocus);
442
450
  $input.on('blur' + eventNamespace, module.event.inputBlur);
443
- $input.on('click' + eventNamespace, module.event.inputClick);
444
451
  $input.on('keydown' + eventNamespace, module.event.keydown);
445
452
  } else {
446
453
  $container.on('keydown' + eventNamespace, module.event.keydown);
@@ -569,9 +576,6 @@ $.fn.calendar = function(parameters) {
569
576
  var text = formatter.datetime(date, settings);
570
577
  $input.val(text);
571
578
  }
572
- },
573
- inputClick: function () {
574
- module.popup('show');
575
579
  }
576
580
  },
577
581
 
@@ -796,10 +800,12 @@ $.fn.calendar = function(parameters) {
796
800
  var canceled = module.set.date(date) === false;
797
801
  if (!canceled && settings.closable) {
798
802
  module.popup('hide');
799
- //if this is a range calendar, show the end date calendar popup and focus the input
803
+ //if this is a range calendar, focus the container or input. This will open the popup from its event listeners.
800
804
  var endModule = module.get.calendarModule(settings.endCalendar);
801
805
  if (endModule) {
802
- endModule.popup('show');
806
+ if (endModule.setting('on') !== 'focus') {
807
+ endModule.popup('show');
808
+ }
803
809
  endModule.focus();
804
810
  }
805
811
  }
@@ -809,7 +815,7 @@ $.fn.calendar = function(parameters) {
809
815
  module.set.mode(newMode);
810
816
  if (mode === 'hour' || (mode === 'day' && module.get.date())) {
811
817
  //the user has chosen enough to consider a valid date/time has been chosen
812
- module.set.date(date);
818
+ module.set.date(date, true, false);
813
819
  } else {
814
820
  module.set.focusDate(date);
815
821
  }
@@ -845,15 +851,38 @@ $.fn.calendar = function(parameters) {
845
851
 
846
852
  helper: {
847
853
  isDisabled: function(date, mode) {
848
- return mode === 'day' && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
854
+ return (mode === 'day' || mode === 'month' || mode === 'year') && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
849
855
  if(typeof d === 'string') {
850
856
  d = module.helper.sanitiseDate(d);
851
857
  }
852
858
  if (d instanceof Date) {
853
859
  return module.helper.dateEqual(date, d, mode);
854
860
  }
855
- if (d !== null && typeof d === 'object' && d[metadata.date]) {
856
- return module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode);
861
+ if (d !== null && typeof d === 'object') {
862
+ if (d[metadata.year]) {
863
+ if (typeof d[metadata.year] === 'number') {
864
+ return date.getFullYear() == d[metadata.year];
865
+ } else if (Array.isArray(d[metadata.year])) {
866
+ return d[metadata.year].indexOf(date.getFullYear()) > -1;
867
+ }
868
+ } else if (d[metadata.month]) {
869
+ if (typeof d[metadata.month] === 'number') {
870
+ return date.getMonth() == d[metadata.month];
871
+ } else if (Array.isArray(d[metadata.month])) {
872
+ return d[metadata.month].indexOf(date.getMonth()) > -1;
873
+ } else if (d[metadata.month] instanceof Date) {
874
+ var sdate = module.helper.sanitiseDate(d[metadata.month]);
875
+ return (date.getMonth() == sdate.getMonth()) && (date.getFullYear() == sdate.getFullYear())
876
+ }
877
+ } else if (d[metadata.date] && mode === 'day') {
878
+ if (d[metadata.date] instanceof Date) {
879
+ return module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode);
880
+ } else if (Array.isArray(d[metadata.date])) {
881
+ return d[metadata.date].some(function(idate) {
882
+ return module.helper.dateEqual(date, idate, mode);
883
+ });
884
+ }
885
+ }
857
886
  }
858
887
  }));
859
888
  },
@@ -875,10 +904,9 @@ $.fn.calendar = function(parameters) {
875
904
  }
876
905
  },
877
906
  findDayAsObject: function(date, mode, dates) {
878
- if (mode === 'day') {
879
- var i = 0, il = dates.length;
907
+ if (mode === 'day' || mode === 'month' || mode === 'year') {
880
908
  var d;
881
- for (; i < il; i++) {
909
+ for (var i = 0; i < dates.length; i++) {
882
910
  d = dates[i];
883
911
  if(typeof d === 'string') {
884
912
  d = module.helper.sanitiseDate(d);
@@ -888,8 +916,37 @@ $.fn.calendar = function(parameters) {
888
916
  dateObject[metadata.date] = d;
889
917
  return dateObject;
890
918
  }
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;
919
+ else if (d !== null && typeof d === 'object') {
920
+ if (d[metadata.year]) {
921
+ if (typeof d[metadata.year] === 'number' && date.getFullYear() == d[metadata.year]) {
922
+ return d;
923
+ } else if (Array.isArray(d[metadata.year])) {
924
+ if (d[metadata.year].indexOf(date.getFullYear()) > -1) {
925
+ return d;
926
+ }
927
+ }
928
+ } else if (d[metadata.month]) {
929
+ if (typeof d[metadata.month] === 'number' && date.getMonth() == d[metadata.month]) {
930
+ return d;
931
+ } else if (Array.isArray(d[metadata.month])) {
932
+ if (d[metadata.month].indexOf(date.getMonth()) > -1) {
933
+ return d;
934
+ }
935
+ } else if (d[metadata.month] instanceof Date) {
936
+ var sdate = module.helper.sanitiseDate(d[metadata.month]);
937
+ if ((date.getMonth() == sdate.getMonth()) && (date.getFullYear() == sdate.getFullYear())) {
938
+ return d;
939
+ }
940
+ }
941
+ } else if (d[metadata.date] && mode === 'day') {
942
+ if (d[metadata.date] instanceof Date && module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode)) {
943
+ return d;
944
+ } else if (Array.isArray(d[metadata.date])) {
945
+ if(d[metadata.date].some(function(idate) { return module.helper.dateEqual(date, idate, mode); })) {
946
+ return d;
947
+ }
948
+ }
949
+ }
893
950
  }
894
951
  }
895
952
  }
@@ -1286,16 +1343,20 @@ $.fn.calendar.settings = {
1286
1343
  if (!text) {
1287
1344
  return null;
1288
1345
  }
1289
- text = ('' + text).trim().toLowerCase();
1346
+ text = String(text).trim();
1290
1347
  if (text.length === 0) {
1291
1348
  return null;
1292
1349
  }
1350
+ if(text.match(/^[0-9]{4}[\/\-\.][0-9]{2}[\/\-\.][0-9]{2}$/)){
1351
+ text += ' 00:00:00';
1352
+ }
1293
1353
  // Reverse date and month in some cases
1294
- text = settings.monthFirst ? text : text.replace(/[\/\-\.]/g,'/').replace(/([0-9]+)\/([0-9]+)/,'$2/$1');
1354
+ text = settings.monthFirst || !text.match(/^[0-9]{2}[\/\-\.]/) ? text : text.replace(/[\/\-\.]/g,'/').replace(/([0-9]+)\/([0-9]+)/,'$2/$1');
1295
1355
  var textDate = new Date(text);
1296
1356
  if(!isNaN(textDate.getDate())) {
1297
1357
  return textDate;
1298
1358
  }
1359
+ text = text.toLowerCase();
1299
1360
 
1300
1361
  var i, j, k;
1301
1362
  var minute = -1, hour = -1, day = -1, month = -1, year = -1;
@@ -1576,7 +1637,9 @@ $.fn.calendar.settings = {
1576
1637
  type: 'type',
1577
1638
  monthOffset: 'monthOffset',
1578
1639
  message: 'message',
1579
- class: 'class'
1640
+ class: 'class',
1641
+ month: 'month',
1642
+ year: 'year'
1580
1643
  },
1581
1644
 
1582
1645
  eventClass: 'blue'
@@ -175,7 +175,7 @@ $.fn.checkbox = function(parameters) {
175
175
  },
176
176
 
177
177
  preventDefaultOnInputTarget: function() {
178
- if(typeof event !== 'undefined' && $(event.target).is(selector.input)) {
178
+ if(typeof event !== 'undefined' && event !== null && $(event.target).is(selector.input)) {
179
179
  module.verbose('Preventing default check action after manual check action');
180
180
  event.preventDefault();
181
181
  }
@@ -31,6 +31,10 @@ $.fn.dropdown = function(parameters) {
31
31
  moduleSelector = $allModules.selector || '',
32
32
 
33
33
  hasTouch = ('ontouchstart' in document.documentElement),
34
+ clickEvent = hasTouch
35
+ ? 'touchstart'
36
+ : 'click',
37
+
34
38
  time = new Date().getTime(),
35
39
  performance = [],
36
40
 
@@ -113,7 +117,9 @@ $.fn.dropdown = function(parameters) {
113
117
  module.setup.layout();
114
118
 
115
119
  if(settings.values) {
120
+ module.set.initialLoad();
116
121
  module.change.values(settings.values);
122
+ module.remove.initialLoad();
117
123
  }
118
124
 
119
125
  module.refreshData();
@@ -537,6 +543,7 @@ $.fn.dropdown = function(parameters) {
537
543
  } else if( module.can.click() ) {
538
544
  module.unbind.intent();
539
545
  }
546
+ iconClicked = false;
540
547
  },
541
548
 
542
549
  hideOthers: function() {
@@ -565,27 +572,10 @@ $.fn.dropdown = function(parameters) {
565
572
 
566
573
  bind: {
567
574
  events: function() {
568
- if(hasTouch) {
569
- module.bind.touchEvents();
570
- }
571
575
  module.bind.keyboardEvents();
572
576
  module.bind.inputEvents();
573
577
  module.bind.mouseEvents();
574
578
  },
575
- touchEvents: function() {
576
- module.debug('Touch device detected binding additional touch events');
577
- if( module.is.searchSelection() ) {
578
- // do nothing special yet
579
- }
580
- else if( module.is.single() ) {
581
- $module
582
- .on('touchstart' + eventNamespace, module.event.test.toggle)
583
- ;
584
- }
585
- $menu
586
- .on('touchstart' + eventNamespace, selector.item, module.event.item.mouseenter)
587
- ;
588
- },
589
579
  keyboardEvents: function() {
590
580
  module.verbose('Binding keyboard events');
591
581
  $module
@@ -612,8 +602,8 @@ $.fn.dropdown = function(parameters) {
612
602
  module.verbose('Binding mouse events');
613
603
  if(module.is.multiple()) {
614
604
  $module
615
- .on('click' + eventNamespace, selector.label, module.event.label.click)
616
- .on('click' + eventNamespace, selector.remove, module.event.remove.click)
605
+ .on(clickEvent + eventNamespace, selector.label, module.event.label.click)
606
+ .on(clickEvent + eventNamespace, selector.remove, module.event.remove.click)
617
607
  ;
618
608
  }
619
609
  if( module.is.searchSelection() ) {
@@ -622,24 +612,24 @@ $.fn.dropdown = function(parameters) {
622
612
  .on('mouseup' + eventNamespace, module.event.mouseup)
623
613
  .on('mousedown' + eventNamespace, selector.menu, module.event.menu.mousedown)
624
614
  .on('mouseup' + eventNamespace, selector.menu, module.event.menu.mouseup)
625
- .on('click' + eventNamespace, selector.icon, module.event.icon.click)
626
- .on('click' + eventNamespace, selector.clearIcon, module.event.clearIcon.click)
615
+ .on(clickEvent + eventNamespace, selector.icon, module.event.icon.click)
616
+ .on(clickEvent + eventNamespace, selector.clearIcon, module.event.clearIcon.click)
627
617
  .on('focus' + eventNamespace, selector.search, module.event.search.focus)
628
- .on('click' + eventNamespace, selector.search, module.event.search.focus)
618
+ .on(clickEvent + eventNamespace, selector.search, module.event.search.focus)
629
619
  .on('blur' + eventNamespace, selector.search, module.event.search.blur)
630
- .on('click' + eventNamespace, selector.text, module.event.text.focus)
620
+ .on(clickEvent + eventNamespace, selector.text, module.event.text.focus)
631
621
  ;
632
622
  if(module.is.multiple()) {
633
623
  $module
634
- .on('click' + eventNamespace, module.event.click)
624
+ .on(clickEvent + eventNamespace, module.event.click)
635
625
  ;
636
626
  }
637
627
  }
638
628
  else {
639
629
  if(settings.on == 'click') {
640
630
  $module
641
- .on('click' + eventNamespace, selector.icon, module.event.icon.click)
642
- .on('click' + eventNamespace, module.event.test.toggle)
631
+ .on(clickEvent + eventNamespace, selector.icon, module.event.icon.click)
632
+ .on(clickEvent + eventNamespace, module.event.test.toggle)
643
633
  ;
644
634
  }
645
635
  else if(settings.on == 'hover') {
@@ -657,7 +647,7 @@ $.fn.dropdown = function(parameters) {
657
647
  .on('mousedown' + eventNamespace, module.event.mousedown)
658
648
  .on('mouseup' + eventNamespace, module.event.mouseup)
659
649
  .on('focus' + eventNamespace, module.event.focus)
660
- .on('click' + eventNamespace, selector.clearIcon, module.event.clearIcon.click)
650
+ .on(clickEvent + eventNamespace, selector.clearIcon, module.event.clearIcon.click)
661
651
  ;
662
652
  if(module.has.menuSearch() ) {
663
653
  $module
@@ -671,7 +661,7 @@ $.fn.dropdown = function(parameters) {
671
661
  }
672
662
  }
673
663
  $menu
674
- .on('mouseenter' + eventNamespace, selector.item, module.event.item.mouseenter)
664
+ .on((hasTouch ? 'touchstart' : 'mouseenter') + eventNamespace, selector.item, module.event.item.mouseenter)
675
665
  .on('mouseleave' + eventNamespace, selector.item, module.event.item.mouseleave)
676
666
  .on('click' + eventNamespace, selector.item, module.event.item.click)
677
667
  ;
@@ -685,7 +675,7 @@ $.fn.dropdown = function(parameters) {
685
675
  ;
686
676
  }
687
677
  $document
688
- .on('click' + elementNamespace, module.event.test.hide)
678
+ .on(clickEvent + elementNamespace, module.event.test.hide)
689
679
  ;
690
680
  }
691
681
  },
@@ -700,7 +690,7 @@ $.fn.dropdown = function(parameters) {
700
690
  ;
701
691
  }
702
692
  $document
703
- .off('click' + elementNamespace)
693
+ .off(clickEvent + elementNamespace)
704
694
  ;
705
695
  }
706
696
  },
@@ -848,6 +838,10 @@ $.fn.dropdown = function(parameters) {
848
838
  text,
849
839
  value
850
840
  ;
841
+ if($choice.hasClass(className.unfilterable)) {
842
+ results.push(this);
843
+ return true;
844
+ }
851
845
  if(settings.match === 'both' || settings.match === 'text') {
852
846
  text = module.remove.diacritics(String(module.get.choiceText($choice, false)));
853
847
  if(text.search(beginsWithRegExp) !== -1) {
@@ -1017,7 +1011,7 @@ $.fn.dropdown = function(parameters) {
1017
1011
  var
1018
1012
  value = settings.templates.deQuote(item[fields.value]),
1019
1013
  name = settings.templates.escape(
1020
- item[fields.name] || item[fields.value],
1014
+ item[fields.name] || '',
1021
1015
  settings.preserveHTML
1022
1016
  )
1023
1017
  ;
@@ -1781,7 +1775,7 @@ $.fn.dropdown = function(parameters) {
1781
1775
  return $text.text();
1782
1776
  },
1783
1777
  query: function() {
1784
- return $.trim($search.val());
1778
+ return String($search.val()).trim();
1785
1779
  },
1786
1780
  searchWidth: function(value) {
1787
1781
  value = (value !== undefined)
@@ -1924,8 +1918,8 @@ $.fn.dropdown = function(parameters) {
1924
1918
  return ($choice.data(metadata.text) !== undefined)
1925
1919
  ? $choice.data(metadata.text)
1926
1920
  : (preserveHTML)
1927
- ? $.trim($choice.html())
1928
- : $.trim($choice.text())
1921
+ ? $choice.html().trim()
1922
+ : $choice.text().trim()
1929
1923
  ;
1930
1924
  }
1931
1925
  },
@@ -1937,11 +1931,11 @@ $.fn.dropdown = function(parameters) {
1937
1931
  return ($choice.data(metadata.value) !== undefined)
1938
1932
  ? String( $choice.data(metadata.value) )
1939
1933
  : (typeof choiceText === 'string')
1940
- ? $.trim(
1934
+ ? String(
1941
1935
  settings.ignoreSearchCase
1942
1936
  ? choiceText.toLowerCase()
1943
1937
  : choiceText
1944
- )
1938
+ ).trim()
1945
1939
  : String(choiceText)
1946
1940
  ;
1947
1941
  },
@@ -1975,6 +1969,9 @@ $.fn.dropdown = function(parameters) {
1975
1969
  value = ( $option.attr('value') !== undefined )
1976
1970
  ? $option.attr('value')
1977
1971
  : name,
1972
+ text = ( $option.data(metadata.text) !== undefined )
1973
+ ? $option.data(metadata.text)
1974
+ : name,
1978
1975
  group = $option.parent('optgroup')
1979
1976
  ;
1980
1977
  if(settings.placeholder === 'auto' && value === '') {
@@ -1992,6 +1989,7 @@ $.fn.dropdown = function(parameters) {
1992
1989
  select.values.push({
1993
1990
  name : name,
1994
1991
  value : value,
1992
+ text : text,
1995
1993
  disabled : disabled
1996
1994
  });
1997
1995
  }
@@ -2080,7 +2078,7 @@ $.fn.dropdown = function(parameters) {
2080
2078
  return;
2081
2079
  }
2082
2080
  if(isMultiple) {
2083
- if($.inArray( String(optionValue), value) !== -1) {
2081
+ if($.inArray(module.escape.htmlEntities(String(optionValue)), value.map(function(v){return String(v);})) !== -1) {
2084
2082
  $selectedItem = ($selectedItem)
2085
2083
  ? $selectedItem.add($choice)
2086
2084
  : $choice
@@ -2099,7 +2097,7 @@ $.fn.dropdown = function(parameters) {
2099
2097
  optionValue = optionValue.toLowerCase();
2100
2098
  value = value.toLowerCase();
2101
2099
  }
2102
- if( String(optionValue) == String(value)) {
2100
+ if(module.escape.htmlEntities(String(optionValue)) === module.escape.htmlEntities(String(value))) {
2103
2101
  module.verbose('Found select item by value', optionValue, value);
2104
2102
  $selectedItem = $choice;
2105
2103
  return true;
@@ -3072,6 +3070,7 @@ $.fn.dropdown = function(parameters) {
3072
3070
  values = module.get.values(),
3073
3071
  newValue
3074
3072
  ;
3073
+ removedValue = module.escape.htmlEntities(removedValue);
3075
3074
  if( module.has.selectInput() ) {
3076
3075
  module.verbose('Input is <select> removing selected option', removedValue);
3077
3076
  newValue = module.remove.arrayValue(removedValue, values);
@@ -3661,10 +3660,9 @@ $.fn.dropdown = function(parameters) {
3661
3660
  },
3662
3661
  htmlEntities: function(string) {
3663
3662
  var
3664
- badChars = /[&<>"'`]/g,
3663
+ badChars = /[<>"'`]/g,
3665
3664
  shouldEscape = /[&<>"'`]/,
3666
3665
  escape = {
3667
- "&": "&amp;",
3668
3666
  "<": "&lt;",
3669
3667
  ">": "&gt;",
3670
3668
  '"': "&quot;",
@@ -3676,6 +3674,7 @@ $.fn.dropdown = function(parameters) {
3676
3674
  }
3677
3675
  ;
3678
3676
  if(shouldEscape.test(string)) {
3677
+ string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
3679
3678
  return string.replace(badChars, escapedChar);
3680
3679
  }
3681
3680
  return string;
@@ -4036,7 +4035,7 @@ $.fn.dropdown.settings = {
4036
4035
  message : '.message',
4037
4036
  menuIcon : '.dropdown.icon',
4038
4037
  search : 'input.search, .menu > .search > input, .menu input.search',
4039
- sizer : '> input.sizer',
4038
+ sizer : '> span.sizer',
4040
4039
  text : '> .text:not(.icon)',
4041
4040
  unselectable : '.disabled, .filtered',
4042
4041
  clearIcon : '> .remove.icon'
@@ -4072,7 +4071,8 @@ $.fn.dropdown.settings = {
4072
4071
  delete : 'delete',
4073
4072
  header : 'header',
4074
4073
  divider : 'divider',
4075
- groupIcon : ''
4074
+ groupIcon : '',
4075
+ unfilterable : 'unfilterable'
4076
4076
  }
4077
4077
 
4078
4078
  };
@@ -4087,10 +4087,9 @@ $.fn.dropdown.settings.templates = {
4087
4087
  return string;
4088
4088
  }
4089
4089
  var
4090
- badChars = /[&<>"'`]/g,
4090
+ badChars = /[<>"'`]/g,
4091
4091
  shouldEscape = /[&<>"'`]/,
4092
4092
  escape = {
4093
- "&": "&amp;",
4094
4093
  "<": "&lt;",
4095
4094
  ">": "&gt;",
4096
4095
  '"': "&quot;",
@@ -4102,6 +4101,7 @@ $.fn.dropdown.settings.templates = {
4102
4101
  }
4103
4102
  ;
4104
4103
  if(shouldEscape.test(string)) {
4104
+ string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
4105
4105
  return string.replace(badChars, escapedChar);
4106
4106
  }
4107
4107
  return string;
@@ -4157,10 +4157,10 @@ $.fn.dropdown.settings.templates = {
4157
4157
  if(option[fields.icon]) {
4158
4158
  html += '<i class="'+deQuote(option[fields.icon])+' '+(option[fields.iconClass] ? deQuote(option[fields.iconClass]) : className.icon)+'"></i>';
4159
4159
  }
4160
- html += escape(option[fields.name] || option[fields.value],preserveHTML);
4160
+ html += escape(option[fields.name] || '', preserveHTML);
4161
4161
  html += '</div>';
4162
4162
  } else if (itemType === 'header') {
4163
- var groupName = escape(option[fields.name],preserveHTML),
4163
+ var groupName = escape(option[fields.name] || '', preserveHTML),
4164
4164
  groupIcon = option[fields.icon] ? deQuote(option[fields.icon]) : className.groupIcon
4165
4165
  ;
4166
4166
  if(groupName !== '' || groupIcon !== '') {