3
<style type="text/css">
6
background-image: url('bg.jpg');
13
verical-align: middle;
17
<script type="text/javascript">
19
password_prompt = false;
22
function show_prompt(text)
24
password_prompt = true;
26
label = document.getElementById('password_prompt');
27
label.innerHTML = text;
29
user_table = document.getElementById('user_table');
30
for (i in user_table.rows)
32
row = user_table.rows[i];
33
if (row.id != ('user_' + selected_user) && row.style != null) // FIXME: Don't know why there are rows with styles
34
row.style.opacity = 0.25;
37
table = document.getElementById('password_table');
38
table.style.visibility = "visible";
40
entry = document.getElementById('password_entry');
44
function show_message(text)
48
function authentication_complete()
50
if (lightdm.is_authenticated)
54
function start_authentication(username)
56
if (!password_prompt) {
57
lightdm.start_authentication(username);
58
selected_user = username;
62
function provide_secret()
64
entry = document.getElementById('password_entry');
65
lightdm.provide_secret(entry.value);
68
document.write('<table id="user_table" style="margin: auto;">');
69
for (i in lightdm.users)
71
user = lightdm.users[i];
73
if (user.real_name.length > 0)
74
label = user.real_name
78
if (user.image.length > 0)
79
image = 'file://' + user.image
81
image = 'file:///usr/share/icons/gnome/32x32/stock/generic/stock_person.png'
83
document.write('<tr id="user_' + user.name +'"onclick="start_authentication(\'' + user.name + '\')" style="cursor: pointer;">');
84
document.write('<td><img width="48px" height="48px" src="' + image + '" /></td>');
85
document.write('<td>' + label + '</td>');
86
document.write('</tr>');
88
document.write("</table>");
89
document.write('<table id="password_table" style="margin: auto; visibility: hidden;"><tr>');
90
document.write('<td id="password_prompt"></td>');
91
document.write('<td><form action="javascript: provide_secret()"><input id="password_entry" type="password" /></form></td>');
92
document.write('</tr></table>');
97
<script type="text/javascript">