Fix remove log button popup

This commit is contained in:
Piotr Sarnacki 2015-02-24 13:51:51 +01:00 committed by Lisa Passing
parent e4a58787f4
commit 203302bd63
3 changed files with 5 additions and 11 deletions

View File

@ -1,7 +1,7 @@
<section id="log-container" class="log"> <section id="log-container" class="log">
<menu class="log-header"> <menu class="log-header">
{{#if view.canRemoveLog}} {{#if view.canRemoveLog}}
<button class="button button--grey" {{action "removeLogPopup" target=view}}><span class="icon icon--removeLog"></span> Remove Log</button> <button class="button button--grey open-popup" {{action "removeLogPopup" target=view}}><span class="icon icon--removeLog"></span> Remove Log</button>
{{/if}} {{/if}}
<a class="button button--grey" {{bind-attr href="view.plainTextLogUrl"}}><span class="icon icon--downloadLog"></span> Download Log</a> <a class="button button--grey" {{bind-attr href="view.plainTextLogUrl"}}><span class="icon icon--downloadLog"></span> Download Log</a>
</menu> </menu>

View File

@ -135,10 +135,10 @@ View = BasicView.extend
Travis.flash(error: 'An error occured when removing the log') Travis.flash(error: 'An error occured when removing the log')
removeLogPopup: -> removeLogPopup: ->
# if @get('canRemoveLog') if @get('canRemoveLog')
@set('active', true) @set('active', true)
@popup('remove-log-popup') @popup('remove-log-popup')
return false return false
noop: -> # TODO required? noop: -> # TODO required?

View File

@ -68,12 +68,6 @@ View = BasicView.extend
@popup('code-climate') @popup('code-climate')
return false return false
removeLogPopup: ->
if @get('canRemoveLog')
@set('active', true)
@popup('remove-log-popup')
return false
hasPermission: (-> hasPermission: (->
if permissions = @get('currentUser.permissions') if permissions = @get('currentUser.permissions')
permissions.contains parseInt(@get('repo.id')) permissions.contains parseInt(@get('repo.id'))