2014-03-10 14:08:53 -04:00
|
|
|
VersionsView = require 'views/kinds/VersionsView'
|
|
|
|
ModalView = require 'views/kinds/ModalView'
|
2014-03-10 07:16:08 -04:00
|
|
|
template = require 'templates/editor/level/versions'
|
|
|
|
|
2014-03-10 14:08:53 -04:00
|
|
|
module.exports = class ModalVersionsView extends VersionsView
|
2014-03-10 07:16:08 -04:00
|
|
|
id: 'version-history-modal'
|
2014-03-10 14:08:53 -04:00
|
|
|
url: "/db/level/"
|
|
|
|
page: "level"
|
2014-03-10 07:16:08 -04:00
|
|
|
template: template
|
2014-03-10 15:06:36 -04:00
|
|
|
startsLoading: true
|
2014-03-10 07:16:08 -04:00
|
|
|
|
2014-03-10 14:08:53 -04:00
|
|
|
className: "modal fade"
|
|
|
|
closeButton: true
|
|
|
|
closesOnClickOutside: true
|
|
|
|
modalWidthPercent: null
|
|
|
|
|
|
|
|
shortcuts:
|
|
|
|
'esc': 'hide'
|
|
|
|
|
2014-03-10 07:16:08 -04:00
|
|
|
constructor: (options, @ID) ->
|
2014-03-10 14:08:53 -04:00
|
|
|
super options, ID, require 'models/Level'
|
|
|
|
_.extend @, ModalView
|
|
|
|
ModalView.prototype.constructor options
|
|
|
|
|
|
|
|
getRenderData: (context={}) ->
|
|
|
|
context = super(context)
|
|
|
|
context.closeButton = true
|
|
|
|
context
|
|
|
|
|
|
|
|
hide: ->
|
|
|
|
@$el.removeClass('fade').modal "hide"
|