Turned off saving automatically when you toggle subscriptions in the AccountSettingsView, as it was triggering the PlayAccountModal to save and close.

This commit is contained in:
Scott Erickson 2014-11-25 13:32:43 -08:00
parent 0f29e098cc
commit 464f06c031
2 changed files with 10 additions and 11 deletions

View file

@ -43,7 +43,6 @@ module.exports = class AccountSettingsView extends CocoView
toggleEmailSubscriptions: =>
subs = @getSubscriptions()
$('#email-panel input[type="checkbox"]', @$el).prop('checked', not _.any(_.values(subs))).addClass('changed')
@save()
checkNameExists: =>
name = $('#name', @$el).val()

View file

@ -35,19 +35,19 @@ module.exports = class PlayAccountModal extends ModalView
onInputChanged: ->
@$el.find('#save-button')
.text($.i18n.t('common.save', defaultValue: 'Save'))
.addClass 'btn-info'
.removeClass 'disabled btn-danger'
.removeAttr 'disabled'
.text($.i18n.t('common.save', defaultValue: 'Save'))
.addClass 'btn-info'
.removeClass 'disabled btn-danger'
.removeAttr 'disabled'
onUserSaveBegan: ->
@$el.find('#save-button')
.text($.i18n.t('common.saving', defaultValue: 'Saving...'))
.removeClass('btn-danger')
.addClass('btn-success').show()
.text($.i18n.t('common.saving', defaultValue: 'Saving...'))
.removeClass('btn-danger')
.addClass('btn-success').show()
onUserSaveError: ->
@$el.find('#save-button')
.text($.i18n.t('account_settings.error_saving', defaultValue: 'Error Saving'))
.removeClass('btn-success')
.addClass('btn-danger', 500)
.text($.i18n.t('account_settings.error_saving', defaultValue: 'Error Saving'))
.removeClass('btn-success')
.addClass('btn-danger', 500)