less-rails-semantic_ui 1.2.0.0 → 1.3.1.0

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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/assets/javascripts/semantic_ui/definitions/behaviors/api.js +1 -0
  3. data/assets/javascripts/semantic_ui/definitions/behaviors/form.js +8 -4
  4. data/assets/javascripts/semantic_ui/definitions/behaviors/visibility.js +36 -17
  5. data/assets/javascripts/semantic_ui/definitions/behaviors/visit.js +2 -2
  6. data/assets/javascripts/semantic_ui/definitions/modules/accordion.js +2 -1
  7. data/assets/javascripts/semantic_ui/definitions/modules/checkbox.js +2 -1
  8. data/assets/javascripts/semantic_ui/definitions/modules/dimmer.js +1 -0
  9. data/assets/javascripts/semantic_ui/definitions/modules/dropdown.js +206 -108
  10. data/assets/javascripts/semantic_ui/definitions/modules/modal.js +79 -61
  11. data/assets/javascripts/semantic_ui/definitions/modules/sidebar.js +41 -5
  12. data/assets/javascripts/semantic_ui/definitions/modules/transition.js +1 -1
  13. data/assets/javascripts/semantic_ui/definitions/modules/video.js +1 -0
  14. data/assets/stylesheets/semantic_ui/definitions/collections/form.less +6 -4
  15. data/assets/stylesheets/semantic_ui/definitions/collections/grid.less +104 -99
  16. data/assets/stylesheets/semantic_ui/definitions/collections/table.less +155 -40
  17. data/assets/stylesheets/semantic_ui/definitions/elements/button.less +3 -2
  18. data/assets/stylesheets/semantic_ui/definitions/elements/image.less +28 -2
  19. data/assets/stylesheets/semantic_ui/definitions/elements/label.less +17 -1
  20. data/assets/stylesheets/semantic_ui/definitions/elements/segment.less +0 -4
  21. data/assets/stylesheets/semantic_ui/definitions/elements/step.less +82 -10
  22. data/assets/stylesheets/semantic_ui/definitions/modules/dropdown.less +31 -3
  23. data/assets/stylesheets/semantic_ui/definitions/modules/modal.less +0 -6
  24. data/assets/stylesheets/semantic_ui/definitions/modules/sidebar.less +6 -2
  25. data/assets/stylesheets/semantic_ui/themes/default/collections/table.variables +2 -2
  26. data/assets/stylesheets/semantic_ui/themes/default/elements/button.variables +1 -1
  27. data/assets/stylesheets/semantic_ui/themes/default/elements/step.variables +8 -3
  28. data/assets/stylesheets/semantic_ui/themes/default/globals/site.variables +1 -0
  29. data/assets/stylesheets/semantic_ui/themes/default/modules/dropdown.overrides +5 -0
  30. data/assets/stylesheets/semantic_ui/themes/default/modules/dropdown.variables +9 -0
  31. data/assets/stylesheets/semantic_ui/themes/default/modules/modal.variables +0 -3
  32. data/less-rails-semantic_ui.gemspec +2 -2
  33. metadata +4 -4
@@ -60,9 +60,11 @@ $.fn.dropdown = function(parameters) {
60
60
 
61
61
  activated = false,
62
62
  itemActivated = false,
63
-
64
63
  element = this,
65
64
  instance = $module.data(moduleNamespace),
65
+
66
+ elementNamespace,
67
+ id,
66
68
  observer,
67
69
  module
68
70
  ;
@@ -75,6 +77,8 @@ $.fn.dropdown = function(parameters) {
75
77
  module.save.defaults();
76
78
  module.set.selected();
77
79
 
80
+ module.create.id();
81
+
78
82
  if(hasTouch) {
79
83
  module.bind.touchEvents();
80
84
  }
@@ -100,6 +104,9 @@ $.fn.dropdown = function(parameters) {
100
104
  .off(eventNamespace)
101
105
  .removeData(moduleNamespace)
102
106
  ;
107
+ $document
108
+ .off(elementNamespace)
109
+ ;
103
110
  },
104
111
 
105
112
  observeChanges: function() {
@@ -116,6 +123,30 @@ $.fn.dropdown = function(parameters) {
116
123
  }
117
124
  },
118
125
 
126
+ create: {
127
+ id: function() {
128
+ module.verbose('Creating unique id for element');
129
+ id = module.get.uniqueID();
130
+ elementNamespace = '.' + id;
131
+ }
132
+ },
133
+
134
+ search: function() {
135
+ var
136
+ query
137
+ ;
138
+ query = $search.val();
139
+
140
+ module.verbose('Searching for query', query);
141
+
142
+ if(module.is.searchSelection()) {
143
+ module.filter(query);
144
+ if( module.can.show() ) {
145
+ module.show();
146
+ }
147
+ }
148
+ },
149
+
119
150
  setup: {
120
151
 
121
152
  layout: function() {
@@ -186,24 +217,34 @@ $.fn.dropdown = function(parameters) {
186
217
  }
187
218
  },
188
219
 
189
- show: function() {
190
- module.debug('Checking if dropdown can show');
191
- if( !module.is.active() ) {
220
+ show: function(callback) {
221
+ callback = $.isFunction(callback)
222
+ ? callback
223
+ : function(){}
224
+ ;
225
+ if( !module.is.active() && !module.is.allFiltered() ) {
226
+ module.debug('Showing dropdown');
192
227
  module.animate.show(function() {
193
228
  if( module.can.click() ) {
194
229
  module.bind.intent();
195
230
  }
196
231
  module.set.visible();
232
+ $.proxy(callback, element)();
197
233
  });
198
234
  $.proxy(settings.onShow, element)();
199
235
  }
200
236
  },
201
237
 
202
- hide: function() {
238
+ hide: function(callback) {
239
+ callback = $.isFunction(callback)
240
+ ? callback
241
+ : function(){}
242
+ ;
203
243
  if( module.is.active() ) {
204
244
  module.debug('Hiding dropdown');
205
245
  module.animate.hide(function() {
206
246
  module.remove.visible();
247
+ $.proxy(callback, element)();
207
248
  });
208
249
  $.proxy(settings.onHide, element)();
209
250
  }
@@ -253,12 +294,13 @@ $.fn.dropdown = function(parameters) {
253
294
  },
254
295
  mouseEvents: function() {
255
296
  module.verbose('Mouse detected binding mouse events');
297
+
256
298
  if( module.is.searchSelection() ) {
257
299
  $module
258
300
  .on('mousedown' + eventNamespace, selector.menu, module.event.menu.activate)
259
301
  .on('mouseup' + eventNamespace, selector.menu, module.event.menu.deactivate)
260
- .on('focus' + eventNamespace, selector.search, module.event.searchFocus)
261
302
  .on('click' + eventNamespace, selector.search, module.show)
303
+ .on('focus' + eventNamespace, selector.search, module.event.searchFocus)
262
304
  .on('blur' + eventNamespace, selector.search, module.event.searchBlur)
263
305
  ;
264
306
  }
@@ -296,12 +338,12 @@ $.fn.dropdown = function(parameters) {
296
338
  module.verbose('Binding hide intent event to document');
297
339
  if(hasTouch) {
298
340
  $document
299
- .on('touchstart' + eventNamespace, module.event.test.touch)
300
- .on('touchmove' + eventNamespace, module.event.test.touch)
341
+ .on('touchstart' + elementNamespace, module.event.test.touch)
342
+ .on('touchmove' + elementNamespace, module.event.test.touch)
301
343
  ;
302
344
  }
303
345
  $document
304
- .on('click' + eventNamespace, module.event.test.hide)
346
+ .on('click' + elementNamespace, module.event.test.hide)
305
347
  ;
306
348
  }
307
349
  },
@@ -311,12 +353,12 @@ $.fn.dropdown = function(parameters) {
311
353
  module.verbose('Removing hide intent event from document');
312
354
  if(hasTouch) {
313
355
  $document
314
- .off('touchstart' + eventNamespace)
315
- .off('touchmove' + eventNamespace)
356
+ .off('touchstart' + elementNamespace)
357
+ .off('touchmove' + elementNamespace)
316
358
  ;
317
359
  }
318
360
  $document
319
- .off('click' + eventNamespace)
361
+ .off('click' + elementNamespace)
320
362
  ;
321
363
  }
322
364
  },
@@ -324,25 +366,17 @@ $.fn.dropdown = function(parameters) {
324
366
  filter: function(searchTerm) {
325
367
  var
326
368
  $results = $(),
327
- exactRegExp = new RegExp('(?:\s|^)' + searchTerm, 'i'),
328
- fullTextRegExp = new RegExp(searchTerm, 'i'),
329
- allItemsFiltered,
330
- $filteredItems
369
+ exactRegExp = new RegExp('^' + searchTerm, 'igm'),
370
+ fullTextRegExp = new RegExp(searchTerm, 'ig'),
371
+ allItemsFiltered
331
372
  ;
373
+ module.verbose('Searching for matching values');
332
374
  $item
333
375
  .each(function(){
334
376
  var
335
377
  $choice = $(this),
336
- text = ( $choice.data(metadata.text) !== undefined )
337
- ? $choice.data(metadata.text)
338
- : (settings.preserveHTML)
339
- ? $choice.html()
340
- : $choice.text(),
341
- value = ( $choice.data(metadata.value) !== undefined)
342
- ? $choice.data(metadata.value)
343
- : (typeof text === 'string')
344
- ? text.toLowerCase()
345
- : text
378
+ text = module.get.choiceText($choice, false),
379
+ value = module.get.choiceValue($choice, text)
346
380
  ;
347
381
  if( exactRegExp.test( text ) || exactRegExp.test( value ) ) {
348
382
  $results = $results.add($choice);
@@ -354,21 +388,25 @@ $.fn.dropdown = function(parameters) {
354
388
  }
355
389
  })
356
390
  ;
357
- $filteredItems = $item.not($results);
358
- allItemsFiltered = ($filteredItems.size() == $item.size());
359
391
 
392
+ module.debug('Setting filter', searchTerm);
360
393
  module.remove.filteredItem();
361
- module.remove.selectedItem();
362
- $filteredItems
394
+ $item
395
+ .not($results)
363
396
  .addClass(className.filtered)
364
397
  ;
398
+
399
+ module.verbose('Selecting first non-filtered element');
400
+ module.remove.selectedItem();
365
401
  $item
366
402
  .not('.' + className.filtered)
367
403
  .eq(0)
368
404
  .addClass(className.selected)
369
405
  ;
370
- if(allItemsFiltered) {
406
+ if( module.is.allFiltered() ) {
407
+ module.debug('All items filtered, hiding dropdown', searchTerm);
371
408
  module.hide();
409
+ $.proxy(settings.onNoResults, element)(searchTerm);
372
410
  }
373
411
  },
374
412
 
@@ -394,7 +432,10 @@ $.fn.dropdown = function(parameters) {
394
432
  }
395
433
  },
396
434
  blur: function(event) {
397
- if(!activated) {
435
+ var
436
+ pageLostFocus = (document.activeElement === this)
437
+ ;
438
+ if(!activated && !pageLostFocus) {
398
439
  module.hide();
399
440
  }
400
441
  },
@@ -403,21 +444,17 @@ $.fn.dropdown = function(parameters) {
403
444
  module.show();
404
445
  },
405
446
  searchBlur: function(event) {
406
- if(!itemActivated) {
447
+ var
448
+ pageLostFocus = (document.activeElement === this)
449
+ ;
450
+ if(!itemActivated && !pageLostFocus) {
407
451
  module.hide();
408
452
  }
409
453
  },
410
454
  input: function(event) {
411
- var
412
- query = $search.val()
413
- ;
414
- if(module.is.searchSelection()) {
415
- if( module.can.show() ) {
416
- module.show();
417
- }
418
- module.set.filtered();
419
- }
420
- module.filter(query);
455
+ module.set.filtered();
456
+ clearTimeout(module.timer);
457
+ module.timer = setTimeout(module.search, settings.delay.search);
421
458
  },
422
459
  keydown: function(event) {
423
460
  var
@@ -446,6 +483,11 @@ $.fn.dropdown = function(parameters) {
446
483
  module.verbose('Escape key pressed, closing dropdown');
447
484
  module.hide();
448
485
  }
486
+ // open menu
487
+ if(pressedKey == keys.downArrow) {
488
+ module.verbose('Down key pressed, showing dropdown');
489
+ module.show();
490
+ }
449
491
  // result shortcuts
450
492
  if(module.is.visible()) {
451
493
  if(pressedKey == keys.enter && hasSelectedItem) {
@@ -564,19 +606,10 @@ $.fn.dropdown = function(parameters) {
564
606
  click: function (event) {
565
607
  var
566
608
  $choice = $(this),
567
- text = ( $choice.data(metadata.text) !== undefined )
568
- ? $choice.data(metadata.text)
569
- : (settings.preserveHTML)
570
- ? $choice.html()
571
- : $choice.text(),
572
- value = ( $choice.data(metadata.value) !== undefined)
573
- ? $choice.data(metadata.value)
574
- : (typeof text === 'string')
575
- ? text.toLowerCase()
576
- : text,
609
+ text = module.get.choiceText($choice),
610
+ value = module.get.choiceValue($choice, text),
577
611
  callback = function() {
578
612
  module.remove.searchTerm();
579
- module.remove.filteredItem();
580
613
  module.determine.selectAction(text, value);
581
614
  },
582
615
  openingSubMenu = ($choice.find(selector.menu).size() > 0)
@@ -610,7 +643,10 @@ $.fn.dropdown = function(parameters) {
610
643
  }
611
644
  },
612
645
  eventInModule: function(event, callback) {
613
- callback = callback || function(){};
646
+ callback = $.isFunction(callback)
647
+ ? callback
648
+ : function(){}
649
+ ;
614
650
  if( $(event.target).closest($module).size() === 0 ) {
615
651
  module.verbose('Triggering event', callback);
616
652
  callback();
@@ -622,7 +658,10 @@ $.fn.dropdown = function(parameters) {
622
658
  }
623
659
  },
624
660
  eventInMenu: function(event, callback) {
625
- callback = callback || function(){};
661
+ callback = $.isFunction(callback)
662
+ ? callback
663
+ : function(){}
664
+ ;
626
665
  if( $(event.target).closest($menu).size() === 0 ) {
627
666
  module.verbose('Triggering event', callback);
628
667
  callback();
@@ -640,7 +679,9 @@ $.fn.dropdown = function(parameters) {
640
679
  nothing: function() {},
641
680
 
642
681
  hide: function() {
643
- module.hide();
682
+ module.hide(function() {
683
+ module.remove.filteredItem();
684
+ });
644
685
  },
645
686
 
646
687
  select: function(text, value) {
@@ -650,7 +691,9 @@ $.fn.dropdown = function(parameters) {
650
691
  ;
651
692
  module.set.selected(value);
652
693
  module.set.value(value);
653
- module.hide();
694
+ module.hide(function() {
695
+ module.remove.filteredItem();
696
+ });
654
697
  },
655
698
 
656
699
  activate: function(text, value) {
@@ -660,7 +703,9 @@ $.fn.dropdown = function(parameters) {
660
703
  ;
661
704
  module.set.selected(value);
662
705
  module.set.value(value);
663
- module.hide();
706
+ module.hide(function() {
707
+ module.remove.filteredItem();
708
+ });
664
709
  },
665
710
 
666
711
  combo: function(text, value) {
@@ -670,7 +715,9 @@ $.fn.dropdown = function(parameters) {
670
715
  ;
671
716
  module.set.selected(value);
672
717
  module.set.value(value);
673
- module.hide();
718
+ module.hide(function() {
719
+ module.remove.filteredItem();
720
+ });
674
721
  }
675
722
 
676
723
  },
@@ -685,6 +732,29 @@ $.fn.dropdown = function(parameters) {
685
732
  : $module.data(metadata.value)
686
733
  ;
687
734
  },
735
+ choiceText: function($choice, preserveHTML) {
736
+ preserveHTML = (preserveHTML !== undefined)
737
+ ? preserveHTML
738
+ : settings.preserveHTML
739
+ ;
740
+ if($choice !== undefined) {
741
+ return ($choice.data(metadata.text) !== undefined)
742
+ ? $choice.data(metadata.text)
743
+ : (preserveHTML)
744
+ ? $choice.html()
745
+ : $choice.text()
746
+ ;
747
+ }
748
+ },
749
+ choiceValue: function($choice, choiceText) {
750
+ choiceText = choiceText || module.get.choiceText($text);
751
+ return ($choice.data(metadata.value) !== undefined)
752
+ ? $choice.data(metadata.value)
753
+ : (typeof choiceText === 'string')
754
+ ? choiceText.toLowerCase()
755
+ : choiceText
756
+ ;
757
+ },
688
758
  inputEvent: function() {
689
759
  var
690
760
  input = $search[0]
@@ -725,6 +795,9 @@ $.fn.dropdown = function(parameters) {
725
795
  module.debug('Retrieved values from select', select);
726
796
  return select;
727
797
  },
798
+ activeItem: function() {
799
+ return $item.filter('.' + className.active);
800
+ },
728
801
  item: function(value, strict) {
729
802
  var
730
803
  $selectedItem = false
@@ -744,16 +817,8 @@ $.fn.dropdown = function(parameters) {
744
817
  .each(function() {
745
818
  var
746
819
  $choice = $(this),
747
- optionText = ( $choice.data(metadata.text) !== undefined )
748
- ? $choice.data(metadata.text)
749
- : (settings.preserveHTML)
750
- ? $choice.html()
751
- : $choice.text(),
752
- optionValue = ( $choice.data(metadata.value) !== undefined )
753
- ? $choice.data(metadata.value)
754
- : (typeof optionText === 'string')
755
- ? optionText.toLowerCase()
756
- : optionText
820
+ optionText = module.get.choiceText($choice),
821
+ optionValue = module.get.choiceValue($choice, optionText)
757
822
  ;
758
823
  if(strict) {
759
824
  module.verbose('Ambiguous dropdown value using strict type check', $choice, value);
@@ -781,6 +846,9 @@ $.fn.dropdown = function(parameters) {
781
846
  value = module.get.text();
782
847
  }
783
848
  return $selectedItem || false;
849
+ },
850
+ uniqueID: function() {
851
+ return (Math.random().toString(16) + '000000000').substr(2,8);
784
852
  }
785
853
  },
786
854
 
@@ -823,7 +891,16 @@ $.fn.dropdown = function(parameters) {
823
891
 
824
892
  set: {
825
893
  filtered: function() {
826
- $text.addClass(className.filtered);
894
+ var
895
+ searchValue = $search.val(),
896
+ hasSearchValue = (typeof searchValue === 'string' && searchValue.length > 0)
897
+ ;
898
+ if(hasSearchValue) {
899
+ $text.addClass(className.filtered);
900
+ }
901
+ else {
902
+ $text.removeClass(className.filtered);
903
+ }
827
904
  },
828
905
  tabbable: function() {
829
906
  if( module.is.searchable() ) {
@@ -848,11 +925,10 @@ $.fn.dropdown = function(parameters) {
848
925
  }
849
926
  }
850
927
  },
851
- scrollPosition: function($item) {
928
+ scrollPosition: function($item, forceScroll) {
852
929
  var
853
- $item = $item || module.get.item(),
854
- hasActive = ($item && $item.size() > 0),
855
930
  edgeTolerance = 5,
931
+ hasActive,
856
932
  offset,
857
933
  itemHeight,
858
934
  itemOffset,
@@ -862,7 +938,20 @@ $.fn.dropdown = function(parameters) {
862
938
  abovePage,
863
939
  belowPage
864
940
  ;
941
+
942
+ $item = $item || module.get.activeItem();
943
+ hasActive = ($item && $item.size() > 0);
944
+ forceScroll = (forceScroll !== undefined)
945
+ ? forceScroll
946
+ : false
947
+ ;
948
+
865
949
  if($item && hasActive) {
950
+
951
+ if(!$menu.hasClass(className.visible)) {
952
+ $menu.addClass(className.loading);
953
+ }
954
+
866
955
  menuHeight = $menu.height();
867
956
  itemHeight = $item.height();
868
957
  menuScroll = $menu.scrollTop();
@@ -871,10 +960,11 @@ $.fn.dropdown = function(parameters) {
871
960
  offset = menuScroll - menuOffset + itemOffset;
872
961
  belowPage = menuScroll + menuHeight < (offset + edgeTolerance);
873
962
  abovePage = ((offset - edgeTolerance) < menuScroll);
874
- if(abovePage || belowPage) {
875
- module.debug('Scrolling to active item');
963
+ module.debug('Scrolling to active item', offset);
964
+ if(abovePage || belowPage || forceScroll) {
876
965
  $menu
877
966
  .scrollTop(offset)
967
+ .removeClass(className.loading)
878
968
  ;
879
969
  }
880
970
  }
@@ -930,18 +1020,15 @@ $.fn.dropdown = function(parameters) {
930
1020
  ;
931
1021
  if($selectedItem) {
932
1022
  module.debug('Setting selected menu item to', $selectedItem);
933
- selectedText = ($selectedItem.data(metadata.text) !== undefined)
934
- ? $selectedItem.data(metadata.text)
935
- : (settings.preserveHTML)
936
- ? $selectedItem.html()
937
- : $selectedItem.text()
938
- ;
1023
+
939
1024
  module.remove.activeItem();
940
1025
  module.remove.selectedItem();
941
1026
  $selectedItem
942
1027
  .addClass(className.active)
943
1028
  .addClass(className.selected)
944
1029
  ;
1030
+
1031
+ selectedText = module.get.choiceText($selectedItem);
945
1032
  module.set.text(selectedText);
946
1033
  $.proxy(settings.onChange, element)(value, selectedText, $selectedItem);
947
1034
  }
@@ -990,6 +1077,24 @@ $.fn.dropdown = function(parameters) {
990
1077
  },
991
1078
 
992
1079
  is: {
1080
+ active: function() {
1081
+ return $module.hasClass(className.active);
1082
+ },
1083
+ animating: function($subMenu) {
1084
+ return ($subMenu)
1085
+ ? $subMenu.is(':animated') || $subMenu.transition && $subMenu.transition('is animating')
1086
+ : $menu.is(':animated') || $menu.transition && $menu.transition('is animating')
1087
+ ;
1088
+ },
1089
+ allFiltered: function() {
1090
+ return ($item.filter('.' + className.filtered).size() === $item.size());
1091
+ },
1092
+ hidden: function($subMenu) {
1093
+ return ($subMenu)
1094
+ ? $subMenu.is(':hidden')
1095
+ : $menu.is(':hidden')
1096
+ ;
1097
+ },
993
1098
  search: function() {
994
1099
  return $module.hasClass(className.search);
995
1100
  },
@@ -1002,26 +1107,11 @@ $.fn.dropdown = function(parameters) {
1002
1107
  selection: function() {
1003
1108
  return $module.hasClass(className.selection);
1004
1109
  },
1005
- animating: function($subMenu) {
1006
- return ($subMenu)
1007
- ? $subMenu.is(':animated') || $subMenu.transition && $subMenu.transition('is animating')
1008
- : $menu.is(':animated') || $menu.transition && $menu.transition('is animating')
1009
- ;
1010
- },
1011
- active: function() {
1012
- return $module.hasClass(className.active);
1013
- },
1014
1110
  visible: function($subMenu) {
1015
1111
  return ($subMenu)
1016
1112
  ? $subMenu.is(':visible')
1017
1113
  : $menu.is(':visible')
1018
1114
  ;
1019
- },
1020
- hidden: function($subMenu) {
1021
- return ($subMenu)
1022
- ? $subMenu.is(':hidden')
1023
- : $menu.is(':hidden')
1024
- ;
1025
1115
  }
1026
1116
  },
1027
1117
 
@@ -1044,10 +1134,13 @@ $.fn.dropdown = function(parameters) {
1044
1134
  module.hideSubMenus();
1045
1135
  module.hideOthers();
1046
1136
  module.set.active();
1047
- module.set.scrollPosition();
1048
1137
  }
1049
1138
  ;
1050
- callback = callback || function(){};
1139
+ callback = $.isFunction(callback)
1140
+ ? callback
1141
+ : function(){}
1142
+ ;
1143
+ module.set.scrollPosition(module.get.activeItem(), true);
1051
1144
  module.verbose('Doing menu show animation', $currentMenu);
1052
1145
  if( module.is.hidden($currentMenu) || module.is.animating($currentMenu) ) {
1053
1146
  if(settings.transition == 'none') {
@@ -1119,7 +1212,10 @@ $.fn.dropdown = function(parameters) {
1119
1212
  module.remove.active();
1120
1213
  }
1121
1214
  ;
1122
- callback = callback || function(){};
1215
+ callback = $.isFunction(callback)
1216
+ ? callback
1217
+ : function(){}
1218
+ ;
1123
1219
  if( module.is.visible($currentMenu) || module.is.animating($currentMenu) ) {
1124
1220
  module.verbose('Doing menu hide animation', $currentMenu);
1125
1221
 
@@ -1378,23 +1474,24 @@ $.fn.dropdown.settings = {
1378
1474
  action : 'activate',
1379
1475
 
1380
1476
  allowTab : true,
1381
- fullTextSearch : true,
1477
+ fullTextSearch : false,
1382
1478
  preserveHTML : true,
1383
1479
 
1384
1480
  delay : {
1385
- show : 200,
1386
- hide : 300,
1387
- touch : 50
1481
+ hide : 300,
1482
+ show : 200,
1483
+ search : 50,
1484
+ touch : 50
1388
1485
  },
1389
1486
 
1390
1487
  transition : 'slide down',
1391
1488
  duration : 250,
1392
1489
 
1393
1490
  /* Callbacks */
1394
-
1395
- onChange : function(value, text){},
1396
- onShow : function(){},
1397
- onHide : function(){},
1491
+ onNoResults : function(searchTerm){},
1492
+ onChange : function(value, text){},
1493
+ onShow : function(){},
1494
+ onHide : function(){},
1398
1495
 
1399
1496
  /* Component */
1400
1497
 
@@ -1429,6 +1526,7 @@ $.fn.dropdown.settings = {
1429
1526
  disabled : 'disabled',
1430
1527
  dropdown : 'ui dropdown',
1431
1528
  filtered : 'filtered',
1529
+ loading : 'loading',
1432
1530
  menu : 'menu',
1433
1531
  placeholder : 'default',
1434
1532
  search : 'search',