From e4b77514f59dd7ec8502e6cda92dfc49e40bdac0 Mon Sep 17 00:00:00 2001 From: Jay2k1 Date: Thu, 23 Aug 2012 14:18:33 +0200 Subject: [PATCH] Additions to PDF export and some more In this commit, I modified the raw base version 2.1.8 of TeamPass with the following changes: - add PDF encryption (requires password) - add password input field for PDF export - add folder tree to PDF table headers - repeat table headers on every folder change in PDFs - add monospace font for passwords in PDFs - log PDF exports (who, when, which folders) - in views, add page to view these logged items - automatically set focus to search field when opening search page - use PHP's built-in LDAP class instead of AdLDAP because the latter apparently doesn't support authentication via "anonymous bind" method (first bind anonymously and ask for DN using username, then bind again with retrieved DN and authenticate) and without anonymous bind, it didn't work with our OpenLDAP --- find.load.php | 17 ++ home.php | 6 +- includes/language/english.php | 5 +- .../tfpdf/font/LiberationMono-Regular.z | Bin 0 -> 69890 bytes .../libraries/tfpdf/font/liberationmono.php | 23 ++ .../libraries/tfpdf/font/liberationmono.ttf | Bin 0 -> 108168 bytes includes/libraries/tfpdf/fpdf_protection.php | 206 ++++++++++++++++++ load.php | 12 +- sources/export.queries.php | 115 ++++++---- sources/main.queries.php | 33 ++- sources/views.queries.php | 61 ++++++ views.load.php | 7 + views.php | 4 +- 13 files changed, 424 insertions(+), 65 deletions(-) create mode 100644 includes/libraries/tfpdf/font/LiberationMono-Regular.z create mode 100644 includes/libraries/tfpdf/font/liberationmono.php create mode 100644 includes/libraries/tfpdf/font/liberationmono.ttf create mode 100644 includes/libraries/tfpdf/fpdf_protection.php diff --git a/find.load.php b/find.load.php index 45cd67204..fb78ab739 100644 --- a/find.load.php +++ b/find.load.php @@ -139,4 +139,21 @@ function(event, ui) { } } }); + + function focusFind() { + var x = $("input[type=\'text\']")[1]; + if (typeof x === "undefined") { + setTimeout('focusFind()',100); + return; + } + + if ($(x).is(":focus") === false) { + console.log("hat keinen fokus, setze fokus"); + x.focus(); + } + } + + $(document).ready(function() { + focusFind(); + }); \ No newline at end of file diff --git a/home.php b/home.php index 7e6c97e01..cd59a10e8 100644 --- a/home.php +++ b/home.php @@ -241,7 +241,7 @@ '; - //Print out the items + // Data Export (PDF/CSV) echo '