mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Add in debug pop up
This commit is contained in:
parent
767b220fab
commit
cc522f5d07
3 changed files with 39 additions and 0 deletions
|
@ -430,6 +430,10 @@
|
|||
div
|
||||
a(href="#", title='Show Hot Keys List')#hotkeysLink Hot keys
|
||||
|
||||
script(type='text/template')#DebugLinkTemplate
|
||||
div
|
||||
a(href="#", title='Show Debug Information')#debugLink Debug
|
||||
|
||||
script(type='text/template')#trackChangesPanelTemplate
|
||||
#trackChangesPanel
|
||||
.track-changes-side-bar
|
||||
|
|
32
services/web/public/coffee/debug/DebugManager.coffee
Normal file
32
services/web/public/coffee/debug/DebugManager.coffee
Normal file
|
@ -0,0 +1,32 @@
|
|||
define [
|
||||
"utils/Modal"
|
||||
], (Modal) ->
|
||||
class DebugManager
|
||||
template: $("#DebugLinkTemplate").html()
|
||||
|
||||
constructor: (@ide) ->
|
||||
@$el = $(@template)
|
||||
$("#toolbar-footer").append(@$el)
|
||||
@$el.on "click", (e) =>
|
||||
e.preventDefault()
|
||||
@showDebugModal()
|
||||
|
||||
showDebugModal: () ->
|
||||
useragent = navigator.userAgent
|
||||
server_id = document.cookie.match(/SERVERID=([^;]*)/)?[1]
|
||||
transport = @ide.socket.socket.transport.name
|
||||
|
||||
new Modal(
|
||||
title: "Debug info"
|
||||
message: """
|
||||
Please give this information to the ShareLaTeX team:
|
||||
<p><pre>
|
||||
user-agent: #{useragent}
|
||||
server-id: #{server_id}
|
||||
transport: #{transport}
|
||||
</pre></p>
|
||||
"""
|
||||
buttons: [
|
||||
text: "OK"
|
||||
]
|
||||
)
|
|
@ -26,6 +26,7 @@ define [
|
|||
"tour/IdeTour"
|
||||
"analytics/AnalyticsManager"
|
||||
"track-changes/TrackChangesManager"
|
||||
"debug/DebugManager"
|
||||
"ace/ace"
|
||||
"libs/jquery.color"
|
||||
"libs/jquery-layout"
|
||||
|
@ -59,6 +60,7 @@ define [
|
|||
IdeTour,
|
||||
AnalyticsManager,
|
||||
TrackChangesManager
|
||||
DebugManager
|
||||
) ->
|
||||
|
||||
|
||||
|
@ -194,6 +196,7 @@ define [
|
|||
ide.hotkeysManager = new HotkeysManager ide
|
||||
ide.layoutManager.resizeAllSplitters()
|
||||
ide.tourManager = new IdeTour ide
|
||||
ide.debugManager = new DebugManager(ide)
|
||||
|
||||
ide.savingAreaManager =
|
||||
$savingArea : $('#saving-area')
|
||||
|
|
Loading…
Reference in a new issue