Merge pull request #869 from owncloud/files-styles

Files styles
This commit is contained in:
Jan-Christoph Borchardt 2012-12-20 05:39:09 -08:00
commit bdc8d0098a
4 changed files with 37 additions and 28 deletions

View File

@ -12,16 +12,16 @@
#new.active { border-bottom-left-radius:0; border-bottom-right-radius:0; border-bottom:none; }
#new>a { padding:.5em 1.2em .3em; }
#new>ul {
display:none; position:fixed; min-width:7em; z-index:-1;
padding:.5em; margin-top:0.075em; margin-left:-.5em;
display:none; position:fixed; min-width:7em; z-index:10;
padding:.5em; padding-bottom:0; margin-top:.075em; margin-left:-.5em;
text-align:left;
background:#f8f8f8; border:1px solid #ddd;
background:#f8f8f8; border:1px solid #ddd; border-radius:10px; border-top-left-radius:0;
box-shadow:0 2px 7px rgba(170,170,170,.4);
}
#new>ul>li { height:20px; margin:.3em; padding-left:2em; padding-bottom:0.1em;
background-repeat:no-repeat; cursor:pointer; }
#new>ul>li>p { cursor:pointer; }
#new>ul>li>input { padding:0.3em; margin:-0.3em; }
#new .popup { border-top-left-radius:0; z-index:10; }
#upload {
height:27px; padding:0; margin-left:0.2em; overflow:hidden;
@ -64,11 +64,17 @@ tr:hover span.extension { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Op
table tr.mouseOver td { background-color:#eee; }
table th { height:2em; padding:0 .5em; color:#999; }
table th .name { float:left; margin-left:.5em; }
table th.multiselect { background:#ddd; color:#000; font-weight:bold; }
table th, table td { border-bottom:1px solid #ddd; text-align:left; font-weight:normal; }
table td { border-bottom:1px solid #eee; font-style:normal; background-position:1em .5em; background-repeat:no-repeat; }
table th#headerSize, table td.filesize { width:3em; padding:0 1em; text-align:right; }
table th#headerDate, table td.date { width:11em; padding:0 .1em 0 1em; text-align:left; }
table th#headerName { width:100em; /* not really sure why this works better than 100% … table styling */ }
table th#headerSize, table td.filesize { min-width:3em; padding:0 1em; text-align:right; }
table th#headerDate, table td.date { min-width:11em; padding:0 .1em 0 1em; text-align:left; }
/* Multiselect bar */
table.multiselect { top:63px; }
table.multiselect thead { position:fixed; top:82px; z-index:1; }
table.multiselect thead th { background:rgba(230,230,230,.8); color:#000; font-weight:bold; border-bottom:0; }
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; }
@ -79,15 +85,28 @@ table td.filename .nametext, .uploadtext, .modified { float:left; padding:.3em 0
table td.filename .nametext { overflow:hidden; text-overflow:ellipsis; }
table td.filename .uploadtext { font-weight:normal; margin-left:.5em; }
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 doesnt work in FF width:2.8em; height:2.4em;*/ -webkit-transition:opacity 200ms; -moz-transition:opacity 200ms; -o-transition:opacity 200ms; transition:opacity 200ms; }
#fileList tr td.filename>input[type="checkbox"]:hover:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter:alpha(opacity=80); opacity:.8; }
#fileList tr td.filename>input[type="checkbox"]:checked:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; }
#fileList tr td.filename { -webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms; position:relative; }
#fileList tr td.filename {
position:relative; width:100%;
-webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms;
}
#select_all { float:left; margin:.3em 0.6em 0 .5em; }
#uploadsize-message,#delete-confirm { display:none; }
.fileactions { position:relative; top:.3em; font-size:.8em; float:right; }
/* File actions */
.fileactions {
position:absolute; top:.6em; right:0;
font-size:.8em;
}
#fileList .name { position:relative; /* Firefox needs to explicitly have this default set … */ }
#fileList tr:hover .fileactions { /* background to distinguish when overlaying with file names */
background:rgba(248,248,248,.9); box-shadow:-5px 0 7px rgba(248,248,248,.9);
}
#fileList tr.selected:hover .fileactions { /* slightly darker color for selected rows */
background:rgba(238,238,238,.9); box-shadow:-5px 0 7px rgba(238,238,238,.9);
}
#fileList .fileactions a.action img { position:relative; top:.2em; }
#fileList a.action { display:inline; margin:-.5em 0; padding:1em .5em 1em .5em !important; }
a.action.delete { float:right; }

View File

@ -776,22 +776,14 @@ function procesSelection(){
var selected=getSelectedFiles();
var selectedFiles=selected.filter(function(el){return el.type=='file'});
var selectedFolders=selected.filter(function(el){return el.type=='dir'});
if(selectedFiles.length==0 && selectedFolders.length==0){
if(selectedFiles.length==0 && selectedFolders.length==0) {
$('#headerName>span.name').text(t('files','Name'));
$('#headerSize').text(t('files','Size'));
$('#modified').text(t('files','Modified'));
$('th').removeClass('multiselect');
$('table').removeClass('multiselect');
$('.selectedActions').hide();
$('thead').removeClass('fixed');
$('#headerName').css('width','auto');
$('#headerSize').css('width','auto');
$('#headerDate').css('width','auto');
$('table').css('padding-top','0');
}else{
var width={name:$('#headerName').css('width'),size:$('#headerSize').css('width'),date:$('#headerDate').css('width')};
$('#headerName').css('width',width.name);
$('#headerSize').css('width',width.size);
$('#headerDate').css('width',width.date);
}
else {
$('.selectedActions').show();
var totalSize=0;
for(var i=0;i<selectedFiles.length;i++){
@ -823,7 +815,7 @@ function procesSelection(){
}
$('#headerName>span.name').text(selection);
$('#modified').text('');
$('th').addClass('multiselect');
$('table').addClass('multiselect');
}
}

View File

@ -5,7 +5,7 @@
<div class="actions <?php if (isset($_['files']) and count($_['files'])==0):?>emptyfolder<?php endif; ?>">
<div id="new" class="button">
<a><?php echo $l->t('New');?></a>
<ul class="popup popupTop">
<ul>
<li style="background-image:url('<?php echo OCP\mimetype_icon('text/plain') ?>')"
data-type='file'><p><?php echo $l->t('Text file');?></p></li>
<li style="background-image:url('<?php echo OCP\mimetype_icon('dir') ?>')"

View File

@ -193,13 +193,11 @@ fieldset.warning legend { color:#b94a48 !important; }
#notification { z-index:101; background-color:#fc4; border:0; padding:0 .7em .3em; display:none; position:fixed; left:50%; top:0; -moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; -moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
#notification span { cursor:pointer; font-weight:bold; margin-left:1em; }
tr .action, .selectedActions a { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; -webkit-transition:opacity 200ms; -moz-transition:opacity 200ms; -o-transition:opacity 200ms; transition:opacity 200ms; }
tr .action, .selectedActions a { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; }
tr:hover .action, .selectedActions a { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter:alpha(opacity=50); opacity:.5; }
tr .action { width:16px; height:16px; }
.header-action { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter:alpha(opacity=80); opacity:.8; }
tr:hover .action:hover, .selectedActions a:hover, .header-action:hover { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; }
table:not(.nostyle) tr { -webkit-transition:background-color 200ms; -moz-transition:background-color 200ms; -o-transition:background-color 200ms; transition:background-color 200ms; }
tbody tr:hover, tr:active { background-color:#f8f8f8; }
#body-settings .personalblock, #body-settings .helpblock { padding:.5em 1em; margin:1em; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; }