From f1056cbfa0b9948539222a1d4b0c5676c3b37388 Mon Sep 17 00:00:00 2001 From: jlukic Date: Wed, 12 Nov 2014 16:41:28 -0500 Subject: [PATCH] Fix dropdown missing some namespaced events, fixes positive/negative/error on table to use site.variables, adds method to auto add tabindex in checkbox --- src/definitions/collections/form.less | 3 -- src/definitions/collections/table.less | 5 +-- src/definitions/modules/checkbox.js | 7 ++++ src/definitions/modules/dropdown.js | 4 +-- .../default/collections/table.variables | 32 ++++++++----------- 5 files changed, 24 insertions(+), 27 deletions(-) diff --git a/src/definitions/collections/form.less b/src/definitions/collections/form.less index 9f639a8a9..834a334b7 100755 --- a/src/definitions/collections/form.less +++ b/src/definitions/collections/form.less @@ -122,7 +122,6 @@ color: @inputColor; border-radius: @inputBorderRadius; box-shadow: @inputBoxShadow; - box-sizing: border-box; transition: @inputTransition; } @@ -132,7 +131,6 @@ margin: 0em; -webkit-appearance: none; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); - box-sizing: border-box; padding: @textAreaPadding; font-size: @textAreaFontSize; @@ -597,7 +595,6 @@ .ui.form .fields > .field { clear: none; float: left; - box-sizing: border-box; padding-left: (@gutterWidth / 2); padding-right: (@gutterWidth / 2); } diff --git a/src/definitions/collections/table.less b/src/definitions/collections/table.less index d0fb7d87a..6731a526d 100755 --- a/src/definitions/collections/table.less +++ b/src/definitions/collections/table.less @@ -261,10 +261,7 @@ color: @positiveColor !important; } .ui.celled.table tr.positive:hover td, -.ui.celled.table tr:hover td.positive, -.ui.table tr.positive:hover td, -.ui.table td:hover.positive, -.ui.table th:hover.positive { +.ui.celled.table tr:hover td.positive { background: @positiveBackgroundHover !important; color: @positiveColorHover !important; } diff --git a/src/definitions/modules/checkbox.js b/src/definitions/modules/checkbox.js index 1897d8749..7013f7620 100644 --- a/src/definitions/modules/checkbox.js +++ b/src/definitions/modules/checkbox.js @@ -187,6 +187,13 @@ $.fn.checkbox = function(parameters) { set: { checked: function() { $module.addClass(className.checked); + }, + tab: function() { + if( $input.attr('tabindex') === undefined) { + $input + .attr('tabindex', 0) + ; + } } }, diff --git a/src/definitions/modules/dropdown.js b/src/definitions/modules/dropdown.js index c78c106f8..05342c6f9 100644 --- a/src/definitions/modules/dropdown.js +++ b/src/definitions/modules/dropdown.js @@ -300,8 +300,8 @@ $.fn.dropdown = function(parameters) { ; } $module - .on('mousedown', module.event.mousedown) - .on('mouseup', module.event.mouseup) + .on('mousedown' + eventNamespace, module.event.mousedown) + .on('mouseup' + eventNamespace, module.event.mouseup) .on('focus' + eventNamespace, module.event.focus) .on('blur' + eventNamespace, module.event.blur) ; diff --git a/src/themes/default/collections/table.variables b/src/themes/default/collections/table.variables index df7fc56ad..a0ef04fcc 100644 --- a/src/themes/default/collections/table.variables +++ b/src/themes/default/collections/table.variables @@ -102,35 +102,31 @@ States ---------------*/ -@stateMarkerWidth: 2px; +@stateMarkerWidth: 0px; /* Positive */ -@positiveColor: #119000; -@positiveBackgroundColor: #F2F8F0; -@positiveBoxShadow: @stateMarkerWidth 0px 0px @positiveColor inset; -@positiveBackgroundHover: #ECF5E9; -@positiveColorHover: #119000; +@positiveColor: @positiveTextColor; +@positiveBoxShadow: @stateMarkerWidth 0px 0px @positiveBorderColor inset; +@positiveBackgroundHover: darken(@positiveBackgroundColor, 3); +@positiveColorHover: darken(@positiveColor, 3); /* Negative */ @negativeColor: #CD2929; -@negativeBackgroundColor: #F9F4F4; -@negativeBoxShadow: @stateMarkerWidth 0px 0px @negativeColor inset; -@negativeBackgroundHover: #F2E8E8; -@negativeColorHover: #CD2929; +@negativeBoxShadow: @stateMarkerWidth 0px 0px @negativeBorderColor inset; +@negativeBackgroundHover: darken(@negativeBackgroundColor, 3); +@negativeColorHover: darken(@negativeColor, 3); /* Error */ @errorColor: #CD2929; -@errorBackgroundColor: #F9F4F4; -@errorBoxShadow: @stateMarkerWidth 0px 0px @errorColor inset; -@errorBackgroundHover: #F2E8E8; -@errorColorHover: #CD2929; +@errorBoxShadow: @stateMarkerWidth 0px 0px @errorBorderColor inset; +@errorBackgroundHover: darken(@errorBackgroundColor, 3); +@errorColorHover: darken(@errorColor, 3); /* Warning */ @warningColor: #7D6C00; -@warningBackgroundColor: #FBF6E9; -@warningBoxShadow: @stateMarkerWidth 0px 0px @warningColor inset; -@warningBackgroundHover: #F3EDDC; -@warningColorHover: #CD2929; +@warningBoxShadow: @stateMarkerWidth 0px 0px @warningBorderColor inset; +@warningBackgroundHover: darken(@warningBackgroundColor, 3); +@warningColorHover: darken(@warningColor, 3); /* Active */ @activeColor: rgba(50, 50, 50, 0.9);