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