@ntlab/ntjs-assets 1.1.0 → 1.1.2

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 (165) hide show
  1. package/assets/js/jquery/jquery.js +118 -109
  2. package/assets/js/jquery/jquery.min.js +2 -2
  3. package/assets/js/jquery/jquery.min.map +1 -1
  4. package/assets/js/semantic-ui/components/accordion.css +1 -1
  5. package/assets/js/semantic-ui/components/accordion.js +1 -1
  6. package/assets/js/semantic-ui/components/accordion.min.css +1 -1
  7. package/assets/js/semantic-ui/components/accordion.min.js +3 -3
  8. package/assets/js/semantic-ui/components/ad.css +1 -1
  9. package/assets/js/semantic-ui/components/ad.min.css +1 -1
  10. package/assets/js/semantic-ui/components/api.js +1 -1
  11. package/assets/js/semantic-ui/components/api.min.js +3 -3
  12. package/assets/js/semantic-ui/components/breadcrumb.css +1 -1
  13. package/assets/js/semantic-ui/components/breadcrumb.min.css +1 -1
  14. package/assets/js/semantic-ui/components/button.css +29 -2
  15. package/assets/js/semantic-ui/components/button.min.css +2 -2
  16. package/assets/js/semantic-ui/components/calendar.css +3 -3
  17. package/assets/js/semantic-ui/components/calendar.js +10 -12
  18. package/assets/js/semantic-ui/components/calendar.min.css +2 -2
  19. package/assets/js/semantic-ui/components/calendar.min.js +4 -4
  20. package/assets/js/semantic-ui/components/card.css +74 -2
  21. package/assets/js/semantic-ui/components/card.min.css +2 -2
  22. package/assets/js/semantic-ui/components/checkbox.css +46 -4
  23. package/assets/js/semantic-ui/components/checkbox.js +1 -1
  24. package/assets/js/semantic-ui/components/checkbox.min.css +2 -2
  25. package/assets/js/semantic-ui/components/checkbox.min.js +3 -3
  26. package/assets/js/semantic-ui/components/comment.css +1 -1
  27. package/assets/js/semantic-ui/components/comment.min.css +1 -1
  28. package/assets/js/semantic-ui/components/container.css +3 -4
  29. package/assets/js/semantic-ui/components/container.min.css +2 -2
  30. package/assets/js/semantic-ui/components/dimmer.css +1 -1
  31. package/assets/js/semantic-ui/components/dimmer.js +9 -12
  32. package/assets/js/semantic-ui/components/dimmer.min.css +1 -1
  33. package/assets/js/semantic-ui/components/dimmer.min.js +4 -4
  34. package/assets/js/semantic-ui/components/divider.css +1 -1
  35. package/assets/js/semantic-ui/components/divider.min.css +1 -1
  36. package/assets/js/semantic-ui/components/dropdown.css +72 -3
  37. package/assets/js/semantic-ui/components/dropdown.js +193 -101
  38. package/assets/js/semantic-ui/components/dropdown.min.css +2 -2
  39. package/assets/js/semantic-ui/components/dropdown.min.js +4 -4
  40. package/assets/js/semantic-ui/components/embed.css +1 -1
  41. package/assets/js/semantic-ui/components/embed.js +1 -1
  42. package/assets/js/semantic-ui/components/embed.min.css +1 -1
  43. package/assets/js/semantic-ui/components/embed.min.js +3 -3
  44. package/assets/js/semantic-ui/components/feed.css +1 -1
  45. package/assets/js/semantic-ui/components/feed.min.css +1 -1
  46. package/assets/js/semantic-ui/components/flag.css +1 -1
  47. package/assets/js/semantic-ui/components/flag.min.css +1 -1
  48. package/assets/js/semantic-ui/components/form.css +46 -5
  49. package/assets/js/semantic-ui/components/form.js +99 -61
  50. package/assets/js/semantic-ui/components/form.min.css +2 -2
  51. package/assets/js/semantic-ui/components/form.min.js +4 -4
  52. package/assets/js/semantic-ui/components/grid.css +14 -7
  53. package/assets/js/semantic-ui/components/grid.min.css +2 -2
  54. package/assets/js/semantic-ui/components/header.css +10 -5
  55. package/assets/js/semantic-ui/components/header.min.css +2 -2
  56. package/assets/js/semantic-ui/components/icon.css +237 -65
  57. package/assets/js/semantic-ui/components/icon.min.css +2 -2
  58. package/assets/js/semantic-ui/components/image.css +1 -1
  59. package/assets/js/semantic-ui/components/image.min.css +1 -1
  60. package/assets/js/semantic-ui/components/input.css +2 -1
  61. package/assets/js/semantic-ui/components/input.min.css +2 -2
  62. package/assets/js/semantic-ui/components/item.css +1 -1
  63. package/assets/js/semantic-ui/components/item.min.css +1 -1
  64. package/assets/js/semantic-ui/components/label.css +1 -1
  65. package/assets/js/semantic-ui/components/label.min.css +1 -1
  66. package/assets/js/semantic-ui/components/list.css +1 -1
  67. package/assets/js/semantic-ui/components/list.min.css +1 -1
  68. package/assets/js/semantic-ui/components/loader.css +41 -37
  69. package/assets/js/semantic-ui/components/loader.min.css +2 -2
  70. package/assets/js/semantic-ui/components/menu.css +8 -6
  71. package/assets/js/semantic-ui/components/menu.min.css +1 -1
  72. package/assets/js/semantic-ui/components/message.css +50 -3
  73. package/assets/js/semantic-ui/components/message.min.css +2 -2
  74. package/assets/js/semantic-ui/components/modal.css +19 -8
  75. package/assets/js/semantic-ui/components/modal.js +260 -17
  76. package/assets/js/semantic-ui/components/modal.min.css +2 -2
  77. package/assets/js/semantic-ui/components/modal.min.js +4 -4
  78. package/assets/js/semantic-ui/components/nag.css +168 -16
  79. package/assets/js/semantic-ui/components/nag.js +131 -65
  80. package/assets/js/semantic-ui/components/nag.min.css +2 -2
  81. package/assets/js/semantic-ui/components/nag.min.js +4 -4
  82. package/assets/js/semantic-ui/components/placeholder.css +1 -1
  83. package/assets/js/semantic-ui/components/placeholder.min.css +1 -1
  84. package/assets/js/semantic-ui/components/popup.css +4 -2
  85. package/assets/js/semantic-ui/components/popup.js +5 -5
  86. package/assets/js/semantic-ui/components/popup.min.css +2 -2
  87. package/assets/js/semantic-ui/components/popup.min.js +4 -4
  88. package/assets/js/semantic-ui/components/progress.css +18 -10
  89. package/assets/js/semantic-ui/components/progress.js +9 -11
  90. package/assets/js/semantic-ui/components/progress.min.css +2 -2
  91. package/assets/js/semantic-ui/components/progress.min.js +4 -4
  92. package/assets/js/semantic-ui/components/rail.css +1 -1
  93. package/assets/js/semantic-ui/components/rail.min.css +1 -1
  94. package/assets/js/semantic-ui/components/rating.css +18 -33
  95. package/assets/js/semantic-ui/components/rating.js +1 -1
  96. package/assets/js/semantic-ui/components/rating.min.css +2 -2
  97. package/assets/js/semantic-ui/components/rating.min.js +3 -3
  98. package/assets/js/semantic-ui/components/reset.css +2 -3
  99. package/assets/js/semantic-ui/components/reset.min.css +2 -2
  100. package/assets/js/semantic-ui/components/reveal.css +1 -1
  101. package/assets/js/semantic-ui/components/reveal.min.css +1 -1
  102. package/assets/js/semantic-ui/components/search.css +1 -1
  103. package/assets/js/semantic-ui/components/search.js +15 -13
  104. package/assets/js/semantic-ui/components/search.min.css +1 -1
  105. package/assets/js/semantic-ui/components/search.min.js +4 -4
  106. package/assets/js/semantic-ui/components/segment.css +34 -2
  107. package/assets/js/semantic-ui/components/segment.min.css +2 -2
  108. package/assets/js/semantic-ui/components/shape.css +1 -1
  109. package/assets/js/semantic-ui/components/shape.js +1 -1
  110. package/assets/js/semantic-ui/components/shape.min.css +1 -1
  111. package/assets/js/semantic-ui/components/shape.min.js +3 -3
  112. package/assets/js/semantic-ui/components/sidebar.css +1 -1
  113. package/assets/js/semantic-ui/components/sidebar.js +1 -1
  114. package/assets/js/semantic-ui/components/sidebar.min.css +1 -1
  115. package/assets/js/semantic-ui/components/sidebar.min.js +3 -3
  116. package/assets/js/semantic-ui/components/site.css +2 -2
  117. package/assets/js/semantic-ui/components/site.js +1 -1
  118. package/assets/js/semantic-ui/components/site.min.css +2 -2
  119. package/assets/js/semantic-ui/components/site.min.js +3 -3
  120. package/assets/js/semantic-ui/components/slider.css +3 -1
  121. package/assets/js/semantic-ui/components/slider.js +56 -32
  122. package/assets/js/semantic-ui/components/slider.min.css +1 -1
  123. package/assets/js/semantic-ui/components/slider.min.js +4 -4
  124. package/assets/js/semantic-ui/components/state.js +1 -1
  125. package/assets/js/semantic-ui/components/state.min.js +3 -3
  126. package/assets/js/semantic-ui/components/statistic.css +1 -1
  127. package/assets/js/semantic-ui/components/statistic.min.css +1 -1
  128. package/assets/js/semantic-ui/components/step.css +1 -1
  129. package/assets/js/semantic-ui/components/step.min.css +1 -1
  130. package/assets/js/semantic-ui/components/sticky.css +1 -2
  131. package/assets/js/semantic-ui/components/sticky.js +1 -1
  132. package/assets/js/semantic-ui/components/sticky.min.css +2 -2
  133. package/assets/js/semantic-ui/components/sticky.min.js +3 -3
  134. package/assets/js/semantic-ui/components/tab.css +1 -1
  135. package/assets/js/semantic-ui/components/tab.js +1 -1
  136. package/assets/js/semantic-ui/components/tab.min.css +1 -1
  137. package/assets/js/semantic-ui/components/tab.min.js +3 -3
  138. package/assets/js/semantic-ui/components/table.css +6 -2
  139. package/assets/js/semantic-ui/components/table.min.css +2 -2
  140. package/assets/js/semantic-ui/components/text.css +1 -1
  141. package/assets/js/semantic-ui/components/text.min.css +1 -1
  142. package/assets/js/semantic-ui/components/toast.css +97 -10
  143. package/assets/js/semantic-ui/components/toast.js +27 -7
  144. package/assets/js/semantic-ui/components/toast.min.css +2 -2
  145. package/assets/js/semantic-ui/components/toast.min.js +4 -4
  146. package/assets/js/semantic-ui/components/transition.css +1 -1
  147. package/assets/js/semantic-ui/components/transition.js +2 -2
  148. package/assets/js/semantic-ui/components/transition.min.css +1 -1
  149. package/assets/js/semantic-ui/components/transition.min.js +3 -3
  150. package/assets/js/semantic-ui/components/visibility.js +2 -2
  151. package/assets/js/semantic-ui/components/visibility.min.js +3 -3
  152. package/assets/js/semantic-ui/semantic.css +1151 -247
  153. package/assets/js/semantic-ui/semantic.js +835 -357
  154. package/assets/js/semantic-ui/semantic.min.css +4 -397
  155. package/assets/js/semantic-ui/semantic.min.js +4 -4
  156. package/assets/js/socket.io/socket.io.esm.min.js +7 -0
  157. package/assets/js/socket.io/socket.io.esm.min.js.map +1 -0
  158. package/assets/js/socket.io/socket.io.js +4440 -6084
  159. package/assets/js/socket.io/socket.io.js.map +1 -1
  160. package/assets/js/socket.io/socket.io.min.js +7 -7
  161. package/assets/js/socket.io/socket.io.min.js.map +1 -1
  162. package/assets/js/socket.io/socket.io.msgpack.min.js +7 -7
  163. package/assets/js/socket.io/socket.io.msgpack.min.js.map +1 -1
  164. package/cdn.json +4 -4
  165. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- /*
2
- * # Fomantic UI - 2.8.6
1
+ /*
2
+ * # Fomantic UI - 2.8.8
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.8.8 - 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.8.8 - 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
  }
@@ -948,15 +936,11 @@ $.fn.form = function(parameters) {
948
936
  $fieldGroup = $field.closest($group),
949
937
  validationRules = module.get.validation($field)
950
938
  ;
951
- if( $fieldGroup.hasClass(className.error) ) {
939
+ if(validationRules && (settings.on == 'blur' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) )) {
952
940
  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 );
941
+ module.validate.field( validationRules );
942
+ if(!settings.inline) {
943
+ module.validate.form(false,true);
960
944
  }
961
945
  }
962
946
  },
@@ -969,7 +953,7 @@ $.fn.form = function(parameters) {
969
953
  if(validationRules && (settings.on == 'change' || ( $fieldGroup.hasClass(className.error) && settings.revalidate) )) {
970
954
  clearTimeout(module.timer);
971
955
  module.timer = setTimeout(function() {
972
- module.debug('Revalidating field', $field, module.get.validation($field));
956
+ module.debug('Revalidating field', $field, validationRules);
973
957
  module.validate.field( validationRules );
974
958
  if(!settings.inline) {
975
959
  module.validate.form(false,true);
@@ -1031,15 +1015,19 @@ $.fn.form = function(parameters) {
1031
1015
  fullFields = {}
1032
1016
  ;
1033
1017
  $.each(fields, function(name, rules) {
1034
- if(typeof rules == 'string') {
1035
- rules = [rules];
1018
+ if (!Array.isArray(rules) && typeof rules === 'object') {
1019
+ fullFields[name] = rules;
1020
+ } else {
1021
+ if (typeof rules == 'string') {
1022
+ rules = [rules];
1023
+ }
1024
+ fullFields[name] = {
1025
+ rules: []
1026
+ };
1027
+ $.each(rules, function (index, rule) {
1028
+ fullFields[name].rules.push({type: rule});
1029
+ });
1036
1030
  }
1037
- fullFields[name] = {
1038
- rules: []
1039
- };
1040
- $.each(rules, function(index, rule) {
1041
- fullFields[name].rules.push({ type: rule });
1042
- });
1043
1031
  });
1044
1032
  return fullFields;
1045
1033
  },
@@ -1055,8 +1043,23 @@ $.fn.form = function(parameters) {
1055
1043
  requiresValue = (prompt.search('{value}') !== -1),
1056
1044
  requiresName = (prompt.search('{name}') !== -1),
1057
1045
  $label,
1058
- name
1059
- ;
1046
+ name,
1047
+ parts,
1048
+ suffixPrompt
1049
+ ;
1050
+ if(ancillary && ancillary.indexOf('..') >= 0) {
1051
+ parts = ancillary.split('..', 2);
1052
+ if(!rule.prompt) {
1053
+ suffixPrompt = (
1054
+ parts[0] === '' ? settings.prompt.maxValue.replace(/\{ruleValue\}/g,'{max}') :
1055
+ parts[1] === '' ? settings.prompt.minValue.replace(/\{ruleValue\}/g,'{min}') :
1056
+ settings.prompt.range
1057
+ );
1058
+ prompt += suffixPrompt.replace(/\{name\}/g, ' ' + settings.text.and);
1059
+ }
1060
+ prompt = prompt.replace(/\{min\}/g, parts[0]);
1061
+ prompt = prompt.replace(/\{max\}/g, parts[1]);
1062
+ }
1060
1063
  if(requiresValue) {
1061
1064
  prompt = prompt.replace(/\{value\}/g, $field.val());
1062
1065
  }
@@ -1092,7 +1095,7 @@ $.fn.form = function(parameters) {
1092
1095
  }
1093
1096
  else {
1094
1097
  // 2.x
1095
- if(parameters.fields && module.is.shorthandFields(parameters.fields)) {
1098
+ if(parameters.fields) {
1096
1099
  parameters.fields = module.get.fieldsFromShorthand(parameters.fields);
1097
1100
  }
1098
1101
  settings = $.extend(true, {}, $.fn.form.settings, parameters);
@@ -1120,7 +1123,7 @@ $.fn.form = function(parameters) {
1120
1123
  instance = $module.data(moduleNamespace);
1121
1124
 
1122
1125
  // refresh selector cache
1123
- module.refresh();
1126
+ (instance || module).refresh();
1124
1127
  },
1125
1128
  field: function(identifier) {
1126
1129
  module.verbose('Finding field with identifier', identifier);
@@ -1366,16 +1369,7 @@ $.fn.form = function(parameters) {
1366
1369
  module.debug('Adding rules', newValidation.rules, validation);
1367
1370
  },
1368
1371
  fields: function(fields) {
1369
- var
1370
- newValidation
1371
- ;
1372
- if(fields && module.is.shorthandFields(fields)) {
1373
- newValidation = module.get.fieldsFromShorthand(fields);
1374
- }
1375
- else {
1376
- newValidation = fields;
1377
- }
1378
- validation = $.extend({}, validation, newValidation);
1372
+ validation = $.extend({}, validation, module.get.fieldsFromShorthand(fields));
1379
1373
  },
1380
1374
  prompt: function(identifier, errors, internal) {
1381
1375
  var
@@ -1669,6 +1663,14 @@ $.fn.form = function(parameters) {
1669
1663
  }
1670
1664
  }
1671
1665
  });
1666
+ },
1667
+ optional: function(identifier, bool) {
1668
+ bool = (bool !== false);
1669
+ $.each(validation, function(fieldName, field) {
1670
+ if (identifier == fieldName || identifier == field.identifier) {
1671
+ field.optional = bool;
1672
+ }
1673
+ });
1672
1674
  }
1673
1675
  },
1674
1676
 
@@ -1705,6 +1707,24 @@ $.fn.form = function(parameters) {
1705
1707
  if(event && $module.data('moduleApi') !== undefined) {
1706
1708
  event.stopImmediatePropagation();
1707
1709
  }
1710
+ if(settings.errorFocus) {
1711
+ var focusElement, hasTabIndex = true;
1712
+ if (typeof settings.errorFocus === 'string') {
1713
+ focusElement = $(settings.errorFocus);
1714
+ hasTabIndex = focusElement.is('[tabindex]');
1715
+ // to be able to focus/scroll into non input elements we need a tabindex
1716
+ if (!hasTabIndex) {
1717
+ focusElement.attr('tabindex',-1);
1718
+ }
1719
+ } else {
1720
+ focusElement = $group.filter('.' + className.error).first().find(selector.field);
1721
+ }
1722
+ focusElement.focus();
1723
+ // only remove tabindex if it was dynamically created above
1724
+ if (!hasTabIndex){
1725
+ focusElement.removeAttr('tabindex');
1726
+ }
1727
+ }
1708
1728
  if(ignoreCallbacks !== true) {
1709
1729
  return settings.onFailure.call(element, formErrors, values);
1710
1730
  }
@@ -1794,7 +1814,7 @@ $.fn.form = function(parameters) {
1794
1814
  // cast to string avoiding encoding special values
1795
1815
  value = (value === undefined || value === '' || value === null)
1796
1816
  ? ''
1797
- : (settings.shouldTrim) ? String(value + '').trim() : String(value + '')
1817
+ : (settings.shouldTrim && rule.shouldTrim !== false) || rule.shouldTrim ? String(value + '').trim() : String(value + '')
1798
1818
  ;
1799
1819
  return ruleFunction.call(field, value, ancillary, $module);
1800
1820
  }
@@ -2010,6 +2030,7 @@ $.fn.form.settings = {
2010
2030
 
2011
2031
  autoCheckRequired : false,
2012
2032
  preventLeaving : false,
2033
+ errorFocus : false,
2013
2034
  dateHandling : 'date', // 'date', 'input', 'formatter'
2014
2035
 
2015
2036
  onValid : function() {},
@@ -2038,12 +2059,16 @@ $.fn.form.settings = {
2038
2059
  },
2039
2060
 
2040
2061
  text: {
2062
+ and : 'and',
2041
2063
  unspecifiedRule : 'Please enter a valid value',
2042
2064
  unspecifiedField : 'This field',
2043
2065
  leavingMessage : 'There are unsaved changes on this page which will be discarded if you continue.'
2044
2066
  },
2045
2067
 
2046
2068
  prompt: {
2069
+ range : '{name} must be in a range from {min} to {max}',
2070
+ maxValue : '{name} must have a maximum value of {ruleValue}',
2071
+ minValue : '{name} must have a minimum value of {ruleValue}',
2047
2072
  empty : '{name} must have a value',
2048
2073
  checked : '{name} must be checked',
2049
2074
  email : '{name} must be a valid e-mail',
@@ -2075,9 +2100,9 @@ $.fn.form.settings = {
2075
2100
  selector : {
2076
2101
  checkbox : 'input[type="checkbox"], input[type="radio"]',
2077
2102
  clear : '.clear',
2078
- field : 'input:not(.search), textarea, select',
2103
+ field : 'input:not(.search):not([type="file"]), textarea, select',
2079
2104
  group : '.field',
2080
- input : 'input',
2105
+ input : 'input:not([type="file"])',
2081
2106
  message : '.error.message',
2082
2107
  prompt : '.prompt.label',
2083
2108
  radio : 'input[type="radio"]',
@@ -2206,11 +2231,24 @@ $.fn.form.settings = {
2206
2231
  }
2207
2232
  return value.match( new RegExp(regExp, flags) );
2208
2233
  },
2209
-
2234
+ minValue: function(value, range) {
2235
+ return $.fn.form.settings.rules.range(value, range+'..', 'number');
2236
+ },
2237
+ maxValue: function(value, range) {
2238
+ return $.fn.form.settings.rules.range(value, '..'+range, 'number');
2239
+ },
2210
2240
  // is valid integer or matches range
2211
2241
  integer: function(value, range) {
2242
+ return $.fn.form.settings.rules.range(value, range, 'integer');
2243
+ },
2244
+ range: function(value, range, regExp) {
2245
+ if(typeof regExp == "string") {
2246
+ regExp = $.fn.form.settings.regExp[regExp];
2247
+ }
2248
+ if(!(regExp instanceof RegExp)) {
2249
+ regExp = $.fn.form.settings.regExp.integer;
2250
+ }
2212
2251
  var
2213
- intRegExp = $.fn.form.settings.regExp.integer,
2214
2252
  min,
2215
2253
  max,
2216
2254
  parts
@@ -2219,34 +2257,34 @@ $.fn.form.settings = {
2219
2257
  // do nothing
2220
2258
  }
2221
2259
  else if(range.indexOf('..') == -1) {
2222
- if(intRegExp.test(range)) {
2260
+ if(regExp.test(range)) {
2223
2261
  min = max = range - 0;
2224
2262
  }
2225
2263
  }
2226
2264
  else {
2227
2265
  parts = range.split('..', 2);
2228
- if(intRegExp.test(parts[0])) {
2266
+ if(regExp.test(parts[0])) {
2229
2267
  min = parts[0] - 0;
2230
2268
  }
2231
- if(intRegExp.test(parts[1])) {
2269
+ if(regExp.test(parts[1])) {
2232
2270
  max = parts[1] - 0;
2233
2271
  }
2234
2272
  }
2235
2273
  return (
2236
- intRegExp.test(value) &&
2274
+ regExp.test(value) &&
2237
2275
  (min === undefined || value >= min) &&
2238
2276
  (max === undefined || value <= max)
2239
2277
  );
2240
2278
  },
2241
2279
 
2242
2280
  // is valid number (with decimal)
2243
- decimal: function(value) {
2244
- return $.fn.form.settings.regExp.decimal.test(value);
2281
+ decimal: function(value, range) {
2282
+ return $.fn.form.settings.rules.range(value, range, 'decimal');
2245
2283
  },
2246
2284
 
2247
2285
  // is valid number
2248
- number: function(value) {
2249
- return $.fn.form.settings.regExp.number.test(value);
2286
+ number: function(value, range) {
2287
+ return $.fn.form.settings.rules.range(value, range, 'number');
2250
2288
  },
2251
2289
 
2252
2290
  // is value (case insensitive)
@@ -2451,8 +2489,8 @@ $.fn.form.settings = {
2451
2489
  return;
2452
2490
  }
2453
2491
 
2454
- // allow dashes in card
2455
- cardNumber = cardNumber.replace(/[\-]/g, '');
2492
+ // allow dashes and spaces in card
2493
+ cardNumber = cardNumber.replace(/[\s\-]/g, '');
2456
2494
 
2457
2495
  // verify card types
2458
2496
  if(requiredTypes) {
@@ -2537,7 +2575,7 @@ $.fn.form.settings = {
2537
2575
  })( jQuery, window, document );
2538
2576
 
2539
2577
  /*!
2540
- * # Fomantic-UI - Accordion
2578
+ * # Fomantic-UI 2.8.8 - Accordion
2541
2579
  * http://github.com/fomantic/Fomantic-UI/
2542
2580
  *
2543
2581
  *
@@ -3156,7 +3194,7 @@ $.extend( $.easing, {
3156
3194
 
3157
3195
 
3158
3196
  /*!
3159
- * # Fomantic-UI - Calendar
3197
+ * # Fomantic-UI 2.8.8 - Calendar
3160
3198
  * http://github.com/fomantic/Fomantic-UI/
3161
3199
  *
3162
3200
  *
@@ -3534,6 +3572,7 @@ $.fn.calendar = function(parameters) {
3534
3572
  cell.data(metadata.date, cellDate);
3535
3573
  var adjacent = isDay && cellDate.getMonth() !== ((month + 12) % 12);
3536
3574
  var disabled = (!settings.selectAdjacentDays && adjacent) || !module.helper.isDateInRange(cellDate, mode) || settings.isDisabled(cellDate, mode) || module.helper.isDisabled(cellDate, mode) || !module.helper.isEnabled(cellDate, mode);
3575
+ var eventDate;
3537
3576
  if (disabled) {
3538
3577
  var disabledDate = module.helper.findDayAsObject(cellDate, mode, settings.disabledDates);
3539
3578
  if (disabledDate !== null && disabledDate[metadata.message]) {
@@ -3547,7 +3586,7 @@ $.fn.calendar = function(parameters) {
3547
3586
  }
3548
3587
  }
3549
3588
  } else {
3550
- var eventDate = module.helper.findDayAsObject(cellDate, mode, settings.eventDates);
3589
+ eventDate = module.helper.findDayAsObject(cellDate, mode, settings.eventDates);
3551
3590
  if (eventDate !== null) {
3552
3591
  cell.addClass(eventDate[metadata.class] || settings.eventClass);
3553
3592
  if (eventDate[metadata.message]) {
@@ -3564,9 +3603,9 @@ $.fn.calendar = function(parameters) {
3564
3603
  }
3565
3604
  var active = module.helper.dateEqual(cellDate, date, mode);
3566
3605
  var isToday = module.helper.dateEqual(cellDate, today, mode);
3567
- cell.toggleClass(className.adjacentCell, adjacent);
3606
+ cell.toggleClass(className.adjacentCell, adjacent && !eventDate);
3568
3607
  cell.toggleClass(className.disabledCell, disabled);
3569
- cell.toggleClass(className.activeCell, active && !adjacent);
3608
+ cell.toggleClass(className.activeCell, active && !(adjacent && disabled));
3570
3609
  if (!isHour && !isMinute) {
3571
3610
  cell.toggleClass(className.todayCell, !adjacent && isToday);
3572
3611
  }
@@ -4128,7 +4167,7 @@ $.fn.calendar = function(parameters) {
4128
4167
 
4129
4168
  helper: {
4130
4169
  isDisabled: function(date, mode) {
4131
- return (mode === 'day' || mode === 'month' || mode === 'year') && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
4170
+ return (mode === 'day' || mode === 'month' || mode === 'year') && ((mode === 'day' && settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
4132
4171
  if(typeof d === 'string') {
4133
4172
  d = module.helper.sanitiseDate(d);
4134
4173
  }
@@ -4230,14 +4269,11 @@ $.fn.calendar = function(parameters) {
4230
4269
  return null;
4231
4270
  },
4232
4271
  sanitiseDate: function (date) {
4233
- if (!date) {
4234
- return undefined;
4235
- }
4236
4272
  if (!(date instanceof Date)) {
4237
4273
  date = parser.date('' + date, settings);
4238
4274
  }
4239
- if (!date || date === null || isNaN(date.getTime())) {
4240
- return undefined;
4275
+ if (!date || isNaN(date.getTime())) {
4276
+ return null;
4241
4277
  }
4242
4278
  return date;
4243
4279
  },
@@ -4624,11 +4660,11 @@ $.fn.calendar.settings = {
4624
4660
  if (text.length === 0) {
4625
4661
  return null;
4626
4662
  }
4627
- if(text.match(/^[0-9]{4}[\/\-\.][0-9]{2}[\/\-\.][0-9]{2}$/)){
4663
+ if(text.match(/^[0-9]{4}[\/\-\.][0-9]{1,2}[\/\-\.][0-9]{1,2}$/)){
4628
4664
  text = text.replace(/[\/\-\.]/g,'/') + ' 00:00:00';
4629
4665
  }
4630
4666
  // Reverse date and month in some cases
4631
- text = settings.monthFirst || !text.match(/^[0-9]{2}[\/\-\.]/) ? text : text.replace(/[\/\-\.]/g,'/').replace(/([0-9]+)\/([0-9]+)/,'$2/$1');
4667
+ text = settings.monthFirst || !text.match(/^[0-9]{1,2}[\/\-\.]/) ? text : text.replace(/[\/\-\.]/g,'/').replace(/([0-9]+)\/([0-9]+)/,'$2/$1');
4632
4668
  var textDate = new Date(text);
4633
4669
  var numberOnly = text.match(/^[0-9]+$/) !== null;
4634
4670
  if(!numberOnly && !isNaN(textDate.getDate())) {
@@ -4931,7 +4967,7 @@ $.fn.calendar.settings = {
4931
4967
  })(jQuery, window, document);
4932
4968
 
4933
4969
  /*!
4934
- * # Fomantic-UI - Checkbox
4970
+ * # Fomantic-UI 2.8.8 - Checkbox
4935
4971
  * http://github.com/fomantic/Fomantic-UI/
4936
4972
  *
4937
4973
  *
@@ -5808,7 +5844,7 @@ $.fn.checkbox.settings = {
5808
5844
  })( jQuery, window, document );
5809
5845
 
5810
5846
  /*!
5811
- * # Fomantic-UI - Dimmer
5847
+ * # Fomantic-UI 2.8.8 - Dimmer
5812
5848
  * http://github.com/fomantic/Fomantic-UI/
5813
5849
  *
5814
5850
  *
@@ -5964,7 +6000,7 @@ $.fn.dimmer = function(parameters) {
5964
6000
 
5965
6001
  event: {
5966
6002
  click: function(event) {
5967
- module.verbose('Determining if event occured on dimmer', event);
6003
+ module.verbose('Determining if event occurred on dimmer', event);
5968
6004
  if( $dimmer.find(event.target).length === 0 || $(event.target).is(selector.content) ) {
5969
6005
  module.hide();
5970
6006
  event.stopImmediatePropagation();
@@ -6064,7 +6100,7 @@ $.fn.dimmer = function(parameters) {
6064
6100
  displayType : settings.useFlex
6065
6101
  ? 'flex'
6066
6102
  : 'block',
6067
- animation : settings.transition + ' in',
6103
+ animation : (settings.transition.showMethod || settings.transition) + ' in',
6068
6104
  queue : false,
6069
6105
  duration : module.get.duration(),
6070
6106
  useFailSafe : true,
@@ -6111,7 +6147,7 @@ $.fn.dimmer = function(parameters) {
6111
6147
  displayType : settings.useFlex
6112
6148
  ? 'flex'
6113
6149
  : 'block',
6114
- animation : settings.transition + ' out',
6150
+ animation : (settings.transition.hideMethod || settings.transition) + ' out',
6115
6151
  queue : false,
6116
6152
  duration : module.get.duration(),
6117
6153
  useFailSafe : true,
@@ -6144,15 +6180,12 @@ $.fn.dimmer = function(parameters) {
6144
6180
  return $dimmer;
6145
6181
  },
6146
6182
  duration: function() {
6147
- if(typeof settings.duration == 'object') {
6148
- if( module.is.active() ) {
6149
- return settings.duration.hide;
6150
- }
6151
- else {
6152
- return settings.duration.show;
6153
- }
6183
+ if( module.is.active() ) {
6184
+ return settings.transition.hideDuration || settings.duration.hide || settings.duration;
6185
+ }
6186
+ else {
6187
+ return settings.transition.showDuration || settings.duration.show || settings.duration;
6154
6188
  }
6155
- return settings.duration;
6156
6189
  }
6157
6190
  },
6158
6191
 
@@ -6562,7 +6595,7 @@ $.fn.dimmer.settings = {
6562
6595
  })( jQuery, window, document );
6563
6596
 
6564
6597
  /*!
6565
- * # Fomantic-UI - Dropdown
6598
+ * # Fomantic-UI 2.8.8 - Dropdown
6566
6599
  * http://github.com/fomantic/Fomantic-UI/
6567
6600
  *
6568
6601
  *
@@ -6650,6 +6683,7 @@ $.fn.dropdown = function(parameters) {
6650
6683
  internalChange = false,
6651
6684
  iconClicked = false,
6652
6685
  element = this,
6686
+ focused = false,
6653
6687
  instance = $module.data(moduleNamespace),
6654
6688
 
6655
6689
  selectActionActive,
@@ -6859,7 +6893,9 @@ $.fn.dropdown = function(parameters) {
6859
6893
  : module.get.query()
6860
6894
  ;
6861
6895
  module.verbose('Searching for query', query);
6862
- if(module.has.minCharacters(query)) {
6896
+ if(settings.fireOnInit === false && module.is.initialLoad()) {
6897
+ module.verbose('Skipping callback on initial load', settings.onSearch);
6898
+ } else if(module.has.minCharacters(query) && settings.onSearch.call(element, query) !== false) {
6863
6899
  module.filter(query);
6864
6900
  }
6865
6901
  else {
@@ -6921,7 +6957,7 @@ $.fn.dropdown = function(parameters) {
6921
6957
  if( !module.has.menu() ) {
6922
6958
  module.create.menu();
6923
6959
  }
6924
- if ( module.is.selection() && module.is.clearable() && !module.has.clearItem() ) {
6960
+ if ( module.is.clearable() && !module.has.clearItem() ) {
6925
6961
  module.verbose('Adding clear icon');
6926
6962
  $clear = $('<i />')
6927
6963
  .addClass('remove icon')
@@ -6932,7 +6968,7 @@ $.fn.dropdown = function(parameters) {
6932
6968
  module.verbose('Adding search input');
6933
6969
  $search = $('<input />')
6934
6970
  .addClass(className.search)
6935
- .prop('autocomplete', 'off')
6971
+ .prop('autocomplete', module.is.chrome() ? 'fomantic-search' : 'off')
6936
6972
  .insertBefore($text)
6937
6973
  ;
6938
6974
  }
@@ -7060,6 +7096,11 @@ $.fn.dropdown = function(parameters) {
7060
7096
  ;
7061
7097
  },
7062
7098
 
7099
+ clearItems: function() {
7100
+ $menu.empty();
7101
+ module.refreshItems();
7102
+ },
7103
+
7063
7104
  toggle: function() {
7064
7105
  module.verbose('Toggling menu visibility');
7065
7106
  if( !module.is.active() ) {
@@ -7075,9 +7116,12 @@ $.fn.dropdown = function(parameters) {
7075
7116
  ? callback
7076
7117
  : function(){}
7077
7118
  ;
7119
+ if ((focused || iconClicked) && module.is.remote() && module.is.noApiCache()) {
7120
+ module.clearItems();
7121
+ }
7078
7122
  if(!module.can.show() && module.is.remote()) {
7079
7123
  module.debug('No API results retrieved, searching before show');
7080
- module.queryRemote(module.get.query(), module.show);
7124
+ module.queryRemote(module.get.query(), module.show, [callback, preventFocus]);
7081
7125
  }
7082
7126
  if( module.can.show() && !module.is.active() ) {
7083
7127
  module.debug('Showing dropdown');
@@ -7112,7 +7156,7 @@ $.fn.dropdown = function(parameters) {
7112
7156
  if(settings.onHide.call(element) !== false) {
7113
7157
  module.animate.hide(function() {
7114
7158
  module.remove.visible();
7115
- // hidding search focus
7159
+ // hiding search focus
7116
7160
  if ( module.is.focusedOnSearch() && preventBlur !== true ) {
7117
7161
  $search.blur();
7118
7162
  }
@@ -7123,6 +7167,7 @@ $.fn.dropdown = function(parameters) {
7123
7167
  module.unbind.intent();
7124
7168
  }
7125
7169
  iconClicked = false;
7170
+ focused = false;
7126
7171
  },
7127
7172
 
7128
7173
  hideOthers: function() {
@@ -7201,6 +7246,7 @@ $.fn.dropdown = function(parameters) {
7201
7246
  if(module.is.multiple()) {
7202
7247
  $module
7203
7248
  .on(clickEvent + eventNamespace, module.event.click)
7249
+ .on(clickEvent + eventNamespace, module.event.search.focus)
7204
7250
  ;
7205
7251
  }
7206
7252
  }
@@ -7330,11 +7376,14 @@ $.fn.dropdown = function(parameters) {
7330
7376
  if(!Array.isArray(preSelected)) {
7331
7377
  preSelected = preSelected && preSelected!=="" ? preSelected.split(settings.delimiter) : [];
7332
7378
  }
7333
- $.each(preSelected,function(index,value){
7334
- $item.filter('[data-value="'+value+'"]')
7335
- .addClass(className.filtered)
7336
- ;
7337
- });
7379
+ if (module.is.multiple()) {
7380
+ $.each(preSelected,function(index,value){
7381
+ $item.filter('[data-value="'+value+'"]')
7382
+ .addClass(className.filtered)
7383
+ ;
7384
+ });
7385
+ }
7386
+ module.focusSearch(true);
7338
7387
  afterFiltered();
7339
7388
  });
7340
7389
  }
@@ -7348,7 +7397,10 @@ $.fn.dropdown = function(parameters) {
7348
7397
  }
7349
7398
  },
7350
7399
 
7351
- queryRemote: function(query, callback) {
7400
+ queryRemote: function(query, callback, callbackParameters) {
7401
+ if(!Array.isArray(callbackParameters)){
7402
+ callbackParameters = [callbackParameters];
7403
+ }
7352
7404
  var
7353
7405
  apiSettings = {
7354
7406
  errorDuration : false,
@@ -7359,11 +7411,15 @@ $.fn.dropdown = function(parameters) {
7359
7411
  },
7360
7412
  onError: function() {
7361
7413
  module.add.message(message.serverError);
7362
- callback();
7414
+ iconClicked = false;
7415
+ focused = false;
7416
+ callback.apply(null, callbackParameters);
7363
7417
  },
7364
7418
  onFailure: function() {
7365
7419
  module.add.message(message.serverError);
7366
- callback();
7420
+ iconClicked = false;
7421
+ focused = false;
7422
+ callback.apply(null, callbackParameters);
7367
7423
  },
7368
7424
  onSuccess : function(response) {
7369
7425
  var
@@ -7380,7 +7436,16 @@ $.fn.dropdown = function(parameters) {
7380
7436
  if(values.length===0 && !settings.allowAdditions) {
7381
7437
  module.add.message(message.noResults);
7382
7438
  }
7383
- callback();
7439
+ else {
7440
+ var value = module.is.multiple() ? module.get.values() : module.get.value();
7441
+ if (value !== '') {
7442
+ module.verbose('Value(s) present after click icon, select value(s) in items');
7443
+ module.set.selected(value, null, null, true);
7444
+ }
7445
+ }
7446
+ iconClicked = false;
7447
+ focused = false;
7448
+ callback.apply(null, callbackParameters);
7384
7449
  }
7385
7450
  }
7386
7451
  ;
@@ -7612,6 +7677,7 @@ $.fn.dropdown = function(parameters) {
7612
7677
  },
7613
7678
  focus: function() {
7614
7679
  if(settings.showOnFocus && !activated && module.is.hidden() && !pageLostFocus) {
7680
+ focused = true;
7615
7681
  module.show();
7616
7682
  }
7617
7683
  },
@@ -7661,7 +7727,8 @@ $.fn.dropdown = function(parameters) {
7661
7727
  if(module.is.multiple()) {
7662
7728
  module.remove.activeLabel();
7663
7729
  }
7664
- if(settings.showOnFocus || (event.type !== 'focus' && event.type !== 'focusin')) {
7730
+ if(!focused && !module.is.active() && (settings.showOnFocus || (event.type !== 'focus' && event.type !== 'focusin'))) {
7731
+ focused = true;
7665
7732
  module.search();
7666
7733
  }
7667
7734
  },
@@ -7706,6 +7773,7 @@ $.fn.dropdown = function(parameters) {
7706
7773
  } else {
7707
7774
  module.toggle();
7708
7775
  }
7776
+ event.stopPropagation();
7709
7777
  }
7710
7778
  },
7711
7779
  text: {
@@ -7745,10 +7813,11 @@ $.fn.dropdown = function(parameters) {
7745
7813
  $label.addClass(className.active);
7746
7814
  }
7747
7815
  settings.onLabelSelect.apply(this, $labels.filter('.' + className.active));
7816
+ event.stopPropagation();
7748
7817
  }
7749
7818
  },
7750
7819
  remove: {
7751
- click: function() {
7820
+ click: function(event) {
7752
7821
  var
7753
7822
  $label = $(this).parent()
7754
7823
  ;
@@ -7760,6 +7829,7 @@ $.fn.dropdown = function(parameters) {
7760
7829
  // remove this label only
7761
7830
  module.remove.activeLabels( $label );
7762
7831
  }
7832
+ event.stopPropagation();
7763
7833
  }
7764
7834
  },
7765
7835
  test: {
@@ -7772,6 +7842,9 @@ $.fn.dropdown = function(parameters) {
7772
7842
  if(module.is.bubbledLabelClick(event) || module.is.bubbledIconClick(event)) {
7773
7843
  return;
7774
7844
  }
7845
+ if (!module.is.multiple() || (module.is.multiple() && !module.is.active())) {
7846
+ focused = true;
7847
+ }
7775
7848
  if( module.determine.eventOnElement(event, toggleBehavior) ) {
7776
7849
  event.preventDefault();
7777
7850
  }
@@ -8392,7 +8465,7 @@ $.fn.dropdown = function(parameters) {
8392
8465
  return count;
8393
8466
  },
8394
8467
  transition: function($subMenu) {
8395
- return (settings.transition == 'auto')
8468
+ return (settings.transition === 'auto')
8396
8469
  ? module.is.upward($subMenu)
8397
8470
  ? 'slide up'
8398
8471
  : 'slide down'
@@ -8455,7 +8528,7 @@ $.fn.dropdown = function(parameters) {
8455
8528
  : value
8456
8529
  ;
8457
8530
  },
8458
- values: function() {
8531
+ values: function(raw) {
8459
8532
  var
8460
8533
  value = module.get.value()
8461
8534
  ;
@@ -8464,7 +8537,7 @@ $.fn.dropdown = function(parameters) {
8464
8537
  }
8465
8538
  return ( !module.has.selectInput() && module.is.multiple() )
8466
8539
  ? (typeof value == 'string') // delimited string
8467
- ? module.escape.htmlEntities(value).split(settings.delimiter)
8540
+ ? (raw ? value : module.escape.htmlEntities(value)).split(settings.delimiter)
8468
8541
  : ''
8469
8542
  : value
8470
8543
  ;
@@ -8508,8 +8581,8 @@ $.fn.dropdown = function(parameters) {
8508
8581
  return ($choice.data(metadata.text) !== undefined)
8509
8582
  ? $choice.data(metadata.text)
8510
8583
  : (preserveHTML)
8511
- ? $choice.html().trim()
8512
- : $choice.text().trim()
8584
+ ? $choice.html() && $choice.html().trim()
8585
+ : $choice.text() && $choice.text().trim()
8513
8586
  ;
8514
8587
  }
8515
8588
  },
@@ -8699,6 +8772,9 @@ $.fn.dropdown = function(parameters) {
8699
8772
  ;
8700
8773
  }
8701
8774
  return $selectedItem;
8775
+ },
8776
+ displayType: function() {
8777
+ return $module.hasClass('column') ? 'flex' : settings.displayType;
8702
8778
  }
8703
8779
  },
8704
8780
 
@@ -8890,7 +8966,7 @@ $.fn.dropdown = function(parameters) {
8890
8966
 
8891
8967
  clear: function(preventChangeTrigger) {
8892
8968
  if(module.is.multiple() && settings.useLabels) {
8893
- module.remove.labels();
8969
+ module.remove.labels($module.find(selector.label), preventChangeTrigger);
8894
8970
  }
8895
8971
  else {
8896
8972
  module.remove.activeItem();
@@ -9253,7 +9329,7 @@ $.fn.dropdown = function(parameters) {
9253
9329
  module.clear();
9254
9330
  module.set.selected(value, $selectedItem);
9255
9331
  },
9256
- selected: function(value, $selectedItem) {
9332
+ selected: function(value, $selectedItem, preventChangeTrigger, keepSearchTerm) {
9257
9333
  var
9258
9334
  isMultiple = module.is.multiple()
9259
9335
  ;
@@ -9315,8 +9391,10 @@ $.fn.dropdown = function(parameters) {
9315
9391
  if(settings.apiSettings && settings.saveRemoteData) {
9316
9392
  module.save.remoteData(selectedText, selectedValue);
9317
9393
  }
9318
- module.set.text(selectedText);
9319
- module.set.value(selectedValue, selectedText, $selected);
9394
+ if (!keepSearchTerm) {
9395
+ module.set.text(selectedText);
9396
+ }
9397
+ module.set.value(selectedValue, selectedText, $selected, preventChangeTrigger);
9320
9398
  $selected
9321
9399
  .addClass(className.active)
9322
9400
  .addClass(className.selected)
@@ -9324,7 +9402,9 @@ $.fn.dropdown = function(parameters) {
9324
9402
  }
9325
9403
  })
9326
9404
  ;
9327
- module.remove.searchTerm();
9405
+ if (!keepSearchTerm) {
9406
+ module.remove.searchTerm();
9407
+ }
9328
9408
  }
9329
9409
  },
9330
9410
 
@@ -9488,7 +9568,7 @@ $.fn.dropdown = function(parameters) {
9488
9568
  },
9489
9569
  value: function(addedValue, addedText, $selectedItem) {
9490
9570
  var
9491
- currentValue = module.get.values(),
9571
+ currentValue = module.get.values(true),
9492
9572
  newValue
9493
9573
  ;
9494
9574
  if(module.has.value(addedValue)) {
@@ -9612,7 +9692,7 @@ $.fn.dropdown = function(parameters) {
9612
9692
  userAddition: function() {
9613
9693
  $item.filter(selector.addition).remove();
9614
9694
  },
9615
- selected: function(value, $selectedItem) {
9695
+ selected: function(value, $selectedItem, preventChangeTrigger) {
9616
9696
  $selectedItem = (settings.allowAdditions)
9617
9697
  ? $selectedItem || module.get.itemWithAdditions(value)
9618
9698
  : $selectedItem || module.get.item(value)
@@ -9631,11 +9711,11 @@ $.fn.dropdown = function(parameters) {
9631
9711
  ;
9632
9712
  if(module.is.multiple()) {
9633
9713
  if(settings.useLabels) {
9634
- module.remove.value(selectedValue, selectedText, $selected);
9714
+ module.remove.value(selectedValue, selectedText, $selected, preventChangeTrigger);
9635
9715
  module.remove.label(selectedValue);
9636
9716
  }
9637
9717
  else {
9638
- module.remove.value(selectedValue, selectedText, $selected);
9718
+ module.remove.value(selectedValue, selectedText, $selected, preventChangeTrigger);
9639
9719
  if(module.get.selectionCount() === 0) {
9640
9720
  module.set.placeholderText();
9641
9721
  }
@@ -9645,7 +9725,7 @@ $.fn.dropdown = function(parameters) {
9645
9725
  }
9646
9726
  }
9647
9727
  else {
9648
- module.remove.value(selectedValue, selectedText, $selected);
9728
+ module.remove.value(selectedValue, selectedText, $selected, preventChangeTrigger);
9649
9729
  }
9650
9730
  $selected
9651
9731
  .removeClass(className.filtered)
@@ -9660,7 +9740,7 @@ $.fn.dropdown = function(parameters) {
9660
9740
  selectedItem: function() {
9661
9741
  $item.removeClass(className.selected);
9662
9742
  },
9663
- value: function(removedValue, removedText, $removedItem) {
9743
+ value: function(removedValue, removedText, $removedItem, preventChangeTrigger) {
9664
9744
  var
9665
9745
  values = module.get.values(),
9666
9746
  newValue
@@ -9682,7 +9762,7 @@ $.fn.dropdown = function(parameters) {
9682
9762
  else {
9683
9763
  settings.onRemove.call(element, removedValue, removedText, $removedItem);
9684
9764
  }
9685
- module.set.value(newValue, removedText, $removedItem);
9765
+ module.set.value(newValue, removedText, $removedItem, preventChangeTrigger);
9686
9766
  module.check.maxSelections();
9687
9767
  },
9688
9768
  arrayValue: function(removedValue, values) {
@@ -9697,8 +9777,9 @@ $.fn.dropdown = function(parameters) {
9697
9777
  },
9698
9778
  label: function(value, shouldAnimate) {
9699
9779
  var
9780
+ escapedValue = module.escape.value(value),
9700
9781
  $labels = $module.find(selector.label),
9701
- $removedLabel = $labels.filter('[data-' + metadata.value + '="' + module.escape.string(settings.ignoreCase ? value.toLowerCase() : value) +'"]')
9782
+ $removedLabel = $labels.filter('[data-' + metadata.value + '="' + module.escape.string(settings.ignoreCase ? escapedValue.toLowerCase() : escapedValue) +'"]')
9702
9783
  ;
9703
9784
  module.verbose('Removing label', $removedLabel);
9704
9785
  $removedLabel.remove();
@@ -9708,7 +9789,7 @@ $.fn.dropdown = function(parameters) {
9708
9789
  module.verbose('Removing active label selections', $activeLabels);
9709
9790
  module.remove.labels($activeLabels);
9710
9791
  },
9711
- labels: function($labels) {
9792
+ labels: function($labels, preventChangeTrigger) {
9712
9793
  $labels = $labels || $module.find(selector.label);
9713
9794
  module.verbose('Removing labels', $labels);
9714
9795
  $labels
@@ -9727,12 +9808,12 @@ $.fn.dropdown = function(parameters) {
9727
9808
  }
9728
9809
  module.remove.message();
9729
9810
  if(isUserValue) {
9730
- module.remove.value(stringValue);
9811
+ module.remove.value(stringValue, stringValue, module.get.item(stringValue), preventChangeTrigger);
9731
9812
  module.remove.label(stringValue);
9732
9813
  }
9733
9814
  else {
9734
9815
  // selected will also remove label
9735
- module.remove.selected(stringValue);
9816
+ module.remove.selected(stringValue, false, preventChangeTrigger);
9736
9817
  }
9737
9818
  })
9738
9819
  ;
@@ -9811,6 +9892,9 @@ $.fn.dropdown = function(parameters) {
9811
9892
  menu: function() {
9812
9893
  return ($menu.length > 0);
9813
9894
  },
9895
+ subMenu: function($currentMenu) {
9896
+ return ($currentMenu || $menu).find(selector.menu).length > 0;
9897
+ },
9814
9898
  message: function() {
9815
9899
  return ($menu.children(selector.message).length !== 0);
9816
9900
  },
@@ -9847,7 +9931,7 @@ $.fn.dropdown = function(parameters) {
9847
9931
  },
9848
9932
  valueMatchingCase: function(value) {
9849
9933
  var
9850
- values = module.get.values(),
9934
+ values = module.get.values(true),
9851
9935
  hasValue = Array.isArray(values)
9852
9936
  ? values && ($.inArray(value, values) !== -1)
9853
9937
  : (values == value)
@@ -9859,7 +9943,7 @@ $.fn.dropdown = function(parameters) {
9859
9943
  },
9860
9944
  valueIgnoringCase: function(value) {
9861
9945
  var
9862
- values = module.get.values(),
9946
+ values = module.get.values(true),
9863
9947
  hasValue = false
9864
9948
  ;
9865
9949
  if(!Array.isArray(values)) {
@@ -9891,6 +9975,9 @@ $.fn.dropdown = function(parameters) {
9891
9975
  bubbledIconClick: function(event) {
9892
9976
  return $(event.target).closest($icon).length > 0;
9893
9977
  },
9978
+ chrome: function() {
9979
+ return !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
9980
+ },
9894
9981
  alreadySetup: function() {
9895
9982
  return ($module.is('select') && $module.parent(selector.dropdown).data(moduleNamespace) !== undefined && $module.prev().length === 0);
9896
9983
  },
@@ -9943,6 +10030,9 @@ $.fn.dropdown = function(parameters) {
9943
10030
  remote: function() {
9944
10031
  return settings.apiSettings && module.can.useAPI();
9945
10032
  },
10033
+ noApiCache: function() {
10034
+ return settings.apiSettings && !settings.apiSettings.cache
10035
+ },
9946
10036
  single: function() {
9947
10037
  return !module.is.multiple();
9948
10038
  },
@@ -10037,6 +10127,9 @@ $.fn.dropdown = function(parameters) {
10037
10127
  if(module.is.verticallyScrollableContext()) {
10038
10128
  calculations.menu.offset.top += calculations.context.scrollTop;
10039
10129
  }
10130
+ if(module.has.subMenu($currentMenu)) {
10131
+ calculations.menu.height += $currentMenu.find(selector.menu).first().outerHeight();
10132
+ }
10040
10133
  onScreen = {
10041
10134
  above : (calculations.context.scrollTop) <= calculations.menu.offset.top - calculations.context.offset.top - calculations.menu.height,
10042
10135
  below : (calculations.context.scrollTop + calculations.context.height) >= calculations.menu.offset.top - calculations.context.offset.top + calculations.menu.height
@@ -10123,16 +10216,15 @@ $.fn.dropdown = function(parameters) {
10123
10216
  ;
10124
10217
  module.verbose('Doing menu show animation', $currentMenu);
10125
10218
  module.set.direction($subMenu);
10126
- transition = module.get.transition($subMenu);
10219
+ transition = settings.transition.showMethod || module.get.transition($subMenu);
10127
10220
  if( module.is.selection() ) {
10128
10221
  module.set.scrollPosition(module.get.selectedItem(), true);
10129
10222
  }
10130
10223
  if( module.is.hidden($currentMenu) || module.is.animating($currentMenu) ) {
10131
- var displayType = $module.hasClass('column') ? 'flex' : false;
10132
- if(transition == 'none') {
10224
+ if(transition === 'none') {
10133
10225
  start();
10134
10226
  $currentMenu.transition({
10135
- displayType: displayType
10227
+ displayType: module.get.displayType()
10136
10228
  }).transition('show');
10137
10229
  callback.call(element);
10138
10230
  }
@@ -10142,10 +10234,10 @@ $.fn.dropdown = function(parameters) {
10142
10234
  animation : transition + ' in',
10143
10235
  debug : settings.debug,
10144
10236
  verbose : settings.verbose,
10145
- duration : settings.duration,
10237
+ duration : settings.transition.showDuration || settings.duration,
10146
10238
  queue : true,
10147
10239
  onStart : start,
10148
- displayType: displayType,
10240
+ displayType: module.get.displayType(),
10149
10241
  onComplete : function() {
10150
10242
  callback.call(element);
10151
10243
  }
@@ -10168,7 +10260,7 @@ $.fn.dropdown = function(parameters) {
10168
10260
  }
10169
10261
  module.remove.active();
10170
10262
  },
10171
- transition = module.get.transition($subMenu)
10263
+ transition = settings.transition.hideMethod || module.get.transition($subMenu)
10172
10264
  ;
10173
10265
  callback = $.isFunction(callback)
10174
10266
  ? callback
@@ -10177,20 +10269,23 @@ $.fn.dropdown = function(parameters) {
10177
10269
  if( module.is.visible($currentMenu) || module.is.animating($currentMenu) ) {
10178
10270
  module.verbose('Doing menu hide animation', $currentMenu);
10179
10271
 
10180
- if(transition == 'none') {
10272
+ if(transition === 'none') {
10181
10273
  start();
10182
- $currentMenu.transition('hide');
10274
+ $currentMenu.transition({
10275
+ displayType: module.get.displayType()
10276
+ }).transition('hide');
10183
10277
  callback.call(element);
10184
10278
  }
10185
10279
  else if($.fn.transition !== undefined && $module.transition('is supported')) {
10186
10280
  $currentMenu
10187
10281
  .transition({
10188
10282
  animation : transition + ' out',
10189
- duration : settings.duration,
10283
+ duration : settings.transition.hideDuration || settings.duration,
10190
10284
  debug : settings.debug,
10191
10285
  verbose : settings.verbose,
10192
10286
  queue : false,
10193
10287
  onStart : start,
10288
+ displayType: module.get.displayType(),
10194
10289
  onComplete : function() {
10195
10290
  callback.call(element);
10196
10291
  }
@@ -10519,6 +10614,7 @@ $.fn.dropdown.settings = {
10519
10614
 
10520
10615
  transition : 'auto', // auto transition will slide down or up based on direction
10521
10616
  duration : 200, // duration of transition
10617
+ displayType : false, // displayType of transition
10522
10618
 
10523
10619
  glyphWidth : 1.037, // widest glyph width in em (W is 1.037 em) used to calculate multiselect input width
10524
10620
 
@@ -10543,6 +10639,7 @@ $.fn.dropdown.settings = {
10543
10639
  onChange : function(value, text, $selected){},
10544
10640
  onAdd : function(value, text, $selected){},
10545
10641
  onRemove : function(value, text, $selected){},
10642
+ onSearch : function(searchTerm){},
10546
10643
 
10547
10644
  onLabelSelect : function($selectedLabels){},
10548
10645
  onLabelCreate : function(value, text) { return $(this); },
@@ -10590,19 +10687,21 @@ $.fn.dropdown.settings = {
10590
10687
 
10591
10688
  // property names for remote query
10592
10689
  fields: {
10593
- remoteValues : 'results', // grouping for api results
10594
- values : 'values', // grouping for all dropdown values
10595
- disabled : 'disabled', // whether value should be disabled
10596
- name : 'name', // displayed dropdown text
10597
- value : 'value', // actual dropdown value
10598
- text : 'text', // displayed text when selected
10599
- type : 'type', // type of dropdown element
10600
- image : 'image', // optional image path
10601
- imageClass : 'imageClass', // optional individual class for image
10602
- icon : 'icon', // optional icon name
10603
- iconClass : 'iconClass', // optional individual class for icon (for example to use flag instead)
10604
- class : 'class', // optional individual class for item/header
10605
- divider : 'divider' // optional divider append for group headers
10690
+ remoteValues : 'results', // grouping for api results
10691
+ values : 'values', // grouping for all dropdown values
10692
+ disabled : 'disabled', // whether value should be disabled
10693
+ name : 'name', // displayed dropdown text
10694
+ description : 'description', // displayed dropdown description
10695
+ descriptionVertical : 'descriptionVertical', // whether description should be vertical
10696
+ value : 'value', // actual dropdown value
10697
+ text : 'text', // displayed text when selected
10698
+ type : 'type', // type of dropdown element
10699
+ image : 'image', // optional image path
10700
+ imageClass : 'imageClass', // optional individual class for image
10701
+ icon : 'icon', // optional icon name
10702
+ iconClass : 'iconClass', // optional individual class for icon (for example to use flag instead)
10703
+ class : 'class', // optional individual class for item/header
10704
+ divider : 'divider' // optional divider append for group headers
10606
10705
  },
10607
10706
 
10608
10707
  keys : {
@@ -10641,45 +10740,48 @@ $.fn.dropdown.settings = {
10641
10740
  },
10642
10741
 
10643
10742
  className : {
10644
- active : 'active',
10645
- addition : 'addition',
10646
- animating : 'animating',
10647
- disabled : 'disabled',
10648
- empty : 'empty',
10649
- dropdown : 'ui dropdown',
10650
- filtered : 'filtered',
10651
- hidden : 'hidden transition',
10652
- icon : 'icon',
10653
- image : 'image',
10654
- item : 'item',
10655
- label : 'ui label',
10656
- loading : 'loading',
10657
- menu : 'menu',
10658
- message : 'message',
10659
- multiple : 'multiple',
10660
- placeholder : 'default',
10661
- sizer : 'sizer',
10662
- search : 'search',
10663
- selected : 'selected',
10664
- selection : 'selection',
10665
- upward : 'upward',
10666
- leftward : 'left',
10667
- visible : 'visible',
10668
- clearable : 'clearable',
10669
- noselection : 'noselection',
10670
- delete : 'delete',
10671
- header : 'header',
10672
- divider : 'divider',
10673
- groupIcon : '',
10674
- unfilterable : 'unfilterable'
10743
+ active : 'active',
10744
+ addition : 'addition',
10745
+ animating : 'animating',
10746
+ description : 'description',
10747
+ descriptionVertical : 'vertical',
10748
+ disabled : 'disabled',
10749
+ empty : 'empty',
10750
+ dropdown : 'ui dropdown',
10751
+ filtered : 'filtered',
10752
+ hidden : 'hidden transition',
10753
+ icon : 'icon',
10754
+ image : 'image',
10755
+ item : 'item',
10756
+ label : 'ui label',
10757
+ loading : 'loading',
10758
+ menu : 'menu',
10759
+ message : 'message',
10760
+ multiple : 'multiple',
10761
+ placeholder : 'default',
10762
+ sizer : 'sizer',
10763
+ search : 'search',
10764
+ selected : 'selected',
10765
+ selection : 'selection',
10766
+ text : 'text',
10767
+ upward : 'upward',
10768
+ leftward : 'left',
10769
+ visible : 'visible',
10770
+ clearable : 'clearable',
10771
+ noselection : 'noselection',
10772
+ delete : 'delete',
10773
+ header : 'header',
10774
+ divider : 'divider',
10775
+ groupIcon : '',
10776
+ unfilterable : 'unfilterable'
10675
10777
  }
10676
10778
 
10677
10779
  };
10678
10780
 
10679
10781
  /* Templates */
10680
10782
  $.fn.dropdown.settings.templates = {
10681
- deQuote: function(string) {
10682
- return String(string).replace(/"/g,"");
10783
+ deQuote: function(string, encode) {
10784
+ return String(string).replace(/"/g,encode ? "&quot;" : "");
10683
10785
  },
10684
10786
  escape: function(string, preserveHTML) {
10685
10787
  if (preserveHTML){
@@ -10737,26 +10839,49 @@ $.fn.dropdown.settings.templates = {
10737
10839
  var
10738
10840
  itemType = (option[fields.type])
10739
10841
  ? option[fields.type]
10740
- : 'item'
10842
+ : 'item',
10843
+ isMenu = itemType.indexOf('menu') !== -1
10741
10844
  ;
10742
10845
 
10743
- if( itemType === 'item' ) {
10846
+ if( itemType === 'item' || isMenu) {
10744
10847
  var
10745
10848
  maybeText = (option[fields.text])
10746
- ? ' data-text="' + deQuote(option[fields.text]) + '"'
10849
+ ? ' data-text="' + deQuote(option[fields.text],true) + '"'
10747
10850
  : '',
10748
10851
  maybeDisabled = (option[fields.disabled])
10749
10852
  ? className.disabled+' '
10750
- : ''
10853
+ : '',
10854
+ maybeDescriptionVertical = (option[fields.descriptionVertical])
10855
+ ? className.descriptionVertical+' '
10856
+ : '',
10857
+ hasDescription = (escape(option[fields.description] || '', preserveHTML) != '')
10751
10858
  ;
10752
- html += '<div class="'+ maybeDisabled + (option[fields.class] ? deQuote(option[fields.class]) : className.item)+'" data-value="' + deQuote(option[fields.value]) + '"' + maybeText + '>';
10859
+ html += '<div class="'+ maybeDisabled + maybeDescriptionVertical + (option[fields.class] ? deQuote(option[fields.class]) : className.item)+'" data-value="' + deQuote(option[fields.value],true) + '"' + maybeText + '>';
10860
+ if (isMenu) {
10861
+ html += '<i class="'+ (itemType.indexOf('left') !== -1 ? 'left' : '') + ' dropdown icon"></i>';
10862
+ }
10753
10863
  if(option[fields.image]) {
10754
10864
  html += '<img class="'+(option[fields.imageClass] ? deQuote(option[fields.imageClass]) : className.image)+'" src="' + deQuote(option[fields.image]) + '">';
10755
10865
  }
10756
10866
  if(option[fields.icon]) {
10757
10867
  html += '<i class="'+deQuote(option[fields.icon])+' '+(option[fields.iconClass] ? deQuote(option[fields.iconClass]) : className.icon)+'"></i>';
10758
10868
  }
10869
+ if(hasDescription){
10870
+ html += '<span class="'+ className.description +'">'+ escape(option[fields.description] || '', preserveHTML) + '</span>';
10871
+ html += (!isMenu) ? '<span class="'+ className.text + '">' : '';
10872
+ }
10873
+ if (isMenu) {
10874
+ html += '<span class="' + className.text + '">';
10875
+ }
10759
10876
  html += escape(option[fields.name] || '', preserveHTML);
10877
+ if (isMenu) {
10878
+ html += '</span>';
10879
+ html += '<div class="' + itemType + '">';
10880
+ html += $.fn.dropdown.settings.templates.menu(option, fields, preserveHTML, className);
10881
+ html += '</div>';
10882
+ } else if(hasDescription){
10883
+ html += '</span>';
10884
+ }
10760
10885
  html += '</div>';
10761
10886
  } else if (itemType === 'header') {
10762
10887
  var groupName = escape(option[fields.name] || '', preserveHTML),
@@ -10801,7 +10926,7 @@ $.fn.dropdown.settings.templates = {
10801
10926
  })( jQuery, window, document );
10802
10927
 
10803
10928
  /*!
10804
- * # Fomantic-UI - Embed
10929
+ * # Fomantic-UI 2.8.8 - Embed
10805
10930
  * http://github.com/fomantic/Fomantic-UI/
10806
10931
  *
10807
10932
  *
@@ -11511,7 +11636,7 @@ $.fn.embed.settings = {
11511
11636
  })( jQuery, window, document );
11512
11637
 
11513
11638
  /*!
11514
- * # Fomantic-UI - Modal
11639
+ * # Fomantic-UI 2.8.8 - Modal
11515
11640
  * http://github.com/fomantic/Fomantic-UI/
11516
11641
  *
11517
11642
  *
@@ -11570,6 +11695,7 @@ $.fn.modal = function(parameters) {
11570
11695
  selector = settings.selector,
11571
11696
  className = settings.className,
11572
11697
  namespace = settings.namespace,
11698
+ fields = settings.fields,
11573
11699
  error = settings.error,
11574
11700
 
11575
11701
  eventNamespace = '.' + namespace,
@@ -11586,7 +11712,7 @@ $.fn.modal = function(parameters) {
11586
11712
  $dimmer,
11587
11713
 
11588
11714
  element = this,
11589
- instance = $module.data(moduleNamespace),
11715
+ instance = $module.hasClass('modal') ? $module.data(moduleNamespace) : undefined,
11590
11716
 
11591
11717
  ignoreRepeatedEvents = false,
11592
11718
 
@@ -11603,6 +11729,46 @@ $.fn.modal = function(parameters) {
11603
11729
  module = {
11604
11730
 
11605
11731
  initialize: function() {
11732
+ if(!$module.hasClass('modal')) {
11733
+ module.create.modal();
11734
+ if(!$.isFunction(settings.onHidden)) {
11735
+ settings.onHidden = function () {
11736
+ module.destroy();
11737
+ $module.remove();
11738
+ };
11739
+ }
11740
+ }
11741
+ $module.addClass(settings.class);
11742
+ if (settings.title !== '') {
11743
+ $module.find(selector.title).html(module.helpers.escape(settings.title, settings.preserveHTML)).addClass(settings.classTitle);
11744
+ }
11745
+ if (settings.content !== '') {
11746
+ $module.find(selector.content).html(module.helpers.escape(settings.content, settings.preserveHTML)).addClass(settings.classContent);
11747
+ }
11748
+ if(module.has.configActions()){
11749
+ var $actions = $module.find(selector.actions).addClass(settings.classActions);
11750
+ if ($actions.length === 0) {
11751
+ $actions = $('<div/>', {class: className.actions + ' ' + (settings.classActions || '')}).appendTo($module);
11752
+ } else {
11753
+ $actions.empty();
11754
+ }
11755
+ settings.actions.forEach(function (el) {
11756
+ var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
11757
+ text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
11758
+ cls = module.helpers.deQuote(el[fields.class] || ''),
11759
+ click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
11760
+ $actions.append($('<button/>', {
11761
+ html: icon + text,
11762
+ class: className.button + ' ' + cls,
11763
+ click: function () {
11764
+ if (click.call(element, $module) === false) {
11765
+ return;
11766
+ }
11767
+ module.hide();
11768
+ }
11769
+ }));
11770
+ });
11771
+ }
11606
11772
  module.cache = {};
11607
11773
  module.verbose('Initializing dimmer', $context);
11608
11774
 
@@ -11622,6 +11788,9 @@ $.fn.modal = function(parameters) {
11622
11788
  module.observeChanges();
11623
11789
  }
11624
11790
  module.instantiate();
11791
+ if(settings.autoShow){
11792
+ module.show();
11793
+ }
11625
11794
  },
11626
11795
 
11627
11796
  instantiate: function() {
@@ -11633,6 +11802,23 @@ $.fn.modal = function(parameters) {
11633
11802
  },
11634
11803
 
11635
11804
  create: {
11805
+ modal: function() {
11806
+ $module = $('<div/>', {class: className.modal});
11807
+ if (settings.closeIcon) {
11808
+ $close = $('<i/>', {class: className.close})
11809
+ $module.append($close);
11810
+ }
11811
+ if (settings.title !== '') {
11812
+ $('<div/>', {class: className.title}).appendTo($module);
11813
+ }
11814
+ if (settings.content !== '') {
11815
+ $('<div/>', {class: className.content}).appendTo($module);
11816
+ }
11817
+ if (module.has.configActions()) {
11818
+ $('<div/>', {class: className.actions}).appendTo($module);
11819
+ }
11820
+ $context.append($module);
11821
+ },
11636
11822
  dimmer: function() {
11637
11823
  var
11638
11824
  defaultSettings = {
@@ -11759,6 +11945,12 @@ $.fn.modal = function(parameters) {
11759
11945
  get: {
11760
11946
  id: function() {
11761
11947
  return (Math.random().toString(16) + '000000000').substr(2, 8);
11948
+ },
11949
+ element: function() {
11950
+ return $module;
11951
+ },
11952
+ settings: function() {
11953
+ return settings;
11762
11954
  }
11763
11955
  },
11764
11956
 
@@ -11936,9 +12128,9 @@ $.fn.modal = function(parameters) {
11936
12128
  $module
11937
12129
  .transition({
11938
12130
  debug : settings.debug,
11939
- animation : settings.transition + ' in',
12131
+ animation : (settings.transition.showMethod || settings.transition) + ' in',
11940
12132
  queue : settings.queue,
11941
- duration : settings.duration,
12133
+ duration : settings.transition.showDuration || settings.duration,
11942
12134
  useFailSafe : true,
11943
12135
  onComplete : function() {
11944
12136
  settings.onVisible.apply(element);
@@ -11986,9 +12178,9 @@ $.fn.modal = function(parameters) {
11986
12178
  $module
11987
12179
  .transition({
11988
12180
  debug : settings.debug,
11989
- animation : settings.transition + ' out',
12181
+ animation : (settings.transition.hideMethod || settings.transition) + ' out',
11990
12182
  queue : settings.queue,
11991
- duration : settings.duration,
12183
+ duration : settings.transition.hideDuration || settings.duration,
11992
12184
  useFailSafe : true,
11993
12185
  onStart : function() {
11994
12186
  if(!module.others.active() && !module.others.animating() && !keepDimmed) {
@@ -12011,7 +12203,9 @@ $.fn.modal = function(parameters) {
12011
12203
  $previousModal.find(selector.dimmer).removeClass('active');
12012
12204
  }
12013
12205
  }
12014
- settings.onHidden.call(element);
12206
+ if($.isFunction(settings.onHidden)) {
12207
+ settings.onHidden.call(element);
12208
+ }
12015
12209
  module.remove.dimmerStyles();
12016
12210
  module.restore.focus();
12017
12211
  callback();
@@ -12137,7 +12331,12 @@ $.fn.modal = function(parameters) {
12137
12331
  bodyMargin: function() {
12138
12332
  var position = module.can.leftBodyScrollbar() ? 'left':'right';
12139
12333
  $body.css('margin-'+position, initialBodyMargin);
12140
- $body.find(selector.bodyFixed.replace('right',position)).css('padding-'+position, initialBodyMargin);
12334
+ $body.find(selector.bodyFixed.replace('right',position)).each(function(){
12335
+ var el = $(this),
12336
+ attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
12337
+ ;
12338
+ el.css(attribute, '');
12339
+ });
12141
12340
  }
12142
12341
  },
12143
12342
 
@@ -12211,7 +12410,35 @@ $.fn.modal = function(parameters) {
12211
12410
  $module.removeClass(className.loading);
12212
12411
  module.debug('Caching modal and container sizes', module.cache);
12213
12412
  },
12214
-
12413
+ helpers: {
12414
+ deQuote: function(string) {
12415
+ return String(string).replace(/"/g,"");
12416
+ },
12417
+ escape: function(string, preserveHTML) {
12418
+ if (preserveHTML){
12419
+ return string;
12420
+ }
12421
+ var
12422
+ badChars = /[<>"'`]/g,
12423
+ shouldEscape = /[&<>"'`]/,
12424
+ escape = {
12425
+ "<": "&lt;",
12426
+ ">": "&gt;",
12427
+ '"': "&quot;",
12428
+ "'": "&#x27;",
12429
+ "`": "&#x60;"
12430
+ },
12431
+ escapedChar = function(chr) {
12432
+ return escape[chr];
12433
+ }
12434
+ ;
12435
+ if(shouldEscape.test(string)) {
12436
+ string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
12437
+ return string.replace(badChars, escapedChar);
12438
+ }
12439
+ return string;
12440
+ }
12441
+ },
12215
12442
  can: {
12216
12443
  leftBodyScrollbar: function(){
12217
12444
  if(module.cache.leftBodyScrollbar === undefined) {
@@ -12246,7 +12473,11 @@ $.fn.modal = function(parameters) {
12246
12473
  ;
12247
12474
  }
12248
12475
  },
12249
-
12476
+ has: {
12477
+ configActions: function () {
12478
+ return Array.isArray(settings.actions) && settings.actions.length > 0;
12479
+ }
12480
+ },
12250
12481
  is: {
12251
12482
  active: function() {
12252
12483
  return $module.hasClass(className.active);
@@ -12323,7 +12554,12 @@ $.fn.modal = function(parameters) {
12323
12554
  if(settings.detachable || module.can.fit()) {
12324
12555
  $body.css('margin-'+position, tempBodyMargin + 'px');
12325
12556
  }
12326
- $body.find(selector.bodyFixed.replace('right',position)).css('padding-'+position, tempBodyMargin + 'px');
12557
+ $body.find(selector.bodyFixed.replace('right',position)).each(function(){
12558
+ var el = $(this),
12559
+ attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
12560
+ ;
12561
+ el.css(attribute, 'calc(' + el.css(attribute) + ' + ' + tempBodyMargin + 'px)');
12562
+ });
12327
12563
  },
12328
12564
  clickaway: function() {
12329
12565
  if (!settings.detachable) {
@@ -12350,8 +12586,8 @@ $.fn.modal = function(parameters) {
12350
12586
  closable : 'auto',
12351
12587
  useFlex : module.can.useFlex(),
12352
12588
  duration : {
12353
- show : settings.duration,
12354
- hide : settings.duration
12589
+ show : settings.transition.showDuration || settings.duration,
12590
+ hide : settings.transition.hideDuration || settings.duration
12355
12591
  }
12356
12592
  },
12357
12593
  dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)
@@ -12610,15 +12846,29 @@ $.fn.modal = function(parameters) {
12610
12846
 
12611
12847
  if(methodInvoked) {
12612
12848
  if(instance === undefined) {
12849
+ if ($.isFunction(settings.templates[query])) {
12850
+ settings.autoShow = true;
12851
+ settings.className.modal = settings.className.template;
12852
+ settings = $.extend(true, {}, settings, settings.templates[query].apply(module ,queryArguments));
12853
+
12854
+ // reassign shortcuts
12855
+ className = settings.className;
12856
+ namespace = settings.namespace;
12857
+ fields = settings.fields;
12858
+ error = settings.error;
12859
+ }
12613
12860
  module.initialize();
12614
12861
  }
12615
- module.invoke(query);
12862
+ if (!$.isFunction(settings.templates[query])) {
12863
+ module.invoke(query);
12864
+ }
12616
12865
  }
12617
12866
  else {
12618
12867
  if(instance !== undefined) {
12619
12868
  instance.invoke('destroy');
12620
12869
  }
12621
12870
  module.initialize();
12871
+ returnedValue = $module;
12622
12872
  }
12623
12873
  })
12624
12874
  ;
@@ -12649,6 +12899,7 @@ $.fn.modal.settings = {
12649
12899
  closable : true,
12650
12900
  autofocus : true,
12651
12901
  restoreFocus : true,
12902
+ autoShow : false,
12652
12903
 
12653
12904
  inverted : false,
12654
12905
  blurring : false,
@@ -12673,6 +12924,24 @@ $.fn.modal.settings = {
12673
12924
  padding : 50,
12674
12925
  scrollbarWidth: 10,
12675
12926
 
12927
+ //dynamic content
12928
+ title : '',
12929
+ content : '',
12930
+ class : '',
12931
+ classTitle : '',
12932
+ classContent : '',
12933
+ classActions : '',
12934
+ closeIcon : false,
12935
+ actions : false,
12936
+ preserveHTML : true,
12937
+
12938
+ fields : {
12939
+ class : 'class',
12940
+ text : 'text',
12941
+ icon : 'icon',
12942
+ click : 'click'
12943
+ },
12944
+
12676
12945
  // called before show animation
12677
12946
  onShow : function(){},
12678
12947
 
@@ -12683,7 +12952,7 @@ $.fn.modal.settings = {
12683
12952
  onHide : function(){ return true; },
12684
12953
 
12685
12954
  // called after hide animation
12686
- onHidden : function(){},
12955
+ onHidden : false,
12687
12956
 
12688
12957
  // called after approve selector match
12689
12958
  onApprove : function(){ return true; },
@@ -12692,12 +12961,16 @@ $.fn.modal.settings = {
12692
12961
  onDeny : function(){ return true; },
12693
12962
 
12694
12963
  selector : {
12964
+ title : '> .header',
12965
+ content : '> .content',
12966
+ actions : '> .actions',
12695
12967
  close : '> .close',
12696
12968
  approve : '.actions .positive, .actions .approve, .actions .ok',
12697
12969
  deny : '.actions .negative, .actions .deny, .actions .cancel',
12698
12970
  modal : '.ui.modal',
12699
12971
  dimmer : '> .ui.dimmer',
12700
- bodyFixed: '> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar'
12972
+ bodyFixed: '> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close',
12973
+ prompt : '.ui.input > input'
12701
12974
  },
12702
12975
  error : {
12703
12976
  dimmer : 'UI Dimmer, a required component is not included in this page',
@@ -12713,15 +12986,110 @@ $.fn.modal.settings = {
12713
12986
  loading : 'loading',
12714
12987
  scrolling : 'scrolling',
12715
12988
  undetached : 'undetached',
12716
- front : 'front'
12989
+ front : 'front',
12990
+ close : 'close icon',
12991
+ button : 'ui button',
12992
+ modal : 'ui modal',
12993
+ title : 'header',
12994
+ content : 'content',
12995
+ actions : 'actions',
12996
+ template : 'ui tiny modal',
12997
+ ok : 'positive',
12998
+ cancel : 'negative',
12999
+ prompt : 'ui fluid input'
13000
+ },
13001
+ text: {
13002
+ ok : 'Ok',
13003
+ cancel: 'Cancel'
12717
13004
  }
12718
13005
  };
12719
13006
 
13007
+ $.fn.modal.settings.templates = {
13008
+ getArguments: function(args) {
13009
+ var queryArguments = [].slice.call(args);
13010
+ if($.isPlainObject(queryArguments[0])){
13011
+ return $.extend({
13012
+ handler:function(){},
13013
+ content:'',
13014
+ title: ''
13015
+ }, queryArguments[0]);
13016
+ } else {
13017
+ if(!$.isFunction(queryArguments[queryArguments.length-1])) {
13018
+ queryArguments.push(function() {});
13019
+ }
13020
+ return {
13021
+ handler: queryArguments.pop(),
13022
+ content: queryArguments.pop() || '',
13023
+ title: queryArguments.pop() || ''
13024
+ };
13025
+ }
13026
+ },
13027
+ alert: function () {
13028
+ var settings = this.get.settings(),
13029
+ args = settings.templates.getArguments(arguments)
13030
+ ;
13031
+ return {
13032
+ title : args.title,
13033
+ content: args.content,
13034
+ actions: [{
13035
+ text : settings.text.ok,
13036
+ class: settings.className.ok,
13037
+ click: args.handler
13038
+ }]
13039
+ }
13040
+ },
13041
+ confirm: function () {
13042
+ var settings = this.get.settings(),
13043
+ args = settings.templates.getArguments(arguments)
13044
+ ;
13045
+ return {
13046
+ title : args.title,
13047
+ content: args.content,
13048
+ actions: [{
13049
+ text : settings.text.ok,
13050
+ class: settings.className.ok,
13051
+ click: function(){args.handler(true)}
13052
+ },{
13053
+ text: settings.text.cancel,
13054
+ class: settings.className.cancel,
13055
+ click: function(){args.handler(false)}
13056
+ }]
13057
+ }
13058
+ },
13059
+ prompt: function () {
13060
+ var $this = this,
13061
+ settings = this.get.settings(),
13062
+ args = settings.templates.getArguments(arguments),
13063
+ input = $($.parseHTML(args.content)).filter('.ui.input')
13064
+ ;
13065
+ if (input.length === 0) {
13066
+ 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>';
13067
+ }
13068
+ return {
13069
+ title : args.title,
13070
+ content: args.content,
13071
+ actions: [{
13072
+ text: settings.text.ok,
13073
+ class: settings.className.ok,
13074
+ click: function(){
13075
+ var settings = $this.get.settings(),
13076
+ inputField = $this.get.element().find(settings.selector.prompt)[0]
13077
+ ;
13078
+ args.handler($(inputField).val());
13079
+ }
13080
+ },{
13081
+ text: settings.text.cancel,
13082
+ class: settings.className.cancel,
13083
+ click: function(){args.handler(null)}
13084
+ }]
13085
+ }
13086
+ }
13087
+ }
12720
13088
 
12721
13089
  })( jQuery, window, document );
12722
13090
 
12723
13091
  /*!
12724
- * # Fomantic-UI - Nag
13092
+ * # Fomantic-UI 2.8.8 - Nag
12725
13093
  * http://github.com/fomantic/Fomantic-UI/
12726
13094
  *
12727
13095
  *
@@ -12780,14 +13148,14 @@ $.fn.nag = function(parameters) {
12780
13148
 
12781
13149
  element = this,
12782
13150
  instance = $module.data(moduleNamespace),
12783
-
13151
+ storage,
12784
13152
  module
12785
13153
  ;
12786
13154
  module = {
12787
13155
 
12788
13156
  initialize: function() {
12789
13157
  module.verbose('Initializing element');
12790
-
13158
+ storage = module.get.storage();
12791
13159
  $module
12792
13160
  .on('click' + eventNamespace, selector.close, module.dismiss)
12793
13161
  .data(moduleNamespace, module)
@@ -12816,47 +13184,47 @@ $.fn.nag = function(parameters) {
12816
13184
 
12817
13185
  show: function() {
12818
13186
  if( module.should.show() && !$module.is(':visible') ) {
13187
+ if(settings.onShow.call(element) === false) {
13188
+ module.debug('onShow callback returned false, cancelling nag animation');
13189
+ return false;
13190
+ }
12819
13191
  module.debug('Showing nag', settings.animation.show);
12820
- if(settings.animation.show == 'fade') {
13192
+ if(settings.animation.show === 'fade') {
12821
13193
  $module
12822
- .fadeIn(settings.duration, settings.easing)
13194
+ .fadeIn(settings.duration, settings.easing, settings.onVisible)
12823
13195
  ;
12824
13196
  }
12825
13197
  else {
12826
13198
  $module
12827
- .slideDown(settings.duration, settings.easing)
13199
+ .slideDown(settings.duration, settings.easing, settings.onVisible)
12828
13200
  ;
12829
13201
  }
12830
13202
  }
12831
13203
  },
12832
13204
 
12833
13205
  hide: function() {
12834
- module.debug('Showing nag', settings.animation.hide);
12835
- if(settings.animation.show == 'fade') {
13206
+ if(settings.onHide.call(element) === false) {
13207
+ module.debug('onHide callback returned false, cancelling nag animation');
13208
+ return false;
13209
+ }
13210
+ module.debug('Hiding nag', settings.animation.hide);
13211
+ if(settings.animation.hide === 'fade') {
12836
13212
  $module
12837
- .fadeIn(settings.duration, settings.easing)
13213
+ .fadeOut(settings.duration, settings.easing, settings.onHidden)
12838
13214
  ;
12839
13215
  }
12840
13216
  else {
12841
13217
  $module
12842
- .slideUp(settings.duration, settings.easing)
13218
+ .slideUp(settings.duration, settings.easing, settings.onHidden)
12843
13219
  ;
12844
13220
  }
12845
13221
  },
12846
13222
 
12847
- onHide: function() {
12848
- module.debug('Removing nag', settings.animation.hide);
12849
- $module.remove();
12850
- if (settings.onHide) {
12851
- settings.onHide();
12852
- }
12853
- },
12854
-
12855
13223
  dismiss: function(event) {
12856
- if(settings.storageMethod) {
13224
+ if(module.hide() !== false && settings.storageMethod) {
13225
+ module.debug('Dismissing nag', settings.storageMethod, settings.key, settings.value, settings.expires);
12857
13226
  module.storage.set(settings.key, settings.value);
12858
13227
  }
12859
- module.hide();
12860
13228
  event.stopImmediatePropagation();
12861
13229
  event.preventDefault();
12862
13230
  },
@@ -12877,12 +13245,71 @@ $.fn.nag = function(parameters) {
12877
13245
  },
12878
13246
 
12879
13247
  get: {
13248
+ expirationDate: function(expires) {
13249
+ if (typeof expires === 'number') {
13250
+ expires = new Date(Date.now() + expires * 864e5);
13251
+ }
13252
+ if(expires instanceof Date && expires.getTime() ){
13253
+ return expires.toUTCString();
13254
+ } else {
13255
+ module.error(error.expiresFormat);
13256
+ }
13257
+ },
13258
+ storage: function(){
13259
+ if(settings.storageMethod === 'localstorage' && window.localStorage !== undefined) {
13260
+ module.debug('Using local storage');
13261
+ return window.localStorage;
13262
+ }
13263
+ else if(settings.storageMethod === 'sessionstorage' && window.sessionStorage !== undefined) {
13264
+ module.debug('Using session storage');
13265
+ return window.sessionStorage;
13266
+ }
13267
+ else if("cookie" in document) {
13268
+ module.debug('Using cookie');
13269
+ return {
13270
+ setItem: function(key, value, options) {
13271
+ // RFC6265 compliant encoding
13272
+ key = encodeURIComponent(key)
13273
+ .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
13274
+ .replace(/[()]/g, escape);
13275
+ value = encodeURIComponent(value)
13276
+ .replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
13277
+
13278
+ var cookieOptions = '';
13279
+ for (var option in options) {
13280
+ if (options.hasOwnProperty(option)) {
13281
+ cookieOptions += '; ' + option;
13282
+ if (typeof options[option] === 'string') {
13283
+ cookieOptions += '=' + options[option].split(';')[0];
13284
+ }
13285
+ }
13286
+ }
13287
+ document.cookie = key + '=' + value + cookieOptions;
13288
+ },
13289
+ getItem: function(key) {
13290
+ var cookies = document.cookie.split('; ');
13291
+ for (var i = 0, il = cookies.length; i < il; i++) {
13292
+ var parts = cookies[i].split('='),
13293
+ foundKey = parts[0].replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
13294
+ if (key === foundKey) {
13295
+ return parts[1] || '';
13296
+ }
13297
+ }
13298
+ },
13299
+ removeItem: function(key, options) {
13300
+ storage.setItem(key,'',options);
13301
+ }
13302
+ };
13303
+ } else {
13304
+ module.error(error.noStorage);
13305
+ }
13306
+ },
12880
13307
  storageOptions: function() {
12881
13308
  var
12882
13309
  options = {}
12883
13310
  ;
12884
13311
  if(settings.expires) {
12885
- options.expires = settings.expires;
13312
+ options.expires = module.get.expirationDate(settings.expires);
12886
13313
  }
12887
13314
  if(settings.domain) {
12888
13315
  options.domain = settings.domain;
@@ -12890,6 +13317,12 @@ $.fn.nag = function(parameters) {
12890
13317
  if(settings.path) {
12891
13318
  options.path = settings.path;
12892
13319
  }
13320
+ if(settings.secure) {
13321
+ options.secure = settings.secure;
13322
+ }
13323
+ if(settings.samesite) {
13324
+ options.samesite = settings.samesite;
13325
+ }
12893
13326
  return options;
12894
13327
  }
12895
13328
  },
@@ -12903,39 +13336,30 @@ $.fn.nag = function(parameters) {
12903
13336
  var
12904
13337
  options = module.get.storageOptions()
12905
13338
  ;
12906
- if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) {
12907
- window.localStorage.setItem(key, value);
12908
- module.debug('Value stored using local storage', key, value);
13339
+ if(storage === window.localStorage && options.expires) {
13340
+ module.debug('Storing expiration value in localStorage', key, options.expires);
13341
+ storage.setItem(key + settings.expirationKey, options.expires );
12909
13342
  }
12910
- else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) {
12911
- window.sessionStorage.setItem(key, value);
12912
- module.debug('Value stored using session storage', key, value);
13343
+ module.debug('Value stored', key, value);
13344
+ try {
13345
+ storage.setItem(key, value, options);
12913
13346
  }
12914
- else if($.cookie !== undefined) {
12915
- $.cookie(key, value, options);
12916
- module.debug('Value stored using cookie', key, value, options);
12917
- }
12918
- else {
12919
- module.error(error.noCookieStorage);
12920
- return;
13347
+ catch(e) {
13348
+ module.error(error.setItem, e);
12921
13349
  }
12922
13350
  },
12923
- get: function(key, value) {
13351
+ get: function(key) {
12924
13352
  var
12925
13353
  storedValue
12926
13354
  ;
12927
- if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) {
12928
- storedValue = window.localStorage.getItem(key);
12929
- }
12930
- else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) {
12931
- storedValue = window.sessionStorage.getItem(key);
12932
- }
12933
- // get by cookie
12934
- else if($.cookie !== undefined) {
12935
- storedValue = $.cookie(key);
12936
- }
12937
- else {
12938
- module.error(error.noCookieStorage);
13355
+ storedValue = storage.getItem(key);
13356
+ if(storage === window.localStorage) {
13357
+ var expiration = storage.getItem(key + settings.expirationKey);
13358
+ if(expiration !== null && expiration !== undefined && new Date(expiration) < new Date()) {
13359
+ module.debug('Value in localStorage has expired. Deleting key', key);
13360
+ module.storage.remove(key);
13361
+ storedValue = null;
13362
+ }
12939
13363
  }
12940
13364
  if(storedValue == 'undefined' || storedValue == 'null' || storedValue === undefined || storedValue === null) {
12941
13365
  storedValue = undefined;
@@ -12946,19 +13370,11 @@ $.fn.nag = function(parameters) {
12946
13370
  var
12947
13371
  options = module.get.storageOptions()
12948
13372
  ;
12949
- if(settings.storageMethod == 'localstorage' && window.localStorage !== undefined) {
12950
- window.localStorage.removeItem(key);
12951
- }
12952
- else if(settings.storageMethod == 'sessionstorage' && window.sessionStorage !== undefined) {
12953
- window.sessionStorage.removeItem(key);
12954
- }
12955
- // store by cookie
12956
- else if($.cookie !== undefined) {
12957
- $.removeCookie(key, options);
12958
- }
12959
- else {
12960
- module.error(error.noStorage);
13373
+ options.expires = module.get.expirationDate(-1);
13374
+ if(storage === window.localStorage) {
13375
+ storage.removeItem(key + settings.expirationKey);
12961
13376
  }
13377
+ storage.removeItem(key, options);
12962
13378
  }
12963
13379
  },
12964
13380
 
@@ -13172,8 +13588,12 @@ $.fn.nag.settings = {
13172
13588
  detachable : false,
13173
13589
 
13174
13590
  expires : 30,
13591
+
13592
+ // cookie storage only options
13175
13593
  domain : false,
13176
13594
  path : '/',
13595
+ secure : false,
13596
+ samesite : false,
13177
13597
 
13178
13598
  // type of storage to use
13179
13599
  storageMethod : 'cookie',
@@ -13182,10 +13602,14 @@ $.fn.nag.settings = {
13182
13602
  key : 'nag',
13183
13603
  value : 'dismiss',
13184
13604
 
13605
+ // Key suffix to support expiration in localstorage
13606
+ expirationKey : 'ExpirationDate',
13607
+
13185
13608
  error: {
13186
- noCookieStorage : '$.cookie is not included. A storage solution is required.',
13187
- noStorage : 'Neither $.cookie or store is defined. A storage solution is required for storing state',
13188
- method : 'The method you called is not defined.'
13609
+ noStorage : 'Unsupported storage method',
13610
+ method : 'The method you called is not defined.',
13611
+ setItem : 'Unexpected error while setting value',
13612
+ expiresFormat : '"expires" must be a number of days or a Date Object'
13189
13613
  },
13190
13614
 
13191
13615
  className : {
@@ -13194,13 +13618,23 @@ $.fn.nag.settings = {
13194
13618
  },
13195
13619
 
13196
13620
  selector : {
13197
- close : '.close.icon'
13621
+ close : '> .close.icon'
13198
13622
  },
13199
13623
 
13200
- speed : 500,
13624
+ duration : 500,
13201
13625
  easing : 'easeOutQuad',
13202
13626
 
13203
- onHide: function() {}
13627
+ // callback before show animation, return false to prevent show
13628
+ onShow : function() {},
13629
+
13630
+ // called after show animation
13631
+ onVisible : function() {},
13632
+
13633
+ // callback before hide animation, return false to prevent hide
13634
+ onHide : function() {},
13635
+
13636
+ // callback after hide animation
13637
+ onHidden : function() {}
13204
13638
 
13205
13639
  };
13206
13640
 
@@ -13214,7 +13648,7 @@ $.extend( $.easing, {
13214
13648
  })( jQuery, window, document );
13215
13649
 
13216
13650
  /*!
13217
- * # Fomantic-UI - Popup
13651
+ * # Fomantic-UI 2.8.8 - Popup
13218
13652
  * http://github.com/fomantic/Fomantic-UI/
13219
13653
  *
13220
13654
  *
@@ -13649,11 +14083,11 @@ $.fn.popup = function(parameters) {
13649
14083
  module.set.visible();
13650
14084
  $popup
13651
14085
  .transition({
13652
- animation : settings.transition + ' in',
14086
+ animation : (settings.transition.showMethod || settings.transition) + ' in',
13653
14087
  queue : false,
13654
14088
  debug : settings.debug,
13655
14089
  verbose : settings.verbose,
13656
- duration : settings.duration,
14090
+ duration : settings.transition.showDuration || settings.duration,
13657
14091
  onComplete : function() {
13658
14092
  module.bind.close();
13659
14093
  callback.call($popup, element);
@@ -13672,9 +14106,9 @@ $.fn.popup = function(parameters) {
13672
14106
  if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
13673
14107
  $popup
13674
14108
  .transition({
13675
- animation : settings.transition + ' out',
14109
+ animation : (settings.transition.hideMethod || settings.transition) + ' out',
13676
14110
  queue : false,
13677
- duration : settings.duration,
14111
+ duration : settings.transition.hideDuration || settings.duration,
13678
14112
  debug : settings.debug,
13679
14113
  verbose : settings.verbose,
13680
14114
  onComplete : function() {
@@ -14756,7 +15190,7 @@ $.fn.popup.settings = {
14756
15190
  })( jQuery, window, document );
14757
15191
 
14758
15192
  /*!
14759
- * # Fomantic-UI - Progress
15193
+ * # Fomantic-UI 2.8.8 - Progress
14760
15194
  * http://github.com/fomantic/Fomantic-UI/
14761
15195
  *
14762
15196
  *
@@ -14850,7 +15284,7 @@ $.fn.progress = function(parameters) {
14850
15284
  *
14851
15285
  * @param min A minimum value within multiple values
14852
15286
  * @param total A total amount of multiple values
14853
- * @returns {number} A precison. Could be 1, 10, 100, ... 1e+10.
15287
+ * @returns {number} A precision. Could be 1, 10, 100, ... 1e+10.
14854
15288
  */
14855
15289
  derivePrecision: function(min, total) {
14856
15290
  var precisionPower = 0
@@ -15257,10 +15691,14 @@ $.fn.progress = function(parameters) {
15257
15691
  },
15258
15692
  percent: function(percents) {
15259
15693
  percents = module.helper.forceArray(percents).map(function(percent) {
15260
- return (typeof percent == 'string')
15694
+ percent = (typeof percent == 'string')
15261
15695
  ? +(percent.replace('%', ''))
15262
15696
  : percent
15263
15697
  ;
15698
+ return (settings.limitValues)
15699
+ ? Math.max(0, Math.min(100, percent))
15700
+ : percent
15701
+ ;
15264
15702
  });
15265
15703
  var hasTotal = module.has.total();
15266
15704
  var totalPercent = module.helper.sum(percents);
@@ -15290,21 +15728,15 @@ $.fn.progress = function(parameters) {
15290
15728
  });
15291
15729
  module.percent = roundedPercents;
15292
15730
  if (hasTotal) {
15293
- module.value = roundedPercents.map(function (percent) {
15731
+ module.value = percents.map(function (percent) {
15294
15732
  return (autoPrecision > 0)
15295
15733
  ? Math.round((percent / 100) * module.total * (10 * autoPrecision)) / (10 * autoPrecision)
15296
15734
  : Math.round((percent / 100) * module.total * 10) / 10
15297
15735
  ;
15298
15736
  });
15299
- if (settings.limitValues) {
15300
- module.value = module.value.map(function (value) {
15301
- return Math.max(0, Math.min(100, value));
15302
- });
15303
- }
15304
15737
  }
15305
15738
  module.set.barWidth(percents);
15306
15739
  module.set.labelInterval();
15307
- module.set.labels();
15308
15740
  }
15309
15741
  settings.onChange.call(element, percents, module.value, module.total);
15310
15742
  },
@@ -15750,7 +16182,7 @@ $.fn.progress.settings = {
15750
16182
  nonNumeric : 'Progress value is non numeric',
15751
16183
  tooHigh : 'Value specified is above 100%',
15752
16184
  tooLow : 'Value specified is below 0%',
15753
- sumExceedsTotal : 'Sum of multple values exceed total',
16185
+ sumExceedsTotal : 'Sum of multiple values exceed total',
15754
16186
  },
15755
16187
 
15756
16188
  regExp: {
@@ -15792,7 +16224,7 @@ $.fn.progress.settings = {
15792
16224
  })( jQuery, window, document );
15793
16225
 
15794
16226
  /*!
15795
- * # Fomantic-UI - Slider
16227
+ * # Fomantic-UI 2.8.8 - Slider
15796
16228
  * http://github.com/fomantic/Fomantic-UI/
15797
16229
  *
15798
16230
  *
@@ -15881,6 +16313,7 @@ $.fn.slider = function(parameters) {
15881
16313
  precision,
15882
16314
  isTouch,
15883
16315
  gapRatio = 1,
16316
+ previousValue,
15884
16317
 
15885
16318
  initialPosition,
15886
16319
  initialLoad,
@@ -15998,28 +16431,26 @@ $.fn.slider = function(parameters) {
15998
16431
  });
15999
16432
  },
16000
16433
  autoLabel: function() {
16001
- if(module.get.step() != 0) {
16002
- $labels = $module.find('.labels');
16003
- if($labels.length != 0) {
16004
- $labels.empty();
16005
- }
16006
- else {
16007
- $labels = $module.append('<ul class="auto labels"></ul>').find('.labels');
16008
- }
16009
- for(var i = 0, len = module.get.numLabels(); i <= len; i++) {
16010
- var
16011
- labelText = module.get.label(i),
16012
- $label = (labelText !== "")
16013
- ? !(i % module.get.gapRatio())
16014
- ? $('<li class="label">' + labelText + '</li>')
16015
- : $('<li class="halftick label"></li>')
16016
- : null,
16017
- ratio = i / len
16018
- ;
16019
- if($label) {
16020
- module.update.labelPosition(ratio, $label);
16021
- $labels.append($label);
16022
- }
16434
+ $labels = $module.find('.labels');
16435
+ if($labels.length != 0) {
16436
+ $labels.empty();
16437
+ }
16438
+ else {
16439
+ $labels = $module.append('<ul class="auto labels"></ul>').find('.labels');
16440
+ }
16441
+ for(var i = 0, len = module.get.numLabels(); i <= len; i++) {
16442
+ var
16443
+ labelText = module.get.label(i),
16444
+ $label = (labelText !== "")
16445
+ ? !(i % module.get.gapRatio())
16446
+ ? $('<li class="label">' + labelText + '</li>')
16447
+ : $('<li class="halftick label"></li>')
16448
+ : null,
16449
+ ratio = i / len
16450
+ ;
16451
+ if($label) {
16452
+ module.update.labelPosition(ratio, $label);
16453
+ $labels.append($label);
16023
16454
  }
16024
16455
  }
16025
16456
  }
@@ -16124,7 +16555,13 @@ $.fn.slider = function(parameters) {
16124
16555
  } else {
16125
16556
  $currThumb = module.determine.closestThumb(newPos);
16126
16557
  }
16558
+ if (previousValue === undefined) {
16559
+ previousValue = module.get.currentThumbValue();
16560
+ }
16561
+ } else if (previousValue === undefined) {
16562
+ previousValue = module.get.value();
16127
16563
  }
16564
+
16128
16565
  if(!module.is.disabled()) {
16129
16566
  module.bind.slidingEvents();
16130
16567
  }
@@ -16172,6 +16609,9 @@ $.fn.slider = function(parameters) {
16172
16609
  var value = module.determine.valueFromEvent(event);
16173
16610
  module.set.value(value);
16174
16611
  module.unbind.slidingEvents();
16612
+ if (previousValue !== undefined) {
16613
+ previousValue = undefined;
16614
+ }
16175
16615
  },
16176
16616
  keydown: function(event, first) {
16177
16617
  if(settings.preventCrossover && module.is.range() && module.thumbVal === module.secondThumbVal) {
@@ -16370,7 +16810,7 @@ $.fn.slider = function(parameters) {
16370
16810
  return settings.step;
16371
16811
  },
16372
16812
  numLabels: function() {
16373
- var value = Math.round((module.get.max() - module.get.min()) / module.get.step());
16813
+ var value = Math.round((module.get.max() - module.get.min()) / (module.get.step() === 0 ? 1 : module.get.step()));
16374
16814
  module.debug('Determined that there should be ' + value + ' labels');
16375
16815
  return value;
16376
16816
  },
@@ -16384,7 +16824,7 @@ $.fn.slider = function(parameters) {
16384
16824
 
16385
16825
  switch (settings.labelType) {
16386
16826
  case settings.labelTypes.number:
16387
- return Math.round(((value * module.get.step()) + module.get.min()) * precision ) / precision;
16827
+ return Math.round(((value * (module.get.step() === 0 ? 1 : module.get.step())) + module.get.min()) * precision ) / precision;
16388
16828
  case settings.labelTypes.letter:
16389
16829
  return alphabet[(value) % 26];
16390
16830
  default:
@@ -16646,20 +17086,31 @@ $.fn.slider = function(parameters) {
16646
17086
  },
16647
17087
 
16648
17088
  set: {
16649
- value: function(newValue) {
17089
+ value: function(newValue, fireChange) {
17090
+ fireChange = fireChange !== false;
17091
+ var toReset = previousValue === undefined;
17092
+ previousValue = previousValue === undefined ? module.get.value() : previousValue;
16650
17093
  module.update.value(newValue, function(value, thumbVal, secondThumbVal) {
16651
- if (!initialLoad || settings.fireOnInit){
16652
- settings.onChange.call(element, value, thumbVal, secondThumbVal);
17094
+ if ((!initialLoad || settings.fireOnInit) && fireChange){
17095
+ if (newValue !== previousValue) {
17096
+ settings.onChange.call(element, value, thumbVal, secondThumbVal);
17097
+ }
16653
17098
  settings.onMove.call(element, value, thumbVal, secondThumbVal);
16654
17099
  }
17100
+ if (toReset) {
17101
+ previousValue = undefined;
17102
+ }
16655
17103
  });
16656
17104
  },
16657
- rangeValue: function(first, second) {
17105
+ rangeValue: function(first, second, fireChange) {
17106
+ fireChange = fireChange !== false;
16658
17107
  if(module.is.range()) {
16659
17108
  var
16660
17109
  min = module.get.min(),
16661
- max = module.get.max()
17110
+ max = module.get.max(),
17111
+ toReset = previousValue === undefined
16662
17112
  ;
17113
+ previousValue = previousValue === undefined ? module.get.value() : previousValue;
16663
17114
  if (first <= min) {
16664
17115
  first = min;
16665
17116
  } else if(first >= max){
@@ -16675,10 +17126,15 @@ $.fn.slider = function(parameters) {
16675
17126
  value = Math.abs(module.thumbVal - module.secondThumbVal);
16676
17127
  module.update.position(module.thumbVal, $thumb);
16677
17128
  module.update.position(module.secondThumbVal, $secondThumb);
16678
- if (!initialLoad || settings.fireOnInit) {
16679
- settings.onChange.call(element, value, module.thumbVal, module.secondThumbVal);
17129
+ if ((!initialLoad || settings.fireOnInit) && fireChange) {
17130
+ if (value !== previousValue) {
17131
+ settings.onChange.call(element, value, module.thumbVal, module.secondThumbVal);
17132
+ }
16680
17133
  settings.onMove.call(element, value, module.thumbVal, module.secondThumbVal);
16681
17134
  }
17135
+ if (toReset) {
17136
+ previousValue = undefined;
17137
+ }
16682
17138
  } else {
16683
17139
  module.error(error.notrange);
16684
17140
  }
@@ -17107,7 +17563,7 @@ $.fn.slider.settings = {
17107
17563
  })( jQuery, window, document );
17108
17564
 
17109
17565
  /*!
17110
- * # Fomantic-UI - Rating
17566
+ * # Fomantic-UI 2.8.8 - Rating
17111
17567
  * http://github.com/fomantic/Fomantic-UI/
17112
17568
  *
17113
17569
  *
@@ -17662,7 +18118,7 @@ $.fn.rating.settings = {
17662
18118
  })( jQuery, window, document );
17663
18119
 
17664
18120
  /*!
17665
- * # Fomantic-UI - Search
18121
+ * # Fomantic-UI 2.8.8 - Search
17666
18122
  * http://github.com/fomantic/Fomantic-UI/
17667
18123
  *
17668
18124
  *
@@ -17781,7 +18237,7 @@ $.fn.search = function(parameters) {
17781
18237
  .on(module.get.inputEvent() + eventNamespace, selector.prompt, module.event.input)
17782
18238
  ;
17783
18239
  $prompt
17784
- .attr('autocomplete', 'off')
18240
+ .attr('autocomplete', module.is.chrome() ? 'fomantic-search' : 'off')
17785
18241
  ;
17786
18242
  }
17787
18243
  $module
@@ -17890,9 +18346,7 @@ $.fn.search = function(parameters) {
17890
18346
  results = module.get.results(),
17891
18347
  result = $result.data(metadata.result) || module.get.result(value, results)
17892
18348
  ;
17893
- if(value) {
17894
- module.set.value(value);
17895
- }
18349
+ var oldValue = module.get.value();
17896
18350
  if( $.isFunction(settings.onSelect) ) {
17897
18351
  if(settings.onSelect.call(element, result, results) === false) {
17898
18352
  module.debug('Custom onSelect callback cancelled default select action');
@@ -17901,6 +18355,9 @@ $.fn.search = function(parameters) {
17901
18355
  }
17902
18356
  }
17903
18357
  module.hideResults();
18358
+ if(value && module.get.value() === oldValue) {
18359
+ module.set.value(value);
18360
+ }
17904
18361
  if(href) {
17905
18362
  event.preventDefault();
17906
18363
  module.verbose('Opening search link found in result', $link);
@@ -17914,16 +18371,16 @@ $.fn.search = function(parameters) {
17914
18371
  }
17915
18372
  }
17916
18373
  },
17917
- ensureVisible: function ensureVisible($el) {
18374
+ ensureVisible: function($el) {
17918
18375
  var elTop, elBottom, resultsScrollTop, resultsHeight;
17919
-
18376
+ if($el.length === 0) {
18377
+ return;
18378
+ }
17920
18379
  elTop = $el.position().top;
17921
18380
  elBottom = elTop + $el.outerHeight(true);
17922
18381
 
17923
18382
  resultsScrollTop = $results.scrollTop();
17924
- resultsHeight = $results.height()
17925
- parseInt($results.css('paddingTop'), 0) +
17926
- parseInt($results.css('paddingBottom'), 0);
18383
+ resultsHeight = $results.height();
17927
18384
 
17928
18385
  if (elTop < 0) {
17929
18386
  $results.scrollTop(resultsScrollTop + elTop);
@@ -18064,6 +18521,9 @@ $.fn.search = function(parameters) {
18064
18521
  animating: function() {
18065
18522
  return $results.hasClass(className.animating);
18066
18523
  },
18524
+ chrome: function() {
18525
+ return !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime);
18526
+ },
18067
18527
  hidden: function() {
18068
18528
  return $results.hasClass(className.hidden);
18069
18529
  },
@@ -18639,9 +19099,7 @@ $.fn.search = function(parameters) {
18639
19099
  duration : settings.duration,
18640
19100
  onShow : function() {
18641
19101
  var $firstResult = $module.find(selector.result).eq(0);
18642
- if($firstResult.length > 0) {
18643
- module.ensureVisible($firstResult);
18644
- }
19102
+ module.ensureVisible($firstResult);
18645
19103
  },
18646
19104
  onComplete : function() {
18647
19105
  callback();
@@ -19228,7 +19686,7 @@ $.fn.search.settings = {
19228
19686
  })( jQuery, window, document );
19229
19687
 
19230
19688
  /*!
19231
- * # Fomantic-UI - Shape
19689
+ * # Fomantic-UI 2.8.8 - Shape
19232
19690
  * http://github.com/fomantic/Fomantic-UI/
19233
19691
  *
19234
19692
  *
@@ -20077,7 +20535,7 @@ $.fn.shape.settings = {
20077
20535
  })( jQuery, window, document );
20078
20536
 
20079
20537
  /*!
20080
- * # Fomantic-UI - Sidebar
20538
+ * # Fomantic-UI 2.8.8 - Sidebar
20081
20539
  * http://github.com/fomantic/Fomantic-UI/
20082
20540
  *
20083
20541
  *
@@ -21114,7 +21572,7 @@ $.fn.sidebar.settings = {
21114
21572
  })( jQuery, window, document );
21115
21573
 
21116
21574
  /*!
21117
- * # Fomantic-UI - Sticky
21575
+ * # Fomantic-UI 2.8.8 - Sticky
21118
21576
  * http://github.com/fomantic/Fomantic-UI/
21119
21577
  *
21120
21578
  *
@@ -22053,7 +22511,7 @@ $.fn.sticky.settings = {
22053
22511
 
22054
22512
  error : {
22055
22513
  container : 'Sticky element must be inside a relative container',
22056
- visible : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.',
22514
+ visible : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to suppress this warning in production.',
22057
22515
  method : 'The method you called is not defined.',
22058
22516
  invalidContext : 'Context specified does not exist',
22059
22517
  elementSize : 'Sticky element is larger than its container, cannot create sticky.'
@@ -22072,7 +22530,7 @@ $.fn.sticky.settings = {
22072
22530
  })( jQuery, window, document );
22073
22531
 
22074
22532
  /*!
22075
- * # Fomantic-UI - Tab
22533
+ * # Fomantic-UI 2.8.8 - Tab
22076
22534
  * http://github.com/fomantic/Fomantic-UI/
22077
22535
  *
22078
22536
  *
@@ -23074,7 +23532,7 @@ $.fn.tab.settings = {
23074
23532
  })( jQuery, window, document );
23075
23533
 
23076
23534
  /*!
23077
- * # Fomantic-UI - Toast
23535
+ * # Fomantic-UI 2.8.8 - Toast
23078
23536
  * http://github.com/fomantic/Fomantic-UI/
23079
23537
  *
23080
23538
  *
@@ -23219,15 +23677,15 @@ $.fn.toast = function(parameters) {
23219
23677
  create: {
23220
23678
  container: function() {
23221
23679
  module.verbose('Creating container');
23222
- $context.append($('<div/>',{class: settings.position + ' ' + className.container}));
23680
+ $context.append($('<div/>',{class: settings.position + ' ' + className.container + ' ' +(settings.horizontal ? className.horizontal : '')}));
23223
23681
  },
23224
23682
  toast: function() {
23225
23683
  $toastBox = $('<div/>', {class: className.box});
23684
+ var iconClass = module.get.iconClass();
23226
23685
  if (!isToastComponent) {
23227
23686
  module.verbose('Creating toast');
23228
23687
  $toast = $('<div/>');
23229
23688
  var $content = $('<div/>', {class: className.content});
23230
- var iconClass = module.get.iconClass();
23231
23689
  if (iconClass !== '') {
23232
23690
  $toast.append($('<i/>', {class: iconClass + ' ' + className.icon}));
23233
23691
  }
@@ -23245,7 +23703,7 @@ $.fn.toast = function(parameters) {
23245
23703
  }));
23246
23704
  }
23247
23705
 
23248
- $content.append($('<div/>', {html: module.helpers.escape(settings.message, settings.preserveHTML)}));
23706
+ $content.append($('<div/>', {class: className.message, html: module.helpers.escape(settings.message, settings.preserveHTML)}));
23249
23707
 
23250
23708
  $toast
23251
23709
  .addClass(settings.class + ' ' + className.toast)
@@ -23264,6 +23722,18 @@ $.fn.toast = function(parameters) {
23264
23722
  $toast = settings.cloneModule ? $module.clone().removeAttr('id') : $module;
23265
23723
  $close = $toast.find('> i'+module.helpers.toClass(className.close));
23266
23724
  settings.closeIcon = ($close.length > 0);
23725
+ if (iconClass !== '') {
23726
+ $toast.find(selector.icon).attr('class',iconClass + ' ' + className.icon);
23727
+ }
23728
+ if (settings.showImage) {
23729
+ $toast.find(selector.image).attr('src',settings.showImage);
23730
+ }
23731
+ if (settings.title !== '') {
23732
+ $toast.find(selector.title).html(module.helpers.escape(settings.title, settings.preserveHTML));
23733
+ }
23734
+ if (settings.message !== '') {
23735
+ $toast.find(selector.message).html(module.helpers.escape(settings.message, settings.preserveHTML));
23736
+ }
23267
23737
  }
23268
23738
  if ($toast.hasClass(className.compact)) {
23269
23739
  settings.compact = true;
@@ -23466,7 +23936,7 @@ $.fn.toast = function(parameters) {
23466
23936
  if(settings.transition.closeEasing !== ''){
23467
23937
  if($toastBox) {
23468
23938
  $toastBox.css('opacity', 0);
23469
- $toastBox.wrap('<div/>').parent().slideUp(500, settings.transition.closeEasing, function () {
23939
+ $toastBox.wrap('<div/>').parent().hide(settings.transition.closeDuration, settings.transition.closeEasing, function () {
23470
23940
  if ($toastBox) {
23471
23941
  $toastBox.parent().remove();
23472
23942
  callback.call($toastBox);
@@ -23506,7 +23976,7 @@ $.fn.toast = function(parameters) {
23506
23976
  has: {
23507
23977
  container: function() {
23508
23978
  module.verbose('Determining if there is already a container');
23509
- return ($context.find(module.helpers.toClass(settings.position) + selector.container).length > 0);
23979
+ return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : '')).length > 0);
23510
23980
  },
23511
23981
  toast: function(){
23512
23982
  return !!module.get.toast();
@@ -23825,6 +24295,7 @@ $.fn.toast.settings = {
23825
24295
  context : 'body',
23826
24296
 
23827
24297
  position : 'top right',
24298
+ horizontal : false,
23828
24299
  class : 'neutral',
23829
24300
  classProgress : false,
23830
24301
  classActions : false,
@@ -23855,7 +24326,8 @@ $.fn.toast.settings = {
23855
24326
  showDuration : 500,
23856
24327
  hideMethod : 'scale',
23857
24328
  hideDuration : 500,
23858
- closeEasing : 'easeOutCubic' //Set to empty string to stack the closed toast area immediately (old behaviour)
24329
+ closeEasing : 'easeOutCubic', //Set to empty string to stack the closed toast area immediately (old behaviour)
24330
+ closeDuration: 500
23859
24331
  },
23860
24332
 
23861
24333
  error: {
@@ -23873,6 +24345,7 @@ $.fn.toast.settings = {
23873
24345
  visible : 'visible',
23874
24346
  content : 'content',
23875
24347
  title : 'ui header',
24348
+ message : 'message',
23876
24349
  actions : 'actions',
23877
24350
  extraContent : 'extra content',
23878
24351
  button : 'ui button',
@@ -23880,6 +24353,7 @@ $.fn.toast.settings = {
23880
24353
  close : 'close icon',
23881
24354
  image : 'ui image',
23882
24355
  vertical : 'vertical',
24356
+ horizontal : 'horizontal',
23883
24357
  attached : 'attached',
23884
24358
  inverted : 'inverted',
23885
24359
  compact : 'compact',
@@ -23903,6 +24377,10 @@ $.fn.toast.settings = {
23903
24377
  container : '.ui.toast-container',
23904
24378
  box : '.toast-box',
23905
24379
  toast : '.ui.toast',
24380
+ title : '.header',
24381
+ message : '.message:not(.ui)',
24382
+ image : '> img.image, > .image > img',
24383
+ icon : '> i.icon',
23906
24384
  input : 'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',
23907
24385
  approve : '.actions .positive, .actions .approve, .actions .ok',
23908
24386
  deny : '.actions .negative, .actions .deny, .actions .cancel'
@@ -23947,7 +24425,7 @@ $.extend( $.easing, {
23947
24425
  })( jQuery, window, document );
23948
24426
 
23949
24427
  /*!
23950
- * # Fomantic-UI - Transition
24428
+ * # Fomantic-UI 2.8.8 - Transition
23951
24429
  * http://github.com/fomantic/Fomantic-UI/
23952
24430
  *
23953
24431
  *
@@ -25045,7 +25523,7 @@ $.fn.transition.settings = {
25045
25523
 
25046
25524
  // possible errors
25047
25525
  error: {
25048
- noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.',
25526
+ noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production.',
25049
25527
  repeated : 'That animation is already occurring, cancelling repeated animation',
25050
25528
  method : 'The method you called is not defined',
25051
25529
  support : 'This browser does not support CSS animations'
@@ -25057,7 +25535,7 @@ $.fn.transition.settings = {
25057
25535
  })( jQuery, window, document );
25058
25536
 
25059
25537
  /*!
25060
- * # Fomantic-UI - API
25538
+ * # Fomantic-UI 2.8.8 - API
25061
25539
  * http://github.com/fomantic/Fomantic-UI/
25062
25540
  *
25063
25541
  *
@@ -25190,7 +25668,7 @@ $.api = $.fn.api = function(parameters) {
25190
25668
  response = JSON.parse(response);
25191
25669
  }
25192
25670
  catch(e) {
25193
- // isnt json string
25671
+ // isn't json string
25194
25672
  }
25195
25673
  }
25196
25674
  return response;
@@ -26235,7 +26713,7 @@ $.api.settings = {
26235
26713
  })( jQuery, window, document );
26236
26714
 
26237
26715
  /*!
26238
- * # Fomantic-UI - State
26716
+ * # Fomantic-UI 2.8.8 - State
26239
26717
  * http://github.com/fomantic/Fomantic-UI/
26240
26718
  *
26241
26719
  *
@@ -26947,7 +27425,7 @@ $.fn.state.settings = {
26947
27425
  })( jQuery, window, document );
26948
27426
 
26949
27427
  /*!
26950
- * # Fomantic-UI - Visibility
27428
+ * # Fomantic-UI 2.8.8 - Visibility
26951
27429
  * http://github.com/fomantic/Fomantic-UI/
26952
27430
  *
26953
27431
  *
@@ -28185,7 +28663,7 @@ $.fn.visibility.settings = {
28185
28663
  // callback should only occur one time
28186
28664
  once : true,
28187
28665
 
28188
- // callback should fire continuously whe evaluates to true
28666
+ // callback should fire continuously when evaluates to true
28189
28667
  continuous : false,
28190
28668
 
28191
28669
  // offset to use with scroll top