project draw is togglable Cmd-Ctrl-N

This commit is contained in:
Corey Johnson 2011-08-24 11:21:13 -07:00
parent 06a46b1cb8
commit 1257e2bc32
3 changed files with 22 additions and 4 deletions

View File

@ -1,8 +1,7 @@
<html>
<head>
</head>
<frameset cols="0%,100%" frameborder=no framespacing=0 border=0>
<frame src="project.html">
<frame src="tabs.html">
<frameset cols="*" frameborder=no framespacing=0 border=0>
<frame src="tabs.html" />
</frameset>
</html>

View File

@ -124,4 +124,7 @@ Chrome.bindKey 'fullscreen', 'Command-Shift-Return', (env) ->
# this should go in coffee.coffee or something
Chrome.bindKey 'consolelog', 'Ctrl-L', (env) ->
env.editor.insert 'console.log ""'
env.editor.navigateLeft()
env.editor.navigateLeft()
Chrome.bindKey 'toggleProjectDrawer', 'Command-Ctrl-N', (env) ->
Project.toggle()

View File

@ -133,6 +133,22 @@ Process =
env: ->
OSX.NSProcess.processInfo.environment()
# Need to rename and move stuff like this
Project =
toggle: ->
frameset = top.document.getElementsByTagName("frameset")[0]
if @showing
frameset.removeChild(frameset.firstChild)
frameset.setAttribute('cols', '*')
else
frame = document.createElement("frame")
frame.src = 'project.html'
frameset.insertBefore(frame, frameset.firstChild)
frameset.setAttribute('cols', '25%, *')
@showing = not @showing
this.Chrome = Chrome
this.File = File
this.Dir = Dir
this.Project = Project