3
<style type="text/css">
6
background-image: url('bg.jpg');
13
verical-align: middle;
17
<script type="text/javascript">
19
password_prompt = false;
23
function show_prompt(text)
25
password_prompt = true;
27
label = document.getElementById('password_prompt');
28
label.innerHTML = text;
30
user_table = document.getElementById('user_table');
31
for (i in user_table.rows)
33
row = user_table.rows[i];
34
if (row.id != ('user_' + selected_user) && row.style != null) // FIXME: Don't know why there are rows with styles
35
row.style.opacity = 0.25;
38
entry = document.getElementById('password_entry');
41
table = document.getElementById('password_table');
42
table.style.visibility = "visible";
47
function show_message(text)
49
table = document.getElementById('message_table');
50
label = document.getElementById('message_label');
51
label.innerHTML = text;
53
table.style.visibility = "visible";
55
table.style.visibility = "hidden";
58
function show_error(text)
65
user_table = document.getElementById('user_table');
66
for (i in user_table.rows)
68
row = user_table.rows[i];
69
if (row.style != null) // FIXME: Don't know why there are rows with styles
70
row.style.opacity = 1;
72
table = document.getElementById('password_table');
73
table.style.visibility = "hidden";
74
password_prompt = false;
82
if (loading_text == '....')
84
label = document.getElementById('countdown_label');
85
label.innerHTML = loading_text;
86
setTimeout('throbber()', 1000);
89
function authentication_complete()
91
if (lightdm.is_authenticated)
92
lightdm.login (lightdm.authentication_user, lightdm.default_session);
94
show_message ("Authentication Failed");
97
setTimeout('throbber()', 1000);
100
function timed_login(user)
102
lightdm.login (lightdm.timed_login_user);
103
setTimeout('throbber()', 1000);
106
function start_authentication(username)
108
lightdm.cancel_timed_login ();
109
label = document.getElementById('countdown_label');
111
label.style.visibility = "hidden";
114
if (!password_prompt) {
115
selected_user = username;
116
lightdm.start_authentication(username);
120
function provide_secret()
122
entry = document.getElementById('password_entry');
123
lightdm.provide_secret(entry.value);
128
label = document.getElementById('countdown_label');
129
label.innerHTML = ' in ' + time_remaining + ' seconds'
131
if (time_remaining >= 0)
132
setTimeout('countdown()', 1000);
135
document.write('<table id="user_table" style="margin: auto;">');
136
for (i in lightdm.users)
138
user = lightdm.users[i];
140
if (user.image.length > 0)
143
image = 'file:///usr/share/icons/gnome/32x32/stock/generic/stock_person.png'
145
document.write('<tr id="user_' + user.name +'"onclick="start_authentication(\'' + user.name + '\')" style="cursor: pointer;">');
146
document.write('<td><img width="48px" height="48px" src="' + image + '" /></td>');
147
document.write('<td>' + user.display_name + '</td>');
148
if (user.name == lightdm.timed_login_user && lightdm.timed_login_delay > 0)
149
document.write('<td id="countdown_label"></td>');
150
document.write('</tr>');
152
document.write('</table>');
153
document.write('<table id="message_table" style="margin: auto; visibility: hidden;"><td id="message_label"></td></table>');
154
document.write('<table id="password_table" style="margin: auto; visibility: hidden; color: red;"><tr>');
155
document.write('<td id="password_prompt"></td>');
156
document.write('<td><form action="javascript: provide_secret()"><input id="password_entry" type="password" /></form></td>');
157
document.write('</tr></table>');
159
time_remaining = lightdm.timed_login_delay;
160
if (time_remaining > 0)