From e9a2739bb94a63e7de4379ff8bbaa98efc2f102f Mon Sep 17 00:00:00 2001 From: DAIXiao Date: Wed, 18 Apr 2018 11:48:26 +0800 Subject: [PATCH] Fix link bugs. Fix the appearance time of dialog bugs. --- static/js/upload_file.js | 14 ++++++++------ views/upload_file.html | 1 - views/vid_listing.ejs | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/static/js/upload_file.js b/static/js/upload_file.js index ce6a807..a4f5ffa 100644 --- a/static/js/upload_file.js +++ b/static/js/upload_file.js @@ -1,7 +1,4 @@ -function segmentation_modal(){ - $('#uploaded_modal').modal({ - backdrop:'static' - }) +function web_socket_process(){ let websocket = io.connect() let $segmentation_progress = $('#segmentation_progress') websocket.on('push_from_server',data=>{ @@ -47,13 +44,18 @@ let uploader = new plupload.Uploader({ uploader.start() }, + UploadFile:function(uploader,file){ + $('#uploaded_modal').modal({ + backdrop:'static' + }) + }, + UploadProgress: function(up, file){ - // console.log('The percentage information: ', file.percent) $uploading_progress.width(`${file.percent}%`) }, UploadComplete: function(up, files){ - segmentation_modal() + web_socket_process() }, Error: function(up, err) { diff --git a/views/upload_file.html b/views/upload_file.html index 4510993..213e7b9 100644 --- a/views/upload_file.html +++ b/views/upload_file.html @@ -45,7 +45,6 @@ diff --git a/views/vid_listing.ejs b/views/vid_listing.ejs index 6e3358b..412495e 100644 --- a/views/vid_listing.ejs +++ b/views/vid_listing.ejs @@ -42,7 +42,7 @@ Upload Video