Skip to content

Commit

Permalink
Add hover state to views dropdown in web ui
Browse files Browse the repository at this point in the history
  • Loading branch information
bcbroussard committed May 26, 2015
1 parent 3975f6e commit edc6c02
Show file tree
Hide file tree
Showing 8 changed files with 1,523 additions and 1,478 deletions.
1,935 changes: 973 additions & 962 deletions pkg/ui/datafile.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7709,7 +7709,10 @@ function SelectProvider($$interimElementProvider) {
var focusedNode = centeredNode || optionNodes[0];
if (focusedNode) {
opts.focusedNode = focusedNode;
focusedNode.focus();
// This is commented out to fix an issue where the first option remains in focus
// even after you mouseover to a different option.
// It is fixed in the compiled source and is here for reference.
// focusedNode.focus();
}

if (isScrollable) {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ function SelectProvider($$interimElementProvider) {
contentEl: element.find('md-content'),
backdrop: opts.hasBackdrop && angular.element('<md-backdrop class="md-select-backdrop">')
});

var optionNodes = [];

configureAria();
Expand Down Expand Up @@ -757,7 +757,10 @@ function SelectProvider($$interimElementProvider) {
var focusedNode = centeredNode || optionNodes[0];
if (focusedNode) {
opts.focusedNode = focusedNode;
focusedNode.focus();
// This is commented out to fix an issue where the first option remains in focus
// even after you mouseover to a different option.
// It is fixed in the compiled source and is here for reference.
// focusedNode.focus();
}

if (isScrollable) {
Expand Down
11 changes: 11 additions & 0 deletions www/app/assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,17 @@ md-toolbar h1 {
vertical-align: middle;
padding: 2px;
}
md-select-menu.md-default-theme md-option:focus:not([selected]) {
background: #eeeeee;
}
md-select-menu md-option {
transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
md-select-menu md-option:not([disabled]):hover,
md-select-menu md-option:not([disabled]):focus {
background-color: rgba(158, 158, 158, 0.2);
}
.dashboard .body-wrapper {
padding: 25px;
}
Expand Down
Loading

0 comments on commit edc6c02

Please sign in to comment.