From 1a7572cb27ec4d4a7461680b7e73f9922708d810 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 18 Nov 2005 13:38:21 +0100 Subject: [PATCH] dhtml user details --- backend.php | 19 ++++++++++--------- prefs.js | 34 ++++++++++++++++++++++++++-------- tt-rss.css | 22 +++++++++++++++++++++- 3 files changed, 57 insertions(+), 18 deletions(-) diff --git a/backend.php b/backend.php index a2f6a0da..91853d4b 100644 --- a/backend.php +++ b/backend.php @@ -1847,6 +1847,8 @@ ttrss_users ORDER by login"); + print "
PLACEHOLDER
"; + print "

"; print " @@ -1883,7 +1885,7 @@ } else if (!$edit_uid || $subop != "edit") { print ""; + type=\"checkbox\" id=\"UMCHK-$uid\">"; print ""; @@ -1951,16 +1953,14 @@ return; } - print " +/* print "Tiny Tiny RSS : User Details - "; + "; */ $uid = sprintf("%d", $_GET["id"]); - /* FIXME this badly needs real implementation */ - print "
"; $result = db_query($link, "SELECT login,last_login,access_level @@ -2023,12 +2023,13 @@ print ""; - print "

- (Close this window)

"; - print "
"; - print ""; + print "
+
"; + +// print ""; } diff --git a/prefs.js b/prefs.js index 4333aac1..6aae959e 100644 --- a/prefs.js +++ b/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"; +} diff --git a/tt-rss.css b/tt-rss.css index ca591c50..bdf5b03c 100644 --- a/tt-rss.css +++ b/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; +} -- 2.39.5
" . $line["login"] . "