do not show file size on small devices, fix toggling checkbox

This commit is contained in:
Uwe Steinmann 2021-05-07 08:26:29 +02:00
parent 4adf79bb3f
commit 8c77c1fd06

View File

@ -42,7 +42,7 @@ class SeedDMS_View_LogManagement extends SeedDMS_Theme_Style {
print "<th></th>\n";
print "<th>".getMLText("name")."</th>\n";
print "<th>".getMLText("creation_date")."</th>\n";
print "<th>".getMLText("file_size")."</th>\n";
print "<th class=\"d-none d-lg-table-cell\">".getMLText("file_size")."</th>\n";
print "<th></th>\n";
print "</tr>\n</thead>\n<tbody>\n";
$print_header=false;
@ -52,8 +52,8 @@ class SeedDMS_View_LogManagement extends SeedDMS_Theme_Style {
print "<td><input type=\"checkbox\" name=\"logname[]\" value=\"".$entry."\"/></td>\n";
print "<td><a href=\"out.LogManagement.php?logname=".$entry."\">".$entry."</a></td>\n";
print "\n";
print "<td>".getLongReadableDate(filectime($this->logdir.$entry))."</td>\n";
print "<td>".SeedDMS_Core_File::format_filesize(filesize($this->logdir.$entry))."</td>\n";
print "<td>".getReadableDate(filectime($this->logdir.$entry))."</td>\n";
print "<td class=\"d-none d-lg-table-cell\">".SeedDMS_Core_File::format_filesize(filesize($this->logdir.$entry))."</td>\n";
print "<td>";
print "<a href=\"out.RemoveLog.php?mode=".$mode."&logname=".$entry."\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i><span class=\"d-none d-lg-block\">".getMLText("rm_file")."</span></a>";
@ -66,17 +66,17 @@ class SeedDMS_View_LogManagement extends SeedDMS_Theme_Style {
}
if ($print_header) printMLText("empty_list");
else print "<tr><td><i class=\"fa fa-arrow-up\"></i></td><td colspan=\"2\"><button type=\"submit\" class=\"btn btn-danger\"><i class=\"fa fa-remove\"></i> ".getMLText('remove_marked_files')."</button></td></tr></table></form>\n";
else print "<tr><td><span id=\"toggleall\"><i class=\"fa fa-exchange\"></i></span></td><td colspan=\"2\"><button type=\"submit\" class=\"btn btn-danger\"><i class=\"fa fa-remove\"></i> ".getMLText('remove_marked_files')."</button></td></tr></table></form>\n";
} /* }}} */
function js() { /* {{{ */
header('Content-Type: application/javascript; charset=UTF-8');
?>
$(document).ready( function() {
$('i.fa fa-arrow-up').on('click', function(e) {
$('#toggleall').on('click', function(e) {
//var checkBoxes = $("input[type=checkbox]");
//checkBoxes.prop("checked", !checkBoxes.prop("checked"));
$('input[type=checkbox]').prop('checked', true);
$("input[type=checkbox]").each(function () { this.checked = !this.checked; });
});
});