improve UI on new file

This commit is contained in:
Henrique Dias 2016-02-07 17:49:20 +00:00
parent b99d58a35b
commit 01c4a28dcc
4 changed files with 15 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -329,13 +329,17 @@ fieldset h3 {
overflow: hidden;
}
input[type="text"] {
input {
border: 0;
outline: 0;
background-color: transparent;
width: 100%;
}
input[type="submit"] {
width: auto;
}
fieldset input {
width: calc(100% - 1.57em);
margin: 0.5em 0;

View File

@ -89,6 +89,14 @@ $(document).on('page:browse', function() {
$('.new').data("opened", false);
});
$('#new-file-name').off('keypress').keypress(function(event) {
if (event.keyCode == 13) {
event.preventDefault();
$('#new-file-form').submit();
return false;
}
});
$('#new-file-form').submit(function(event) {
event.preventDefault();
var value = $('#new-file-name').val(),