fire ga events on renames/deletes

This commit is contained in:
Henry Oswald 2014-03-20 08:52:04 +00:00
parent 4f577b5467
commit 7310f94511
3 changed files with 10 additions and 0 deletions

View file

@ -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: () ->

View file

@ -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>?"

View file

@ -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: () ->