mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
fire ga events on renames/deletes
This commit is contained in:
parent
4f577b5467
commit
7310f94511
3 changed files with 10 additions and 0 deletions
|
@ -111,10 +111,12 @@ define [
|
||||||
text: "Rename"
|
text: "Rename"
|
||||||
onClick: () =>
|
onClick: () =>
|
||||||
@startRename()
|
@startRename()
|
||||||
|
ga('send', 'event', 'editor-interaction', 'renameEntity', {menu:"DropdownMenu", entityDropdown:"entityView"})
|
||||||
}, {
|
}, {
|
||||||
text: "Delete"
|
text: "Delete"
|
||||||
onClick: () =>
|
onClick: () =>
|
||||||
@manager.confirmDelete(@model)
|
@manager.confirmDelete(@model)
|
||||||
|
ga('send', 'event', 'editor-interaction', 'deleteEntity', {menu:"DropdownMenu", entityDropdown:"entityView"})
|
||||||
}]
|
}]
|
||||||
|
|
||||||
_initializeDrag: () ->
|
_initializeDrag: () ->
|
||||||
|
|
|
@ -155,6 +155,8 @@ define [
|
||||||
entity_id = @getSelectedEntityId()
|
entity_id = @getSelectedEntityId()
|
||||||
return if !entity_id?
|
return if !entity_id?
|
||||||
@views[entity_id]?.startRename()
|
@views[entity_id]?.startRename()
|
||||||
|
ga('send', 'event', 'editor-interaction', 'renameEntity', {menu:"topMenu"})
|
||||||
|
|
||||||
|
|
||||||
renameEntity: (entity, name) ->
|
renameEntity: (entity, name) ->
|
||||||
@ide.socket.emit 'renameEntity', entity.id, entity.get("type"), name
|
@ide.socket.emit 'renameEntity', entity.id, entity.get("type"), name
|
||||||
|
@ -247,6 +249,7 @@ define [
|
||||||
|
|
||||||
# DELETING
|
# DELETING
|
||||||
confirmDelete: (entity) ->
|
confirmDelete: (entity) ->
|
||||||
|
ga('send', 'event', 'editor-interaction', 'deleteEntity', {menu:"topMenu"})
|
||||||
Modal.createModal
|
Modal.createModal
|
||||||
title: "Confirm Deletion"
|
title: "Confirm Deletion"
|
||||||
message: "Are you sure you want to delete <strong>#{entity.get("name")}</strong>?"
|
message: "Are you sure you want to delete <strong>#{entity.get("name")}</strong>?"
|
||||||
|
|
|
@ -11,18 +11,23 @@ define [
|
||||||
"click .js-new-file" : (e) ->
|
"click .js-new-file" : (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@manager.showNewDocModal()
|
@manager.showNewDocModal()
|
||||||
|
ga('send', 'event', 'editor-interaction', 'newFile', {menu:"DropdownMenu", entityDropdown:"folder"})
|
||||||
"click .js-new-folder" : (e) ->
|
"click .js-new-folder" : (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@manager.showNewFolderModal()
|
@manager.showNewFolderModal()
|
||||||
|
ga('send', 'event', 'editor-interaction', 'newFolder', {menu:"DropdownMenu", entityDropdown:"folder"})
|
||||||
"click .js-upload-file" : (e) ->
|
"click .js-upload-file" : (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@manager.showUploadFileModal()
|
@manager.showUploadFileModal()
|
||||||
|
ga('send', 'event', 'editor-interaction', 'uploadFile', {menu:"DropdownMenu", entityDropdown:"folder"})
|
||||||
"click .js-delete-btn" : (e) ->
|
"click .js-delete-btn" : (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@manager.confirmDeleteOfSelectedEntity()
|
@manager.confirmDeleteOfSelectedEntity()
|
||||||
|
ga('send', 'event', 'editor-interaction', 'deleteEntity', {menu:"DropdownMenu", entityDropdown:"folder"})
|
||||||
"click .js-rename-btn" : (e) ->
|
"click .js-rename-btn" : (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@manager.renameSelected()
|
@manager.renameSelected()
|
||||||
|
ga('send', 'event', 'editor-interaction', 'renameEntity', {menu:"DropdownMenu", entityDropdown:"folder"})
|
||||||
)
|
)
|
||||||
|
|
||||||
render: () ->
|
render: () ->
|
||||||
|
|
Loading…
Reference in a new issue