Skip to content

Commit

Permalink
Removed unneeded files & 2.4 build
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hamilton committed Jun 18, 2018
1 parent 085c986 commit ca81e97
Show file tree
Hide file tree
Showing 23 changed files with 217 additions and 801 deletions.
2 changes: 1 addition & 1 deletion dist/components/dropdown.css
Expand Up @@ -1214,7 +1214,7 @@ select.ui.dropdown {

.ui.fluid.dropdown {
display: block;
width: 100%;
width: 100% !important;
min-width: 0em;
}
.ui.fluid.dropdown > .dropdown.icon {
Expand Down
108 changes: 75 additions & 33 deletions dist/components/dropdown.js
Expand Up @@ -71,6 +71,7 @@ $.fn.dropdown = function(parameters) {

$menu = $module.children(selector.menu),
$item = $menu.find(selector.item),
$divider = $item.siblings(selector.divider),

activated = false,
itemActivated = false,
Expand Down Expand Up @@ -384,7 +385,8 @@ $.fn.dropdown = function(parameters) {
},
menu: function(values) {
$menu.html( templates.menu(values, fields));
$item = $menu.find(selector.item);
$item = $menu.find(selector.item);
$divider = $item.siblings(selector.divider);
},
reference: function() {
module.debug('Dropdown behavior was called on select, replacing with closest dropdown');
Expand All @@ -411,7 +413,8 @@ $.fn.dropdown = function(parameters) {
},

refreshItems: function() {
$item = $menu.find(selector.item);
$item = $menu.find(selector.item);
$divider = $item.siblings(selector.divider);
},

refreshSelectors: function() {
Expand All @@ -426,6 +429,7 @@ $.fn.dropdown = function(parameters) {
;
$menu = $module.children(selector.menu);
$item = $menu.find(selector.item);
$divider = $item.siblings(selector.divider);
},

refreshData: function() {
Expand Down Expand Up @@ -843,6 +847,30 @@ $.fn.dropdown = function(parameters) {
.addClass(className.filtered)
;
}

if(!module.has.query()) {
$divider
.removeClass(className.hidden);
} else if(settings.hideDividers === true) {
$divider
.addClass(className.hidden);
} else if(settings.hideDividers === 'empty') {
$divider
.removeClass(className.hidden)
.filter(function() {
// First find the last divider in this divider group
// Dividers which are direct siblings are considered a group
var lastDivider = $(this).nextUntil(selector.item);

return (lastDivider.length ? lastDivider : $(this))
// Count all non-filtered items until the next divider (or end of the dropdown)
.nextUntil(selector.divider)
.filter(selector.item + ":not(." + className.filtered + ")")
// Hide divider if no items are found
.length === 0;
})
.addClass(className.hidden);
}
},

fuzzySearch: function(query, term) {
Expand Down Expand Up @@ -1887,12 +1915,23 @@ $.fn.dropdown = function(parameters) {
select.placeholder = settings.placeholder;
}
if(settings.sortSelect) {
select.values.sort(function(a, b) {
return (a.name > b.name)
? 1
: -1
;
});
if(settings.sortSelect === true) {
select.values.sort(function(a, b) {
return (a.name > b.name)
? 1
: -1
;
});
} else if(settings.sortSelect === 'natural') {
select.values.sort(function(a, b) {
return (a.name.toLowerCase() > b.name.toLowerCase())
? 1
: -1
;
});
} else if($.isFunction(settings.sortSelect)) {
select.values.sort(settings.sortSelect);
}
module.debug('Retrieved and sorted values from select', select);
}
else {
Expand Down Expand Up @@ -1960,7 +1999,7 @@ $.fn.dropdown = function(parameters) {
return;
}
if(isMultiple) {
if($.inArray( String(optionValue), value) !== -1 || $.inArray(optionText, value) !== -1) {
if($.inArray( String(optionValue), value) !== -1) {
$selectedItem = ($selectedItem)
? $selectedItem.add($choice)
: $choice
Expand All @@ -1969,13 +2008,13 @@ $.fn.dropdown = function(parameters) {
}
else if(strict) {
module.verbose('Ambiguous dropdown value using strict type check', $choice, value);
if( optionValue === value || optionText === value) {
if( optionValue === value) {
$selectedItem = $choice;
return true;
}
}
else {
if( String(optionValue) == String(value) || optionText == value) {
if( String(optionValue) == String(value)) {
module.verbose('Found select item by value', optionValue, value);
$selectedItem = $choice;
return true;
Expand Down Expand Up @@ -2351,30 +2390,28 @@ $.fn.dropdown = function(parameters) {
}
},
text: function(text) {
if(settings.action !== 'select') {
if(settings.action == 'combo') {
module.debug('Changing combo button text', text, $combo);
if(settings.preserveHTML) {
$combo.html(text);
}
else {
$combo.text(text);
}
if(settings.action === 'combo') {
module.debug('Changing combo button text', text, $combo);
if(settings.preserveHTML) {
$combo.html(text);
}
else {
if(text !== module.get.placeholderText()) {
$text.removeClass(className.placeholder);
}
module.debug('Changing text', text, $text);
$text
.removeClass(className.filtered)
;
if(settings.preserveHTML) {
$text.html(text);
}
else {
$text.text(text);
}
$combo.text(text);
}
}
else if(settings.action === 'activate') {
if(text !== module.get.placeholderText()) {
$text.removeClass(className.placeholder);
}
module.debug('Changing text', text, $text);
$text
.removeClass(className.filtered)
;
if(settings.preserveHTML) {
$text.html(text);
}
else {
$text.text(text);
}
}
},
Expand Down Expand Up @@ -2831,6 +2868,9 @@ $.fn.dropdown = function(parameters) {
else {
$item.removeClass(className.filtered);
}
if(settings.hideDividers) {
$divider.removeClass(className.hidden);
}
module.remove.empty();
},
optionValue: function(value) {
Expand Down Expand Up @@ -3715,6 +3755,7 @@ $.fn.dropdown.settings = {

match : 'both', // what to match against with search selection (both, text, or label)
fullTextSearch : false, // search anywhere in value (set to 'exact' to require exact matches)
hideDividers : false, // Whether to hide any divider elements (specified in selector.divider) that are sibling to any items when searched (set to true will hide all dividers, set to 'empty' will hide them when they are not followed by a visible item)

placeholder : 'auto', // whether to convert blank <select> values to placeholder text
preserveHTML : true, // preserve html when selecting value
Expand Down Expand Up @@ -3831,6 +3872,7 @@ $.fn.dropdown.settings = {

selector : {
addition : '.addition',
divider : '.divider, .header',
dropdown : '.ui.dropdown',
hidden : '.hidden',
icon : '> .dropdown.icon',
Expand Down
2 changes: 1 addition & 1 deletion dist/components/dropdown.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/components/dropdown.min.js

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions dist/components/form.css
Expand Up @@ -317,7 +317,7 @@
color: rgba(191, 191, 191, 0.87);
}
.ui.form :-ms-input-placeholder {
color: rgba(191, 191, 191, 0.87);
color: rgba(191, 191, 191, 0.87) !important;
}
.ui.form ::-moz-placeholder {
color: rgba(191, 191, 191, 0.87);
Expand All @@ -326,7 +326,7 @@
color: rgba(115, 115, 115, 0.87);
}
.ui.form :focus:-ms-input-placeholder {
color: rgba(115, 115, 115, 0.87);
color: rgba(115, 115, 115, 0.87) !important;
}
.ui.form :focus::-moz-placeholder {
color: rgba(115, 115, 115, 0.87);
Expand Down Expand Up @@ -678,14 +678,16 @@
.ui.form .required.fields.grouped > label:after,
.ui.form .required.field > label:after,
.ui.form .required.fields:not(.grouped) > .field > .checkbox:after,
.ui.form .required.field > .checkbox:after {
.ui.form .required.field > .checkbox:after,
.ui.form label.required:after {
margin: -0.2em 0em 0em 0.2em;
content: '*';
color: #DB2828;
}
.ui.form .required.fields:not(.grouped) > .field > label:after,
.ui.form .required.fields.grouped > label:after,
.ui.form .required.field > label:after {
.ui.form .required.field > label:after,
.ui.form label.required:after {
display: inline-block;
vertical-align: top;
}
Expand Down
3 changes: 2 additions & 1 deletion dist/components/form.js
Expand Up @@ -1028,7 +1028,7 @@ $.fn.form = function(parameters) {
// cast to string avoiding encoding special values
value = (value === undefined || value === '' || value === null)
? ''
: $.trim(value + '')
: (settings.shouldTrim) ? $.trim(value + '') : String(value + '')
;
return ruleFunction.call($field, value, ancillary);
}
Expand Down Expand Up @@ -1219,6 +1219,7 @@ $.fn.form.settings = {

delay : 200,
revalidate : true,
shouldTrim : true,

transition : 'scale',
duration : 200,
Expand Down
2 changes: 1 addition & 1 deletion dist/components/form.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/components/form.min.js

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions dist/components/label.css
Expand Up @@ -536,7 +536,7 @@ a.ui.red.label:hover {

/* Basic */
.ui.basic.red.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #DB2828 !important;
border-color: #DB2828 !important;
}
Expand Down Expand Up @@ -577,7 +577,7 @@ a.ui.orange.label:hover {

/* Basic */
.ui.basic.orange.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #F2711C !important;
border-color: #F2711C !important;
}
Expand Down Expand Up @@ -618,7 +618,7 @@ a.ui.yellow.label:hover {

/* Basic */
.ui.basic.yellow.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #FBBD08 !important;
border-color: #FBBD08 !important;
}
Expand Down Expand Up @@ -659,7 +659,7 @@ a.ui.olive.label:hover {

/* Basic */
.ui.basic.olive.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #B5CC18 !important;
border-color: #B5CC18 !important;
}
Expand Down Expand Up @@ -700,7 +700,7 @@ a.ui.green.label:hover {

/* Basic */
.ui.basic.green.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #21BA45 !important;
border-color: #21BA45 !important;
}
Expand Down Expand Up @@ -741,7 +741,7 @@ a.ui.teal.label:hover {

/* Basic */
.ui.basic.teal.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #00B5AD !important;
border-color: #00B5AD !important;
}
Expand Down Expand Up @@ -782,7 +782,7 @@ a.ui.blue.label:hover {

/* Basic */
.ui.basic.blue.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #2185D0 !important;
border-color: #2185D0 !important;
}
Expand Down Expand Up @@ -823,7 +823,7 @@ a.ui.violet.label:hover {

/* Basic */
.ui.basic.violet.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #6435C9 !important;
border-color: #6435C9 !important;
}
Expand Down Expand Up @@ -864,7 +864,7 @@ a.ui.purple.label:hover {

/* Basic */
.ui.basic.purple.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #A333C8 !important;
border-color: #A333C8 !important;
}
Expand Down Expand Up @@ -905,7 +905,7 @@ a.ui.pink.label:hover {

/* Basic */
.ui.basic.pink.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #E03997 !important;
border-color: #E03997 !important;
}
Expand Down Expand Up @@ -946,7 +946,7 @@ a.ui.brown.label:hover {

/* Basic */
.ui.basic.brown.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #A5673F !important;
border-color: #A5673F !important;
}
Expand Down Expand Up @@ -987,7 +987,7 @@ a.ui.grey.label:hover {

/* Basic */
.ui.basic.grey.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #767676 !important;
border-color: #767676 !important;
}
Expand Down Expand Up @@ -1028,7 +1028,7 @@ a.ui.black.label:hover {

/* Basic */
.ui.basic.black.label {
background-color: none #FFFFFF !important;
background: none #FFFFFF !important;
color: #1B1C1D !important;
border-color: #1B1C1D !important;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/components/label.min.css

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions dist/components/segment.css
Expand Up @@ -493,7 +493,9 @@
Basic
--------------------*/

.ui.basic.segment {
.ui.basic.segment,
.ui.segments .ui.basic.segment,
.ui.basic.segments {
background: none transparent;
-webkit-box-shadow: none;
box-shadow: none;
Expand Down Expand Up @@ -764,7 +766,7 @@
border-radius: 0em 0em 0.28571429rem 0.28571429rem;
}
.ui.segment[class*="bottom attached"]:last-child {
margin-bottom: 0em;
margin-bottom: 1rem;
}

/*-------------------
Expand Down

0 comments on commit ca81e97

Please sign in to comment.