Add experimental stateful behaviour to the mouse config interface.

This commit is contained in:
Arpad Csanyi
2016-05-15 17:39:33 +02:00
parent 12c10df49b
commit 0127891f3c
2 changed files with 20 additions and 0 deletions
+8
View File
@@ -134,10 +134,18 @@
a { a {
border-top-right-radius: 0; border-top-right-radius: 0;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
&.selected {
font-style: italic;
}
} }
&.active { &.active {
a { a {
&.selected {
font-style: normal;
}
&:after { &:after {
content: ''; content: '';
display: block; display: block;
+12
View File
@@ -371,6 +371,18 @@ $(function() {
$('.mouse__action--type li').removeClass('active'); $('.mouse__action--type li').removeClass('active');
_this.parents('li').addClass('active'); _this.parents('li').addClass('active');
}); });
$('.mouse__action--config').on('click', '.btn', function(e) {
var _buttons = $('.mouse__action--config .btn'),
_mouseActionTypes = $('.mouse__action--type a'),
_currentMouseAction = $('.mouse__action--type li.active a'),
_this = $(this);
_buttons.removeClass('btn-primary');
_this.addClass('btn-primary');
_mouseActionTypes.removeClass('selected');
_currentMouseAction.addClass('selected');
});
} }
}); });