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"
|
||||
onClick: () =>
|
||||
@startRename()
|
||||
ga('send', 'event', 'editor-interaction', 'renameEntity', {menu:"DropdownMenu", entityDropdown:"entityView"})
|
||||
}, {
|
||||
text: "Delete"
|
||||
onClick: () =>
|
||||
@manager.confirmDelete(@model)
|
||||
ga('send', 'event', 'editor-interaction', 'deleteEntity', {menu:"DropdownMenu", entityDropdown:"entityView"})
|
||||
}]
|
||||
|
||||
_initializeDrag: () ->
|
||||
|
|
|
@ -155,6 +155,8 @@ define [
|
|||
entity_id = @getSelectedEntityId()
|
||||
return if !entity_id?
|
||||
@views[entity_id]?.startRename()
|
||||
ga('send', 'event', 'editor-interaction', 'renameEntity', {menu:"topMenu"})
|
||||
|
||||
|
||||
renameEntity: (entity, name) ->
|
||||
@ide.socket.emit 'renameEntity', entity.id, entity.get("type"), name
|
||||
|
@ -247,6 +249,7 @@ define [
|
|||
|
||||
# DELETING
|
||||
confirmDelete: (entity) ->
|
||||
ga('send', 'event', 'editor-interaction', 'deleteEntity', {menu:"topMenu"})
|
||||
Modal.createModal
|
||||
title: "Confirm Deletion"
|
||||
message: "Are you sure you want to delete <strong>#{entity.get("name")}</strong>?"
|
||||
|
|
|
@ -11,18 +11,23 @@ define [
|
|||
"click .js-new-file" : (e) ->
|
||||
e.preventDefault()
|
||||
@manager.showNewDocModal()
|
||||
ga('send', 'event', 'editor-interaction', 'newFile', {menu:"DropdownMenu", entityDropdown:"folder"})
|
||||
"click .js-new-folder" : (e) ->
|
||||
e.preventDefault()
|
||||
@manager.showNewFolderModal()
|
||||
ga('send', 'event', 'editor-interaction', 'newFolder', {menu:"DropdownMenu", entityDropdown:"folder"})
|
||||
"click .js-upload-file" : (e) ->
|
||||
e.preventDefault()
|
||||
@manager.showUploadFileModal()
|
||||
ga('send', 'event', 'editor-interaction', 'uploadFile', {menu:"DropdownMenu", entityDropdown:"folder"})
|
||||
"click .js-delete-btn" : (e) ->
|
||||
e.preventDefault()
|
||||
@manager.confirmDeleteOfSelectedEntity()
|
||||
ga('send', 'event', 'editor-interaction', 'deleteEntity', {menu:"DropdownMenu", entityDropdown:"folder"})
|
||||
"click .js-rename-btn" : (e) ->
|
||||
e.preventDefault()
|
||||
@manager.renameSelected()
|
||||
ga('send', 'event', 'editor-interaction', 'renameEntity', {menu:"DropdownMenu", entityDropdown:"folder"})
|
||||
)
|
||||
|
||||
render: () ->
|
||||
|
|
Loading…
Reference in a new issue