This commit is contained in:
Corey Johnson
2011-10-26 11:10:52 -07:00
parent 80d6222809
commit e64a0e64a1
16 changed files with 223 additions and 364 deletions

View File

@@ -1,44 +0,0 @@
$ = require 'jquery'
module.exports =
class Pane
position: null
html: null
showing: false
constructor: (@window) ->
add: ->
verticalDiv = $('#app-vertical')
horizontalDiv = $('#app-horizontal')
el = $ "<div>"
el.addClass "pane " + @position
el.append @html
switch @position
when 'main'
$('.main').replaceWith el
when 'top'
verticalDiv.prepend el
when 'left'
horizontalDiv.prepend el
when 'bottom'
verticalDiv.append el
when 'right'
horizontalDiv.append el
else
throw "I DON'T KNOW HOW TO DEAL WITH #{@position}"
toggle: ->
if @showing
@html.parent().detach()
else
@add this
@showing = not @showing
# Override these in your subclass
initialize: ->