mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Tracking time spent reading initial guides.
This commit is contained in:
parent
ebfb329da7
commit
6dc2a48b75
3 changed files with 12 additions and 2 deletions
|
@ -9,6 +9,9 @@ module.exports =
|
||||||
'note-group-ended':
|
'note-group-ended':
|
||||||
{} # TODO schema
|
{} # TODO schema
|
||||||
|
|
||||||
|
'modal-opened':
|
||||||
|
{} # TODO schema
|
||||||
|
|
||||||
'modal-closed':
|
'modal-closed':
|
||||||
{} # TODO schema
|
{} # TODO schema
|
||||||
|
|
||||||
|
|
|
@ -177,6 +177,7 @@ module.exports = class CocoView extends Backbone.View
|
||||||
$('#modal-wrapper .modal').modal(modalOptions).on 'hidden.bs.modal', @modalClosed
|
$('#modal-wrapper .modal').modal(modalOptions).on 'hidden.bs.modal', @modalClosed
|
||||||
window.currentModal = modalView
|
window.currentModal = modalView
|
||||||
@getRootView().stopListeningToShortcuts(true)
|
@getRootView().stopListeningToShortcuts(true)
|
||||||
|
Backbone.Mediator.publish 'modal-opened', {}
|
||||||
|
|
||||||
modalClosed: =>
|
modalClosed: =>
|
||||||
visibleModal.willDisappear() if visibleModal
|
visibleModal.willDisappear() if visibleModal
|
||||||
|
@ -190,7 +191,7 @@ module.exports = class CocoView extends Backbone.View
|
||||||
@openModalView(wm)
|
@openModalView(wm)
|
||||||
else
|
else
|
||||||
@getRootView().listenToShortcuts(true)
|
@getRootView().listenToShortcuts(true)
|
||||||
Backbone.Mediator.publish 'modal-closed'
|
Backbone.Mediator.publish 'modal-closed', {}
|
||||||
|
|
||||||
# Loading RootViews
|
# Loading RootViews
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,13 @@ module.exports = class PlayLevelView extends View
|
||||||
supermodel: @supermodel
|
supermodel: @supermodel
|
||||||
firstOnly: true
|
firstOnly: true
|
||||||
@openModalView(new DocsModal(options), true)
|
@openModalView(new DocsModal(options), true)
|
||||||
Backbone.Mediator.subscribeOnce 'modal-closed', @onLevelStarted, @
|
onGuideOpened = ->
|
||||||
|
@guideOpenTime = new Date()
|
||||||
|
onGuideClosed = ->
|
||||||
|
application.tracker?.trackTiming new Date() - @guideOpenTime, 'Intro Guide Time', @levelID, @levelID, 100
|
||||||
|
@onLevelStarted()
|
||||||
|
Backbone.Mediator.subscribeOnce 'modal-opened', onGuideOpened, @
|
||||||
|
Backbone.Mediator.subscribeOnce 'modal-closed', onGuideClosed, @
|
||||||
return true
|
return true
|
||||||
|
|
||||||
getRenderData: ->
|
getRenderData: ->
|
||||||
|
|
Loading…
Reference in a new issue