mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Track recompiles.
This commit is contained in:
@@ -35,7 +35,7 @@ div.full-size(
|
|||||||
resize-on="layout:main:resize,layout:pdf:resize",
|
resize-on="layout:main:resize,layout:pdf:resize",
|
||||||
annotations="pdf.logEntryAnnotations[editor.open_doc_id]",
|
annotations="pdf.logEntryAnnotations[editor.open_doc_id]",
|
||||||
read-only="!permissions.write",
|
read-only="!permissions.write",
|
||||||
on-ctrl-enter="recompile"
|
on-ctrl-enter="recompileViaKey"
|
||||||
)
|
)
|
||||||
|
|
||||||
.ui-layout-east
|
.ui-layout-east
|
||||||
|
|||||||
@@ -247,7 +247,10 @@ define [
|
|||||||
return path
|
return path
|
||||||
|
|
||||||
$scope.recompile = (options = {}) ->
|
$scope.recompile = (options = {}) ->
|
||||||
|
event_tracking.send "editor-recompile", options
|
||||||
|
|
||||||
return if $scope.pdf.compiling
|
return if $scope.pdf.compiling
|
||||||
|
|
||||||
$scope.pdf.compiling = true
|
$scope.pdf.compiling = true
|
||||||
|
|
||||||
ide.$scope.$broadcast("flush-changes")
|
ide.$scope.$broadcast("flush-changes")
|
||||||
@@ -267,6 +270,9 @@ define [
|
|||||||
|
|
||||||
# This needs to be public.
|
# This needs to be public.
|
||||||
ide.$scope.recompile = $scope.recompile
|
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 = () ->
|
$scope.clearCache = () ->
|
||||||
$http {
|
$http {
|
||||||
|
|||||||
@@ -4,30 +4,36 @@ define [
|
|||||||
App.factory "settings", ["ide", "event_tracking", (ide, event_tracking) ->
|
App.factory "settings", ["ide", "event_tracking", (ide, event_tracking) ->
|
||||||
return {
|
return {
|
||||||
saveSettings: (data) ->
|
saveSettings: (data) ->
|
||||||
|
# Tracking code.
|
||||||
for key in Object.keys(data)
|
for key in Object.keys(data)
|
||||||
changedSetting = key
|
changedSetting = key
|
||||||
changedSettingVal = data[key]
|
changedSettingVal = data[key]
|
||||||
event_tracking.send "setting-changed", { changedSetting, changedSettingVal }
|
event_tracking.send "setting-changed", { changedSetting, changedSettingVal }
|
||||||
|
# End of tracking code.
|
||||||
|
|
||||||
data._csrf = window.csrfToken
|
data._csrf = window.csrfToken
|
||||||
ide.$http.post "/user/settings", data
|
ide.$http.post "/user/settings", data
|
||||||
|
|
||||||
|
|
||||||
saveProjectSettings: (data) ->
|
saveProjectSettings: (data) ->
|
||||||
|
# Tracking code.
|
||||||
for key in Object.keys(data)
|
for key in Object.keys(data)
|
||||||
changedSetting = key
|
changedSetting = key
|
||||||
changedSettingVal = data[key]
|
changedSettingVal = data[key]
|
||||||
event_tracking.send "project-setting-changed", { changedSetting, changedSettingVal}
|
event_tracking.send "project-setting-changed", { changedSetting, changedSettingVal}
|
||||||
|
# End of tracking code.
|
||||||
|
|
||||||
data._csrf = window.csrfToken
|
data._csrf = window.csrfToken
|
||||||
ide.$http.post "/project/#{ide.project_id}/settings", data
|
ide.$http.post "/project/#{ide.project_id}/settings", data
|
||||||
|
|
||||||
|
|
||||||
saveProjectAdminSettings: (data) ->
|
saveProjectAdminSettings: (data) ->
|
||||||
|
# Tracking code.
|
||||||
for key in Object.keys(data)
|
for key in Object.keys(data)
|
||||||
changedSetting = key
|
changedSetting = key
|
||||||
changedSettingVal = data[key]
|
changedSettingVal = data[key]
|
||||||
event_tracking.send "project-admin-setting-changed", { changedSetting, changedSettingVal }
|
event_tracking.send "project-admin-setting-changed", { changedSetting, changedSettingVal }
|
||||||
|
# End of tracking code.
|
||||||
|
|
||||||
data._csrf = window.csrfToken
|
data._csrf = window.csrfToken
|
||||||
ide.$http.post "/project/#{ide.project_id}/settings/admin", data
|
ide.$http.post "/project/#{ide.project_id}/settings/admin", data
|
||||||
|
|||||||
Reference in New Issue
Block a user