refactor UnsubcribeView #3138 #3488

This commit is contained in:
duybkict 2016-05-18 09:55:22 +07:00 committed by Scott Erickson
parent 184be0bf65
commit 75c7d140d1
2 changed files with 4 additions and 6 deletions

View file

@ -5,7 +5,7 @@ block content
p
span(data-i18n="account.unsubscribe") Unsubscribing for
span
strong= email
strong= view.email
button.btn.btn-warning#unsubscribe-button(data-i18n="account.unsubscribe_button") Do it

View file

@ -6,14 +6,12 @@ module.exports = class UnsubscribeView extends RootView
id: 'unsubscribe-view'
template: template
initialize: ->
@email = @getQueryVariable 'email'
events:
'click #unsubscribe-button': 'onUnsubscribeButtonClicked'
getRenderData: ->
context = super()
context.email = @getQueryVariable 'email'
context
onUnsubscribeButtonClicked: ->
@$el.find('#unsubscribe-button').hide()
@$el.find('.progress').show()