mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-01 15:50:11 -04:00
Have clicking the link in InviteToClassroomModal copy it
This commit is contained in:
parent
f3be69799c
commit
3057df0230
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ module.exports = class InviteToClassroomModal extends ModalView
|
|||
|
||||
events:
|
||||
'click #send-invites-btn': 'onClickSendInvitesButton'
|
||||
'click #copy-url-btn': 'onClickCopyURLButton'
|
||||
'click #copy-url-btn, #join-url-input': 'copyURL'
|
||||
|
||||
initialize: (options) ->
|
||||
@classroom = options.classroom
|
||||
|
@ -34,7 +34,7 @@ module.exports = class InviteToClassroomModal extends ModalView
|
|||
@$('#invite-emails-success-alert').removeClass('hide')
|
||||
})
|
||||
|
||||
onClickCopyURLButton: ->
|
||||
copyURL: ->
|
||||
@$('#join-url-input').val(@joinURL).select()
|
||||
try
|
||||
document.execCommand('copy')
|
||||
|
|
Loading…
Add table
Reference in a new issue