1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-17 11:29:12 +00:00

Remove all console.log debug statements

This commit is contained in:
James Allen 2014-07-09 16:18:09 +01:00
parent 51d0026b74
commit c93902345a
18 changed files with 3 additions and 46 deletions

View file

@ -83,7 +83,7 @@ div#trackChanges(ng-show="ui.view == 'track-changes'")
.diff.full-size(ng-controller="TrackChangesDiffController")
.diff-editor.hide-ace-cursor(
ace-editor="track-changes",
ng-show="!!trackChanges.diff && !trackChanges.diff.loading && !trackChanges.diff.deleted",
ng-show="!!trackChanges.diff && !trackChanges.diff.loading && !trackChanges.diff.deleted && !trackChanges.diff.error",
theme="settings.theme",
font-size="settings.fontSize",
text="trackChanges.diff.text",

View file

@ -92,7 +92,6 @@ define [], () ->
clearTimeout @timeoutId if @timeoutId?
decreaseCountdown: () ->
console.log "Decreasing countdown"
return if !@$scope.connection.reconnection_countdown?
@$scope.$apply () =>
@$scope.connection.reconnection_countdown--
@ -104,7 +103,6 @@ define [], () ->
@timeoutId = setTimeout (=> @decreaseCountdown()), 1000
tryReconnect: () ->
console.log "Trying reconnect"
@cancelReconnect()
@$scope.connection.reconnecting = true
delete @$scope.connection.reconnection_countdown

View file

@ -49,7 +49,6 @@ define [
oldWidth = element.width()
# Something resized our parent element
onExternalResize = () ->
console.log "EXTERNAL RESIOZE", name, attrs.resizeProportionally
if attrs.resizeProportionally? and scope.$eval(attrs.resizeProportionally)
eastState = element.layout().readState().east
if eastState?
@ -87,7 +86,6 @@ define [
if attrs.openEast?
scope.$watch attrs.openEast, (value, oldValue) ->
console.log "Open East", value, oldValue
if value? and value != oldValue
if value
element.layout().open("east")

View file

@ -99,7 +99,6 @@ define [
session.setMode(new LatexMode())
scope.$watch "annotations", (annotations) ->
console.log "SETTING ANNOTATIONS", annotations
if annotations?
session = editor.getSession()
session.setAnnotations annotations

View file

@ -38,8 +38,6 @@ define [
range = new Range(pos.row, pos.column, pos.row, pos.column + 1)
nextChar = editor.session.getTextRange(range)
console.log "INSERT MATCH", this
# If we are in \begin{it|}, then we need to remove the trailing }
# since it will be adding in with the autocomplete of \begin{item}...
if this.completions.filterText.match(/^\\begin\{/) and nextChar == "}"
@ -48,7 +46,6 @@ define [
Autocomplete::_insertMatch.call this, data
@$scope.$watch "autoComplete", (autocomplete) =>
console.log "autocomplete change", autocomplete
if autocomplete
@enable()
else

View file

@ -21,7 +21,6 @@ define [], () ->
@storeScrollTopPosition(@editor.getSession())
@$scope.$on "#{@$scope.name}:gotoLine", (editor, value) =>
console.log "Going to line", value
if value?
setTimeout () =>
@gotoLine(value)

View file

@ -40,7 +40,6 @@ define [
do (annotation) =>
colorScheme = @_getColorScheme(annotation.hue)
if annotation.cursor?
console.log "DRAWING CURSOR", annotation
@labels.push {
text: annotation.label
range: new Range(
@ -109,7 +108,6 @@ define [
@$scope.annotationLabel.show = true
$label = @element.find(".annotation-label")
console.log "pageX", coords.pageX, "label", $label.outerWidth(), "ace", $ace.width()
if coords.pageX + $label.outerWidth() < $ace.width()
left = coords.pageX

View file

@ -56,8 +56,6 @@ define [
@$scope.$apply () =>
@$scope.spellingMenu.highlight = highlight
console.log "highlight", @$scope.highlight_under_mouse
if highlight
e.stopPropagation()
e.preventDefault()
@ -69,8 +67,6 @@ define [
)
)
console.log "Height", @element.find(".context-menu").height()
@$scope.$apply () =>
@$scope.spellingMenu.open = true
@$scope.spellingMenu.left = e.clientX + 'px'

View file

@ -16,7 +16,6 @@ define [
@nextUpdateIsRemote = false
@editor.on "changeSession", (e) =>
console.log "setting undo manager", e.session
e.session.setUndoManager(@)
showUndoConflictWarning: () ->

View file

@ -60,7 +60,6 @@ define [
@ide.socket.on "reciveEntityMove", (entity_id, folder_id) =>
entity = @findEntityById(entity_id)
folder = @findEntityById(folder_id)
console.log "Got recive ENTITY", entity_id, folder_id, entity, folder
@$scope.$apply () =>
@_moveEntityInScope(entity, folder)

View file

@ -2,12 +2,9 @@ define [
"base"
], (App) ->
App.controller "FileTreeRootFolderController", ["$scope", "ide", ($scope, ide) ->
console.log "CREATING FileTreeRootFolderController"
rootFolder = $scope.rootFolder
console.log "ROOT FOLDER", rootFolder
$scope.onDrop = (events, ui) ->
source = $(ui.draggable).scope().entity
console.log "DROPPED INTO ROOT", source, rootFolder
return if !source?
ide.fileTreeManager.moveEntity(source, rootFolder)
]

View file

@ -21,7 +21,6 @@ define [
@updateCursorHighlights()
updateCursorHighlights: () ->
console.log "UPDATING CURSOR HIGHLIGHTS"
@$scope.onlineUserCursorHighlights = {}
for client_id, client of @$scope.onlineUsers
doc_id = client.doc_id

View file

@ -94,7 +94,6 @@ define [
return path
$scope.recompile = (options = {}) ->
console.log "Recompiling", options
return if $scope.pdf.compiling
$scope.pdf.compiling = true
@ -140,7 +139,6 @@ define [
)
$scope.syncToCode = (position) ->
console.log "SYNCING VIA DBL CLICK", position
synctex
.syncToCode(position)
.then (data) ->
@ -246,13 +244,11 @@ define [
.syncToCode($scope.pdf.position, includeVisualOffset: true)
.then (data) ->
{doc, line} = data
console.log "OPENING DOC", doc, line
ide.editorManager.openDoc(doc, gotoLine: line)
]
App.controller "PdfLogEntryController", ["$scope", "ide", ($scope, ide) ->
$scope.openInEditor = (entry) ->
console.log "OPENING", entry.file, entry.line
entity = ide.fileTreeManager.findEntityByPath(entry.file)
return if !entity? or entity.type != "doc"
if entry.line?

View file

@ -38,7 +38,7 @@ define [
annotationsLayerBuilder: AnnotationsLayerBuilder
highlightsLayerBuilder: HighlightsLayerBuilder
ondblclick: (e) -> onDoubleClick(e)
logLevel: PDFListView.Logger.DEBUG
# logLevel: PDFListView.Logger.DEBUG
pdfListView.listView.pageWidthOffset = 20
pdfListView.listView.pageHeightOffset = 20
@ -47,7 +47,6 @@ define [
onProgress = (progress) ->
scope.$apply () ->
scope.progress = Math.floor(progress.loaded/progress.total*100)
console.log "PROGRESS", scope.progress, progress.loaded, progress.total
initializedPosition = false
initializePosition = () ->
@ -78,7 +77,6 @@ define [
, 1000
element.find(".pdfjs-viewer").scroll () ->
console.log "UPDATING POSITION", pdfListView.getPdfPosition(true)
scope.position = pdfListView.getPdfPosition(true)
onDoubleClick = (e) ->
@ -99,7 +97,6 @@ define [
flashControls()
scope.$watch "highlights", (areas) ->
console.log "UPDATING HIGHLIGHTS", areas
return if !areas?
highlights = for area in areas or []
{

View file

@ -23,7 +23,6 @@ define [
$scope.canAddCollaborators = noOfMembers < allowedNoOfMembers or allowedNoOfMembers == INFINITE_COLLABORATORS
$scope.addMember = () ->
console.log "EMAIL", $scope.inputs.email
return if !$scope.inputs.email? or $scope.inputs.email == ""
$scope.state.error = null
$scope.state.inflight = true
@ -32,7 +31,6 @@ define [
.then (user) ->
$scope.state.inflight = false
$scope.inputs.email = ""
console.log "GOT USER", user
$scope.project.members.push user
.catch () ->
$scope.state.inflight = false

View file

@ -51,7 +51,6 @@ define [
}
autoSelectRecentUpdates: () ->
console.log "AUTO SELECTING UPDATES", @$scope.trackChanges.updates.length
return if @$scope.trackChanges.updates.length == 0
@$scope.trackChanges.updates[0].selectedTo = true
@ -84,8 +83,6 @@ define [
{updates, doc} = @$scope.trackChanges.selection
{fromV, toV} = @_calculateRangeFromSelection()
console.log "Checking if diff has changed", doc?.id, fromV, toV, updates
return if !doc?
return if diff? and
@ -93,8 +90,6 @@ define [
diff.fromV == fromV and
diff.toV == toV
console.log "Loading diff", fromV, toV, doc?.id
@$scope.trackChanges.diff = diff = {
fromV: fromV
toV: toV
@ -120,7 +115,6 @@ define [
diff.error = true
else
diff.deleted = true
console.log "DOC IS DELETED - NO DIFF FOR YOU!"
restoreDeletedDoc: (doc) ->
@ide.$http.post "/project/#{@$scope.project_id}/doc/#{doc.id}/restore", {
@ -240,9 +234,8 @@ define [
selected_doc = @$scope.trackChanges.selection.doc
if selected_doc? and affected_docs[selected_doc.id]?
console.log "An affected doc is already open, bravo!"
# Selected doc is already open
else
console.log "selected doc is not open, selecting first one"
for doc_id, doc of affected_docs
selected_doc = doc
break

View file

@ -8,7 +8,6 @@ define [
ide.trackChangesManager.fetchNextBatchOfUpdates()
$scope.recalculateSelectedUpdates = () ->
console.log "RECALCULATING UPDATES"
beforeSelection = true
afterSelection = false
$scope.trackChanges.selection.updates = []
@ -72,14 +71,12 @@ define [
App.controller "TrackChangesListItemController", ["$scope", ($scope) ->
$scope.$watch "update.selectedFrom", (selectedFrom, oldSelectedFrom) ->
if selectedFrom
console.log "SELECTED FROM CHANGED", $scope.update, selectedFrom, oldSelectedFrom
for update in $scope.trackChanges.updates
update.selectedFrom = false unless update == $scope.update
$scope.recalculateSelectedUpdates()
$scope.$watch "update.selectedTo", (selectedTo, oldSelectedTo) ->
if selectedTo
console.log "SELECTED TO CHANGED", $scope.update, selectedTo, oldSelectedTo
for update in $scope.trackChanges.updates
update.selectedTo = false unless update == $scope.update
$scope.recalculateSelectedUpdates()

View file

@ -15,9 +15,7 @@ define [
loadUntilFull = () ->
if (listShorterThanContainer() or atEndOfListView()) and not scope.$eval(attrs.infiniteScrollDisabled)
console.log "Loading more"
promise = scope.$eval(attrs.infiniteScroll)
console.log promise
promise.then () ->
loadUntilFull()
# @collection.fetchNextBatch
@ -38,7 +36,6 @@ define [
loadUntilFull()
scope.$watch attrs.infiniteScrollInitialize, (value) ->
console.log "INITIALIZE", value
if value
loadUntilFull()