fomantic-ui-sass 2.9.2 → 2.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/app/assets/javascripts/semantic-ui/accordion.js +1 -5
  4. data/app/assets/javascripts/semantic-ui/api.js +22 -15
  5. data/app/assets/javascripts/semantic-ui/calendar.js +1 -6
  6. data/app/assets/javascripts/semantic-ui/checkbox.js +4 -6
  7. data/app/assets/javascripts/semantic-ui/dimmer.js +1 -5
  8. data/app/assets/javascripts/semantic-ui/dropdown.js +56 -33
  9. data/app/assets/javascripts/semantic-ui/embed.js +1 -6
  10. data/app/assets/javascripts/semantic-ui/flyout.js +40 -58
  11. data/app/assets/javascripts/semantic-ui/form.js +102 -53
  12. data/app/assets/javascripts/semantic-ui/modal.js +45 -33
  13. data/app/assets/javascripts/semantic-ui/nag.js +17 -9
  14. data/app/assets/javascripts/semantic-ui/popup.js +27 -19
  15. data/app/assets/javascripts/semantic-ui/progress.js +1 -6
  16. data/app/assets/javascripts/semantic-ui/rating.js +1 -5
  17. data/app/assets/javascripts/semantic-ui/search.js +4 -7
  18. data/app/assets/javascripts/semantic-ui/shape.js +1 -5
  19. data/app/assets/javascripts/semantic-ui/sidebar.js +15 -38
  20. data/app/assets/javascripts/semantic-ui/site.js +1 -1
  21. data/app/assets/javascripts/semantic-ui/slider.js +130 -34
  22. data/app/assets/javascripts/semantic-ui/state.js +23 -20
  23. data/app/assets/javascripts/semantic-ui/sticky.js +17 -16
  24. data/app/assets/javascripts/semantic-ui/tab.js +18 -8
  25. data/app/assets/javascripts/semantic-ui/toast.js +17 -9
  26. data/app/assets/javascripts/semantic-ui/transition.js +2 -6
  27. data/app/assets/javascripts/semantic-ui/visibility.js +15 -6
  28. data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +1 -1
  29. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +53 -20
  30. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +107 -107
  31. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +13 -7
  32. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +1 -1
  33. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +65 -1
  34. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +2 -2
  35. data/app/assets/stylesheets/semantic-ui/elements/_container.scss +62 -1
  36. data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +1 -1
  37. data/app/assets/stylesheets/semantic-ui/elements/_emoji.scss +697 -249
  38. data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +3 -2
  39. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +1 -1
  40. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +62 -62
  41. data/app/assets/stylesheets/semantic-ui/elements/_image.scss +1 -1
  42. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +3 -27
  43. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +21 -2
  44. data/app/assets/stylesheets/semantic-ui/elements/_list.scss +13 -13
  45. data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +282 -282
  46. data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +1 -1
  47. data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +1 -1
  48. data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +1 -1
  49. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +161 -34
  50. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +1 -1
  51. data/app/assets/stylesheets/semantic-ui/elements/_text.scss +1 -1
  52. data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +1 -1
  53. data/app/assets/stylesheets/semantic-ui/globals/_site.scss +1 -1
  54. data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +1 -1
  55. data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +145 -8
  56. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +50 -6
  57. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +3 -3
  58. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +119 -26
  59. data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +1 -1
  60. data/app/assets/stylesheets/semantic-ui/modules/_flyout.scss +1 -1
  61. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +10 -3
  62. data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +1 -1
  63. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +41 -40
  64. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +1 -1
  65. data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +1 -1
  66. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +26 -1
  67. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +1 -1
  68. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +1 -1
  69. data/app/assets/stylesheets/semantic-ui/modules/_slider.scss +1 -1
  70. data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +1 -1
  71. data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +1 -1
  72. data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +6 -1
  73. data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -1
  74. data/app/assets/stylesheets/semantic-ui/views/_ad.scss +1 -1
  75. data/app/assets/stylesheets/semantic-ui/views/_card.scss +1 -1
  76. data/app/assets/stylesheets/semantic-ui/views/_comment.scss +6 -1
  77. data/app/assets/stylesheets/semantic-ui/views/_feed.scss +486 -5
  78. data/app/assets/stylesheets/semantic-ui/views/_item.scss +6 -1
  79. data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +1 -1
  80. data/lib/fomantic/ui/sass/version.rb +2 -2
  81. metadata +1 -1
@@ -26,15 +26,25 @@
26
26
  $document = $(document),
27
27
  $body = $('body'),
28
28
 
29
- moduleSelector = $allModules.selector || '',
30
-
31
29
  time = Date.now(),
32
30
  performance = [],
33
31
 
34
32
  query = arguments[0],
35
33
  methodInvoked = typeof query === 'string',
36
34
  queryArguments = [].slice.call(arguments, 1),
35
+ contextCheck = function (context, win) {
36
+ var $context;
37
+ if ([window, document].indexOf(context) >= 0) {
38
+ $context = $body;
39
+ } else {
40
+ $context = $(win.document).find(context);
41
+ if ($context.length === 0) {
42
+ $context = win.frameElement ? contextCheck(context, win.parent) : $body;
43
+ }
44
+ }
37
45
 
46
+ return $context;
47
+ },
38
48
  returnedValue
39
49
  ;
40
50
 
@@ -54,7 +64,7 @@
54
64
  moduleNamespace = 'module-' + namespace,
55
65
 
56
66
  $module = $(this),
57
- $context = [window, document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $body,
67
+ $context = contextCheck(settings.context, window),
58
68
  isBody = $context[0] === $body[0],
59
69
  $closeIcon = $module.find(selector.closeIcon),
60
70
  $inputs,
@@ -78,6 +88,7 @@
78
88
  tempBodyMargin = '',
79
89
  keepScrollingClass = false,
80
90
  hadScrollbar = false,
91
+ windowRefocused = false,
81
92
 
82
93
  elementEventNamespace,
83
94
  id,
@@ -241,6 +252,7 @@
241
252
  .off(eventNamespace)
242
253
  ;
243
254
  $window.off(elementEventNamespace);
255
+ $context.off(elementEventNamespace);
244
256
  $dimmer.off(elementEventNamespace);
245
257
  $closeIcon.off(elementEventNamespace);
246
258
  if ($inputs) {
@@ -262,11 +274,12 @@
262
274
  return nodes;
263
275
  },
264
276
  shouldRefresh = false,
265
- shouldRefreshInputs = false
277
+ shouldRefreshInputs = false,
278
+ ignoreAutofocus = true
266
279
  ;
267
280
  mutations.every(function (mutation) {
268
281
  if (mutation.type === 'attributes') {
269
- if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').length > 0)) {
282
+ if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').filter(':visible').length > 0)) {
270
283
  shouldRefreshInputs = true;
271
284
  }
272
285
  } else {
@@ -277,6 +290,9 @@
277
290
  $removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
278
291
  if ($addedInputs.length > 0 || $removedInputs.length > 0) {
279
292
  shouldRefreshInputs = true;
293
+ if ($addedInputs.filter(':input').length > 0 || $removedInputs.filter(':input').length > 0) {
294
+ ignoreAutofocus = false;
295
+ }
280
296
  }
281
297
  }
282
298
 
@@ -288,7 +304,7 @@
288
304
  module.refresh();
289
305
  }
290
306
  if (shouldRefreshInputs) {
291
- module.refreshInputs();
307
+ module.refreshInputs(ignoreAutofocus);
292
308
  }
293
309
  });
294
310
  observer.observe(element, {
@@ -316,7 +332,7 @@
316
332
  $allModals = $otherModals.add($module);
317
333
  },
318
334
 
319
- refreshInputs: function () {
335
+ refreshInputs: function (ignoreAutofocus) {
320
336
  if ($inputs) {
321
337
  $inputs
322
338
  .off('keydown' + elementEventNamespace)
@@ -325,8 +341,8 @@
325
341
  $inputs = $module.find('a[href], [tabindex], :input:enabled').filter(':visible').filter(function () {
326
342
  return $(this).closest('.disabled').length === 0;
327
343
  });
328
- if ($inputs.length === 0) {
329
- $inputs = $module;
344
+ if ($inputs.filter(':input').length === 0) {
345
+ $inputs = $module.add($inputs);
330
346
  $module.attr('tabindex', -1);
331
347
  } else {
332
348
  $module.removeAttr('tabindex');
@@ -337,7 +353,7 @@
337
353
  $inputs.last()
338
354
  .on('keydown' + elementEventNamespace, module.event.inputKeyDown.last)
339
355
  ;
340
- if (settings.autofocus && $inputs.filter(':focus').length === 0) {
356
+ if (!ignoreAutofocus && settings.autofocus && $inputs.filter(':focus').length === 0) {
341
357
  module.set.autofocus();
342
358
  }
343
359
  },
@@ -375,6 +391,9 @@
375
391
  .on('resize' + elementEventNamespace, module.event.resize)
376
392
  .on('focus' + elementEventNamespace, module.event.focus)
377
393
  ;
394
+ $context
395
+ .on('click' + elementEventNamespace, module.event.click)
396
+ ;
378
397
  },
379
398
  scrollLock: function () {
380
399
  // touch events default to passive, due to changes in chrome to optimize mobile perf
@@ -508,7 +527,7 @@
508
527
  },
509
528
  debounce: function (method, delay) {
510
529
  clearTimeout(module.timer);
511
- module.timer = setTimeout(method, delay);
530
+ module.timer = setTimeout(function () { method(); }, delay);
512
531
  },
513
532
  keyboard: function (event) {
514
533
  var
@@ -532,9 +551,13 @@
532
551
  }
533
552
  },
534
553
  focus: function () {
535
- if ($dimmable.dimmer('is active') && module.is.active() && settings.autofocus) {
554
+ windowRefocused = true;
555
+ },
556
+ click: function (event) {
557
+ if (windowRefocused && document.activeElement !== event.target && $dimmable.dimmer('is active') && module.is.active() && settings.autofocus && $(document.activeElement).closest(selector.modal).length === 0) {
536
558
  requestAnimationFrame(module.set.autofocus);
537
559
  }
560
+ windowRefocused = false;
538
561
  },
539
562
  },
540
563
 
@@ -599,7 +622,7 @@
599
622
  ignoreRepeatedEvents = false;
600
623
  if (settings.allowMultiple) {
601
624
  if (module.others.active()) {
602
- $otherModals.filter('.' + className.active).find(selector.dimmer).addClass('active');
625
+ $otherModals.filter('.' + className.active).find(selector.dimmer).removeClass('out').addClass('transition fade in active');
603
626
  }
604
627
 
605
628
  if (settings.detachable) {
@@ -671,6 +694,8 @@
671
694
  onStart: function () {
672
695
  if (!module.others.active() && !module.others.animating() && !keepDimmed) {
673
696
  module.hideDimmer();
697
+ } else if (settings.allowMultiple) {
698
+ (hideOthersToo ? $allModals : $previousModal).find(selector.dimmer).removeClass('in').addClass('out');
674
699
  }
675
700
  if (settings.keyboardShortcuts && !module.others.active()) {
676
701
  module.remove.keyboardShortcuts();
@@ -683,11 +708,7 @@
683
708
  $previousModal.addClass(className.front);
684
709
  $module.removeClass(className.front);
685
710
 
686
- if (hideOthersToo) {
687
- $allModals.find(selector.dimmer).removeClass('active');
688
- } else {
689
- $previousModal.find(selector.dimmer).removeClass('active');
690
- }
711
+ (hideOthersToo ? $allModals : $previousModal).find(selector.dimmer).removeClass('active');
691
712
  }
692
713
  if (isFunction(settings.onHidden)) {
693
714
  settings.onHidden.call(element);
@@ -1044,20 +1065,14 @@
1044
1065
  var
1045
1066
  $autofocus = $inputs.filter('[autofocus]'),
1046
1067
  $rawInputs = $inputs.filter(':input'),
1047
- $input = $autofocus.length > 0
1048
- ? $autofocus.first()
1068
+ $input = ($autofocus.length > 0
1069
+ ? $autofocus
1049
1070
  : ($rawInputs.length > 0
1050
1071
  ? $rawInputs
1051
- : $inputs.filter(':not(i.close)')
1052
- ).first()
1072
+ : $module)
1073
+ ).first()
1053
1074
  ;
1054
- // check if only the close icon is remaining
1055
- if ($input.length === 0 && $inputs.length > 0) {
1056
- $input = $inputs.first();
1057
- }
1058
- if ($input.length > 0) {
1059
- $input.trigger('focus');
1060
- }
1075
+ $input.trigger('focus');
1061
1076
  },
1062
1077
  bodyMargin: function () {
1063
1078
  var position = module.can.leftBodyScrollbar() ? 'left' : 'right';
@@ -1258,7 +1273,7 @@
1258
1273
  });
1259
1274
  }
1260
1275
  clearTimeout(module.performance.timer);
1261
- module.performance.timer = setTimeout(module.performance.display, 500);
1276
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
1262
1277
  },
1263
1278
  display: function () {
1264
1279
  var
@@ -1271,9 +1286,6 @@
1271
1286
  totalTime += data['Execution Time'];
1272
1287
  });
1273
1288
  title += ' ' + totalTime + 'ms';
1274
- if (moduleSelector) {
1275
- title += ' \'' + moduleSelector + '\'';
1276
- }
1277
1289
  if (performance.length > 0) {
1278
1290
  console.groupCollapsed(title);
1279
1291
  if (console.table) {
@@ -22,7 +22,7 @@
22
22
  $.fn.nag = function (parameters) {
23
23
  var
24
24
  $allModules = $(this),
25
- moduleSelector = $allModules.selector || '',
25
+ $body = $('body'),
26
26
 
27
27
  time = Date.now(),
28
28
  performance = [],
@@ -30,6 +30,19 @@
30
30
  query = arguments[0],
31
31
  methodInvoked = typeof query === 'string',
32
32
  queryArguments = [].slice.call(arguments, 1),
33
+ contextCheck = function (context, win) {
34
+ var $context;
35
+ if ([window, document].indexOf(context) >= 0) {
36
+ $context = $(context);
37
+ } else {
38
+ $context = $(win.document).find(context);
39
+ if ($context.length === 0) {
40
+ $context = win.frameElement ? contextCheck(context, win.parent) : $body;
41
+ }
42
+ }
43
+
44
+ return $context;
45
+ },
33
46
  returnedValue
34
47
  ;
35
48
  $allModules.each(function () {
@@ -47,9 +60,7 @@
47
60
 
48
61
  $module = $(this),
49
62
 
50
- $context = settings.context
51
- ? ([window, document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context))
52
- : $('body'),
63
+ $context = settings.context ? contextCheck(settings.context, window) : $body,
53
64
 
54
65
  element = this,
55
66
  instance = $module.data(moduleNamespace),
@@ -77,7 +88,7 @@
77
88
  }
78
89
 
79
90
  if (settings.displayTime > 0) {
80
- setTimeout(module.hide, settings.displayTime);
91
+ setTimeout(function () { module.hide(); }, settings.displayTime);
81
92
  }
82
93
  module.show();
83
94
  },
@@ -366,7 +377,7 @@
366
377
  });
367
378
  }
368
379
  clearTimeout(module.performance.timer);
369
- module.performance.timer = setTimeout(module.performance.display, 500);
380
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
370
381
  },
371
382
  display: function () {
372
383
  var
@@ -379,9 +390,6 @@
379
390
  totalTime += data['Execution Time'];
380
391
  });
381
392
  title += ' ' + totalTime + 'ms';
382
- if (moduleSelector) {
383
- title += ' \'' + moduleSelector + '\'';
384
- }
385
393
  if (performance.length > 0) {
386
394
  console.groupCollapsed(title);
387
395
  if (console.table) {
@@ -26,8 +26,6 @@
26
26
  $window = $(window),
27
27
  $body = $('body'),
28
28
 
29
- moduleSelector = $allModules.selector || '',
30
-
31
29
  clickEvent = 'ontouchstart' in document.documentElement
32
30
  ? 'touchstart'
33
31
  : 'click',
@@ -38,6 +36,19 @@
38
36
  query = arguments[0],
39
37
  methodInvoked = typeof query === 'string',
40
38
  queryArguments = [].slice.call(arguments, 1),
39
+ contextCheck = function (context, win) {
40
+ var $context;
41
+ if ([window, document].indexOf(context) >= 0) {
42
+ $context = $(context);
43
+ } else {
44
+ $context = $(win.document).find(context);
45
+ if ($context.length === 0) {
46
+ $context = win.frameElement ? contextCheck(context, win.parent) : $body;
47
+ }
48
+ }
49
+
50
+ return $context;
51
+ },
41
52
 
42
53
  returnedValue
43
54
  ;
@@ -57,12 +68,10 @@
57
68
  moduleNamespace = 'module-' + namespace,
58
69
 
59
70
  $module = $(this),
60
- $context = [window, document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $(settings.context),
61
- $scrollContext = [window, document].indexOf(settings.scrollContext) < 0 ? $document.find(settings.scrollContext) : $(settings.scrollContext),
62
- $boundary = [window, document].indexOf(settings.boundary) < 0 ? $document.find(settings.boundary) : $(settings.boundary),
63
- $target = settings.target
64
- ? ([window, document].indexOf(settings.target) < 0 ? $document.find(settings.target) : $(settings.target))
65
- : $module,
71
+ $context = contextCheck(settings.context, window),
72
+ $scrollContext = contextCheck(settings.scrollContext, window),
73
+ $boundary = contextCheck(settings.boundary, window),
74
+ $target = settings.target ? contextCheck(settings.target, window) : $module,
66
75
 
67
76
  $popup,
68
77
  $offsetParent,
@@ -185,7 +194,7 @@
185
194
  ;
186
195
  clearTimeout(module.hideTimer);
187
196
  if (!openedWithTouch || (openedWithTouch && settings.addTouchEvents)) {
188
- module.showTimer = setTimeout(module.show, delay);
197
+ module.showTimer = setTimeout(function () { module.show(); }, delay);
189
198
  }
190
199
  },
191
200
  end: function () {
@@ -195,7 +204,7 @@
195
204
  : settings.delay
196
205
  ;
197
206
  clearTimeout(module.showTimer);
198
- module.hideTimer = setTimeout(module.hide, delay);
207
+ module.hideTimer = setTimeout(function () { module.hide(); }, delay);
199
208
  },
200
209
  touchstart: function (event) {
201
210
  openedWithTouch = true;
@@ -239,9 +248,11 @@
239
248
  // generates popup html from metadata
240
249
  create: function () {
241
250
  var
251
+ targetSibling = $target.next(selector.popup),
252
+ contentFallback = !settings.popup && targetSibling.length === 0 ? $module.attr('title') : false,
242
253
  html = module.get.html(),
243
254
  title = module.get.title(),
244
- content = module.get.content()
255
+ content = module.get.content(contentFallback)
245
256
  ;
246
257
 
247
258
  if (html || content || title) {
@@ -282,10 +293,10 @@
282
293
  if (settings.hoverable) {
283
294
  module.bind.popup();
284
295
  }
285
- } else if ($target.next(selector.popup).length > 0) {
296
+ } else if (targetSibling.length > 0) {
286
297
  module.verbose('Pre-existing popup found');
287
298
  settings.inline = true;
288
- settings.popup = $target.next(selector.popup).data(metadata.activator, $module);
299
+ settings.popup = targetSibling.data(metadata.activator, $module);
289
300
  module.refresh();
290
301
  if (settings.hoverable) {
291
302
  module.bind.popup();
@@ -475,10 +486,10 @@
475
486
 
476
487
  return $module.data(metadata.title) || settings.title;
477
488
  },
478
- content: function () {
489
+ content: function (fallback) {
479
490
  $module.removeData(metadata.content);
480
491
 
481
- return $module.data(metadata.content) || settings.content || $module.attr('title');
492
+ return $module.data(metadata.content) || settings.content || fallback;
482
493
  },
483
494
  variation: function () {
484
495
  $module.removeData(metadata.variation);
@@ -1233,7 +1244,7 @@
1233
1244
  });
1234
1245
  }
1235
1246
  clearTimeout(module.performance.timer);
1236
- module.performance.timer = setTimeout(module.performance.display, 500);
1247
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
1237
1248
  },
1238
1249
  display: function () {
1239
1250
  var
@@ -1246,9 +1257,6 @@
1246
1257
  totalTime += data['Execution Time'];
1247
1258
  });
1248
1259
  title += ' ' + totalTime + 'ms';
1249
- if (moduleSelector) {
1250
- title += ' \'' + moduleSelector + '\'';
1251
- }
1252
1260
  if (performance.length > 0) {
1253
1261
  console.groupCollapsed(title);
1254
1262
  if (console.table) {
@@ -23,8 +23,6 @@
23
23
  var
24
24
  $allModules = $(this),
25
25
 
26
- moduleSelector = $allModules.selector || '',
27
-
28
26
  time = Date.now(),
29
27
  performance = [],
30
28
 
@@ -793,7 +791,7 @@
793
791
  });
794
792
  }
795
793
  clearTimeout(module.performance.timer);
796
- module.performance.timer = setTimeout(module.performance.display, 500);
794
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
797
795
  },
798
796
  display: function () {
799
797
  var
@@ -806,9 +804,6 @@
806
804
  totalTime += data['Execution Time'];
807
805
  });
808
806
  title += ' ' + totalTime + 'ms';
809
- if (moduleSelector) {
810
- title += ' \'' + moduleSelector + '\'';
811
- }
812
807
  if (performance.length > 0) {
813
808
  console.groupCollapsed(title);
814
809
  if (console.table) {
@@ -22,7 +22,6 @@
22
22
  $.fn.rating = function (parameters) {
23
23
  var
24
24
  $allModules = $(this),
25
- moduleSelector = $allModules.selector || '',
26
25
 
27
26
  time = Date.now(),
28
27
  performance = [],
@@ -369,7 +368,7 @@
369
368
  });
370
369
  }
371
370
  clearTimeout(module.performance.timer);
372
- module.performance.timer = setTimeout(module.performance.display, 500);
371
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
373
372
  },
374
373
  display: function () {
375
374
  var
@@ -382,9 +381,6 @@
382
381
  totalTime += data['Execution Time'];
383
382
  });
384
383
  title += ' ' + totalTime + 'ms';
385
- if (moduleSelector) {
386
- title += ' \'' + moduleSelector + '\'';
387
- }
388
384
  if ($allModules.length > 1) {
389
385
  title += ' (' + $allModules.length + ')';
390
386
  }
@@ -22,7 +22,6 @@
22
22
  $.fn.search = function (parameters) {
23
23
  var
24
24
  $allModules = $(this),
25
- moduleSelector = $allModules.selector || '',
26
25
 
27
26
  time = Date.now(),
28
27
  performance = [],
@@ -170,7 +169,7 @@
170
169
  callback = function () {
171
170
  module.cancel.query();
172
171
  module.remove.focus();
173
- module.timer = setTimeout(module.hideResults, settings.hideDelay);
172
+ module.timer = setTimeout(function () { module.hideResults(); }, settings.hideDelay);
174
173
  }
175
174
  ;
176
175
  if (pageLostFocus) {
@@ -562,6 +561,7 @@
562
561
  if (cache) {
563
562
  module.debug('Reading result from cache', searchTerm);
564
563
  module.save.results(cache.results);
564
+ settings.onResults.call(element, cache.results, true);
565
565
  module.addResults(cache.html);
566
566
  module.inject.id(cache.results);
567
567
  callback();
@@ -1171,7 +1171,7 @@
1171
1171
  });
1172
1172
  }
1173
1173
  clearTimeout(module.performance.timer);
1174
- module.performance.timer = setTimeout(module.performance.display, 500);
1174
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
1175
1175
  },
1176
1176
  display: function () {
1177
1177
  var
@@ -1184,9 +1184,6 @@
1184
1184
  totalTime += data['Execution Time'];
1185
1185
  });
1186
1186
  title += ' ' + totalTime + 'ms';
1187
- if (moduleSelector) {
1188
- title += ' \'' + moduleSelector + '\'';
1189
- }
1190
1187
  if ($allModules.length > 1) {
1191
1188
  title += ' (' + $allModules.length + ')';
1192
1189
  }
@@ -1349,7 +1346,7 @@
1349
1346
  onResultsAdd: false,
1350
1347
 
1351
1348
  onSearchQuery: function (query) {},
1352
- onResults: function (response) {},
1349
+ onResults: function (response, fromCache) {},
1353
1350
 
1354
1351
  onResultsOpen: function () {},
1355
1352
  onResultsClose: function () {},
@@ -35,7 +35,6 @@
35
35
 
36
36
  $allModules.each(function () {
37
37
  var
38
- moduleSelector = $allModules.selector || '',
39
38
  settings = $.isPlainObject(parameters)
40
39
  ? $.extend(true, {}, $.fn.shape.settings, parameters)
41
40
  : $.extend({}, $.fn.shape.settings),
@@ -624,7 +623,7 @@
624
623
  });
625
624
  }
626
625
  clearTimeout(module.performance.timer);
627
- module.performance.timer = setTimeout(module.performance.display, 500);
626
+ module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
628
627
  },
629
628
  display: function () {
630
629
  var
@@ -637,9 +636,6 @@
637
636
  totalTime += data['Execution Time'];
638
637
  });
639
638
  title += ' ' + totalTime + 'ms';
640
- if (moduleSelector) {
641
- title += ' \'' + moduleSelector + '\'';
642
- }
643
639
  if ($allModules.length > 1) {
644
640
  title += ' (' + $allModules.length + ')';
645
641
  }