diff --git a/CHANGELOG b/CHANGELOG index a4fb06a..66ff7d3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Revision history for Lufi ?.??.? ????-??-?? - Fix invitations sorting order (#163) + - Same behavior on files and invitations tables (striped, invert selection + button) (#166) + - Change row color on hover 0.04.3 2019-09 29 - Translate dates in invitations (#161) diff --git a/themes/default/lib/Lufi/I18N/lufi.pot b/themes/default/lib/Lufi/I18N/lufi.pot index 9510c42..2839b9e 100644 --- a/themes/default/lib/Lufi/I18N/lufi.pot +++ b/themes/default/lib/Lufi/I18N/lufi.pot @@ -150,7 +150,7 @@ msgstr "" msgid "Could not find the file. Are you sure of the URL?" msgstr "" -#: themes/default/templates/files.html.ep:28 +#: themes/default/templates/files.html.ep:29 msgid "Counter" msgstr "" @@ -166,15 +166,15 @@ msgstr "" msgid "Delete" msgstr "" -#: themes/default/templates/files.html.ep:29 themes/default/templates/index.html.ep:90 +#: themes/default/templates/files.html.ep:30 themes/default/templates/index.html.ep:90 msgid "Delete at first download?" msgstr "" -#: themes/default/templates/files.html.ep:18 +#: themes/default/templates/files.html.ep:19 msgid "Delete selected files" msgstr "" -#: themes/default/templates/files.html.ep:32 themes/default/templates/partial/index.js.ep:19 +#: themes/default/templates/files.html.ep:33 themes/default/templates/partial/index.js.ep:19 msgid "Deletion link" msgstr "" @@ -190,7 +190,7 @@ msgstr "" msgid "Download aborted." msgstr "" -#: themes/default/templates/files.html.ep:27 themes/default/templates/partial/index.js.ep:20 +#: themes/default/templates/files.html.ep:28 themes/default/templates/partial/index.js.ep:20 msgid "Download link" msgstr "" @@ -242,7 +242,7 @@ msgstr "" msgid "Expire at" msgstr "" -#: themes/default/templates/files.html.ep:31 +#: themes/default/templates/files.html.ep:32 msgid "Expires at" msgstr "" @@ -254,7 +254,7 @@ msgstr "" msgid "File deleted" msgstr "" -#: themes/default/templates/files.html.ep:26 +#: themes/default/templates/files.html.ep:27 msgid "File name" msgstr "" @@ -351,7 +351,7 @@ msgstr "" msgid "Information about delays" msgstr "" -#: themes/default/templates/invitations/my_invitations.html.ep:12 +#: themes/default/templates/files.html.ep:18 themes/default/templates/invitations/my_invitations.html.ep:12 msgid "Invert selection" msgstr "" @@ -397,7 +397,7 @@ msgstr "" msgid "Lufi recently changed its way to store files information.\\n\\nNo files have been found in the new localStorage location but we found files in the old one.\\nDo you want to import those informations?\\n\\nPlease note that this is the only time that we will ask you this." msgstr "" -#: themes/default/templates/files.html.ep:33 +#: themes/default/templates/files.html.ep:34 msgid "Mail" msgstr "" @@ -678,7 +678,7 @@ msgstr "" msgid "Upload generated zip file" msgstr "" -#: themes/default/templates/files.html.ep:30 +#: themes/default/templates/files.html.ep:31 msgid "Uploaded at" msgstr "" diff --git a/themes/default/public/css/lufi.css b/themes/default/public/css/lufi.css index 9574aea..e842612 100644 --- a/themes/default/public/css/lufi.css +++ b/themes/default/public/css/lufi.css @@ -254,6 +254,10 @@ button.pulse { text-transform: initial !important; } +table.highlight > tbody > tr:hover { + background-color: #c6d4ee; +} + .white-background { background-color: #FFF; } diff --git a/themes/default/public/js/lufi-files.js b/themes/default/public/js/lufi-files.js index 18ce122..65971e3 100644 --- a/themes/default/public/js/lufi-files.js +++ b/themes/default/public/js/lufi-files.js @@ -43,6 +43,20 @@ function itemExists(name) { } } +function invertSelection(event) { + event.preventDefault(); + $('input[type="checkbox"]').each(function() { + var el = $(this); + el.click(); + if (el.attr('data-checked') && el.attr('data-checked') === 'data-checked') { + el.attr('data-checked', null); + } else { + el.attr('data-checked', 'data-checked'); + } + }); + evaluateMassDelete(); +} + function purgeExpired(event) { event.preventDefault(); var files = JSON.parse(localStorage.getItem(window.prefix + 'files')); diff --git a/themes/default/templates/files.html.ep b/themes/default/templates/files.html.ep index 342a27c..954ed9d 100644 --- a/themes/default/templates/files.html.ep +++ b/themes/default/templates/files.html.ep @@ -9,17 +9,18 @@ <%= l('Rows in red mean that the files have expired and are no longer available.') %>

- <%= l('Export localStorage data') %> - <%= l('Purge expired files from localStorage') %> - <%= l('Import localStorage data') %> + <%= l('Export localStorage data') %> + <%= l('Purge expired files from localStorage') %> + <%= l('Import localStorage data') %> + <%= l('Invert selection') %> <%= l('Delete selected files') %>
- +
diff --git a/themes/default/templates/invitations/my_invitations.html.ep b/themes/default/templates/invitations/my_invitations.html.ep index 9cac6d0..de825b9 100644 --- a/themes/default/templates/invitations/my_invitations.html.ep +++ b/themes/default/templates/invitations/my_invitations.html.ep @@ -17,7 +17,7 @@
-
+
diff --git a/themes/default/templates/partial/files.js.ep b/themes/default/templates/partial/files.js.ep index 855bd59..bbd79ec 100644 --- a/themes/default/templates/partial/files.js.ep +++ b/themes/default/templates/partial/files.js.ep @@ -13,6 +13,7 @@ var i18n = { }; $(document).ready(function() { populateFilesTable(); + $('#invertSelection').on('click', invertSelection); $('#exportStorage').on('click', exportStorage); $('#purgeExpired').on('click', purgeExpired); $('#clickImport').on('click', clickImport);