Add color to HOT buttons

This commit is contained in:
Jure Grabnar 2019-03-27 13:15:44 +01:00
parent 5258c05c69
commit 9881ff38ee
3 changed files with 17 additions and 0 deletions

View file

@ -152,6 +152,12 @@ $(function() {
return true;
}
function resetHotButtonsBackgroundColor() {
$('.date-selector .hot-button').each(function() {
$(this).removeClass('selected');
})
}
// Common selection intialize
$.each(selectors, (index, e) => {
$('.ga-side .' + e + '-selector select').select2Multiple({ singleDisplay: true })
@ -196,6 +202,7 @@ $(function() {
GlobalActivitiesUpdateTopPaneTags();
reloadActivities();
}
resetHotButtonsBackgroundColor();
});
$('#calendar-from-date').on('dp.change', function(e) {
@ -206,6 +213,7 @@ $(function() {
GlobalActivitiesUpdateTopPaneTags();
reloadActivities();
}
resetHotButtonsBackgroundColor();
});
GlobalActivitiesUpdateTopPaneTags();
@ -248,5 +256,8 @@ $(function() {
dateContainer[0].dataset.periodSelect = this.innerHTML;
GlobalActivitiesUpdateTopPaneTags();
reloadActivities();
resetHotButtonsBackgroundColor();
$(this).addClass('selected');
});
});

View file

@ -29,6 +29,7 @@ $brand-primary-light: #dcedf6;
$brand-success-light: #e2eed8;
$brand-warning-light: #fcf7e4;
$brand-danger-light: #efdfdf;
$brand-light-blue: #e3f1f9;
//==============================================================================

View file

@ -128,6 +128,11 @@
text-align: left;
width: calc(50% - 25px);
&.selected {
background: $brand-light-blue;
opacity: 1;
}
&:nth-child(even) {
margin-left: 20px;
}