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

remotes/origin/stable
Robin Appelman 14 years ago
parent 561c3a15f0
commit c4e7761ee8
  1. 3
      files/js/files.js
  2. 2
      files/templates/index.php

@ -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(),

@ -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>

Loading…
Cancel
Save