diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2012-12-20 05:39:09 -0800 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2012-12-20 05:39:09 -0800 |
commit | bdc8d0098adfb0225bc4a67ab72344a203448e34 (patch) | |
tree | 62d413cc854296010c2330f219f7fb87d2df5eae /apps | |
parent | 31aa31795211dfee23377707c5152306d89fef4d (diff) | |
parent | 86d510ba281af02e171c6b157230ae2b440815e4 (diff) | |
download | nextcloud-server-bdc8d0098adfb0225bc4a67ab72344a203448e34.tar.gz nextcloud-server-bdc8d0098adfb0225bc4a67ab72344a203448e34.zip |
Merge pull request #869 from owncloud/files-styles
Files styles
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/css/files.css | 41 | ||||
-rw-r--r-- | apps/files/js/files.js | 18 | ||||
-rw-r--r-- | apps/files/templates/index.php | 2 |
3 files changed, 36 insertions, 25 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css index afc72916e09..99c39f0acdb 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -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 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; } + +/* 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; } diff --git a/apps/files/js/files.js b/apps/files/js/files.js index d924dab3d60..6a37d9e7f53 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -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'); } } diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index bd34c9a76d9..edf048c7e13 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -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') ?>')" |