From: Joris van Zundert Date: Wed, 19 Sep 2012 09:16:39 +0000 (+0200) Subject: Put pick file button back X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ab0d1218acaa11e308f261bc450e0c5ac4e6d135;p=scpubgit%2Fstemmaweb.git Put pick file button back --- diff --git a/root/css/style.css b/root/css/style.css index d221869..ef7034b 100644 --- a/root/css/style.css +++ b/root/css/style.css @@ -206,3 +206,18 @@ div.pager_left_button.greyed_out, div.pager_left_button.greyed_out:hover { 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 diff --git a/root/js/componentload.js b/root/js/componentload.js index 522c879..4c17616 100644 --- a/root/js/componentload.js +++ b/root/js/componentload.js @@ -188,8 +188,10 @@ function display_error( jqXHR, el ) { function file_selected( e ) { if( e.files.length == 1 ) { $('#upload_button').button('enable'); + $('#new_file_name_container').html( '' + e.files[0].name + '' ); } else { $('#upload_button').button('disable'); + $('#new_file_name_container').html( '(Use \'pick file\' to select a tradition file to upload.)' ); } } @@ -438,6 +440,13 @@ $(document).ready( function() { upload_new(); } }, + pick_file: { + text: 'Pick File', + id: 'pick_file_button', + click: function() { + $('#new_file').click(); + } + }, Cancel: function() { $('#upload-collation-dialog').dialog('close'); } diff --git a/root/src/index.tt b/root/src/index.tt index cdac15f..ffc2642 100644 --- a/root/src/index.tt +++ b/root/src/index.tt @@ -141,8 +141,9 @@ var textOnLoad = "[% withtradition %]";
- -
+ + +
 (Use 'pick file' to select a tradition file to upload.)