Permalink
Browse files

showing files in cwd

  • Loading branch information...
Corey Johnson
Corey Johnson committed Aug 24, 2011
1 parent fdcdcde commit 06a46b1cb8a3420bf0cb77c70000d2d1e0c00d92
Showing with 37 additions and 0 deletions.
  1. +11 −0 HTML/lib/project.coffee
  2. +26 −0 HTML/project.html
View
@@ -0,0 +1,11 @@
$ ->
dir = OSX.NSFileManager.defaultManager.currentDirectoryPath
$('#cwd').text(dir)
files = Dir.list(dir)
files = _.map files, (file) ->
listItems = _.map files, (file) ->
file = file.replace(dir, "")
"<li>#{file}</li>"
$('#files').append(listItems.join('\n'))
View
@@ -0,0 +1,26 @@
<style>
ul {
margin: 0;
padding: 0;
}
li {
list-style-type: none;
}
li:hover {
background-color: grey;
}
</style>
<script src="ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="underscore.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="coffee-script.js" type="text/javascript" charset="utf-8"></script>
<script src="osx.js" type="text/javascript" charset="utf-8"></script>
<script src="project.js" type="text/javascript" charset="utf-8"></script>
<div id='cwd'></div>
<ul id='files'></ul>

0 comments on commit 06a46b1

Please sign in to comment.