mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-29 18:45:48 -05:00
25 lines
695 B
CoffeeScript
25 lines
695 B
CoffeeScript
CocoView = require 'views/core/CocoView'
|
|
template = require 'templates/play/menu/save-load-view'
|
|
{me} = require 'core/auth'
|
|
ThangType = require 'models/ThangType'
|
|
|
|
module.exports = class SaveLoadView extends CocoView
|
|
id: 'save-load-view'
|
|
className: 'tab-pane'
|
|
template: template
|
|
|
|
events:
|
|
'change #save-granularity-toggle input': 'onSaveGranularityChanged'
|
|
|
|
getRenderData: (context={}) ->
|
|
context = super(context)
|
|
context
|
|
|
|
afterRender: ->
|
|
super()
|
|
|
|
onSaveGranularityChanged: (e) ->
|
|
@playSound 'menu-button-click'
|
|
toShow = $(e.target).val()
|
|
@$el.find('.save-list, .save-pane').hide()
|
|
@$el.find('.save-list.' + toShow + ', .save-pane.' + toShow).show()
|