summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2018-08-02 10:16:37 +0000
committerIan C <ianc@noddybox.co.uk>2018-08-02 10:16:37 +0000
commit96f5cc19405262dd288acbeb79dd74a12ec21da3 (patch)
tree0d85d5df29e46fdde361f1772f3bd337cea13f25 /www
parent6fd82c0ff0b8ab230cd2bbf8efa0d4bbc088e3e8 (diff)
Get height of header on page load and set the table offset appropriately.
Diffstat (limited to 'www')
-rw-r--r--www/index.html2
-rw-r--r--www/scripts/main.js25
2 files changed, 26 insertions, 1 deletions
diff --git a/www/index.html b/www/index.html
index 00098aa..ab55698 100644
--- a/www/index.html
+++ b/www/index.html
@@ -13,7 +13,7 @@
</head>
<body>
-<div class="header">
+<div id="Header" class="header">
<table>
<tr>
<td class="headertext">Passphrase:</td>
diff --git a/www/scripts/main.js b/www/scripts/main.js
index 3023ec6..0e403dc 100644
--- a/www/scripts/main.js
+++ b/www/scripts/main.js
@@ -22,6 +22,21 @@ function Copy(id)
document.execCommand("copy");
}
+function LoadTestData()
+{
+ globalDb = [];
+
+ var f;
+
+ for(f = 1; f < 21; f++)
+ {
+ var rec = {id: f, group: "Group 1", description: "Test " + f,
+ username: "user" + f, password: ""};
+
+ globalDb.push(rec);
+ }
+}
+
function AESEncrypt(source, phrase)
{
var encryptedAES = CryptoJS.AES.encrypt(source, phrase);
@@ -797,4 +812,14 @@ function DoShowPasswords()
}
}
+function DoDocumentLoaded()
+{
+ var div = document.getElementById("Header");
+ var height = div.clientHeight + 2;
+ var table = document.getElementById("DataTable");
+ table.style.marginTop = height + "px";
+}
+
+window.addEventListener("load", DoDocumentLoaded);
+
// vim: sw=4 ts=4