Skip to content
Snippets Groups Projects
Commit 7112d4f7 authored by cmaeder's avatar cmaeder
Browse files

added thead and tbody and changes styles

parent d373489d
No related branches found
No related tags found
No related merge requests found
table, th , td { table, td {
border: 1px solid grey; border: 1px solid grey;
border-collapse: collapse; border-collapse: collapse;
padding: 5px; padding: 5px;
vertical-align: top
}
th {
border: 1px solid black;
background-color: grey;
} }
table tr:nth-child(odd) { table tr:nth-child(odd) {
background-color: #f1f1f1; background-color: lightGrey;
} }
table tr:nth-child(even) { table tr:nth-child(even) {
background-color: #ffffff; background-color: white;
} }
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
</head> </head>
<body> <body>
<h3>Show</h3> <h3>Show</h3>
(see <a href="http://gl.kwarc.info/cmaeder/mmt-errorview/blob/master/README.md">gitlab repository</a> for more information) (see <a href="http://gl.kwarc.info/cmaeder/mmt-errorview/blob/master/README.md">gitlab
repository</a> for more information)
<hr>
<div ng-controller="SearchController"> <div ng-controller="SearchController">
<li><input type="checkbox" ng-model="columns.id"/>row id</li> <li><input type="checkbox" ng-model="columns.id"/>row id</li>
<li><input type="checkbox" ng-model="columns.errLevel"/>error level</li> <li><input type="checkbox" ng-model="columns.errLevel"/>error level</li>
...@@ -16,16 +18,22 @@ ...@@ -16,16 +18,22 @@
<li><input type="checkbox" ng-model="columns.errType"/>error type</li> <li><input type="checkbox" ng-model="columns.errType"/>error type</li>
<li><input type="checkbox" ng-model="columns.shortMsg"/>short message</li> <li><input type="checkbox" ng-model="columns.shortMsg"/>short message</li>
<li><input type="checkbox" ng-model="columns.longMsg"/>long message</li> <li><input type="checkbox" ng-model="columns.longMsg"/>long message</li>
<hr>search in <select ng-model="field" ng-init="shortMsg" ng-options="key for key in colProps"></select> <hr>
search in <select ng-model="field" ng-init="shortMsg"
ng-options="key for key in colProps"></select>
<p>number of records: {{number}}</p> <p>number of records: {{number}}</p>
<form ng-submit="search()"> <form ng-submit="search()">
<p>maximal entries: <input type="number" min="0" max="10000" ng-model="maxNumber"/></p> <p>maximal entries: <input type="number" min="0" max="10000"
ng-model="maxNumber"/></p>
<input type="text" ng-model="searchText" size="20" <input type="text" ng-model="searchText" size="20"
placeholder="add new search string"/> placeholder="add new search string"/>
<input class="btn-primary" type="submit" value="search"/> <input class="btn-primary" type="submit" value="search"/>
</form> </form>
<p>results: {{results.length}}</p> <p>results: {{results.length}}</p>
<table> <table>
<thead>
<tr ng-if="results.length != 0"> <tr ng-if="results.length != 0">
<th ng-if="columns.id">id</th> <th ng-if="columns.id">id</th>
<th ng-if="columns.errLevel">level</th> <th ng-if="columns.errLevel">level</th>
...@@ -34,6 +42,8 @@ ...@@ -34,6 +42,8 @@
<th ng-if="columns.shortMsg">short message</th> <th ng-if="columns.shortMsg">short message</th>
<th ng-if="columns.longMsg">long message</th> <th ng-if="columns.longMsg">long message</th>
</tr> </tr>
</thead>
<tbody>
<tr ng-repeat="res in results track by $index"> <tr ng-repeat="res in results track by $index">
<td ng-if="columns.id">{{res.id}}</td> <td ng-if="columns.id">{{res.id}}</td>
<td ng-if="columns.errLevel">{{res.errLevel}}</td> <td ng-if="columns.errLevel">{{res.errLevel}}</td>
...@@ -42,6 +52,7 @@ ...@@ -42,6 +52,7 @@
<td ng-if="columns.shortMsg">{{res.shortMsg}}</td> <td ng-if="columns.shortMsg">{{res.shortMsg}}</td>
<td ng-if="columns.longMsg">{{res.longMsg}}</td> <td ng-if="columns.longMsg">{{res.longMsg}}</td>
</tr> </tr>
</tbody>
</table> </table>
</div> </div>
</body> </body>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment