]> git.wh0rd.org - tt-rss.git/commitdiff
graycube fixes; code cleanup
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 1 Oct 2006 04:40:40 +0000 (05:40 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 1 Oct 2006 04:40:40 +0000 (05:40 +0100)
backend.php
prefs.js
prefs.php
themes/graycube/theme.css
tt-rss.css

index e7e4d6bcfd360f20e40d52bafad70a0268efc92a..e9bca73460edcee6b122bc563d01e23157d6bb9c 100644 (file)
                        $feed_search = $_SESSION["prefs_feed_search"];
                }
 
-               print "<table width='100%' class=\"prefGenericAddBox\" 
-                       cellspacing='0' cellpadding='0'><tr>
-                       <td>
-                               <input id=\"fadd_link\" 
-                                       onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
-                                       size=\"40\">
-                               <input type=\"submit\" class=\"button\"
-                                       disabled=\"true\" id=\"fadd_submit_btn\"
-                                       onclick=\"addFeed()\" value=\"Subscribe\">";
+               print "<div class=\"feedEditSearch\">
+                       <input id=\"feed_search\" size=\"20\"  
+                               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\" 
+                               onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
+                               size=\"40\">
+                       <input type=\"submit\" class=\"button\"
+                               disabled=\"true\" id=\"fadd_submit_btn\"
+                               onclick=\"addFeed()\" value=\"Subscribe\">";
 
                if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) {
                        print " <input type=\"submit\" class=\"button\"
                                onclick=\"javascript:browseFeeds()\" value=\"Top 25\">";
                }
-               
-               print "</td><td align='right'>
-                               <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>";
+
+               print "</div>";
 
                $feeds_sort = db_escape_string($_GET["sort"]);
 
                                onkeyup=\"toggleSubmitNotEmpty(this, 'user_add_btn')\"
                                size=\"40\">&nbsp;";
                        
-               print"<input type=\"submit\" class=\"button\" 
+               print "<input type=\"submit\" class=\"button\" 
                        id=\"user_add_btn\" disabled=\"true\"
                        onclick=\"javascript:addUser()\" value=\"Create user\"></div>";
 
index 2c10a2dbcdcd2c536411e4844f368f2cb1948d34..da8a4c3e287ffcf8914392cdc244d60c12c08224 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -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;
+}
index 8e16a6d8652ab69854af5404eb90a96391081cbb..35af499440955b219e36f0c048ee3aedbf3a1ac3 100644 (file)
--- a/prefs.php
+++ b/prefs.php
@@ -133,6 +133,20 @@ window.onload = init;
        <p>Loading, please wait...</p>
 </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); ?>
 
 <script type="text/javascript">
index baec918b81b84ae77fab09e08d373b5984ba4a32..0a003bda9b8be7fdb0598d4c38309f5870c0e633 100644 (file)
@@ -300,9 +300,11 @@ div.headlines_cdm {
        border-collapse : collapse;
 }
 
-#footer {
+#footer, #prefFooter {
+       vertical-align : middle;
+       display : block;
        position : absolute;
-       bottom : 0px;
+       bottom : 5px;
        text-align : center;
        color : gray;
        font-size : x-small;
@@ -351,7 +353,7 @@ div.prefsTabSelected {
 /* preferences layout */
 
 #prefHeader {
-       margin : 10px;
+       margin : 10px 10px 10px 25px;
        color : gray;
        font-size : small;
 }
@@ -372,9 +374,14 @@ div.return a:hover {
 
 #prefContent {
        clear : left;
-       margin : 0px 10px 0px 10px;
+       position : absolute;
+       bottom : 30px;
+       top : 75px;
+       overflow : auto;
+       left : 10px;
+       right : 10px;
        padding : 1em;
-       min-height : 300px;
+       margin : 0px;
        background : white;
        font-size : small;
        border-width : 1px 1px 1px 1px;
index 39d73a929efa44a8923ded0f72e448db8964712e..3eb4ad8bd948e87783951b764d164fe5c426c12d 100644 (file)
@@ -379,6 +379,10 @@ tr.title td a:hover {
        color : black;
 }
 
+div.feedEditSearch {
+       float : right;
+}
+
 table.prefFeedList td.feedEditCat {
        font-weight : bold;
        border-width : 0px 0px 1px 0px;
@@ -573,11 +577,6 @@ span.insensitive {
 }
 
 .prefGenericAddBox {
-       margin : 5px;
-       font-size : small;
-}
-
-.prefGenericAddBox td {
        font-size : small;
 }
 
@@ -1165,6 +1164,10 @@ div.headlines_cdm {
        height: expression((parseInt(document.documentElement.clientHeight)-40-305-50)+'px');
 }
 
+#prefFooter {
+       display : none;
+}
+
 #footer {
        position : absolute;
        bottom : 0px;