add back learn more link

This commit is contained in:
Nate Stemen 2018-08-23 11:42:00 -04:00
parent 6d3b7cbe7b
commit 80c74ce07b
2 changed files with 15 additions and 4 deletions

View file

@ -178,6 +178,15 @@ div.full-size.pdf(ng-controller="PdfController")
p.card-hint-text(
ng-show="entry.humanReadableHint",
ng-bind-html="wikiEnabled ? entry.humanReadableHint : stripHTMLFromString(entry.humanReadableHint)")
.card-hint-footer.clearfix
.card-hint-ext-link(ng-if="wikiEnabled && entry.extraInfoURL")
a(
ng-href="{{ entry.extraInfoURL }}",
ng-click="trackLogHintsLearnMore()"
target="_blank"
)
i.fa.fa-external-link
| #{translate("log_hint_extra_info")}
p.entry-content(ng-show="entry.content") {{ entry.content.trim() }}

View file

@ -3,7 +3,6 @@ define [
"ace/ace"
"ide/human-readable-logs/HumanReadableLogs"
"libs/bib-log-parser"
"services/log-hints-feedback"
], (App, Ace, HumanReadableLogs, BibLogParser) ->
AUTO_COMPILE_MAX_WAIT = 5000
# We add a 1 second debounce to sending user changes to server if they aren't
@ -38,6 +37,9 @@ define [
$scope.$applyAsync () ->
$scope.shouldDropUp = getFilesDropdownTopCoordAsRatio() > 0.65
$scope.trackLogHintsLearnMore = () ->
event_tracking.sendMB "logs-hints-learn-more"
if ace.require("ace/lib/useragent").isMac
$scope.modifierKey = "Cmd"
else
@ -49,9 +51,9 @@ define [
if qs_args.length then "?" + qs_args.join("&") else ""
$scope.stripHTMLFromString = (htmlStr) ->
tmp = document.createElement("DIV")
tmp.innerHTML = htmlStr
return tmp.textContent || tmp.innerText || ""
tmp = document.createElement("DIV")
tmp.innerHTML = htmlStr
return tmp.textContent || tmp.innerText || ""
$scope.$on "project:joined", () ->
return if !autoCompile