fomantic-ui 2.8.8-beta.99 → 2.9.0-beta.100

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 (244) hide show
  1. package/.all-contributorsrc +188 -3
  2. package/.github/dependabot.yml +17 -0
  3. package/.github/workflows/ci.yml +1 -1
  4. package/CHANGELOG.md +139 -0
  5. package/CONTRIBUTING.md +1 -1
  6. package/CONTRIBUTORS.md +71 -37
  7. package/README.md +3 -3
  8. package/dist/components/accordion.css +50 -6
  9. package/dist/components/accordion.js +1 -1
  10. package/dist/components/accordion.min.css +2 -2
  11. package/dist/components/accordion.min.js +3 -3
  12. package/dist/components/ad.css +1 -1
  13. package/dist/components/ad.min.css +1 -1
  14. package/dist/components/api.js +26 -24
  15. package/dist/components/api.min.js +4 -4
  16. package/dist/components/breadcrumb.css +1 -1
  17. package/dist/components/breadcrumb.min.css +1 -1
  18. package/dist/components/button.css +81 -81
  19. package/dist/components/button.min.css +2 -2
  20. package/dist/components/calendar.css +1 -1
  21. package/dist/components/calendar.js +110 -11
  22. package/dist/components/calendar.min.css +1 -1
  23. package/dist/components/calendar.min.js +4 -4
  24. package/dist/components/card.css +26 -19
  25. package/dist/components/card.min.css +2 -2
  26. package/dist/components/checkbox.css +6 -4
  27. package/dist/components/checkbox.js +17 -11
  28. package/dist/components/checkbox.min.css +2 -2
  29. package/dist/components/checkbox.min.js +4 -4
  30. package/dist/components/comment.css +11 -11
  31. package/dist/components/comment.min.css +1 -1
  32. package/dist/components/container.css +3 -4
  33. package/dist/components/container.min.css +2 -2
  34. package/dist/components/dimmer.css +28 -14
  35. package/dist/components/dimmer.js +15 -12
  36. package/dist/components/dimmer.min.css +2 -2
  37. package/dist/components/dimmer.min.js +4 -4
  38. package/dist/components/divider.css +1 -1
  39. package/dist/components/divider.min.css +1 -1
  40. package/dist/components/dropdown.css +54 -7
  41. package/dist/components/dropdown.js +107 -77
  42. package/dist/components/dropdown.min.css +2 -2
  43. package/dist/components/dropdown.min.js +4 -4
  44. package/dist/components/embed.css +1 -1
  45. package/dist/components/embed.js +1 -1
  46. package/dist/components/embed.min.css +1 -1
  47. package/dist/components/embed.min.js +3 -3
  48. package/dist/components/emoji.css +2 -2
  49. package/dist/components/feed.css +28 -28
  50. package/dist/components/feed.min.css +2 -2
  51. package/dist/components/flag.css +731 -625
  52. package/dist/components/flag.min.css +2 -2
  53. package/dist/components/form.css +119 -54
  54. package/dist/components/form.js +51 -70
  55. package/dist/components/form.min.css +2 -2
  56. package/dist/components/form.min.js +4 -4
  57. package/dist/components/grid.css +13 -11
  58. package/dist/components/grid.min.css +2 -2
  59. package/dist/components/header.css +3 -3
  60. package/dist/components/header.min.css +2 -2
  61. package/dist/components/icon.css +86 -5
  62. package/dist/components/icon.min.css +2 -2
  63. package/dist/components/image.css +1 -1
  64. package/dist/components/image.min.css +1 -1
  65. package/dist/components/input.css +17 -2
  66. package/dist/components/input.min.css +2 -2
  67. package/dist/components/item.css +13 -13
  68. package/dist/components/item.min.css +1 -1
  69. package/dist/components/label.css +1 -1
  70. package/dist/components/label.min.css +1 -1
  71. package/dist/components/list.css +1 -1
  72. package/dist/components/list.min.css +1 -1
  73. package/dist/components/loader.css +39 -37
  74. package/dist/components/loader.min.css +2 -2
  75. package/dist/components/menu.css +37 -11
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +78 -34
  78. package/dist/components/message.min.css +2 -2
  79. package/dist/components/modal.css +7 -5
  80. package/dist/components/modal.js +237 -41
  81. package/dist/components/modal.min.css +2 -2
  82. package/dist/components/modal.min.js +4 -4
  83. package/dist/components/nag.css +168 -16
  84. package/dist/components/nag.js +131 -65
  85. package/dist/components/nag.min.css +2 -2
  86. package/dist/components/nag.min.js +4 -4
  87. package/dist/components/placeholder.css +1 -1
  88. package/dist/components/placeholder.min.css +1 -1
  89. package/dist/components/popup.css +5 -3
  90. package/dist/components/popup.js +5 -5
  91. package/dist/components/popup.min.css +2 -2
  92. package/dist/components/popup.min.js +4 -4
  93. package/dist/components/progress.css +2 -1
  94. package/dist/components/progress.js +3 -3
  95. package/dist/components/progress.min.css +2 -2
  96. package/dist/components/progress.min.js +4 -4
  97. package/dist/components/rail.css +1 -1
  98. package/dist/components/rail.min.css +1 -1
  99. package/dist/components/rating.css +8 -62
  100. package/dist/components/rating.js +1 -1
  101. package/dist/components/rating.min.css +2 -2
  102. package/dist/components/rating.min.js +3 -3
  103. package/dist/components/reset.css +2 -3
  104. package/dist/components/reset.min.css +2 -2
  105. package/dist/components/reveal.css +1 -1
  106. package/dist/components/reveal.min.css +1 -1
  107. package/dist/components/search.css +1 -1
  108. package/dist/components/search.js +15 -13
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +4 -4
  111. package/dist/components/segment.css +36 -6
  112. package/dist/components/segment.min.css +2 -2
  113. package/dist/components/shape.css +1 -1
  114. package/dist/components/shape.js +1 -1
  115. package/dist/components/shape.min.css +1 -1
  116. package/dist/components/shape.min.js +3 -3
  117. package/dist/components/sidebar.css +4 -2
  118. package/dist/components/sidebar.js +1 -1
  119. package/dist/components/sidebar.min.css +2 -2
  120. package/dist/components/sidebar.min.js +3 -3
  121. package/dist/components/site.css +61 -39
  122. package/dist/components/site.js +1 -1
  123. package/dist/components/site.min.css +2 -2
  124. package/dist/components/site.min.js +3 -3
  125. package/dist/components/slider.js +1 -1
  126. package/dist/components/slider.min.js +3 -3
  127. package/dist/components/state.js +1 -1
  128. package/dist/components/state.min.js +3 -3
  129. package/dist/components/statistic.css +1 -1
  130. package/dist/components/statistic.min.css +1 -1
  131. package/dist/components/step.css +4 -4
  132. package/dist/components/step.min.css +2 -2
  133. package/dist/components/sticky.css +1 -2
  134. package/dist/components/sticky.js +2 -2
  135. package/dist/components/sticky.min.css +2 -2
  136. package/dist/components/sticky.min.js +4 -4
  137. package/dist/components/tab.css +1 -1
  138. package/dist/components/tab.js +1 -1
  139. package/dist/components/tab.min.css +1 -1
  140. package/dist/components/tab.min.js +3 -3
  141. package/dist/components/table.css +5 -3
  142. package/dist/components/table.min.css +2 -2
  143. package/dist/components/text.css +1 -1
  144. package/dist/components/text.min.css +1 -1
  145. package/dist/components/toast.css +123 -10
  146. package/dist/components/toast.js +54 -27
  147. package/dist/components/toast.min.css +2 -2
  148. package/dist/components/toast.min.js +4 -4
  149. package/dist/components/transition.css +1 -1
  150. package/dist/components/transition.js +2 -2
  151. package/dist/components/transition.min.css +1 -1
  152. package/dist/components/transition.min.js +4 -4
  153. package/dist/components/visibility.js +2 -2
  154. package/dist/components/visibility.min.js +3 -3
  155. package/dist/semantic.css +2004 -1124
  156. package/dist/semantic.js +789 -377
  157. package/dist/semantic.min.css +4 -397
  158. package/dist/semantic.min.js +4 -4
  159. package/examples/assets/library/iframe-content.js +8 -8
  160. package/examples/assets/library/iframe.js +3 -3
  161. package/package.json +5 -5
  162. package/scripts/nightly-version.js +23 -8
  163. package/src/definitions/behaviors/api.js +25 -23
  164. package/src/definitions/behaviors/form.js +50 -69
  165. package/src/definitions/behaviors/visibility.js +1 -1
  166. package/src/definitions/collections/form.less +200 -142
  167. package/src/definitions/collections/grid.less +717 -681
  168. package/src/definitions/collections/menu.less +177 -128
  169. package/src/definitions/collections/message.less +77 -44
  170. package/src/definitions/collections/table.less +255 -242
  171. package/src/definitions/elements/button.less +360 -347
  172. package/src/definitions/elements/container.less +16 -8
  173. package/src/definitions/elements/emoji.less +15 -9
  174. package/src/definitions/elements/flag.less +7 -17
  175. package/src/definitions/elements/header.less +44 -37
  176. package/src/definitions/elements/icon.less +121 -43
  177. package/src/definitions/elements/input.less +23 -7
  178. package/src/definitions/elements/label.less +92 -91
  179. package/src/definitions/elements/list.less +55 -45
  180. package/src/definitions/elements/loader.less +38 -35
  181. package/src/definitions/elements/segment.less +51 -23
  182. package/src/definitions/elements/step.less +52 -48
  183. package/src/definitions/elements/text.less +17 -15
  184. package/src/definitions/globals/site.less +23 -2
  185. package/src/definitions/modules/accordion.less +55 -5
  186. package/src/definitions/modules/calendar.js +109 -10
  187. package/src/definitions/modules/checkbox.js +16 -10
  188. package/src/definitions/modules/checkbox.less +44 -186
  189. package/src/definitions/modules/dimmer.js +14 -11
  190. package/src/definitions/modules/dimmer.less +21 -8
  191. package/src/definitions/modules/dropdown.js +106 -76
  192. package/src/definitions/modules/dropdown.less +148 -89
  193. package/src/definitions/modules/modal.js +236 -40
  194. package/src/definitions/modules/modal.less +6 -4
  195. package/src/definitions/modules/nag.js +130 -64
  196. package/src/definitions/modules/nag.less +105 -40
  197. package/src/definitions/modules/popup.js +4 -4
  198. package/src/definitions/modules/popup.less +5 -1
  199. package/src/definitions/modules/progress.js +2 -2
  200. package/src/definitions/modules/progress.less +20 -18
  201. package/src/definitions/modules/rating.less +50 -42
  202. package/src/definitions/modules/search.js +14 -12
  203. package/src/definitions/modules/search.less +32 -16
  204. package/src/definitions/modules/sidebar.less +33 -19
  205. package/src/definitions/modules/slider.less +43 -42
  206. package/src/definitions/modules/sticky.js +1 -1
  207. package/src/definitions/modules/toast.js +53 -26
  208. package/src/definitions/modules/toast.less +139 -25
  209. package/src/definitions/modules/transition.js +1 -1
  210. package/src/definitions/views/card.less +402 -361
  211. package/src/definitions/views/comment.less +92 -81
  212. package/src/definitions/views/feed.less +164 -144
  213. package/src/definitions/views/item.less +249 -196
  214. package/src/definitions/views/statistic.less +90 -88
  215. package/src/themes/default/collections/grid.variables +8 -8
  216. package/src/themes/default/collections/menu.variables +6 -0
  217. package/src/themes/default/collections/table.variables +1 -1
  218. package/src/themes/default/elements/button.variables +2 -1
  219. package/src/themes/default/elements/flag.overrides +1635 -986
  220. package/src/themes/default/elements/flag.variables +7 -5
  221. package/src/themes/default/elements/header.variables +2 -2
  222. package/src/themes/default/elements/icon.overrides +35 -28
  223. package/src/themes/default/elements/icon.variables +4 -0
  224. package/src/themes/default/elements/list.variables +1 -1
  225. package/src/themes/default/elements/step.overrides +1 -1
  226. package/src/themes/default/globals/colors.less +7 -7
  227. package/src/themes/default/globals/site.variables +19 -9
  228. package/src/themes/default/globals/variation.variables +119 -6
  229. package/src/themes/default/modules/accordion.variables +15 -0
  230. package/src/themes/default/modules/checkbox.variables +16 -16
  231. package/src/themes/default/modules/dimmer.variables +1 -1
  232. package/src/themes/default/modules/dropdown.variables +12 -5
  233. package/src/themes/default/modules/modal.variables +2 -2
  234. package/src/themes/default/modules/nag.variables +3 -1
  235. package/src/themes/default/modules/toast.variables +5 -1
  236. package/src/themes/default/views/card.variables +1 -1
  237. package/src/themes/famfamfam/elements/flag.overrides +1026 -0
  238. package/src/themes/famfamfam/elements/flag.variables +13 -0
  239. package/tasks/admin/components/init.js +2 -2
  240. package/tasks/admin/distributions/init.js +2 -2
  241. package/tasks/build/css.js +6 -1
  242. package/tasks/config/project/release.js +2 -2
  243. package/tasks/config/tasks.js +13 -9
  244. package/test/helpers/sinon.js +1 -1
package/dist/semantic.js CHANGED
@@ -1,15 +1,15 @@
1
- /*
2
- * # Fomantic UI - 2.8.8-beta.99
1
+ /*
2
+ * # Fomantic UI - 2.9.0-beta.100
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * http://fomantic-ui.com/
5
5
  *
6
- * Copyright 2014 Contributors
6
+ * Copyright 2021 Contributors
7
7
  * Released under the MIT license
8
8
  * http://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
11
  /*!
12
- * # Fomantic-UI - Site
12
+ * # Fomantic-UI 2.9.0-beta.100 - 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 - Form Validation
506
+ * # Fomantic-UI 2.9.0-beta.100 - Form Validation
507
507
  * http://github.com/fomantic/Fomantic-UI/
508
508
  *
509
509
  *
@@ -595,6 +595,7 @@ $.fn.form = function(parameters) {
595
595
  else {
596
596
  if(instance !== undefined) {
597
597
  instance.invoke('destroy');
598
+ module.refresh();
598
599
  }
599
600
  module.verbose('Initializing form validation', $module, settings);
600
601
  module.bindEvents();
@@ -675,11 +676,9 @@ $.fn.form = function(parameters) {
675
676
  }
676
677
 
677
678
  $field.on('change click keyup keydown blur', function(e) {
678
- $(this).triggerHandler(e.type + ".dirty");
679
+ module.determine.isDirty();
679
680
  });
680
681
 
681
- $field.on('change.dirty click.dirty keyup.dirty keydown.dirty blur.dirty', module.determine.isDirty);
682
-
683
682
  $module.on('dirty' + eventNamespace, function(e) {
684
683
  settings.onDirty.call();
685
684
  });
@@ -806,10 +805,6 @@ $.fn.form = function(parameters) {
806
805
  module.set.clean();
807
806
  }
808
807
 
809
- if (e && e.namespace === 'dirty') {
810
- e.stopImmediatePropagation();
811
- e.preventDefault();
812
- }
813
808
  }
814
809
  },
815
810
 
@@ -817,13 +812,6 @@ $.fn.form = function(parameters) {
817
812
  bracketedRule: function(rule) {
818
813
  return (rule.type && rule.type.match(settings.regExp.bracket));
819
814
  },
820
- shorthandFields: function(fields) {
821
- var
822
- fieldKeys = Object.keys(fields),
823
- firstRule = fields[fieldKeys[0]]
824
- ;
825
- return module.is.shorthandRules(firstRule);
826
- },
827
815
  // duck type rule test
828
816
  shorthandRules: function(rules) {
829
817
  return (typeof rules == 'string' || Array.isArray(rules));
@@ -926,7 +914,7 @@ $.fn.form = function(parameters) {
926
914
  ;
927
915
  if( key == keyCode.escape) {
928
916
  module.verbose('Escape key pressed blurring field');
929
- $field
917
+ $field[0]
930
918
  .blur()
931
919
  ;
932
920
  }
@@ -935,6 +923,7 @@ $.fn.form = function(parameters) {
935
923
  $field.one('keyup' + eventNamespace, module.event.field.keyup);
936
924
  module.submit();
937
925
  module.debug('Enter pressed on input submitting form');
926
+ event.preventDefault();
938
927
  }
939
928
  keyHeldDown = true;
940
929
  }
@@ -948,15 +937,11 @@ $.fn.form = function(parameters) {
948
937
  $fieldGroup = $field.closest($group),
949
938
  validationRules = module.get.validation($field)
950
939
  ;
951
- if( $fieldGroup.hasClass(className.error) ) {
940
+ if(validationRules && (settings.on == 'blur' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) )) {
952
941
  module.debug('Revalidating field', $field, validationRules);
953
- if(validationRules) {
954
- module.validate.field( validationRules );
955
- }
956
- }
957
- else if(settings.on == 'blur') {
958
- if(validationRules) {
959
- module.validate.field( validationRules );
942
+ module.validate.field( validationRules );
943
+ if(!settings.inline) {
944
+ module.validate.form(false,true);
960
945
  }
961
946
  }
962
947
  },
@@ -969,7 +954,7 @@ $.fn.form = function(parameters) {
969
954
  if(validationRules && (settings.on == 'change' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) )) {
970
955
  clearTimeout(module.timer);
971
956
  module.timer = setTimeout(function() {
972
- module.debug('Revalidating field', $field, module.get.validation($field));
957
+ module.debug('Revalidating field', $field, validationRules);
973
958
  module.validate.field( validationRules );
974
959
  if(!settings.inline) {
975
960
  module.validate.form(false,true);
@@ -1031,15 +1016,19 @@ $.fn.form = function(parameters) {
1031
1016
  fullFields = {}
1032
1017
  ;
1033
1018
  $.each(fields, function(name, rules) {
1034
- if(typeof rules == 'string') {
1035
- rules = [rules];
1019
+ if (!Array.isArray(rules) && typeof rules === 'object') {
1020
+ fullFields[name] = rules;
1021
+ } else {
1022
+ if (typeof rules == 'string') {
1023
+ rules = [rules];
1024
+ }
1025
+ fullFields[name] = {
1026
+ rules: []
1027
+ };
1028
+ $.each(rules, function (index, rule) {
1029
+ fullFields[name].rules.push({type: rule});
1030
+ });
1036
1031
  }
1037
- fullFields[name] = {
1038
- rules: []
1039
- };
1040
- $.each(rules, function(index, rule) {
1041
- fullFields[name].rules.push({ type: rule });
1042
- });
1043
1032
  });
1044
1033
  return fullFields;
1045
1034
  },
@@ -1107,7 +1096,7 @@ $.fn.form = function(parameters) {
1107
1096
  }
1108
1097
  else {
1109
1098
  // 2.x
1110
- if(parameters.fields && module.is.shorthandFields(parameters.fields)) {
1099
+ if(parameters.fields) {
1111
1100
  parameters.fields = module.get.fieldsFromShorthand(parameters.fields);
1112
1101
  }
1113
1102
  settings = $.extend(true, {}, $.fn.form.settings, parameters);
@@ -1135,7 +1124,7 @@ $.fn.form = function(parameters) {
1135
1124
  instance = $module.data(moduleNamespace);
1136
1125
 
1137
1126
  // refresh selector cache
1138
- module.refresh();
1127
+ (instance || module).refresh();
1139
1128
  },
1140
1129
  field: function(identifier) {
1141
1130
  module.verbose('Finding field with identifier', identifier);
@@ -1381,16 +1370,7 @@ $.fn.form = function(parameters) {
1381
1370
  module.debug('Adding rules', newValidation.rules, validation);
1382
1371
  },
1383
1372
  fields: function(fields) {
1384
- var
1385
- newValidation
1386
- ;
1387
- if(fields && module.is.shorthandFields(fields)) {
1388
- newValidation = module.get.fieldsFromShorthand(fields);
1389
- }
1390
- else {
1391
- newValidation = fields;
1392
- }
1393
- validation = $.extend({}, validation, newValidation);
1373
+ validation = $.extend({}, validation, module.get.fieldsFromShorthand(fields));
1394
1374
  },
1395
1375
  prompt: function(identifier, errors, internal) {
1396
1376
  var
@@ -1411,13 +1391,13 @@ $.fn.form = function(parameters) {
1411
1391
  }
1412
1392
  if(settings.inline) {
1413
1393
  if(!promptExists) {
1414
- $prompt = settings.templates.prompt(errors, className.label);
1394
+ $prompt = $('<div/>').addClass(className.label);
1415
1395
  $prompt
1416
1396
  .appendTo($fieldGroup)
1417
1397
  ;
1418
1398
  }
1419
1399
  $prompt
1420
- .html(errors[0])
1400
+ .html(settings.templates.prompt(errors))
1421
1401
  ;
1422
1402
  if(!promptExists) {
1423
1403
  if(settings.transition && module.can.useElement('transition') && $module.transition('is supported')) {
@@ -1610,12 +1590,15 @@ $.fn.form = function(parameters) {
1610
1590
  }
1611
1591
  else if(isCheckbox) {
1612
1592
  module.verbose('Setting checkbox value', value, $element);
1613
- if(value === true || value === 1) {
1593
+ if(value === true || value === 1 || value === 'on') {
1614
1594
  $element.checkbox('check');
1615
1595
  }
1616
1596
  else {
1617
1597
  $element.checkbox('uncheck');
1618
1598
  }
1599
+ if(typeof value === 'string') {
1600
+ $field.val(value);
1601
+ }
1619
1602
  }
1620
1603
  else if(isDropdown) {
1621
1604
  module.verbose('Setting dropdown value', value, $element);
@@ -1728,7 +1711,7 @@ $.fn.form = function(parameters) {
1728
1711
  if(event && $module.data('moduleApi') !== undefined) {
1729
1712
  event.stopImmediatePropagation();
1730
1713
  }
1731
- if(settings.errorFocus) {
1714
+ if(settings.errorFocus && ignoreCallbacks !== true) {
1732
1715
  var focusElement, hasTabIndex = true;
1733
1716
  if (typeof settings.errorFocus === 'string') {
1734
1717
  focusElement = $(settings.errorFocus);
@@ -1835,7 +1818,7 @@ $.fn.form = function(parameters) {
1835
1818
  // cast to string avoiding encoding special values
1836
1819
  value = (value === undefined || value === '' || value === null)
1837
1820
  ? ''
1838
- : (settings.shouldTrim) ? String(value + '').trim() : String(value + '')
1821
+ : (settings.shouldTrim && rule.shouldTrim !== false) || rule.shouldTrim ? String(value + '').trim() : String(value + '')
1839
1822
  ;
1840
1823
  return ruleFunction.call(field, value, ancillary, $module);
1841
1824
  }
@@ -2051,7 +2034,7 @@ $.fn.form.settings = {
2051
2034
 
2052
2035
  autoCheckRequired : false,
2053
2036
  preventLeaving : false,
2054
- errorFocus : false,
2037
+ errorFocus : true,
2055
2038
  dateHandling : 'date', // 'date', 'input', 'formatter'
2056
2039
 
2057
2040
  onValid : function() {},
@@ -2107,7 +2090,6 @@ $.fn.form.settings = {
2107
2090
  doesntContain : '{name} cannot contain "{ruleValue}"',
2108
2091
  doesntContainExactly : '{name} cannot contain exactly "{ruleValue}"',
2109
2092
  minLength : '{name} must be at least {ruleValue} characters',
2110
- length : '{name} must be at least {ruleValue} characters',
2111
2093
  exactLength : '{name} must be exactly {ruleValue} characters',
2112
2094
  maxLength : '{name} cannot be longer than {ruleValue} characters',
2113
2095
  match : '{name} must match {ruleValue} field',
@@ -2121,9 +2103,9 @@ $.fn.form.settings = {
2121
2103
  selector : {
2122
2104
  checkbox : 'input[type="checkbox"], input[type="radio"]',
2123
2105
  clear : '.clear',
2124
- field : 'input:not(.search), textarea, select',
2106
+ field : 'input:not(.search):not([type="file"]):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',
2125
2107
  group : '.field',
2126
- input : 'input',
2108
+ input : 'input:not([type="file"])',
2127
2109
  message : '.error.message',
2128
2110
  prompt : '.prompt.label',
2129
2111
  radio : 'input[type="radio"]',
@@ -2162,15 +2144,22 @@ $.fn.form.settings = {
2162
2144
  html += '<li>' + value + '</li>';
2163
2145
  });
2164
2146
  html += '</ul>';
2165
- return $(html);
2147
+ return html;
2166
2148
  },
2167
2149
 
2168
- // template that produces label
2169
- prompt: function(errors, labelClasses) {
2170
- return $('<div/>')
2171
- .addClass(labelClasses)
2172
- .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">'
2173
2157
  ;
2158
+ $.each(errors, function(index, value) {
2159
+ html += '<li>' + value + '</li>';
2160
+ });
2161
+ html += '</ul>';
2162
+ return html;
2174
2163
  }
2175
2164
  },
2176
2165
 
@@ -2380,14 +2369,6 @@ $.fn.form.settings = {
2380
2369
  ;
2381
2370
  },
2382
2371
 
2383
- // see rls notes for 2.0.6 (this is a duplicate of minLength)
2384
- length: function(value, requiredLength) {
2385
- return (value !== undefined)
2386
- ? (value.length >= requiredLength)
2387
- : false
2388
- ;
2389
- },
2390
-
2391
2372
  // is exactly length
2392
2373
  exactLength: function(value, requiredLength) {
2393
2374
  return (value !== undefined)
@@ -2510,8 +2491,8 @@ $.fn.form.settings = {
2510
2491
  return;
2511
2492
  }
2512
2493
 
2513
- // allow dashes in card
2514
- cardNumber = cardNumber.replace(/[\-]/g, '');
2494
+ // allow dashes and spaces in card
2495
+ cardNumber = cardNumber.replace(/[\s\-]/g, '');
2515
2496
 
2516
2497
  // verify card types
2517
2498
  if(requiredTypes) {
@@ -2596,7 +2577,7 @@ $.fn.form.settings = {
2596
2577
  })( jQuery, window, document );
2597
2578
 
2598
2579
  /*!
2599
- * # Fomantic-UI - Accordion
2580
+ * # Fomantic-UI 2.9.0-beta.100 - Accordion
2600
2581
  * http://github.com/fomantic/Fomantic-UI/
2601
2582
  *
2602
2583
  *
@@ -3215,7 +3196,7 @@ $.extend( $.easing, {
3215
3196
 
3216
3197
 
3217
3198
  /*!
3218
- * # Fomantic-UI - Calendar
3199
+ * # Fomantic-UI 2.9.0-beta.100 - Calendar
3219
3200
  * http://github.com/fomantic/Fomantic-UI/
3220
3201
  *
3221
3202
  *
@@ -3338,7 +3319,7 @@ $.fn.calendar = function(parameters) {
3338
3319
  module.set.maxDate($module.data(metadata.maxDate));
3339
3320
  }
3340
3321
  module.setting('type', module.get.type());
3341
- module.setting('on', settings.on || ($input.length ? 'focus' : 'click'));
3322
+ module.setting('on', settings.on || 'click');
3342
3323
  },
3343
3324
  popup: function () {
3344
3325
  if (settings.inline) {
@@ -3369,7 +3350,10 @@ $.fn.calendar = function(parameters) {
3369
3350
  module.refreshTooltips();
3370
3351
  return settings.onVisible.apply($container, arguments);
3371
3352
  };
3372
- var onHidden = settings.onHidden;
3353
+ var onHidden = function () {
3354
+ module.blur();
3355
+ return settings.onHidden.apply($container, arguments)
3356
+ }
3373
3357
  if (!$input.length) {
3374
3358
  //no input, $container has to handle focus/blur
3375
3359
  $container.attr('tabindex', '0');
@@ -3378,10 +3362,6 @@ $.fn.calendar = function(parameters) {
3378
3362
  module.focus();
3379
3363
  return settings.onVisible.apply($container, arguments);
3380
3364
  };
3381
- onHidden = function () {
3382
- module.blur();
3383
- return settings.onHidden.apply($container, arguments);
3384
- };
3385
3365
  }
3386
3366
  var onShow = function () {
3387
3367
  //reset the focus date onShow
@@ -3606,6 +3586,19 @@ $.fn.calendar = function(parameters) {
3606
3586
  cell.attr("data-variation", disabledDate[metadata.variation]);
3607
3587
  }
3608
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
+ }
3609
3602
  } else {
3610
3603
  eventDate = module.helper.findDayAsObject(cellDate, mode, settings.eventDates);
3611
3604
  if (eventDate !== null) {
@@ -3827,7 +3820,9 @@ $.fn.calendar = function(parameters) {
3827
3820
  var mode = module.get.mode();
3828
3821
  var date = module.get.focusDate();
3829
3822
  if (date && !settings.isDisabled(date, mode) && !module.helper.isDisabled(date, mode) && module.helper.isEnabled(date, mode)) {
3830
- module.selectDate(date);
3823
+ if (settings.onSelect.call(element, date, module.get.mode()) !== false) {
3824
+ module.selectDate(date);
3825
+ }
3831
3826
  }
3832
3827
  //disable form submission:
3833
3828
  event.preventDefault();
@@ -4139,6 +4134,7 @@ $.fn.calendar = function(parameters) {
4139
4134
  //if this is a range calendar, focus the container or input. This will open the popup from its event listeners.
4140
4135
  var endModule = module.get.calendarModule(settings.endCalendar);
4141
4136
  if (endModule) {
4137
+ endModule.refresh();
4142
4138
  if (endModule.setting('on') !== 'focus') {
4143
4139
  endModule.popup('show');
4144
4140
  }
@@ -4188,7 +4184,7 @@ $.fn.calendar = function(parameters) {
4188
4184
 
4189
4185
  helper: {
4190
4186
  isDisabled: function(date, mode) {
4191
- return (mode === 'day' || mode === 'month' || mode === 'year') && ((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){
4192
4188
  if(typeof d === 'string') {
4193
4189
  d = module.helper.sanitiseDate(d);
4194
4190
  }
@@ -4221,7 +4217,45 @@ $.fn.calendar = function(parameters) {
4221
4217
  }
4222
4218
  }
4223
4219
  }
4224
- }));
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
+ })));
4225
4259
  },
4226
4260
  isEnabled: function(date, mode) {
4227
4261
  if (mode === 'day') {
@@ -4289,6 +4323,49 @@ $.fn.calendar = function(parameters) {
4289
4323
  }
4290
4324
  return null;
4291
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
+ },
4292
4369
  sanitiseDate: function (date) {
4293
4370
  if (!(date instanceof Date)) {
4294
4371
  date = parser.date('' + date, settings);
@@ -4574,6 +4651,7 @@ $.fn.calendar.settings = {
4574
4651
  multiMonth : 1, // show multiple months when in 'day' mode
4575
4652
  minTimeGap : 5,
4576
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.
4577
4655
  disabledDates : [], // specific day(s) which won't be selectable and contain additional information.
4578
4656
  disabledDaysOfWeek : [], // day(s) which won't be selectable(s) (0 = Sunday)
4579
4657
  enabledDates : [], // specific day(s) which will be selectable, all other days will be disabled
@@ -4979,7 +5057,9 @@ $.fn.calendar.settings = {
4979
5057
  variation: 'variation',
4980
5058
  position: 'position',
4981
5059
  month: 'month',
4982
- year: 'year'
5060
+ year: 'year',
5061
+ hours: 'hours',
5062
+ days: 'days'
4983
5063
  },
4984
5064
 
4985
5065
  eventClass: 'blue'
@@ -4988,7 +5068,7 @@ $.fn.calendar.settings = {
4988
5068
  })(jQuery, window, document);
4989
5069
 
4990
5070
  /*!
4991
- * # Fomantic-UI - Checkbox
5071
+ * # Fomantic-UI 2.9.0-beta.100 - Checkbox
4992
5072
  * http://github.com/fomantic/Fomantic-UI/
4993
5073
  *
4994
5074
  *
@@ -5228,18 +5308,26 @@ $.fn.checkbox = function(parameters) {
5228
5308
  }
5229
5309
  }
5230
5310
 
5311
+ shortcutPressed = false;
5231
5312
  if(key == keyCode.escape) {
5232
5313
  module.verbose('Escape key pressed blurring field');
5233
5314
  $input.blur();
5234
5315
  shortcutPressed = true;
5235
5316
  }
5236
- else if(!event.ctrlKey && ( key == keyCode.space || (key == keyCode.enter && settings.enableEnterKey)) ) {
5237
- module.verbose('Enter/space key pressed, toggling checkbox');
5238
- module.toggle();
5239
- shortcutPressed = true;
5240
- }
5241
- else {
5242
- 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
+ }
5243
5331
  }
5244
5332
  },
5245
5333
  keyup: function(event) {
@@ -5312,7 +5400,6 @@ $.fn.checkbox = function(parameters) {
5312
5400
  settings.onEnable.call(input);
5313
5401
  // preserve legacy callbacks
5314
5402
  settings.onEnabled.call(input);
5315
- module.trigger.change();
5316
5403
  }
5317
5404
  },
5318
5405
 
@@ -5327,7 +5414,6 @@ $.fn.checkbox = function(parameters) {
5327
5414
  settings.onDisable.call(input);
5328
5415
  // preserve legacy callbacks
5329
5416
  settings.onDisabled.call(input);
5330
- module.trigger.change();
5331
5417
  }
5332
5418
  },
5333
5419
 
@@ -5855,7 +5941,7 @@ $.fn.checkbox.settings = {
5855
5941
 
5856
5942
  selector : {
5857
5943
  checkbox : '.ui.checkbox',
5858
- label : 'label, .box',
5944
+ label : 'label',
5859
5945
  input : 'input[type="checkbox"], input[type="radio"]',
5860
5946
  link : 'a[href]'
5861
5947
  }
@@ -5865,7 +5951,7 @@ $.fn.checkbox.settings = {
5865
5951
  })( jQuery, window, document );
5866
5952
 
5867
5953
  /*!
5868
- * # Fomantic-UI - Dimmer
5954
+ * # Fomantic-UI 2.9.0-beta.100 - Dimmer
5869
5955
  * http://github.com/fomantic/Fomantic-UI/
5870
5956
  *
5871
5957
  *
@@ -6021,7 +6107,7 @@ $.fn.dimmer = function(parameters) {
6021
6107
 
6022
6108
  event: {
6023
6109
  click: function(event) {
6024
- module.verbose('Determining if event occured on dimmer', event);
6110
+ module.verbose('Determining if event occurred on dimmer', event);
6025
6111
  if( $dimmer.find(event.target).length === 0 || $(event.target).is(selector.content) ) {
6026
6112
  module.hide();
6027
6113
  event.stopImmediatePropagation();
@@ -6121,7 +6207,7 @@ $.fn.dimmer = function(parameters) {
6121
6207
  displayType : settings.useFlex
6122
6208
  ? 'flex'
6123
6209
  : 'block',
6124
- animation : settings.transition + ' in',
6210
+ animation : (settings.transition.showMethod || settings.transition) + ' in',
6125
6211
  queue : false,
6126
6212
  duration : module.get.duration(),
6127
6213
  useFailSafe : true,
@@ -6130,6 +6216,7 @@ $.fn.dimmer = function(parameters) {
6130
6216
  },
6131
6217
  onComplete : function() {
6132
6218
  module.set.active();
6219
+ settings.onVisible.call($dimmer);
6133
6220
  callback();
6134
6221
  }
6135
6222
  })
@@ -6151,6 +6238,7 @@ $.fn.dimmer = function(parameters) {
6151
6238
  .fadeTo(module.get.duration(), settings.opacity, function() {
6152
6239
  $dimmer.removeAttr('style');
6153
6240
  module.set.active();
6241
+ settings.onVisible.call($dimmer);
6154
6242
  callback();
6155
6243
  })
6156
6244
  ;
@@ -6168,7 +6256,7 @@ $.fn.dimmer = function(parameters) {
6168
6256
  displayType : settings.useFlex
6169
6257
  ? 'flex'
6170
6258
  : 'block',
6171
- animation : settings.transition + ' out',
6259
+ animation : (settings.transition.hideMethod || settings.transition) + ' out',
6172
6260
  queue : false,
6173
6261
  duration : module.get.duration(),
6174
6262
  useFailSafe : true,
@@ -6176,6 +6264,7 @@ $.fn.dimmer = function(parameters) {
6176
6264
  module.remove.dimmed();
6177
6265
  module.remove.variation();
6178
6266
  module.remove.active();
6267
+ settings.onHidden.call($dimmer);
6179
6268
  callback();
6180
6269
  }
6181
6270
  })
@@ -6189,6 +6278,7 @@ $.fn.dimmer = function(parameters) {
6189
6278
  module.remove.dimmed();
6190
6279
  module.remove.active();
6191
6280
  $dimmer.removeAttr('style');
6281
+ settings.onHidden.call($dimmer);
6192
6282
  callback();
6193
6283
  })
6194
6284
  ;
@@ -6201,15 +6291,12 @@ $.fn.dimmer = function(parameters) {
6201
6291
  return $dimmer;
6202
6292
  },
6203
6293
  duration: function() {
6204
- if(typeof settings.duration == 'object') {
6205
- if( module.is.active() ) {
6206
- return settings.duration.hide;
6207
- }
6208
- else {
6209
- return settings.duration.show;
6210
- }
6294
+ if( module.is.active() ) {
6295
+ return settings.transition.hideDuration || settings.duration.hide || settings.duration;
6296
+ }
6297
+ else {
6298
+ return settings.transition.showDuration || settings.duration.show || settings.duration;
6211
6299
  }
6212
- return settings.duration;
6213
6300
  }
6214
6301
  },
6215
6302
 
@@ -6573,6 +6660,8 @@ $.fn.dimmer.settings = {
6573
6660
  onChange : function(){},
6574
6661
  onShow : function(){},
6575
6662
  onHide : function(){},
6663
+ onVisible : function(){},
6664
+ onHidden : function(){},
6576
6665
 
6577
6666
  error : {
6578
6667
  method : 'The method you called is not defined.'
@@ -6619,7 +6708,7 @@ $.fn.dimmer.settings = {
6619
6708
  })( jQuery, window, document );
6620
6709
 
6621
6710
  /*!
6622
- * # Fomantic-UI - Dropdown
6711
+ * # Fomantic-UI 2.9.0-beta.100 - Dropdown
6623
6712
  * http://github.com/fomantic/Fomantic-UI/
6624
6713
  *
6625
6714
  *
@@ -6820,6 +6909,7 @@ $.fn.dropdown = function(parameters) {
6820
6909
  select: function() {
6821
6910
  if(module.has.input() && selectObserver) {
6822
6911
  selectObserver.observe($module[0], {
6912
+ attributes: true,
6823
6913
  childList : true,
6824
6914
  subtree : true
6825
6915
  });
@@ -6917,7 +7007,9 @@ $.fn.dropdown = function(parameters) {
6917
7007
  : module.get.query()
6918
7008
  ;
6919
7009
  module.verbose('Searching for query', query);
6920
- if(module.has.minCharacters(query)) {
7010
+ if(settings.fireOnInit === false && module.is.initialLoad()) {
7011
+ module.verbose('Skipping callback on initial load', settings.onSearch);
7012
+ } else if(module.has.minCharacters(query) && settings.onSearch.call(element, query) !== false) {
6921
7013
  module.filter(query);
6922
7014
  }
6923
7015
  else {
@@ -6979,7 +7071,7 @@ $.fn.dropdown = function(parameters) {
6979
7071
  if( !module.has.menu() ) {
6980
7072
  module.create.menu();
6981
7073
  }
6982
- if ( module.is.selection() && module.is.clearable() && !module.has.clearItem() ) {
7074
+ if ( module.is.clearable() && !module.has.clearItem() ) {
6983
7075
  module.verbose('Adding clear icon');
6984
7076
  $clear = $('<i />')
6985
7077
  .addClass('remove icon')
@@ -6990,7 +7082,7 @@ $.fn.dropdown = function(parameters) {
6990
7082
  module.verbose('Adding search input');
6991
7083
  $search = $('<input />')
6992
7084
  .addClass(className.search)
6993
- .prop('autocomplete', 'off')
7085
+ .prop('autocomplete', module.is.chrome() ? 'fomantic-search' : 'off')
6994
7086
  .insertBefore($text)
6995
7087
  ;
6996
7088
  }
@@ -7039,6 +7131,9 @@ $.fn.dropdown = function(parameters) {
7039
7131
  module.debug('Disabling dropdown');
7040
7132
  $module.addClass(className.disabled);
7041
7133
  }
7134
+ if($input.is('[required]')) {
7135
+ settings.forceSelection = true;
7136
+ }
7042
7137
  $input
7043
7138
  .removeAttr('required')
7044
7139
  .removeAttr('class')
@@ -7178,7 +7273,7 @@ $.fn.dropdown = function(parameters) {
7178
7273
  if(settings.onHide.call(element) !== false) {
7179
7274
  module.animate.hide(function() {
7180
7275
  module.remove.visible();
7181
- // hidding search focus
7276
+ // hiding search focus
7182
7277
  if ( module.is.focusedOnSearch() && preventBlur !== true ) {
7183
7278
  $search.blur();
7184
7279
  }
@@ -7903,8 +7998,8 @@ $.fn.dropdown = function(parameters) {
7903
7998
  },
7904
7999
  select: {
7905
8000
  mutation: function(mutations) {
7906
- module.debug('<select> modified, recreating menu');
7907
8001
  if(module.is.selectMutation(mutations)) {
8002
+ module.debug('<select> modified, recreating menu');
7908
8003
  module.disconnect.selectObserver();
7909
8004
  module.refresh();
7910
8005
  module.setup.select();
@@ -8487,7 +8582,7 @@ $.fn.dropdown = function(parameters) {
8487
8582
  return count;
8488
8583
  },
8489
8584
  transition: function($subMenu) {
8490
- return (settings.transition == 'auto')
8585
+ return (settings.transition === 'auto')
8491
8586
  ? module.is.upward($subMenu)
8492
8587
  ? 'slide up'
8493
8588
  : 'slide down'
@@ -8938,7 +9033,7 @@ $.fn.dropdown = function(parameters) {
8938
9033
  module.error(error.noStorage);
8939
9034
  return;
8940
9035
  }
8941
- name = sessionStorage.getItem(value);
9036
+ name = sessionStorage.getItem(value + elementNamespace);
8942
9037
  return (name !== undefined)
8943
9038
  ? name
8944
9039
  : false
@@ -8982,7 +9077,7 @@ $.fn.dropdown = function(parameters) {
8982
9077
  return;
8983
9078
  }
8984
9079
  module.verbose('Saving remote data to session storage', value, name);
8985
- sessionStorage.setItem(value, name);
9080
+ sessionStorage.setItem(value + elementNamespace, name);
8986
9081
  }
8987
9082
  },
8988
9083
 
@@ -9687,18 +9782,10 @@ $.fn.dropdown = function(parameters) {
9687
9782
  return;
9688
9783
  }
9689
9784
  // temporarily disconnect observer
9690
- if(selectObserver) {
9691
- selectObserver.disconnect();
9692
- module.verbose('Temporarily disconnecting mutation observer');
9693
- }
9785
+ module.disconnect.selectObserver();
9694
9786
  $option.remove();
9695
9787
  module.verbose('Removing user addition as an <option>', escapedValue);
9696
- if(selectObserver) {
9697
- selectObserver.observe($input[0], {
9698
- childList : true,
9699
- subtree : true
9700
- });
9701
- }
9788
+ module.observe.select();
9702
9789
  },
9703
9790
  message: function() {
9704
9791
  $menu.children(selector.message).remove();
@@ -9997,6 +10084,9 @@ $.fn.dropdown = function(parameters) {
9997
10084
  bubbledIconClick: function(event) {
9998
10085
  return $(event.target).closest($icon).length > 0;
9999
10086
  },
10087
+ chrome: function() {
10088
+ return !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
10089
+ },
10000
10090
  alreadySetup: function() {
10001
10091
  return ($module.is('select') && $module.parent(selector.dropdown).data(moduleNamespace) !== undefined && $module.prev().length === 0);
10002
10092
  },
@@ -10060,7 +10150,7 @@ $.fn.dropdown = function(parameters) {
10060
10150
  selectChanged = false
10061
10151
  ;
10062
10152
  $.each(mutations, function(index, mutation) {
10063
- if($(mutation.target).is('select') || $(mutation.addedNodes).is('select')) {
10153
+ if($(mutation.target).is('select, option, optgroup') || $(mutation.addedNodes).is('select')) {
10064
10154
  selectChanged = true;
10065
10155
  return false;
10066
10156
  }
@@ -10235,12 +10325,12 @@ $.fn.dropdown = function(parameters) {
10235
10325
  ;
10236
10326
  module.verbose('Doing menu show animation', $currentMenu);
10237
10327
  module.set.direction($subMenu);
10238
- transition = module.get.transition($subMenu);
10328
+ transition = settings.transition.showMethod || module.get.transition($subMenu);
10239
10329
  if( module.is.selection() ) {
10240
10330
  module.set.scrollPosition(module.get.selectedItem(), true);
10241
10331
  }
10242
10332
  if( module.is.hidden($currentMenu) || module.is.animating($currentMenu) ) {
10243
- if(transition == 'none') {
10333
+ if(transition === 'none') {
10244
10334
  start();
10245
10335
  $currentMenu.transition({
10246
10336
  displayType: module.get.displayType()
@@ -10253,7 +10343,7 @@ $.fn.dropdown = function(parameters) {
10253
10343
  animation : transition + ' in',
10254
10344
  debug : settings.debug,
10255
10345
  verbose : settings.verbose,
10256
- duration : settings.duration,
10346
+ duration : settings.transition.showDuration || settings.duration,
10257
10347
  queue : true,
10258
10348
  onStart : start,
10259
10349
  displayType: module.get.displayType(),
@@ -10279,7 +10369,7 @@ $.fn.dropdown = function(parameters) {
10279
10369
  }
10280
10370
  module.remove.active();
10281
10371
  },
10282
- transition = module.get.transition($subMenu)
10372
+ transition = settings.transition.hideMethod || module.get.transition($subMenu)
10283
10373
  ;
10284
10374
  callback = $.isFunction(callback)
10285
10375
  ? callback
@@ -10288,7 +10378,7 @@ $.fn.dropdown = function(parameters) {
10288
10378
  if( module.is.visible($currentMenu) || module.is.animating($currentMenu) ) {
10289
10379
  module.verbose('Doing menu hide animation', $currentMenu);
10290
10380
 
10291
- if(transition == 'none') {
10381
+ if(transition === 'none') {
10292
10382
  start();
10293
10383
  $currentMenu.transition({
10294
10384
  displayType: module.get.displayType()
@@ -10299,7 +10389,7 @@ $.fn.dropdown = function(parameters) {
10299
10389
  $currentMenu
10300
10390
  .transition({
10301
10391
  animation : transition + ' out',
10302
- duration : settings.duration,
10392
+ duration : settings.transition.hideDuration || settings.duration,
10303
10393
  debug : settings.debug,
10304
10394
  verbose : settings.verbose,
10305
10395
  queue : false,
@@ -10605,7 +10695,7 @@ $.fn.dropdown.settings = {
10605
10695
  keepOnScreen : true, // Whether dropdown should check whether it is on screen before showing
10606
10696
 
10607
10697
  match : 'both', // what to match against with search selection (both, text, or label)
10608
- 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)
10609
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...)
10610
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)
10611
10701
 
@@ -10613,7 +10703,7 @@ $.fn.dropdown.settings = {
10613
10703
  preserveHTML : true, // preserve html when selecting value
10614
10704
  sortSelect : false, // sort selection on init
10615
10705
 
10616
- forceSelection : true, // force a choice on blur with search selection
10706
+ forceSelection : false, // force a choice on blur with search selection
10617
10707
 
10618
10708
  allowAdditions : false, // whether multiple select should allow user added values
10619
10709
  ignoreCase : false, // whether to consider case sensitivity when creating labels
@@ -10624,7 +10714,7 @@ $.fn.dropdown.settings = {
10624
10714
  useLabels : true, // whether multiple select should filter currently active selections from choices
10625
10715
  delimiter : ',', // when multiselect uses normal <input> the values will be delimited with this character
10626
10716
 
10627
- showOnFocus : true, // show menu on focus
10717
+ showOnFocus : false, // show menu on focus
10628
10718
  allowReselection : false, // whether current value should trigger callbacks when reselected
10629
10719
  allowTab : true, // add tabindex to element
10630
10720
  allowCategorySelection : false, // allow elements with sub-menus to be selected
@@ -10658,6 +10748,7 @@ $.fn.dropdown.settings = {
10658
10748
  onChange : function(value, text, $selected){},
10659
10749
  onAdd : function(value, text, $selected){},
10660
10750
  onRemove : function(value, text, $selected){},
10751
+ onSearch : function(searchTerm){},
10661
10752
 
10662
10753
  onLabelSelect : function($selectedLabels){},
10663
10754
  onLabelCreate : function(value, text) { return $(this); },
@@ -10705,19 +10796,21 @@ $.fn.dropdown.settings = {
10705
10796
 
10706
10797
  // property names for remote query
10707
10798
  fields: {
10708
- remoteValues : 'results', // grouping for api results
10709
- values : 'values', // grouping for all dropdown values
10710
- disabled : 'disabled', // whether value should be disabled
10711
- name : 'name', // displayed dropdown text
10712
- value : 'value', // actual dropdown value
10713
- text : 'text', // displayed text when selected
10714
- type : 'type', // type of dropdown element
10715
- image : 'image', // optional image path
10716
- imageClass : 'imageClass', // optional individual class for image
10717
- icon : 'icon', // optional icon name
10718
- iconClass : 'iconClass', // optional individual class for icon (for example to use flag instead)
10719
- class : 'class', // optional individual class for item/header
10720
- divider : 'divider' // optional divider append for group headers
10799
+ remoteValues : 'results', // grouping for api results
10800
+ values : 'values', // grouping for all dropdown values
10801
+ disabled : 'disabled', // whether value should be disabled
10802
+ name : 'name', // displayed dropdown text
10803
+ description : 'description', // displayed dropdown description
10804
+ descriptionVertical : 'descriptionVertical', // whether description should be vertical
10805
+ value : 'value', // actual dropdown value
10806
+ text : 'text', // displayed text when selected
10807
+ type : 'type', // type of dropdown element
10808
+ image : 'image', // optional image path
10809
+ imageClass : 'imageClass', // optional individual class for image
10810
+ icon : 'icon', // optional icon name
10811
+ iconClass : 'iconClass', // optional individual class for icon (for example to use flag instead)
10812
+ class : 'class', // optional individual class for item/header
10813
+ divider : 'divider' // optional divider append for group headers
10721
10814
  },
10722
10815
 
10723
10816
  keys : {
@@ -10756,37 +10849,40 @@ $.fn.dropdown.settings = {
10756
10849
  },
10757
10850
 
10758
10851
  className : {
10759
- active : 'active',
10760
- addition : 'addition',
10761
- animating : 'animating',
10762
- disabled : 'disabled',
10763
- empty : 'empty',
10764
- dropdown : 'ui dropdown',
10765
- filtered : 'filtered',
10766
- hidden : 'hidden transition',
10767
- icon : 'icon',
10768
- image : 'image',
10769
- item : 'item',
10770
- label : 'ui label',
10771
- loading : 'loading',
10772
- menu : 'menu',
10773
- message : 'message',
10774
- multiple : 'multiple',
10775
- placeholder : 'default',
10776
- sizer : 'sizer',
10777
- search : 'search',
10778
- selected : 'selected',
10779
- selection : 'selection',
10780
- upward : 'upward',
10781
- leftward : 'left',
10782
- visible : 'visible',
10783
- clearable : 'clearable',
10784
- noselection : 'noselection',
10785
- delete : 'delete',
10786
- header : 'header',
10787
- divider : 'divider',
10788
- groupIcon : '',
10789
- unfilterable : 'unfilterable'
10852
+ active : 'active',
10853
+ addition : 'addition',
10854
+ animating : 'animating',
10855
+ description : 'description',
10856
+ descriptionVertical : 'vertical',
10857
+ disabled : 'disabled',
10858
+ empty : 'empty',
10859
+ dropdown : 'ui dropdown',
10860
+ filtered : 'filtered',
10861
+ hidden : 'hidden transition',
10862
+ icon : 'icon',
10863
+ image : 'image',
10864
+ item : 'item',
10865
+ label : 'ui label',
10866
+ loading : 'loading',
10867
+ menu : 'menu',
10868
+ message : 'message',
10869
+ multiple : 'multiple',
10870
+ placeholder : 'default',
10871
+ sizer : 'sizer',
10872
+ search : 'search',
10873
+ selected : 'selected',
10874
+ selection : 'selection',
10875
+ text : 'text',
10876
+ upward : 'upward',
10877
+ leftward : 'left',
10878
+ visible : 'visible',
10879
+ clearable : 'clearable',
10880
+ noselection : 'noselection',
10881
+ delete : 'delete',
10882
+ header : 'header',
10883
+ divider : 'divider',
10884
+ groupIcon : '',
10885
+ unfilterable : 'unfilterable'
10790
10886
  }
10791
10887
 
10792
10888
  };
@@ -10852,26 +10948,49 @@ $.fn.dropdown.settings.templates = {
10852
10948
  var
10853
10949
  itemType = (option[fields.type])
10854
10950
  ? option[fields.type]
10855
- : 'item'
10951
+ : 'item',
10952
+ isMenu = itemType.indexOf('menu') !== -1
10856
10953
  ;
10857
10954
 
10858
- if( itemType === 'item' ) {
10955
+ if( itemType === 'item' || isMenu) {
10859
10956
  var
10860
10957
  maybeText = (option[fields.text])
10861
10958
  ? ' data-text="' + deQuote(option[fields.text],true) + '"'
10862
10959
  : '',
10863
10960
  maybeDisabled = (option[fields.disabled])
10864
10961
  ? className.disabled+' '
10865
- : ''
10962
+ : '',
10963
+ maybeDescriptionVertical = (option[fields.descriptionVertical])
10964
+ ? className.descriptionVertical+' '
10965
+ : '',
10966
+ hasDescription = (escape(option[fields.description] || '', preserveHTML) != '')
10866
10967
  ;
10867
- html += '<div class="'+ maybeDisabled + (option[fields.class] ? deQuote(option[fields.class]) : className.item)+'" data-value="' + deQuote(option[fields.value],true) + '"' + maybeText + '>';
10968
+ html += '<div class="'+ maybeDisabled + maybeDescriptionVertical + (option[fields.class] ? deQuote(option[fields.class]) : className.item)+'" data-value="' + deQuote(option[fields.value],true) + '"' + maybeText + '>';
10969
+ if (isMenu) {
10970
+ html += '<i class="'+ (itemType.indexOf('left') !== -1 ? 'left' : '') + ' dropdown icon"></i>';
10971
+ }
10868
10972
  if(option[fields.image]) {
10869
10973
  html += '<img class="'+(option[fields.imageClass] ? deQuote(option[fields.imageClass]) : className.image)+'" src="' + deQuote(option[fields.image]) + '">';
10870
10974
  }
10871
10975
  if(option[fields.icon]) {
10872
10976
  html += '<i class="'+deQuote(option[fields.icon])+' '+(option[fields.iconClass] ? deQuote(option[fields.iconClass]) : className.icon)+'"></i>';
10873
10977
  }
10978
+ if(hasDescription){
10979
+ html += '<span class="'+ className.description +'">'+ escape(option[fields.description] || '', preserveHTML) + '</span>';
10980
+ html += (!isMenu) ? '<span class="'+ className.text + '">' : '';
10981
+ }
10982
+ if (isMenu) {
10983
+ html += '<span class="' + className.text + '">';
10984
+ }
10874
10985
  html += escape(option[fields.name] || '', preserveHTML);
10986
+ if (isMenu) {
10987
+ html += '</span>';
10988
+ html += '<div class="' + itemType + '">';
10989
+ html += $.fn.dropdown.settings.templates.menu(option, fields, preserveHTML, className);
10990
+ html += '</div>';
10991
+ } else if(hasDescription){
10992
+ html += '</span>';
10993
+ }
10875
10994
  html += '</div>';
10876
10995
  } else if (itemType === 'header') {
10877
10996
  var groupName = escape(option[fields.name] || '', preserveHTML),
@@ -10916,7 +11035,7 @@ $.fn.dropdown.settings.templates = {
10916
11035
  })( jQuery, window, document );
10917
11036
 
10918
11037
  /*!
10919
- * # Fomantic-UI - Embed
11038
+ * # Fomantic-UI 2.9.0-beta.100 - Embed
10920
11039
  * http://github.com/fomantic/Fomantic-UI/
10921
11040
  *
10922
11041
  *
@@ -11626,7 +11745,7 @@ $.fn.embed.settings = {
11626
11745
  })( jQuery, window, document );
11627
11746
 
11628
11747
  /*!
11629
- * # Fomantic-UI - Modal
11748
+ * # Fomantic-UI 2.9.0-beta.100 - Modal
11630
11749
  * http://github.com/fomantic/Fomantic-UI/
11631
11750
  *
11632
11751
  *
@@ -11693,7 +11812,8 @@ $.fn.modal = function(parameters) {
11693
11812
 
11694
11813
  $module = $(this),
11695
11814
  $context = $(settings.context),
11696
- $close = $module.find(selector.close),
11815
+ $closeIcon = $module.find(selector.closeIcon),
11816
+ $inputs,
11697
11817
 
11698
11818
  $allModals,
11699
11819
  $otherModals,
@@ -11719,6 +11839,7 @@ $.fn.modal = function(parameters) {
11719
11839
  module = {
11720
11840
 
11721
11841
  initialize: function() {
11842
+ module.create.id();
11722
11843
  if(!$module.hasClass('modal')) {
11723
11844
  module.create.modal();
11724
11845
  if(!$.isFunction(settings.onHidden)) {
@@ -11737,16 +11858,23 @@ $.fn.modal = function(parameters) {
11737
11858
  }
11738
11859
  if(module.has.configActions()){
11739
11860
  var $actions = $module.find(selector.actions).addClass(settings.classActions);
11861
+ if ($actions.length === 0) {
11862
+ $actions = $('<div/>', {class: className.actions + ' ' + (settings.classActions || '')}).appendTo($module);
11863
+ } else {
11864
+ $actions.empty();
11865
+ }
11740
11866
  settings.actions.forEach(function (el) {
11741
- 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>' : '',
11742
11868
  text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
11743
11869
  cls = module.helpers.deQuote(el[fields.class] || ''),
11744
11870
  click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
11745
11871
  $actions.append($('<button/>', {
11746
11872
  html: icon + text,
11873
+ 'aria-label': $('<div>'+(el[fields.text] || el[fields.icon] || '')+'</div>').text(),
11747
11874
  class: className.button + ' ' + cls,
11748
11875
  click: function () {
11749
- 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) {
11750
11878
  return;
11751
11879
  }
11752
11880
  module.hide();
@@ -11757,7 +11885,6 @@ $.fn.modal = function(parameters) {
11757
11885
  module.cache = {};
11758
11886
  module.verbose('Initializing dimmer', $context);
11759
11887
 
11760
- module.create.id();
11761
11888
  module.create.dimmer();
11762
11889
 
11763
11890
  if ( settings.allowMultiple ) {
@@ -11767,12 +11894,13 @@ $.fn.modal = function(parameters) {
11767
11894
  $module.addClass('top aligned');
11768
11895
  }
11769
11896
  module.refreshModals();
11770
-
11897
+ module.refreshInputs();
11771
11898
  module.bind.events();
11772
- if(settings.observeChanges) {
11773
- module.observeChanges();
11774
- }
11899
+ module.observeChanges();
11775
11900
  module.instantiate();
11901
+ if(settings.autoShow){
11902
+ module.show();
11903
+ }
11776
11904
  },
11777
11905
 
11778
11906
  instantiate: function() {
@@ -11785,19 +11913,23 @@ $.fn.modal = function(parameters) {
11785
11913
 
11786
11914
  create: {
11787
11915
  modal: function() {
11788
- $module = $('<div/>', {class: 'ui modal'});
11916
+ $module = $('<div/>', {class: className.modal, role: 'dialog', 'aria-modal': true});
11789
11917
  if (settings.closeIcon) {
11790
- $close = $('<i/>', {class: className.close})
11791
- $module.append($close);
11918
+ $closeIcon = $('<i/>', {class: className.close, role: 'button', tabindex: 0, 'aria-label': settings.text.close})
11919
+ $module.append($closeIcon);
11792
11920
  }
11793
11921
  if (settings.title !== '') {
11794
- $('<div/>', {class: 'header'}).appendTo($module);
11922
+ var titleId = '_' + module.get.id() + 'title';
11923
+ $module.attr('aria-labelledby', titleId);
11924
+ $('<div/>', {class: className.title, id: titleId}).appendTo($module);
11795
11925
  }
11796
11926
  if (settings.content !== '') {
11797
- $('<div/>', {class: '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);
11798
11930
  }
11799
11931
  if (module.has.configActions()) {
11800
- $('<div/>', {class: 'actions'}).appendTo($module);
11932
+ $('<div/>', {class: className.actions}).appendTo($module);
11801
11933
  }
11802
11934
  $context.append($module);
11803
11935
  },
@@ -11847,15 +11979,21 @@ $.fn.modal = function(parameters) {
11847
11979
  ;
11848
11980
  $window.off(elementEventNamespace);
11849
11981
  $dimmer.off(elementEventNamespace);
11850
- $close.off(eventNamespace);
11982
+ $closeIcon.off(elementEventNamespace);
11983
+ if($inputs) {
11984
+ $inputs.off(elementEventNamespace);
11985
+ }
11851
11986
  $context.dimmer('destroy');
11852
11987
  },
11853
11988
 
11854
11989
  observeChanges: function() {
11855
11990
  if('MutationObserver' in window) {
11856
11991
  observer = new MutationObserver(function(mutations) {
11857
- module.debug('DOM tree modified, refreshing');
11858
- module.refresh();
11992
+ if(settings.observeChanges) {
11993
+ module.debug('DOM tree modified, refreshing');
11994
+ module.refresh();
11995
+ }
11996
+ module.refreshInputs();
11859
11997
  });
11860
11998
  observer.observe(element, {
11861
11999
  childList : true,
@@ -11880,6 +12018,23 @@ $.fn.modal = function(parameters) {
11880
12018
  $allModals = $otherModals.add($module);
11881
12019
  },
11882
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
+
11883
12038
  attachEvents: function(selector, event) {
11884
12039
  var
11885
12040
  $toggle = $(selector)
@@ -11908,6 +12063,9 @@ $.fn.modal = function(parameters) {
11908
12063
  .on('click' + eventNamespace, selector.approve, module.event.approve)
11909
12064
  .on('click' + eventNamespace, selector.deny, module.event.deny)
11910
12065
  ;
12066
+ $closeIcon
12067
+ .on('keyup' + elementEventNamespace, module.event.closeKeyUp)
12068
+ ;
11911
12069
  $window
11912
12070
  .on('resize' + elementEventNamespace, module.event.resize)
11913
12071
  ;
@@ -11926,7 +12084,13 @@ $.fn.modal = function(parameters) {
11926
12084
 
11927
12085
  get: {
11928
12086
  id: function() {
11929
- return (Math.random().toString(16) + '000000000').substr(2, 8);
12087
+ return id;
12088
+ },
12089
+ element: function() {
12090
+ return $module;
12091
+ },
12092
+ settings: function() {
12093
+ return settings;
11930
12094
  }
11931
12095
  },
11932
12096
 
@@ -11959,10 +12123,38 @@ $.fn.modal = function(parameters) {
11959
12123
  close: function() {
11960
12124
  module.hide();
11961
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
+ },
11962
12154
  mousedown: function(event) {
11963
12155
  var
11964
12156
  $target = $(event.target),
11965
- isRtl = module.is.rtl();
12157
+ isRtl = module.is.rtl()
11966
12158
  ;
11967
12159
  initialMouseDownInModal = ($target.closest(selector.modal).length > 0);
11968
12160
  if(initialMouseDownInModal) {
@@ -12010,10 +12202,9 @@ $.fn.modal = function(parameters) {
12010
12202
  },
12011
12203
  keyboard: function(event) {
12012
12204
  var
12013
- keyCode = event.which,
12014
- escapeKey = 27
12205
+ keyCode = event.which
12015
12206
  ;
12016
- if(keyCode == escapeKey) {
12207
+ if(keyCode === settings.keys.escape) {
12017
12208
  if(settings.closable) {
12018
12209
  module.debug('Escape key pressed hiding modal');
12019
12210
  if ( $module.hasClass(className.front) ) {
@@ -12104,9 +12295,9 @@ $.fn.modal = function(parameters) {
12104
12295
  $module
12105
12296
  .transition({
12106
12297
  debug : settings.debug,
12107
- animation : settings.transition + ' in',
12298
+ animation : (settings.transition.showMethod || settings.transition) + ' in',
12108
12299
  queue : settings.queue,
12109
- duration : settings.duration,
12300
+ duration : settings.transition.showDuration || settings.duration,
12110
12301
  useFailSafe : true,
12111
12302
  onComplete : function() {
12112
12303
  settings.onVisible.apply(element);
@@ -12154,9 +12345,9 @@ $.fn.modal = function(parameters) {
12154
12345
  $module
12155
12346
  .transition({
12156
12347
  debug : settings.debug,
12157
- animation : settings.transition + ' out',
12348
+ animation : (settings.transition.hideMethod || settings.transition) + ' out',
12158
12349
  queue : settings.queue,
12159
- duration : settings.duration,
12350
+ duration : settings.transition.hideDuration || settings.duration,
12160
12351
  useFailSafe : true,
12161
12352
  onStart : function() {
12162
12353
  if(!module.others.active() && !module.others.animating() && !keepDimmed) {
@@ -12307,7 +12498,12 @@ $.fn.modal = function(parameters) {
12307
12498
  bodyMargin: function() {
12308
12499
  var position = module.can.leftBodyScrollbar() ? 'left':'right';
12309
12500
  $body.css('margin-'+position, initialBodyMargin);
12310
- $body.find(selector.bodyFixed.replace('right',position)).css('padding-'+position, initialBodyMargin);
12501
+ $body.find(selector.bodyFixed.replace('right',position)).each(function(){
12502
+ var el = $(this),
12503
+ attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
12504
+ ;
12505
+ el.css(attribute, '');
12506
+ });
12311
12507
  }
12312
12508
  },
12313
12509
 
@@ -12323,7 +12519,7 @@ $.fn.modal = function(parameters) {
12323
12519
  $module
12324
12520
  .off('mousedown' + elementEventNamespace)
12325
12521
  ;
12326
- }
12522
+ }
12327
12523
  $dimmer
12328
12524
  .off('mousedown' + elementEventNamespace)
12329
12525
  ;
@@ -12508,13 +12704,10 @@ $.fn.modal = function(parameters) {
12508
12704
  set: {
12509
12705
  autofocus: function() {
12510
12706
  var
12511
- $inputs = $module.find('[tabindex], :input').filter(':visible').filter(function() {
12512
- return $(this).closest('.disabled').length === 0;
12513
- }),
12514
12707
  $autofocus = $inputs.filter('[autofocus]'),
12515
12708
  $input = ($autofocus.length > 0)
12516
12709
  ? $autofocus.first()
12517
- : $inputs.first()
12710
+ : ($inputs.length > 1 ? $inputs.filter(':not(i.close)') : $inputs).first()
12518
12711
  ;
12519
12712
  if($input.length > 0) {
12520
12713
  $input.focus();
@@ -12525,7 +12718,12 @@ $.fn.modal = function(parameters) {
12525
12718
  if(settings.detachable || module.can.fit()) {
12526
12719
  $body.css('margin-'+position, tempBodyMargin + 'px');
12527
12720
  }
12528
- $body.find(selector.bodyFixed.replace('right',position)).css('padding-'+position, tempBodyMargin + 'px');
12721
+ $body.find(selector.bodyFixed.replace('right',position)).each(function(){
12722
+ var el = $(this),
12723
+ attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
12724
+ ;
12725
+ el.css(attribute, 'calc(' + el.css(attribute) + ' + ' + tempBodyMargin + 'px)');
12726
+ });
12529
12727
  },
12530
12728
  clickaway: function() {
12531
12729
  if (!settings.detachable) {
@@ -12552,8 +12750,8 @@ $.fn.modal = function(parameters) {
12552
12750
  closable : 'auto',
12553
12751
  useFlex : module.can.useFlex(),
12554
12752
  duration : {
12555
- show : settings.duration,
12556
- hide : settings.duration
12753
+ show : settings.transition.showDuration || settings.duration,
12754
+ hide : settings.transition.hideDuration || settings.duration
12557
12755
  }
12558
12756
  },
12559
12757
  dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)
@@ -12591,7 +12789,7 @@ $.fn.modal = function(parameters) {
12591
12789
  ? $(document).scrollTop() + settings.padding
12592
12790
  : $(document).scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
12593
12791
  marginLeft: -(module.cache.width / 2)
12594
- })
12792
+ })
12595
12793
  ;
12596
12794
  } else {
12597
12795
  $module
@@ -12600,7 +12798,7 @@ $.fn.modal = function(parameters) {
12600
12798
  ? -(module.cache.height / 2)
12601
12799
  : settings.padding / 2,
12602
12800
  marginLeft: -(module.cache.width / 2)
12603
- })
12801
+ })
12604
12802
  ;
12605
12803
  }
12606
12804
  module.verbose('Setting modal offset for legacy mode');
@@ -12812,9 +13010,22 @@ $.fn.modal = function(parameters) {
12812
13010
 
12813
13011
  if(methodInvoked) {
12814
13012
  if(instance === undefined) {
13013
+ if ($.isFunction(settings.templates[query])) {
13014
+ settings.autoShow = true;
13015
+ settings.className.modal = settings.className.template;
13016
+ settings = $.extend(true, {}, settings, settings.templates[query].apply(module ,queryArguments));
13017
+
13018
+ // reassign shortcuts
13019
+ className = settings.className;
13020
+ namespace = settings.namespace;
13021
+ fields = settings.fields;
13022
+ error = settings.error;
13023
+ }
12815
13024
  module.initialize();
12816
13025
  }
12817
- module.invoke(query);
13026
+ if (!$.isFunction(settings.templates[query])) {
13027
+ module.invoke(query);
13028
+ }
12818
13029
  }
12819
13030
  else {
12820
13031
  if(instance !== undefined) {
@@ -12852,6 +13063,7 @@ $.fn.modal.settings = {
12852
13063
  closable : true,
12853
13064
  autofocus : true,
12854
13065
  restoreFocus : true,
13066
+ autoShow : false,
12855
13067
 
12856
13068
  inverted : false,
12857
13069
  blurring : false,
@@ -12912,16 +13124,25 @@ $.fn.modal.settings = {
12912
13124
  // called after deny selector match
12913
13125
  onDeny : function(){ return true; },
12914
13126
 
13127
+ keys : {
13128
+ space : 32,
13129
+ enter : 13,
13130
+ escape : 27,
13131
+ tab : 9,
13132
+ },
13133
+
12915
13134
  selector : {
12916
13135
  title : '> .header',
12917
13136
  content : '> .content',
12918
13137
  actions : '> .actions',
12919
13138
  close : '> .close',
13139
+ closeIcon: '> .close',
12920
13140
  approve : '.actions .positive, .actions .approve, .actions .ok',
12921
13141
  deny : '.actions .negative, .actions .deny, .actions .cancel',
12922
13142
  modal : '.ui.modal',
12923
13143
  dimmer : '> .ui.dimmer',
12924
- bodyFixed: '> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar'
13144
+ bodyFixed: '> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close',
13145
+ prompt : '.ui.input > input'
12925
13146
  },
12926
13147
  error : {
12927
13148
  dimmer : 'UI Dimmer, a required component is not included in this page',
@@ -12939,15 +13160,109 @@ $.fn.modal.settings = {
12939
13160
  undetached : 'undetached',
12940
13161
  front : 'front',
12941
13162
  close : 'close icon',
12942
- button : 'ui button'
13163
+ button : 'ui button',
13164
+ modal : 'ui modal',
13165
+ title : 'header',
13166
+ content : 'content',
13167
+ actions : 'actions',
13168
+ template : 'ui tiny modal',
13169
+ ok : 'positive',
13170
+ cancel : 'negative',
13171
+ prompt : 'ui fluid input'
13172
+ },
13173
+ text: {
13174
+ ok : 'Ok',
13175
+ cancel: 'Cancel',
13176
+ close : 'Close'
12943
13177
  }
12944
13178
  };
12945
13179
 
13180
+ $.fn.modal.settings.templates = {
13181
+ getArguments: function(args) {
13182
+ var queryArguments = [].slice.call(args);
13183
+ if($.isPlainObject(queryArguments[0])){
13184
+ return $.extend({
13185
+ handler:function(){},
13186
+ content:'',
13187
+ title: ''
13188
+ }, queryArguments[0]);
13189
+ } else {
13190
+ if(!$.isFunction(queryArguments[queryArguments.length-1])) {
13191
+ queryArguments.push(function() {});
13192
+ }
13193
+ return {
13194
+ handler: queryArguments.pop(),
13195
+ content: queryArguments.pop() || '',
13196
+ title: queryArguments.pop() || ''
13197
+ };
13198
+ }
13199
+ },
13200
+ alert: function () {
13201
+ var settings = this.get.settings(),
13202
+ args = settings.templates.getArguments(arguments)
13203
+ ;
13204
+ return {
13205
+ title : args.title,
13206
+ content: args.content,
13207
+ actions: [{
13208
+ text : settings.text.ok,
13209
+ class: settings.className.ok,
13210
+ click: args.handler
13211
+ }]
13212
+ }
13213
+ },
13214
+ confirm: function () {
13215
+ var settings = this.get.settings(),
13216
+ args = settings.templates.getArguments(arguments)
13217
+ ;
13218
+ return {
13219
+ title : args.title,
13220
+ content: args.content,
13221
+ actions: [{
13222
+ text : settings.text.ok,
13223
+ class: settings.className.ok,
13224
+ click: function(){args.handler(true)}
13225
+ },{
13226
+ text: settings.text.cancel,
13227
+ class: settings.className.cancel,
13228
+ click: function(){args.handler(false)}
13229
+ }]
13230
+ }
13231
+ },
13232
+ prompt: function () {
13233
+ var $this = this,
13234
+ settings = this.get.settings(),
13235
+ args = settings.templates.getArguments(arguments),
13236
+ input = $($.parseHTML(args.content)).filter('.ui.input')
13237
+ ;
13238
+ if (input.length === 0) {
13239
+ args.content += '<p><div class="'+settings.className.prompt+'"><input placeholder="'+this.helpers.deQuote(args.placeholder || '')+'" type="text" value="'+this.helpers.deQuote(args.defaultValue || '')+'"></div></p>';
13240
+ }
13241
+ return {
13242
+ title : args.title,
13243
+ content: args.content,
13244
+ actions: [{
13245
+ text: settings.text.ok,
13246
+ class: settings.className.ok,
13247
+ click: function(){
13248
+ var settings = $this.get.settings(),
13249
+ inputField = $this.get.element().find(settings.selector.prompt)[0]
13250
+ ;
13251
+ args.handler($(inputField).val());
13252
+ }
13253
+ },{
13254
+ text: settings.text.cancel,
13255
+ class: settings.className.cancel,
13256
+ click: function(){args.handler(null)}
13257
+ }]
13258
+ }
13259
+ }
13260
+ }
12946
13261
 
12947
13262
  })( jQuery, window, document );
12948
13263
 
12949
13264
  /*!
12950
- * # Fomantic-UI - Nag
13265
+ * # Fomantic-UI 2.9.0-beta.100 - Nag
12951
13266
  * http://github.com/fomantic/Fomantic-UI/
12952
13267
  *
12953
13268
  *
@@ -13006,14 +13321,14 @@ $.fn.nag = function(parameters) {
13006
13321
 
13007
13322
  element = this,
13008
13323
  instance = $module.data(moduleNamespace),
13009
-
13324
+ storage,
13010
13325
  module
13011
13326
  ;
13012
13327
  module = {
13013
13328
 
13014
13329
  initialize: function() {
13015
13330
  module.verbose('Initializing element');
13016
-
13331
+ storage = module.get.storage();
13017
13332
  $module
13018
13333
  .on('click' + eventNamespace, selector.close, module.dismiss)
13019
13334
  .data(moduleNamespace, module)
@@ -13042,47 +13357,47 @@ $.fn.nag = function(parameters) {
13042
13357
 
13043
13358
  show: function() {
13044
13359
  if( module.should.show() && !$module.is(':visible') ) {
13360
+ if(settings.onShow.call(element) === false) {
13361
+ module.debug('onShow callback returned false, cancelling nag animation');
13362
+ return false;
13363
+ }
13045
13364
  module.debug('Showing nag', settings.animation.show);
13046
- if(settings.animation.show == 'fade') {
13365
+ if(settings.animation.show === 'fade') {
13047
13366
  $module
13048
- .fadeIn(settings.duration, settings.easing)
13367
+ .fadeIn(settings.duration, settings.easing, settings.onVisible)
13049
13368
  ;
13050
13369
  }
13051
13370
  else {
13052
13371
  $module
13053
- .slideDown(settings.duration, settings.easing)
13372
+ .slideDown(settings.duration, settings.easing, settings.onVisible)
13054
13373
  ;
13055
13374
  }
13056
13375
  }
13057
13376
  },
13058
13377
 
13059
13378
  hide: function() {
13060
- module.debug('Showing nag', settings.animation.hide);
13061
- if(settings.animation.show == 'fade') {
13379
+ if(settings.onHide.call(element) === false) {
13380
+ module.debug('onHide callback returned false, cancelling nag animation');
13381
+ return false;
13382
+ }
13383
+ module.debug('Hiding nag', settings.animation.hide);
13384
+ if(settings.animation.hide === 'fade') {
13062
13385
  $module
13063
- .fadeIn(settings.duration, settings.easing)
13386
+ .fadeOut(settings.duration, settings.easing, settings.onHidden)
13064
13387
  ;
13065
13388
  }
13066
13389
  else {
13067
13390
  $module
13068
- .slideUp(settings.duration, settings.easing)
13391
+ .slideUp(settings.duration, settings.easing, settings.onHidden)
13069
13392
  ;
13070
13393
  }
13071
13394
  },
13072
13395
 
13073
- onHide: function() {
13074
- module.debug('Removing nag', settings.animation.hide);
13075
- $module.remove();
13076
- if (settings.onHide) {
13077
- settings.onHide();
13078
- }
13079
- },
13080
-
13081
13396
  dismiss: function(event) {
13082
- if(settings.storageMethod) {
13397
+ if(module.hide() !== false && settings.storageMethod) {
13398
+ module.debug('Dismissing nag', settings.storageMethod, settings.key, settings.value, settings.expires);
13083
13399
  module.storage.set(settings.key, settings.value);
13084
13400
  }
13085
- module.hide();
13086
13401
  event.stopImmediatePropagation();
13087
13402
  event.preventDefault();
13088
13403
  },
@@ -13103,12 +13418,71 @@ $.fn.nag = function(parameters) {
13103
13418
  },
13104
13419
 
13105
13420
  get: {
13421
+ expirationDate: function(expires) {
13422
+ if (typeof expires === 'number') {
13423
+ expires = new Date(Date.now() + expires * 864e5);
13424
+ }
13425
+ if(expires instanceof Date && expires.getTime() ){
13426
+ return expires.toUTCString();
13427
+ } else {
13428
+ module.error(error.expiresFormat);
13429
+ }
13430
+ },
13431
+ storage: function(){
13432
+ if(settings.storageMethod === 'localstorage' && window.localStorage !== undefined) {
13433
+ module.debug('Using local storage');
13434
+ return window.localStorage;
13435
+ }
13436
+ else if(settings.storageMethod === 'sessionstorage' && window.sessionStorage !== undefined) {
13437
+ module.debug('Using session storage');
13438
+ return window.sessionStorage;
13439
+ }
13440
+ else if("cookie" in document) {
13441
+ module.debug('Using cookie');
13442
+ return {
13443
+ setItem: function(key, value, options) {
13444
+ // RFC6265 compliant encoding
13445
+ key = encodeURIComponent(key)
13446
+ .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
13447
+ .replace(/[()]/g, escape);
13448
+ value = encodeURIComponent(value)
13449
+ .replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
13450
+
13451
+ var cookieOptions = '';
13452
+ for (var option in options) {
13453
+ if (options.hasOwnProperty(option)) {
13454
+ cookieOptions += '; ' + option;
13455
+ if (typeof options[option] === 'string') {
13456
+ cookieOptions += '=' + options[option].split(';')[0];
13457
+ }
13458
+ }
13459
+ }
13460
+ document.cookie = key + '=' + value + cookieOptions;
13461
+ },
13462
+ getItem: function(key) {
13463
+ var cookies = document.cookie.split('; ');
13464
+ for (var i = 0, il = cookies.length; i < il; i++) {
13465
+ var parts = cookies[i].split('='),
13466
+ foundKey = parts[0].replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
13467
+ if (key === foundKey) {
13468
+ return parts[1] || '';
13469
+ }
13470
+ }
13471
+ },
13472
+ removeItem: function(key, options) {
13473
+ storage.setItem(key,'',options);
13474
+ }
13475
+ };
13476
+ } else {
13477
+ module.error(error.noStorage);
13478
+ }
13479
+ },
13106
13480
  storageOptions: function() {
13107
13481
  var
13108
13482
  options = {}
13109
13483
  ;
13110
13484
  if(settings.expires) {
13111
- options.expires = settings.expires;
13485
+ options.expires = module.get.expirationDate(settings.expires);
13112
13486
  }
13113
13487
  if(settings.domain) {
13114
13488
  options.domain = settings.domain;
@@ -13116,6 +13490,12 @@ $.fn.nag = function(parameters) {
13116
13490
  if(settings.path) {
13117
13491
  options.path = settings.path;
13118
13492
  }
13493
+ if(settings.secure) {
13494
+ options.secure = settings.secure;
13495
+ }
13496
+ if(settings.samesite) {
13497
+ options.samesite = settings.samesite;
13498
+ }
13119
13499
  return options;
13120
13500
  }
13121
13501
  },
@@ -13129,39 +13509,30 @@ $.fn.nag = function(parameters) {
13129
13509
  var
13130
13510
  options = module.get.storageOptions()
13131
13511
  ;
13132
- if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) {
13133
- window.localStorage.setItem(key, value);
13134
- module.debug('Value stored using local storage', key, value);
13512
+ if(storage === window.localStorage && options.expires) {
13513
+ module.debug('Storing expiration value in localStorage', key, options.expires);
13514
+ storage.setItem(key + settings.expirationKey, options.expires );
13135
13515
  }
13136
- else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) {
13137
- window.sessionStorage.setItem(key, value);
13138
- module.debug('Value stored using session storage', key, value);
13516
+ module.debug('Value stored', key, value);
13517
+ try {
13518
+ storage.setItem(key, value, options);
13139
13519
  }
13140
- else if($.cookie !== undefined) {
13141
- $.cookie(key, value, options);
13142
- module.debug('Value stored using cookie', key, value, options);
13143
- }
13144
- else {
13145
- module.error(error.noCookieStorage);
13146
- return;
13520
+ catch(e) {
13521
+ module.error(error.setItem, e);
13147
13522
  }
13148
13523
  },
13149
- get: function(key, value) {
13524
+ get: function(key) {
13150
13525
  var
13151
13526
  storedValue
13152
13527
  ;
13153
- if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) {
13154
- storedValue = window.localStorage.getItem(key);
13155
- }
13156
- else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) {
13157
- storedValue = window.sessionStorage.getItem(key);
13158
- }
13159
- // get by cookie
13160
- else if($.cookie !== undefined) {
13161
- storedValue = $.cookie(key);
13162
- }
13163
- else {
13164
- module.error(error.noCookieStorage);
13528
+ storedValue = storage.getItem(key);
13529
+ if(storage === window.localStorage) {
13530
+ var expiration = storage.getItem(key + settings.expirationKey);
13531
+ if(expiration !== null && expiration !== undefined && new Date(expiration) < new Date()) {
13532
+ module.debug('Value in localStorage has expired. Deleting key', key);
13533
+ module.storage.remove(key);
13534
+ storedValue = null;
13535
+ }
13165
13536
  }
13166
13537
  if(storedValue == 'undefined' || storedValue == 'null' || storedValue === undefined || storedValue === null) {
13167
13538
  storedValue = undefined;
@@ -13172,19 +13543,11 @@ $.fn.nag = function(parameters) {
13172
13543
  var
13173
13544
  options = module.get.storageOptions()
13174
13545
  ;
13175
- if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) {
13176
- window.localStorage.removeItem(key);
13177
- }
13178
- else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) {
13179
- window.sessionStorage.removeItem(key);
13180
- }
13181
- // store by cookie
13182
- else if($.cookie !== undefined) {
13183
- $.removeCookie(key, options);
13184
- }
13185
- else {
13186
- module.error(error.noStorage);
13546
+ options.expires = module.get.expirationDate(-1);
13547
+ if(storage === window.localStorage) {
13548
+ storage.removeItem(key + settings.expirationKey);
13187
13549
  }
13550
+ storage.removeItem(key, options);
13188
13551
  }
13189
13552
  },
13190
13553
 
@@ -13398,8 +13761,12 @@ $.fn.nag.settings = {
13398
13761
  detachable : false,
13399
13762
 
13400
13763
  expires : 30,
13764
+
13765
+ // cookie storage only options
13401
13766
  domain : false,
13402
13767
  path : '/',
13768
+ secure : false,
13769
+ samesite : false,
13403
13770
 
13404
13771
  // type of storage to use
13405
13772
  storageMethod : 'cookie',
@@ -13408,10 +13775,14 @@ $.fn.nag.settings = {
13408
13775
  key : 'nag',
13409
13776
  value : 'dismiss',
13410
13777
 
13778
+ // Key suffix to support expiration in localstorage
13779
+ expirationKey : 'ExpirationDate',
13780
+
13411
13781
  error: {
13412
- noCookieStorage : '$.cookie is not included. A storage solution is required.',
13413
- noStorage : 'Neither $.cookie or store is defined. A storage solution is required for storing state',
13414
- method : 'The method you called is not defined.'
13782
+ noStorage : 'Unsupported storage method',
13783
+ method : 'The method you called is not defined.',
13784
+ setItem : 'Unexpected error while setting value',
13785
+ expiresFormat : '"expires" must be a number of days or a Date Object'
13415
13786
  },
13416
13787
 
13417
13788
  className : {
@@ -13420,13 +13791,23 @@ $.fn.nag.settings = {
13420
13791
  },
13421
13792
 
13422
13793
  selector : {
13423
- close : '.close.icon'
13794
+ close : '> .close.icon'
13424
13795
  },
13425
13796
 
13426
- speed : 500,
13797
+ duration : 500,
13427
13798
  easing : 'easeOutQuad',
13428
13799
 
13429
- onHide: function() {}
13800
+ // callback before show animation, return false to prevent show
13801
+ onShow : function() {},
13802
+
13803
+ // called after show animation
13804
+ onVisible : function() {},
13805
+
13806
+ // callback before hide animation, return false to prevent hide
13807
+ onHide : function() {},
13808
+
13809
+ // callback after hide animation
13810
+ onHidden : function() {}
13430
13811
 
13431
13812
  };
13432
13813
 
@@ -13440,7 +13821,7 @@ $.extend( $.easing, {
13440
13821
  })( jQuery, window, document );
13441
13822
 
13442
13823
  /*!
13443
- * # Fomantic-UI - Popup
13824
+ * # Fomantic-UI 2.9.0-beta.100 - Popup
13444
13825
  * http://github.com/fomantic/Fomantic-UI/
13445
13826
  *
13446
13827
  *
@@ -13875,11 +14256,11 @@ $.fn.popup = function(parameters) {
13875
14256
  module.set.visible();
13876
14257
  $popup
13877
14258
  .transition({
13878
- animation : settings.transition + ' in',
14259
+ animation : (settings.transition.showMethod || settings.transition) + ' in',
13879
14260
  queue : false,
13880
14261
  debug : settings.debug,
13881
14262
  verbose : settings.verbose,
13882
- duration : settings.duration,
14263
+ duration : settings.transition.showDuration || settings.duration,
13883
14264
  onComplete : function() {
13884
14265
  module.bind.close();
13885
14266
  callback.call($popup, element);
@@ -13898,9 +14279,9 @@ $.fn.popup = function(parameters) {
13898
14279
  if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
13899
14280
  $popup
13900
14281
  .transition({
13901
- animation : settings.transition + ' out',
14282
+ animation : (settings.transition.hideMethod || settings.transition) + ' out',
13902
14283
  queue : false,
13903
- duration : settings.duration,
14284
+ duration : settings.transition.hideDuration || settings.duration,
13904
14285
  debug : settings.debug,
13905
14286
  verbose : settings.verbose,
13906
14287
  onComplete : function() {
@@ -14982,7 +15363,7 @@ $.fn.popup.settings = {
14982
15363
  })( jQuery, window, document );
14983
15364
 
14984
15365
  /*!
14985
- * # Fomantic-UI - Progress
15366
+ * # Fomantic-UI 2.9.0-beta.100 - Progress
14986
15367
  * http://github.com/fomantic/Fomantic-UI/
14987
15368
  *
14988
15369
  *
@@ -15076,7 +15457,7 @@ $.fn.progress = function(parameters) {
15076
15457
  *
15077
15458
  * @param min A minimum value within multiple values
15078
15459
  * @param total A total amount of multiple values
15079
- * @returns {number} A precison. Could be 1, 10, 100, ... 1e+10.
15460
+ * @returns {number} A precision. Could be 1, 10, 100, ... 1e+10.
15080
15461
  */
15081
15462
  derivePrecision: function(min, total) {
15082
15463
  var precisionPower = 0
@@ -15974,7 +16355,7 @@ $.fn.progress.settings = {
15974
16355
  nonNumeric : 'Progress value is non numeric',
15975
16356
  tooHigh : 'Value specified is above 100%',
15976
16357
  tooLow : 'Value specified is below 0%',
15977
- sumExceedsTotal : 'Sum of multple values exceed total',
16358
+ sumExceedsTotal : 'Sum of multiple values exceed total',
15978
16359
  },
15979
16360
 
15980
16361
  regExp: {
@@ -16016,7 +16397,7 @@ $.fn.progress.settings = {
16016
16397
  })( jQuery, window, document );
16017
16398
 
16018
16399
  /*!
16019
- * # Fomantic-UI - Slider
16400
+ * # Fomantic-UI 2.9.0-beta.100 - Slider
16020
16401
  * http://github.com/fomantic/Fomantic-UI/
16021
16402
  *
16022
16403
  *
@@ -17355,7 +17736,7 @@ $.fn.slider.settings = {
17355
17736
  })( jQuery, window, document );
17356
17737
 
17357
17738
  /*!
17358
- * # Fomantic-UI - Rating
17739
+ * # Fomantic-UI 2.9.0-beta.100 - Rating
17359
17740
  * http://github.com/fomantic/Fomantic-UI/
17360
17741
  *
17361
17742
  *
@@ -17910,7 +18291,7 @@ $.fn.rating.settings = {
17910
18291
  })( jQuery, window, document );
17911
18292
 
17912
18293
  /*!
17913
- * # Fomantic-UI - Search
18294
+ * # Fomantic-UI 2.9.0-beta.100 - Search
17914
18295
  * http://github.com/fomantic/Fomantic-UI/
17915
18296
  *
17916
18297
  *
@@ -18029,7 +18410,7 @@ $.fn.search = function(parameters) {
18029
18410
  .on(module.get.inputEvent() + eventNamespace, selector.prompt, module.event.input)
18030
18411
  ;
18031
18412
  $prompt
18032
- .attr('autocomplete', 'off')
18413
+ .attr('autocomplete', module.is.chrome() ? 'fomantic-search' : 'off')
18033
18414
  ;
18034
18415
  }
18035
18416
  $module
@@ -18138,9 +18519,7 @@ $.fn.search = function(parameters) {
18138
18519
  results = module.get.results(),
18139
18520
  result = $result.data(metadata.result) || module.get.result(value, results)
18140
18521
  ;
18141
- if(value) {
18142
- module.set.value(value);
18143
- }
18522
+ var oldValue = module.get.value();
18144
18523
  if( $.isFunction(settings.onSelect) ) {
18145
18524
  if(settings.onSelect.call(element, result, results) === false) {
18146
18525
  module.debug('Custom onSelect callback cancelled default select action');
@@ -18149,6 +18528,9 @@ $.fn.search = function(parameters) {
18149
18528
  }
18150
18529
  }
18151
18530
  module.hideResults();
18531
+ if(value && module.get.value() === oldValue) {
18532
+ module.set.value(value);
18533
+ }
18152
18534
  if(href) {
18153
18535
  event.preventDefault();
18154
18536
  module.verbose('Opening search link found in result', $link);
@@ -18162,16 +18544,16 @@ $.fn.search = function(parameters) {
18162
18544
  }
18163
18545
  }
18164
18546
  },
18165
- ensureVisible: function ensureVisible($el) {
18547
+ ensureVisible: function($el) {
18166
18548
  var elTop, elBottom, resultsScrollTop, resultsHeight;
18167
-
18549
+ if($el.length === 0) {
18550
+ return;
18551
+ }
18168
18552
  elTop = $el.position().top;
18169
18553
  elBottom = elTop + $el.outerHeight(true);
18170
18554
 
18171
18555
  resultsScrollTop = $results.scrollTop();
18172
- resultsHeight = $results.height()
18173
- parseInt($results.css('paddingTop'), 0) +
18174
- parseInt($results.css('paddingBottom'), 0);
18556
+ resultsHeight = $results.height();
18175
18557
 
18176
18558
  if (elTop < 0) {
18177
18559
  $results.scrollTop(resultsScrollTop + elTop);
@@ -18312,6 +18694,9 @@ $.fn.search = function(parameters) {
18312
18694
  animating: function() {
18313
18695
  return $results.hasClass(className.animating);
18314
18696
  },
18697
+ chrome: function() {
18698
+ return !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
18699
+ },
18315
18700
  hidden: function() {
18316
18701
  return $results.hasClass(className.hidden);
18317
18702
  },
@@ -18887,9 +19272,7 @@ $.fn.search = function(parameters) {
18887
19272
  duration : settings.duration,
18888
19273
  onShow : function() {
18889
19274
  var $firstResult = $module.find(selector.result).eq(0);
18890
- if($firstResult.length > 0) {
18891
- module.ensureVisible($firstResult);
18892
- }
19275
+ module.ensureVisible($firstResult);
18893
19276
  },
18894
19277
  onComplete : function() {
18895
19278
  callback();
@@ -19476,7 +19859,7 @@ $.fn.search.settings = {
19476
19859
  })( jQuery, window, document );
19477
19860
 
19478
19861
  /*!
19479
- * # Fomantic-UI - Shape
19862
+ * # Fomantic-UI 2.9.0-beta.100 - Shape
19480
19863
  * http://github.com/fomantic/Fomantic-UI/
19481
19864
  *
19482
19865
  *
@@ -20325,7 +20708,7 @@ $.fn.shape.settings = {
20325
20708
  })( jQuery, window, document );
20326
20709
 
20327
20710
  /*!
20328
- * # Fomantic-UI - Sidebar
20711
+ * # Fomantic-UI 2.9.0-beta.100 - Sidebar
20329
20712
  * http://github.com/fomantic/Fomantic-UI/
20330
20713
  *
20331
20714
  *
@@ -21362,7 +21745,7 @@ $.fn.sidebar.settings = {
21362
21745
  })( jQuery, window, document );
21363
21746
 
21364
21747
  /*!
21365
- * # Fomantic-UI - Sticky
21748
+ * # Fomantic-UI 2.9.0-beta.100 - Sticky
21366
21749
  * http://github.com/fomantic/Fomantic-UI/
21367
21750
  *
21368
21751
  *
@@ -22301,7 +22684,7 @@ $.fn.sticky.settings = {
22301
22684
 
22302
22685
  error : {
22303
22686
  container : 'Sticky element must be inside a relative container',
22304
- visible : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.',
22687
+ visible : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to suppress this warning in production.',
22305
22688
  method : 'The method you called is not defined.',
22306
22689
  invalidContext : 'Context specified does not exist',
22307
22690
  elementSize : 'Sticky element is larger than its container, cannot create sticky.'
@@ -22320,7 +22703,7 @@ $.fn.sticky.settings = {
22320
22703
  })( jQuery, window, document );
22321
22704
 
22322
22705
  /*!
22323
- * # Fomantic-UI - Tab
22706
+ * # Fomantic-UI 2.9.0-beta.100 - Tab
22324
22707
  * http://github.com/fomantic/Fomantic-UI/
22325
22708
  *
22326
22709
  *
@@ -23322,7 +23705,7 @@ $.fn.tab.settings = {
23322
23705
  })( jQuery, window, document );
23323
23706
 
23324
23707
  /*!
23325
- * # Fomantic-UI - Toast
23708
+ * # Fomantic-UI 2.9.0-beta.100 - Toast
23326
23709
  * http://github.com/fomantic/Fomantic-UI/
23327
23710
  *
23328
23711
  *
@@ -23392,12 +23775,14 @@ $.fn.toast = function(parameters) {
23392
23775
  element = this,
23393
23776
  instance = isToastComponent ? $module.data(moduleNamespace) : undefined,
23394
23777
 
23778
+ id,
23395
23779
  module
23396
23780
  ;
23397
23781
  module = {
23398
23782
 
23399
23783
  initialize: function() {
23400
23784
  module.verbose('Initializing element');
23785
+ module.create.id();
23401
23786
  if (!module.has.container()) {
23402
23787
  module.create.container();
23403
23788
  }
@@ -23447,17 +23832,22 @@ $.fn.toast = function(parameters) {
23447
23832
  },
23448
23833
 
23449
23834
  show: function(callback) {
23450
- callback = callback || function(){};
23451
- module.debug('Showing toast');
23452
23835
  if(settings.onShow.call($toastBox, element) === false) {
23453
23836
  module.debug('onShow callback returned false, cancelling toast animation');
23454
23837
  return;
23455
23838
  }
23839
+ callback = callback || function(){};
23840
+ module.debug('Showing toast');
23456
23841
  module.animate.show(callback);
23457
23842
  },
23458
23843
 
23459
23844
  close: function(callback) {
23845
+ if(settings.onHide.call($toastBox, element) === false) {
23846
+ module.debug('onHide callback returned false, cancelling toast animation');
23847
+ return;
23848
+ }
23460
23849
  callback = callback || function(){};
23850
+ module.debug('Closing toast');
23461
23851
  module.remove.visible();
23462
23852
  module.unbind.events();
23463
23853
  module.animate.close(callback);
@@ -23469,12 +23859,16 @@ $.fn.toast = function(parameters) {
23469
23859
  module.verbose('Creating container');
23470
23860
  $context.append($('<div/>',{class: settings.position + ' ' + className.container + ' ' +(settings.horizontal ? className.horizontal : '')}));
23471
23861
  },
23862
+ id: function() {
23863
+ id = (Math.random().toString(16) + '000000000').substr(2, 8);
23864
+ module.verbose('Creating unique id for element', id);
23865
+ },
23472
23866
  toast: function() {
23473
23867
  $toastBox = $('<div/>', {class: className.box});
23474
23868
  var iconClass = module.get.iconClass();
23475
23869
  if (!isToastComponent) {
23476
23870
  module.verbose('Creating toast');
23477
- $toast = $('<div/>');
23871
+ $toast = $('<div/>', {role: 'alert'});
23478
23872
  var $content = $('<div/>', {class: className.content});
23479
23873
  if (iconClass !== '') {
23480
23874
  $toast.append($('<i/>', {class: iconClass + ' ' + className.icon}));
@@ -23487,13 +23881,21 @@ $.fn.toast = function(parameters) {
23487
23881
  }));
23488
23882
  }
23489
23883
  if (settings.title !== '') {
23884
+ var titleId = '_' + module.get.id() + 'title';
23885
+ $toast.attr('aria-labelledby', titleId);
23490
23886
  $content.append($('<div/>', {
23491
23887
  class: className.title,
23492
- text: settings.title
23888
+ id: titleId,
23889
+ html: module.helpers.escape(settings.title, settings.preserveHTML)
23493
23890
  }));
23494
23891
  }
23495
-
23496
- $content.append($('<div/>', {class: className.message, html: module.helpers.escape(settings.message, settings.preserveHTML)}));
23892
+ var descId = '_' + module.get.id() + 'desc';
23893
+ $toast.attr('aria-describedby', descId);
23894
+ $content.append($('<div/>', {
23895
+ class: className.message,
23896
+ id: descId,
23897
+ html: module.helpers.escape(settings.message, settings.preserveHTML)
23898
+ }));
23497
23899
 
23498
23900
  $toast
23499
23901
  .addClass(settings.class + ' ' + className.toast)
@@ -23501,7 +23903,7 @@ $.fn.toast = function(parameters) {
23501
23903
  ;
23502
23904
  $toast.css('opacity', settings.opacity);
23503
23905
  if (settings.closeIcon) {
23504
- $close = $('<i/>', {class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : '')});
23906
+ $close = $('<i/>', {class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : ''), role: 'button', tabindex: 0, 'aria-label': settings.text.close});
23505
23907
  if($close.hasClass(className.left)) {
23506
23908
  $toast.prepend($close);
23507
23909
  } else {
@@ -23544,15 +23946,17 @@ $.fn.toast = function(parameters) {
23544
23946
  }
23545
23947
  }
23546
23948
  settings.actions.forEach(function (el) {
23547
- var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
23949
+ var icon = el[fields.icon] ? '<i '+(el[fields.text] ? 'aria-hidden="true"' : '')+' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
23548
23950
  text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
23549
23951
  cls = module.helpers.deQuote(el[fields.class] || ''),
23550
23952
  click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
23551
23953
  $actions.append($('<button/>', {
23552
23954
  html: icon + text,
23955
+ 'aria-label': $('<div>'+(el[fields.text] || el[fields.icon] || '')+'</div>').text(),
23553
23956
  class: className.button + ' ' + cls,
23554
23957
  click: function () {
23555
- if (click.call(element, $module) === false) {
23958
+ var button = $(this);
23959
+ if (button.is(selector.approve) || button.is(selector.deny) || click.call(element, $module) === false) {
23556
23960
  return;
23557
23961
  }
23558
23962
  module.close();
@@ -23652,13 +24056,12 @@ $.fn.toast = function(parameters) {
23652
24056
  bind: {
23653
24057
  events: function() {
23654
24058
  module.debug('Binding events to toast');
23655
- if(settings.closeOnClick || settings.closeIcon) {
23656
- (settings.closeIcon ? $close : $toast)
23657
- .on('click' + eventNamespace, module.event.click)
23658
- ;
24059
+ if(settings.closeIcon) {
24060
+ $close.on('click' + eventNamespace, module.event.close);
23659
24061
  }
24062
+ $toast.on('click' + eventNamespace, module.event.click);
23660
24063
  if($animationObject) {
23661
- $animationObject.on('animationend' + eventNamespace, module.close);
24064
+ $animationObject.on('animationend' + eventNamespace, module.event.close);
23662
24065
  }
23663
24066
  $toastBox
23664
24067
  .on('click' + eventNamespace, selector.approve, module.event.approve)
@@ -23670,11 +24073,10 @@ $.fn.toast = function(parameters) {
23670
24073
  unbind: {
23671
24074
  events: function() {
23672
24075
  module.debug('Unbinding events to toast');
23673
- if(settings.closeOnClick || settings.closeIcon) {
23674
- (settings.closeIcon ? $close : $toast)
23675
- .off('click' + eventNamespace)
23676
- ;
24076
+ if(settings.closeIcon) {
24077
+ $close.off('click' + eventNamespace);
23677
24078
  }
24079
+ $toast.off('click' + eventNamespace);
23678
24080
  if($animationObject) {
23679
24081
  $animationObject.off('animationend' + eventNamespace);
23680
24082
  }
@@ -23706,11 +24108,6 @@ $.fn.toast = function(parameters) {
23706
24108
  },
23707
24109
  close: function(callback) {
23708
24110
  callback = $.isFunction(callback) ? callback : function(){};
23709
- module.debug('Closing toast');
23710
- if(settings.onHide.call($toastBox, element) === false) {
23711
- module.debug('onHide callback returned false, cancelling toast animation');
23712
- return;
23713
- }
23714
24111
  if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
23715
24112
  $toastBox
23716
24113
  .transition({
@@ -23766,7 +24163,7 @@ $.fn.toast = function(parameters) {
23766
24163
  has: {
23767
24164
  container: function() {
23768
24165
  module.verbose('Determining if there is already a container');
23769
- return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : '')).length > 0);
24166
+ 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);
23770
24167
  },
23771
24168
  toast: function(){
23772
24169
  return !!module.get.toast();
@@ -23780,8 +24177,11 @@ $.fn.toast = function(parameters) {
23780
24177
  },
23781
24178
 
23782
24179
  get: {
24180
+ id: function() {
24181
+ return id;
24182
+ },
23783
24183
  container: function() {
23784
- return ($context.find(module.helpers.toClass(settings.position) + selector.container)[0]);
24184
+ return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : ':not('+module.helpers.toClass(className.horizontal)+')'))[0]);
23785
24185
  },
23786
24186
  toastBox: function() {
23787
24187
  return $toastBox || null;
@@ -23813,9 +24213,15 @@ $.fn.toast = function(parameters) {
23813
24213
  },
23814
24214
 
23815
24215
  event: {
24216
+ close: function(){
24217
+ module.close();
24218
+ },
23816
24219
  click: function(event) {
23817
24220
  if($(event.target).closest('a').length === 0) {
23818
- settings.onClick.call($toastBox, element);
24221
+ if(settings.onClick.call($toastBox, element) === false || !settings.closeOnClick) {
24222
+ module.verbose('Click callback returned false or close denied by setting cancelling close');
24223
+ return;
24224
+ }
23819
24225
  module.close();
23820
24226
  }
23821
24227
  },
@@ -24156,6 +24562,10 @@ $.fn.toast.settings = {
24156
24562
  unclickable : 'unclickable'
24157
24563
  },
24158
24564
 
24565
+ text: {
24566
+ close : 'Close'
24567
+ },
24568
+
24159
24569
  icons : {
24160
24570
  info : 'info',
24161
24571
  success : 'checkmark',
@@ -24215,7 +24625,7 @@ $.extend( $.easing, {
24215
24625
  })( jQuery, window, document );
24216
24626
 
24217
24627
  /*!
24218
- * # Fomantic-UI - Transition
24628
+ * # Fomantic-UI 2.9.0-beta.100 - Transition
24219
24629
  * http://github.com/fomantic/Fomantic-UI/
24220
24630
  *
24221
24631
  *
@@ -25313,7 +25723,7 @@ $.fn.transition.settings = {
25313
25723
 
25314
25724
  // possible errors
25315
25725
  error: {
25316
- noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.',
25726
+ noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production.',
25317
25727
  repeated : 'That animation is already occurring, cancelling repeated animation',
25318
25728
  method : 'The method you called is not defined',
25319
25729
  support : 'This browser does not support CSS animations'
@@ -25325,7 +25735,7 @@ $.fn.transition.settings = {
25325
25735
  })( jQuery, window, document );
25326
25736
 
25327
25737
  /*!
25328
- * # Fomantic-UI - API
25738
+ * # Fomantic-UI 2.9.0-beta.100 - API
25329
25739
  * http://github.com/fomantic/Fomantic-UI/
25330
25740
  *
25331
25741
  *
@@ -25458,7 +25868,7 @@ $.api = $.fn.api = function(parameters) {
25458
25868
  response = JSON.parse(response);
25459
25869
  }
25460
25870
  catch(e) {
25461
- // isnt json string
25871
+ // isn't json string
25462
25872
  }
25463
25873
  }
25464
25874
  return response;
@@ -25474,8 +25884,8 @@ $.api = $.fn.api = function(parameters) {
25474
25884
  module.error(error.noStorage);
25475
25885
  return;
25476
25886
  }
25477
- response = sessionStorage.getItem(url);
25478
- module.debug('Using cached response', url, response);
25887
+ response = sessionStorage.getItem(url + module.get.normalizedData());
25888
+ module.debug('Using cached response', url, settings.data, response);
25479
25889
  response = module.decode.json(response);
25480
25890
  return response;
25481
25891
  }
@@ -25493,8 +25903,8 @@ $.api = $.fn.api = function(parameters) {
25493
25903
  if( $.isPlainObject(response) ) {
25494
25904
  response = JSON.stringify(response);
25495
25905
  }
25496
- sessionStorage.setItem(url, response);
25497
- module.verbose('Storing cached response for url', url, response);
25906
+ sessionStorage.setItem(url + module.get.normalizedData(), response);
25907
+ module.verbose('Storing cached response for url', url, settings.data, response);
25498
25908
  }
25499
25909
  },
25500
25910
 
@@ -25660,10 +26070,6 @@ $.api = $.fn.api = function(parameters) {
25660
26070
  cancelled: function() {
25661
26071
  return (module.cancelled || false);
25662
26072
  },
25663
- succesful: function() {
25664
- module.verbose('This behavior will be deleted due to typo. Use "was successful" instead.');
25665
- return module.was.successful();
25666
- },
25667
26073
  successful: function() {
25668
26074
  return (module.request && module.request.state() == 'resolved');
25669
26075
  },
@@ -25755,25 +26161,29 @@ $.api = $.fn.api = function(parameters) {
25755
26161
  },
25756
26162
  formData: function(data) {
25757
26163
  var
25758
- canSerialize = ($.fn.serializeObject !== undefined),
25759
- formData = (canSerialize)
25760
- ? $form.serializeObject()
25761
- : $form.serialize(),
26164
+ formData = {},
25762
26165
  hasOtherData
25763
26166
  ;
25764
26167
  data = data || settings.data;
25765
26168
  hasOtherData = $.isPlainObject(data);
25766
26169
 
25767
- if(hasOtherData) {
25768
- if(canSerialize) {
25769
- module.debug('Extending existing data with form data', data, formData);
25770
- data = $.extend(true, {}, data, formData);
25771
- }
25772
- else {
25773
- module.error(error.missingSerialize);
25774
- module.debug('Cant extend data. Replacing data with form data', data, formData);
25775
- data = formData;
26170
+ $.each($form.serializeArray(), function (i, element) {
26171
+ var node = formData[element.name];
26172
+
26173
+ if ('undefined' !== typeof node && node !== null) {
26174
+ if (Array.isArray(node)) {
26175
+ node.push(element.value);
26176
+ } else {
26177
+ formData[element.name] = [node, element.value];
26178
+ }
26179
+ } else {
26180
+ formData[element.name] = element.value;
25776
26181
  }
26182
+ });
26183
+
26184
+ if(hasOtherData) {
26185
+ module.debug('Extending existing data with form data', data, formData);
26186
+ data = $.extend(true, {}, data, formData);
25777
26187
  }
25778
26188
  else {
25779
26189
  module.debug('Adding form data', formData);
@@ -26024,6 +26434,9 @@ $.api = $.fn.api = function(parameters) {
26024
26434
  },
26025
26435
 
26026
26436
  get: {
26437
+ normalizedData: function(){
26438
+ return typeof settings.data === "string" ? settings.data : JSON.stringify(settings.data, Object.keys(settings.data).sort());
26439
+ },
26027
26440
  responseFromXHR: function(xhr) {
26028
26441
  return $.isPlainObject(xhr)
26029
26442
  ? (module.is.expectingJSON())
@@ -26467,7 +26880,6 @@ $.api.settings = {
26467
26880
  legacyParameters : 'You are using legacy API success callback names',
26468
26881
  method : 'The method you called is not defined',
26469
26882
  missingAction : 'API action used but no url was defined',
26470
- missingSerialize : 'jquery-serialize-object is required to add form data to an existing data object',
26471
26883
  missingURL : 'No URL specified for api event',
26472
26884
  noReturnedValue : 'The beforeSend callback must return a settings object, beforeSend ignored.',
26473
26885
  noStorage : 'Caching responses locally requires session storage',
@@ -26503,7 +26915,7 @@ $.api.settings = {
26503
26915
  })( jQuery, window, document );
26504
26916
 
26505
26917
  /*!
26506
- * # Fomantic-UI - State
26918
+ * # Fomantic-UI 2.9.0-beta.100 - State
26507
26919
  * http://github.com/fomantic/Fomantic-UI/
26508
26920
  *
26509
26921
  *
@@ -27215,7 +27627,7 @@ $.fn.state.settings = {
27215
27627
  })( jQuery, window, document );
27216
27628
 
27217
27629
  /*!
27218
- * # Fomantic-UI - Visibility
27630
+ * # Fomantic-UI 2.9.0-beta.100 - Visibility
27219
27631
  * http://github.com/fomantic/Fomantic-UI/
27220
27632
  *
27221
27633
  *
@@ -28453,7 +28865,7 @@ $.fn.visibility.settings = {
28453
28865
  // callback should only occur one time
28454
28866
  once : true,
28455
28867
 
28456
- // callback should fire continuously whe evaluates to true
28868
+ // callback should fire continuously when evaluates to true
28457
28869
  continuous : false,
28458
28870
 
28459
28871
  // offset to use with scroll top