From d8e0026bc6d2637237a644eea18d3a4b9b3eee8c Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 20 Jun 2016 17:32:57 +0100 Subject: [PATCH] Add class to enable per-hint feedback tracking. --- services/web/app/views/project/editor/pdf.jade | 9 ++++++--- .../ide/human-readable-logs/HumanReadableLogs.coffee | 3 ++- services/web/public/stylesheets/app/editor/pdf.less | 4 ---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/services/web/app/views/project/editor/pdf.jade b/services/web/app/views/project/editor/pdf.jade index 5fa6ec84ef..dab38e670d 100644 --- a/services/web/app/views/project/editor/pdf.jade +++ b/services/web/app/views/project/editor/pdf.jade @@ -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 diff --git a/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogs.coffee b/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogs.coffee index 5f4627cb95..6c5ef03bea 100644 --- a/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogs.coffee +++ b/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogs.coffee @@ -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? diff --git a/services/web/public/stylesheets/app/editor/pdf.less b/services/web/public/stylesheets/app/editor/pdf.less index 19a92fa3ce..27d943000b 100644 --- a/services/web/public/stylesheets/app/editor/pdf.less +++ b/services/web/public/stylesheets/app/editor/pdf.less @@ -223,10 +223,6 @@ font-weight: normal; } - &-actions { - - } - &-ext-link, &-feedback { display: inline-block;