Skip to content

Commit

Permalink
documentlist: Show solution type
Browse files Browse the repository at this point in the history
Fixes fsmi#124... nobody said anything of filtering
  • Loading branch information
Kha committed Aug 18, 2015
1 parent 108e2c4 commit 2d75873
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
10 changes: 4 additions & 6 deletions css/fontello.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
@font-face {
font-family: 'fontello';
src: url('../fonts/fontello.eot');
src: url('../fonts/fontello.eot#iefix') format('embedded-opentype'),
url('../fonts/fontello.woff') format('woff'),
url('../fonts/fontello.ttf') format('truetype'),
url('../fonts/fontello.svg#fontello') format('svg');
src: url('../fonts/fontello.woff') format('woff');
font-weight: normal;
font-style: normal;
}
Expand All @@ -14,7 +10,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../fonts/fontello.svg#fontello') format('svg');
src: url('../font/fontello.svg?9104068#fontello') format('svg');
}
}
*/
Expand Down Expand Up @@ -77,3 +73,5 @@
.icon-sort-down:before { content: '\e811'; } /* '' */
.icon-sort-up:before { content: '\e812'; } /* '' */
.icon-barcode:before { content: '\e813'; } /* '' */
.icon-ajust:before { content: '\e814'; } /* '' */
.icon-circle:before { content: '\e815'; } /* '' */
12 changes: 12 additions & 0 deletions fonts/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@
"code": 59411,
"src": "fontawesome"
},
{
"uid": "ca90da02d2c6a3183f2458e4dc416285",
"css": "ajust",
"code": 59412,
"src": "fontawesome"
},
{
"uid": "130380e481a7defc690dfb24123a1f0c",
"css": "circle",
"code": 59413,
"src": "fontawesome"
},
{
"uid": "422e07e5afb80258a9c4ed1706498f8a",
"css": "circle-empty",
Expand Down
Binary file modified fonts/fontello.woff
Binary file not shown.
6 changes: 6 additions & 0 deletions js/vm/documentlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ export default class DocumentList {
new DocumentType({list: this, name: 'oral reexam', title: 'mündliche Nachprüfung', icon: '<span class="icon-chat"><strong style="margin-left: -2px; cursor: default">!</strong></span>'}),
];
this.documentTypeByName = indexBy(this.documentTypes, t => t.name);
this.solutionTypeByName = {
'official': {title: 'Offizielle Lösung', iconClass: 'icon-circle'},
'inofficial': {title: 'Inoffizielle Lösung', iconClass: 'icon-ajust'},
'none': {title: 'Ohne Lösung', iconClass: 'icon-circle-empty'},
};

this.typeFilter = new Filter({column: 'document_type', operator: 'in_', value: ['written', 'oral', 'oral reexam']});

this.coll = new Collection({
Expand Down
8 changes: 6 additions & 2 deletions views/documentlist.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<table id="documentlist" class="table" style="min-width: 710px"><!-- sum of widths since col min-width is ignored -->
<colgroup>
<col style="width: 20px">
<col style="width: 70px">
<col style="width: 35px">
<col style="width: 35px">
<col style="min-width: 130px">
<col style="width: 100px">
<col style="width: 90px">
Expand All @@ -12,7 +13,7 @@
<thead>
<tr class="text-nowrap">
<td class="td-compact">#</td>
<td class="td-compact" data-bind="foreach: documentTypes">
<td colspan="2" class="td-compact" data-bind="foreach: documentTypes">
<div data-bind="visible: totalCount">
<input type="checkbox" data-bind="checked: selected"><span data-bind="attr: {title: title}, html: icon"></span> <span data-bind="text: count + '/' + (totalCount === undefined ? '' : totalCount)"></span>
</div>
Expand Down Expand Up @@ -44,6 +45,9 @@
<td class="td-compact" data-bind="with: $parent.documentTypeByName[documentType]">
<span data-bind="attr: {title: title}, html: icon"></span>
</td>
<td class="td-compact" data-bind="with: $parent.solutionTypeByName[solution]">
<span data-bind="attr: {title: title}, css: iconClass"></span>
</td>
<td>
<ul class="lecture-list-cell" data-bind="foreach: lectures">
<li data-bind="text: name"></li>
Expand Down

0 comments on commit 2d75873

Please sign in to comment.