Display components priorities in list and views

This commit is contained in:
Francis Lachapelle committed 2016-04-21 17:02:07 -04:00
1 parent 6e1369e6b1
commit 0b7485228c
11 files changed
+108 -22

No files matched your search

@@ -179,6 +179,7 @@
vm.addAttendee = addAttendee;
vm.removeAttendee = removeAttendee;
vm.addAttachUrl = addAttachUrl;
vm.priorityLevel = priorityLevel;
vm.cancel = cancel;
vm.save = save;
vm.attendeeConflictError = false;
@@ -243,6 +244,17 @@
vm.showAttendeesEditor = false;
}
function priorityLevel() {
if (vm.component.priority) {
if (vm.component.priority > 5)
return l('low');
else if (vm.component.priority > 4)
return l('normal');
else
return l('high');
}
}
function save(form, options) {
if (form.$valid) {
vm.component.$save(options)
@@ -38,7 +38,9 @@
' <div class="sg-category" ng-repeat="category in block.component.categories"',
' ng-class="\'bg-category\' + category"',
' ng-style="{ right: ($index * 3) + \'px\' }"></div>',
' <div class="text">{{ block.component.summary }}',
' <div class="text">',
' <span ng-show="block.component.c_priority" class="sg-priority">{{block.component.c_priority}}</span>',
' {{ block.component.summary }}',
' <span class="icons">',
// Component is reccurent
' <md-icon ng-if="block.component.occurrenceId" class="material-icons icon-repeat"></md-icon>',
@@ -500,6 +500,17 @@ $quarter_height: 10px;
}
}
.sg-priority {
background-color: $colorGrey200;
border-radius: 50%;
color: $colorGrey700;
display: inline-block;
font-size: 11px;
font-weight: bold;
line-height: 1;
padding: 2px 5px;
}
.minutes15, .minutes30, .minutes45 {
display: block;
height: 25%;