graycube fixes; code cleanup

This commit is contained in:
Andrew Dolgov 2006-10-01 05:40:40 +01:00
parent e7dfc9c989
commit 23c2a4e7ae
5 changed files with 56 additions and 29 deletions

View File

@ -1441,9 +1441,14 @@
$feed_search = $_SESSION["prefs_feed_search"]; $feed_search = $_SESSION["prefs_feed_search"];
} }
print "<table width='100%' class=\"prefGenericAddBox\" print "<div class=\"feedEditSearch\">
cellspacing='0' cellpadding='0'><tr> <input id=\"feed_search\" size=\"20\"
<td> onchange=\"javascript:updateFeedList()\" value=\"$feed_search\">
<input type=\"submit\" class=\"button\"
onclick=\"javascript:updateFeedList()\" value=\"Search\">
</div>";
print "<div class=\"prefGenericAddBox\">
<input id=\"fadd_link\" <input id=\"fadd_link\"
onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\" onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
size=\"40\"> size=\"40\">
@ -1456,13 +1461,7 @@
onclick=\"javascript:browseFeeds()\" value=\"Top 25\">"; onclick=\"javascript:browseFeeds()\" value=\"Top 25\">";
} }
print "</td><td align='right'> print "</div>";
<input id=\"feed_search\" size=\"20\"
onchange=\"javascript:updateFeedList()\" value=\"$feed_search\">
<input type=\"submit\" class=\"button\"
onclick=\"javascript:updateFeedList()\" value=\"Search\">
</td>
</tr></table>";
$feeds_sort = db_escape_string($_GET["sort"]); $feeds_sort = db_escape_string($_GET["sort"]);
@ -3291,7 +3290,7 @@
onkeyup=\"toggleSubmitNotEmpty(this, 'user_add_btn')\" onkeyup=\"toggleSubmitNotEmpty(this, 'user_add_btn')\"
size=\"40\">&nbsp;"; size=\"40\">&nbsp;";
print"<input type=\"submit\" class=\"button\" print "<input type=\"submit\" class=\"button\"
id=\"user_add_btn\" disabled=\"true\" id=\"user_add_btn\" disabled=\"true\"
onclick=\"javascript:addUser()\" value=\"Create user\"></div>"; onclick=\"javascript:addUser()\" value=\"Create user\"></div>";

View File

@ -1537,4 +1537,8 @@ function pref_hotkey_handler(e) {
} }
} }
function userSwitch() {
var chooser = document.getElementById("userSwitch");
var user = chooser[chooser.selectedIndex].value;
window.location = "prefs.php?swu=" + user;
}

View File

@ -133,6 +133,20 @@ window.onload = init;
<p>Loading, please wait...</p> <p>Loading, please wait...</p>
</div> </div>
<div id="prefFooter">
<?php if (defined('_DEBUG_USER_SWITCH')) { ?>
<select id="userSwitch" onchange="userSwitch()">
<?php
foreach (array('admin', 'fox', 'test') as $u) {
$op_sel = ($u == $_SESSION["name"]) ? "selected" : "";
print "<option $op_sel>$u</option>";
}
?>
</select>
<? } ?>
<a href="http://tt-rss.spb.ru/">Tiny Tiny RSS</a> v<?php echo VERSION ?> &copy; 2005-2006 Andrew Dolgov
</div>
<?php db_close($link); ?> <?php db_close($link); ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -300,9 +300,11 @@ div.headlines_cdm {
border-collapse : collapse; border-collapse : collapse;
} }
#footer { #footer, #prefFooter {
vertical-align : middle;
display : block;
position : absolute; position : absolute;
bottom : 0px; bottom : 5px;
text-align : center; text-align : center;
color : gray; color : gray;
font-size : x-small; font-size : x-small;
@ -351,7 +353,7 @@ div.prefsTabSelected {
/* preferences layout */ /* preferences layout */
#prefHeader { #prefHeader {
margin : 10px; margin : 10px 10px 10px 25px;
color : gray; color : gray;
font-size : small; font-size : small;
} }
@ -372,9 +374,14 @@ div.return a:hover {
#prefContent { #prefContent {
clear : left; clear : left;
margin : 0px 10px 0px 10px; position : absolute;
bottom : 30px;
top : 75px;
overflow : auto;
left : 10px;
right : 10px;
padding : 1em; padding : 1em;
min-height : 300px; margin : 0px;
background : white; background : white;
font-size : small; font-size : small;
border-width : 1px 1px 1px 1px; border-width : 1px 1px 1px 1px;

View File

@ -379,6 +379,10 @@ tr.title td a:hover {
color : black; color : black;
} }
div.feedEditSearch {
float : right;
}
table.prefFeedList td.feedEditCat { table.prefFeedList td.feedEditCat {
font-weight : bold; font-weight : bold;
border-width : 0px 0px 1px 0px; border-width : 0px 0px 1px 0px;
@ -573,11 +577,6 @@ span.insensitive {
} }
.prefGenericAddBox { .prefGenericAddBox {
margin : 5px;
font-size : small;
}
.prefGenericAddBox td {
font-size : small; font-size : small;
} }
@ -1165,6 +1164,10 @@ div.headlines_cdm {
height: expression((parseInt(document.documentElement.clientHeight)-40-305-50)+'px'); height: expression((parseInt(document.documentElement.clientHeight)-40-305-50)+'px');
} }
#prefFooter {
display : none;
}
#footer { #footer {
position : absolute; position : absolute;
bottom : 0px; bottom : 0px;