RootView handles opening directories

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-01-04 10:51:41 -08:00
parent 9fde405ebe
commit 236ea5e906
3 changed files with 42 additions and 15 deletions

View File

@@ -21,8 +21,14 @@ class RootView extends Template
@bindKey 'meta+w', => window.close()
@bindKey 'meta+t', => @toggleFileFinder()
@project = new Project(fs.directory(url)) if url
@editor.open url
if not url
# not sure what to do
else if fs.isDirectory url
@project = new Project url
@editor.open()
else
@project = new Project(fs.directory(url))
@editor.open url
addPane: (view) ->
pane = $('<div class="pane">')