Add class to enable per-hint feedback tracking.

This commit is contained in:
Paulo Reis 2016-06-20 17:32:57 +01:00
parent fe53083afd
commit d8e0026bc6
3 changed files with 8 additions and 8 deletions

View file

@ -115,8 +115,11 @@ div.full-size.pdf(ng-controller="PdfController")
a(ng-href="{{ entry.extraInfoURL }}", target="_blank")
i.fa.fa-external-link
| #{translate("log_hint_extra_info")}
.card-hint-feedback(ng-show="!feedbackSent")
label.card-hint-feedback-label #{translate("log_hint_enquiry_helpful")}
.card-hint-feedback(
ng-show="!feedbackSent"
ng-class="entry.ruleId"
)
label.card-hint-feedback-label #{translate("log_hint_feedback_label")}
a.card-hint-feedback-positive(
ng-click="feedbackSent = true;"
) #{translate("answer_yes")}
@ -124,7 +127,7 @@ div.full-size.pdf(ng-controller="PdfController")
ng-click="feedbackSent = true;"
) #{translate("answer_no")}
.card-hint-feedback(ng-show="feedbackSent")
label.card-hint-feedback-label #{translate("log_hint_enquiry_gratitude")}
label.card-hint-feedback-label #{translate("log_hint_feedback_gratitude")}
p.entry-content(ng-show="entry.content") {{ entry.content }}
p

View file

@ -9,7 +9,8 @@ define [
return rule for rule in ruleset when rule.regexToMatch.test logMessage
for entry in parsedLogEntries.all
{ humanReadableHint, extraInfoURL } = _getRule entry.message
{ regexToMatch, humanReadableHint, extraInfoURL } = _getRule entry.message
entry.ruleId = 'hint_' + regexToMatch.toString().replace(/[^a-zA-Z0-9]/g, '_').toLowerCase()
entry.humanReadableHint = humanReadableHint if humanReadableHint?
entry.extraInfoURL = extraInfoURL if extraInfoURL?

View file

@ -223,10 +223,6 @@
font-weight: normal;
}
&-actions {
}
&-ext-link,
&-feedback {
display: inline-block;