This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
showing files in cwd
- Loading branch information
Corey Johnson
committed
Aug 24, 2011
1 parent
fdcdcde
commit 06a46b1
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |