|
@@ -3,7 +3,6 @@ define [
|
|
|
"ace/ace"
|
|
"ace/ace"
|
|
|
"ide/human-readable-logs/HumanReadableLogs"
|
|
"ide/human-readable-logs/HumanReadableLogs"
|
|
|
"libs/bib-log-parser"
|
|
"libs/bib-log-parser"
|
|
|
- "services/log-hints-feedback"
|
|
|
|
|
], (App, Ace, HumanReadableLogs, BibLogParser) ->
|
|
], (App, Ace, HumanReadableLogs, BibLogParser) ->
|
|
|
AUTO_COMPILE_MAX_WAIT = 5000
|
|
AUTO_COMPILE_MAX_WAIT = 5000
|
|
|
# We add a 1 second debounce to sending user changes to server if they aren't
|
|
# We add a 1 second debounce to sending user changes to server if they aren't
|
|
@@ -16,7 +15,7 @@ define [
|
|
|
return (url)-> return $sce.trustAsResourceUrl(url);
|
|
return (url)-> return $sce.trustAsResourceUrl(url);
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
- App.controller "PdfController", ($scope, $http, ide, $modal, synctex, event_tracking, logHintsFeedback, localStorage) ->
|
|
|
|
|
|
|
+ App.controller "PdfController", ($scope, $http, ide, $modal, synctex, event_tracking, localStorage) ->
|
|
|
# enable per-user containers by default
|
|
# enable per-user containers by default
|
|
|
perUserCompile = true
|
|
perUserCompile = true
|
|
|
autoCompile = true
|
|
autoCompile = true
|
|
@@ -42,22 +41,9 @@ define [
|
|
|
$scope.$applyAsync () ->
|
|
$scope.$applyAsync () ->
|
|
|
$scope.shouldDropUp = getFilesDropdownTopCoordAsRatio() > 0.65
|
|
$scope.shouldDropUp = getFilesDropdownTopCoordAsRatio() > 0.65
|
|
|
|
|
|
|
|
- # log hints tracking
|
|
|
|
|
- $scope.logHintsNegFeedbackValues = logHintsFeedback.feedbackOpts
|
|
|
|
|
-
|
|
|
|
|
$scope.trackLogHintsLearnMore = () ->
|
|
$scope.trackLogHintsLearnMore = () ->
|
|
|
event_tracking.sendMB "logs-hints-learn-more"
|
|
event_tracking.sendMB "logs-hints-learn-more"
|
|
|
|
|
|
|
|
- trackLogHintsFeedback = (isPositive, hintId) ->
|
|
|
|
|
- event_tracking.send "log-hints", (if isPositive then "feedback-positive" else "feedback-negative"), hintId
|
|
|
|
|
- event_tracking.sendMB (if isPositive then "log-hints-feedback-positive" else "log-hints-feedback-negative"), { hintId }
|
|
|
|
|
-
|
|
|
|
|
- $scope.trackLogHintsNegFeedbackDetails = (hintId, feedbackOpt, feedbackOtherVal) ->
|
|
|
|
|
- logHintsFeedback.submitFeedback hintId, feedbackOpt, feedbackOtherVal
|
|
|
|
|
-
|
|
|
|
|
- $scope.trackLogHintsPositiveFeedback = (hintId) -> trackLogHintsFeedback true, hintId
|
|
|
|
|
- $scope.trackLogHintsNegativeFeedback = (hintId) -> trackLogHintsFeedback false, hintId
|
|
|
|
|
-
|
|
|
|
|
if ace.require("ace/lib/useragent").isMac
|
|
if ace.require("ace/lib/useragent").isMac
|
|
|
$scope.modifierKey = "Cmd"
|
|
$scope.modifierKey = "Cmd"
|
|
|
else
|
|
else
|
|
@@ -69,9 +55,9 @@ define [
|
|
|
if qs_args.length then "?" + qs_args.join("&") else ""
|
|
if qs_args.length then "?" + qs_args.join("&") else ""
|
|
|
|
|
|
|
|
$scope.stripHTMLFromString = (htmlStr) ->
|
|
$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", () ->
|
|
$scope.$on "project:joined", () ->
|
|
|
return if !autoCompile
|
|
return if !autoCompile
|