summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-10-18 14:16:59 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2012-10-18 14:19:34 +0200
commite307bf31c801b554a44afddd37e8e6f425fab567 (patch)
tree75688600464bbb0b69e93b3490d5b8a65a8fc349
parenta7d8519550db924a483b74408422ccccb266cb45 (diff)
downloadnextcloud-server-e307bf31c801b554a44afddd37e8e6f425fab567.tar.gz
nextcloud-server-e307bf31c801b554a44afddd37e8e6f425fab567.zip
fix oc-605
-rw-r--r--apps/files/css/files.css4
-rw-r--r--apps/files/js/filelist.js16
2 files changed, 11 insertions, 9 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css
index 14482c5edb5..57c7eb4d9a2 100644
--- a/apps/files/css/files.css
+++ b/apps/files/css/files.css
@@ -58,13 +58,13 @@ table th#headerDate, table td.date { width:11em; padding:0 .1em 0 1em; text-alig
table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; }
table td.filename a.name { display:block; height:1.5em; vertical-align:middle; margin-left:3em; }
table tr[data-type="dir"] td.filename a.name span.nametext {font-weight:bold; }
-table td.filename a.name input, table td.filename a.name form { width:100%; cursor:text; }
+table td.filename input.filename { width:100%; cursor:text; }
table td.filename a, table td.login, table td.logout, table td.download, table td.upload, table td.create, table td.delete { padding:.2em .5em .5em 0; }
table td.filename .nametext, .uploadtext, .modified { float:left; padding:.3em 0; }
// TODO fix usability bug (accidental file/folder selection)
table td.filename .nametext { width:40em; overflow:hidden; text-overflow:ellipsis; }
table td.filename .uploadtext { font-weight:normal; margin-left:.5em; }
-table td.filename form { float:left; font-size:.85em; }
+table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; }
table thead.fixed tr{ position:fixed; top:6.5em; z-index:49; -moz-box-shadow:0 -3px 7px #ddd; -webkit-box-shadow:0 -3px 7px #ddd; box-shadow:0 -3px 7px #ddd; }
table thead.fixed { height:2em; }
#fileList tr td.filename>input[type=checkbox]:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ -webkit-transition:opacity 200ms; -moz-transition:opacity 200ms; -o-transition:opacity 200ms; transition:opacity 200ms; }
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 6cddea8492c..6b49f622668 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -140,8 +140,8 @@ var FileList={
input=$('<input class="filename"></input>').val(name);
form=$('<form></form>');
form.append(input);
- td.children('a.name').text('');
- td.children('a.name').append(form);
+ td.children('a.name').hide();
+ td.append(form);
input.focus();
form.submit(function(event){
event.stopPropagation();
@@ -169,13 +169,15 @@ var FileList={
} else {
var basename=newname;
}
- td.children('a.name').empty();
- var span=$('<span class="nametext"></span>');
- span.text(basename);
- td.children('a.name').append(span);
+ td.find('a.name span.nametext').text(basename);
if (newname.indexOf('.') > 0 && tr.data('type') != 'dir') {
- span.append($('<span class="extension">'+newname.substr(newname.lastIndexOf('.'))+'</span>'));
+ if (td.find('a.name span.extension').length == 0 ) {
+ td.find('a.name span.nametext').append('<span class="extension"></span>');
+ }
+ td.find('a.name span.extension').text(newname.substr(newname.lastIndexOf('.')));
}
+ form.remove();
+ td.children('a.name').show();
return false;
});
input.click(function(event){