improve UI on new file

pull/48/head
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; overflow: hidden;
} }
input[type="text"] { input {
border: 0; border: 0;
outline: 0; outline: 0;
background-color: transparent; background-color: transparent;
width: 100%; width: 100%;
} }
input[type="submit"] {
width: auto;
}
fieldset input { fieldset input {
width: calc(100% - 1.57em); width: calc(100% - 1.57em);
margin: 0.5em 0; margin: 0.5em 0;

View File

@ -89,6 +89,14 @@ $(document).on('page:browse', function() {
$('.new').data("opened", false); $('.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) { $('#new-file-form').submit(function(event) {
event.preventDefault(); event.preventDefault();
var value = $('#new-file-name').val(), var value = $('#new-file-name').val(),