diff --git a/definitions/behaviors/form.js b/definitions/behaviors/form.js
index b71df56..cc76d6e 100644
--- a/definitions/behaviors/form.js
+++ b/definitions/behaviors/form.js
@@ -95,6 +95,9 @@ $.fn.form = function(parameters) {
module.verbose('Initializing form validation', $module, settings);
module.bindEvents();
module.set.defaults();
+ if (settings.autoCheckRequired) {
+ module.set.autoCheck();
+ }
module.instantiate();
}
},
@@ -542,7 +545,7 @@ $.fn.form = function(parameters) {
name
;
if(requiresValue) {
- prompt = prompt.replace('{value}', $field.val());
+ prompt = prompt.replace(/\{value\}/g, $field.val());
}
if(requiresName) {
$label = $field.closest(selector.group).find('label').eq(0);
@@ -550,10 +553,10 @@ $.fn.form = function(parameters) {
? $label.text()
: $field.prop('placeholder') || settings.text.unspecifiedField
;
- prompt = prompt.replace('{name}', name);
+ prompt = prompt.replace(/\{name\}/g, name);
}
- prompt = prompt.replace('{identifier}', field.identifier);
- prompt = prompt.replace('{ruleValue}', ancillary);
+ prompt = prompt.replace(/\{identifier\}/g, field.identifier);
+ prompt = prompt.replace(/\{ruleValue\}/g, ancillary);
if(!rule.prompt) {
module.verbose('Using default validation prompt for type', prompt, ruleName);
}
@@ -703,7 +706,7 @@ $.fn.form = function(parameters) {
}
else {
if(isRadio) {
- if(values[name] === undefined || values[name] == false) {
+ if(values[name] === undefined || values[name] === false) {
values[name] = (isChecked)
? value || true
: false
@@ -1116,6 +1119,32 @@ $.fn.form = function(parameters) {
asDirty: function() {
module.set.defaults();
module.set.dirty();
+ },
+ autoCheck: function() {
+ module.debug('Enabling auto check on required fields');
+ $field.each(function (_index, el) {
+ var
+ $el = $(el),
+ $elGroup = $(el).closest($group),
+ isCheckbox = ($el.filter(selector.checkbox).length > 0),
+ isRequired = $el.prop('required') || $elGroup.hasClass(className.required) || $elGroup.parent().hasClass(className.required),
+ isDisabled = $el.prop('disabled') || $elGroup.hasClass(className.disabled) || $elGroup.parent().hasClass(className.disabled),
+ validation = module.get.validation($el),
+ hasEmptyRule = validation
+ ? $.grep(validation.rules, function(rule) { return rule.type == "empty" }) !== 0
+ : false,
+ identifier = validation.identifier || $el.attr('id') || $el.attr('name') || $el.data(metadata.validate)
+ ;
+ if (isRequired && !isDisabled && !hasEmptyRule && identifier !== undefined) {
+ if (isCheckbox) {
+ module.verbose("Adding 'checked' rule on field", identifier);
+ module.add.rule(identifier, "checked");
+ } else {
+ module.verbose("Adding 'empty' rule on field", identifier);
+ module.add.rule(identifier, "empty");
+ }
+ }
+ });
}
},
@@ -1455,6 +1484,7 @@ $.fn.form.settings = {
transition : 'scale',
duration : 200,
+ autoCheckRequired : false,
preventLeaving : false,
dateHandling : 'date', // 'date', 'input', 'formatter'
@@ -1535,10 +1565,12 @@ $.fn.form.settings = {
},
className : {
- error : 'error',
- label : 'ui basic red pointing prompt label',
- pressed : 'down',
- success : 'success'
+ error : 'error',
+ label : 'ui basic red pointing prompt label',
+ pressed : 'down',
+ success : 'success',
+ required : 'required',
+ disabled : 'disabled'
},
error: {
diff --git a/definitions/collections/form.less b/definitions/collections/form.less
index db162f4..ae8953b 100644
--- a/definitions/collections/form.less
+++ b/definitions/collections/form.less
@@ -1097,6 +1097,16 @@
font-size: @inlineInputSize;
}
+ .ui.form .inline.fields .field .calendar:not(.popup),
+ .ui.form .inline.field .calendar:not(.popup) {
+ display:inline-block;
+ }
+
+ .ui.form .inline.fields .field .calendar:not(.popup) > .input > input,
+ .ui.form .inline.field .calendar:not(.popup) > .input > input {
+ width: @inlineCalendarWidth;
+ }
+
/* Label */
.ui.form .inline.fields .field > :first-child,
.ui.form .inline.field > :first-child {
diff --git a/definitions/collections/menu.less b/definitions/collections/menu.less
index 8eedcba..a75befa 100644
--- a/definitions/collections/menu.less
+++ b/definitions/collections/menu.less
@@ -1343,7 +1343,7 @@ each(@colors, {
@c: @colors[@@color][color];
& when not (@color=secondary) {
- .ui.ui.menu .@{color}.active.item,
+ .ui.ui.ui.menu .@{color}.active.item,
.ui.ui.@{color}.menu .active.item:hover,
.ui.ui.@{color}.menu .active.item {
& when not (@secondaryPointingActiveBorderColor = currentColor) {
@@ -1485,7 +1485,7 @@ each(@colors, {
@h: @colors[@@color][hover];
& when not (@color=secondary) {
- .ui.ui.inverted.menu .@{color}.active.item,
+ .ui.ui.ui.inverted.menu .@{color}.active.item,
.ui.ui.inverted.@{color}.menu {
background-color: @c;
}
diff --git a/definitions/collections/table.less b/definitions/collections/table.less
index 40cd2d3..526ce32 100644
--- a/definitions/collections/table.less
+++ b/definitions/collections/table.less
@@ -59,6 +59,12 @@
transition: @transition;
}
+/* Rowspan helper class */
+.ui.table th.rowspanned,
+.ui.table td.rowspanned {
+ display:none;
+}
+
/* Headers */
.ui.table > thead {
box-shadow: @headerBoxShadow;
@@ -180,13 +186,13 @@
.ui.table:not(.unstackable) > tbody,
.ui.table:not(.unstackable) > tr,
.ui.table:not(.unstackable) > tbody > tr,
- .ui.table:not(.unstackable) > tr > th,
- .ui.table:not(.unstackable) > thead > tr > th,
- .ui.table:not(.unstackable) > tbody > tr > th,
- .ui.table:not(.unstackable) > tfoot > tr > th,
- .ui.table:not(.unstackable) > tr > td,
- .ui.table:not(.unstackable) > tbody > tr > td,
- .ui.table:not(.unstackable) > tfoot > tr > td {
+ .ui.table:not(.unstackable) > tr > th:not(.rowspanned),
+ .ui.table:not(.unstackable) > thead > tr > th:not(.rowspanned),
+ .ui.table:not(.unstackable) > tbody > tr > th:not(.rowspanned),
+ .ui.table:not(.unstackable) > tfoot > tr > th:not(.rowspanned),
+ .ui.table:not(.unstackable) > tr > td:not(.rowspanned),
+ .ui.table:not(.unstackable) > tbody > tr > td:not(.rowspanned),
+ .ui.table:not(.unstackable) > tfoot > tr > td:not(.rowspanned) {
display: block !important;
width: auto !important;
}
@@ -469,13 +475,13 @@
.ui[class*="tablet stackable"].table > tbody,
.ui[class*="tablet stackable"].table > tbody > tr,
.ui[class*="tablet stackable"].table > tr,
- .ui[class*="tablet stackable"].table > thead > tr > th,
- .ui[class*="tablet stackable"].table > tbody > tr > th,
- .ui[class*="tablet stackable"].table > tfoot > tr > th,
- .ui[class*="tablet stackable"].table > tr > th,
- .ui[class*="tablet stackable"].table > tbody > tr > td,
- .ui[class*="tablet stackable"].table > tfoot > tr > td,
- .ui[class*="tablet stackable"].table > tr > td {
+ .ui[class*="tablet stackable"].table > thead > tr > th:not(.rowspanned),
+ .ui[class*="tablet stackable"].table > tbody > tr > th:not(.rowspanned),
+ .ui[class*="tablet stackable"].table > tfoot > tr > th:not(.rowspanned),
+ .ui[class*="tablet stackable"].table > tr > th:not(.rowspanned),
+ .ui[class*="tablet stackable"].table > tbody > tr > td:not(.rowspanned),
+ .ui[class*="tablet stackable"].table > tfoot > tr > td:not(.rowspanned),
+ .ui[class*="tablet stackable"].table > tr > td:not(.rowspanned) {
display: block !important;
width: 100% !important;
}
diff --git a/definitions/elements/emoji.less b/definitions/elements/emoji.less
index 40ea943..6e80621 100644
--- a/definitions/elements/emoji.less
+++ b/definitions/elements/emoji.less
@@ -65,7 +65,7 @@ em[data-emoji].loading:before {
Link
--------------------*/
-em[data-emoji].link {
+em[data-emoji].link:not(.disabled) {
cursor: pointer;
}
diff --git a/definitions/elements/segment.less b/definitions/elements/segment.less
index 0ca3517..fb81e9a 100644
--- a/definitions/elements/segment.less
+++ b/definitions/elements/segment.less
@@ -62,7 +62,7 @@
--------------------*/
& when (@variationSegmentInverted) {
/* Header */
- .ui.inverted.segment > .ui.header > .sub.header,
+ .ui.inverted.segment > .ui.header .sub.header,
.ui.inverted.segment > .ui.header {
color: @white;
}
diff --git a/definitions/modules/calendar.js b/definitions/modules/calendar.js
index ff6a125..a748681 100644
--- a/definitions/modules/calendar.js
+++ b/definitions/modules/calendar.js
@@ -845,15 +845,38 @@ $.fn.calendar = function(parameters) {
helper: {
isDisabled: function(date, mode) {
- return mode === 'day' && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
+ return (mode === 'day' || mode === 'month' || mode === 'year') && ((settings.disabledDaysOfWeek.indexOf(date.getDay()) !== -1) || settings.disabledDates.some(function(d){
if(typeof d === 'string') {
d = module.helper.sanitiseDate(d);
}
if (d instanceof Date) {
return module.helper.dateEqual(date, d, mode);
}
- if (d !== null && typeof d === 'object' && d[metadata.date]) {
- return module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode);
+ if (d !== null && typeof d === 'object') {
+ if (d[metadata.year]) {
+ if (typeof d[metadata.year] === 'number') {
+ return date.getFullYear() == d[metadata.year];
+ } else if (Array.isArray(d[metadata.year])) {
+ return d[metadata.year].indexOf(date.getFullYear()) > -1;
+ }
+ } else if (d[metadata.month]) {
+ if (typeof d[metadata.month] === 'number') {
+ return date.getMonth() == d[metadata.month];
+ } else if (Array.isArray(d[metadata.month])) {
+ return d[metadata.month].indexOf(date.getMonth()) > -1;
+ } else if (d[metadata.month] instanceof Date) {
+ var sdate = module.helper.sanitiseDate(d[metadata.month]);
+ return (date.getMonth() == sdate.getMonth()) && (date.getFullYear() == sdate.getFullYear())
+ }
+ } else if (d[metadata.date] && mode === 'day') {
+ if (d[metadata.date] instanceof Date) {
+ return module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode);
+ } else if (Array.isArray(d[metadata.date])) {
+ return d[metadata.date].some(function(idate) {
+ return module.helper.dateEqual(date, idate, mode);
+ });
+ }
+ }
}
}));
},
@@ -875,10 +898,9 @@ $.fn.calendar = function(parameters) {
}
},
findDayAsObject: function(date, mode, dates) {
- if (mode === 'day') {
- var i = 0, il = dates.length;
+ if (mode === 'day' || mode === 'month' || mode === 'year') {
var d;
- for (; i < il; i++) {
+ for (var i = 0; i < dates.length; i++) {
d = dates[i];
if(typeof d === 'string') {
d = module.helper.sanitiseDate(d);
@@ -888,8 +910,37 @@ $.fn.calendar = function(parameters) {
dateObject[metadata.date] = d;
return dateObject;
}
- else if (d !== null && typeof d === 'object' && d[metadata.date] && module.helper.dateEqual(date,module.helper.sanitiseDate(d[metadata.date]), mode) ) {
- return d;
+ else if (d !== null && typeof d === 'object') {
+ if (d[metadata.year]) {
+ if (typeof d[metadata.year] === 'number' && date.getFullYear() == d[metadata.year]) {
+ return d;
+ } else if (Array.isArray(d[metadata.year])) {
+ if (d[metadata.year].indexOf(date.getFullYear()) > -1) {
+ return d;
+ }
+ }
+ } else if (d[metadata.month]) {
+ if (typeof d[metadata.month] === 'number' && date.getMonth() == d[metadata.month]) {
+ return d;
+ } else if (Array.isArray(d[metadata.month])) {
+ if (d[metadata.month].indexOf(date.getMonth()) > -1) {
+ return d;
+ }
+ } else if (d[metadata.month] instanceof Date) {
+ var sdate = module.helper.sanitiseDate(d[metadata.month]);
+ if ((date.getMonth() == sdate.getMonth()) && (date.getFullYear() == sdate.getFullYear())) {
+ return d;
+ }
+ }
+ } else if (d[metadata.date] && mode === 'day') {
+ if (d[metadata.date] instanceof Date && module.helper.dateEqual(date, module.helper.sanitiseDate(d[metadata.date]), mode)) {
+ return d;
+ } else if (Array.isArray(d[metadata.date])) {
+ if(d[metadata.date].some(function(idate) { return module.helper.dateEqual(date, idate, mode); })) {
+ return d;
+ }
+ }
+ }
}
}
}
@@ -1576,7 +1627,9 @@ $.fn.calendar.settings = {
type: 'type',
monthOffset: 'monthOffset',
message: 'message',
- class: 'class'
+ class: 'class',
+ month: 'month',
+ year: 'year'
},
eventClass: 'blue'
diff --git a/definitions/modules/checkbox.less b/definitions/modules/checkbox.less
index 09b795f..32974de 100644
--- a/definitions/modules/checkbox.less
+++ b/definitions/modules/checkbox.less
@@ -353,6 +353,7 @@
cursor: default !important;
opacity: @disabledCheckboxOpacity;
color: @disabledCheckboxLabelColor;
+ pointer-events: none;
}
}
diff --git a/definitions/modules/dropdown.js b/definitions/modules/dropdown.js
index 19251eb..a418a9b 100644
--- a/definitions/modules/dropdown.js
+++ b/definitions/modules/dropdown.js
@@ -2075,7 +2075,7 @@ $.fn.dropdown = function(parameters) {
return;
}
if(isMultiple) {
- if($.inArray(module.escape.htmlEntities(String(optionValue)), value) !== -1) {
+ if($.inArray(module.escape.htmlEntities(String(optionValue)), value.map(function(v){return String(v);})) !== -1) {
$selectedItem = ($selectedItem)
? $selectedItem.add($choice)
: $choice
diff --git a/definitions/modules/dropdown.less b/definitions/modules/dropdown.less
index bc4ee47..24bd62f 100644
--- a/definitions/modules/dropdown.less
+++ b/definitions/modules/dropdown.less
@@ -643,7 +643,7 @@ select.ui.dropdown {
cursor: text;
position: relative;
left: @textCursorSpacing;
- z-index: 3;
+ z-index: auto;
}
& when (@variationDropdownSelection) {
diff --git a/definitions/modules/modal.js b/definitions/modules/modal.js
index 9d037e7..420ecc2 100644
--- a/definitions/modules/modal.js
+++ b/definitions/modules/modal.js
@@ -708,7 +708,15 @@ $.fn.modal = function(parameters) {
return module.cache.leftBodyScrollbar;
},
useFlex: function() {
- return settings.useFlex && settings.detachable && !module.is.ie();
+ if (settings.useFlex === 'auto') {
+ return settings.detachable && !module.is.ie();
+ }
+ if(settings.useFlex && module.is.ie()) {
+ module.debug('useFlex true is not supported in IE');
+ } else if(settings.useFlex && !settings.detachable) {
+ module.debug('useFlex true in combination with detachable false is not supported');
+ }
+ return settings.useFlex;
},
fit: function() {
var
diff --git a/definitions/modules/modal.less b/definitions/modules/modal.less
index 7ad1df3..65af5a0 100644
--- a/definitions/modules/modal.less
+++ b/definitions/modules/modal.less
@@ -53,6 +53,10 @@
border-bottom-right-radius: @borderRadius;
}
+.ui.modal > .ui.dimmer {
+ border-radius: inherit;
+}
+
/*******************************
Content
*******************************/
@@ -309,6 +313,7 @@
}
.ui.basic.modal > .header {
color: @basicModalHeaderColor;
+ border-bottom: none;
}
.ui.basic.modal > .close {
top: @basicModalCloseTop;
diff --git a/definitions/modules/shape.less b/definitions/modules/shape.less
index 0ae7c77..4d0b8ab 100644
--- a/definitions/modules/shape.less
+++ b/definitions/modules/shape.less
@@ -31,6 +31,7 @@
transition: @transition;
}
+.ui.shape .side,
.ui.shape .sides {
transform-style: preserve-3d;
}
diff --git a/definitions/modules/toast.js b/definitions/modules/toast.js
index 3463e71..02064ff 100644
--- a/definitions/modules/toast.js
+++ b/definitions/modules/toast.js
@@ -389,13 +389,15 @@ $.fn.toast = function(parameters) {
onBeforeHide: function(callback){
callback = $.isFunction(callback)?callback : function(){};
if(settings.transition.closeEasing !== ''){
- $toastBox.css('opacity',0);
- $toastBox.wrap('
').parent().slideUp(500,settings.transition.closeEasing,function(){
- if($toastBox){
- $toastBox.parent().remove();
- callback.call($toastBox);
- }
- });
+ if($toastBox) {
+ $toastBox.css('opacity', 0);
+ $toastBox.wrap('').parent().slideUp(500, settings.transition.closeEasing, function () {
+ if ($toastBox) {
+ $toastBox.parent().remove();
+ callback.call($toastBox);
+ }
+ });
+ }
} else {
callback.call($toastBox);
}
diff --git a/themes/default/assets/fonts/brand-icons.eot b/themes/default/assets/fonts/brand-icons.eot
index f6b7c7d..baf4057 100644
Binary files a/themes/default/assets/fonts/brand-icons.eot and b/themes/default/assets/fonts/brand-icons.eot differ
diff --git a/themes/default/assets/fonts/brand-icons.svg b/themes/default/assets/fonts/brand-icons.svg
index cf4d7ce..843c1c7 100644
--- a/themes/default/assets/fonts/brand-icons.svg
+++ b/themes/default/assets/fonts/brand-icons.svg
@@ -1,12 +1,12 @@
diff --git a/themes/default/assets/fonts/brand-icons.ttf b/themes/default/assets/fonts/brand-icons.ttf
index 82e255a..9916328 100644
Binary files a/themes/default/assets/fonts/brand-icons.ttf and b/themes/default/assets/fonts/brand-icons.ttf differ
diff --git a/themes/default/assets/fonts/brand-icons.woff b/themes/default/assets/fonts/brand-icons.woff
index b0021db..f9e3bcd 100644
Binary files a/themes/default/assets/fonts/brand-icons.woff and b/themes/default/assets/fonts/brand-icons.woff differ
diff --git a/themes/default/assets/fonts/brand-icons.woff2 b/themes/default/assets/fonts/brand-icons.woff2
index b53cbbf..51c07ae 100644
Binary files a/themes/default/assets/fonts/brand-icons.woff2 and b/themes/default/assets/fonts/brand-icons.woff2 differ
diff --git a/themes/default/assets/fonts/icons.eot b/themes/default/assets/fonts/icons.eot
index c867e7e..39716a7 100644
Binary files a/themes/default/assets/fonts/icons.eot and b/themes/default/assets/fonts/icons.eot differ
diff --git a/themes/default/assets/fonts/icons.svg b/themes/default/assets/fonts/icons.svg
index 401b7f7..cfd0e2f 100644
--- a/themes/default/assets/fonts/icons.svg
+++ b/themes/default/assets/fonts/icons.svg
@@ -1,12 +1,12 @@
diff --git a/themes/default/assets/fonts/icons.ttf b/themes/default/assets/fonts/icons.ttf
index 16d4469..ac4baa2 100644
Binary files a/themes/default/assets/fonts/icons.ttf and b/themes/default/assets/fonts/icons.ttf differ
diff --git a/themes/default/assets/fonts/icons.woff b/themes/default/assets/fonts/icons.woff
index 608f9e1..23002f8 100644
Binary files a/themes/default/assets/fonts/icons.woff and b/themes/default/assets/fonts/icons.woff differ
diff --git a/themes/default/assets/fonts/icons.woff2 b/themes/default/assets/fonts/icons.woff2
index 5a60d47..b37f209 100644
Binary files a/themes/default/assets/fonts/icons.woff2 and b/themes/default/assets/fonts/icons.woff2 differ
diff --git a/themes/default/assets/fonts/outline-icons.eot b/themes/default/assets/fonts/outline-icons.eot
index e1bcc44..04e25cb 100644
Binary files a/themes/default/assets/fonts/outline-icons.eot and b/themes/default/assets/fonts/outline-icons.eot differ
diff --git a/themes/default/assets/fonts/outline-icons.svg b/themes/default/assets/fonts/outline-icons.svg
index f32e41e..f1f7e6c 100644
--- a/themes/default/assets/fonts/outline-icons.svg
+++ b/themes/default/assets/fonts/outline-icons.svg
@@ -1,12 +1,12 @@