summaryrefslogtreecommitdiff
path: root/www/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'www/scripts')
-rw-r--r--www/scripts/main.js25
1 files changed, 25 insertions, 0 deletions
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