fomantic-ui 2.9.0-beta.311 → 2.9.0-beta.314

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 (175) hide show
  1. package/dist/components/accordion.css +1 -1
  2. package/dist/components/accordion.js +2 -2
  3. package/dist/components/accordion.min.css +1 -1
  4. package/dist/components/accordion.min.js +2 -2
  5. package/dist/components/ad.css +1 -1
  6. package/dist/components/ad.min.css +1 -1
  7. package/dist/components/api.js +4 -4
  8. package/dist/components/api.min.js +2 -2
  9. package/dist/components/breadcrumb.css +1 -1
  10. package/dist/components/breadcrumb.min.css +1 -1
  11. package/dist/components/button.css +1 -1
  12. package/dist/components/button.min.css +1 -1
  13. package/dist/components/calendar.css +1 -1
  14. package/dist/components/calendar.js +3 -4
  15. package/dist/components/calendar.min.css +1 -1
  16. package/dist/components/calendar.min.js +2 -2
  17. package/dist/components/card.css +1 -1
  18. package/dist/components/card.min.css +1 -1
  19. package/dist/components/checkbox.css +1 -1
  20. package/dist/components/checkbox.js +2 -2
  21. package/dist/components/checkbox.min.css +1 -1
  22. package/dist/components/checkbox.min.js +2 -2
  23. package/dist/components/comment.css +1 -1
  24. package/dist/components/comment.min.css +1 -1
  25. package/dist/components/container.css +1 -1
  26. package/dist/components/container.min.css +1 -1
  27. package/dist/components/dimmer.css +5 -5
  28. package/dist/components/dimmer.js +3 -6
  29. package/dist/components/dimmer.min.css +2 -2
  30. package/dist/components/dimmer.min.js +2 -2
  31. package/dist/components/divider.css +1 -1
  32. package/dist/components/divider.min.css +1 -1
  33. package/dist/components/dropdown.css +1 -1
  34. package/dist/components/dropdown.js +24 -50
  35. package/dist/components/dropdown.min.css +1 -1
  36. package/dist/components/dropdown.min.js +2 -2
  37. package/dist/components/embed.css +1 -1
  38. package/dist/components/embed.js +3 -5
  39. package/dist/components/embed.min.css +1 -1
  40. package/dist/components/embed.min.js +2 -2
  41. package/dist/components/feed.css +1 -1
  42. package/dist/components/feed.min.css +1 -1
  43. package/dist/components/flag.css +1 -1
  44. package/dist/components/flag.min.css +1 -1
  45. package/dist/components/form.css +1 -1
  46. package/dist/components/form.js +8 -13
  47. package/dist/components/form.min.css +1 -1
  48. package/dist/components/form.min.js +2 -2
  49. package/dist/components/grid.css +1 -1
  50. package/dist/components/grid.min.css +1 -1
  51. package/dist/components/header.css +1 -1
  52. package/dist/components/header.min.css +1 -1
  53. package/dist/components/icon.css +1 -1
  54. package/dist/components/icon.min.css +1 -1
  55. package/dist/components/image.css +1 -1
  56. package/dist/components/image.min.css +1 -1
  57. package/dist/components/input.css +1 -1
  58. package/dist/components/input.min.css +1 -1
  59. package/dist/components/item.css +1 -1
  60. package/dist/components/item.min.css +1 -1
  61. package/dist/components/label.css +1 -1
  62. package/dist/components/label.min.css +1 -1
  63. package/dist/components/list.css +1 -1
  64. package/dist/components/list.min.css +1 -1
  65. package/dist/components/loader.css +1 -1
  66. package/dist/components/loader.min.css +1 -1
  67. package/dist/components/message.css +1 -1
  68. package/dist/components/message.min.css +1 -1
  69. package/dist/components/modal.css +7 -1
  70. package/dist/components/modal.js +54 -33
  71. package/dist/components/modal.min.css +2 -2
  72. package/dist/components/modal.min.js +2 -2
  73. package/dist/components/nag.css +1 -1
  74. package/dist/components/nag.js +2 -2
  75. package/dist/components/nag.min.css +1 -1
  76. package/dist/components/nag.min.js +2 -2
  77. package/dist/components/placeholder.css +1 -1
  78. package/dist/components/placeholder.min.css +1 -1
  79. package/dist/components/popup.css +1 -1
  80. package/dist/components/popup.js +5 -13
  81. package/dist/components/popup.min.css +1 -1
  82. package/dist/components/popup.min.js +2 -2
  83. package/dist/components/progress.css +1 -1
  84. package/dist/components/progress.js +3 -3
  85. package/dist/components/progress.min.css +1 -1
  86. package/dist/components/progress.min.js +2 -2
  87. package/dist/components/rail.css +1 -1
  88. package/dist/components/rail.min.css +1 -1
  89. package/dist/components/rating.css +1 -1
  90. package/dist/components/rating.js +2 -2
  91. package/dist/components/rating.min.css +1 -1
  92. package/dist/components/rating.min.js +2 -2
  93. package/dist/components/reset.css +1 -1
  94. package/dist/components/reset.min.css +1 -1
  95. package/dist/components/reveal.css +1 -1
  96. package/dist/components/reveal.min.css +1 -1
  97. package/dist/components/search.css +1 -1
  98. package/dist/components/search.js +11 -8
  99. package/dist/components/search.min.css +1 -1
  100. package/dist/components/search.min.js +2 -2
  101. package/dist/components/segment.css +1 -1
  102. package/dist/components/segment.min.css +1 -1
  103. package/dist/components/shape.css +1 -1
  104. package/dist/components/shape.js +2 -2
  105. package/dist/components/shape.min.css +1 -1
  106. package/dist/components/shape.min.js +2 -2
  107. package/dist/components/sidebar.css +1 -1
  108. package/dist/components/sidebar.js +2 -2
  109. package/dist/components/sidebar.min.css +1 -1
  110. package/dist/components/sidebar.min.js +2 -2
  111. package/dist/components/site.css +1 -1
  112. package/dist/components/site.js +2 -2
  113. package/dist/components/site.min.css +1 -1
  114. package/dist/components/site.min.js +2 -2
  115. package/dist/components/slider.js +12 -14
  116. package/dist/components/slider.min.js +2 -2
  117. package/dist/components/state.js +2 -2
  118. package/dist/components/state.min.js +2 -2
  119. package/dist/components/statistic.css +1 -1
  120. package/dist/components/statistic.min.css +1 -1
  121. package/dist/components/step.css +1 -1
  122. package/dist/components/step.min.css +1 -1
  123. package/dist/components/sticky.css +1 -1
  124. package/dist/components/sticky.js +6 -13
  125. package/dist/components/sticky.min.css +1 -1
  126. package/dist/components/sticky.min.js +2 -2
  127. package/dist/components/tab.css +1 -1
  128. package/dist/components/tab.js +2 -2
  129. package/dist/components/tab.min.css +1 -1
  130. package/dist/components/tab.min.js +2 -2
  131. package/dist/components/table.css +1 -1
  132. package/dist/components/table.min.css +1 -1
  133. package/dist/components/text.css +1 -1
  134. package/dist/components/text.min.css +1 -1
  135. package/dist/components/toast.css +1 -1
  136. package/dist/components/toast.js +4 -4
  137. package/dist/components/toast.min.css +1 -1
  138. package/dist/components/toast.min.js +2 -2
  139. package/dist/components/transition.css +1 -1
  140. package/dist/components/transition.js +6 -8
  141. package/dist/components/transition.min.css +1 -1
  142. package/dist/components/transition.min.js +2 -2
  143. package/dist/components/visibility.js +2 -2
  144. package/dist/components/visibility.min.js +2 -2
  145. package/dist/semantic.css +60 -53
  146. package/dist/semantic.js +167 -199
  147. package/dist/semantic.min.css +2 -2
  148. package/dist/semantic.min.js +2 -2
  149. package/package.json +1 -1
  150. package/src/definitions/behaviors/api.js +3 -3
  151. package/src/definitions/behaviors/form.js +7 -12
  152. package/src/definitions/behaviors/state.js +1 -1
  153. package/src/definitions/behaviors/visibility.js +1 -1
  154. package/src/definitions/globals/site.js +1 -1
  155. package/src/definitions/modules/accordion.js +1 -1
  156. package/src/definitions/modules/calendar.js +2 -3
  157. package/src/definitions/modules/checkbox.js +1 -1
  158. package/src/definitions/modules/dimmer.js +2 -5
  159. package/src/definitions/modules/dimmer.less +4 -4
  160. package/src/definitions/modules/dropdown.js +23 -49
  161. package/src/definitions/modules/embed.js +2 -4
  162. package/src/definitions/modules/modal.js +53 -32
  163. package/src/definitions/modules/modal.less +4 -0
  164. package/src/definitions/modules/nag.js +1 -1
  165. package/src/definitions/modules/popup.js +4 -12
  166. package/src/definitions/modules/progress.js +2 -2
  167. package/src/definitions/modules/rating.js +1 -1
  168. package/src/definitions/modules/search.js +10 -7
  169. package/src/definitions/modules/shape.js +1 -1
  170. package/src/definitions/modules/sidebar.js +1 -1
  171. package/src/definitions/modules/slider.js +11 -13
  172. package/src/definitions/modules/sticky.js +5 -12
  173. package/src/definitions/modules/tab.js +1 -1
  174. package/src/definitions/modules/toast.js +3 -3
  175. package/src/definitions/modules/transition.js +5 -7
@@ -23,7 +23,7 @@ window = (typeof window != 'undefined' && window.Math == Math)
23
23
  : Function('return this')()
24
24
  ;
25
25
 
26
- $.fn.modal = function(parameters) {
26
+ $.modal = $.fn.modal = function(parameters) {
27
27
  var
28
28
  $allModules = $(this),
29
29
  $window = $(window),
@@ -65,7 +65,8 @@ $.fn.modal = function(parameters) {
65
65
  moduleNamespace = 'module-' + namespace,
66
66
 
67
67
  $module = $(this),
68
- $context = [window,document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context),
68
+ $context = [window,document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $body,
69
+ isBody = $context[0] === $body[0],
69
70
  $closeIcon = $module.find(selector.closeIcon),
70
71
  $inputs,
71
72
 
@@ -75,8 +76,10 @@ $.fn.modal = function(parameters) {
75
76
  $dimmable,
76
77
  $dimmer,
77
78
 
79
+ isModalComponent = $module.hasClass('modal'),
80
+
78
81
  element = this,
79
- instance = $module.hasClass('modal') ? $module.data(moduleNamespace) : undefined,
82
+ instance = isModalComponent ? $module.data(moduleNamespace) : undefined,
80
83
 
81
84
  ignoreRepeatedEvents = false,
82
85
 
@@ -84,6 +87,8 @@ $.fn.modal = function(parameters) {
84
87
  initialMouseDownInScrollbar,
85
88
  initialBodyMargin = '',
86
89
  tempBodyMargin = '',
90
+ keepScrollingClass = false,
91
+ hadScrollbar = false,
87
92
 
88
93
  elementEventNamespace,
89
94
  id,
@@ -94,7 +99,7 @@ $.fn.modal = function(parameters) {
94
99
 
95
100
  initialize: function() {
96
101
  module.create.id();
97
- if(!$module.hasClass('modal')) {
102
+ if(!isModalComponent) {
98
103
  module.create.modal();
99
104
  if(!$.isFunction(settings.onHidden)) {
100
105
  settings.onHidden = function () {
@@ -201,6 +206,7 @@ $.fn.modal = function(parameters) {
201
206
  }
202
207
  module.debug('Creating dimmer');
203
208
  $dimmable = $context.dimmer(dimmerSettings);
209
+ keepScrollingClass = module.is.scrolling();
204
210
  if(settings.detachable) {
205
211
  module.verbose('Modal is detachable, moving content into dimmer');
206
212
  $dimmable.dimmer('add content', $module);
@@ -326,13 +332,13 @@ $.fn.modal = function(parameters) {
326
332
  },
327
333
  scrollLock: function() {
328
334
  // touch events default to passive, due to changes in chrome to optimize mobile perf
329
- $dimmable.get(0).addEventListener('touchmove', module.event.preventScroll, { passive: false });
335
+ $dimmable[0].addEventListener('touchmove', module.event.preventScroll, { passive: false });
330
336
  }
331
337
  },
332
338
 
333
339
  unbind: {
334
340
  scrollLock: function() {
335
- $dimmable.get(0).removeEventListener('touchmove', module.event.preventScroll, { passive: false });
341
+ $dimmable[0].removeEventListener('touchmove', module.event.preventScroll, { passive: false });
336
342
  }
337
343
  },
338
344
 
@@ -414,7 +420,7 @@ $.fn.modal = function(parameters) {
414
420
  if(initialMouseDownInModal) {
415
421
  module.verbose('Mouse down event registered inside the modal');
416
422
  }
417
- initialMouseDownInScrollbar = module.is.scrolling() && ((!isRtl && $(window).outerWidth() - settings.scrollbarWidth <= event.clientX) || (isRtl && settings.scrollbarWidth >= event.clientX));
423
+ initialMouseDownInScrollbar = module.is.scrolling() && ((!isRtl && $window.outerWidth() - settings.scrollbarWidth <= event.clientX) || (isRtl && settings.scrollbarWidth >= event.clientX));
418
424
  if(initialMouseDownInScrollbar) {
419
425
  module.verbose('Mouse down event registered inside the scrollbar');
420
426
  }
@@ -518,9 +524,12 @@ $.fn.modal = function(parameters) {
518
524
  module.verbose('Show callback returned false cancelling show');
519
525
  return;
520
526
  }
527
+ hadScrollbar = module.has.scrollbar();
521
528
  module.showDimmer();
522
529
  module.cacheSizes();
523
- module.set.bodyMargin();
530
+ if(hadScrollbar) {
531
+ module.set.bodyMargin();
532
+ }
524
533
  if(module.can.useFlex()) {
525
534
  module.remove.legacy();
526
535
  }
@@ -649,7 +658,12 @@ $.fn.modal = function(parameters) {
649
658
 
650
659
  showDimmer: function() {
651
660
  if($dimmable.dimmer('is animating') || !$dimmable.dimmer('is active') ) {
652
- module.save.bodyMargin();
661
+ if(hadScrollbar) {
662
+ if(!isBody) {
663
+ $dimmer.css('top', $dimmable.scrollTop());
664
+ }
665
+ module.save.bodyMargin();
666
+ }
653
667
  module.debug('Showing dimmer');
654
668
  $dimmable.dimmer('show');
655
669
  }
@@ -662,14 +676,15 @@ $.fn.modal = function(parameters) {
662
676
  if( $dimmable.dimmer('is animating') || ($dimmable.dimmer('is active')) ) {
663
677
  module.unbind.scrollLock();
664
678
  $dimmable.dimmer('hide', function() {
665
- module.restore.bodyMargin();
679
+ if(hadScrollbar) {
680
+ module.restore.bodyMargin();
681
+ }
666
682
  module.remove.clickaway();
667
683
  module.remove.screenHeight();
668
684
  });
669
685
  }
670
686
  else {
671
687
  module.debug('Dimmer is not visible cannot hide');
672
- return;
673
688
  }
674
689
  },
675
690
 
@@ -743,9 +758,9 @@ $.fn.modal = function(parameters) {
743
758
  }
744
759
  },
745
760
  bodyMargin: function() {
746
- initialBodyMargin = $body.css('margin-'+(module.can.leftBodyScrollbar() ? 'left':'right'));
761
+ initialBodyMargin = $context.css((isBody ? 'margin-':'padding-')+(module.can.leftBodyScrollbar() ? 'left':'right'));
747
762
  var bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, '')),
748
- bodyScrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
763
+ bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth;
749
764
  tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
750
765
  }
751
766
  },
@@ -758,8 +773,8 @@ $.fn.modal = function(parameters) {
758
773
  },
759
774
  bodyMargin: function() {
760
775
  var position = module.can.leftBodyScrollbar() ? 'left':'right';
761
- $body.css('margin-'+position, initialBodyMargin);
762
- $body.find(selector.bodyFixed.replace('right',position)).each(function(){
776
+ $context.css((isBody ? 'margin-':'padding-')+position, initialBodyMargin);
777
+ $context.find(selector.bodyFixed.replace('right',position)).each(function(){
763
778
  var el = $(this),
764
779
  attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
765
780
  ;
@@ -793,16 +808,17 @@ $.fn.modal = function(parameters) {
793
808
  $dimmable.removeClass(className.blurring);
794
809
  },
795
810
  bodyStyle: function() {
796
- if($body.attr('style') === '') {
811
+ if($context.attr('style') === '') {
797
812
  module.verbose('Removing style attribute');
798
- $body.removeAttr('style');
813
+ $context.removeAttr('style');
799
814
  }
800
815
  },
801
816
  screenHeight: function() {
802
817
  module.debug('Removing page height');
803
- $body
818
+ $context
804
819
  .css('height', '')
805
820
  ;
821
+ module.remove.bodyStyle()
806
822
  },
807
823
  keyboardShortcuts: function() {
808
824
  module.verbose('Removing keyboard shortcuts');
@@ -811,7 +827,9 @@ $.fn.modal = function(parameters) {
811
827
  ;
812
828
  },
813
829
  scrolling: function() {
814
- $dimmable.removeClass(className.scrolling);
830
+ if(!keepScrollingClass) {
831
+ $dimmable.removeClass(className.scrolling);
832
+ }
815
833
  $module.removeClass(className.scrolling);
816
834
  }
817
835
  },
@@ -825,12 +843,12 @@ $.fn.modal = function(parameters) {
825
843
  ;
826
844
  if(module.cache.pageHeight === undefined || modalHeight !== 0) {
827
845
  $.extend(module.cache, {
828
- pageHeight : $(document).outerHeight(),
846
+ pageHeight : $document.outerHeight(),
829
847
  width : modalWidth,
830
848
  height : modalHeight + settings.offset,
831
849
  scrollHeight : scrollHeight + settings.offset,
832
- contextHeight : (settings.context == 'body')
833
- ? $(window).height()
850
+ contextHeight : isBody
851
+ ? $window.height()
834
852
  : $dimmable.height(),
835
853
  });
836
854
  module.cache.topOffset = -(module.cache.height / 2);
@@ -861,7 +879,7 @@ $.fn.modal = function(parameters) {
861
879
  }
862
880
  ;
863
881
  if(shouldEscape.test(string)) {
864
- string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
882
+ string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&amp;");
865
883
  return string.replace(badChars, escapedChar);
866
884
  }
867
885
  return string;
@@ -904,6 +922,9 @@ $.fn.modal = function(parameters) {
904
922
  has: {
905
923
  configActions: function () {
906
924
  return Array.isArray(settings.actions) && settings.actions.length > 0;
925
+ },
926
+ scrollbar: function() {
927
+ return isBody || $context.css('overflow-y') !== 'hidden';
907
928
  }
908
929
  },
909
930
  is: {
@@ -935,7 +956,7 @@ $.fn.modal = function(parameters) {
935
956
  },
936
957
  rtl: function() {
937
958
  if(module.cache.isRTL === undefined) {
938
- module.cache.isRTL = $body.attr('dir') === 'rtl' || $body.css('direction') === 'rtl';
959
+ module.cache.isRTL = $module.attr('dir') === 'rtl' || $module.css('direction') === 'rtl' || $body.attr('dir') === 'rtl' || $body.css('direction') === 'rtl' || $context.attr('dir') === 'rtl' || $context.css('direction') === 'rtl';
939
960
  }
940
961
  return module.cache.isRTL;
941
962
  },
@@ -977,9 +998,9 @@ $.fn.modal = function(parameters) {
977
998
  bodyMargin: function() {
978
999
  var position = module.can.leftBodyScrollbar() ? 'left':'right';
979
1000
  if(settings.detachable || module.can.fit()) {
980
- $body.css('margin-'+position, tempBodyMargin + 'px');
1001
+ $context.css((isBody ? 'margin-':'padding-')+position, tempBodyMargin + 'px');
981
1002
  }
982
- $body.find(selector.bodyFixed.replace('right',position)).each(function(){
1003
+ $context.find(selector.bodyFixed.replace('right',position)).each(function(){
983
1004
  var el = $(this),
984
1005
  attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
985
1006
  ;
@@ -1045,10 +1066,10 @@ $.fn.modal = function(parameters) {
1045
1066
  $module
1046
1067
  .css({
1047
1068
  top: (!$module.hasClass('aligned') && canFit)
1048
- ? $(document).scrollTop() + (module.cache.contextHeight - module.cache.height) / 2
1069
+ ? $document.scrollTop() + (module.cache.contextHeight - module.cache.height) / 2
1049
1070
  : !canFit || $module.hasClass('top')
1050
- ? $(document).scrollTop() + settings.padding
1051
- : $(document).scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
1071
+ ? $document.scrollTop() + settings.padding
1072
+ : $document.scrollTop() + (module.cache.contextHeight - module.cache.height - settings.padding),
1052
1073
  marginLeft: -(module.cache.width / 2)
1053
1074
  })
1054
1075
  ;
@@ -1066,11 +1087,11 @@ $.fn.modal = function(parameters) {
1066
1087
  },
1067
1088
  screenHeight: function() {
1068
1089
  if( module.can.fit() ) {
1069
- $body.css('height', '');
1090
+ $context.css('height', '');
1070
1091
  }
1071
1092
  else if(!$module.hasClass('bottom')) {
1072
1093
  module.debug('Modal is taller than page content, resizing page height');
1073
- $body
1094
+ $context
1074
1095
  .css('height', module.cache.height + (settings.padding * 2) )
1075
1096
  ;
1076
1097
  }
@@ -1222,7 +1243,7 @@ $.fn.modal = function(parameters) {
1222
1243
  response
1223
1244
  ;
1224
1245
  passedArguments = passedArguments || queryArguments;
1225
- context = element || context;
1246
+ context = context || element;
1226
1247
  if(typeof query == 'string' && object !== undefined) {
1227
1248
  query = query.split(/[\. ]/);
1228
1249
  maxDepth = query.length - 1;
@@ -447,6 +447,10 @@
447
447
  justify-content: flex-start;
448
448
  position: fixed;
449
449
  }
450
+ .scrolling.dimmable:not(body) > .dimmer {
451
+ justify-content: center;
452
+ position: absolute;
453
+ }
450
454
  .scrolling.dimmable.dimmed > .dimmer {
451
455
  overflow: auto;
452
456
  -webkit-overflow-scrolling: touch;
@@ -403,7 +403,7 @@ $.fn.nag = function(parameters) {
403
403
  response
404
404
  ;
405
405
  passedArguments = passedArguments || queryArguments;
406
- context = element || context;
406
+ context = context || element;
407
407
  if(typeof query == 'string' && object !== undefined) {
408
408
  query = query.split(/[\. ]/);
409
409
  maxDepth = query.length - 1;
@@ -1087,10 +1087,7 @@ $.fn.popup = function(parameters) {
1087
1087
  is: {
1088
1088
  closable: function() {
1089
1089
  if(settings.closable == 'auto') {
1090
- if(settings.on == 'hover') {
1091
- return false;
1092
- }
1093
- return true;
1090
+ return settings.on != 'hover';
1094
1091
  }
1095
1092
  return settings.closable;
1096
1093
  },
@@ -1105,12 +1102,7 @@ $.fn.popup = function(parameters) {
1105
1102
  offstage.push(direction);
1106
1103
  }
1107
1104
  });
1108
- if(offstage.length > 0) {
1109
- return true;
1110
- }
1111
- else {
1112
- return false;
1113
- }
1105
+ return offstage.length > 0;
1114
1106
  },
1115
1107
  svg: function(element) {
1116
1108
  return module.supports.svg() && (element instanceof SVGGraphicsElement);
@@ -1264,7 +1256,7 @@ $.fn.popup = function(parameters) {
1264
1256
  response
1265
1257
  ;
1266
1258
  passedArguments = passedArguments || queryArguments;
1267
- context = element || context;
1259
+ context = context || element;
1268
1260
  if(typeof query == 'string' && object !== undefined) {
1269
1261
  query = query.split(/[\. ]/);
1270
1262
  maxDepth = query.length - 1;
@@ -1513,7 +1505,7 @@ $.fn.popup.settings = {
1513
1505
  }
1514
1506
  ;
1515
1507
  if(shouldEscape.test(string)) {
1516
- string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
1508
+ string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&amp;");
1517
1509
  return string.replace(badChars, escapedChar);
1518
1510
  }
1519
1511
  return string;
@@ -877,7 +877,7 @@ $.fn.progress = function(parameters) {
877
877
  response
878
878
  ;
879
879
  passedArguments = passedArguments || queryArguments;
880
- context = element || context;
880
+ context = context || element;
881
881
  if(typeof query == 'string' && object !== undefined) {
882
882
  query = query.split(/[\. ]/);
883
883
  maxDepth = query.length - 1;
@@ -998,7 +998,7 @@ $.fn.progress.settings = {
998
998
  },
999
999
 
1000
1000
  regExp: {
1001
- variable: /\{\$*[A-z0-9]+\}/g
1001
+ variable: /\{\$*[a-z0-9]+\}/gi
1002
1002
  },
1003
1003
 
1004
1004
  metadata: {
@@ -419,7 +419,7 @@ $.fn.rating = function(parameters) {
419
419
  response
420
420
  ;
421
421
  passedArguments = passedArguments || queryArguments;
422
- context = element || context;
422
+ context = context || element;
423
423
  if(typeof query == 'string' && object !== undefined) {
424
424
  query = query.split(/[\. ]/);
425
425
  maxDepth = query.length - 1;
@@ -476,10 +476,7 @@ $.fn.search = function(parameters) {
476
476
  return $prompt.val();
477
477
  },
478
478
  results: function() {
479
- var
480
- results = $module.data(metadata.results)
481
- ;
482
- return results;
479
+ return $module.data(metadata.results);
483
480
  },
484
481
  result: function(value, results) {
485
482
  var
@@ -696,7 +693,7 @@ $.fn.search = function(parameters) {
696
693
  // content fuzzy matches (last in results)
697
694
  addResult(exactResults, content);
698
695
  }
699
- else if(settings.fullTextSearch == true && module.fuzzySearch(searchTerm, text) ) {
696
+ else if(settings.fullTextSearch === true && module.fuzzySearch(searchTerm, text) ) {
700
697
  // content fuzzy matches (last in results)
701
698
  addResult(fuzzyResults, content);
702
699
  }
@@ -1206,7 +1203,7 @@ $.fn.search = function(parameters) {
1206
1203
  response
1207
1204
  ;
1208
1205
  passedArguments = passedArguments || queryArguments;
1209
- context = element || context;
1206
+ context = context || element;
1210
1207
  if(typeof query == 'string' && object !== undefined) {
1211
1208
  query = query.split(/[\. ]/);
1212
1209
  maxDepth = query.length - 1;
@@ -1437,7 +1434,7 @@ $.fn.search.settings = {
1437
1434
  }
1438
1435
  ;
1439
1436
  if(shouldEscape.test(string)) {
1440
- string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
1437
+ string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&amp;");
1441
1438
  return string.replace(badChars, escapedChar);
1442
1439
  }
1443
1440
  return string;
@@ -1588,4 +1585,10 @@ $.fn.search.settings = {
1588
1585
  }
1589
1586
  };
1590
1587
 
1588
+ $.extend($.easing, {
1589
+ easeOutExpo: function(x) {
1590
+ return x === 1 ? 1 : 1 - Math.pow(2, -10 * x);
1591
+ }
1592
+ });
1593
+
1591
1594
  })( jQuery, window, document );
@@ -707,7 +707,7 @@ $.fn.shape = function(parameters) {
707
707
  response
708
708
  ;
709
709
  passedArguments = passedArguments || queryArguments;
710
- context = element || context;
710
+ context = context || element;
711
711
  if(typeof query == 'string' && object !== undefined) {
712
712
  query = query.split(/[\. ]/);
713
713
  maxDepth = query.length - 1;
@@ -958,7 +958,7 @@ $.fn.sidebar = function(parameters) {
958
958
  response
959
959
  ;
960
960
  passedArguments = passedArguments || queryArguments;
961
- context = element || context;
961
+ context = context || element;
962
962
  if(typeof query == 'string' && object !== undefined) {
963
963
  query = query.split(/[\. ]/);
964
964
  maxDepth = query.length - 1;
@@ -454,8 +454,8 @@ $.fn.slider = function(parameters) {
454
454
  module.setup.labels();
455
455
  },
456
456
  takeStep: function(multiplier) {
457
+ multiplier = multiplier != undefined ? multiplier : 1;
457
458
  var
458
- multiplier = multiplier != undefined ? multiplier : 1,
459
459
  step = module.get.step(),
460
460
  currValue = module.get.currentThumbValue()
461
461
  ;
@@ -472,8 +472,8 @@ $.fn.slider = function(parameters) {
472
472
  },
473
473
 
474
474
  backStep: function(multiplier) {
475
+ multiplier = multiplier != undefined ? multiplier : 1;
475
476
  var
476
- multiplier = multiplier != undefined ? multiplier : 1,
477
477
  step = module.get.step(),
478
478
  currValue = module.get.currentThumbValue()
479
479
  ;
@@ -721,11 +721,11 @@ $.fn.slider = function(parameters) {
721
721
  ;
722
722
  return pos;
723
723
  },
724
- positionFromValue: function(value) {
724
+ positionFromValue: function(val) {
725
725
  var
726
726
  min = module.get.min(),
727
727
  max = module.get.max(),
728
- value = value > max ? max : value < min ? min : value,
728
+ value = val > max ? max : val < min ? min : val,
729
729
  trackLength = module.get.trackLength(),
730
730
  ratio = (value - min) / (max - min),
731
731
  position = Math.round(ratio * trackLength)
@@ -933,14 +933,12 @@ $.fn.slider = function(parameters) {
933
933
  },
934
934
  position: function(position, which) {
935
935
  var thumbVal = module.determine.value(position);
936
- switch (which) {
937
- case 'second':
938
- module.secondThumbVal = thumbVal;
939
- module.update.position(thumbVal, $secondThumb);
940
- break;
941
- default:
942
- module.thumbVal = thumbVal;
943
- module.update.position(thumbVal, $thumb);
936
+ if (which === 'second') {
937
+ module.secondThumbVal = thumbVal;
938
+ module.update.position(thumbVal, $secondThumb);
939
+ } else {
940
+ module.thumbVal = thumbVal;
941
+ module.update.position(thumbVal, $thumb);
944
942
  }
945
943
  value = Math.abs(module.thumbVal - (module.secondThumbVal || 0));
946
944
  module.set.value(value);
@@ -1209,7 +1207,7 @@ $.fn.slider = function(parameters) {
1209
1207
  response
1210
1208
  ;
1211
1209
  passedArguments = passedArguments || queryArguments;
1212
- context = element || context;
1210
+ context = context || element;
1213
1211
  if(typeof query == 'string' && object !== undefined) {
1214
1212
  query = query.split(/[\. ]/);
1215
1213
  maxDepth = query.length - 1;
@@ -155,7 +155,6 @@ $.fn.sticky = function(parameters) {
155
155
  }
156
156
  if($context.length === 0) {
157
157
  module.error(error.invalidContext, settings.context, $module);
158
- return;
159
158
  }
160
159
  },
161
160
 
@@ -166,7 +165,6 @@ $.fn.sticky = function(parameters) {
166
165
  if(module.cache.element.height > module.cache.context.height) {
167
166
  module.reset();
168
167
  module.error(error.elementSize, $module);
169
- return;
170
168
  }
171
169
  },
172
170
 
@@ -317,13 +315,8 @@ $.fn.sticky = function(parameters) {
317
315
  direction = 'down'
318
316
  ;
319
317
  scroll = scroll || $scroll.scrollTop();
320
- if(module.lastScroll !== undefined) {
321
- if(module.lastScroll < scroll) {
322
- direction = 'down';
323
- }
324
- else if(module.lastScroll > scroll) {
318
+ if(module.lastScroll && module.lastScroll > scroll) {
325
319
  direction = 'up';
326
- }
327
320
  }
328
321
  return direction;
329
322
  },
@@ -371,7 +364,7 @@ $.fn.sticky = function(parameters) {
371
364
  lastScroll: function() {
372
365
  delete module.lastScroll;
373
366
  },
374
- elementScroll: function(scroll) {
367
+ elementScroll: function() {
375
368
  delete module.elementScroll;
376
369
  },
377
370
  minimumSize: function() {
@@ -467,9 +460,9 @@ $.fn.sticky = function(parameters) {
467
460
  }
468
461
  },
469
462
 
470
- stick: function(scroll) {
463
+ stick: function(scrollPosition) {
471
464
  var
472
- cachedPosition = scroll || $scroll.scrollTop(),
465
+ cachedPosition = scrollPosition || $scroll.scrollTop(),
473
466
  cache = module.cache,
474
467
  fits = cache.fits,
475
468
  sameHeight = cache.sameHeight,
@@ -816,7 +809,7 @@ $.fn.sticky = function(parameters) {
816
809
  response
817
810
  ;
818
811
  passedArguments = passedArguments || queryArguments;
819
- context = element || context;
812
+ context = context || element;
820
813
  if(typeof query == 'string' && object !== undefined) {
821
814
  query = query.split(/[\. ]/);
822
815
  maxDepth = query.length - 1;
@@ -868,7 +868,7 @@ $.fn.tab = function(parameters) {
868
868
  response
869
869
  ;
870
870
  passedArguments = passedArguments || queryArguments;
871
- context = element || context;
871
+ context = context || element;
872
872
  if(typeof query == 'string' && object !== undefined) {
873
873
  query = query.split(/[\. ]/);
874
874
  maxDepth = query.length - 1;
@@ -23,7 +23,7 @@ window = (typeof window != 'undefined' && window.Math == Math)
23
23
  : Function('return this')()
24
24
  ;
25
25
 
26
- $.fn.toast = function(parameters) {
26
+ $.toast = $.fn.toast = function(parameters) {
27
27
  var
28
28
  $allModules = $(this),
29
29
  moduleSelector = $allModules.selector || '',
@@ -575,7 +575,7 @@ $.fn.toast = function(parameters) {
575
575
  }
576
576
  ;
577
577
  if(shouldEscape.test(string)) {
578
- string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
578
+ string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&amp;");
579
579
  return string.replace(badChars, escapedChar);
580
580
  }
581
581
  return string;
@@ -707,7 +707,7 @@ $.fn.toast = function(parameters) {
707
707
  response
708
708
  ;
709
709
  passedArguments = passedArguments || queryArguments;
710
- context = element || context;
710
+ context = context || element;
711
711
  if(typeof query == 'string' && object !== undefined) {
712
712
  query = query.split(/[\. ]/);
713
713
  maxDepth = query.length - 1;
@@ -86,7 +86,7 @@ $.fn.transition = function() {
86
86
  if(methodInvoked === false) {
87
87
  module.verbose('Converted arguments into settings object', settings);
88
88
  if(settings.interval) {
89
- module.delay(settings.animate);
89
+ module.delay(settings.interval);
90
90
  }
91
91
  else {
92
92
  module.animate();
@@ -153,9 +153,9 @@ $.fn.transition = function() {
153
153
  : settings.interval
154
154
  ;
155
155
  shouldReverse = (settings.reverse == 'auto' && direction == className.outward);
156
- delay = (shouldReverse || settings.reverse == true)
157
- ? ($allModules.length - index) * settings.interval
158
- : index * settings.interval
156
+ delay = (shouldReverse || settings.reverse === true)
157
+ ? ($allModules.length - index) * interval
158
+ : index * interval
159
159
  ;
160
160
  module.debug('Delaying animation by', delay);
161
161
  setTimeout(module.animate, delay);
@@ -792,7 +792,6 @@ $.fn.transition = function() {
792
792
  module.force.hidden();
793
793
  settings.onHidden.call(element);
794
794
  settings.onComplete.call(element);
795
- // module.repaint();
796
795
  },
797
796
 
798
797
  show: function(display) {
@@ -807,7 +806,6 @@ $.fn.transition = function() {
807
806
  module.set.visible();
808
807
  settings.onVisible.call(element);
809
808
  settings.onComplete.call(element);
810
- // module.repaint();
811
809
  },
812
810
 
813
811
  toggle: function() {
@@ -966,7 +964,7 @@ $.fn.transition = function() {
966
964
  response
967
965
  ;
968
966
  passedArguments = passedArguments || queryArguments;
969
- context = element || context;
967
+ context = context || element;
970
968
  if(typeof query == 'string' && object !== undefined) {
971
969
  query = query.split(/[\. ]/);
972
970
  maxDepth = query.length - 1;