parent
d8b91bf08e
commit
d6f85efa8a
|
@ -24,6 +24,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
function compile(tElement, tAttrs) {
|
function compile(tElement, tAttrs) {
|
||||||
|
var CLASS_ACTIVE = 'md-default-theme md-accent md-bg md-bdr';
|
||||||
return function postLink(scope, element, attr, controllers) {
|
return function postLink(scope, element, attr, controllers) {
|
||||||
var tiles = tElement.find('md-grid-tile'),
|
var tiles = tElement.find('md-grid-tile'),
|
||||||
tile,
|
tile,
|
||||||
|
@ -43,7 +44,7 @@
|
||||||
// Toggle class on click event and call toggle function
|
// Toggle class on click event and call toggle function
|
||||||
var tile = angular.element(this),
|
var tile = angular.element(this),
|
||||||
day = tile.attr('value');
|
day = tile.attr('value');
|
||||||
tile.toggleClass('sg-active');
|
tile.toggleClass(CLASS_ACTIVE);
|
||||||
toggle(day);
|
toggle(day);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -64,7 +65,7 @@
|
||||||
_.forEach(tiles, function(o) {
|
_.forEach(tiles, function(o) {
|
||||||
var tile = angular.element(o);
|
var tile = angular.element(o);
|
||||||
if (_.includes(flattenedDays, tile.attr('value'))) {
|
if (_.includes(flattenedDays, tile.attr('value'))) {
|
||||||
tile.addClass('sg-active');
|
tile.addClass(CLASS_ACTIVE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ngModelCtrl.$validate();
|
ngModelCtrl.$validate();
|
||||||
|
|
|
@ -8,15 +8,11 @@ $sg-grid-border-width-focused: 2px;
|
||||||
&.sg-icon-button {
|
&.sg-icon-button {
|
||||||
@extend .md-button;
|
@extend .md-button;
|
||||||
// Overwrite some styles of .md-button
|
// Overwrite some styles of .md-button
|
||||||
border: 1px solid sg-color($sogoBlue, 300);
|
border: 1px solid $colorGrey600;
|
||||||
border-radius: 5%;
|
border-radius: 2px;
|
||||||
color: sg-color($sogoBlue, 600);
|
color: $colorGrey700;
|
||||||
min-height: auto;
|
min-height: auto;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
&.sg-active {
|
|
||||||
background-color: sg-color($sogoBlue, 300);
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue