Verified Commit 24d1f623 authored by Luc Didry's avatar Luc Didry
Browse files

🐛 — Fix #166 — Same behavior on files and invitations tables

e.g. striped, invert selection button
+ Change row color on hover
parent 2b790c9f
......@@ -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)
......
......@@ -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 ""
......
......@@ -254,6 +254,10 @@ button.pulse {
text-transform: initial !important;
}
table.highlight > tbody > tr:hover {
background-color: #c6d4ee;
}
.white-background {
background-color: #FFF;
}
......
......@@ -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'));
......
......@@ -9,17 +9,18 @@
<%= l('Rows in red mean that the files have expired and are no longer available.') %>
</p>
<div class="files-buttons">
<a href="#" id="exportStorage" class="btn left-mg cyan"><%= l('Export localStorage data') %></a>
<a href="#" id="purgeExpired" class="btn left-mg cyan"><%= l('Purge expired files from localStorage') %></a>
<a href="#" id="clickImport" class="btn left-mg cyan"><%= l('Import localStorage data') %></a>
<a href="#" id="exportStorage" class="btn left-mg cyan"><%= l('Export localStorage data') %></a>
<a href="#" id="purgeExpired" class="btn left-mg cyan"><%= l('Purge expired files from localStorage') %></a>
<a href="#" id="clickImport" class="btn left-mg cyan"><%= l('Import localStorage data') %></a>
<span class="file-field input-field">
<input type="file" id="import" onchange="importStorage(this.files)">
</span>
<a href="#" id="invertSelection" class="btn left-mg cyan"><%= l('Invert selection') %></a>
<a href="#" class="btn left-mg cyan disabled" id="mass-delete" disabled><%= l('Delete selected files') %></a>
</div>
<div>
<table class="responsive-table striped">
<table class="responsive-table highlight striped">
<thead>
<tr>
<th class="center-align"></th>
......
......@@ -17,7 +17,7 @@
</div>
<div>
<table class="responsive-table highlight">
<table class="responsive-table highlight striped">
<thead>
<tr>
<th class="center-align">&nbsp;</th>
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment