From: Joris van Zundert Date: Fri, 31 Aug 2012 22:11:03 +0000 (+0200) Subject: Fixes and styling for upload error handling. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb9838ec3810febc38481cc31415780f79bf8a4f;p=scpubgit%2Fstemmatology.git Fixes and styling for upload error handling. --- diff --git a/stemmaweb/root/css/style.css b/stemmaweb/root/css/style.css index ed3b262..0717f8a 100644 --- a/stemmaweb/root/css/style.css +++ b/stemmaweb/root/css/style.css @@ -158,3 +158,7 @@ div.button:hover span { top: 10px; margin-bottom: 24px; } +.error { + font-weight: bold; + color: #ff3333; +} diff --git a/stemmaweb/root/js/uploader.js b/stemmaweb/root/js/uploader.js index 102b9f1..7fd5fe0 100644 --- a/stemmaweb/root/js/uploader.js +++ b/stemmaweb/root/js/uploader.js @@ -69,6 +69,11 @@ function create_uploader(upload_url) { $('').attr('class', 'error').append( result.error ) ); } }); + + uploader.bind('Error', function(up, err) { + console.log( 'echt wel' ); + console.log( err ); + }); uploader.init(); diff --git a/stemmaweb/root/src/index.tt b/stemmaweb/root/src/index.tt index 539ab3b..5c8c239 100644 --- a/stemmaweb/root/src/index.tt +++ b/stemmaweb/root/src/index.tt @@ -23,6 +23,7 @@ function refreshDirectory () { function start_upload_dialog() { if( typeof uploader != 'undefined' ){ uploader.destroy() }; $('#upload-collation-dialog').dialog('option', 'attach_uploader')(); + $('#upload_status').empty(); $('#upload_button').button('disable'); $('#upload-collation-dialog').dialog('open'); }