From 5107ccbedaaaec0d00bfd7b650589ee4a0565895 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 20 Dec 2012 10:53:50 +0100 Subject: [PATCH] move CSS from JS to CSS --- apps/files/css/files.css | 10 +++++++--- apps/files/js/files.js | 13 +++---------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/apps/files/css/files.css b/apps/files/css/files.css index ccf33c8493b..dbddaf695fb 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -66,8 +66,9 @@ table th { height:2em; padding:0 .5em; color:#999; } table th .name { float:left; margin-left:.5em; } 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:100%; } +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; } @@ -87,7 +88,10 @@ table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; } #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; } #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; } diff --git a/apps/files/js/files.js b/apps/files/js/files.js index feffa10c9f6..5083a0dca73 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -770,21 +770,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')); $('table').removeClass('multiselect'); $('.selectedActions').hide(); - $('#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