fomantic-ui-sass 2.8.8.1 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/app/assets/fonts/semantic-ui/brand-icons.eot +0 -0
  4. data/app/assets/fonts/semantic-ui/brand-icons.svg +41 -6
  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 +245 -7
  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 +2 -2
  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/accordion.js +9 -3
  19. data/app/assets/javascripts/semantic-ui/api.js +92 -33
  20. data/app/assets/javascripts/semantic-ui/calendar.js +200 -82
  21. data/app/assets/javascripts/semantic-ui/checkbox.js +20 -13
  22. data/app/assets/javascripts/semantic-ui/dimmer.js +24 -9
  23. data/app/assets/javascripts/semantic-ui/dropdown.js +250 -205
  24. data/app/assets/javascripts/semantic-ui/embed.js +13 -9
  25. data/app/assets/javascripts/semantic-ui/flyout.js +1530 -0
  26. data/app/assets/javascripts/semantic-ui/form.js +47 -41
  27. data/app/assets/javascripts/semantic-ui/modal.js +187 -83
  28. data/app/assets/javascripts/semantic-ui/nag.js +2 -2
  29. data/app/assets/javascripts/semantic-ui/popup.js +16 -22
  30. data/app/assets/javascripts/semantic-ui/progress.js +7 -4
  31. data/app/assets/javascripts/semantic-ui/rating.js +7 -3
  32. data/app/assets/javascripts/semantic-ui/search.js +47 -20
  33. data/app/assets/javascripts/semantic-ui/shape.js +3 -3
  34. data/app/assets/javascripts/semantic-ui/sidebar.js +140 -43
  35. data/app/assets/javascripts/semantic-ui/site.js +1 -1
  36. data/app/assets/javascripts/semantic-ui/slider.js +78 -63
  37. data/app/assets/javascripts/semantic-ui/state.js +2 -2
  38. data/app/assets/javascripts/semantic-ui/sticky.js +30 -19
  39. data/app/assets/javascripts/semantic-ui/tab.js +24 -6
  40. data/app/assets/javascripts/semantic-ui/toast.js +67 -33
  41. data/app/assets/javascripts/semantic-ui/transition.js +27 -22
  42. data/app/assets/javascripts/semantic-ui/visibility.js +5 -5
  43. data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +1 -1
  44. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +160 -83
  45. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +25 -21
  46. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +110 -78
  47. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +43 -43
  48. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +1684 -272
  49. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +204 -157
  50. data/app/assets/stylesheets/semantic-ui/elements/_container.scss +98 -4
  51. data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +31 -31
  52. data/app/assets/stylesheets/semantic-ui/elements/_emoji.scss +10799 -8841
  53. data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +1021 -915
  54. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +6 -4
  55. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +2110 -2061
  56. data/app/assets/stylesheets/semantic-ui/elements/_image.scss +1 -1
  57. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +759 -22
  58. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +72 -68
  59. data/app/assets/stylesheets/semantic-ui/elements/_list.scss +31 -31
  60. data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +352 -352
  61. data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +33 -33
  62. data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +1 -1
  63. data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +1 -1
  64. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +118 -34
  65. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +32 -32
  66. data/app/assets/stylesheets/semantic-ui/elements/_text.scss +1 -1
  67. data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +5 -4
  68. data/app/assets/stylesheets/semantic-ui/globals/_site.scss +139 -42
  69. data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +177 -37
  70. data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +18 -1
  71. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +93 -92
  72. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +33 -18
  73. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +101 -51
  74. data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +5 -5
  75. data/app/assets/stylesheets/semantic-ui/modules/_flyout.scss +592 -0
  76. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +37 -6
  77. data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +1 -1
  78. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +103 -105
  79. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +1 -1
  80. data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +7 -46
  81. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +6 -6
  82. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +1 -1
  83. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +23 -9
  84. data/app/assets/stylesheets/semantic-ui/modules/_slider.scss +17 -17
  85. data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +1 -1
  86. data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +5 -5
  87. data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +49 -1
  88. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -1
  89. data/app/assets/stylesheets/semantic-ui/views/_ad.scss +4 -4
  90. data/app/assets/stylesheets/semantic-ui/views/_card.scss +754 -117
  91. data/app/assets/stylesheets/semantic-ui/views/_comment.scss +12 -12
  92. data/app/assets/stylesheets/semantic-ui/views/_feed.scss +29 -29
  93. data/app/assets/stylesheets/semantic-ui/views/_item.scss +17 -17
  94. data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +4 -4
  95. data/lib/fomantic/ui/sass/version.rb +2 -2
  96. metadata +5 -3
@@ -122,7 +122,7 @@ $.fn.calendar = function(parameters) {
122
122
  module.set.maxDate($module.data(metadata.maxDate));
123
123
  }
124
124
  module.setting('type', module.get.type());
125
- module.setting('on', settings.on || ($input.length ? 'focus' : 'click'));
125
+ module.setting('on', settings.on || 'click');
126
126
  },
127
127
  popup: function () {
128
128
  if (settings.inline) {
@@ -153,7 +153,10 @@ $.fn.calendar = function(parameters) {
153
153
  module.refreshTooltips();
154
154
  return settings.onVisible.apply($container, arguments);
155
155
  };
156
- var onHidden = settings.onHidden;
156
+ var onHidden = function () {
157
+ module.blur();
158
+ return settings.onHidden.apply($container, arguments)
159
+ }
157
160
  if (!$input.length) {
158
161
  //no input, $container has to handle focus/blur
159
162
  $container.attr('tabindex', '0');
@@ -162,10 +165,6 @@ $.fn.calendar = function(parameters) {
162
165
  module.focus();
163
166
  return settings.onVisible.apply($container, arguments);
164
167
  };
165
- onHidden = function () {
166
- module.blur();
167
- return settings.onHidden.apply($container, arguments);
168
- };
169
168
  }
170
169
  var onShow = function () {
171
170
  //reset the focus date onShow
@@ -323,7 +322,7 @@ $.fn.calendar = function(parameters) {
323
322
  var headerDate = isYear || isMonth ? new Date(year, 0, 1) :
324
323
  isDay ? new Date(year, month, 1) : new Date(year, month, day, hour, minute);
325
324
  var headerText = $('<span/>').addClass(className.link).appendTo(cell);
326
- headerText.text(formatter.header(headerDate, mode, settings));
325
+ headerText.text(module.helper.dateFormat(formatter[mode+'Header'], headerDate));
327
326
  var newMode = isMonth ? (settings.disableYear ? 'day' : 'year') :
328
327
  isDay ? (settings.disableMonth ? 'year' : 'month') : 'day';
329
328
  headerText.data(metadata.mode, newMode);
@@ -371,7 +370,7 @@ $.fn.calendar = function(parameters) {
371
370
  isHour ? new Date(year, month, day, i) : new Date(year, month, day, hour, i * settings.minTimeGap);
372
371
  var cellText = isYear ? i :
373
372
  isMonth ? settings.text.monthsShort[i] : isDay ? cellDate.getDate() :
374
- formatter.time(cellDate, settings, true);
373
+ module.helper.dateFormat(formatter.cellTime,cellDate);
375
374
  cell = $('<td/>').addClass(className.cell).appendTo(row);
376
375
  cell.text(cellText);
377
376
  cell.data(metadata.date, cellDate);
@@ -390,6 +389,19 @@ $.fn.calendar = function(parameters) {
390
389
  cell.attr("data-variation", disabledDate[metadata.variation]);
391
390
  }
392
391
  }
392
+ if (mode === 'hour') {
393
+ var disabledHour = module.helper.findHourAsObject(cellDate, mode, settings.disabledHours);
394
+ if (disabledHour !== null && disabledHour[metadata.message]) {
395
+ cell.attr("data-tooltip", disabledHour[metadata.message]);
396
+ cell.attr("data-position", disabledHour[metadata.position] || tooltipPosition);
397
+ if(disabledHour[metadata.inverted] || (isInverted && disabledHour[metadata.inverted] === undefined)) {
398
+ cell.attr("data-inverted", '');
399
+ }
400
+ if(disabledHour[metadata.variation]) {
401
+ cell.attr("data-variation", disabledHour[metadata.variation]);
402
+ }
403
+ }
404
+ }
393
405
  } else {
394
406
  eventDate = module.helper.findDayAsObject(cellDate, mode, settings.eventDates);
395
407
  if (eventDate !== null) {
@@ -490,7 +502,7 @@ $.fn.calendar = function(parameters) {
490
502
  var winWidth = $(window).width();
491
503
  $container.find('td[data-position]').each(function () {
492
504
  var cell = $(this);
493
- var tooltipWidth = window.getComputedStyle(cell[0], ':after').width.replace(/[^0-9\.]/g,'');
505
+ var tooltipWidth = window.getComputedStyle(cell[0], '::after').width.replace(/[^0-9\.]/g,'');
494
506
  var tooltipPosition = cell.attr('data-position');
495
507
  // use a fallback width of 250 (calendar width) for IE/Edge (which return "auto")
496
508
  var calcPosition = (winWidth - cell.width() - (parseInt(tooltipWidth,10) || 250)) > cell.offset().left ? 'right' : 'left';
@@ -581,15 +593,15 @@ $.fn.calendar = function(parameters) {
581
593
  },
582
594
  keydown: function (event) {
583
595
  var keyCode = event.which;
584
- if (keyCode === 27 || keyCode === 9) {
585
- //esc || tab
596
+ if (keyCode === 9) {
597
+ //tab
586
598
  module.popup('hide');
587
599
  }
588
600
 
589
601
  if (module.popup('is visible')) {
602
+ var mode = module.get.mode();
590
603
  if (keyCode === 37 || keyCode === 38 || keyCode === 39 || keyCode === 40) {
591
604
  //arrow keys
592
- var mode = module.get.mode();
593
605
  var bigIncrement = mode === 'day' ? 7 : mode === 'hour' ? 4 : mode === 'minute' ? timeGap['column'] : 3;
594
606
  var increment = keyCode === 37 ? -1 : keyCode === 38 ? -bigIncrement : keyCode == 39 ? 1 : bigIncrement;
595
607
  increment *= mode === 'minute' ? settings.minTimeGap : 1;
@@ -608,14 +620,18 @@ $.fn.calendar = function(parameters) {
608
620
  }
609
621
  } else if (keyCode === 13) {
610
622
  //enter
611
- var mode = module.get.mode();
612
623
  var date = module.get.focusDate();
613
624
  if (date && !settings.isDisabled(date, mode) && !module.helper.isDisabled(date, mode) && module.helper.isEnabled(date, mode)) {
614
- module.selectDate(date);
625
+ if (settings.onSelect.call(element, date, module.get.mode()) !== false) {
626
+ module.selectDate(date);
627
+ }
615
628
  }
616
629
  //disable form submission:
617
630
  event.preventDefault();
618
631
  event.stopPropagation();
632
+ } else if (keyCode === 27) {
633
+ module.popup('hide');
634
+ event.stopPropagation();
619
635
  }
620
636
  }
621
637
 
@@ -637,7 +653,7 @@ $.fn.calendar = function(parameters) {
637
653
  $container.removeClass(className.active);
638
654
  if (settings.formatInput) {
639
655
  var date = module.get.date();
640
- var text = formatter.datetime(date, settings);
656
+ var text = module.helper.dateFormat(formatter[settings.type], date);
641
657
  $input.val(text);
642
658
  }
643
659
  if(selectionComplete){
@@ -708,6 +724,9 @@ $.fn.calendar = function(parameters) {
708
724
  return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1;
709
725
  }();
710
726
  },
727
+ formattedDate: function(format, date) {
728
+ return module.helper.dateFormat(format || formatter[settings.type], date || module.get.date());
729
+ },
711
730
  date: function () {
712
731
  return module.helper.sanitiseDate($module.data(metadata.date)) || null;
713
732
  },
@@ -732,7 +751,7 @@ $.fn.calendar = function(parameters) {
732
751
  return $module.data(metadata.maxDate) || null;
733
752
  },
734
753
  monthOffset: function () {
735
- return $module.data(metadata.monthOffset) || 0;
754
+ return $module.data(metadata.monthOffset) || settings.monthOffset || 0;
736
755
  },
737
756
  mode: function () {
738
757
  //only returns valid modes for the current settings
@@ -786,7 +805,7 @@ $.fn.calendar = function(parameters) {
786
805
  return null;
787
806
  }
788
807
  if (!(selector instanceof $)) {
789
- selector = $(selector).first();
808
+ selector = $(document).find(selector).first();
790
809
  }
791
810
  //assume range related calendars are using the same namespace
792
811
  return selector.data(moduleNamespace);
@@ -801,7 +820,7 @@ $.fn.calendar = function(parameters) {
801
820
  date = module.helper.dateInRange(date);
802
821
 
803
822
  var mode = module.get.mode();
804
- var text = formatter.datetime(date, settings);
823
+ var text = module.helper.dateFormat(formatter[settings.type],date);
805
824
 
806
825
  if (fireChange && settings.onBeforeChange.call(element, date, text, mode) === false) {
807
826
  return false;
@@ -923,6 +942,7 @@ $.fn.calendar = function(parameters) {
923
942
  //if this is a range calendar, focus the container or input. This will open the popup from its event listeners.
924
943
  var endModule = module.get.calendarModule(settings.endCalendar);
925
944
  if (endModule) {
945
+ endModule.refresh();
926
946
  if (endModule.setting('on') !== 'focus') {
927
947
  endModule.popup('show');
928
948
  }
@@ -971,8 +991,62 @@ $.fn.calendar = function(parameters) {
971
991
  },
972
992
 
973
993
  helper: {
994
+ dateFormat: function(format,date) {
995
+ if (!(date instanceof Date)) {
996
+ return '';
997
+ }
998
+ if(typeof format === 'function') {
999
+ return format.call(module, date, settings);
1000
+ }
1001
+
1002
+ var D = date.getDate(),
1003
+ M = date.getMonth(),
1004
+ Y = date.getFullYear(),
1005
+ d = date.getDay(),
1006
+ H = date.getHours(),
1007
+ m = date.getMinutes(),
1008
+ s = date.getSeconds(),
1009
+ w = module.get.weekOfYear(Y,M,D+1-settings.firstDayOfWeek),
1010
+ h = H % 12 || 12,
1011
+ a = H < 12 ? settings.text.am.toLowerCase() : settings.text.pm.toLowerCase(),
1012
+ tokens = {
1013
+ D: D,
1014
+ DD: ('0'+D).slice(-2),
1015
+ M: M + 1,
1016
+ MM: ('0'+(M+1)).slice(-2),
1017
+ MMM: settings.text.monthsShort[M],
1018
+ MMMM: settings.text.months[M],
1019
+ Y: Y,
1020
+ YY: String(Y).slice(2),
1021
+ YYYY: Y,
1022
+ d: d,
1023
+ dd: settings.text.dayNamesShort[d].slice(0,2),
1024
+ ddd: settings.text.dayNamesShort[d],
1025
+ dddd: settings.text.dayNames[d],
1026
+ h: h,
1027
+ hh: ('0'+h).slice(-2),
1028
+ H: H,
1029
+ HH: ('0'+H).slice(-2),
1030
+ m: m,
1031
+ mm: ('0'+m).slice(-2),
1032
+ s: s,
1033
+ ss: ('0'+s).slice(-2),
1034
+ a: a,
1035
+ A: a.toUpperCase(),
1036
+ S: ['th', 'st', 'nd', 'rd'][D % 10 > 3 ? 0 : (D % 100 - D % 10 !== 10) * D % 10],
1037
+ w: w,
1038
+ ww: ('0'+w).slice(-2)
1039
+ }
1040
+ ;
1041
+ return format.replace(settings.regExp.token, function (match) {
1042
+ if (match in tokens) {
1043
+ return tokens[match];
1044
+ }
1045
+ return match.slice(1, match.length - 1);
1046
+ });
1047
+ },
974
1048
  isDisabled: function(date, mode) {
975
- return (mode === 'day' || mode === 'month' || mode === 'year') && ((mode === 'day' && settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
1049
+ return (mode === 'day' || mode === 'month' || mode === 'year' || mode === 'hour') && (((mode === 'day' && settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
976
1050
  if(typeof d === 'string') {
977
1051
  d = module.helper.sanitiseDate(d);
978
1052
  }
@@ -1005,7 +1079,45 @@ $.fn.calendar = function(parameters) {
1005
1079
  }
1006
1080
  }
1007
1081
  }
1008
- }));
1082
+ })) || (mode === 'hour' && settings.disabledHours.some(function(d){
1083
+ if (typeof d === 'string') {
1084
+ d = module.helper.sanitiseDate(d);
1085
+ }
1086
+ if (d instanceof Date) {
1087
+ return module.helper.dateEqual(date, d, mode);
1088
+ } else if (typeof d === 'number') {
1089
+ return date.getHours() === d;
1090
+ }
1091
+ if (d !== null && typeof d === 'object') {
1092
+ var blocked = true;
1093
+
1094
+ if (d[metadata.date]) {
1095
+ if (d[metadata.date] instanceof Date) {
1096
+ blocked = module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]));
1097
+ } else if (Array.isArray(d[metadata.date])) {
1098
+ return d[metadata.date].some(function(idate) {
1099
+ blocked = module.helper.dateEqual(date, idate, mode);
1100
+ });
1101
+ }
1102
+ }
1103
+
1104
+ if (d[metadata.days]) {
1105
+ if (typeof d[metadata.days] === 'number') {
1106
+ blocked = date.getDay() == d[metadata.days];
1107
+ } else if (Array.isArray(d[metadata.days])) {
1108
+ blocked = d[metadata.days].indexOf(date.getDay()) > -1;
1109
+ }
1110
+ }
1111
+
1112
+ if (d[metadata.hours]) {
1113
+ if (typeof d[metadata.hours] === 'number') {
1114
+ return blocked && date.getHours() == d[metadata.hours];
1115
+ } else if (Array.isArray(d[metadata.hours])) {
1116
+ return blocked && d[metadata.hours].indexOf(date.getHours()) > -1;
1117
+ }
1118
+ }
1119
+ }
1120
+ })));
1009
1121
  },
1010
1122
  isEnabled: function(date, mode) {
1011
1123
  if (mode === 'day') {
@@ -1073,6 +1185,49 @@ $.fn.calendar = function(parameters) {
1073
1185
  }
1074
1186
  return null;
1075
1187
  },
1188
+ findHourAsObject: function(date, mode, hours) {
1189
+ if (mode === 'hour') {
1190
+ var d;
1191
+ var hourCheck = function(date, d) {
1192
+ if (d[metadata.hours]) {
1193
+ if (typeof d[metadata.hours] === 'number' && date.getHours() == d[metadata.hours]) {
1194
+ return d;
1195
+ } else if (Array.isArray(d[metadata.hours])) {
1196
+ if (d[metadata.hours].indexOf(date.getHours()) > -1) {
1197
+ return d;
1198
+ }
1199
+ }
1200
+ }
1201
+ }
1202
+ for (var i = 0; i < hours.length; i++) {
1203
+ d = hours[i];
1204
+ if (typeof d === 'number' && date.getHours() == d) {
1205
+ return null;
1206
+ } else if (d !== null && typeof d === 'object') {
1207
+ if (d[metadata.days] && hourCheck(date,d)) {
1208
+ if (typeof d[metadata.days] === 'number' && date.getDay() == d[metadata.days]) {
1209
+ return d;
1210
+ } else if (Array.isArray(d[metadata.days])) {
1211
+ if (d[metadata.days].indexOf(date.getDay()) > -1) {
1212
+ return d;
1213
+ }
1214
+ }
1215
+ } else if (d[metadata.date] && hourCheck(date,d)) {
1216
+ if (d[metadata.date] instanceof Date && module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]))) {
1217
+ return d;
1218
+ } else if (Array.isArray(d[metadata.date])) {
1219
+ if (d[metadata.date].some(function(idate) { return module.helper.dateEqual(date, idate, mode); })) {
1220
+ return d;
1221
+ }
1222
+ }
1223
+ } else if (hourCheck(date,d)) {
1224
+ return d;
1225
+ }
1226
+ }
1227
+ }
1228
+ }
1229
+ return null;
1230
+ },
1076
1231
  sanitiseDate: function (date) {
1077
1232
  if (!(date instanceof Date)) {
1078
1233
  date = parser.date('' + date, settings);
@@ -1257,7 +1412,7 @@ $.fn.calendar = function(parameters) {
1257
1412
  response
1258
1413
  ;
1259
1414
  passedArguments = passedArguments || queryArguments;
1260
- context = element || context;
1415
+ context = context || element;
1261
1416
  if (typeof query == 'string' && object !== undefined) {
1262
1417
  query = query.split(/[\. ]/);
1263
1418
  maxDepth = query.length - 1;
@@ -1333,14 +1488,14 @@ $.fn.calendar.settings = {
1333
1488
  silent: false,
1334
1489
  debug: false,
1335
1490
  verbose: false,
1336
- performance: false,
1491
+ performance: true,
1337
1492
 
1338
1493
  type : 'datetime', // picker type, can be 'datetime', 'date', 'time', 'month', or 'year'
1339
1494
  firstDayOfWeek : 0, // day for first day column (0 = Sunday)
1340
1495
  constantHeight : true, // add rows to shorter months to keep day calendar height consistent (6 rows)
1341
1496
  today : false, // show a 'today/now' button at the bottom of the calendar
1342
1497
  closable : true, // close the popup after selecting a date/time
1343
- monthFirst : true, // month before day when parsing/converting date from/to text
1498
+ monthFirst : true, // month before day when parsing date from text
1344
1499
  touchReadonly : true, // set input to readonly on touch devices
1345
1500
  inline : false, // create the calendar inline instead of inside a popup
1346
1501
  on : null, // when to show the popup (defaults to 'focus' for input, 'click' for others)
@@ -1348,7 +1503,6 @@ $.fn.calendar.settings = {
1348
1503
  startMode : false, // display mode to start in, can be 'year', 'month', 'day', 'hour', 'minute' (false = 'day')
1349
1504
  minDate : null, // minimum date/time that can be selected, dates/times before are disabled
1350
1505
  maxDate : null, // maximum date/time that can be selected, dates/times after are disabled
1351
- ampm : true, // show am/pm in time mode
1352
1506
  disableYear : false, // disable year selection mode
1353
1507
  disableMonth : false, // disable month selection mode
1354
1508
  disableMinute : false, // disable minute selection mode
@@ -1356,8 +1510,10 @@ $.fn.calendar.settings = {
1356
1510
  startCalendar : null, // jquery object or selector for another calendar that represents the start date of a date range
1357
1511
  endCalendar : null, // jquery object or selector for another calendar that represents the end date of a date range
1358
1512
  multiMonth : 1, // show multiple months when in 'day' mode
1513
+ monthOffset : 0, // position current month by offset when multimonth > 1
1359
1514
  minTimeGap : 5,
1360
- showWeekNumbers : null, // show Number of Week at the very first column of a dayView
1515
+ showWeekNumbers : false, // show Number of Week at the very first column of a dayView
1516
+ disabledHours : [], // specific hour(s) which won't be selectable and contain additional information.
1361
1517
  disabledDates : [], // specific day(s) which won't be selectable and contain additional information.
1362
1518
  disabledDaysOfWeek : [], // day(s) which won't be selectable(s) (0 = Sunday)
1363
1519
  enabledDates : [], // specific day(s) which will be selectable, all other days will be disabled
@@ -1370,11 +1526,14 @@ $.fn.calendar.settings = {
1370
1526
  position: 'bottom left',
1371
1527
  lastResort: 'bottom left',
1372
1528
  prefer: 'opposite',
1529
+ observeChanges: false,
1373
1530
  hideOnScroll: false
1374
1531
  },
1375
1532
 
1376
1533
  text: {
1377
1534
  days: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
1535
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
1536
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
1378
1537
  months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
1379
1538
  monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
1380
1539
  today: 'Today',
@@ -1385,67 +1544,23 @@ $.fn.calendar.settings = {
1385
1544
  },
1386
1545
 
1387
1546
  formatter: {
1388
- header: function (date, mode, settings) {
1389
- return mode === 'year' ? settings.formatter.yearHeader(date, settings) :
1390
- mode === 'month' ? settings.formatter.monthHeader(date, settings) :
1391
- mode === 'day' ? settings.formatter.dayHeader(date, settings) :
1392
- mode === 'hour' ? settings.formatter.hourHeader(date, settings) :
1393
- settings.formatter.minuteHeader(date, settings);
1394
- },
1395
1547
  yearHeader: function (date, settings) {
1396
1548
  var decadeYear = Math.ceil(date.getFullYear() / 10) * 10;
1397
1549
  return (decadeYear - 9) + ' - ' + (decadeYear + 2);
1398
1550
  },
1399
- monthHeader: function (date, settings) {
1400
- return date.getFullYear();
1401
- },
1402
- dayHeader: function (date, settings) {
1403
- var month = settings.text.months[date.getMonth()];
1404
- var year = date.getFullYear();
1405
- return month + ' ' + year;
1406
- },
1407
- hourHeader: function (date, settings) {
1408
- return settings.formatter.date(date, settings);
1409
- },
1410
- minuteHeader: function (date, settings) {
1411
- return settings.formatter.date(date, settings);
1412
- },
1551
+ monthHeader: 'YYYY',
1552
+ dayHeader: 'MMMM YYYY',
1553
+ hourHeader: 'MMMM D, YYYY',
1554
+ minuteHeader: 'MMMM D, YYYY',
1413
1555
  dayColumnHeader: function (day, settings) {
1414
1556
  return settings.text.days[day];
1415
1557
  },
1416
- datetime: function (date, settings) {
1417
- if (!date) {
1418
- return '';
1419
- }
1420
- var day = settings.type === 'time' ? '' : settings.formatter.date(date, settings);
1421
- var time = settings.type.indexOf('time') < 0 ? '' : settings.formatter.time(date, settings, false);
1422
- var separator = settings.type === 'datetime' ? ' ' : '';
1423
- return day + separator + time;
1424
- },
1425
- date: function (date, settings) {
1426
- if (!date) {
1427
- return '';
1428
- }
1429
- var day = date.getDate();
1430
- var month = settings.text.months[date.getMonth()];
1431
- var year = date.getFullYear();
1432
- return settings.type === 'year' ? year :
1433
- settings.type === 'month' ? month + ' ' + year :
1434
- (settings.monthFirst ? month + ' ' + day : day + ' ' + month) + ', ' + year;
1435
- },
1436
- time: function (date, settings, forCalendar) {
1437
- if (!date) {
1438
- return '';
1439
- }
1440
- var hour = date.getHours();
1441
- var minute = date.getMinutes();
1442
- var ampm = '';
1443
- if (settings.ampm) {
1444
- ampm = ' ' + (hour < 12 ? settings.text.am : settings.text.pm);
1445
- hour = hour === 0 ? 12 : hour > 12 ? hour - 12 : hour;
1446
- }
1447
- return hour + ':' + (minute < 10 ? '0' : '') + minute + ampm;
1448
- },
1558
+ datetime: 'MMMM D, YYYY h:mm A',
1559
+ date: 'MMMM D, YYYY',
1560
+ time: 'h:mm A',
1561
+ cellTime: 'h:mm A',
1562
+ month: 'MMMM YYYY',
1563
+ year: 'YYYY',
1449
1564
  today: function (settings) {
1450
1565
  return settings.type === 'date' ? settings.text.today : settings.text.now;
1451
1566
  },
@@ -1461,7 +1576,7 @@ $.fn.calendar.settings = {
1461
1576
  if (!text) {
1462
1577
  return null;
1463
1578
  }
1464
- text = String(text).trim();
1579
+ text = String(text).trim().replace(/([.:\/\-])\s+/g,'$1').replace(/\s+([.:\/-])/g,'$1').replace(/\s+/g,' ');
1465
1580
  if (text.length === 0) {
1466
1581
  return null;
1467
1582
  }
@@ -1714,7 +1829,8 @@ $.fn.calendar.settings = {
1714
1829
 
1715
1830
  regExp: {
1716
1831
  dateWords: /[^A-Za-z\u00C0-\u024F]+/g,
1717
- dateNumbers: /[^\d:]+/g
1832
+ dateNumbers: /[^\d:]+/g,
1833
+ token: /d{1,4}|D{1,2}|M{1,4}|YY(?:YY)?|([Hhmsw])\1?|[SAaY]|"[^"]*"|'[^']*'/g
1718
1834
  },
1719
1835
 
1720
1836
  error: {
@@ -1763,7 +1879,9 @@ $.fn.calendar.settings = {
1763
1879
  variation: 'variation',
1764
1880
  position: 'position',
1765
1881
  month: 'month',
1766
- year: 'year'
1882
+ year: 'year',
1883
+ hours: 'hours',
1884
+ days: 'days'
1767
1885
  },
1768
1886
 
1769
1887
  eventClass: 'blue'
@@ -239,18 +239,27 @@ $.fn.checkbox = function(parameters) {
239
239
  }
240
240
  }
241
241
 
242
+ shortcutPressed = false;
242
243
  if(key == keyCode.escape) {
243
244
  module.verbose('Escape key pressed blurring field');
244
245
  $input.blur();
245
246
  shortcutPressed = true;
246
- }
247
- else if(!event.ctrlKey && ( key == keyCode.space || (key == keyCode.enter && settings.enableEnterKey)) ) {
248
- module.verbose('Enter/space key pressed, toggling checkbox');
249
- module.toggle();
250
- shortcutPressed = true;
251
- }
252
- else {
253
- shortcutPressed = false;
247
+ event.stopPropagation();
248
+ }
249
+ else if(!event.ctrlKey && module.can.change()) {
250
+ if( key == keyCode.space || (key == keyCode.enter && settings.enableEnterKey) ) {
251
+ module.verbose('Enter/space key pressed, toggling checkbox');
252
+ module.toggle();
253
+ shortcutPressed = true;
254
+ } else if($module.is('.toggle, .slider') && !module.is.radio()) {
255
+ if(key == keyCode.left && module.is.checked()) {
256
+ module.uncheck();
257
+ shortcutPressed = true;
258
+ } else if(key == keyCode.right && module.is.unchecked()) {
259
+ module.check();
260
+ shortcutPressed = true;
261
+ }
262
+ }
254
263
  }
255
264
  },
256
265
  keyup: function(event) {
@@ -323,7 +332,6 @@ $.fn.checkbox = function(parameters) {
323
332
  settings.onEnable.call(input);
324
333
  // preserve legacy callbacks
325
334
  settings.onEnabled.call(input);
326
- module.trigger.change();
327
335
  }
328
336
  },
329
337
 
@@ -338,7 +346,6 @@ $.fn.checkbox = function(parameters) {
338
346
  settings.onDisable.call(input);
339
347
  // preserve legacy callbacks
340
348
  settings.onDisabled.call(input);
341
- module.trigger.change();
342
349
  }
343
350
  },
344
351
 
@@ -747,7 +754,7 @@ $.fn.checkbox = function(parameters) {
747
754
  response
748
755
  ;
749
756
  passedArguments = passedArguments || queryArguments;
750
- context = element || context;
757
+ context = context || element;
751
758
  if(typeof query == 'string' && object !== undefined) {
752
759
  query = query.split(/[\. ]/);
753
760
  maxDepth = query.length - 1;
@@ -823,7 +830,7 @@ $.fn.checkbox.settings = {
823
830
 
824
831
  silent : false,
825
832
  debug : false,
826
- verbose : true,
833
+ verbose : false,
827
834
  performance : true,
828
835
 
829
836
  // delegated event context
@@ -866,7 +873,7 @@ $.fn.checkbox.settings = {
866
873
 
867
874
  selector : {
868
875
  checkbox : '.ui.checkbox',
869
- label : 'label, .box',
876
+ label : 'label',
870
877
  input : 'input[type="checkbox"], input[type="radio"]',
871
878
  link : 'a[href]'
872
879
  }