diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-09-29 02:36:10 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-10-19 02:46:13 +0300 |
commit | f392e78d5b525abbb04057b91c0adfba212c00c4 (patch) | |
tree | bd01ed1951dd3d6d9dd59ab3aa51040bc1dc6b9d /apps/files/templates | |
parent | 6b8713e8b6f45f79ec7cffd150c7f0136d7fb5b9 (diff) |
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/templates')
-rw-r--r-- | apps/files/templates/list.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php index 46bd9351e39..483bdcd2e38 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -41,12 +41,14 @@ <table id="filestable" data-allow-public-upload="<?php p($_['publicUploadEnabled'])?>" data-preview-x="32" data-preview-y="32"> <thead> <tr> + <th id="headerSelection" class="hidden column-selection"> + <input type="checkbox" id="select_all_files" class="select-all checkbox"/> + <label for="select_all_files"> + <span class="hidden-visually"><?php p($l->t('Select all'))?></span> + </label> + </th> <th id='headerName' class="hidden column-name"> <div id="headerName-container"> - <input type="checkbox" id="select_all_files" class="select-all checkbox"/> - <label for="select_all_files"> - <span class="hidden-visually"><?php p($l->t('Select all'))?></span> - </label> <a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a> <span id="selectedActionsList" class="selectedActions"> <a href="" class="copy-move"> |