Skip to content

Commit

Permalink
Merge branch 'next' of github.com:Semantic-Org/Semantic-UI into next
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Apr 28, 2016
2 parents c43d464 + 92c1cd1 commit 1cb1099
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 22 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- **Popup** - Added new settings `autoRemove`, which is enabled by default. This will add special event listeners to auto hide a popup if the triggering element is removed from the DOM. This is useful in controlled DOM environments like Meteor/Ember/React to ensure a popup auto-hides itself when a page navigation or other DOM change occurs that may not trigger `mouseout`.
- **Dropdown** - Multiple select dropdown now sizes current dropdown input based on rendered width of a hidden element, not using an estimate based on character count. This means search will never break to a second line earlier than would normally fit in current line.
- **Dropdown** - Added new setting for search selection `hideAdditions` this will remove showing user additions inside the menu, making for a more intuitive adding process. Dropdowns now have a new state `empty` which will format an active dropdown with empty results. #3791
- **Dropdown** - Adds new `allowReselection` option to trigger `onChange` events even when reselecting same value ***NEEEDS DOCUMENTATION***
- **All UI** - All UI now include _all_ sizing variations, `mini`, `tiny`, `small`, `large`, `big`, `huge`, `massive`. Headers remain with only 5 sizes `small-huge` to match `H1-H5`
- **Icons** - Icons now use the latest Font Awesome `4.5.0` Icons. 50+ new icons+ are included. Thanks @BreadMaker for the PR and @davegandy for the font!
- **Progress** - Progress now uses a polling interval for updates. Rapidly updating the progress bar over a period quicker than the animation duration (for example with xhr `onprogress` events say every 50ms) will now appear smooth as butter.
Expand Down
7 changes: 2 additions & 5 deletions src/definitions/behaviors/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ $.fn.form.settings = {
regExp: {
bracket : /\[(.*)\]/i,
decimal : /^\d*(\.)\d+/,
email : /.+@.+\..+/i,
email : /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,
escape : /[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,
flags : /^\/(.*)\/(.*)?/,
integer : /^\-?\d+$/,
Expand Down Expand Up @@ -1174,10 +1174,7 @@ $.fn.form.settings = {

// is most likely an email
email: function(value){
var
emailRegExp = new RegExp($.fn.form.settings.regExp.email, 'i')
;
return emailRegExp.test(value);
return $.fn.form.settings.regExp.email.test(value);
},

// value is most likely url
Expand Down
12 changes: 6 additions & 6 deletions src/definitions/collections/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
.ui.form ::-webkit-input-placeholder {
color: @inputPlaceholderColor;
}
.ui.form ::-ms-input-placeholder {
.ui.form :-ms-input-placeholder {
color: @inputPlaceholderColor;
}
.ui.form ::-moz-placeholder {
Expand All @@ -332,7 +332,7 @@
.ui.form :focus::-webkit-input-placeholder {
color: @inputPlaceholderFocusColor;
}
.ui.form :focus::-ms-input-placeholder {
.ui.form :focus:-ms-input-placeholder {
color: @inputPlaceholderFocusColor;
}
.ui.form :focus::-moz-placeholder {
Expand All @@ -343,8 +343,8 @@
.ui.form .error ::-webkit-input-placeholder {
color: @inputErrorPlaceholderColor;
}
.ui.form .error ::-ms-input-placeholder {
color: @inputErrorPlaceholderColor;
.ui.form .error :-ms-input-placeholder {
color: @inputErrorPlaceholderColor !important;
}
.ui.form .error ::-moz-placeholder {
color: @inputErrorPlaceholderColor;
Expand All @@ -353,8 +353,8 @@
.ui.form .error :focus::-webkit-input-placeholder {
color: @inputErrorPlaceholderFocusColor;
}
.ui.form .error :focus::-ms-input-placeholder {
color: @inputErrorPlaceholderFocusColor;
.ui.form .error :focus:-ms-input-placeholder {
color: @inputErrorPlaceholderFocusColor !important;
}
.ui.form .error :focus::-moz-placeholder {
color: @inputErrorPlaceholderFocusColor;
Expand Down
16 changes: 8 additions & 8 deletions src/definitions/elements/input.less
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
.ui.input input::-moz-placeholder {
color: @placeholderColor;
}
.ui.input input::-ms-input-placeholder {
.ui.input input:-ms-input-placeholder {
color: @placeholderColor;
}

Expand Down Expand Up @@ -163,8 +163,8 @@
.ui.input input:focus::-moz-placeholder {
color: @placeholderFocusColor;
}
.ui.input.focus input::-ms-input-placeholder,
.ui.input input:focus::-ms-input-placeholder {
.ui.input.focus input:-ms-input-placeholder,
.ui.input input:focus:-ms-input-placeholder {
color: @placeholderFocusColor;
}

Expand All @@ -188,8 +188,8 @@
.ui.input.error input::-moz-placeholder {
color: @placeholderErrorColor;
}
.ui.input.error input::-ms-input-placeholder {
color: @placeholderErrorColor;
.ui.input.error input:-ms-input-placeholder {
color: @placeholderErrorColor !important;
}

/* Focused Error Placeholder */
Expand All @@ -199,8 +199,8 @@
.ui.input.error input:focus::-moz-placeholder {
color: @placeholderErrorFocusColor;
}
.ui.input.error input:focus::-ms-input-placeholder {
color: @placeholderErrorFocusColor;
.ui.input.error input:focus:-ms-input-placeholder {
color: @placeholderErrorFocusColor !important;
}

/*******************************
Expand Down Expand Up @@ -246,7 +246,7 @@
.ui.transparent.inverted.input input::-moz-placeholder {
color: @transparentInvertedPlaceholderColor;
}
.ui.transparent.inverted.input input::-ms-input-placeholder {
.ui.transparent.inverted.input input:-ms-input-placeholder {
color: @transparentInvertedPlaceholderColor;
}

Expand Down
5 changes: 3 additions & 2 deletions src/definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,7 @@ $.fn.dropdown = function(parameters) {
newValue
;
if(hasInput) {
if(stringValue == currentValue) {
if(settings.allowReselection && stringValue == currentValue) {
module.verbose('Skipping value update already same value', value, currentValue);
if(!module.is.initialLoad()) {
return;
Expand Down Expand Up @@ -3185,7 +3185,7 @@ $.fn.dropdown = function(parameters) {

escape: {
value: function(value) {
let
var
multipleValues = $.isArray(value),
stringValue = (typeof value === 'string'),
isUnparsable = (!stringValue && !multipleValues),
Expand Down Expand Up @@ -3430,6 +3430,7 @@ $.fn.dropdown.settings = {
delimiter : ',', // when multiselect uses normal <input> the values will be delimited with this character

showOnFocus : true, // show menu on focus
allowReselection : false, // whether current value should trigger callbacks when reselected
allowTab : true, // add tabindex to element
allowCategorySelection : false, // allow elements with sub-menus to be selected

Expand Down
5 changes: 5 additions & 0 deletions src/definitions/modules/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ $.fn.popup = function(parameters) {
}
},
hideGracefully: function(event) {
var
$target = $(event.target),
isInDOM = $.contains(document.documentElement, event.target),
inPopup = ($target.closest(selector.popup).length > 0)
;
// don't close on clicks inside popup
if(event && $(event.target).closest(selector.popup).length === 0) {
module.debug('Click occurred outside popup hiding popup');
Expand Down
2 changes: 1 addition & 1 deletion src/definitions/modules/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ $.fn.progress = function(parameters) {

update: {
toNextValue: function() {
let
var
nextValue = module.nextValue
;
if(nextValue) {
Expand Down

0 comments on commit 1cb1099

Please # to comment.