2014-08-08 14:36:41 -04:00
|
|
|
CocoView = require 'views/kinds/CocoView'
|
|
|
|
template = require 'templates/game-menu/save-load-view'
|
|
|
|
{me} = require 'lib/auth'
|
|
|
|
ThangType = require 'models/ThangType'
|
|
|
|
|
|
|
|
module.exports = class SaveLoadView extends CocoView
|
|
|
|
id: 'save-load-view'
|
|
|
|
className: 'tab-pane'
|
|
|
|
template: template
|
|
|
|
|
2014-08-08 18:56:53 -04:00
|
|
|
events:
|
|
|
|
'change #save-granularity-toggle input': 'onSaveGranularityChanged'
|
|
|
|
|
2014-08-08 14:36:41 -04:00
|
|
|
getRenderData: (context={}) ->
|
|
|
|
context = super(context)
|
|
|
|
context
|
|
|
|
|
|
|
|
afterRender: ->
|
|
|
|
super()
|
2014-08-08 18:56:53 -04:00
|
|
|
|
|
|
|
onSaveGranularityChanged: (e) ->
|
2014-11-26 09:58:23 -05:00
|
|
|
@playSound 'menu-button-click'
|
2014-08-08 18:56:53 -04:00
|
|
|
toShow = $(e.target).val()
|
|
|
|
@$el.find('.save-list, .save-pane').hide()
|
|
|
|
@$el.find('.save-list.' + toShow + ', .save-pane.' + toShow).show()
|