fomantic-ui-sass 2.8.8.1 → 2.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/app/assets/fonts/semantic-ui/brand-icons.eot +0 -0
  4. data/app/assets/fonts/semantic-ui/brand-icons.svg +41 -6
  5. data/app/assets/fonts/semantic-ui/brand-icons.ttf +0 -0
  6. data/app/assets/fonts/semantic-ui/brand-icons.woff +0 -0
  7. data/app/assets/fonts/semantic-ui/brand-icons.woff2 +0 -0
  8. data/app/assets/fonts/semantic-ui/icons.eot +0 -0
  9. data/app/assets/fonts/semantic-ui/icons.svg +245 -7
  10. data/app/assets/fonts/semantic-ui/icons.ttf +0 -0
  11. data/app/assets/fonts/semantic-ui/icons.woff +0 -0
  12. data/app/assets/fonts/semantic-ui/icons.woff2 +0 -0
  13. data/app/assets/fonts/semantic-ui/outline-icons.eot +0 -0
  14. data/app/assets/fonts/semantic-ui/outline-icons.svg +2 -2
  15. data/app/assets/fonts/semantic-ui/outline-icons.ttf +0 -0
  16. data/app/assets/fonts/semantic-ui/outline-icons.woff +0 -0
  17. data/app/assets/fonts/semantic-ui/outline-icons.woff2 +0 -0
  18. data/app/assets/javascripts/semantic-ui/accordion.js +9 -3
  19. data/app/assets/javascripts/semantic-ui/api.js +92 -33
  20. data/app/assets/javascripts/semantic-ui/calendar.js +200 -82
  21. data/app/assets/javascripts/semantic-ui/checkbox.js +20 -13
  22. data/app/assets/javascripts/semantic-ui/dimmer.js +24 -9
  23. data/app/assets/javascripts/semantic-ui/dropdown.js +250 -205
  24. data/app/assets/javascripts/semantic-ui/embed.js +13 -9
  25. data/app/assets/javascripts/semantic-ui/flyout.js +1530 -0
  26. data/app/assets/javascripts/semantic-ui/form.js +47 -41
  27. data/app/assets/javascripts/semantic-ui/modal.js +187 -83
  28. data/app/assets/javascripts/semantic-ui/nag.js +2 -2
  29. data/app/assets/javascripts/semantic-ui/popup.js +16 -22
  30. data/app/assets/javascripts/semantic-ui/progress.js +7 -4
  31. data/app/assets/javascripts/semantic-ui/rating.js +7 -3
  32. data/app/assets/javascripts/semantic-ui/search.js +47 -20
  33. data/app/assets/javascripts/semantic-ui/shape.js +3 -3
  34. data/app/assets/javascripts/semantic-ui/sidebar.js +140 -43
  35. data/app/assets/javascripts/semantic-ui/site.js +1 -1
  36. data/app/assets/javascripts/semantic-ui/slider.js +78 -63
  37. data/app/assets/javascripts/semantic-ui/state.js +2 -2
  38. data/app/assets/javascripts/semantic-ui/sticky.js +30 -19
  39. data/app/assets/javascripts/semantic-ui/tab.js +24 -6
  40. data/app/assets/javascripts/semantic-ui/toast.js +67 -33
  41. data/app/assets/javascripts/semantic-ui/transition.js +27 -22
  42. data/app/assets/javascripts/semantic-ui/visibility.js +5 -5
  43. data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +1 -1
  44. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +160 -83
  45. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +25 -21
  46. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +110 -78
  47. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +43 -43
  48. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +1684 -272
  49. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +204 -157
  50. data/app/assets/stylesheets/semantic-ui/elements/_container.scss +98 -4
  51. data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +31 -31
  52. data/app/assets/stylesheets/semantic-ui/elements/_emoji.scss +10799 -8841
  53. data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +1021 -915
  54. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +6 -4
  55. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +2110 -2061
  56. data/app/assets/stylesheets/semantic-ui/elements/_image.scss +1 -1
  57. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +759 -22
  58. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +72 -68
  59. data/app/assets/stylesheets/semantic-ui/elements/_list.scss +31 -31
  60. data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +352 -352
  61. data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +33 -33
  62. data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +1 -1
  63. data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +1 -1
  64. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +118 -34
  65. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +32 -32
  66. data/app/assets/stylesheets/semantic-ui/elements/_text.scss +1 -1
  67. data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +5 -4
  68. data/app/assets/stylesheets/semantic-ui/globals/_site.scss +139 -42
  69. data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +177 -37
  70. data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +18 -1
  71. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +93 -92
  72. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +33 -18
  73. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +101 -51
  74. data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +5 -5
  75. data/app/assets/stylesheets/semantic-ui/modules/_flyout.scss +592 -0
  76. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +37 -6
  77. data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +1 -1
  78. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +103 -105
  79. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +1 -1
  80. data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +7 -46
  81. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +6 -6
  82. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +1 -1
  83. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +23 -9
  84. data/app/assets/stylesheets/semantic-ui/modules/_slider.scss +17 -17
  85. data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +1 -1
  86. data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +5 -5
  87. data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +49 -1
  88. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -1
  89. data/app/assets/stylesheets/semantic-ui/views/_ad.scss +4 -4
  90. data/app/assets/stylesheets/semantic-ui/views/_card.scss +754 -117
  91. data/app/assets/stylesheets/semantic-ui/views/_comment.scss +12 -12
  92. data/app/assets/stylesheets/semantic-ui/views/_feed.scss +29 -29
  93. data/app/assets/stylesheets/semantic-ui/views/_item.scss +17 -17
  94. data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +4 -4
  95. data/lib/fomantic/ui/sass/version.rb +2 -2
  96. metadata +5 -3
@@ -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 || '',
@@ -61,7 +61,7 @@ $.fn.toast = function(parameters) {
61
61
  $animationObject,
62
62
  $close,
63
63
  $context = (settings.context)
64
- ? $(settings.context)
64
+ ? ([window,document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context))
65
65
  : $('body'),
66
66
 
67
67
  isToastComponent = $module.hasClass('toast') || $module.hasClass('message') || $module.hasClass('card'),
@@ -69,12 +69,14 @@ $.fn.toast = function(parameters) {
69
69
  element = this,
70
70
  instance = isToastComponent ? $module.data(moduleNamespace) : undefined,
71
71
 
72
+ id,
72
73
  module
73
74
  ;
74
75
  module = {
75
76
 
76
77
  initialize: function() {
77
78
  module.verbose('Initializing element');
79
+ module.create.id();
78
80
  if (!module.has.container()) {
79
81
  module.create.container();
80
82
  }
@@ -124,17 +126,22 @@ $.fn.toast = function(parameters) {
124
126
  },
125
127
 
126
128
  show: function(callback) {
127
- callback = callback || function(){};
128
- module.debug('Showing toast');
129
129
  if(settings.onShow.call($toastBox, element) === false) {
130
130
  module.debug('onShow callback returned false, cancelling toast animation');
131
131
  return;
132
132
  }
133
+ callback = callback || function(){};
134
+ module.debug('Showing toast');
133
135
  module.animate.show(callback);
134
136
  },
135
137
 
136
138
  close: function(callback) {
139
+ if(settings.onHide.call($toastBox, element) === false) {
140
+ module.debug('onHide callback returned false, cancelling toast animation');
141
+ return;
142
+ }
137
143
  callback = callback || function(){};
144
+ module.debug('Closing toast');
138
145
  module.remove.visible();
139
146
  module.unbind.events();
140
147
  module.animate.close(callback);
@@ -144,14 +151,18 @@ $.fn.toast = function(parameters) {
144
151
  create: {
145
152
  container: function() {
146
153
  module.verbose('Creating container');
147
- $context.append($('<div/>',{class: settings.position + ' ' + className.container + ' ' +(settings.horizontal ? className.horizontal : '')}));
154
+ $context.append($('<div/>',{class: settings.position + ' ' + className.container + ' ' +(settings.horizontal ? className.horizontal : '') + ' ' + (settings.context && settings.context !== 'body' ? className.absolute : '')}));
155
+ },
156
+ id: function() {
157
+ id = (Math.random().toString(16) + '000000000').slice(2, 10);
158
+ module.verbose('Creating unique id for element', id);
148
159
  },
149
160
  toast: function() {
150
161
  $toastBox = $('<div/>', {class: className.box});
151
162
  var iconClass = module.get.iconClass();
152
163
  if (!isToastComponent) {
153
164
  module.verbose('Creating toast');
154
- $toast = $('<div/>');
165
+ $toast = $('<div/>', {role: 'alert'});
155
166
  var $content = $('<div/>', {class: className.content});
156
167
  if (iconClass !== '') {
157
168
  $toast.append($('<i/>', {class: iconClass + ' ' + className.icon}));
@@ -164,13 +175,21 @@ $.fn.toast = function(parameters) {
164
175
  }));
165
176
  }
166
177
  if (settings.title !== '') {
178
+ var titleId = '_' + module.get.id() + 'title';
179
+ $toast.attr('aria-labelledby', titleId);
167
180
  $content.append($('<div/>', {
168
181
  class: className.title,
169
- text: settings.title
182
+ id: titleId,
183
+ html: module.helpers.escape(settings.title, settings.preserveHTML)
170
184
  }));
171
185
  }
172
-
173
- $content.append($('<div/>', {class: className.message, html: module.helpers.escape(settings.message, settings.preserveHTML)}));
186
+ var descId = '_' + module.get.id() + 'desc';
187
+ $toast.attr('aria-describedby', descId);
188
+ $content.append($('<div/>', {
189
+ class: className.message,
190
+ id: descId,
191
+ html: module.helpers.escape(settings.message, settings.preserveHTML)
192
+ }));
174
193
 
175
194
  $toast
176
195
  .addClass(settings.class + ' ' + className.toast)
@@ -178,7 +197,7 @@ $.fn.toast = function(parameters) {
178
197
  ;
179
198
  $toast.css('opacity', settings.opacity);
180
199
  if (settings.closeIcon) {
181
- $close = $('<i/>', {class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : '')});
200
+ $close = $('<i/>', {class: className.close + ' ' + (typeof settings.closeIcon === 'string' ? settings.closeIcon : ''), role: 'button', tabindex: 0, 'aria-label': settings.text.close});
182
201
  if($close.hasClass(className.left)) {
183
202
  $toast.prepend($close);
184
203
  } else {
@@ -221,15 +240,17 @@ $.fn.toast = function(parameters) {
221
240
  }
222
241
  }
223
242
  settings.actions.forEach(function (el) {
224
- var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
243
+ var icon = el[fields.icon] ? '<i '+(el[fields.text] ? 'aria-hidden="true"' : '')+' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
225
244
  text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
226
245
  cls = module.helpers.deQuote(el[fields.class] || ''),
227
246
  click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
228
247
  $actions.append($('<button/>', {
229
248
  html: icon + text,
249
+ 'aria-label': (el[fields.text] || el[fields.icon] || '').replace(/<[^>]+(>|$)/g,''),
230
250
  class: className.button + ' ' + cls,
231
251
  click: function () {
232
- if (click.call(element, $module) === false) {
252
+ var button = $(this);
253
+ if (button.is(selector.approve) || button.is(selector.deny) || click.call(element, $module) === false) {
233
254
  return;
234
255
  }
235
256
  module.close();
@@ -329,13 +350,12 @@ $.fn.toast = function(parameters) {
329
350
  bind: {
330
351
  events: function() {
331
352
  module.debug('Binding events to toast');
332
- if(settings.closeOnClick || settings.closeIcon) {
333
- (settings.closeIcon ? $close : $toast)
334
- .on('click' + eventNamespace, module.event.click)
335
- ;
353
+ if(settings.closeIcon) {
354
+ $close.on('click' + eventNamespace, module.event.close);
336
355
  }
356
+ $toast.on('click' + eventNamespace, module.event.click);
337
357
  if($animationObject) {
338
- $animationObject.on('animationend' + eventNamespace, module.close);
358
+ $animationObject.on('animationend' + eventNamespace, module.event.close);
339
359
  }
340
360
  $toastBox
341
361
  .on('click' + eventNamespace, selector.approve, module.event.approve)
@@ -347,11 +367,10 @@ $.fn.toast = function(parameters) {
347
367
  unbind: {
348
368
  events: function() {
349
369
  module.debug('Unbinding events to toast');
350
- if(settings.closeOnClick || settings.closeIcon) {
351
- (settings.closeIcon ? $close : $toast)
352
- .off('click' + eventNamespace)
353
- ;
370
+ if(settings.closeIcon) {
371
+ $close.off('click' + eventNamespace);
354
372
  }
373
+ $toast.off('click' + eventNamespace);
355
374
  if($animationObject) {
356
375
  $animationObject.off('animationend' + eventNamespace);
357
376
  }
@@ -372,6 +391,7 @@ $.fn.toast = function(parameters) {
372
391
  queue : false,
373
392
  debug : settings.debug,
374
393
  verbose : settings.verbose,
394
+ silent : settings.silent,
375
395
  duration : settings.transition.showDuration,
376
396
  onComplete : function() {
377
397
  callback.call($toastBox, element);
@@ -383,11 +403,6 @@ $.fn.toast = function(parameters) {
383
403
  },
384
404
  close: function(callback) {
385
405
  callback = $.isFunction(callback) ? callback : function(){};
386
- module.debug('Closing toast');
387
- if(settings.onHide.call($toastBox, element) === false) {
388
- module.debug('onHide callback returned false, cancelling toast animation');
389
- return;
390
- }
391
406
  if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) {
392
407
  $toastBox
393
408
  .transition({
@@ -396,6 +411,7 @@ $.fn.toast = function(parameters) {
396
411
  duration : settings.transition.hideDuration,
397
412
  debug : settings.debug,
398
413
  verbose : settings.verbose,
414
+ silent : settings.silent,
399
415
  interval : 50,
400
416
 
401
417
  onBeforeHide: function(callback){
@@ -443,7 +459,7 @@ $.fn.toast = function(parameters) {
443
459
  has: {
444
460
  container: function() {
445
461
  module.verbose('Determining if there is already a container');
446
- return ($context.find(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : '')).length > 0);
462
+ return module.get.containers().length > 0;
447
463
  },
448
464
  toast: function(){
449
465
  return !!module.get.toast();
@@ -457,8 +473,14 @@ $.fn.toast = function(parameters) {
457
473
  },
458
474
 
459
475
  get: {
476
+ id: function() {
477
+ return id;
478
+ },
479
+ containers: function() {
480
+ return $context.children(module.helpers.toClass(settings.position) + selector.container + (settings.horizontal ? module.helpers.toClass(className.horizontal) : ':not('+module.helpers.toClass(className.horizontal)+')') + (settings.context && settings.context !== 'body' ? module.helpers.toClass(className.absolute) : ':not('+module.helpers.toClass(className.absolute)+')'));
481
+ },
460
482
  container: function() {
461
- return ($context.find(module.helpers.toClass(settings.position) + selector.container)[0]);
483
+ return module.get.containers()[0];
462
484
  },
463
485
  toastBox: function() {
464
486
  return $toastBox || null;
@@ -490,9 +512,15 @@ $.fn.toast = function(parameters) {
490
512
  },
491
513
 
492
514
  event: {
515
+ close: function(){
516
+ module.close();
517
+ },
493
518
  click: function(event) {
494
- if($(event.target).closest('a').length === 0) {
495
- settings.onClick.call($toastBox, element);
519
+ if($(event.target).closest(selector.clickable).length === 0) {
520
+ if(settings.onClick.call($toastBox, element) === false || !settings.closeOnClick) {
521
+ module.verbose('Click callback returned false or close denied by setting cancelling close');
522
+ return;
523
+ }
496
524
  module.close();
497
525
  }
498
526
  },
@@ -515,7 +543,7 @@ $.fn.toast = function(parameters) {
515
543
  helpers: {
516
544
  toClass: function(selector) {
517
545
  var
518
- classes = selector.split(' '),
546
+ classes = selector.trim().split(/\s+/),
519
547
  result = ''
520
548
  ;
521
549
 
@@ -547,7 +575,7 @@ $.fn.toast = function(parameters) {
547
575
  }
548
576
  ;
549
577
  if(shouldEscape.test(string)) {
550
- string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
578
+ string = string.replace(/&(?![a-z0-9#]{1,12};)/gi, "&amp;");
551
579
  return string.replace(badChars, escapedChar);
552
580
  }
553
581
  return string;
@@ -679,7 +707,7 @@ $.fn.toast = function(parameters) {
679
707
  response
680
708
  ;
681
709
  passedArguments = passedArguments || queryArguments;
682
- context = element || context;
710
+ context = context || element;
683
711
  if(typeof query == 'string' && object !== undefined) {
684
712
  query = query.split(/[\. ]/);
685
713
  maxDepth = query.length - 1;
@@ -805,6 +833,7 @@ $.fn.toast.settings = {
805
833
 
806
834
  className : {
807
835
  container : 'ui toast-container',
836
+ absolute : 'absolute',
808
837
  box : 'floating toast-box',
809
838
  progress : 'ui attached active progress',
810
839
  toast : 'ui toast',
@@ -833,6 +862,10 @@ $.fn.toast.settings = {
833
862
  unclickable : 'unclickable'
834
863
  },
835
864
 
865
+ text: {
866
+ close : 'Close'
867
+ },
868
+
836
869
  icons : {
837
870
  info : 'info',
838
871
  success : 'checkmark',
@@ -849,6 +882,7 @@ $.fn.toast.settings = {
849
882
  image : '> img.image, > .image > img',
850
883
  icon : '> i.icon',
851
884
  input : 'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',
885
+ clickable : 'a, details, .ui.accordion',
852
886
  approve : '.actions .positive, .actions .approve, .actions .ok',
853
887
  deny : '.actions .negative, .actions .deny, .actions .cancel'
854
888
  },
@@ -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);
@@ -698,11 +698,13 @@ $.fn.transition = function() {
698
698
  .addClass(className.transition)
699
699
  .css('animationName')
700
700
  ;
701
+ $clone.detach().insertAfter($module);
701
702
  inAnimation = $clone
702
703
  .addClass(className.inward)
703
704
  .css('animationName')
704
705
  ;
705
706
  if(!displayType) {
707
+ $clone.detach().insertAfter($module);
706
708
  displayType = $clone
707
709
  .attr('class', elementClass)
708
710
  .removeAttr('style')
@@ -771,6 +773,10 @@ $.fn.transition = function() {
771
773
  },
772
774
 
773
775
  hide: function() {
776
+ if(settings.onHide.call(element) === false) {
777
+ module.verbose('Hide callback returned false cancelling hide');
778
+ return false;
779
+ }
774
780
  module.verbose('Hiding element');
775
781
  if( module.is.animating() ) {
776
782
  module.reset();
@@ -778,35 +784,30 @@ $.fn.transition = function() {
778
784
  element.blur(); // IE will trigger focus change if element is not blurred before hiding
779
785
  module.remove.display();
780
786
  module.remove.visible();
781
- if($.isFunction(settings.onBeforeHide)){
782
- settings.onBeforeHide.call(element,function(){
783
- module.hideNow();
784
- });
785
- } else {
786
- module.hideNow();
787
- }
788
-
787
+ settings.onBeforeHide.call(element, module.hideNow);
789
788
  },
790
789
 
791
790
  hideNow: function() {
792
791
  module.set.hidden();
793
792
  module.force.hidden();
794
- settings.onHide.call(element);
793
+ settings.onHidden.call(element);
795
794
  settings.onComplete.call(element);
796
- // module.repaint();
797
795
  },
798
796
 
799
797
  show: function(display) {
800
- module.verbose('Showing element', display);
801
- if(module.force.visible()) {
798
+ if(module.force.visible() && settings.onShow.call(element) !== false) {
799
+ module.verbose('Showing element', display);
802
800
  module.remove.hidden();
803
- module.set.visible();
804
- settings.onShow.call(element);
805
- settings.onComplete.call(element);
806
- // module.repaint();
801
+ settings.onBeforeShow.call(element, module.showNow);
807
802
  }
808
803
  },
809
804
 
805
+ showNow: function(){
806
+ module.set.visible();
807
+ settings.onVisible.call(element);
808
+ settings.onComplete.call(element);
809
+ },
810
+
810
811
  toggle: function() {
811
812
  if( module.is.visible() ) {
812
813
  module.hide();
@@ -963,7 +964,7 @@ $.fn.transition = function() {
963
964
  response
964
965
  ;
965
966
  passedArguments = passedArguments || queryArguments;
966
- context = element || context;
967
+ context = context || element;
967
968
  if(typeof query == 'string' && object !== undefined) {
968
969
  query = query.split(/[\. ]/);
969
970
  maxDepth = query.length - 1;
@@ -1055,7 +1056,11 @@ $.fn.transition.settings = {
1055
1056
  onStart : function() {},
1056
1057
  onComplete : function() {},
1057
1058
  onShow : function() {},
1059
+ onBeforeShow : function(callback) {callback.call(this)},
1060
+ onVisible : function() {},
1058
1061
  onHide : function() {},
1062
+ onHidden : function() {},
1063
+ onBeforeHide : function(callback) {callback.call(this)},
1059
1064
 
1060
1065
  // whether timeout should be used to ensure callback fires in cases animationend does not
1061
1066
  useFailSafe : true,
@@ -1097,7 +1102,7 @@ $.fn.transition.settings = {
1097
1102
 
1098
1103
  // possible errors
1099
1104
  error: {
1100
- noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.',
1105
+ noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production.',
1101
1106
  repeated : 'That animation is already occurring, cancelling repeated animation',
1102
1107
  method : 'The method you called is not defined',
1103
1108
  support : 'This browser does not support CSS animations'
@@ -58,7 +58,7 @@ $.fn.visibility = function(parameters) {
58
58
  $window = $(window),
59
59
 
60
60
  $module = $(this),
61
- $context = $(settings.context),
61
+ $context = [window,document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context),
62
62
 
63
63
  $placeholder,
64
64
 
@@ -428,7 +428,7 @@ $.fn.visibility = function(parameters) {
428
428
  },
429
429
  verticallyScrollableContext: function() {
430
430
  var
431
- overflowY = ($context.get(0) !== window)
431
+ overflowY = ($context[0] !== window)
432
432
  ? $context.css('overflow-y')
433
433
  : false
434
434
  ;
@@ -436,7 +436,7 @@ $.fn.visibility = function(parameters) {
436
436
  },
437
437
  horizontallyScrollableContext: function() {
438
438
  var
439
- overflowX = ($context.get(0) !== window)
439
+ overflowX = ($context[0] !== window)
440
440
  ? $context.css('overflow-x')
441
441
  : false
442
442
  ;
@@ -1139,7 +1139,7 @@ $.fn.visibility = function(parameters) {
1139
1139
  response
1140
1140
  ;
1141
1141
  passedArguments = passedArguments || queryArguments;
1142
- context = element || context;
1142
+ context = context || element;
1143
1143
  if(typeof query == 'string' && object !== undefined) {
1144
1144
  query = query.split(/[\. ]/);
1145
1145
  maxDepth = query.length - 1;
@@ -1237,7 +1237,7 @@ $.fn.visibility.settings = {
1237
1237
  // callback should only occur one time
1238
1238
  once : true,
1239
1239
 
1240
- // callback should fire continuously whe evaluates to true
1240
+ // callback should fire continuously when evaluates to true
1241
1241
  continuous : false,
1242
1242
 
1243
1243
  // offset to use with scroll top
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.8.8 - Breadcrumb
2
+ * # Fomantic-UI 2.9.0 - Breadcrumb
3
3
  * http://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *