Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (68 sloc) 2.06 KB
<!doctype html>
<html>
<head>
<title>Scrappy</title>
<link rel="stylesheet" href="styles/bootstrap.min.css" />
<link rel="stylesheet" href="styles/app.css" />
<script src="lib/jquery.js"></script>
<script src="lib/filer.min.js"></script>
<script src="lib/knockout-2.0.0.js"></script>
<script src="controller.js"></script>
<script>
$(document).ready(function() {
$('input[type="file"]').change(function(e) {
var file = e.target.files[0];
Scrappy.save(file, file.name, file.type);
});
$("#save").click(function() {
Scrappy.startSave();
});
$("#edit").click(function() {
Scrappy.startEdit();
});
$("#share").click(function() {
Scrappy.startShare();
});
$("#pick").click(function() {
Scrappy.startPick(function(data) {
var filename = "";
// try and work out the file name.
Scrappy.save(data);
});
});
});
</script>
</head>
<body>
<header id="titlebar">
<p>Scrappy is a file studio that lets you collect files from around the web and do stuff with them.</p>
</header>
<div id="filelist">
<div class="padder">
<h1>Scraps</h1>
<input type="file" class="btn" value="Add" />
<button class="btn primary" id="pick">Pick</button>
<div id="files">
<ul data-bind="foreach: files">
<li>
<a data-bind="text: name, attr: { 'data-path': fullPath }, click: $parent.selectFile" href="#" class="file"></a>
</li>
</ul>
</div>
</div>
</div>
<div id="view">
<header>
<button class="btn" id="edit">Edit</button>
<button class="btn" id="save">Save</button>
<button class="btn" id="share">Share</button>
<button class="btn danger">Delete</button>
</header>
<div>
<img id="viewer" />
<audio id="audio"></audio>
<video id="video"></video>
</div>
</div>
</body>
</html>