report: better select state

This commit is contained in:
Felix Niklas 2015-10-21 11:10:18 +02:00
parent a871113525
commit 5223e08291
3 changed files with 11 additions and 55 deletions

View file

@ -2,7 +2,7 @@
<% if @params.timeRange is 'day': %>
<div class="btn-group btn-group--full" role="group" aria-label="">
<% for item in @timeRangeDay: %>
<div class="btn btn--text js-timePickerDay<%- ' btn--positive' if @params.day is item.value %>" data-id="<%= @params.timeRange %>" data-type="<%= item.value %>"><%= item.display %></div>
<div class="btn btn--text js-timePickerDay<%- ' is-selected' if @params.day is item.value %>" data-id="<%= @params.timeRange %>" data-type="<%= item.value %>"><%= item.display %></div>
<% end %>
</div>
<% end %>
@ -10,7 +10,7 @@
<% if @params.timeRange is 'day' || @params.timeRange is 'month': %>
<div class="btn-group btn-group--full" role="group" aria-label="">
<% for item in @timeRangeMonth: %>
<div class="btn btn--text js-timePickerMonth<%- ' btn--positive' if @params.month is item.value %>" data-id="<%= @params.timeRange %>" data-type="<%= item.value %>"><%= item.display %></div>
<div class="btn btn--text js-timePickerMonth<%- ' is-selected' if @params.month is item.value %>" data-id="<%= @params.timeRange %>" data-type="<%= item.value %>"><%= item.display %></div>
<% end %>
</div>
<% end %>
@ -18,7 +18,7 @@
<% if @params.timeRange is 'week': %>
<div class="btn-group btn-group--full" role="group" aria-label="">
<% for item in @timeRangeWeek: %>
<div class="btn btn--text js-timePickerWeek<%- ' btn--positive' if @params.week is item.value %>" data-id="<%= @params.timeRange %>" data-type="<%= item.value %>"><%= item.display %></div>
<div class="btn btn--text js-timePickerWeek<%- ' is-selected' if @params.week is item.value %>" data-id="<%= @params.timeRange %>" data-type="<%= item.value %>"><%= item.display %></div>
<% end %>
</div>
<% end %>
@ -26,7 +26,7 @@
<% if @params.timeRange isnt 'realtime': %>
<div class="btn-group btn-group--full" role="group" aria-label="">
<% for item in @timeRangeYear: %>
<div class="btn btn--text js-timePickerYear<%- ' btn--positive' if @params.year is item.value %>" data-id="<%= @params.timeRange %>" data-type="<%= item.value %>"><%= item.display %></div>
<div class="btn btn--text js-timePickerYear<%- ' is-selected' if @params.year is item.value %>" data-id="<%= @params.timeRange %>" data-type="<%= item.value %>"><%= item.display %></div>
<% end %>
</div>
<% end %>

View file

@ -2266,56 +2266,6 @@ tbody.collapse.in {
.btn-toolbar > .input-group {
margin-left: 5px;
}
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
border-radius: 0;
}
.btn-group > .btn:first-child {
margin-left: 0;
}
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.btn-group > .btn-group {
float: left;
}
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group > .btn-group:first-child > .btn:last-child,
.btn-group > .btn-group:first-child > .dropdown-toggle {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.btn-group > .btn-group:last-child > .btn:first-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
outline: 0;
}
.btn-group > .btn + .dropdown-toggle {
padding-right: 8px;
padding-left: 8px;
}
.btn-group > .btn-lg + .dropdown-toggle {
padding-right: 12px;
padding-left: 12px;
}
.btn-group.open .dropdown-toggle {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
.btn-group.open .dropdown-toggle.btn-link {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn .caret {
margin-left: 0;
}

View file

@ -13,7 +13,7 @@ $minWidth: 1024px;
$sidebarWidth: 280px;
$navigationWidth: 260px;
$highlight-color: #3FA9F5;
$highlight-color: hsl(205,90%,60%);
html {
height: 100%;
@ -563,6 +563,12 @@ blockquote {
.btn--text {
padding: 6px 10px 5px; /* reporting main.eco */
display: inline-block;
border-radius: 3px;
&.is-selected {
background: hsl(203,65%,55%);
color: white;
}
}
}