Make annotations collapsable in UI

This commit is contained in:
Fabian Reinartz 2015-10-22 10:46:52 +02:00
parent a4333564a0
commit 9f8c959d4d
3 changed files with 22 additions and 3 deletions

View File

@ -139,6 +139,18 @@ header #logo {
padding: .5em .6em;
}
input.collapse[type=checkbox] {
-webkit-appearance: none;
width: 1em;
height: 1em;
border: none;
}
input.collapse[type=checkbox]:after {
content: '▹';
}
input.collapse.open[type=checkbox]:after {
content: '▿';
}
/**/
input[type="datetime-local"] {

View File

@ -164,6 +164,10 @@ angular.module('am.controllers').controller('NavCtrl',
}
);
angular.module('am.controllers').controller('AlertCtrl',
function() {}
);
angular.module('am.controllers').controller('AlertsCtrl',
function($scope, Route) {
$scope.route = null;

View File

@ -1,4 +1,4 @@
<div class="alert-item list-item">
<div class="alert-item list-item" ng-controller="AlertCtrl">
<div class="container-left">
<div class="active-interval">
<span class="date">{{ a.startsAt | date:'yyyy-MM-dd' }},</span> <span class="time">{{ a.startsAt | date:'HH:mm' }}</span>
@ -15,12 +15,15 @@
</span>
</div>
<div class="container-right group">
<div class="left">
<div>
Details: <input class="collapse" ng-class="{open:collapse}" type="checkbox" ng-model="collapse"></input>
</div>
<div class="left" ng-show="collapse">
<table class="table-flat">
<tbody>
<tr ng-repeat="(name, val) in a.annotations | orderBy:name">
<td style="padding-right: 3em"><em>{{ name }}</em></td>
<td style="white-space: pre-wrap;">{{ val }}</td>
<td style="white-space: pre-line;">{{ val }}</td>
</tr>
</tbody>
</table>