font-weight: bold;
color: #ff3333;
}
+#new_file {
+ position: absolute;
+ top: -50px;
+ opacity: 0.0;
+}
+#new_file_name {
+ font-weight: bold;
+}
+#new_name, #new_lang, #new_public, #new_file_name_container {
+ margin-bottom: 6px;
+}
+#new_file_label {
+ float: left;
+ padding-right: 8px;
+}
\ No newline at end of file
function file_selected( e ) {
if( e.files.length == 1 ) {
$('#upload_button').button('enable');
+ $('#new_file_name_container').html( '<span id="new_file_name">' + e.files[0].name + '</span>' );
} else {
$('#upload_button').button('disable');
+ $('#new_file_name_container').html( '(Use \'pick file\' to select a tradition file to upload.)' );
}
}
upload_new();
}
},
+ pick_file: {
+ text: 'Pick File',
+ id: 'pick_file_button',
+ click: function() {
+ $('#new_file').click();
+ }
+ },
Cancel: function() {
$('#upload-collation-dialog').dialog('close');
}
<!-- File upload dialog box -->
<div id="upload-collation-dialog" title="Upload a collation">
<div id="upload_container">
- <label for="new_file">Collation file: </label>
- <input id="new_file" name="file" type="file" onchange="file_selected(this)"><br/>
+ <input id="new_file" name="file" type="file" onchange="file_selected(this)">
+ <label for="new_file" id="new_file_label">Collation file: </label>
+ <div id="new_file_name_container" onclick="$('#new_file').click();"> (Use 'pick file' to select a tradition file to upload.)</div>
<form id="new_tradition">
<label for="new_name">Name of this text / tradition: </label>
<input id="new_name" type="text" name="name" size="40"/><br/>