file upload preparations

This commit is contained in:
Marc Wäckerlin
2015-06-30 14:09:05 +00:00
parent 0758a9d217
commit 2c2872a452
2 changed files with 20 additions and 0 deletions

View File

@@ -1,6 +1,12 @@
<form id="chat" autocomplete="off" onsubmit="sendmessage(this.elements['recv'].value, this.elements['msg'].value)">
<input placeholder="receiver" autocomplete="off" type="text" id="recv" oninput="checkpartner(this.value)" />
<input placeholder="message" autocomplete="off" type="text" id="msg"/>
<label class="icon" for="file" style="flex-grow: 0"><img style="width: 2em; height: 2em" src="attachment.svg"/></label>
<input class="icon" autocomplete="off" type="file" id="file" style="display:none"/>
<input type="submit" id="send" disabled/>
</form>
<div id="msgs"></div>
<script>
$("#file").change(function(evt){fileupload(evt)});
if (!window.FileReader) $("#file").hide(); // not supported by browser
</script>