Fixes and styling for upload error handling.
Joris van Zundert [Fri, 31 Aug 2012 22:11:03 +0000 (00:11 +0200)]
root/css/style.css
root/js/uploader.js
root/src/index.tt

index ed3b262..0717f8a 100644 (file)
@@ -158,3 +158,7 @@ div.button:hover span {
     top: 10px;
     margin-bottom: 24px;
 }
+.error {
+    font-weight: bold;
+    color: #ff3333;
+}
index 102b9f1..7fd5fe0 100644 (file)
@@ -69,6 +69,11 @@ function create_uploader(upload_url) {
                                $('<span>').attr('class', 'error').append( result.error ) );
                }
     });
+    uploader.bind('Error', function(up, err) {
+        console.log( 'echt wel' );
+        console.log( err );
+    });
             
     uploader.init();
 
index 539ab3b..5c8c239 100644 (file)
@@ -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');
 }