author | Dan |
Fri, 12 Jun 2009 13:47:12 -0400 | |
changeset 75 | 2f39cb7f54c4 |
parent 50 | 1b4288399b1f |
permissions | -rw-r--r-- |
50
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
1 |
var userlist = []; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
2 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
3 |
function register_user(username) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
4 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
5 |
userlist.push(username); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
6 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
7 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
8 |
function draw_user(ul, username) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
9 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
10 |
var inp = document.createElement('input'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
11 |
inp.type = 'hidden'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
12 |
inp.name = 'users[]'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
13 |
inp.value = username; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
14 |
ul.parentNode.appendChild(inp); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
15 |
var li = document.createElement('li'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
16 |
li.username = username; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
17 |
li.userinput = inp; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
18 |
var delbtn = document.createElement('a'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
19 |
delbtn.style.color = '#ff0000'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
20 |
delbtn.href = '#'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
21 |
delbtn.onclick = function() |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
22 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
23 |
delete_user(this); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
24 |
return false; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
25 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
26 |
delbtn.appendChild(document.createTextNode('[X]')); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
27 |
li.appendChild(delbtn); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
28 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
29 |
li.appendChild(document.createTextNode(' ' + username)); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
30 |
ul.appendChild(li); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
31 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
32 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
33 |
function draw_new_user(username, password) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
34 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
35 |
for ( var i = 0; i < userlist.length; i++ ) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
36 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
37 |
if ( userlist[i] == username ) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
38 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
39 |
alert('The username you entered is already in the list, please delete the current user and re-add it if you want to change the password.'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
40 |
return false; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
41 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
42 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
43 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
44 |
userlist.push(username); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
45 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
46 |
var ul = document.getElementById('userlist'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
47 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
48 |
var inp = document.createElement('input'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
49 |
inp.type = 'hidden'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
50 |
inp.name = 'users_add[' + username + ']'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
51 |
inp.value = password; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
52 |
ul.parentNode.appendChild(inp); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
53 |
var li = document.createElement('li'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
54 |
li.username = username; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
55 |
li.userinput = inp; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
56 |
var delbtn = document.createElement('a'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
57 |
delbtn.style.color = '#ff0000'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
58 |
delbtn.href = '#'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
59 |
delbtn.onclick = function() |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
60 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
61 |
delete_user(this); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
62 |
return false; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
63 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
64 |
delbtn.appendChild(document.createTextNode('[X]')); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
65 |
li.appendChild(delbtn); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
66 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
67 |
li.appendChild(document.createTextNode(' ' + username)); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
68 |
ul.appendChild(li); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
69 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
70 |
return true; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
71 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
72 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
73 |
function userlist_init() |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
74 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
75 |
var ul = document.getElementById('userlist'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
76 |
for ( var i = 0; i < userlist.length; i++ ) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
77 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
78 |
draw_user(ul, userlist[i]); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
79 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
80 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
81 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
82 |
function delete_user(a) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
83 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
84 |
var li = a.parentNode; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
85 |
var username = li.username; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
86 |
li.parentNode.parentNode.removeChild(li.userinput); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
87 |
li.parentNode.removeChild(li); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
88 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
89 |
for ( var i = 0; i < userlist.length; i++ ) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
90 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
91 |
if ( userlist[i] == username ) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
92 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
93 |
delete(userlist[i]); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
94 |
break; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
95 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
96 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
97 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
98 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
99 |
function add_user_form() |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
100 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
101 |
var ul = document.getElementById('userlist'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
102 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
103 |
if ( ul.parentNode.getElementsByTagName('form').length > 0 ) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
104 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
105 |
return false; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
106 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
107 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
108 |
var theform = document.createElement('form'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
109 |
theform.action = 'javascript:void(0);'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
110 |
theform.onsubmit = function() |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
111 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
112 |
if ( this.username.value == '' || this.password.value == '' ) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
113 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
114 |
alert('Please enter a username and password.'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
115 |
return false; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
116 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
117 |
if ( draw_new_user(this.username.value, this.password.value) ) |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
118 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
119 |
this.parentNode.removeChild(this); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
120 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
121 |
else |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
122 |
{ |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
123 |
this.username.focus(); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
124 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
125 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
126 |
return false; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
127 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
128 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
129 |
theform.appendChild(document.createTextNode('user: ')); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
130 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
131 |
var i_user = document.createElement('input'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
132 |
i_user.type = 'text'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
133 |
i_user.name = 'username'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
134 |
i_user.size = '12'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
135 |
theform.appendChild(i_user); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
136 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
137 |
theform.appendChild(document.createTextNode(' pass: ')); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
138 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
139 |
var i_pass = document.createElement('input'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
140 |
i_pass.type = 'password'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
141 |
i_pass.name = 'password'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
142 |
i_pass.size = '12'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
143 |
theform.appendChild(i_pass); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
144 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
145 |
theform.appendChild(document.createTextNode(' ')); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
146 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
147 |
var i_sub = document.createElement('input'); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
148 |
i_sub.type = 'submit'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
149 |
i_sub.value = 'Add'; |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
150 |
theform.appendChild(i_sub); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
151 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
152 |
ul.parentNode.appendChild(theform); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
153 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
154 |
i_user.focus(); |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
155 |
} |
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
156 |
|
1b4288399b1f
Added graphical configuration, at this point only for the grey theme but others will follow soon. (This has been nearly done for two weeks or more but was on hold due to the bugs with multithreading)
Dan
parents:
diff
changeset
|
157 |
window.onload = userlist_init; |