remotes/origin/stable5
Jörn Friedrich Dreyer 12 years ago
parent a7d8519550
commit e307bf31c8
  1. 4
      apps/files/css/files.css
  2. 16
      apps/files/js/filelist.js

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

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

Loading…
Cancel
Save