make new folder dialog behave more like a regular form, so you can press enter to create the folder

This commit is contained in:
Robin Appelman 2011-06-17 14:17:53 +02:00
parent 561c3a15f0
commit c4e7761ee8
2 changed files with 3 additions and 2 deletions

View File

@ -51,7 +51,8 @@ $(document).ready(function() {
}
});
$('#file_newfolder_submit').click(function() {
$('#file_newfolder_form').submit(function(event) {
event.preventDefault();
$.ajax({
url: 'ajax/newfolder.php',
data: "dir="+$('#dir').val()+"&foldername="+$('#file_newfolder_name').val(),

View File

@ -13,7 +13,7 @@
</form>
<form id="file_newfolder_form">
<input type="text" class="prettybutton" name="file_newfolder_name" id="file_newfolder_name" value="New Folder" />&nbsp;
<input class="prettybutton" type="button" id="file_newfolder_submit" name="file_newfolder_submit" value="OK" />
<input class="prettybutton" type="submit" id="file_newfolder_submit" name="file_newfolder_submit" value="OK" />
</form>
<a href="" title="" class="download">Download</a>
<a href="" title="" class="share">Share</a>