fomantic-ui-sass 2.7.8 → 2.8.4

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 (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -0
  3. data/app/assets/fonts/semantic-ui/brand-icons.eot +0 -0
  4. data/app/assets/fonts/semantic-ui/brand-icons.svg +83 -29
  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 +59 -41
  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 +3 -3
  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/api.js +1 -1
  19. data/app/assets/javascripts/semantic-ui/calendar.js +103 -27
  20. data/app/assets/javascripts/semantic-ui/checkbox.js +1 -1
  21. data/app/assets/javascripts/semantic-ui/dropdown.js +93 -71
  22. data/app/assets/javascripts/semantic-ui/form.js +69 -22
  23. data/app/assets/javascripts/semantic-ui/modal.js +104 -33
  24. data/app/assets/javascripts/semantic-ui/popup.js +10 -10
  25. data/app/assets/javascripts/semantic-ui/progress.js +10 -8
  26. data/app/assets/javascripts/semantic-ui/rating.js +35 -6
  27. data/app/assets/javascripts/semantic-ui/search.js +2 -2
  28. data/app/assets/javascripts/semantic-ui/sidebar.js +2 -3
  29. data/app/assets/javascripts/semantic-ui/slider.js +78 -29
  30. data/app/assets/javascripts/semantic-ui/tab.js +1 -1
  31. data/app/assets/javascripts/semantic-ui/toast.js +398 -122
  32. data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +3 -3
  33. data/app/assets/stylesheets/semantic-ui/collections/_form.scss +779 -142
  34. data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +35 -35
  35. data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +101 -145
  36. data/app/assets/stylesheets/semantic-ui/collections/_message.scss +11 -11
  37. data/app/assets/stylesheets/semantic-ui/collections/_table.scss +1009 -208
  38. data/app/assets/stylesheets/semantic-ui/elements/_all.scss +1 -0
  39. data/app/assets/stylesheets/semantic-ui/elements/_button.scss +51 -81
  40. data/app/assets/stylesheets/semantic-ui/elements/_container.scss +12 -12
  41. data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +35 -14
  42. data/app/assets/stylesheets/semantic-ui/elements/_emoji.scss +12309 -0
  43. data/app/assets/stylesheets/semantic-ui/elements/_header.scss +111 -66
  44. data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +105 -34
  45. data/app/assets/stylesheets/semantic-ui/elements/_image.scss +28 -28
  46. data/app/assets/stylesheets/semantic-ui/elements/_input.scss +211 -62
  47. data/app/assets/stylesheets/semantic-ui/elements/_label.scss +20 -20
  48. data/app/assets/stylesheets/semantic-ui/elements/_list.scss +52 -51
  49. data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +85 -91
  50. data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +8 -8
  51. data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +11 -11
  52. data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +31 -10
  53. data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +39 -39
  54. data/app/assets/stylesheets/semantic-ui/elements/_step.scss +16 -17
  55. data/app/assets/stylesheets/semantic-ui/elements/_text.scss +3 -3
  56. data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +6 -6
  57. data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +2 -2
  58. data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +15 -124
  59. data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +30 -30
  60. data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +183 -111
  61. data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +12 -12
  62. data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +128 -30
  63. data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +105 -79
  64. data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +44 -26
  65. data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +246 -21
  66. data/app/assets/stylesheets/semantic-ui/modules/_search.scss +16 -13
  67. data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +3 -2
  68. data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +12 -14
  69. data/app/assets/stylesheets/semantic-ui/modules/_slider.scss +20 -23
  70. data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +2 -2
  71. data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +542 -155
  72. data/app/assets/stylesheets/semantic-ui/views/_ad.scss +16 -16
  73. data/app/assets/stylesheets/semantic-ui/views/_card.scss +42 -17
  74. data/app/assets/stylesheets/semantic-ui/views/_comment.scss +9 -9
  75. data/app/assets/stylesheets/semantic-ui/views/_feed.scss +20 -5
  76. data/app/assets/stylesheets/semantic-ui/views/_item.scss +33 -12
  77. data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +60 -46
  78. data/fomantic-ui-sass.gemspec +2 -2
  79. data/lib/fomantic-ui-sass.rb +2 -2
  80. data/lib/fomantic/ui/sass/version.rb +2 -2
  81. data/spec/dummy/app/assets/config/manifest.js +0 -0
  82. metadata +12 -9
@@ -175,7 +175,7 @@ $.fn.checkbox = function(parameters) {
175
175
  },
176
176
 
177
177
  preventDefaultOnInputTarget: function() {
178
- if(typeof event !== 'undefined' && $(event.target).is(selector.input)) {
178
+ if(typeof event !== 'undefined' && event !== null && $(event.target).is(selector.input)) {
179
179
  module.verbose('Preventing default check action after manual check action');
180
180
  event.preventDefault();
181
181
  }
@@ -31,6 +31,10 @@ $.fn.dropdown = function(parameters) {
31
31
  moduleSelector = $allModules.selector || '',
32
32
 
33
33
  hasTouch = ('ontouchstart' in document.documentElement),
34
+ clickEvent = hasTouch
35
+ ? 'touchstart'
36
+ : 'click',
37
+
34
38
  time = new Date().getTime(),
35
39
  performance = [],
36
40
 
@@ -278,7 +282,7 @@ $.fn.dropdown = function(parameters) {
278
282
  module.filter(query);
279
283
  }
280
284
  else {
281
- module.hide();
285
+ module.hide(null,true);
282
286
  }
283
287
  },
284
288
 
@@ -397,6 +401,7 @@ $.fn.dropdown = function(parameters) {
397
401
  $module.addClass(className.disabled);
398
402
  }
399
403
  $input
404
+ .removeAttr('required')
400
405
  .removeAttr('class')
401
406
  .detach()
402
407
  .prependTo($module)
@@ -484,7 +489,7 @@ $.fn.dropdown = function(parameters) {
484
489
  }
485
490
  },
486
491
 
487
- show: function(callback) {
492
+ show: function(callback, preventFocus) {
488
493
  callback = $.isFunction(callback)
489
494
  ? callback
490
495
  : function(){}
@@ -506,7 +511,7 @@ $.fn.dropdown = function(parameters) {
506
511
  if( module.can.click() ) {
507
512
  module.bind.intent();
508
513
  }
509
- if(module.has.search()) {
514
+ if(module.has.search() && !preventFocus) {
510
515
  module.focusSearch();
511
516
  }
512
517
  module.set.visible();
@@ -516,7 +521,7 @@ $.fn.dropdown = function(parameters) {
516
521
  }
517
522
  },
518
523
 
519
- hide: function(callback) {
524
+ hide: function(callback, preventBlur) {
520
525
  callback = $.isFunction(callback)
521
526
  ? callback
522
527
  : function(){}
@@ -527,7 +532,7 @@ $.fn.dropdown = function(parameters) {
527
532
  module.animate.hide(function() {
528
533
  module.remove.visible();
529
534
  // hidding search focus
530
- if ( module.is.focusedOnSearch() ) {
535
+ if ( module.is.focusedOnSearch() && preventBlur !== true ) {
531
536
  $search.blur();
532
537
  }
533
538
  callback.call(element);
@@ -564,27 +569,10 @@ $.fn.dropdown = function(parameters) {
564
569
 
565
570
  bind: {
566
571
  events: function() {
567
- if(hasTouch) {
568
- module.bind.touchEvents();
569
- }
570
572
  module.bind.keyboardEvents();
571
573
  module.bind.inputEvents();
572
574
  module.bind.mouseEvents();
573
575
  },
574
- touchEvents: function() {
575
- module.debug('Touch device detected binding additional touch events');
576
- if( module.is.searchSelection() ) {
577
- // do nothing special yet
578
- }
579
- else if( module.is.single() ) {
580
- $module
581
- .on('touchstart' + eventNamespace, module.event.test.toggle)
582
- ;
583
- }
584
- $menu
585
- .on('touchstart' + eventNamespace, selector.item, module.event.item.mouseenter)
586
- ;
587
- },
588
576
  keyboardEvents: function() {
589
577
  module.verbose('Binding keyboard events');
590
578
  $module
@@ -611,8 +599,8 @@ $.fn.dropdown = function(parameters) {
611
599
  module.verbose('Binding mouse events');
612
600
  if(module.is.multiple()) {
613
601
  $module
614
- .on('click' + eventNamespace, selector.label, module.event.label.click)
615
- .on('click' + eventNamespace, selector.remove, module.event.remove.click)
602
+ .on(clickEvent + eventNamespace, selector.label, module.event.label.click)
603
+ .on(clickEvent + eventNamespace, selector.remove, module.event.remove.click)
616
604
  ;
617
605
  }
618
606
  if( module.is.searchSelection() ) {
@@ -621,24 +609,24 @@ $.fn.dropdown = function(parameters) {
621
609
  .on('mouseup' + eventNamespace, module.event.mouseup)
622
610
  .on('mousedown' + eventNamespace, selector.menu, module.event.menu.mousedown)
623
611
  .on('mouseup' + eventNamespace, selector.menu, module.event.menu.mouseup)
624
- .on('click' + eventNamespace, selector.icon, module.event.icon.click)
625
- .on('click' + eventNamespace, selector.clearIcon, module.event.clearIcon.click)
612
+ .on(clickEvent + eventNamespace, selector.icon, module.event.icon.click)
613
+ .on(clickEvent + eventNamespace, selector.clearIcon, module.event.clearIcon.click)
626
614
  .on('focus' + eventNamespace, selector.search, module.event.search.focus)
627
- .on('click' + eventNamespace, selector.search, module.event.search.focus)
615
+ .on(clickEvent + eventNamespace, selector.search, module.event.search.focus)
628
616
  .on('blur' + eventNamespace, selector.search, module.event.search.blur)
629
- .on('click' + eventNamespace, selector.text, module.event.text.focus)
617
+ .on(clickEvent + eventNamespace, selector.text, module.event.text.focus)
630
618
  ;
631
619
  if(module.is.multiple()) {
632
620
  $module
633
- .on('click' + eventNamespace, module.event.click)
621
+ .on(clickEvent + eventNamespace, module.event.click)
634
622
  ;
635
623
  }
636
624
  }
637
625
  else {
638
626
  if(settings.on == 'click') {
639
627
  $module
640
- .on('click' + eventNamespace, selector.icon, module.event.icon.click)
641
- .on('click' + eventNamespace, module.event.test.toggle)
628
+ .on(clickEvent + eventNamespace, selector.icon, module.event.icon.click)
629
+ .on(clickEvent + eventNamespace, module.event.test.toggle)
642
630
  ;
643
631
  }
644
632
  else if(settings.on == 'hover') {
@@ -656,7 +644,7 @@ $.fn.dropdown = function(parameters) {
656
644
  .on('mousedown' + eventNamespace, module.event.mousedown)
657
645
  .on('mouseup' + eventNamespace, module.event.mouseup)
658
646
  .on('focus' + eventNamespace, module.event.focus)
659
- .on('click' + eventNamespace, selector.clearIcon, module.event.clearIcon.click)
647
+ .on(clickEvent + eventNamespace, selector.clearIcon, module.event.clearIcon.click)
660
648
  ;
661
649
  if(module.has.menuSearch() ) {
662
650
  $module
@@ -670,7 +658,7 @@ $.fn.dropdown = function(parameters) {
670
658
  }
671
659
  }
672
660
  $menu
673
- .on('mouseenter' + eventNamespace, selector.item, module.event.item.mouseenter)
661
+ .on((hasTouch ? 'touchstart' : 'mouseenter') + eventNamespace, selector.item, module.event.item.mouseenter)
674
662
  .on('mouseleave' + eventNamespace, selector.item, module.event.item.mouseleave)
675
663
  .on('click' + eventNamespace, selector.item, module.event.item.click)
676
664
  ;
@@ -684,7 +672,7 @@ $.fn.dropdown = function(parameters) {
684
672
  ;
685
673
  }
686
674
  $document
687
- .on('click' + elementNamespace, module.event.test.hide)
675
+ .on(clickEvent + elementNamespace, module.event.test.hide)
688
676
  ;
689
677
  }
690
678
  },
@@ -699,7 +687,7 @@ $.fn.dropdown = function(parameters) {
699
687
  ;
700
688
  }
701
689
  $document
702
- .off('click' + elementNamespace)
690
+ .off(clickEvent + elementNamespace)
703
691
  ;
704
692
  }
705
693
  },
@@ -832,7 +820,8 @@ $.fn.dropdown = function(parameters) {
832
820
  ),
833
821
  results = null,
834
822
  escapedTerm = module.escape.string(searchTerm),
835
- beginsWithRegExp = new RegExp('^' + escapedTerm, 'igm')
823
+ regExpFlags = (settings.ignoreSearchCase ? 'i' : '') + 'gm',
824
+ beginsWithRegExp = new RegExp('^' + escapedTerm, regExpFlags)
836
825
  ;
837
826
  // avoid loop if we're matching nothing
838
827
  if( module.has.query() ) {
@@ -846,6 +835,10 @@ $.fn.dropdown = function(parameters) {
846
835
  text,
847
836
  value
848
837
  ;
838
+ if($choice.hasClass(className.unfilterable)) {
839
+ results.push(this);
840
+ return true;
841
+ }
849
842
  if(settings.match === 'both' || settings.match === 'text') {
850
843
  text = module.remove.diacritics(String(module.get.choiceText($choice, false)));
851
844
  if(text.search(beginsWithRegExp) !== -1) {
@@ -918,8 +911,8 @@ $.fn.dropdown = function(parameters) {
918
911
  termLength = term.length,
919
912
  queryLength = query.length
920
913
  ;
921
- query = query.toLowerCase();
922
- term = term.toLowerCase();
914
+ query = (settings.ignoreSearchCase ? query.toLowerCase() : query);
915
+ term = (settings.ignoreSearchCase ? term.toLowerCase() : term);
923
916
  if(queryLength > termLength) {
924
917
  return false;
925
918
  }
@@ -940,8 +933,8 @@ $.fn.dropdown = function(parameters) {
940
933
  return true;
941
934
  },
942
935
  exactSearch: function (query, term) {
943
- query = query.toLowerCase();
944
- term = term.toLowerCase();
936
+ query = (settings.ignoreSearchCase ? query.toLowerCase() : query);
937
+ term = (settings.ignoreSearchCase ? term.toLowerCase() : term);
945
938
  return term.indexOf(query) > -1;
946
939
 
947
940
  },
@@ -981,18 +974,12 @@ $.fn.dropdown = function(parameters) {
981
974
  : $activeItem,
982
975
  hasSelected = ($selectedItem.length > 0)
983
976
  ;
984
- if(hasSelected && !module.is.multiple()) {
977
+ if(settings.allowAdditions || (hasSelected && !module.is.multiple())) {
985
978
  module.debug('Forcing partial selection to selected item', $selectedItem);
986
979
  module.event.item.click.call($selectedItem, {}, true);
987
980
  }
988
981
  else {
989
- if(settings.allowAdditions) {
990
- module.set.selected(module.get.query());
991
- module.remove.searchTerm();
992
- }
993
- else {
994
- module.remove.searchTerm();
995
- }
982
+ module.remove.searchTerm();
996
983
  }
997
984
  },
998
985
 
@@ -1012,6 +999,23 @@ $.fn.dropdown = function(parameters) {
1012
999
  }
1013
1000
  }
1014
1001
  });
1002
+
1003
+ if(module.has.selectInput()) {
1004
+ module.disconnect.selectObserver();
1005
+ $input.html('');
1006
+ $input.append('<option disabled selected value></option>');
1007
+ $.each(values, function(index, item) {
1008
+ var
1009
+ value = settings.templates.deQuote(item[fields.value]),
1010
+ name = settings.templates.escape(
1011
+ item[fields.name] || '',
1012
+ settings.preserveHTML
1013
+ )
1014
+ ;
1015
+ $input.append('<option value="' + value + '">' + name + '</option>');
1016
+ });
1017
+ module.observe.select();
1018
+ }
1015
1019
  }
1016
1020
  },
1017
1021
 
@@ -1083,6 +1087,8 @@ $.fn.dropdown = function(parameters) {
1083
1087
  if(!itemActivated && !pageLostFocus) {
1084
1088
  if(settings.forceSelection) {
1085
1089
  module.forceSelection();
1090
+ } else if(!settings.allowAdditions){
1091
+ module.remove.searchTerm();
1086
1092
  }
1087
1093
  module.hide();
1088
1094
  }
@@ -1922,7 +1928,11 @@ $.fn.dropdown = function(parameters) {
1922
1928
  return ($choice.data(metadata.value) !== undefined)
1923
1929
  ? String( $choice.data(metadata.value) )
1924
1930
  : (typeof choiceText === 'string')
1925
- ? $.trim(choiceText.toLowerCase())
1931
+ ? $.trim(
1932
+ settings.ignoreSearchCase
1933
+ ? choiceText.toLowerCase()
1934
+ : choiceText
1935
+ )
1926
1936
  : String(choiceText)
1927
1937
  ;
1928
1938
  },
@@ -1956,6 +1966,9 @@ $.fn.dropdown = function(parameters) {
1956
1966
  value = ( $option.attr('value') !== undefined )
1957
1967
  ? $option.attr('value')
1958
1968
  : name,
1969
+ text = ( $option.data(metadata.text) !== undefined )
1970
+ ? $option.data(metadata.text)
1971
+ : name,
1959
1972
  group = $option.parent('optgroup')
1960
1973
  ;
1961
1974
  if(settings.placeholder === 'auto' && value === '') {
@@ -1973,6 +1986,7 @@ $.fn.dropdown = function(parameters) {
1973
1986
  select.values.push({
1974
1987
  name : name,
1975
1988
  value : value,
1989
+ text : text,
1976
1990
  disabled : disabled
1977
1991
  });
1978
1992
  }
@@ -2061,7 +2075,7 @@ $.fn.dropdown = function(parameters) {
2061
2075
  return;
2062
2076
  }
2063
2077
  if(isMultiple) {
2064
- if($.inArray( String(optionValue), value) !== -1) {
2078
+ if($.inArray(module.escape.htmlEntities(String(optionValue)), value.map(function(v){return String(v);})) !== -1) {
2065
2079
  $selectedItem = ($selectedItem)
2066
2080
  ? $selectedItem.add($choice)
2067
2081
  : $choice
@@ -2076,7 +2090,11 @@ $.fn.dropdown = function(parameters) {
2076
2090
  }
2077
2091
  }
2078
2092
  else {
2079
- if( String(optionValue) == String(value)) {
2093
+ if(settings.ignoreCase) {
2094
+ optionValue = optionValue.toLowerCase();
2095
+ value = value.toLowerCase();
2096
+ }
2097
+ if(module.escape.htmlEntities(String(optionValue)) === module.escape.htmlEntities(String(value))) {
2080
2098
  module.verbose('Found select item by value', optionValue, value);
2081
2099
  $selectedItem = $choice;
2082
2100
  return true;
@@ -2119,8 +2137,8 @@ $.fn.dropdown = function(parameters) {
2119
2137
  },
2120
2138
 
2121
2139
  restore: {
2122
- defaults: function() {
2123
- module.clear();
2140
+ defaults: function(preventChangeTrigger) {
2141
+ module.clear(preventChangeTrigger);
2124
2142
  module.restore.defaultText();
2125
2143
  module.restore.defaultValue();
2126
2144
  },
@@ -2272,7 +2290,7 @@ $.fn.dropdown = function(parameters) {
2272
2290
  }
2273
2291
  },
2274
2292
 
2275
- clear: function() {
2293
+ clear: function(preventChangeTrigger) {
2276
2294
  if(module.is.multiple() && settings.useLabels) {
2277
2295
  module.remove.labels();
2278
2296
  }
@@ -2282,11 +2300,11 @@ $.fn.dropdown = function(parameters) {
2282
2300
  module.remove.filteredItem();
2283
2301
  }
2284
2302
  module.set.placeholderText();
2285
- module.clearValue();
2303
+ module.clearValue(preventChangeTrigger);
2286
2304
  },
2287
2305
 
2288
- clearValue: function() {
2289
- module.set.value('');
2306
+ clearValue: function(preventChangeTrigger) {
2307
+ module.set.value('', null, null, preventChangeTrigger);
2290
2308
  },
2291
2309
 
2292
2310
  scrollPage: function(direction, $selectedItem) {
@@ -2568,7 +2586,7 @@ $.fn.dropdown = function(parameters) {
2568
2586
  var $element = $currentMenu || $menu;
2569
2587
  $element.addClass(className.leftward);
2570
2588
  },
2571
- value: function(value, text, $selected) {
2589
+ value: function(value, text, $selected, preventChangeTrigger) {
2572
2590
  if(value !== undefined && value !== '' && !(Array.isArray(value) && value.length === 0)) {
2573
2591
  $input.removeClass(className.noselection);
2574
2592
  } else {
@@ -2603,7 +2621,7 @@ $.fn.dropdown = function(parameters) {
2603
2621
  if(settings.fireOnInit === false && module.is.initialLoad()) {
2604
2622
  module.debug('Input native change event ignored on initial load');
2605
2623
  }
2606
- else {
2624
+ else if(preventChangeTrigger !== true) {
2607
2625
  module.trigger.change();
2608
2626
  }
2609
2627
  internalChange = false;
@@ -2617,7 +2635,7 @@ $.fn.dropdown = function(parameters) {
2617
2635
  if(settings.fireOnInit === false && module.is.initialLoad()) {
2618
2636
  module.verbose('No callback on initial load', settings.onChange);
2619
2637
  }
2620
- else {
2638
+ else if(preventChangeTrigger !== true) {
2621
2639
  settings.onChange.call(element, value, text, $selected);
2622
2640
  }
2623
2641
  },
@@ -2708,7 +2726,8 @@ $.fn.dropdown = function(parameters) {
2708
2726
  }
2709
2727
  })
2710
2728
  ;
2711
- },
2729
+ module.remove.searchTerm();
2730
+ }
2712
2731
  },
2713
2732
 
2714
2733
  add: {
@@ -2908,7 +2927,7 @@ $.fn.dropdown = function(parameters) {
2908
2927
  else {
2909
2928
  settings.onAdd.call(element, addedValue, addedText, $selectedItem);
2910
2929
  }
2911
- module.set.value(newValue, addedValue, addedText, $selectedItem);
2930
+ module.set.value(newValue, addedText, $selectedItem);
2912
2931
  module.check.maxSelections();
2913
2932
  },
2914
2933
  },
@@ -3048,6 +3067,7 @@ $.fn.dropdown = function(parameters) {
3048
3067
  values = module.get.values(),
3049
3068
  newValue
3050
3069
  ;
3070
+ removedValue = module.escape.htmlEntities(removedValue);
3051
3071
  if( module.has.selectInput() ) {
3052
3072
  module.verbose('Input is <select> removing selected option', removedValue);
3053
3073
  newValue = module.remove.arrayValue(removedValue, values);
@@ -3080,7 +3100,7 @@ $.fn.dropdown = function(parameters) {
3080
3100
  label: function(value, shouldAnimate) {
3081
3101
  var
3082
3102
  $labels = $module.find(selector.label),
3083
- $removedLabel = $labels.filter('[data-' + metadata.value + '="' + module.escape.string(value) +'"]')
3103
+ $removedLabel = $labels.filter('[data-' + metadata.value + '="' + module.escape.string(settings.ignoreCase ? value.toLowerCase() : value) +'"]')
3084
3104
  ;
3085
3105
  module.verbose('Removing label', $removedLabel);
3086
3106
  $removedLabel.remove();
@@ -3637,10 +3657,9 @@ $.fn.dropdown = function(parameters) {
3637
3657
  },
3638
3658
  htmlEntities: function(string) {
3639
3659
  var
3640
- badChars = /[&<>"'`]/g,
3660
+ badChars = /[<>"'`]/g,
3641
3661
  shouldEscape = /[&<>"'`]/,
3642
3662
  escape = {
3643
- "&": "&amp;",
3644
3663
  "<": "&lt;",
3645
3664
  ">": "&gt;",
3646
3665
  '"': "&quot;",
@@ -3652,6 +3671,7 @@ $.fn.dropdown = function(parameters) {
3652
3671
  }
3653
3672
  ;
3654
3673
  if(shouldEscape.test(string)) {
3674
+ string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
3655
3675
  return string.replace(badChars, escapedChar);
3656
3676
  }
3657
3677
  return string;
@@ -3880,7 +3900,8 @@ $.fn.dropdown.settings = {
3880
3900
  forceSelection : true, // force a choice on blur with search selection
3881
3901
 
3882
3902
  allowAdditions : false, // whether multiple select should allow user added values
3883
- ignoreCase : false, // whether to consider values not matching in case to be the same
3903
+ ignoreCase : false, // whether to consider case sensitivity when creating labels
3904
+ ignoreSearchCase : true, // whether to consider case sensitivity when filtering items
3884
3905
  hideAdditions : true, // whether or not to hide special message prompting a user they can enter a value
3885
3906
 
3886
3907
  maxSelections : false, // When set to a number limits the number of selections to this count
@@ -4047,7 +4068,8 @@ $.fn.dropdown.settings = {
4047
4068
  delete : 'delete',
4048
4069
  header : 'header',
4049
4070
  divider : 'divider',
4050
- groupIcon : ''
4071
+ groupIcon : '',
4072
+ unfilterable : 'unfilterable'
4051
4073
  }
4052
4074
 
4053
4075
  };
@@ -4062,10 +4084,9 @@ $.fn.dropdown.settings.templates = {
4062
4084
  return string;
4063
4085
  }
4064
4086
  var
4065
- badChars = /[&<>"'`]/g,
4087
+ badChars = /[<>"'`]/g,
4066
4088
  shouldEscape = /[&<>"'`]/,
4067
4089
  escape = {
4068
- "&": "&amp;",
4069
4090
  "<": "&lt;",
4070
4091
  ">": "&gt;",
4071
4092
  '"': "&quot;",
@@ -4077,6 +4098,7 @@ $.fn.dropdown.settings.templates = {
4077
4098
  }
4078
4099
  ;
4079
4100
  if(shouldEscape.test(string)) {
4101
+ string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&amp;");
4080
4102
  return string.replace(badChars, escapedChar);
4081
4103
  }
4082
4104
  return string;
@@ -4132,10 +4154,10 @@ $.fn.dropdown.settings.templates = {
4132
4154
  if(option[fields.icon]) {
4133
4155
  html += '<i class="'+deQuote(option[fields.icon])+' '+(option[fields.iconClass] ? deQuote(option[fields.iconClass]) : className.icon)+'"></i>';
4134
4156
  }
4135
- html += escape(option[fields.name],preserveHTML);
4157
+ html += escape(option[fields.name] || '', preserveHTML);
4136
4158
  html += '</div>';
4137
4159
  } else if (itemType === 'header') {
4138
- var groupName = escape(option[fields.name],preserveHTML),
4160
+ var groupName = escape(option[fields.name] || '', preserveHTML),
4139
4161
  groupIcon = option[fields.icon] ? deQuote(option[fields.icon]) : className.groupIcon
4140
4162
  ;
4141
4163
  if(groupName !== '' || groupIcon !== '') {