// Get the first hasgh, remove the # character
var hash = window.location.hash.substring(1);
if (hash === 'add-note'){
-
$('#add-note-form').show();
- $('#file-uploader').show();
$('div.upload-status').hide();
+ $('#add-note-btn').hide();
}
}
$('#add-note-btn').click(function(){
+ // hide the button added by qq
+ $('#file-uploader').hide();
// show the add note form
// TODO: rewrite to .show the form with a slide transition
$('#add-note-form').show();
//var csrf_token = "{{ csrf_token }}";
</script>
- <div id=file-uploader style="display:none"></div>
+
<form id=add-note method="POST">
{% csrf_token %}
<div class="row">
<legend><span id=add-note-status>Uploading</span> <span id=filename>note</span>...</legend>
<div class=progress> <div id="progress-fill"></div> </div>
</div>
+ <div id=file-uploader class="four columns offset-by-one">
+ <!-- the upload button gets attached here -->
+ </div>
<div class="one columns offset-by-five end">
<i class="icon-remove-circle"></i>
</div>