diff --git a/definitions/behaviors/form.js b/definitions/behaviors/form.js
index cc76d6e..8035357 100644
--- a/definitions/behaviors/form.js
+++ b/definitions/behaviors/form.js
@@ -336,7 +336,7 @@ $.fn.form = function(parameters) {
}
},
blank: function($field) {
- return $.trim($field.val()) === '';
+ return String($field.val()).trim() === '';
},
valid: function(field) {
var
@@ -1128,7 +1128,7 @@ $.fn.form = function(parameters) {
$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),
+ isDisabled = $el.is(':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
@@ -1207,13 +1207,7 @@ $.fn.form = function(parameters) {
module.debug('Using field name as identifier', identifier);
field.identifier = identifier;
}
- var isDisabled = true;
- $.each($field, function(){
- if(!$(this).prop('disabled')) {
- isDisabled = false;
- return false;
- }
- });
+ var isDisabled = !$field.filter(':not(:disabled)').length;
if(isDisabled) {
module.debug('Field is disabled. Skipping', identifier);
}
@@ -1270,7 +1264,7 @@ $.fn.form = function(parameters) {
// cast to string avoiding encoding special values
value = (value === undefined || value === '' || value === null)
? ''
- : (settings.shouldTrim) ? $.trim(value + '') : String(value + '')
+ : (settings.shouldTrim) ? String(value + '').trim() : String(value + '')
;
return ruleFunction.call(field, value, ancillary, $module);
}
diff --git a/definitions/behaviors/visibility.js b/definitions/behaviors/visibility.js
index 97a96e2..4e40619 100644
--- a/definitions/behaviors/visibility.js
+++ b/definitions/behaviors/visibility.js
@@ -902,7 +902,7 @@ $.fn.visibility = function(parameters) {
element.offset.top += $context.scrollTop() - $context.offset().top;
}
if(module.is.horizontallyScrollableContext()) {
- element.offset.left += $context.scrollLeft - $context.offset().left;
+ element.offset.left += $context.scrollLeft() - $context.offset().left;
}
// store
module.cache.element = element;
diff --git a/definitions/collections/form.less b/definitions/collections/form.less
index ae8953b..6f6d8fb 100644
--- a/definitions/collections/form.less
+++ b/definitions/collections/form.less
@@ -414,36 +414,40 @@
box-shadow: @inputFocusBoxShadow;
}
& when (@variationInputAction) {
- .ui.form .ui.action.input:not(.left) input:not([type]):focus,
- .ui.form .ui.action.input:not(.left) input[type="date"]:focus,
- .ui.form .ui.action.input:not(.left) input[type="datetime-local"]:focus,
- .ui.form .ui.action.input:not(.left) input[type="email"]:focus,
- .ui.form .ui.action.input:not(.left) input[type="number"]:focus,
- .ui.form .ui.action.input:not(.left) input[type="password"]:focus,
- .ui.form .ui.action.input:not(.left) input[type="search"]:focus,
- .ui.form .ui.action.input:not(.left) input[type="tel"]:focus,
- .ui.form .ui.action.input:not(.left) input[type="time"]:focus,
- .ui.form .ui.action.input:not(.left) input[type="text"]:focus,
- .ui.form .ui.action.input:not(.left) input[type="file"]:focus,
- .ui.form .ui.action.input:not(.left) input[type="url"]:focus {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
+ .ui.form .ui.action.input:not([class*="left action"]) {
+ & input:not([type]):focus,
+ input[type="date"]:focus,
+ input[type="datetime-local"]:focus,
+ input[type="email"]:focus,
+ input[type="number"]:focus,
+ input[type="password"]:focus,
+ input[type="search"]:focus,
+ input[type="tel"]:focus,
+ input[type="time"]:focus,
+ input[type="text"]:focus,
+ input[type="file"]:focus,
+ input[type="url"]:focus {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ }
}
- .ui.form .ui.action.input.left input:not([type]),
- .ui.form .ui.action.input.left input[type="date"],
- .ui.form .ui.action.input.left input[type="datetime-local"],
- .ui.form .ui.action.input.left input[type="email"],
- .ui.form .ui.action.input.left input[type="number"],
- .ui.form .ui.action.input.left input[type="password"],
- .ui.form .ui.action.input.left input[type="search"],
- .ui.form .ui.action.input.left input[type="tel"],
- .ui.form .ui.action.input.left input[type="time"],
- .ui.form .ui.action.input.left input[type="text"],
- .ui.form .ui.action.input.left input[type="file"],
- .ui.form .ui.action.input.left input[type="url"] {
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
+ .ui.form .ui[class*="left action"].input {
+ & input:not([type]),
+ input[type="date"],
+ input[type="datetime-local"],
+ input[type="email"],
+ input[type="number"],
+ input[type="password"],
+ input[type="search"],
+ input[type="tel"],
+ input[type="time"],
+ input[type="text"],
+ input[type="file"],
+ input[type="url"] {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+ }
}
}
.ui.form textarea:focus {
diff --git a/definitions/elements/button.less b/definitions/elements/button.less
index ab28007..d8f55d0 100644
--- a/definitions/elements/button.less
+++ b/definitions/elements/button.less
@@ -615,15 +615,17 @@
.ui.button > .icon:not(.button) {
height: @iconHeight;
opacity: @iconOpacity;
- margin: @iconMargin;
transition: @iconTransition;
- vertical-align: @iconVerticalAlign;
color: @iconColor;
}
.ui.button:not(.icon) > .icon:not(.button):not(.dropdown),
.ui.button:not(.icon) > .icons:not(.button):not(.dropdown) {
margin: @iconMargin;
+ vertical-align: @iconVerticalAlign;
+}
+.ui.button:not(.icon) > .icons:not(.button):not(.dropdown) > .icon {
+ vertical-align: @iconVerticalAlign;
}
.ui.button:not(.icon) > .right.icon:not(.button):not(.dropdown) {
margin: @rightIconMargin;
@@ -706,15 +708,19 @@
---------------*/
.ui.icon.buttons .button,
-.ui.icon.button {
+.ui.icon.button:not(.animated) {
padding: @verticalPadding @verticalPadding ( @verticalPadding + @shadowOffset );
}
+.ui.animated.icon.button > .content > .icon,
.ui.icon.buttons .button > .icon,
.ui.icon.button > .icon {
opacity: @iconButtonOpacity;
margin: 0 !important;
vertical-align: top;
}
+.ui.animated.button > .content > .icon {
+ vertical-align: top;
+}
& when (@variationButtonBasic) {
/*-------------------
diff --git a/definitions/elements/divider.less b/definitions/elements/divider.less
index 1979457..d23167d 100644
--- a/definitions/elements/divider.less
+++ b/definitions/elements/divider.less
@@ -42,8 +42,8 @@
---------------*/
.ui.divider:not(.vertical):not(.horizontal) {
- border-top: @shadowWidth solid @shadowColor;
- border-bottom: @highlightWidth solid @highlightColor;
+ border-top: @shadowWidth @borderStyle @shadowColor;
+ border-bottom: @highlightWidth @borderStyle @highlightColor;
}
/*--------------
@@ -117,8 +117,8 @@
content: '';
z-index: 3;
- border-left: @shadowWidth solid @shadowColor;
- border-right: @highlightWidth solid @highlightColor;
+ border-left: @shadowWidth @borderStyle @shadowColor;
+ border-right: @highlightWidth @borderStyle @highlightColor;
width: 0;
height: @verticalDividerHeight;
diff --git a/definitions/elements/icon.less b/definitions/elements/icon.less
index 8f2f6ad..d0d3ced 100644
--- a/definitions/elements/icon.less
+++ b/definitions/elements/icon.less
@@ -288,14 +288,14 @@ each(@colors, {
i.icon,
i.icons {
font-size: @medium;
+ line-height: 1;
+ vertical-align: middle;
}
& when not (@variationIconSizes = false) {
each(@variationIconSizes, {
@s: @@value;
i.@{value}.@{value}.@{value}.icon,
i.@{value}.@{value}.@{value}.icons {
- line-height: 1;
- vertical-align: middle;
font-size: @s;
}
})
diff --git a/definitions/elements/input.less b/definitions/elements/input.less
index 3eb8736..93e46ff 100644
--- a/definitions/elements/input.less
+++ b/definitions/elements/input.less
@@ -444,15 +444,15 @@
border-top: @borderWidth solid @borderColor;
border-bottom: @borderWidth solid @borderColor;
}
- .ui.form > .field.@{state} > .ui.left.action.input > .ui.button,
+ .ui.form > .field.@{state} > .ui[class*="left action"].input > .ui.button,
.ui.form > .field.@{state} > .ui.labeled.input:not(.right):not([class*="corner labeled"]) > .ui.label,
- .ui.left.action.input.@{state} > .ui.button,
+ .ui[class*="left action"].input.@{state} > .ui.button,
.ui.labeled.input.@{state}:not(.right):not([class*="corner labeled"]) > .ui.label {
border-left: @borderWidth solid @borderColor;
}
- .ui.form > .field.@{state} > .ui.action.input:not(.left) > input + .ui.button,
+ .ui.form > .field.@{state} > .ui.action.input:not([class*="left action"]) > input + .ui.button,
.ui.form > .field.@{state} > .ui.right.labeled.input:not([class*="corner labeled"]) > input + .ui.label,
- .ui.action.input.@{state}:not(.left) > input + .ui.button,
+ .ui.action.input.@{state}:not([class*="left action"]) > input + .ui.button,
.ui.right.labeled.input.@{state}:not([class*="corner labeled"]) > input + .ui.label {
border-right: @borderWidth solid @borderColor;
}
diff --git a/definitions/elements/step.less b/definitions/elements/step.less
index 4f72c20..acc7f36 100644
--- a/definitions/elements/step.less
+++ b/definitions/elements/step.less
@@ -235,6 +235,12 @@
border-width: @verticalArrowBorderWidth;
display: @verticalArrowDisplay;
}
+ .ui.right.vertical.steps .step:after {
+ border-width: @verticalLeftArrowBorderWidth;
+ left: @verticalLeftArrowLeftOffset;
+ right: @verticalLeftArrowRightOffset;
+ transform: translateY(-50%) translateX(-50%) rotate(-45deg);
+ }
.ui.vertical.steps .active.step:after {
display: @verticalActiveArrowDisplay;
diff --git a/definitions/modules/calendar.js b/definitions/modules/calendar.js
index a748681..7cb7a76 100644
--- a/definitions/modules/calendar.js
+++ b/definitions/modules/calendar.js
@@ -116,6 +116,7 @@ $.fn.calendar = function(parameters) {
module.set.maxDate($module.data(metadata.maxDate));
}
module.setting('type', module.get.type());
+ module.setting('on', settings.on || ($input.length ? 'focus' : 'click'));
},
popup: function () {
if (settings.inline) {
@@ -159,7 +160,7 @@ $.fn.calendar = function(parameters) {
module.set.mode(settings.startMode);
return settings.onShow.apply($container, arguments);
};
- var on = settings.on || ($input.length ? 'focus' : 'click');
+ var on = module.setting('on');
var options = $.extend({}, settings.popupOptions, {
popup: $container,
on: on,
@@ -202,33 +203,38 @@ $.fn.calendar = function(parameters) {
calendar: function () {
var i, r, c, p, row, cell, pageGrid;
- var mode = module.get.mode();
- var today = new Date();
- var date = module.get.date();
- var focusDate = module.get.focusDate();
- var display = focusDate || date || settings.initialDate || today;
- display = module.helper.dateInRange(display);
+ var
+ mode = module.get.mode(),
+ today = new Date(),
+ date = module.get.date(),
+ focusDate = module.get.focusDate(),
+ display = module.helper.dateInRange(focusDate || date || settings.initialDate || today)
+ ;
if (!focusDate) {
focusDate = display;
module.set.focusDate(focusDate, false, false);
}
- var isYear = mode === 'year';
- var isMonth = mode === 'month';
- var isDay = mode === 'day';
- var isHour = mode === 'hour';
- var isMinute = mode === 'minute';
- var isTimeOnly = settings.type === 'time';
+ var
+ isYear = mode === 'year',
+ isMonth = mode === 'month',
+ isDay = mode === 'day',
+ isHour = mode === 'hour',
+ isMinute = mode === 'minute',
+ isTimeOnly = settings.type === 'time'
+ ;
var multiMonth = Math.max(settings.multiMonth, 1);
var monthOffset = !isDay ? 0 : module.get.monthOffset();
- var minute = display.getMinutes();
- var hour = display.getHours();
- var day = display.getDate();
- var startMonth = display.getMonth() + monthOffset;
- var year = display.getFullYear();
+ var
+ minute = display.getMinutes(),
+ hour = display.getHours(),
+ day = display.getDate(),
+ startMonth = display.getMonth() + monthOffset,
+ year = display.getFullYear()
+ ;
var columns = isDay ? settings.showWeekNumbers ? 8 : 7 : isHour ? 4 : timeGap['column'];
var rows = isDay || isHour ? 6 : timeGap['row'];
@@ -254,17 +260,18 @@ $.fn.calendar = function(parameters) {
rows = Math.ceil(requiredCells / 7);
}
- var yearChange = isYear ? 10 : isMonth ? 1 : 0;
- var monthChange = isDay ? 1 : 0;
- var dayChange = isHour || isMinute ? 1 : 0;
- var prevNextDay = isHour || isMinute ? day : 1;
- var prevDate = new Date(year - yearChange, month - monthChange, prevNextDay - dayChange, hour);
- var nextDate = new Date(year + yearChange, month + monthChange, prevNextDay + dayChange, hour);
-
- var prevLast = isYear ? new Date(Math.ceil(year / 10) * 10 - 9, 0, 0) :
- isMonth ? new Date(year, 0, 0) : isDay ? new Date(year, month, 0) : new Date(year, month, day, -1);
- var nextFirst = isYear ? new Date(Math.ceil(year / 10) * 10 + 1, 0, 1) :
- isMonth ? new Date(year + 1, 0, 1) : isDay ? new Date(year, month + 1, 1) : new Date(year, month, day + 1);
+ var
+ yearChange = isYear ? 10 : isMonth ? 1 : 0,
+ monthChange = isDay ? 1 : 0,
+ dayChange = isHour || isMinute ? 1 : 0,
+ prevNextDay = isHour || isMinute ? day : 1,
+ prevDate = new Date(year - yearChange, month - monthChange, prevNextDay - dayChange, hour),
+ nextDate = new Date(year + yearChange, month + monthChange, prevNextDay + dayChange, hour),
+ prevLast = isYear ? new Date(Math.ceil(year / 10) * 10 - 9, 0, 0) :
+ isMonth ? new Date(year, 0, 0) : isDay ? new Date(year, month, 0) : new Date(year, month, day, -1),
+ nextFirst = isYear ? new Date(Math.ceil(year / 10) * 10 + 1, 0, 1) :
+ isMonth ? new Date(year + 1, 0, 1) : isDay ? new Date(year, month + 1, 1) : new Date(year, month, day + 1)
+ ;
var tempMode = mode;
if (isDay && settings.showWeekNumbers){
@@ -440,7 +447,6 @@ $.fn.calendar = function(parameters) {
$input.on('input' + eventNamespace, module.event.inputChange);
$input.on('focus' + eventNamespace, module.event.inputFocus);
$input.on('blur' + eventNamespace, module.event.inputBlur);
- $input.on('click' + eventNamespace, module.event.inputClick);
$input.on('keydown' + eventNamespace, module.event.keydown);
} else {
$container.on('keydown' + eventNamespace, module.event.keydown);
@@ -569,9 +575,6 @@ $.fn.calendar = function(parameters) {
var text = formatter.datetime(date, settings);
$input.val(text);
}
- },
- inputClick: function () {
- module.popup('show');
}
},
@@ -796,10 +799,12 @@ $.fn.calendar = function(parameters) {
var canceled = module.set.date(date) === false;
if (!canceled && settings.closable) {
module.popup('hide');
- //if this is a range calendar, show the end date calendar popup and focus the input
+ //if this is a range calendar, focus the container or input. This will open the popup from its event listeners.
var endModule = module.get.calendarModule(settings.endCalendar);
if (endModule) {
- endModule.popup('show');
+ if (endModule.setting('on') !== 'focus') {
+ endModule.popup('show');
+ }
endModule.focus();
}
}
@@ -809,7 +814,7 @@ $.fn.calendar = function(parameters) {
module.set.mode(newMode);
if (mode === 'hour' || (mode === 'day' && module.get.date())) {
//the user has chosen enough to consider a valid date/time has been chosen
- module.set.date(date);
+ module.set.date(date, true, false);
} else {
module.set.focusDate(date);
}
diff --git a/definitions/modules/dropdown.js b/definitions/modules/dropdown.js
index a418a9b..8505d5d 100644
--- a/definitions/modules/dropdown.js
+++ b/definitions/modules/dropdown.js
@@ -117,7 +117,9 @@ $.fn.dropdown = function(parameters) {
module.setup.layout();
if(settings.values) {
+ module.set.initialLoad();
module.change.values(settings.values);
+ module.remove.initialLoad();
}
module.refreshData();
@@ -541,6 +543,7 @@ $.fn.dropdown = function(parameters) {
} else if( module.can.click() ) {
module.unbind.intent();
}
+ iconClicked = false;
},
hideOthers: function() {
@@ -1772,7 +1775,7 @@ $.fn.dropdown = function(parameters) {
return $text.text();
},
query: function() {
- return $.trim($search.val());
+ return String($search.val()).trim();
},
searchWidth: function(value) {
value = (value !== undefined)
@@ -1915,8 +1918,8 @@ $.fn.dropdown = function(parameters) {
return ($choice.data(metadata.text) !== undefined)
? $choice.data(metadata.text)
: (preserveHTML)
- ? $.trim($choice.html())
- : $.trim($choice.text())
+ ? $choice.html().trim()
+ : $choice.text().trim()
;
}
},
@@ -1928,11 +1931,11 @@ $.fn.dropdown = function(parameters) {
return ($choice.data(metadata.value) !== undefined)
? String( $choice.data(metadata.value) )
: (typeof choiceText === 'string')
- ? $.trim(
+ ? String(
settings.ignoreSearchCase
? choiceText.toLowerCase()
: choiceText
- )
+ ).trim()
: String(choiceText)
;
},
diff --git a/definitions/modules/dropdown.less b/definitions/modules/dropdown.less
index 24bd62f..34b2eb5 100644
--- a/definitions/modules/dropdown.less
+++ b/definitions/modules/dropdown.less
@@ -318,10 +318,9 @@
}
/* Automatically float dropdown menu right on last menu item */
-.ui.menu .right.menu .dropdown:last-child .menu,
-.ui.menu .right.dropdown.item .menu,
-.ui.buttons > .ui.dropdown:last-child .menu {
- left: auto;
+.ui.menu .right.menu .dropdown:last-child .menu:not(.left),
+.ui.menu .right.dropdown.item .menu:not(.left),
+.ui.buttons > .ui.dropdown:last-child .menu:not(.left) {
right: 0;
}
@@ -1097,7 +1096,7 @@ select.ui.dropdown {
.ui.dropdown > .left.menu .menu,
.ui.dropdown .menu .left.menu {
- left: auto;
+ left: auto !important;
right: 100%;
margin: @leftSubMenuMargin !important;
border-radius: @leftSubMenuBorderRadius !important;
@@ -1318,12 +1317,12 @@ select.ui.dropdown {
opacity: 1;
}
.ui.simple.dropdown > .menu > .item:active > .menu,
- .ui.simple.dropdown:hover > .menu > .item:hover > .menu {
+ .ui.simple.dropdown .menu .item:hover > .menu {
overflow: visible;
width: auto;
height: auto;
top: 0 !important;
- left: 100% !important;
+ left: 100%;
opacity: 1;
}
& when (@variationDropdownDisabled) {
diff --git a/definitions/modules/modal.less b/definitions/modules/modal.less
index 65af5a0..f5684ce 100644
--- a/definitions/modules/modal.less
+++ b/definitions/modules/modal.less
@@ -175,7 +175,7 @@
border-top: @actionBorder;
text-align: @actionAlign;
}
-.ui.modal .actions > .button {
+.ui.modal .actions > .button:not(.fluid) {
margin-left: @buttonDistance;
}
.ui.basic.modal > .actions {
@@ -256,7 +256,7 @@
.ui.modal .image.content {
flex-direction: column;
}
- .ui.modal .content > .image {
+ .ui.modal > .content > .image {
display: block;
max-width: 100%;
margin: 0 auto !important;
@@ -269,7 +269,7 @@
}
/*rtl:ignore*/
- .ui.modal .content > .description {
+ .ui.modal > .content > .description {
display: block;
width: 100% !important;
margin: 0 !important;
diff --git a/definitions/modules/popup.js b/definitions/modules/popup.js
index 81496c7..d6b70e1 100644
--- a/definitions/modules/popup.js
+++ b/definitions/modules/popup.js
@@ -510,9 +510,10 @@ $.fn.popup = function(parameters) {
$popupOffsetParent = module.get.offsetParent($popup),
targetElement = $target[0],
isWindow = ($boundary[0] == window),
- targetPosition = (settings.inline || (settings.popup && settings.movePopup))
- ? $target.position()
- : $target.offset(),
+ targetOffset = $target.offset(),
+ parentOffset = settings.inline || (settings.popup && settings.movePopup)
+ ? $target.offsetParent().offset()
+ : { top: 0, left: 0 },
screenPosition = (isWindow)
? { top: 0, left: 0 }
: $boundary.offset(),
@@ -528,8 +529,8 @@ $.fn.popup = function(parameters) {
element : $target[0],
width : $target.outerWidth(),
height : $target.outerHeight(),
- top : targetPosition.top,
- left : targetPosition.left,
+ top : targetOffset.top - parentOffset.top,
+ left : targetOffset.left - parentOffset.left,
margin : {}
},
// popup itself
diff --git a/definitions/modules/progress.less b/definitions/modules/progress.less
index a8dc7ea..e5300d3 100644
--- a/definitions/modules/progress.less
+++ b/definitions/modules/progress.less
@@ -185,40 +185,40 @@
}
/* Single Digits */
- .ui.indicating.progress[data-percent="1"] .bar,
- .ui.indicating.progress[data-percent="2"] .bar,
- .ui.indicating.progress[data-percent="3"] .bar,
- .ui.indicating.progress[data-percent="4"] .bar,
- .ui.indicating.progress[data-percent="5"] .bar,
- .ui.indicating.progress[data-percent="6"] .bar,
- .ui.indicating.progress[data-percent="7"] .bar,
- .ui.indicating.progress[data-percent="8"] .bar,
- .ui.indicating.progress[data-percent="9"] .bar {
+ .ui.indicating.progress[data-percent="1"] .bar, .ui.indicating.progress[data-percent^="1."] .bar,
+ .ui.indicating.progress[data-percent="2"] .bar, .ui.indicating.progress[data-percent^="2."] .bar,
+ .ui.indicating.progress[data-percent="3"] .bar, .ui.indicating.progress[data-percent^="3."] .bar,
+ .ui.indicating.progress[data-percent="4"] .bar, .ui.indicating.progress[data-percent^="4."] .bar,
+ .ui.indicating.progress[data-percent="5"] .bar, .ui.indicating.progress[data-percent^="5."] .bar,
+ .ui.indicating.progress[data-percent="6"] .bar, .ui.indicating.progress[data-percent^="6."] .bar,
+ .ui.indicating.progress[data-percent="7"] .bar, .ui.indicating.progress[data-percent^="7."] .bar,
+ .ui.indicating.progress[data-percent="8"] .bar, .ui.indicating.progress[data-percent^="8."] .bar,
+ .ui.indicating.progress[data-percent="9"] .bar, .ui.indicating.progress[data-percent^="9."] .bar {
background-color: @indicatingFirstColor;
}
- .ui.indicating.progress[data-percent="0"] .label,
- .ui.indicating.progress[data-percent="1"] .label,
- .ui.indicating.progress[data-percent="2"] .label,
- .ui.indicating.progress[data-percent="3"] .label,
- .ui.indicating.progress[data-percent="4"] .label,
- .ui.indicating.progress[data-percent="5"] .label,
- .ui.indicating.progress[data-percent="6"] .label,
- .ui.indicating.progress[data-percent="7"] .label,
- .ui.indicating.progress[data-percent="8"] .label,
- .ui.indicating.progress[data-percent="9"] .label {
+ .ui.indicating.progress[data-percent="0"] .label, .ui.indicating.progress[data-percent^="0."] .label,
+ .ui.indicating.progress[data-percent="1"] .label, .ui.indicating.progress[data-percent^="1."] .label,
+ .ui.indicating.progress[data-percent="2"] .label, .ui.indicating.progress[data-percent^="2."] .label,
+ .ui.indicating.progress[data-percent="3"] .label, .ui.indicating.progress[data-percent^="3."] .label,
+ .ui.indicating.progress[data-percent="4"] .label, .ui.indicating.progress[data-percent^="4."] .label,
+ .ui.indicating.progress[data-percent="5"] .label, .ui.indicating.progress[data-percent^="5."] .label,
+ .ui.indicating.progress[data-percent="6"] .label, .ui.indicating.progress[data-percent^="6."] .label,
+ .ui.indicating.progress[data-percent="7"] .label, .ui.indicating.progress[data-percent^="7."] .label,
+ .ui.indicating.progress[data-percent="8"] .label, .ui.indicating.progress[data-percent^="8."] .label,
+ .ui.indicating.progress[data-percent="9"] .label, .ui.indicating.progress[data-percent^="9."] .label {
color: @indicatingFirstLabelColor;
}
& when (@variationProgressInverted) {
- .ui.inverted.indicating.progress[data-percent="0"] .label,
- .ui.inverted.indicating.progress[data-percent="1"] .label,
- .ui.inverted.indicating.progress[data-percent="2"] .label,
- .ui.inverted.indicating.progress[data-percent="3"] .label,
- .ui.inverted.indicating.progress[data-percent="4"] .label,
- .ui.inverted.indicating.progress[data-percent="5"] .label,
- .ui.inverted.indicating.progress[data-percent="6"] .label,
- .ui.inverted.indicating.progress[data-percent="7"] .label,
- .ui.inverted.indicating.progress[data-percent="8"] .label,
- .ui.inverted.indicating.progress[data-percent="9"] .label {
+ .ui.inverted.indicating.progress[data-percent="0"] .label, .ui.inverted.indicating.progress[data-percent^="0."] .label,
+ .ui.inverted.indicating.progress[data-percent="1"] .label, .ui.inverted.indicating.progress[data-percent^="1."] .label,
+ .ui.inverted.indicating.progress[data-percent="2"] .label, .ui.inverted.indicating.progress[data-percent^="2."] .label,
+ .ui.inverted.indicating.progress[data-percent="3"] .label, .ui.inverted.indicating.progress[data-percent^="3."] .label,
+ .ui.inverted.indicating.progress[data-percent="4"] .label, .ui.inverted.indicating.progress[data-percent^="4."] .label,
+ .ui.inverted.indicating.progress[data-percent="5"] .label, .ui.inverted.indicating.progress[data-percent^="5."] .label,
+ .ui.inverted.indicating.progress[data-percent="6"] .label, .ui.inverted.indicating.progress[data-percent^="6."] .label,
+ .ui.inverted.indicating.progress[data-percent="7"] .label, .ui.inverted.indicating.progress[data-percent^="7."] .label,
+ .ui.inverted.indicating.progress[data-percent="8"] .label, .ui.inverted.indicating.progress[data-percent^="8."] .label,
+ .ui.inverted.indicating.progress[data-percent="9"] .label, .ui.inverted.indicating.progress[data-percent^="9."] .label {
color: @invertedIndicatingFirstLabelColor;
}
}
diff --git a/definitions/modules/search.js b/definitions/modules/search.js
index 2ad78bd..db1a124 100644
--- a/definitions/modules/search.js
+++ b/definitions/modules/search.js
@@ -250,6 +250,25 @@ $.fn.search = function(parameters) {
}
}
},
+ ensureVisible: function ensureVisible($el) {
+ var elTop, elBottom, resultsScrollTop, resultsHeight;
+
+ elTop = $el.position().top;
+ elBottom = elTop + $el.outerHeight(true);
+
+ resultsScrollTop = $results.scrollTop();
+ resultsHeight = $results.height()
+ parseInt($results.css('paddingTop'), 0) +
+ parseInt($results.css('paddingBottom'), 0);
+
+ if (elTop < 0) {
+ $results.scrollTop(resultsScrollTop + elTop);
+ }
+
+ else if (resultsHeight < elBottom) {
+ $results.scrollTop(resultsScrollTop + (elBottom - resultsHeight));
+ }
+ },
handleKeyboard: function(event) {
var
// force selector refresh
@@ -301,6 +320,7 @@ $.fn.search = function(parameters) {
.closest($category)
.addClass(className.active)
;
+ module.ensureVisible($result.eq(newIndex));
event.preventDefault();
}
else if(keyCode == keys.downArrow) {
@@ -319,6 +339,7 @@ $.fn.search = function(parameters) {
.closest($category)
.addClass(className.active)
;
+ module.ensureVisible($result.eq(newIndex));
event.preventDefault();
}
}
@@ -952,6 +973,12 @@ $.fn.search = function(parameters) {
debug : settings.debug,
verbose : settings.verbose,
duration : settings.duration,
+ onShow : function() {
+ var $firstResult = $module.find(selector.result).eq(0);
+ if($firstResult.length > 0) {
+ module.ensureVisible($firstResult);
+ }
+ },
onComplete : function() {
callback();
},
diff --git a/definitions/modules/search.less b/definitions/modules/search.less
index 098e953..e099ea8 100644
--- a/definitions/modules/search.less
+++ b/definitions/modules/search.less
@@ -390,6 +390,121 @@
Variations
*******************************/
+& when (@variationSearchScrolling),
+ (@variationSearchShort),
+ (@variationSearchLong) {
+
+ /*-------------------
+ Scrolling
+ --------------------*/
+
+ .ui.scrolling.search > .results,
+ .ui.search.long > .results,
+ .ui.search.short > .results {
+ overflow-x: hidden;
+ overflow-y: auto;
+ backface-visibility: hidden;
+ -webkit-overflow-scrolling: touch;
+ }
+}
+
+
+& when (@variationSearchScrolling) {
+ @media only screen and (max-width : @largestMobileScreen) {
+ .ui.scrolling.search > .results {
+ max-height: @scrollingMobileMaxResultsHeight;
+ }
+ }
+ @media only screen and (min-width: @tabletBreakpoint) {
+ .ui.scrolling.search > .results {
+ max-height: @scrollingTabletMaxResultsHeight;
+ }
+ }
+ @media only screen and (min-width: @computerBreakpoint) {
+ .ui.scrolling.search > .results {
+ max-height: @scrollingComputerMaxResultsHeight;
+ }
+ }
+ @media only screen and (min-width: @widescreenMonitorBreakpoint) {
+ .ui.scrolling.search > .results {
+ max-height: @scrollingWidescreenMaxResultsHeight;
+ }
+ }
+}
+
+@media only screen and (max-width : @largestMobileScreen) {
+ & when (@variationSearchShort) {
+ .ui.search.short > .results {
+ max-height: @scrollingMobileMaxResultsHeight;
+ }
+ .ui.search[class*="very short"] > .results {
+ max-height: @scrollingMobileMaxResultsHeight * 0.75;
+ }
+ }
+ & when (@variationSearchLong) {
+ .ui.search.long > .results {
+ max-height: @scrollingMobileMaxResultsHeight * 2;
+ }
+ .ui.search[class*="very long"] > .results {
+ max-height: @scrollingMobileMaxResultsHeight * 3;
+ }
+ }
+}
+@media only screen and (min-width: @tabletBreakpoint) {
+ & when (@variationSearchShort) {
+ .ui.search.short > .results {
+ max-height: @scrollingTabletMaxResultsHeight;
+ }
+ .ui.search[class*="very short"] > .results {
+ max-height: @scrollingTabletMaxResultsHeight * 0.75;
+ }
+ }
+ & when (@variationSearchLong) {
+ .ui.search.long > .results {
+ max-height: @scrollingTabletMaxResultsHeight * 2;
+ }
+ .ui.search[class*="very long"] > .results {
+ max-height: @scrollingTabletMaxResultsHeight * 3;
+ }
+ }
+}
+@media only screen and (min-width: @computerBreakpoint) {
+ & when (@variationSearchShort) {
+ .ui.search.short > .results {
+ max-height: @scrollingComputerMaxResultsHeight;
+ }
+ .ui.search[class*="very short"] > .results {
+ max-height: @scrollingComputerMaxResultsHeight * 0.75;
+ }
+ }
+ & when (@variationSearchLong) {
+ .ui.search.long > .results {
+ max-height: @scrollingComputerMaxResultsHeight * 2;
+ }
+ .ui.search[class*="very long"] > .results {
+ max-height: @scrollingComputerMaxResultsHeight * 3;
+ }
+ }
+}
+@media only screen and (min-width: @widescreenMonitorBreakpoint) {
+ & when (@variationSearchShort) {
+ .ui.search.short > .results {
+ max-height: @scrollingWidescreenMaxResultsHeight;
+ }
+ .ui.search[class*="very short"] > .results {
+ max-height: @scrollingWidescreenMaxResultsHeight * 0.75;
+ }
+ }
+ & when (@variationSearchLong) {
+ .ui.search.long > .results {
+ max-height: @scrollingWidescreenMaxResultsHeight * 2;
+ }
+ .ui.search[class*="very long"] > .results {
+ max-height: @scrollingWidescreenMaxResultsHeight * 3;
+ }
+ }
+}
+
& when (@variationSearchAligned) {
/*-------------------
Left / Right
diff --git a/definitions/modules/tab.js b/definitions/modules/tab.js
index 252cf8c..eae3cfc 100644
--- a/definitions/modules/tab.js
+++ b/definitions/modules/tab.js
@@ -100,9 +100,9 @@ $.fn.tab = function(parameters) {
initializedHistory = true;
}
- if(instance === undefined && module.determine.activeTab() == null) {
+ if(settings.autoTabActivation && instance === undefined && module.determine.activeTab() == null) {
module.debug('No active tab detected, setting first tab active', module.get.initialPath());
- module.changeTab(module.get.initialPath());
+ module.changeTab(settings.autoTabActivation === true ? module.get.initialPath() : settings.autoTabActivation);
};
module.instantiate();
@@ -953,6 +953,7 @@ $.fn.tab.settings = {
apiSettings : false, // settings for api call
evaluateScripts : 'once', // whether inline scripts should be parsed (true/false/once). Once will not re-evaluate on cached content
+ autoTabActivation: true, // whether a non existing active tab will auto activate the first available tab
onFirstLoad : function(tabPath, parameterArray, historyEvent) {}, // called first time loaded
onLoad : function(tabPath, parameterArray, historyEvent) {}, // called on every load
diff --git a/themes/default/assets/fonts/brand-icons.eot b/themes/default/assets/fonts/brand-icons.eot
index baf4057..a1bc094 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 843c1c7..46ad237 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 9916328..948a2a6 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 f9e3bcd..2a89d52 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 51c07ae..141a90a 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 39716a7..d3b77c2 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 cfd0e2f..7742838 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 ac4baa2..5b97903 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 23002f8..beec791 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 b37f209..978a681 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 04e25cb..38cf251 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 f1f7e6c..48634a9 100644
--- a/themes/default/assets/fonts/outline-icons.svg
+++ b/themes/default/assets/fonts/outline-icons.svg
@@ -1,12 +1,12 @@