Show thumbnail on rename

* does not hide thumbnail when rename is shown
* fixes layout for grid and list view
* fixes #11901

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2018-11-15 12:14:15 +01:00
parent 10c9b37461
commit 61f7eecc0b
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
2 changed files with 19 additions and 4 deletions

View File

@ -153,6 +153,7 @@
#filestable tbody tr.highlighted .name:focus, #filestable tbody tr.highlighted .name:focus,
#filestable tbody tr.selected, #filestable tbody tr.selected,
#filestable tbody tr.searchresult, #filestable tbody tr.searchresult,
#filestable tbody tr:hover .filename form,
table tr.mouseOver td { table tr.mouseOver td {
transition: background-color 0.3s ease; transition: background-color 0.3s ease;
background-color: var(--color-background-dark); background-color: var(--color-background-dark);
@ -332,10 +333,14 @@ table td.filename .thumbnail {
} }
table td.filename input.filename { table td.filename input.filename {
width: 70%; width: 70%;
margin-top: 9px;
margin-left: 48px; margin-left: 48px;
cursor: text; cursor: text;
} }
table td.filename form {
margin-top: -40px;
position: relative;
top: -6px;
}
table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:3px 8px 8px 3px; } table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:3px 8px 8px 3px; }
table td.filename .nametext, .modified, .column-last>span:first-child { float:left; padding:15px 0; } table td.filename .nametext, .modified, .column-last>span:first-child { float:left; padding:15px 0; }
@ -908,6 +913,16 @@ table.dragshadow td.size {
} }
} }
} }
form {
padding: 3px 14px;
border-radius: var(--border-radius);
input.filename {
width: 100%;
margin-left: 0;
}
}
} }
/* No space for filesize and date in grid view */ /* No space for filesize and date in grid view */

View File

@ -2390,7 +2390,7 @@
input = $('<input type="text" class="filename"/>').val(oldName); input = $('<input type="text" class="filename"/>').val(oldName);
form = $('<form></form>'); form = $('<form></form>');
form.append(input); form.append(input);
td.children('a.name').hide(); td.children('a.name').children(':not(.thumbnail-wrapper)').hide();
td.append(form); td.append(form);
input.focus(); input.focus();
//preselect input //preselect input
@ -2418,7 +2418,7 @@
input.tooltip('hide'); input.tooltip('hide');
tr.data('renaming',false); tr.data('renaming',false);
form.remove(); form.remove();
td.children('a.name').show(); td.children('a.name').children(':not(.thumbnail-wrapper)').show();
} }
function updateInList(fileInfo) { function updateInList(fileInfo) {
@ -2449,7 +2449,7 @@
basename = newName.substr(0, newName.lastIndexOf('.')); basename = newName.substr(0, newName.lastIndexOf('.'));
} }
td.find('a.name span.nametext').text(basename); td.find('a.name span.nametext').text(basename);
td.children('a.name').show(); td.children('a.name').children(':not(.thumbnail-wrapper)').show();
var path = tr.attr('data-path') || self.getCurrentDirectory(); var path = tr.attr('data-path') || self.getCurrentDirectory();
self.filesClient.move(OC.joinPaths(path, oldName), OC.joinPaths(path, newName)) self.filesClient.move(OC.joinPaths(path, oldName), OC.joinPaths(path, newName))