Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Trigger download on file click.

  • Loading branch information...
commit c0976dd3faca7269444680c02fae17a49e9c9d8f 1 parent 7176b6a
Mike Leone authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  views/index.html.erb
View
3  views/index.html.erb
@@ -18,7 +18,7 @@
$(document).ready(function() {
initializeGoogleMap(lat, lon);
$('#file-browser').fileTree({ script: '/browse' }, function(file) {
- alert(file);
+ window.location = "/download?file=" + escape(file);
});
});
</script>
@@ -70,7 +70,6 @@
<a href="javascript:slideToggle('files')" class="slider"><h2>File Browser<span id="files-icon"> (+) </span></h2></a>
<div class="blue-bar"></div>
<div id="files" class='condensed'>
- Word.
<div id="file-browser"></div>
<div class="clear"></div>
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.