mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
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:
parent
0f29e098cc
commit
464f06c031
2 changed files with 10 additions and 11 deletions
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue