From 1257e2bc3268a2e18080c89e99485307306d6064 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 24 Aug 2011 11:21:13 -0700 Subject: [PATCH] project draw is togglable Cmd-Ctrl-N --- HTML/index.html | 5 ++--- HTML/lib/atomicity.coffee | 5 ++++- HTML/lib/osx.coffee | 16 ++++++++++++++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/HTML/index.html b/HTML/index.html index b9fbf07db..634bd06b4 100644 --- a/HTML/index.html +++ b/HTML/index.html @@ -1,8 +1,7 @@ - - - + + diff --git a/HTML/lib/atomicity.coffee b/HTML/lib/atomicity.coffee index e8d8f0615..3c5613414 100644 --- a/HTML/lib/atomicity.coffee +++ b/HTML/lib/atomicity.coffee @@ -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() \ No newline at end of file + env.editor.navigateLeft() + +Chrome.bindKey 'toggleProjectDrawer', 'Command-Ctrl-N', (env) -> + Project.toggle() diff --git a/HTML/lib/osx.coffee b/HTML/lib/osx.coffee index e2ead31b4..73ead721d 100644 --- a/HTML/lib/osx.coffee +++ b/HTML/lib/osx.coffee @@ -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