mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Track recompiles.
This commit is contained in:
parent
96f6603bd3
commit
d5efe81a46
3 changed files with 16 additions and 4 deletions
|
@ -35,7 +35,7 @@ div.full-size(
|
|||
resize-on="layout:main:resize,layout:pdf:resize",
|
||||
annotations="pdf.logEntryAnnotations[editor.open_doc_id]",
|
||||
read-only="!permissions.write",
|
||||
on-ctrl-enter="recompile"
|
||||
on-ctrl-enter="recompileViaKey"
|
||||
)
|
||||
|
||||
.ui-layout-east
|
||||
|
|
|
@ -247,7 +247,10 @@ define [
|
|||
return path
|
||||
|
||||
$scope.recompile = (options = {}) ->
|
||||
event_tracking.send "editor-recompile", options
|
||||
|
||||
return if $scope.pdf.compiling
|
||||
|
||||
$scope.pdf.compiling = true
|
||||
|
||||
ide.$scope.$broadcast("flush-changes")
|
||||
|
@ -267,6 +270,9 @@ define [
|
|||
|
||||
# This needs to be public.
|
||||
ide.$scope.recompile = $scope.recompile
|
||||
# This method is a simply wrapper and exists only for tracking purposes.
|
||||
ide.$scope.recompileViaKey = () ->
|
||||
$scope.recompile { keyShortcut: true }
|
||||
|
||||
$scope.clearCache = () ->
|
||||
$http {
|
||||
|
|
|
@ -4,31 +4,37 @@ define [
|
|||
App.factory "settings", ["ide", "event_tracking", (ide, event_tracking) ->
|
||||
return {
|
||||
saveSettings: (data) ->
|
||||
# Tracking code.
|
||||
for key in Object.keys(data)
|
||||
changedSetting = key
|
||||
changedSettingVal = data[key]
|
||||
event_tracking.send "setting-changed", { changedSetting, changedSettingVal }
|
||||
|
||||
# End of tracking code.
|
||||
|
||||
data._csrf = window.csrfToken
|
||||
ide.$http.post "/user/settings", data
|
||||
|
||||
|
||||
saveProjectSettings: (data) ->
|
||||
# Tracking code.
|
||||
for key in Object.keys(data)
|
||||
changedSetting = key
|
||||
changedSettingVal = data[key]
|
||||
event_tracking.send "project-setting-changed", { changedSetting, changedSettingVal}
|
||||
|
||||
# End of tracking code.
|
||||
|
||||
data._csrf = window.csrfToken
|
||||
ide.$http.post "/project/#{ide.project_id}/settings", data
|
||||
|
||||
|
||||
saveProjectAdminSettings: (data) ->
|
||||
# Tracking code.
|
||||
for key in Object.keys(data)
|
||||
changedSetting = key
|
||||
changedSettingVal = data[key]
|
||||
event_tracking.send "project-admin-setting-changed", { changedSetting, changedSettingVal }
|
||||
|
||||
# End of tracking code.
|
||||
|
||||
data._csrf = window.csrfToken
|
||||
ide.$http.post "/project/#{ide.project_id}/settings/admin", data
|
||||
|
||||
|
|
Loading…
Reference in a new issue