fomantic-ui-sass 2.7.8 → 2.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/assets/javascripts/semantic-ui/api.js +1 -1
- data/app/assets/javascripts/semantic-ui/calendar.js +41 -18
- data/app/assets/javascripts/semantic-ui/dropdown.js +58 -33
- data/app/assets/javascripts/semantic-ui/form.js +9 -4
- data/app/assets/javascripts/semantic-ui/modal.js +96 -33
- data/app/assets/javascripts/semantic-ui/popup.js +8 -8
- data/app/assets/javascripts/semantic-ui/progress.js +10 -8
- data/app/assets/javascripts/semantic-ui/rating.js +35 -6
- data/app/assets/javascripts/semantic-ui/sidebar.js +2 -3
- data/app/assets/javascripts/semantic-ui/slider.js +78 -29
- data/app/assets/javascripts/semantic-ui/tab.js +1 -1
- data/app/assets/javascripts/semantic-ui/toast.js +395 -121
- data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +3 -3
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +741 -143
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +35 -35
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +73 -117
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +11 -11
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +976 -191
- data/app/assets/stylesheets/semantic-ui/elements/_all.scss +1 -0
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +51 -81
- data/app/assets/stylesheets/semantic-ui/elements/_container.scss +12 -12
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +35 -14
- data/app/assets/stylesheets/semantic-ui/elements/_emoji.scss +12312 -0
- data/app/assets/stylesheets/semantic-ui/elements/_header.scss +111 -66
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +70 -31
- data/app/assets/stylesheets/semantic-ui/elements/_image.scss +28 -28
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +218 -69
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +20 -20
- data/app/assets/stylesheets/semantic-ui/elements/_list.scss +52 -51
- data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +85 -91
- data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +8 -8
- data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +11 -11
- data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +31 -10
- data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +38 -38
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +16 -17
- data/app/assets/stylesheets/semantic-ui/elements/_text.scss +3 -3
- data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +6 -6
- data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +14 -124
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +21 -21
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +181 -110
- data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +12 -12
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +121 -30
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +71 -72
- data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +44 -26
- data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +246 -21
- data/app/assets/stylesheets/semantic-ui/modules/_search.scss +16 -13
- data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +12 -14
- data/app/assets/stylesheets/semantic-ui/modules/_slider.scss +20 -23
- data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +542 -155
- data/app/assets/stylesheets/semantic-ui/views/_ad.scss +16 -16
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +42 -17
- data/app/assets/stylesheets/semantic-ui/views/_comment.scss +9 -9
- data/app/assets/stylesheets/semantic-ui/views/_feed.scss +20 -5
- data/app/assets/stylesheets/semantic-ui/views/_item.scss +33 -12
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +60 -46
- data/lib/fomantic/ui/sass/version.rb +2 -2
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4feacdb9153c2826325b0b6a59a368a1a426ae042cf54ed94f309b02d5ed814
|
4
|
+
data.tar.gz: 27f10c592927608a8759340cef992443b00f5945200335af4764b7dbe9fa9c2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09051bac14dbfa2f41813a51b307b77eba9b2f451c420ea0a2a5b22ae7003b6d3e2b54b0e36660e83e8815cf0fd3293b296e90d7aaf905eeb2bab7c9a86e50db'
|
7
|
+
data.tar.gz: 2a477b771ae112164e28dbb3d312119b7a880b3cca7448643f34640e550b5e1a31a9821b7f8c2918481845fa870330aeed5498668a7f5d9fca10eec75d05f3f4
|
data/CHANGELOG.md
CHANGED
@@ -724,7 +724,7 @@ $.api = $.fn.api = function(parameters) {
|
|
724
724
|
var
|
725
725
|
runSettings
|
726
726
|
;
|
727
|
-
runSettings = settings.beforeSend.call(
|
727
|
+
runSettings = settings.beforeSend.call($module, settings);
|
728
728
|
if(runSettings) {
|
729
729
|
if(runSettings.success !== undefined) {
|
730
730
|
module.debug('Legacy success callback detected', runSettings);
|
@@ -115,6 +115,7 @@ $.fn.calendar = function(parameters) {
|
|
115
115
|
if (module.get.maxDate() !== null) {
|
116
116
|
module.set.maxDate($module.data(metadata.maxDate));
|
117
117
|
}
|
118
|
+
module.setting('type', module.get.type());
|
118
119
|
},
|
119
120
|
popup: function () {
|
120
121
|
if (settings.inline) {
|
@@ -185,17 +186,15 @@ $.fn.calendar = function(parameters) {
|
|
185
186
|
}
|
186
187
|
},
|
187
188
|
date: function () {
|
189
|
+
var date;
|
188
190
|
if (settings.initialDate) {
|
189
|
-
|
190
|
-
module.set.date(date, settings.formatInput, false);
|
191
|
+
date = parser.date(settings.initialDate, settings);
|
191
192
|
} else if ($module.data(metadata.date) !== undefined) {
|
192
|
-
|
193
|
-
module.set.date(date, settings.formatInput, false);
|
193
|
+
date = parser.date($module.data(metadata.date), settings);
|
194
194
|
} else if ($input.length) {
|
195
|
-
|
196
|
-
var date = parser.date(val, settings);
|
197
|
-
module.set.date(date, settings.formatInput, false);
|
195
|
+
date = parser.date($input.val(), settings);
|
198
196
|
}
|
197
|
+
module.set.date(date, settings.formatInput, false);
|
199
198
|
}
|
200
199
|
},
|
201
200
|
|
@@ -416,6 +415,10 @@ $.fn.calendar = function(parameters) {
|
|
416
415
|
((!!startDate && module.helper.isDateInRange(cellDate, mode, startDate, rangeDate)) ||
|
417
416
|
(!!endDate && module.helper.isDateInRange(cellDate, mode, rangeDate, endDate)));
|
418
417
|
cell.toggleClass(className.focusCell, focused && (!isTouch || isTouchDown) && (!adjacent || (settings.selectAdjacentDays && adjacent)) && !disabled);
|
418
|
+
|
419
|
+
if (module.helper.isTodayButton(cell)) {
|
420
|
+
return;
|
421
|
+
}
|
419
422
|
cell.toggleClass(className.rangeCell, inRange && !active && !disabled);
|
420
423
|
});
|
421
424
|
}
|
@@ -623,6 +626,9 @@ $.fn.calendar = function(parameters) {
|
|
623
626
|
settings.type === 'month' ? 'month' :
|
624
627
|
settings.type === 'year' ? 'year' : 'day';
|
625
628
|
},
|
629
|
+
type: function() {
|
630
|
+
return $module.data(metadata.type) || settings.type;
|
631
|
+
},
|
626
632
|
validModes: function () {
|
627
633
|
var validModes = [];
|
628
634
|
if (settings.type !== 'time') {
|
@@ -674,7 +680,8 @@ $.fn.calendar = function(parameters) {
|
|
674
680
|
|
675
681
|
var mode = module.get.mode();
|
676
682
|
var text = formatter.datetime(date, settings);
|
677
|
-
|
683
|
+
|
684
|
+
if (fireChange && settings.onBeforeChange.call(element, date, text, mode) === false) {
|
678
685
|
return false;
|
679
686
|
}
|
680
687
|
|
@@ -694,6 +701,10 @@ $.fn.calendar = function(parameters) {
|
|
694
701
|
if (updateInput && $input.length) {
|
695
702
|
$input.val(text);
|
696
703
|
}
|
704
|
+
|
705
|
+
if (fireChange) {
|
706
|
+
settings.onChange.call(element, date, text, mode);
|
707
|
+
}
|
697
708
|
},
|
698
709
|
startDate: function (date, refreshCalendar) {
|
699
710
|
date = module.helper.sanitiseDate(date);
|
@@ -950,6 +961,9 @@ $.fn.calendar = function(parameters) {
|
|
950
961
|
mergeDateTime: function (date, time) {
|
951
962
|
return (!date || !time) ? time :
|
952
963
|
new Date(date.getFullYear(), date.getMonth(), date.getDate(), time.getHours(), time.getMinutes());
|
964
|
+
},
|
965
|
+
isTodayButton: function(element) {
|
966
|
+
return element.text() === settings.text.today;
|
953
967
|
}
|
954
968
|
},
|
955
969
|
|
@@ -1276,6 +1290,8 @@ $.fn.calendar.settings = {
|
|
1276
1290
|
if (text.length === 0) {
|
1277
1291
|
return null;
|
1278
1292
|
}
|
1293
|
+
// Reverse date and month in some cases
|
1294
|
+
text = settings.monthFirst ? text : text.replace(/[\/\-\.]/g,'/').replace(/([0-9]+)\/([0-9]+)/,'$2/$1');
|
1279
1295
|
var textDate = new Date(text);
|
1280
1296
|
if(!isNaN(textDate.getDate())) {
|
1281
1297
|
return textDate;
|
@@ -1288,8 +1304,11 @@ $.fn.calendar.settings = {
|
|
1288
1304
|
var isTimeOnly = settings.type === 'time';
|
1289
1305
|
var isDateOnly = settings.type.indexOf('time') < 0;
|
1290
1306
|
|
1291
|
-
var words = text.split(settings.regExp.dateWords);
|
1292
|
-
var numbers = text.split(settings.regExp.dateNumbers);
|
1307
|
+
var words = text.split(settings.regExp.dateWords), word;
|
1308
|
+
var numbers = text.split(settings.regExp.dateNumbers), number;
|
1309
|
+
|
1310
|
+
var parts;
|
1311
|
+
var monthString;
|
1293
1312
|
|
1294
1313
|
if (!isDateOnly) {
|
1295
1314
|
//am/pm
|
@@ -1298,10 +1317,10 @@ $.fn.calendar.settings = {
|
|
1298
1317
|
|
1299
1318
|
//time with ':'
|
1300
1319
|
for (i = 0; i < numbers.length; i++) {
|
1301
|
-
|
1320
|
+
number = numbers[i];
|
1302
1321
|
if (number.indexOf(':') >= 0) {
|
1303
1322
|
if (hour < 0 || minute < 0) {
|
1304
|
-
|
1323
|
+
parts = number.split(':');
|
1305
1324
|
for (k = 0; k < Math.min(2, parts.length); k++) {
|
1306
1325
|
j = parseInt(parts[k]);
|
1307
1326
|
if (isNaN(j)) {
|
@@ -1322,14 +1341,13 @@ $.fn.calendar.settings = {
|
|
1322
1341
|
if (!isTimeOnly) {
|
1323
1342
|
//textual month
|
1324
1343
|
for (i = 0; i < words.length; i++) {
|
1325
|
-
|
1344
|
+
word = words[i];
|
1326
1345
|
if (word.length <= 0) {
|
1327
1346
|
continue;
|
1328
1347
|
}
|
1329
|
-
word = word.substring(0, Math.min(word.length, 3));
|
1330
1348
|
for (j = 0; j < settings.text.months.length; j++) {
|
1331
|
-
|
1332
|
-
monthString = monthString.substring(0,
|
1349
|
+
monthString = settings.text.months[j];
|
1350
|
+
monthString = monthString.substring(0, word.length).toLowerCase();
|
1333
1351
|
if (monthString === word) {
|
1334
1352
|
month = j + 1;
|
1335
1353
|
break;
|
@@ -1473,11 +1491,15 @@ $.fn.calendar.settings = {
|
|
1473
1491
|
}
|
1474
1492
|
},
|
1475
1493
|
|
1476
|
-
// callback
|
1477
|
-
|
1494
|
+
// callback before date is changed, return false to cancel the change
|
1495
|
+
onBeforeChange: function (date, text, mode) {
|
1478
1496
|
return true;
|
1479
1497
|
},
|
1480
1498
|
|
1499
|
+
// callback when date changes
|
1500
|
+
onChange: function (date, text, mode) {
|
1501
|
+
},
|
1502
|
+
|
1481
1503
|
// callback before show animation, return false to prevent show
|
1482
1504
|
onShow: function () {
|
1483
1505
|
},
|
@@ -1551,6 +1573,7 @@ $.fn.calendar.settings = {
|
|
1551
1573
|
minDate: 'minDate',
|
1552
1574
|
maxDate: 'maxDate',
|
1553
1575
|
mode: 'mode',
|
1576
|
+
type: 'type',
|
1554
1577
|
monthOffset: 'monthOffset',
|
1555
1578
|
message: 'message',
|
1556
1579
|
class: 'class'
|
@@ -278,7 +278,7 @@ $.fn.dropdown = function(parameters) {
|
|
278
278
|
module.filter(query);
|
279
279
|
}
|
280
280
|
else {
|
281
|
-
module.hide();
|
281
|
+
module.hide(null,true);
|
282
282
|
}
|
283
283
|
},
|
284
284
|
|
@@ -397,6 +397,7 @@ $.fn.dropdown = function(parameters) {
|
|
397
397
|
$module.addClass(className.disabled);
|
398
398
|
}
|
399
399
|
$input
|
400
|
+
.removeAttr('required')
|
400
401
|
.removeAttr('class')
|
401
402
|
.detach()
|
402
403
|
.prependTo($module)
|
@@ -484,7 +485,7 @@ $.fn.dropdown = function(parameters) {
|
|
484
485
|
}
|
485
486
|
},
|
486
487
|
|
487
|
-
show: function(callback) {
|
488
|
+
show: function(callback, preventFocus) {
|
488
489
|
callback = $.isFunction(callback)
|
489
490
|
? callback
|
490
491
|
: function(){}
|
@@ -506,7 +507,7 @@ $.fn.dropdown = function(parameters) {
|
|
506
507
|
if( module.can.click() ) {
|
507
508
|
module.bind.intent();
|
508
509
|
}
|
509
|
-
if(module.has.search()) {
|
510
|
+
if(module.has.search() && !preventFocus) {
|
510
511
|
module.focusSearch();
|
511
512
|
}
|
512
513
|
module.set.visible();
|
@@ -516,7 +517,7 @@ $.fn.dropdown = function(parameters) {
|
|
516
517
|
}
|
517
518
|
},
|
518
519
|
|
519
|
-
hide: function(callback) {
|
520
|
+
hide: function(callback, preventBlur) {
|
520
521
|
callback = $.isFunction(callback)
|
521
522
|
? callback
|
522
523
|
: function(){}
|
@@ -527,7 +528,7 @@ $.fn.dropdown = function(parameters) {
|
|
527
528
|
module.animate.hide(function() {
|
528
529
|
module.remove.visible();
|
529
530
|
// hidding search focus
|
530
|
-
if ( module.is.focusedOnSearch() ) {
|
531
|
+
if ( module.is.focusedOnSearch() && preventBlur !== true ) {
|
531
532
|
$search.blur();
|
532
533
|
}
|
533
534
|
callback.call(element);
|
@@ -832,7 +833,8 @@ $.fn.dropdown = function(parameters) {
|
|
832
833
|
),
|
833
834
|
results = null,
|
834
835
|
escapedTerm = module.escape.string(searchTerm),
|
835
|
-
|
836
|
+
regExpFlags = (settings.ignoreSearchCase ? 'i' : '') + 'gm',
|
837
|
+
beginsWithRegExp = new RegExp('^' + escapedTerm, regExpFlags)
|
836
838
|
;
|
837
839
|
// avoid loop if we're matching nothing
|
838
840
|
if( module.has.query() ) {
|
@@ -918,8 +920,8 @@ $.fn.dropdown = function(parameters) {
|
|
918
920
|
termLength = term.length,
|
919
921
|
queryLength = query.length
|
920
922
|
;
|
921
|
-
query = query.toLowerCase();
|
922
|
-
term = term.toLowerCase();
|
923
|
+
query = (settings.ignoreSearchCase ? query.toLowerCase() : query);
|
924
|
+
term = (settings.ignoreSearchCase ? term.toLowerCase() : term);
|
923
925
|
if(queryLength > termLength) {
|
924
926
|
return false;
|
925
927
|
}
|
@@ -940,8 +942,8 @@ $.fn.dropdown = function(parameters) {
|
|
940
942
|
return true;
|
941
943
|
},
|
942
944
|
exactSearch: function (query, term) {
|
943
|
-
query = query.toLowerCase();
|
944
|
-
term = term.toLowerCase();
|
945
|
+
query = (settings.ignoreSearchCase ? query.toLowerCase() : query);
|
946
|
+
term = (settings.ignoreSearchCase ? term.toLowerCase() : term);
|
945
947
|
return term.indexOf(query) > -1;
|
946
948
|
|
947
949
|
},
|
@@ -981,18 +983,12 @@ $.fn.dropdown = function(parameters) {
|
|
981
983
|
: $activeItem,
|
982
984
|
hasSelected = ($selectedItem.length > 0)
|
983
985
|
;
|
984
|
-
if(hasSelected && !module.is.multiple()) {
|
986
|
+
if(settings.allowAdditions || (hasSelected && !module.is.multiple())) {
|
985
987
|
module.debug('Forcing partial selection to selected item', $selectedItem);
|
986
988
|
module.event.item.click.call($selectedItem, {}, true);
|
987
989
|
}
|
988
990
|
else {
|
989
|
-
|
990
|
-
module.set.selected(module.get.query());
|
991
|
-
module.remove.searchTerm();
|
992
|
-
}
|
993
|
-
else {
|
994
|
-
module.remove.searchTerm();
|
995
|
-
}
|
991
|
+
module.remove.searchTerm();
|
996
992
|
}
|
997
993
|
},
|
998
994
|
|
@@ -1012,6 +1008,23 @@ $.fn.dropdown = function(parameters) {
|
|
1012
1008
|
}
|
1013
1009
|
}
|
1014
1010
|
});
|
1011
|
+
|
1012
|
+
if(module.has.selectInput()) {
|
1013
|
+
module.disconnect.selectObserver();
|
1014
|
+
$input.html('');
|
1015
|
+
$input.append('<option disabled selected value></option>');
|
1016
|
+
$.each(values, function(index, item) {
|
1017
|
+
var
|
1018
|
+
value = settings.templates.deQuote(item[fields.value]),
|
1019
|
+
name = settings.templates.escape(
|
1020
|
+
item[fields.name] || item[fields.value],
|
1021
|
+
settings.preserveHTML
|
1022
|
+
)
|
1023
|
+
;
|
1024
|
+
$input.append('<option value="' + value + '">' + name + '</option>');
|
1025
|
+
});
|
1026
|
+
module.observe.select();
|
1027
|
+
}
|
1015
1028
|
}
|
1016
1029
|
},
|
1017
1030
|
|
@@ -1083,6 +1096,8 @@ $.fn.dropdown = function(parameters) {
|
|
1083
1096
|
if(!itemActivated && !pageLostFocus) {
|
1084
1097
|
if(settings.forceSelection) {
|
1085
1098
|
module.forceSelection();
|
1099
|
+
} else if(!settings.allowAdditions){
|
1100
|
+
module.remove.searchTerm();
|
1086
1101
|
}
|
1087
1102
|
module.hide();
|
1088
1103
|
}
|
@@ -1922,7 +1937,11 @@ $.fn.dropdown = function(parameters) {
|
|
1922
1937
|
return ($choice.data(metadata.value) !== undefined)
|
1923
1938
|
? String( $choice.data(metadata.value) )
|
1924
1939
|
: (typeof choiceText === 'string')
|
1925
|
-
? $.trim(
|
1940
|
+
? $.trim(
|
1941
|
+
settings.ignoreSearchCase
|
1942
|
+
? choiceText.toLowerCase()
|
1943
|
+
: choiceText
|
1944
|
+
)
|
1926
1945
|
: String(choiceText)
|
1927
1946
|
;
|
1928
1947
|
},
|
@@ -2076,6 +2095,10 @@ $.fn.dropdown = function(parameters) {
|
|
2076
2095
|
}
|
2077
2096
|
}
|
2078
2097
|
else {
|
2098
|
+
if(settings.ignoreCase) {
|
2099
|
+
optionValue = optionValue.toLowerCase();
|
2100
|
+
value = value.toLowerCase();
|
2101
|
+
}
|
2079
2102
|
if( String(optionValue) == String(value)) {
|
2080
2103
|
module.verbose('Found select item by value', optionValue, value);
|
2081
2104
|
$selectedItem = $choice;
|
@@ -2119,8 +2142,8 @@ $.fn.dropdown = function(parameters) {
|
|
2119
2142
|
},
|
2120
2143
|
|
2121
2144
|
restore: {
|
2122
|
-
defaults: function() {
|
2123
|
-
module.clear();
|
2145
|
+
defaults: function(preventChangeTrigger) {
|
2146
|
+
module.clear(preventChangeTrigger);
|
2124
2147
|
module.restore.defaultText();
|
2125
2148
|
module.restore.defaultValue();
|
2126
2149
|
},
|
@@ -2272,7 +2295,7 @@ $.fn.dropdown = function(parameters) {
|
|
2272
2295
|
}
|
2273
2296
|
},
|
2274
2297
|
|
2275
|
-
clear: function() {
|
2298
|
+
clear: function(preventChangeTrigger) {
|
2276
2299
|
if(module.is.multiple() && settings.useLabels) {
|
2277
2300
|
module.remove.labels();
|
2278
2301
|
}
|
@@ -2282,11 +2305,11 @@ $.fn.dropdown = function(parameters) {
|
|
2282
2305
|
module.remove.filteredItem();
|
2283
2306
|
}
|
2284
2307
|
module.set.placeholderText();
|
2285
|
-
module.clearValue();
|
2308
|
+
module.clearValue(preventChangeTrigger);
|
2286
2309
|
},
|
2287
2310
|
|
2288
|
-
clearValue: function() {
|
2289
|
-
module.set.value('');
|
2311
|
+
clearValue: function(preventChangeTrigger) {
|
2312
|
+
module.set.value('', null, null, preventChangeTrigger);
|
2290
2313
|
},
|
2291
2314
|
|
2292
2315
|
scrollPage: function(direction, $selectedItem) {
|
@@ -2568,7 +2591,7 @@ $.fn.dropdown = function(parameters) {
|
|
2568
2591
|
var $element = $currentMenu || $menu;
|
2569
2592
|
$element.addClass(className.leftward);
|
2570
2593
|
},
|
2571
|
-
value: function(value, text, $selected) {
|
2594
|
+
value: function(value, text, $selected, preventChangeTrigger) {
|
2572
2595
|
if(value !== undefined && value !== '' && !(Array.isArray(value) && value.length === 0)) {
|
2573
2596
|
$input.removeClass(className.noselection);
|
2574
2597
|
} else {
|
@@ -2603,7 +2626,7 @@ $.fn.dropdown = function(parameters) {
|
|
2603
2626
|
if(settings.fireOnInit === false && module.is.initialLoad()) {
|
2604
2627
|
module.debug('Input native change event ignored on initial load');
|
2605
2628
|
}
|
2606
|
-
else {
|
2629
|
+
else if(preventChangeTrigger !== true) {
|
2607
2630
|
module.trigger.change();
|
2608
2631
|
}
|
2609
2632
|
internalChange = false;
|
@@ -2617,7 +2640,7 @@ $.fn.dropdown = function(parameters) {
|
|
2617
2640
|
if(settings.fireOnInit === false && module.is.initialLoad()) {
|
2618
2641
|
module.verbose('No callback on initial load', settings.onChange);
|
2619
2642
|
}
|
2620
|
-
else {
|
2643
|
+
else if(preventChangeTrigger !== true) {
|
2621
2644
|
settings.onChange.call(element, value, text, $selected);
|
2622
2645
|
}
|
2623
2646
|
},
|
@@ -2708,7 +2731,8 @@ $.fn.dropdown = function(parameters) {
|
|
2708
2731
|
}
|
2709
2732
|
})
|
2710
2733
|
;
|
2711
|
-
|
2734
|
+
module.remove.searchTerm();
|
2735
|
+
}
|
2712
2736
|
},
|
2713
2737
|
|
2714
2738
|
add: {
|
@@ -2908,7 +2932,7 @@ $.fn.dropdown = function(parameters) {
|
|
2908
2932
|
else {
|
2909
2933
|
settings.onAdd.call(element, addedValue, addedText, $selectedItem);
|
2910
2934
|
}
|
2911
|
-
module.set.value(newValue,
|
2935
|
+
module.set.value(newValue, addedText, $selectedItem);
|
2912
2936
|
module.check.maxSelections();
|
2913
2937
|
},
|
2914
2938
|
},
|
@@ -3080,7 +3104,7 @@ $.fn.dropdown = function(parameters) {
|
|
3080
3104
|
label: function(value, shouldAnimate) {
|
3081
3105
|
var
|
3082
3106
|
$labels = $module.find(selector.label),
|
3083
|
-
$removedLabel = $labels.filter('[data-' + metadata.value + '="' + module.escape.string(value) +'"]')
|
3107
|
+
$removedLabel = $labels.filter('[data-' + metadata.value + '="' + module.escape.string(settings.ignoreCase ? value.toLowerCase() : value) +'"]')
|
3084
3108
|
;
|
3085
3109
|
module.verbose('Removing label', $removedLabel);
|
3086
3110
|
$removedLabel.remove();
|
@@ -3880,7 +3904,8 @@ $.fn.dropdown.settings = {
|
|
3880
3904
|
forceSelection : true, // force a choice on blur with search selection
|
3881
3905
|
|
3882
3906
|
allowAdditions : false, // whether multiple select should allow user added values
|
3883
|
-
ignoreCase : false,
|
3907
|
+
ignoreCase : false, // whether to consider case sensitivity when creating labels
|
3908
|
+
ignoreSearchCase : true, // whether to consider case sensitivity when filtering items
|
3884
3909
|
hideAdditions : true, // whether or not to hide special message prompting a user they can enter a value
|
3885
3910
|
|
3886
3911
|
maxSelections : false, // When set to a number limits the number of selections to this count
|
@@ -4132,7 +4157,7 @@ $.fn.dropdown.settings.templates = {
|
|
4132
4157
|
if(option[fields.icon]) {
|
4133
4158
|
html += '<i class="'+deQuote(option[fields.icon])+' '+(option[fields.iconClass] ? deQuote(option[fields.iconClass]) : className.icon)+'"></i>';
|
4134
4159
|
}
|
4135
|
-
html += escape(option[fields.name],preserveHTML);
|
4160
|
+
html += escape(option[fields.name] || option[fields.value],preserveHTML);
|
4136
4161
|
html += '</div>';
|
4137
4162
|
} else if (itemType === 'header') {
|
4138
4163
|
var groupName = escape(option[fields.name],preserveHTML),
|