Change popup functions to not use events

This commit is contained in:
Piotr Sarnacki 2015-01-09 10:55:13 +01:00
parent 4d9d0f10d9
commit eb78d62adb

View File

@ -19,12 +19,12 @@ Travis.reopen
).property('controller.repo.slug')
actions:
statusImages: ->
statusImages: () ->
@popupCloseAll()
view = Travis.StatusImagesView.create(toolsView: this)
Travis.View.currentPopupView = view
view.appendTo($('body'))
event.stopPropagation()
return false
ReposEmptyView: Travis.View.extend
template: (->
@ -116,14 +116,14 @@ Travis.reopen
menu: ->
@popupCloseAll()
$('#tools .menu').toggleClass('display')
event.stopPropagation()
return false
regenerateKeyPopup: ->
if @get('canRegenerateKey')
@set('active', true)
@closeMenu()
@popup(event)
event.stopPropagation()
@popup('regenerate-key-popup')
return false
regenerateKey: ->
@popupCloseAll()
@ -227,13 +227,13 @@ Travis.reopen
codeClimatePopup: ->
@popupCloseAll()
@popup('code-climate')
event.stopPropagation() if event?
return false
removeLogPopup: ->
if @get('canRemoveLog')
@set('active', true)
@popup(event)
event.stopPropagation()
@popup('remove-log-popup')
return false
hasPermission: (->
if permissions = @get('currentUser.permissions')