fomantic-ui 2.9.0-beta.9 → 2.9.0-beta.90

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 (216) hide show
  1. package/.all-contributorsrc +188 -3
  2. package/CONTRIBUTORS.md +71 -37
  3. package/README.md +1 -1
  4. package/dist/components/accordion.css +50 -6
  5. package/dist/components/accordion.js +1 -1
  6. package/dist/components/accordion.min.css +2 -2
  7. package/dist/components/accordion.min.js +1 -1
  8. package/dist/components/ad.css +1 -1
  9. package/dist/components/ad.min.css +1 -1
  10. package/dist/components/api.js +25 -23
  11. package/dist/components/api.min.js +2 -2
  12. package/dist/components/breadcrumb.css +1 -1
  13. package/dist/components/breadcrumb.min.css +1 -1
  14. package/dist/components/button.css +81 -81
  15. package/dist/components/button.min.css +2 -2
  16. package/dist/components/calendar.css +1 -1
  17. package/dist/components/calendar.js +106 -10
  18. package/dist/components/calendar.min.css +1 -1
  19. package/dist/components/calendar.min.js +2 -2
  20. package/dist/components/card.css +26 -19
  21. package/dist/components/card.min.css +2 -2
  22. package/dist/components/checkbox.css +2 -1
  23. package/dist/components/checkbox.js +17 -11
  24. package/dist/components/checkbox.min.css +2 -2
  25. package/dist/components/checkbox.min.js +2 -2
  26. package/dist/components/comment.css +11 -11
  27. package/dist/components/comment.min.css +1 -1
  28. package/dist/components/container.css +1 -1
  29. package/dist/components/container.min.css +1 -1
  30. package/dist/components/dimmer.css +28 -14
  31. package/dist/components/dimmer.js +1 -1
  32. package/dist/components/dimmer.min.css +2 -2
  33. package/dist/components/dimmer.min.js +1 -1
  34. package/dist/components/divider.css +1 -1
  35. package/dist/components/divider.min.css +1 -1
  36. package/dist/components/dropdown.css +28 -5
  37. package/dist/components/dropdown.js +14 -18
  38. package/dist/components/dropdown.min.css +2 -2
  39. package/dist/components/dropdown.min.js +2 -2
  40. package/dist/components/embed.css +1 -1
  41. package/dist/components/embed.js +1 -1
  42. package/dist/components/embed.min.css +1 -1
  43. package/dist/components/embed.min.js +1 -1
  44. package/dist/components/emoji.css +2 -2
  45. package/dist/components/feed.css +28 -28
  46. package/dist/components/feed.min.css +2 -2
  47. package/dist/components/flag.css +731 -625
  48. package/dist/components/flag.min.css +2 -2
  49. package/dist/components/form.css +103 -54
  50. package/dist/components/form.js +24 -22
  51. package/dist/components/form.min.css +2 -2
  52. package/dist/components/form.min.js +2 -2
  53. package/dist/components/grid.css +11 -8
  54. package/dist/components/grid.min.css +2 -2
  55. package/dist/components/header.css +1 -1
  56. package/dist/components/header.min.css +1 -1
  57. package/dist/components/icon.css +6 -1
  58. package/dist/components/icon.min.css +2 -2
  59. package/dist/components/image.css +1 -1
  60. package/dist/components/image.min.css +1 -1
  61. package/dist/components/input.css +17 -2
  62. package/dist/components/input.min.css +2 -2
  63. package/dist/components/item.css +13 -13
  64. package/dist/components/item.min.css +1 -1
  65. package/dist/components/label.css +1 -1
  66. package/dist/components/label.min.css +1 -1
  67. package/dist/components/list.css +1 -1
  68. package/dist/components/list.min.css +1 -1
  69. package/dist/components/loader.css +1 -1
  70. package/dist/components/loader.min.css +1 -1
  71. package/dist/components/menu.css +29 -5
  72. package/dist/components/menu.min.css +1 -1
  73. package/dist/components/message.css +41 -41
  74. package/dist/components/message.min.css +2 -2
  75. package/dist/components/modal.css +3 -1
  76. package/dist/components/modal.js +94 -30
  77. package/dist/components/modal.min.css +2 -2
  78. package/dist/components/modal.min.js +2 -2
  79. package/dist/components/nag.css +1 -1
  80. package/dist/components/nag.js +1 -1
  81. package/dist/components/nag.min.css +1 -1
  82. package/dist/components/nag.min.js +1 -1
  83. package/dist/components/placeholder.css +1 -1
  84. package/dist/components/placeholder.min.css +1 -1
  85. package/dist/components/popup.css +5 -3
  86. package/dist/components/popup.js +1 -1
  87. package/dist/components/popup.min.css +2 -2
  88. package/dist/components/popup.min.js +1 -1
  89. package/dist/components/progress.css +1 -1
  90. package/dist/components/progress.js +1 -1
  91. package/dist/components/progress.min.css +1 -1
  92. package/dist/components/progress.min.js +1 -1
  93. package/dist/components/rail.css +1 -1
  94. package/dist/components/rail.min.css +1 -1
  95. package/dist/components/rating.css +7 -46
  96. package/dist/components/rating.js +1 -1
  97. package/dist/components/rating.min.css +2 -2
  98. package/dist/components/rating.min.js +1 -1
  99. package/dist/components/reset.css +1 -1
  100. package/dist/components/reset.min.css +1 -1
  101. package/dist/components/reveal.css +1 -1
  102. package/dist/components/reveal.min.css +1 -1
  103. package/dist/components/search.css +1 -1
  104. package/dist/components/search.js +1 -1
  105. package/dist/components/search.min.css +1 -1
  106. package/dist/components/search.min.js +1 -1
  107. package/dist/components/segment.css +12 -6
  108. package/dist/components/segment.min.css +2 -2
  109. package/dist/components/shape.css +1 -1
  110. package/dist/components/shape.js +1 -1
  111. package/dist/components/shape.min.css +1 -1
  112. package/dist/components/shape.min.js +1 -1
  113. package/dist/components/sidebar.css +4 -2
  114. package/dist/components/sidebar.js +1 -1
  115. package/dist/components/sidebar.min.css +2 -2
  116. package/dist/components/sidebar.min.js +1 -1
  117. package/dist/components/site.css +61 -39
  118. package/dist/components/site.js +1 -1
  119. package/dist/components/site.min.css +2 -2
  120. package/dist/components/site.min.js +1 -1
  121. package/dist/components/slider.js +1 -1
  122. package/dist/components/slider.min.js +1 -1
  123. package/dist/components/state.js +1 -1
  124. package/dist/components/state.min.js +1 -1
  125. package/dist/components/statistic.css +1 -1
  126. package/dist/components/statistic.min.css +1 -1
  127. package/dist/components/step.css +4 -4
  128. package/dist/components/step.min.css +2 -2
  129. package/dist/components/sticky.css +1 -1
  130. package/dist/components/sticky.js +1 -1
  131. package/dist/components/sticky.min.css +1 -1
  132. package/dist/components/sticky.min.js +1 -1
  133. package/dist/components/tab.css +1 -1
  134. package/dist/components/tab.js +1 -1
  135. package/dist/components/tab.min.css +1 -1
  136. package/dist/components/tab.min.js +1 -1
  137. package/dist/components/table.css +5 -3
  138. package/dist/components/table.min.css +2 -2
  139. package/dist/components/text.css +1 -1
  140. package/dist/components/text.min.css +1 -1
  141. package/dist/components/toast.css +7 -1
  142. package/dist/components/toast.js +5 -4
  143. package/dist/components/toast.min.css +2 -2
  144. package/dist/components/toast.min.js +2 -2
  145. package/dist/components/transition.css +1 -1
  146. package/dist/components/transition.js +1 -1
  147. package/dist/components/transition.min.css +1 -1
  148. package/dist/components/transition.min.js +1 -1
  149. package/dist/components/visibility.js +1 -1
  150. package/dist/components/visibility.min.js +1 -1
  151. package/dist/semantic.css +1375 -1030
  152. package/dist/semantic.js +303 -136
  153. package/dist/semantic.min.css +2 -2
  154. package/dist/semantic.min.js +2 -2
  155. package/examples/assets/library/iframe-content.js +5 -5
  156. package/package.json +2 -2
  157. package/src/definitions/behaviors/api.js +24 -22
  158. package/src/definitions/behaviors/form.js +23 -21
  159. package/src/definitions/collections/form.less +190 -139
  160. package/src/definitions/collections/grid.less +716 -680
  161. package/src/definitions/collections/menu.less +173 -126
  162. package/src/definitions/collections/message.less +48 -46
  163. package/src/definitions/collections/table.less +255 -242
  164. package/src/definitions/elements/button.less +360 -347
  165. package/src/definitions/elements/container.less +16 -8
  166. package/src/definitions/elements/emoji.less +15 -9
  167. package/src/definitions/elements/flag.less +7 -17
  168. package/src/definitions/elements/header.less +42 -35
  169. package/src/definitions/elements/icon.less +38 -31
  170. package/src/definitions/elements/input.less +23 -7
  171. package/src/definitions/elements/label.less +92 -91
  172. package/src/definitions/elements/list.less +55 -45
  173. package/src/definitions/elements/loader.less +30 -29
  174. package/src/definitions/elements/segment.less +30 -22
  175. package/src/definitions/elements/step.less +52 -48
  176. package/src/definitions/elements/text.less +17 -15
  177. package/src/definitions/globals/site.less +23 -2
  178. package/src/definitions/modules/accordion.less +55 -5
  179. package/src/definitions/modules/calendar.js +105 -9
  180. package/src/definitions/modules/checkbox.js +16 -10
  181. package/src/definitions/modules/checkbox.less +34 -178
  182. package/src/definitions/modules/dimmer.less +21 -8
  183. package/src/definitions/modules/dropdown.js +13 -17
  184. package/src/definitions/modules/dropdown.less +99 -67
  185. package/src/definitions/modules/modal.js +93 -29
  186. package/src/definitions/modules/modal.less +2 -0
  187. package/src/definitions/modules/nag.less +20 -19
  188. package/src/definitions/modules/popup.less +5 -1
  189. package/src/definitions/modules/progress.less +19 -18
  190. package/src/definitions/modules/rating.less +49 -42
  191. package/src/definitions/modules/search.less +32 -16
  192. package/src/definitions/modules/sidebar.less +33 -19
  193. package/src/definitions/modules/slider.less +39 -38
  194. package/src/definitions/modules/toast.js +4 -3
  195. package/src/definitions/modules/toast.less +22 -16
  196. package/src/definitions/views/card.less +402 -361
  197. package/src/definitions/views/comment.less +92 -81
  198. package/src/definitions/views/feed.less +164 -144
  199. package/src/definitions/views/item.less +249 -196
  200. package/src/definitions/views/statistic.less +90 -88
  201. package/src/themes/default/collections/menu.variables +6 -0
  202. package/src/themes/default/elements/button.variables +2 -1
  203. package/src/themes/default/elements/flag.overrides +1635 -986
  204. package/src/themes/default/elements/flag.variables +7 -5
  205. package/src/themes/default/elements/icon.overrides +35 -28
  206. package/src/themes/default/elements/icon.variables +1 -0
  207. package/src/themes/default/elements/step.overrides +1 -1
  208. package/src/themes/default/globals/site.variables +6 -0
  209. package/src/themes/default/globals/variation.variables +104 -6
  210. package/src/themes/default/modules/accordion.variables +15 -0
  211. package/src/themes/default/modules/dimmer.variables +1 -1
  212. package/src/themes/default/modules/dropdown.variables +1 -1
  213. package/src/themes/famfamfam/elements/flag.overrides +1026 -0
  214. package/src/themes/famfamfam/elements/flag.variables +13 -0
  215. package/tasks/build/css.js +6 -1
  216. package/test/helpers/sinon.js +1 -1
package/dist/semantic.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.0-beta.9
2
+ * # Fomantic UI - 2.9.0-beta.90
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * http://fomantic-ui.com/
5
5
  *
@@ -9,7 +9,7 @@
9
9
  *
10
10
  */
11
11
  /*!
12
- * # Fomantic-UI 2.9.0-beta.9 - Site
12
+ * # Fomantic-UI 2.9.0-beta.90 - Site
13
13
  * http://github.com/fomantic/Fomantic-UI/
14
14
  *
15
15
  *
@@ -503,7 +503,7 @@ $.extend($.expr[ ":" ], {
503
503
  })( jQuery, window, document );
504
504
 
505
505
  /*!
506
- * # Fomantic-UI 2.9.0-beta.9 - Form Validation
506
+ * # Fomantic-UI 2.9.0-beta.90 - Form Validation
507
507
  * http://github.com/fomantic/Fomantic-UI/
508
508
  *
509
509
  *
@@ -923,6 +923,7 @@ $.fn.form = function(parameters) {
923
923
  $field.one('keyup' + eventNamespace, module.event.field.keyup);
924
924
  module.submit();
925
925
  module.debug('Enter pressed on input submitting form');
926
+ event.preventDefault();
926
927
  }
927
928
  keyHeldDown = true;
928
929
  }
@@ -1390,13 +1391,13 @@ $.fn.form = function(parameters) {
1390
1391
  }
1391
1392
  if(settings.inline) {
1392
1393
  if(!promptExists) {
1393
- $prompt = settings.templates.prompt(errors, className.label);
1394
+ $prompt = $('<div/>').addClass(className.label);
1394
1395
  $prompt
1395
1396
  .appendTo($fieldGroup)
1396
1397
  ;
1397
1398
  }
1398
1399
  $prompt
1399
- .html(errors[0])
1400
+ .html(settings.templates.prompt(errors))
1400
1401
  ;
1401
1402
  if(!promptExists) {
1402
1403
  if(settings.transition && module.can.useElement('transition') && $module.transition('is supported')) {
@@ -1589,12 +1590,15 @@ $.fn.form = function(parameters) {
1589
1590
  }
1590
1591
  else if(isCheckbox) {
1591
1592
  module.verbose('Setting checkbox value', value, $element);
1592
- if(value === true || value === 1) {
1593
+ if(value === true || value === 1 || value === 'on') {
1593
1594
  $element.checkbox('check');
1594
1595
  }
1595
1596
  else {
1596
1597
  $element.checkbox('uncheck');
1597
1598
  }
1599
+ if(typeof value === 'string') {
1600
+ $field.val(value);
1601
+ }
1598
1602
  }
1599
1603
  else if(isDropdown) {
1600
1604
  module.verbose('Setting dropdown value', value, $element);
@@ -1707,7 +1711,7 @@ $.fn.form = function(parameters) {
1707
1711
  if(event && $module.data('moduleApi') !== undefined) {
1708
1712
  event.stopImmediatePropagation();
1709
1713
  }
1710
- if(settings.errorFocus) {
1714
+ if(settings.errorFocus && ignoreCallbacks !== true) {
1711
1715
  var focusElement, hasTabIndex = true;
1712
1716
  if (typeof settings.errorFocus === 'string') {
1713
1717
  focusElement = $(settings.errorFocus);
@@ -2030,7 +2034,7 @@ $.fn.form.settings = {
2030
2034
 
2031
2035
  autoCheckRequired : false,
2032
2036
  preventLeaving : false,
2033
- errorFocus : false,
2037
+ errorFocus : true,
2034
2038
  dateHandling : 'date', // 'date', 'input', 'formatter'
2035
2039
 
2036
2040
  onValid : function() {},
@@ -2086,7 +2090,6 @@ $.fn.form.settings = {
2086
2090
  doesntContain : '{name} cannot contain "{ruleValue}"',
2087
2091
  doesntContainExactly : '{name} cannot contain exactly "{ruleValue}"',
2088
2092
  minLength : '{name} must be at least {ruleValue} characters',
2089
- length : '{name} must be at least {ruleValue} characters',
2090
2093
  exactLength : '{name} must be exactly {ruleValue} characters',
2091
2094
  maxLength : '{name} cannot be longer than {ruleValue} characters',
2092
2095
  match : '{name} must match {ruleValue} field',
@@ -2100,7 +2103,7 @@ $.fn.form.settings = {
2100
2103
  selector : {
2101
2104
  checkbox : 'input[type="checkbox"], input[type="radio"]',
2102
2105
  clear : '.clear',
2103
- field : 'input:not(.search):not([type="file"]), textarea, select',
2106
+ field : 'input:not(.search):not([type="file"]):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',
2104
2107
  group : '.field',
2105
2108
  input : 'input:not([type="file"])',
2106
2109
  message : '.error.message',
@@ -2141,15 +2144,22 @@ $.fn.form.settings = {
2141
2144
  html += '<li>' + value + '</li>';
2142
2145
  });
2143
2146
  html += '</ul>';
2144
- return $(html);
2147
+ return html;
2145
2148
  },
2146
2149
 
2147
- // template that produces label
2148
- prompt: function(errors, labelClasses) {
2149
- return $('<div/>')
2150
- .addClass(labelClasses)
2151
- .html(errors[0])
2150
+ // template that produces label content
2151
+ prompt: function(errors) {
2152
+ if(errors.length === 1){
2153
+ return errors[0];
2154
+ }
2155
+ var
2156
+ html = '<ul class="ui list">'
2152
2157
  ;
2158
+ $.each(errors, function(index, value) {
2159
+ html += '<li>' + value + '</li>';
2160
+ });
2161
+ html += '</ul>';
2162
+ return html;
2153
2163
  }
2154
2164
  },
2155
2165
 
@@ -2359,14 +2369,6 @@ $.fn.form.settings = {
2359
2369
  ;
2360
2370
  },
2361
2371
 
2362
- // see rls notes for 2.0.6 (this is a duplicate of minLength)
2363
- length: function(value, requiredLength) {
2364
- return (value !== undefined)
2365
- ? (value.length >= requiredLength)
2366
- : false
2367
- ;
2368
- },
2369
-
2370
2372
  // is exactly length
2371
2373
  exactLength: function(value, requiredLength) {
2372
2374
  return (value !== undefined)
@@ -2575,7 +2577,7 @@ $.fn.form.settings = {
2575
2577
  })( jQuery, window, document );
2576
2578
 
2577
2579
  /*!
2578
- * # Fomantic-UI 2.9.0-beta.9 - Accordion
2580
+ * # Fomantic-UI 2.9.0-beta.90 - Accordion
2579
2581
  * http://github.com/fomantic/Fomantic-UI/
2580
2582
  *
2581
2583
  *
@@ -3194,7 +3196,7 @@ $.extend( $.easing, {
3194
3196
 
3195
3197
 
3196
3198
  /*!
3197
- * # Fomantic-UI 2.9.0-beta.9 - Calendar
3199
+ * # Fomantic-UI 2.9.0-beta.90 - Calendar
3198
3200
  * http://github.com/fomantic/Fomantic-UI/
3199
3201
  *
3200
3202
  *
@@ -3317,7 +3319,7 @@ $.fn.calendar = function(parameters) {
3317
3319
  module.set.maxDate($module.data(metadata.maxDate));
3318
3320
  }
3319
3321
  module.setting('type', module.get.type());
3320
- module.setting('on', settings.on || ($input.length ? 'focus' : 'click'));
3322
+ module.setting('on', settings.on || 'click');
3321
3323
  },
3322
3324
  popup: function () {
3323
3325
  if (settings.inline) {
@@ -3348,7 +3350,10 @@ $.fn.calendar = function(parameters) {
3348
3350
  module.refreshTooltips();
3349
3351
  return settings.onVisible.apply($container, arguments);
3350
3352
  };
3351
- var onHidden = settings.onHidden;
3353
+ var onHidden = function () {
3354
+ module.blur();
3355
+ return settings.onHidden.apply($container, arguments)
3356
+ }
3352
3357
  if (!$input.length) {
3353
3358
  //no input, $container has to handle focus/blur
3354
3359
  $container.attr('tabindex', '0');
@@ -3357,10 +3362,6 @@ $.fn.calendar = function(parameters) {
3357
3362
  module.focus();
3358
3363
  return settings.onVisible.apply($container, arguments);
3359
3364
  };
3360
- onHidden = function () {
3361
- module.blur();
3362
- return settings.onHidden.apply($container, arguments);
3363
- };
3364
3365
  }
3365
3366
  var onShow = function () {
3366
3367
  //reset the focus date onShow
@@ -3585,6 +3586,19 @@ $.fn.calendar = function(parameters) {
3585
3586
  cell.attr("data-variation", disabledDate[metadata.variation]);
3586
3587
  }
3587
3588
  }
3589
+ if (mode === 'hour') {
3590
+ var disabledHour = module.helper.findHourAsObject(cellDate, mode, settings.disabledHours);
3591
+ if (disabledHour !== null && disabledHour[metadata.message]) {
3592
+ cell.attr("data-tooltip", disabledHour[metadata.message]);
3593
+ cell.attr("data-position", disabledHour[metadata.position] || tooltipPosition);
3594
+ if(disabledHour[metadata.inverted] || (isInverted && disabledHour[metadata.inverted] === undefined)) {
3595
+ cell.attr("data-inverted", '');
3596
+ }
3597
+ if(disabledHour[metadata.variation]) {
3598
+ cell.attr("data-variation", disabledHour[metadata.variation]);
3599
+ }
3600
+ }
3601
+ }
3588
3602
  } else {
3589
3603
  eventDate = module.helper.findDayAsObject(cellDate, mode, settings.eventDates);
3590
3604
  if (eventDate !== null) {
@@ -4170,7 +4184,7 @@ $.fn.calendar = function(parameters) {
4170
4184
 
4171
4185
  helper: {
4172
4186
  isDisabled: function(date, mode) {
4173
- return (mode === 'day' || mode === 'month' || mode === 'year') && ((mode === 'day' && settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
4187
+ return (mode === 'day' || mode === 'month' || mode === 'year' || mode === 'hour') && (((mode === 'day' && settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
4174
4188
  if(typeof d === 'string') {
4175
4189
  d = module.helper.sanitiseDate(d);
4176
4190
  }
@@ -4203,7 +4217,45 @@ $.fn.calendar = function(parameters) {
4203
4217
  }
4204
4218
  }
4205
4219
  }
4206
- }));
4220
+ })) || (mode === 'hour' && settings.disabledHours.some(function(d){
4221
+ if (typeof d === 'string') {
4222
+ d = module.helper.sanitiseDate(d);
4223
+ }
4224
+ if (d instanceof Date) {
4225
+ return module.helper.dateEqual(date, d, mode);
4226
+ } else if (typeof d === 'number') {
4227
+ return date.getHours() === d;
4228
+ }
4229
+ if (d !== null && typeof d === 'object') {
4230
+ var blocked = true;
4231
+
4232
+ if (d[metadata.date]) {
4233
+ if (d[metadata.date] instanceof Date) {
4234
+ blocked = module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]));
4235
+ } else if (Array.isArray(d[metadata.date])) {
4236
+ return d[metadata.date].some(function(idate) {
4237
+ blocked = module.helper.dateEqual(date, idate, mode);
4238
+ });
4239
+ }
4240
+ }
4241
+
4242
+ if (d[metadata.days]) {
4243
+ if (typeof d[metadata.days] === 'number') {
4244
+ blocked = date.getDay() == d[metadata.days];
4245
+ } else if (Array.isArray(d[metadata.days])) {
4246
+ blocked = d[metadata.days].indexOf(date.getDay()) > -1;
4247
+ }
4248
+ }
4249
+
4250
+ if (d[metadata.hours]) {
4251
+ if (typeof d[metadata.hours] === 'number') {
4252
+ return blocked && date.getHours() == d[metadata.hours];
4253
+ } else if (Array.isArray(d[metadata.hours])) {
4254
+ return blocked && d[metadata.hours].indexOf(date.getHours()) > -1;
4255
+ }
4256
+ }
4257
+ }
4258
+ })));
4207
4259
  },
4208
4260
  isEnabled: function(date, mode) {
4209
4261
  if (mode === 'day') {
@@ -4271,6 +4323,49 @@ $.fn.calendar = function(parameters) {
4271
4323
  }
4272
4324
  return null;
4273
4325
  },
4326
+ findHourAsObject: function(date, mode, hours) {
4327
+ if (mode === 'hour') {
4328
+ var d;
4329
+ var hourCheck = function(date, d) {
4330
+ if (d[metadata.hours]) {
4331
+ if (typeof d[metadata.hours] === 'number' && date.getHours() == d[metadata.hours]) {
4332
+ return d;
4333
+ } else if (Array.isArray(d[metadata.hours])) {
4334
+ if (d[metadata.hours].indexOf(date.getHours()) > -1) {
4335
+ return d;
4336
+ }
4337
+ }
4338
+ }
4339
+ }
4340
+ for (var i = 0; i < hours.length; i++) {
4341
+ d = hours[i];
4342
+ if (typeof d === 'number' && date.getHours() == d) {
4343
+ return null;
4344
+ } else if (d !== null && typeof d === 'object') {
4345
+ if (d[metadata.days] && hourCheck(date,d)) {
4346
+ if (typeof d[metadata.days] === 'number' && date.getDay() == d[metadata.days]) {
4347
+ return d;
4348
+ } else if (Array.isArray(d[metadata.days])) {
4349
+ if (d[metadata.days].indexOf(date.getDay()) > -1) {
4350
+ return d;
4351
+ }
4352
+ }
4353
+ } else if (d[metadata.date] && hourCheck(date,d)) {
4354
+ if (d[metadata.date] instanceof Date && module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]))) {
4355
+ return d;
4356
+ } else if (Array.isArray(d[metadata.date])) {
4357
+ if (d[metadata.date].some(function(idate) { return module.helper.dateEqual(date, idate, mode); })) {
4358
+ return d;
4359
+ }
4360
+ }
4361
+ } else if (hourCheck(date,d)) {
4362
+ return d;
4363
+ }
4364
+ }
4365
+ }
4366
+ }
4367
+ return null;
4368
+ },
4274
4369
  sanitiseDate: function (date) {
4275
4370
  if (!(date instanceof Date)) {
4276
4371
  date = parser.date('' + date, settings);
@@ -4556,6 +4651,7 @@ $.fn.calendar.settings = {
4556
4651
  multiMonth : 1, // show multiple months when in 'day' mode
4557
4652
  minTimeGap : 5,
4558
4653
  showWeekNumbers : null, // show Number of Week at the very first column of a dayView
4654
+ disabledHours : [], // specific hour(s) which won't be selectable and contain additional information.
4559
4655
  disabledDates : [], // specific day(s) which won't be selectable and contain additional information.
4560
4656
  disabledDaysOfWeek : [], // day(s) which won't be selectable(s) (0 = Sunday)
4561
4657
  enabledDates : [], // specific day(s) which will be selectable, all other days will be disabled
@@ -4961,7 +5057,9 @@ $.fn.calendar.settings = {
4961
5057
  variation: 'variation',
4962
5058
  position: 'position',
4963
5059
  month: 'month',
4964
- year: 'year'
5060
+ year: 'year',
5061
+ hours: 'hours',
5062
+ days: 'days'
4965
5063
  },
4966
5064
 
4967
5065
  eventClass: 'blue'
@@ -4970,7 +5068,7 @@ $.fn.calendar.settings = {
4970
5068
  })(jQuery, window, document);
4971
5069
 
4972
5070
  /*!
4973
- * # Fomantic-UI 2.9.0-beta.9 - Checkbox
5071
+ * # Fomantic-UI 2.9.0-beta.90 - Checkbox
4974
5072
  * http://github.com/fomantic/Fomantic-UI/
4975
5073
  *
4976
5074
  *
@@ -5210,18 +5308,26 @@ $.fn.checkbox = function(parameters) {
5210
5308
  }
5211
5309
  }
5212
5310
 
5311
+ shortcutPressed = false;
5213
5312
  if(key == keyCode.escape) {
5214
5313
  module.verbose('Escape key pressed blurring field');
5215
5314
  $input.blur();
5216
5315
  shortcutPressed = true;
5217
5316
  }
5218
- else if(!event.ctrlKey && ( key == keyCode.space || (key == keyCode.enter && settings.enableEnterKey)) ) {
5219
- module.verbose('Enter/space key pressed, toggling checkbox');
5220
- module.toggle();
5221
- shortcutPressed = true;
5222
- }
5223
- else {
5224
- shortcutPressed = false;
5317
+ else if(!event.ctrlKey && module.can.change()) {
5318
+ if( key == keyCode.space || (key == keyCode.enter && settings.enableEnterKey) ) {
5319
+ module.verbose('Enter/space key pressed, toggling checkbox');
5320
+ module.toggle();
5321
+ shortcutPressed = true;
5322
+ } else if($module.is('.toggle, .slider') && !module.is.radio()) {
5323
+ if(key == keyCode.left && module.is.checked()) {
5324
+ module.uncheck();
5325
+ shortcutPressed = true;
5326
+ } else if(key == keyCode.right && module.is.unchecked()) {
5327
+ module.check();
5328
+ shortcutPressed = true;
5329
+ }
5330
+ }
5225
5331
  }
5226
5332
  },
5227
5333
  keyup: function(event) {
@@ -5294,7 +5400,6 @@ $.fn.checkbox = function(parameters) {
5294
5400
  settings.onEnable.call(input);
5295
5401
  // preserve legacy callbacks
5296
5402
  settings.onEnabled.call(input);
5297
- module.trigger.change();
5298
5403
  }
5299
5404
  },
5300
5405
 
@@ -5309,7 +5414,6 @@ $.fn.checkbox = function(parameters) {
5309
5414
  settings.onDisable.call(input);
5310
5415
  // preserve legacy callbacks
5311
5416
  settings.onDisabled.call(input);
5312
- module.trigger.change();
5313
5417
  }
5314
5418
  },
5315
5419
 
@@ -5837,7 +5941,7 @@ $.fn.checkbox.settings = {
5837
5941
 
5838
5942
  selector : {
5839
5943
  checkbox : '.ui.checkbox',
5840
- label : 'label, .box',
5944
+ label : 'label',
5841
5945
  input : 'input[type="checkbox"], input[type="radio"]',
5842
5946
  link : 'a[href]'
5843
5947
  }
@@ -5847,7 +5951,7 @@ $.fn.checkbox.settings = {
5847
5951
  })( jQuery, window, document );
5848
5952
 
5849
5953
  /*!
5850
- * # Fomantic-UI 2.9.0-beta.9 - Dimmer
5954
+ * # Fomantic-UI 2.9.0-beta.90 - Dimmer
5851
5955
  * http://github.com/fomantic/Fomantic-UI/
5852
5956
  *
5853
5957
  *
@@ -6604,7 +6708,7 @@ $.fn.dimmer.settings = {
6604
6708
  })( jQuery, window, document );
6605
6709
 
6606
6710
  /*!
6607
- * # Fomantic-UI 2.9.0-beta.9 - Dropdown
6711
+ * # Fomantic-UI 2.9.0-beta.90 - Dropdown
6608
6712
  * http://github.com/fomantic/Fomantic-UI/
6609
6713
  *
6610
6714
  *
@@ -6805,6 +6909,7 @@ $.fn.dropdown = function(parameters) {
6805
6909
  select: function() {
6806
6910
  if(module.has.input() && selectObserver) {
6807
6911
  selectObserver.observe($module[0], {
6912
+ attributes: true,
6808
6913
  childList : true,
6809
6914
  subtree : true
6810
6915
  });
@@ -7026,6 +7131,9 @@ $.fn.dropdown = function(parameters) {
7026
7131
  module.debug('Disabling dropdown');
7027
7132
  $module.addClass(className.disabled);
7028
7133
  }
7134
+ if($input.is('[required]')) {
7135
+ settings.forceSelection = true;
7136
+ }
7029
7137
  $input
7030
7138
  .removeAttr('required')
7031
7139
  .removeAttr('class')
@@ -7890,8 +7998,8 @@ $.fn.dropdown = function(parameters) {
7890
7998
  },
7891
7999
  select: {
7892
8000
  mutation: function(mutations) {
7893
- module.debug('<select> modified, recreating menu');
7894
8001
  if(module.is.selectMutation(mutations)) {
8002
+ module.debug('<select> modified, recreating menu');
7895
8003
  module.disconnect.selectObserver();
7896
8004
  module.refresh();
7897
8005
  module.setup.select();
@@ -8925,7 +9033,7 @@ $.fn.dropdown = function(parameters) {
8925
9033
  module.error(error.noStorage);
8926
9034
  return;
8927
9035
  }
8928
- name = sessionStorage.getItem(value);
9036
+ name = sessionStorage.getItem(value + elementNamespace);
8929
9037
  return (name !== undefined)
8930
9038
  ? name
8931
9039
  : false
@@ -8969,7 +9077,7 @@ $.fn.dropdown = function(parameters) {
8969
9077
  return;
8970
9078
  }
8971
9079
  module.verbose('Saving remote data to session storage', value, name);
8972
- sessionStorage.setItem(value, name);
9080
+ sessionStorage.setItem(value + elementNamespace, name);
8973
9081
  }
8974
9082
  },
8975
9083
 
@@ -9674,18 +9782,10 @@ $.fn.dropdown = function(parameters) {
9674
9782
  return;
9675
9783
  }
9676
9784
  // temporarily disconnect observer
9677
- if(selectObserver) {
9678
- selectObserver.disconnect();
9679
- module.verbose('Temporarily disconnecting mutation observer');
9680
- }
9785
+ module.disconnect.selectObserver();
9681
9786
  $option.remove();
9682
9787
  module.verbose('Removing user addition as an <option>', escapedValue);
9683
- if(selectObserver) {
9684
- selectObserver.observe($input[0], {
9685
- childList : true,
9686
- subtree : true
9687
- });
9688
- }
9788
+ module.observe.select();
9689
9789
  },
9690
9790
  message: function() {
9691
9791
  $menu.children(selector.message).remove();
@@ -10050,7 +10150,7 @@ $.fn.dropdown = function(parameters) {
10050
10150
  selectChanged = false
10051
10151
  ;
10052
10152
  $.each(mutations, function(index, mutation) {
10053
- if($(mutation.target).is('select') || $(mutation.addedNodes).is('select')) {
10153
+ if($(mutation.target).is('select, option, optgroup') || $(mutation.addedNodes).is('select')) {
10054
10154
  selectChanged = true;
10055
10155
  return false;
10056
10156
  }
@@ -10595,7 +10695,7 @@ $.fn.dropdown.settings = {
10595
10695
  keepOnScreen : true, // Whether dropdown should check whether it is on screen before showing
10596
10696
 
10597
10697
  match : 'both', // what to match against with search selection (both, text, or label)
10598
- fullTextSearch : false, // search anywhere in value (set to 'exact' to require exact matches)
10698
+ fullTextSearch : 'exact', // search anywhere in value (set to 'exact' to require exact matches)
10599
10699
  ignoreDiacritics : false, // match results also if they contain diacritics of the same base character (for example searching for "a" will also match "á" or "â" or "à", etc...)
10600
10700
  hideDividers : false, // Whether to hide any divider elements (specified in selector.divider) that are sibling to any items when searched (set to true will hide all dividers, set to 'empty' will hide them when they are not followed by a visible item)
10601
10701
 
@@ -10603,7 +10703,7 @@ $.fn.dropdown.settings = {
10603
10703
  preserveHTML : true, // preserve html when selecting value
10604
10704
  sortSelect : false, // sort selection on init
10605
10705
 
10606
- forceSelection : true, // force a choice on blur with search selection
10706
+ forceSelection : false, // force a choice on blur with search selection
10607
10707
 
10608
10708
  allowAdditions : false, // whether multiple select should allow user added values
10609
10709
  ignoreCase : false, // whether to consider case sensitivity when creating labels
@@ -10614,7 +10714,7 @@ $.fn.dropdown.settings = {
10614
10714
  useLabels : true, // whether multiple select should filter currently active selections from choices
10615
10715
  delimiter : ',', // when multiselect uses normal <input> the values will be delimited with this character
10616
10716
 
10617
- showOnFocus : true, // show menu on focus
10717
+ showOnFocus : false, // show menu on focus
10618
10718
  allowReselection : false, // whether current value should trigger callbacks when reselected
10619
10719
  allowTab : true, // add tabindex to element
10620
10720
  allowCategorySelection : false, // allow elements with sub-menus to be selected
@@ -10935,7 +11035,7 @@ $.fn.dropdown.settings.templates = {
10935
11035
  })( jQuery, window, document );
10936
11036
 
10937
11037
  /*!
10938
- * # Fomantic-UI 2.9.0-beta.9 - Embed
11038
+ * # Fomantic-UI 2.9.0-beta.90 - Embed
10939
11039
  * http://github.com/fomantic/Fomantic-UI/
10940
11040
  *
10941
11041
  *
@@ -11645,7 +11745,7 @@ $.fn.embed.settings = {
11645
11745
  })( jQuery, window, document );
11646
11746
 
11647
11747
  /*!
11648
- * # Fomantic-UI 2.9.0-beta.9 - Modal
11748
+ * # Fomantic-UI 2.9.0-beta.90 - Modal
11649
11749
  * http://github.com/fomantic/Fomantic-UI/
11650
11750
  *
11651
11751
  *
@@ -11712,7 +11812,8 @@ $.fn.modal = function(parameters) {
11712
11812
 
11713
11813
  $module = $(this),
11714
11814
  $context = $(settings.context),
11715
- $close = $module.find(selector.close),
11815
+ $closeIcon = $module.find(selector.closeIcon),
11816
+ $inputs,
11716
11817
 
11717
11818
  $allModals,
11718
11819
  $otherModals,
@@ -11738,6 +11839,7 @@ $.fn.modal = function(parameters) {
11738
11839
  module = {
11739
11840
 
11740
11841
  initialize: function() {
11842
+ module.create.id();
11741
11843
  if(!$module.hasClass('modal')) {
11742
11844
  module.create.modal();
11743
11845
  if(!$.isFunction(settings.onHidden)) {
@@ -11762,15 +11864,17 @@ $.fn.modal = function(parameters) {
11762
11864
  $actions.empty();
11763
11865
  }
11764
11866
  settings.actions.forEach(function (el) {
11765
- var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
11867
+ var icon = el[fields.icon] ? '<i '+(el[fields.text] ? 'aria-hidden="true"' : '')+' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
11766
11868
  text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
11767
11869
  cls = module.helpers.deQuote(el[fields.class] || ''),
11768
11870
  click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
11769
11871
  $actions.append($('<button/>', {
11770
11872
  html: icon + text,
11873
+ 'aria-label': $('<div>'+(el[fields.text] || el[fields.icon] || '')+'</div>').text(),
11771
11874
  class: className.button + ' ' + cls,
11772
11875
  click: function () {
11773
- if (click.call(element, $module) === false) {
11876
+ var button = $(this);
11877
+ if (button.is(selector.approve) || button.is(selector.deny) || click.call(element, $module) === false) {
11774
11878
  return;
11775
11879
  }
11776
11880
  module.hide();
@@ -11781,7 +11885,6 @@ $.fn.modal = function(parameters) {
11781
11885
  module.cache = {};
11782
11886
  module.verbose('Initializing dimmer', $context);
11783
11887
 
11784
- module.create.id();
11785
11888
  module.create.dimmer();
11786
11889
 
11787
11890
  if ( settings.allowMultiple ) {
@@ -11791,11 +11894,9 @@ $.fn.modal = function(parameters) {
11791
11894
  $module.addClass('top aligned');
11792
11895
  }
11793
11896
  module.refreshModals();
11794
-
11897
+ module.refreshInputs();
11795
11898
  module.bind.events();
11796
- if(settings.observeChanges) {
11797
- module.observeChanges();
11798
- }
11899
+ module.observeChanges();
11799
11900
  module.instantiate();
11800
11901
  if(settings.autoShow){
11801
11902
  module.show();
@@ -11812,16 +11913,20 @@ $.fn.modal = function(parameters) {
11812
11913
 
11813
11914
  create: {
11814
11915
  modal: function() {
11815
- $module = $('<div/>', {class: className.modal});
11916
+ $module = $('<div/>', {class: className.modal, role: 'dialog', 'aria-modal': true});
11816
11917
  if (settings.closeIcon) {
11817
- $close = $('<i/>', {class: className.close})
11818
- $module.append($close);
11918
+ $closeIcon = $('<i/>', {class: className.close, role: 'button', tabindex: 0, 'aria-label': settings.text.close})
11919
+ $module.append($closeIcon);
11819
11920
  }
11820
11921
  if (settings.title !== '') {
11821
- $('<div/>', {class: className.title}).appendTo($module);
11922
+ var titleId = '_' + module.get.id() + 'title';
11923
+ $module.attr('aria-labelledby', titleId);
11924
+ $('<div/>', {class: className.title, id: titleId}).appendTo($module);
11822
11925
  }
11823
11926
  if (settings.content !== '') {
11824
- $('<div/>', {class: className.content}).appendTo($module);
11927
+ var descId = '_' + module.get.id() + 'desc';
11928
+ $module.attr('aria-describedby', descId);
11929
+ $('<div/>', {class: className.content, id: descId}).appendTo($module);
11825
11930
  }
11826
11931
  if (module.has.configActions()) {
11827
11932
  $('<div/>', {class: className.actions}).appendTo($module);
@@ -11874,15 +11979,21 @@ $.fn.modal = function(parameters) {
11874
11979
  ;
11875
11980
  $window.off(elementEventNamespace);
11876
11981
  $dimmer.off(elementEventNamespace);
11877
- $close.off(eventNamespace);
11982
+ $closeIcon.off(elementEventNamespace);
11983
+ if($inputs) {
11984
+ $inputs.off(elementEventNamespace);
11985
+ }
11878
11986
  $context.dimmer('destroy');
11879
11987
  },
11880
11988
 
11881
11989
  observeChanges: function() {
11882
11990
  if('MutationObserver' in window) {
11883
11991
  observer = new MutationObserver(function(mutations) {
11884
- module.debug('DOM tree modified, refreshing');
11885
- module.refresh();
11992
+ if(settings.observeChanges) {
11993
+ module.debug('DOM tree modified, refreshing');
11994
+ module.refresh();
11995
+ }
11996
+ module.refreshInputs();
11886
11997
  });
11887
11998
  observer.observe(element, {
11888
11999
  childList : true,
@@ -11907,6 +12018,23 @@ $.fn.modal = function(parameters) {
11907
12018
  $allModals = $otherModals.add($module);
11908
12019
  },
11909
12020
 
12021
+ refreshInputs: function(){
12022
+ if($inputs){
12023
+ $inputs
12024
+ .off('keydown' + elementEventNamespace)
12025
+ ;
12026
+ }
12027
+ $inputs = $module.find('[tabindex], :input').filter(':visible').filter(function() {
12028
+ return $(this).closest('.disabled').length === 0;
12029
+ });
12030
+ $inputs.first()
12031
+ .on('keydown' + elementEventNamespace, module.event.inputKeyDown.first)
12032
+ ;
12033
+ $inputs.last()
12034
+ .on('keydown' + elementEventNamespace, module.event.inputKeyDown.last)
12035
+ ;
12036
+ },
12037
+
11910
12038
  attachEvents: function(selector, event) {
11911
12039
  var
11912
12040
  $toggle = $(selector)
@@ -11935,6 +12063,9 @@ $.fn.modal = function(parameters) {
11935
12063
  .on('click' + eventNamespace, selector.approve, module.event.approve)
11936
12064
  .on('click' + eventNamespace, selector.deny, module.event.deny)
11937
12065
  ;
12066
+ $closeIcon
12067
+ .on('keyup' + elementEventNamespace, module.event.closeKeyUp)
12068
+ ;
11938
12069
  $window
11939
12070
  .on('resize' + elementEventNamespace, module.event.resize)
11940
12071
  ;
@@ -11953,7 +12084,7 @@ $.fn.modal = function(parameters) {
11953
12084
 
11954
12085
  get: {
11955
12086
  id: function() {
11956
- return (Math.random().toString(16) + '000000000').substr(2, 8);
12087
+ return id;
11957
12088
  },
11958
12089
  element: function() {
11959
12090
  return $module;
@@ -11992,10 +12123,38 @@ $.fn.modal = function(parameters) {
11992
12123
  close: function() {
11993
12124
  module.hide();
11994
12125
  },
12126
+ closeKeyUp: function(event){
12127
+ var
12128
+ keyCode = event.which
12129
+ ;
12130
+ if ((keyCode === settings.keys.enter || keyCode === settings.keys.space) && $module.hasClass(className.front)) {
12131
+ module.hide();
12132
+ }
12133
+ },
12134
+ inputKeyDown: {
12135
+ first: function(event) {
12136
+ var
12137
+ keyCode = event.which
12138
+ ;
12139
+ if (keyCode === settings.keys.tab && event.shiftKey) {
12140
+ $inputs.last().focus();
12141
+ event.preventDefault();
12142
+ }
12143
+ },
12144
+ last: function(event) {
12145
+ var
12146
+ keyCode = event.which
12147
+ ;
12148
+ if (keyCode === settings.keys.tab && !event.shiftKey) {
12149
+ $inputs.first().focus();
12150
+ event.preventDefault();
12151
+ }
12152
+ }
12153
+ },
11995
12154
  mousedown: function(event) {
11996
12155
  var
11997
12156
  $target = $(event.target),
11998
- isRtl = module.is.rtl();
12157
+ isRtl = module.is.rtl()
11999
12158
  ;
12000
12159
  initialMouseDownInModal = ($target.closest(selector.modal).length > 0);
12001
12160
  if(initialMouseDownInModal) {
@@ -12043,10 +12202,9 @@ $.fn.modal = function(parameters) {
12043
12202
  },
12044
12203
  keyboard: function(event) {
12045
12204
  var
12046
- keyCode = event.which,
12047
- escapeKey = 27
12205
+ keyCode = event.which
12048
12206
  ;
12049
- if(keyCode == escapeKey) {
12207
+ if(keyCode === settings.keys.escape) {
12050
12208
  if(settings.closable) {
12051
12209
  module.debug('Escape key pressed hiding modal');
12052
12210
  if ( $module.hasClass(className.front) ) {
@@ -12361,7 +12519,7 @@ $.fn.modal = function(parameters) {
12361
12519
  $module
12362
12520
  .off('mousedown' + elementEventNamespace)
12363
12521
  ;
12364
- }
12522
+ }
12365
12523
  $dimmer
12366
12524
  .off('mousedown' + elementEventNamespace)
12367
12525
  ;
@@ -12546,13 +12704,10 @@ $.fn.modal = function(parameters) {
12546
12704
  set: {
12547
12705
  autofocus: function() {
12548
12706
  var
12549
- $inputs = $module.find('[tabindex], :input').filter(':visible').filter(function() {
12550
- return $(this).closest('.disabled').length === 0;
12551
- }),
12552
12707
  $autofocus = $inputs.filter('[autofocus]'),
12553
12708
  $input = ($autofocus.length > 0)
12554
12709
  ? $autofocus.first()
12555
- : $inputs.first()
12710
+ : ($inputs.length > 1 ? $inputs.filter(':not(i.close)') : $inputs).first()
12556
12711
  ;
12557
12712
  if($input.length > 0) {
12558
12713
  $input.focus();
@@ -12634,7 +12789,7 @@ $.fn.modal = function(parameters) {
12634
12789
  ? $(document).scrollTop() + settings.padding
12635
12790
  : $(document).scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
12636
12791
  marginLeft: -(module.cache.width / 2)
12637
- })
12792
+ })
12638
12793
  ;
12639
12794
  } else {
12640
12795
  $module
@@ -12643,7 +12798,7 @@ $.fn.modal = function(parameters) {
12643
12798
  ? -(module.cache.height / 2)
12644
12799
  : settings.padding / 2,
12645
12800
  marginLeft: -(module.cache.width / 2)
12646
- })
12801
+ })
12647
12802
  ;
12648
12803
  }
12649
12804
  module.verbose('Setting modal offset for legacy mode');
@@ -12969,11 +13124,19 @@ $.fn.modal.settings = {
12969
13124
  // called after deny selector match
12970
13125
  onDeny : function(){ return true; },
12971
13126
 
13127
+ keys : {
13128
+ space : 32,
13129
+ enter : 13,
13130
+ escape : 27,
13131
+ tab : 9,
13132
+ },
13133
+
12972
13134
  selector : {
12973
13135
  title : '> .header',
12974
13136
  content : '> .content',
12975
13137
  actions : '> .actions',
12976
13138
  close : '> .close',
13139
+ closeIcon: '> .close',
12977
13140
  approve : '.actions .positive, .actions .approve, .actions .ok',
12978
13141
  deny : '.actions .negative, .actions .deny, .actions .cancel',
12979
13142
  modal : '.ui.modal',
@@ -13009,7 +13172,8 @@ $.fn.modal.settings = {
13009
13172
  },
13010
13173
  text: {
13011
13174
  ok : 'Ok',
13012
- cancel: 'Cancel'
13175
+ cancel: 'Cancel',
13176
+ close : 'Close'
13013
13177
  }
13014
13178
  };
13015
13179
 
@@ -13098,7 +13262,7 @@ $.fn.modal.settings.templates = {
13098
13262
  })( jQuery, window, document );
13099
13263
 
13100
13264
  /*!
13101
- * # Fomantic-UI 2.9.0-beta.9 - Nag
13265
+ * # Fomantic-UI 2.9.0-beta.90 - Nag
13102
13266
  * http://github.com/fomantic/Fomantic-UI/
13103
13267
  *
13104
13268
  *
@@ -13657,7 +13821,7 @@ $.extend( $.easing, {
13657
13821
  })( jQuery, window, document );
13658
13822
 
13659
13823
  /*!
13660
- * # Fomantic-UI 2.9.0-beta.9 - Popup
13824
+ * # Fomantic-UI 2.9.0-beta.90 - Popup
13661
13825
  * http://github.com/fomantic/Fomantic-UI/
13662
13826
  *
13663
13827
  *
@@ -15199,7 +15363,7 @@ $.fn.popup.settings = {
15199
15363
  })( jQuery, window, document );
15200
15364
 
15201
15365
  /*!
15202
- * # Fomantic-UI 2.9.0-beta.9 - Progress
15366
+ * # Fomantic-UI 2.9.0-beta.90 - Progress
15203
15367
  * http://github.com/fomantic/Fomantic-UI/
15204
15368
  *
15205
15369
  *
@@ -16233,7 +16397,7 @@ $.fn.progress.settings = {
16233
16397
  })( jQuery, window, document );
16234
16398
 
16235
16399
  /*!
16236
- * # Fomantic-UI 2.9.0-beta.9 - Slider
16400
+ * # Fomantic-UI 2.9.0-beta.90 - Slider
16237
16401
  * http://github.com/fomantic/Fomantic-UI/
16238
16402
  *
16239
16403
  *
@@ -17572,7 +17736,7 @@ $.fn.slider.settings = {
17572
17736
  })( jQuery, window, document );
17573
17737
 
17574
17738
  /*!
17575
- * # Fomantic-UI 2.9.0-beta.9 - Rating
17739
+ * # Fomantic-UI 2.9.0-beta.90 - Rating
17576
17740
  * http://github.com/fomantic/Fomantic-UI/
17577
17741
  *
17578
17742
  *
@@ -18127,7 +18291,7 @@ $.fn.rating.settings = {
18127
18291
  })( jQuery, window, document );
18128
18292
 
18129
18293
  /*!
18130
- * # Fomantic-UI 2.9.0-beta.9 - Search
18294
+ * # Fomantic-UI 2.9.0-beta.90 - Search
18131
18295
  * http://github.com/fomantic/Fomantic-UI/
18132
18296
  *
18133
18297
  *
@@ -19695,7 +19859,7 @@ $.fn.search.settings = {
19695
19859
  })( jQuery, window, document );
19696
19860
 
19697
19861
  /*!
19698
- * # Fomantic-UI 2.9.0-beta.9 - Shape
19862
+ * # Fomantic-UI 2.9.0-beta.90 - Shape
19699
19863
  * http://github.com/fomantic/Fomantic-UI/
19700
19864
  *
19701
19865
  *
@@ -20544,7 +20708,7 @@ $.fn.shape.settings = {
20544
20708
  })( jQuery, window, document );
20545
20709
 
20546
20710
  /*!
20547
- * # Fomantic-UI 2.9.0-beta.9 - Sidebar
20711
+ * # Fomantic-UI 2.9.0-beta.90 - Sidebar
20548
20712
  * http://github.com/fomantic/Fomantic-UI/
20549
20713
  *
20550
20714
  *
@@ -21581,7 +21745,7 @@ $.fn.sidebar.settings = {
21581
21745
  })( jQuery, window, document );
21582
21746
 
21583
21747
  /*!
21584
- * # Fomantic-UI 2.9.0-beta.9 - Sticky
21748
+ * # Fomantic-UI 2.9.0-beta.90 - Sticky
21585
21749
  * http://github.com/fomantic/Fomantic-UI/
21586
21750
  *
21587
21751
  *
@@ -22539,7 +22703,7 @@ $.fn.sticky.settings = {
22539
22703
  })( jQuery, window, document );
22540
22704
 
22541
22705
  /*!
22542
- * # Fomantic-UI 2.9.0-beta.9 - Tab
22706
+ * # Fomantic-UI 2.9.0-beta.90 - Tab
22543
22707
  * http://github.com/fomantic/Fomantic-UI/
22544
22708
  *
22545
22709
  *
@@ -23541,7 +23705,7 @@ $.fn.tab.settings = {
23541
23705
  })( jQuery, window, document );
23542
23706
 
23543
23707
  /*!
23544
- * # Fomantic-UI 2.9.0-beta.9 - Toast
23708
+ * # Fomantic-UI 2.9.0-beta.90 - Toast
23545
23709
  * http://github.com/fomantic/Fomantic-UI/
23546
23710
  *
23547
23711
  *
@@ -23771,7 +23935,8 @@ $.fn.toast = function(parameters) {
23771
23935
  html: icon + text,
23772
23936
  class: className.button + ' ' + cls,
23773
23937
  click: function () {
23774
- if (click.call(element, $module) === false) {
23938
+ var button = $(this);
23939
+ if (button.is(selector.approve) || button.is(selector.deny) || click.call(element, $module) === false) {
23775
23940
  return;
23776
23941
  }
23777
23942
  module.close();
@@ -23985,7 +24150,7 @@ $.fn.toast = function(parameters) {
23985
24150
  has: {
23986
24151
  container: function() {
23987
24152
  module.verbose('Determining if there is already a container');
23988
- return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : '')).length > 0);
24153
+ return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : ':not('+module.helpers.toClass(className.horizontal)+')')).length > 0);
23989
24154
  },
23990
24155
  toast: function(){
23991
24156
  return !!module.get.toast();
@@ -24000,7 +24165,7 @@ $.fn.toast = function(parameters) {
24000
24165
 
24001
24166
  get: {
24002
24167
  container: function() {
24003
- return ($context.find(module.helpers.toClass(settings.position) + selector.container)[0]);
24168
+ return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : ':not('+module.helpers.toClass(className.horizontal)+')'))[0]);
24004
24169
  },
24005
24170
  toastBox: function() {
24006
24171
  return $toastBox || null;
@@ -24434,7 +24599,7 @@ $.extend( $.easing, {
24434
24599
  })( jQuery, window, document );
24435
24600
 
24436
24601
  /*!
24437
- * # Fomantic-UI 2.9.0-beta.9 - Transition
24602
+ * # Fomantic-UI 2.9.0-beta.90 - Transition
24438
24603
  * http://github.com/fomantic/Fomantic-UI/
24439
24604
  *
24440
24605
  *
@@ -25544,7 +25709,7 @@ $.fn.transition.settings = {
25544
25709
  })( jQuery, window, document );
25545
25710
 
25546
25711
  /*!
25547
- * # Fomantic-UI 2.9.0-beta.9 - API
25712
+ * # Fomantic-UI 2.9.0-beta.90 - API
25548
25713
  * http://github.com/fomantic/Fomantic-UI/
25549
25714
  *
25550
25715
  *
@@ -25693,8 +25858,8 @@ $.api = $.fn.api = function(parameters) {
25693
25858
  module.error(error.noStorage);
25694
25859
  return;
25695
25860
  }
25696
- response = sessionStorage.getItem(url);
25697
- module.debug('Using cached response', url, response);
25861
+ response = sessionStorage.getItem(url + module.get.normalizedData());
25862
+ module.debug('Using cached response', url, settings.data, response);
25698
25863
  response = module.decode.json(response);
25699
25864
  return response;
25700
25865
  }
@@ -25712,8 +25877,8 @@ $.api = $.fn.api = function(parameters) {
25712
25877
  if( $.isPlainObject(response) ) {
25713
25878
  response = JSON.stringify(response);
25714
25879
  }
25715
- sessionStorage.setItem(url, response);
25716
- module.verbose('Storing cached response for url', url, response);
25880
+ sessionStorage.setItem(url + module.get.normalizedData(), response);
25881
+ module.verbose('Storing cached response for url', url, settings.data, response);
25717
25882
  }
25718
25883
  },
25719
25884
 
@@ -25879,10 +26044,6 @@ $.api = $.fn.api = function(parameters) {
25879
26044
  cancelled: function() {
25880
26045
  return (module.cancelled || false);
25881
26046
  },
25882
- succesful: function() {
25883
- module.verbose('This behavior will be deleted due to typo. Use "was successful" instead.');
25884
- return module.was.successful();
25885
- },
25886
26047
  successful: function() {
25887
26048
  return (module.request && module.request.state() == 'resolved');
25888
26049
  },
@@ -25974,25 +26135,29 @@ $.api = $.fn.api = function(parameters) {
25974
26135
  },
25975
26136
  formData: function(data) {
25976
26137
  var
25977
- canSerialize = ($.fn.serializeObject !== undefined),
25978
- formData = (canSerialize)
25979
- ? $form.serializeObject()
25980
- : $form.serialize(),
26138
+ formData = {},
25981
26139
  hasOtherData
25982
26140
  ;
25983
26141
  data = data || settings.data;
25984
26142
  hasOtherData = $.isPlainObject(data);
25985
26143
 
25986
- if(hasOtherData) {
25987
- if(canSerialize) {
25988
- module.debug('Extending existing data with form data', data, formData);
25989
- data = $.extend(true, {}, data, formData);
25990
- }
25991
- else {
25992
- module.error(error.missingSerialize);
25993
- module.debug('Cant extend data. Replacing data with form data', data, formData);
25994
- data = formData;
26144
+ $.each($form.serializeArray(), function (i, element) {
26145
+ var node = formData[element.name];
26146
+
26147
+ if ('undefined' !== typeof node && node !== null) {
26148
+ if (Array.isArray(node)) {
26149
+ node.push(element.value);
26150
+ } else {
26151
+ formData[element.name] = [node, element.value];
26152
+ }
26153
+ } else {
26154
+ formData[element.name] = element.value;
25995
26155
  }
26156
+ });
26157
+
26158
+ if(hasOtherData) {
26159
+ module.debug('Extending existing data with form data', data, formData);
26160
+ data = $.extend(true, {}, data, formData);
25996
26161
  }
25997
26162
  else {
25998
26163
  module.debug('Adding form data', formData);
@@ -26243,6 +26408,9 @@ $.api = $.fn.api = function(parameters) {
26243
26408
  },
26244
26409
 
26245
26410
  get: {
26411
+ normalizedData: function(){
26412
+ return typeof settings.data === "string" ? settings.data : JSON.stringify(settings.data, Object.keys(settings.data).sort());
26413
+ },
26246
26414
  responseFromXHR: function(xhr) {
26247
26415
  return $.isPlainObject(xhr)
26248
26416
  ? (module.is.expectingJSON())
@@ -26686,7 +26854,6 @@ $.api.settings = {
26686
26854
  legacyParameters : 'You are using legacy API success callback names',
26687
26855
  method : 'The method you called is not defined',
26688
26856
  missingAction : 'API action used but no url was defined',
26689
- missingSerialize : 'jquery-serialize-object is required to add form data to an existing data object',
26690
26857
  missingURL : 'No URL specified for api event',
26691
26858
  noReturnedValue : 'The beforeSend callback must return a settings object, beforeSend ignored.',
26692
26859
  noStorage : 'Caching responses locally requires session storage',
@@ -26722,7 +26889,7 @@ $.api.settings = {
26722
26889
  })( jQuery, window, document );
26723
26890
 
26724
26891
  /*!
26725
- * # Fomantic-UI 2.9.0-beta.9 - State
26892
+ * # Fomantic-UI 2.9.0-beta.90 - State
26726
26893
  * http://github.com/fomantic/Fomantic-UI/
26727
26894
  *
26728
26895
  *
@@ -27434,7 +27601,7 @@ $.fn.state.settings = {
27434
27601
  })( jQuery, window, document );
27435
27602
 
27436
27603
  /*!
27437
- * # Fomantic-UI 2.9.0-beta.9 - Visibility
27604
+ * # Fomantic-UI 2.9.0-beta.90 - Visibility
27438
27605
  * http://github.com/fomantic/Fomantic-UI/
27439
27606
  *
27440
27607
  *