Browse Source

[ui] reduce upload file action to one button

encrypt 4 years ago
parent
commit
64a37fa184
2 changed files with 3 additions and 3 deletions
  1. 2 2
      client/index.html
  2. 1 1
      client/main.js

+ 2 - 2
client/index.html

@@ -16,8 +16,8 @@
       <div id="upload">
 	<div id="upload-buttons">
 	  <input id="file-selector" type="file" name="file"/>
-	  <label class="stylish-button" for="file-selector">Select file</label>
-	  <input class="stylish-button" id="upload-button" type="button" name="upload" value="Upload"/>
+	  <label class="stylish-button" for="file-selector">Upload file</label>
+	  <!-- <input class="stylish-button" id="upload-button" type="button" name="upload" value="Upload"/> -->
 	</div>
 	<progress id="progress-bar"></progress>
       </div>

+ 1 - 1
client/main.js

@@ -172,7 +172,7 @@ $(function(){
 	$("#progress-bar").hide();
 	Uploader.roomId = roomId;
 	CryptoUtils.initialize(key).then(function(){
-	    $("#upload-button").on('click', function(){
+	    $("#file-selector").on('input', function(){
 		CryptoUploader.uploadFile();
 	    });
 	    CryptoUploader.showRoomContent();