summaryrefslogtreecommitdiffstats
path: root/apps/files/css
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-09-29 01:36:10 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-10-19 01:46:13 +0200
commitf392e78d5b525abbb04057b91c0adfba212c00c4 (patch)
treebd01ed1951dd3d6d9dd59ab3aa51040bc1dc6b9d /apps/files/css
parent6b8713e8b6f45f79ec7cffd150c7f0136d7fb5b9 (diff)
downloadnextcloud-server-f392e78d5b525abbb04057b91c0adfba212c00c4.tar.gz
nextcloud-server-f392e78d5b525abbb04057b91c0adfba212c00c4.zip
Move checkboxes to their own column
The selection column is not only a visual column, but also a real column of the file list table. Unlike other columns whose width is reduced in space constrained screens the selection column must stay the same so the tapping area is large enough to be easily usable The selection column does not appear in the search results table, so its contents have to be explicitly aligned with those of the main table based on whether the main table has a selection column or not (using the "has-selection" CSS class in the same way as the "has-favorite" CSS class was being used when there was a column for favorite actions). In the tests the ":visible" selector can no longer be used. That selector matches elements with a width or height that is greater than zero, but the dimensions calculated in the unit tests are not reliable; the width of the link was zero before these changes, and now moving the checkbox to its own column causes the height of the link to become zero too, so it no longer matches the ":visible" selector even if it is not hidden. As hidding and showing the link is based on its "display" CSS property its value is the one checked now. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files/css')
-rw-r--r--apps/files/css/files.scss41
-rw-r--r--apps/files/css/mobile.scss4
2 files changed, 11 insertions, 34 deletions
diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss
index 80a2b44ac11..65519ae2e16 100644
--- a/apps/files/css/files.scss
+++ b/apps/files/css/files.scss
@@ -438,46 +438,27 @@ table td.filename .uploadtext {
opacity: .5;
}
+table td.selection {
+ padding: 0;
+}
+
/* File checkboxes */
-#fileList tr td.filename>.selectCheckBox + label:before {
+#fileList tr td.selection>.selectCheckBox + label:before {
opacity: 0.3;
- position: absolute;
- bottom: 4px;
- right: 0;
- z-index: 10;
}
/* Show checkbox with full opacity when hovering, checked, or selected */
-#fileList tr:hover td.filename>.selectCheckBox + label:before,
-#fileList tr:focus td.filename>.selectCheckBox + label:before,
-#fileList tr td.filename>.selectCheckBox:checked + label:before,
-#fileList tr.selected td.filename>.selectCheckBox + label:before {
+#fileList tr:hover td.selection>.selectCheckBox + label:before,
+#fileList tr:focus td.selection>.selectCheckBox + label:before,
+#fileList tr td.selection>.selectCheckBox:checked + label:before,
+#fileList tr.selected td.selection>.selectCheckBox + label:before {
opacity: 1;
}
/* Use label to have bigger clickable size for checkbox */
-#fileList tr td.filename>.selectCheckBox + label,
-.select-all + label {
- background-position: 30px 30px;
- height: 50px;
- position: absolute;
- width: 50px;
- z-index: 5;
-}
-#fileList tr td.filename>.selectCheckBox {
- /* sometimes checkbox height is bigger (KDE/Qt), so setting to absolute
- * to prevent it to increase the height */
- position: absolute;
- z-index: 10;
-}
+#fileList tr td.selection>.selectCheckBox + label,
.select-all + label {
- top: 0;
-}
-.select-all + label:before {
- position: absolute;
- top: 18px;
- left: 18px;
- z-index: 10;
+ padding: 16px;
}
#fileList tr td.filename {
diff --git a/apps/files/css/mobile.scss b/apps/files/css/mobile.scss
index eefc92c816b..e7b75910fa9 100644
--- a/apps/files/css/mobile.scss
+++ b/apps/files/css/mobile.scss
@@ -24,10 +24,6 @@ table td.date {
table td {
padding: 0;
}
-/* and accordingly fix left margin of file list summary on mobile */
-.summary .info {
- margin-left: 105px;
-}
/* remove shift for multiselect bar to account for missing navigation */
table.multiselect thead {