dhtml user details
This commit is contained in:
parent
fefa6ca3af
commit
1a7572cb27
19
backend.php
19
backend.php
|
@ -1847,6 +1847,8 @@
|
|||
ttrss_users
|
||||
ORDER by login");
|
||||
|
||||
print "<div id=\"prefUserDetails\">PLACEHOLDER</div>";
|
||||
|
||||
print "<p><table width=\"100%\" class=\"prefUserList\" id=\"prefUserList\">";
|
||||
|
||||
print "<tr class=\"title\">
|
||||
|
@ -1883,7 +1885,7 @@
|
|||
} else if (!$edit_uid || $subop != "edit") {
|
||||
|
||||
print "<td><input onclick='toggleSelectRow(this);'
|
||||
type=\"checkbox\" id=\"UMCHK-".$line["id"]."\"></td>";
|
||||
type=\"checkbox\" id=\"UMCHK-$uid\"></td>";
|
||||
|
||||
print "<td><a href=\"javascript:editUser($uid);\">" .
|
||||
$line["login"] . "</td>";
|
||||
|
@ -1951,16 +1953,14 @@
|
|||
return;
|
||||
}
|
||||
|
||||
print "<html><head>
|
||||
/* print "<html><head>
|
||||
<title>Tiny Tiny RSS : User Details</title>
|
||||
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">
|
||||
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
|
||||
</head><body>";
|
||||
</head><body>"; */
|
||||
|
||||
$uid = sprintf("%d", $_GET["id"]);
|
||||
|
||||
/* FIXME this badly needs real implementation */
|
||||
|
||||
print "<div class='userDetails'>";
|
||||
|
||||
$result = db_query($link, "SELECT login,last_login,access_level
|
||||
|
@ -2023,12 +2023,13 @@
|
|||
|
||||
print "</ul>";
|
||||
|
||||
print "<p align='center'>
|
||||
<a href=\"javascript:window.close()\">(Close this window)</a></p>";
|
||||
|
||||
print "</div>";
|
||||
|
||||
print "</body></html>";
|
||||
print "<div align='center'>
|
||||
<input type='submit' class='button'
|
||||
onclick=\"closeUserDetails()\" value=\"Close this window\"></div>";
|
||||
|
||||
// print "</body></html>";
|
||||
|
||||
}
|
||||
|
||||
|
|
34
prefs.js
34
prefs.js
|
@ -101,23 +101,33 @@ function userlist_callback() {
|
|||
if (xmlhttp.readyState == 4) {
|
||||
container.innerHTML=xmlhttp.responseText;
|
||||
|
||||
/* if (active_filter) {
|
||||
var row = document.getElementById("ULRR-" + active_label);
|
||||
if (active_user) {
|
||||
var row = document.getElementById("UMRR-" + active_user);
|
||||
if (row) {
|
||||
if (!row.className.match("Selected")) {
|
||||
row.className = row.className + "Selected";
|
||||
}
|
||||
}
|
||||
var checkbox = document.getElementById("LICHK-" + active_label);
|
||||
var checkbox = document.getElementById("UMCHK-" + active_user);
|
||||
|
||||
if (checkbox) {
|
||||
checkbox.checked = true;
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
p_notify("");
|
||||
}
|
||||
}
|
||||
|
||||
function userdetails_callback() {
|
||||
var container = document.getElementById('prefUserDetails');
|
||||
if (xmlhttp.readyState == 4) {
|
||||
container.innerHTML=xmlhttp.responseText;
|
||||
container.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function prefslist_callback() {
|
||||
var container = document.getElementById('prefContent');
|
||||
if (xmlhttp.readyState == 4) {
|
||||
|
@ -850,6 +860,11 @@ function resetSelectedUserPass() {
|
|||
|
||||
function selectedUserDetails() {
|
||||
|
||||
if (!xmlhttp_ready(xmlhttp)) {
|
||||
printLockingError();
|
||||
return
|
||||
}
|
||||
|
||||
var rows = getSelectedUsers();
|
||||
|
||||
if (rows.length == 0) {
|
||||
|
@ -864,9 +879,9 @@ function selectedUserDetails() {
|
|||
|
||||
var id = rows[0];
|
||||
|
||||
var w = window.open("backend.php?op=user-details&id=" + id,
|
||||
"User Details",
|
||||
"menubar=no,location=no,resizable=yes,scrollbars=yes,status=no");
|
||||
xmlhttp.open("GET", "backend.php?op=user-details&id=" + id, true);
|
||||
xmlhttp.onreadystatechange=userdetails_callback;
|
||||
xmlhttp.send(null);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1051,4 +1066,7 @@ function dispOptionHelp(event, sender) {
|
|||
|
||||
} */
|
||||
|
||||
|
||||
function closeUserDetails() {
|
||||
var d = document.getElementById('prefUserDetails');
|
||||
d.style.display = "none";
|
||||
}
|
||||
|
|
22
tt-rss.css
22
tt-rss.css
|
@ -411,7 +411,7 @@ a.helpLink:hover {
|
|||
color : #5050aa;
|
||||
}
|
||||
|
||||
div.helpResponse, div.userDetails {
|
||||
div.helpResponse {
|
||||
margin : 10px;
|
||||
background-image : url("images/vgrad_light_rev2.png");
|
||||
background-position : top left;
|
||||
|
@ -420,6 +420,15 @@ div.helpResponse, div.userDetails {
|
|||
border : 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
div.userDetails {
|
||||
background-image : url("images/vgrad_light_rev2.png");
|
||||
background-position : top left;
|
||||
background-repeat : repeat-x;
|
||||
padding : 5px;
|
||||
margin-bottom : 10px;
|
||||
border : 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
div.helpResponse h1, div.userDetails h1 {
|
||||
border-width : 0px 0px 1px 0px;
|
||||
border-style : solid;
|
||||
|
@ -566,3 +575,14 @@ table.innerLoginForm {
|
|||
table.innerLoginForm td {
|
||||
padding : 3px 3px 5px 3px;
|
||||
}
|
||||
|
||||
#prefUserDetails {
|
||||
position : absolute;
|
||||
margin-left : 30%;
|
||||
background-color : white;
|
||||
width : 30%;
|
||||
z-index : 3;
|
||||
border : 1px solid #c0c0c0;
|
||||
display : none;
|
||||
padding-bottom : 10px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue