Skip to content

Commit

Permalink
Updated distribution to version 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Semantic-Pusher-Robot committed Jul 6, 2015
1 parent 422f652 commit 1340f01
Show file tree
Hide file tree
Showing 18 changed files with 101 additions and 70 deletions.
2 changes: 1 addition & 1 deletion definitions/behaviors/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ $.fn.form = function(parameters) {
isErrored = $fieldGroup.hasClass(className.error)
;
if(defaultValue === undefined) {
defaultValue = '';
return;
}
if(isErrored) {
module.verbose('Resetting error on field', $fieldGroup);
Expand Down
2 changes: 1 addition & 1 deletion definitions/collections/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
clear: both;
margin: @fieldMargin;
}
.ui.form .field .field,

.ui.form .field:last-child,
.ui.form .fields:last-child .field {
margin-bottom: 0em;
Expand Down
6 changes: 5 additions & 1 deletion definitions/collections/menu.less
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ Floated Menu / Item

.ui.vertical.menu {
display: block;
flex-direction: column;
background: @verticalBackground;
box-shadow: @verticalBoxShadow;
}
Expand Down Expand Up @@ -1530,6 +1531,9 @@ Floated Menu / Item
margin: 0em;
vertical-align: middle;
}
.ui.compact.vertical.menu {
display: inline-block;
}
.ui.compact.menu .item:last-child {
border-radius: 0em @borderRadius @borderRadius 0em;
}
Expand Down Expand Up @@ -1622,13 +1626,13 @@ Floated Menu / Item

.ui.fixed.menu,
.ui[class*="top fixed"].menu {
border-top: none;
top: 0px;
left: 0px;
right: auto;
bottom: auto;
}
.ui[class*="top fixed"].menu {
border-top: none;
border-left: none;
border-right: none;
}
Expand Down
12 changes: 6 additions & 6 deletions definitions/elements/label.less
Original file line number Diff line number Diff line change
Expand Up @@ -403,39 +403,39 @@ a.ui.label {

padding: @attachedVerticalPadding @attachedHorizontalPadding;

border-radius: @borderRadius @borderRadius 0em 0em;
border-radius: @attachedCornerBorderRadius @attachedCornerBorderRadius 0em 0em;
}
.ui.bottom.attached.label {
top: auto;
bottom: 0em;
border-radius: 0em 0em @borderRadius @borderRadius;
border-radius: 0em 0em @attachedCornerBorderRadius @attachedCornerBorderRadius;
}

.ui.top.left.attached.label {
width: auto;
margin-top: 0em !important;
border-radius: @borderRadius 0em @borderRadius 0em;
border-radius: @attachedCornerBorderRadius 0em @attachedBorderRadius 0em;
}

.ui.top.right.attached.label {
width: auto;
left: auto;
right: 0em;
border-radius: 0em @borderRadius 0em @borderRadius;
border-radius: 0em @attachedCornerBorderRadius 0em @attachedBorderRadius;
}
.ui.bottom.left.attached.label {
width: auto;
top: auto;
bottom: 0em;
border-radius: 0em @borderRadius 0em @borderRadius;
border-radius: 0em @attachedBorderRadius 0em @attachedCornerBorderRadius;
}
.ui.bottom.right.attached.label {
top: auto;
bottom: 0em;
left: auto;
right: 0em;
width: auto;
border-radius: @borderRadius 0em @borderRadius 0em;
border-radius: @attachedBorderRadius 0em @attachedCornerBorderRadius 0em;
}


Expand Down
4 changes: 2 additions & 2 deletions definitions/elements/segment.less
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@
.ui[class*="top attached"].segment {
top: @attachedTopOffset;
bottom: 0px;
margin-top: @margin;
margin-top: @verticalMargin;
margin-bottom: 0em;
border-radius: @borderRadius @borderRadius 0em 0em;
}
Expand All @@ -706,7 +706,7 @@
top: @attachedBottomOffset;
bottom: 0px;
margin-top: 0em;
margin-bottom: @margin;
margin-bottom: @verticalMargin;
box-shadow: @attachedBottomBoxShadow;
border-radius: 0em 0em @borderRadius @borderRadius;
}
Expand Down
63 changes: 36 additions & 27 deletions definitions/modules/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ $.fn.checkbox = function(parameters) {
;
return $('input[name="' + name + '"]').closest(selector.checkbox);
},
otherRadios: function() {
return module.get.radios().not($module);
},
name: function() {
return $input.attr('name');
}
Expand Down Expand Up @@ -314,25 +317,31 @@ $.fn.checkbox = function(parameters) {

set: {
checked: function() {
module.verbose('Setting class to checked');
$module
.removeClass(className.indeterminate)
.addClass(className.checked)
;
if( module.is.radio() ) {
module.uncheckOthers();
}
if(!module.is.indeterminate() && module.is.checked()) {
module.debug('Input is already checked');
module.debug('Input is already checked, skipping input property change');
return;
}
module.verbose('Setting state to checked', $input[0]);
if( module.is.radio() ) {
module.uncheckOthers();
}
$input
.prop('indeterminate', false)
.prop('checked', true)
;
$module
.removeClass(className.indeterminate)
.addClass(className.checked)
;
module.trigger.change();
},
unchecked: function() {
module.verbose('Removing checked class');
$module
.removeClass(className.indeterminate)
.removeClass(className.checked)
;
if(!module.is.indeterminate() && module.is.unchecked() ) {
module.debug('Input is already unchecked');
return;
Expand All @@ -342,63 +351,63 @@ $.fn.checkbox = function(parameters) {
.prop('indeterminate', false)
.prop('checked', false)
;
$module
.removeClass(className.indeterminate)
.removeClass(className.checked)
;
module.trigger.change();
},
indeterminate: function() {
module.verbose('Setting class to indeterminate');
$module
.addClass(className.indeterminate)
;
if( module.is.indeterminate() ) {
module.debug('Input is already indeterminate');
module.debug('Input is already indeterminate, skipping input property change');
return;
}
module.debug('Setting state to indeterminate');
$input
.prop('indeterminate', true)
;
$module
.addClass(className.indeterminate)
;
module.trigger.change();
},
determinate: function() {
module.verbose('Removing indeterminate class');
$module
.removeClass(className.indeterminate)
;
if( module.is.determinate() ) {
module.debug('Input is already determinate');
module.debug('Input is already determinate, skipping input property change');
return;
}
module.debug('Setting state to determinate');
$input
.prop('indeterminate', false)
;
$module
.removeClass(className.indeterminate)
;
},
disabled: function() {
module.verbose('Setting class to disabled');
$module
.addClass(className.disabled)
;
if( module.is.disabled() ) {
module.debug('Input is already disabled');
module.debug('Input is already disabled, skipping input property change');
return;
}
module.debug('Setting state to disabled');
$input
.prop('disabled', 'disabled')
;
$module
.addClass(className.disabled)
;
module.trigger.change();
},
enabled: function() {
module.verbose('Removing disabled class');
$module.removeClass(className.disabled);
if( module.is.enabled() ) {
module.debug('Input is already enabled');
module.debug('Input is already enabled, skipping input property change');
return;
}
module.debug('Setting state to enabled');
$input
.prop('disabled', false)
;
$module.removeClass(className.disabled);
module.trigger.change();
},
tabbable: function() {
Expand Down Expand Up @@ -459,7 +468,7 @@ $.fn.checkbox = function(parameters) {

uncheckOthers: function() {
var
$radios = module.get.radios()
$radios = module.get.otherRadios()
;
module.debug('Unchecking other radios', $radios);
$radios.removeClass(className.checked);
Expand Down
16 changes: 8 additions & 8 deletions definitions/modules/checkbox.less
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@
Indeterminate
---------------*/

.ui.checkbox input:indeterminate ~ .box:before,
.ui.checkbox input:indeterminate ~ label:before {
.ui.checkbox input[type="checkbox"]:indeterminate ~ .box:before,
.ui.checkbox input[type="checkbox"]:indeterminate ~ label:before {
background: @checkboxIndeterminateBackground;
border-color: @checkboxIndeterminateBorderColor;
}
.ui.checkbox input:indeterminate ~ .box:after,
.ui.checkbox input:indeterminate ~ label:after {
.ui.checkbox input[type="checkbox"]:indeterminate ~ .box:after,
.ui.checkbox input[type="checkbox"]:indeterminate ~ label:after {
opacity: @checkboxIndeterminateCheckOpacity;
color: @checkboxIndeterminateCheckColor;
}
Expand All @@ -218,10 +218,10 @@
Active Focus
---------------*/

.ui.checkbox input[type="radio"]:indeterminate:focus ~ .box:before,
.ui.checkbox input[type="radio"]:indeterminate:focus ~ label:before,
.ui.checkbox input[type="radio"]:checked:focus ~ .box:before,
.ui.checkbox input[type="radio"]:checked:focus ~ label:before {
.ui.checkbox input[type="checkbox"]:indeterminate:focus ~ .box:before,
.ui.checkbox input[type="checkbox"]:indeterminate:focus ~ label:before,
.ui.checkbox input[type="checkbox"]:checked:focus ~ .box:before,
.ui.checkbox input[type="checkbox"]:checked:focus ~ label:before {
background: @checkboxFocusedBackground;
border-color: @checkboxFocusedBorderColor;
}
Expand Down
24 changes: 17 additions & 7 deletions definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ $.fn.dropdown = function(parameters) {
if( module.is.searchSelection() ) {
// do nothing special yet
}
else {
else if( module.is.single() ) {
$module
.on('touchstart' + eventNamespace, module.event.test.toggle)
;
Expand Down Expand Up @@ -2544,6 +2544,9 @@ $.fn.dropdown = function(parameters) {
input: function() {
return ($input.length > 0);
},
items: function() {
return ($item.length > 0);
},
menu: function() {
return ($menu.length > 0);
},
Expand Down Expand Up @@ -2589,6 +2592,9 @@ $.fn.dropdown = function(parameters) {
: $menu.transition && $menu.transition('is animating')
;
},
disabled: function() {
$module.hasClass(className.disabled);
},
focused: function() {
return (document.activeElement === $module[0]);
},
Expand Down Expand Up @@ -2700,7 +2706,7 @@ $.fn.dropdown = function(parameters) {
return (hasTouch || settings.on == 'click');
},
show: function() {
return !$module.hasClass(className.disabled) && $item.length > 0;
return !module.is.disabled() && (module.has.items() || module.has.message());
},
useAPI: function() {
return $.fn.api !== undefined;
Expand Down Expand Up @@ -2810,14 +2816,18 @@ $.fn.dropdown = function(parameters) {
},

hideAndClear: function() {
if(module.has.search()) {
if( module.has.maxSelections() ) {
module.remove.searchTerm();
module.hide(function() {
module.remove.filteredItem();
});
}
else {
module.hide();
if(module.has.search()) {
module.hide(function() {
module.remove.filteredItem();
});
}
else {
module.hide();
}
}
},

Expand Down
3 changes: 2 additions & 1 deletion definitions/modules/dropdown.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
cursor: pointer;
position: relative;
display: inline-block;
tap-highlight-color: rgba(0, 0, 0, 0);
outline: none;
text-align: left;
transition: @transition;

-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/*******************************
Expand Down
2 changes: 1 addition & 1 deletion definitions/modules/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ $.fn.popup = function(parameters) {
popup = calculations.popup;
parent = calculations.parent;

if(target.top === 0 && target.left === 0) {
if(target.width === 0 && target.height === 0) {
module.debug('Popup target is hidden, no action taken');
return false;
}
Expand Down
3 changes: 2 additions & 1 deletion definitions/modules/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ $.fn.progress = function(parameters) {
if(data.value) {
module.debug('Current value set from metadata', data.value);
module.set.value(data.value);
module.set.progress(data.value);
}
},
settings: function() {
Expand Down Expand Up @@ -719,7 +720,7 @@ $.fn.progress.settings = {
name : 'Progress',
namespace : 'progress',

debug : true,
debug : false,
verbose : false,
performance : true,

Expand Down
Loading

0 comments on commit 1340f01

Please sign in to comment.