1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-22 03:01:29 +00:00

css-based layout + required fixes

This commit is contained in:
Andrew Dolgov
2006-09-28 13:00:03 +01:00
parent 1f64b1be20
commit 6b4163cb46
8 changed files with 305 additions and 272 deletions

View File

@@ -124,7 +124,7 @@
function outputFeedList($link, $tags = false) { function outputFeedList($link, $tags = false) {
print "<html><head> /* print "<html><head>
<title>Tiny Tiny RSS : Feedlist</title> <title>Tiny Tiny RSS : Feedlist</title>
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">"; <link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">";
@@ -159,7 +159,7 @@
document.addEventListener(\"DOMContentLoaded\", init, null); document.addEventListener(\"DOMContentLoaded\", init, null);
} }
window.onload = init; window.onload = init;
</script>"; </script>"; */
print "<ul class=\"feedList\" id=\"feedList\">\n"; print "<ul class=\"feedList\" id=\"feedList\">\n";
@@ -440,21 +440,21 @@
print "</ul>"; print "</ul>";
print ' # print '
<script type="text/javascript"> # <script type="text/javascript">
/* for IE */ # /* for IE */
function statechange() { # function statechange() {
if (document.readyState == "interactive") init(); # if (document.readyState == "interactive") init();
} # }
#
if (document.readyState) { # if (document.readyState) {
if (document.readyState == "interactive" || document.readyState == "complete") { # if (document.readyState == "interactive" || document.readyState == "complete") {
init(); # init();
} else { # } else {
document.onreadystatechange = statechange; # document.onreadystatechange = statechange;
} # }
} # }
</script></body></html>'; # </script></body></html>';
} }
@@ -520,7 +520,7 @@
FROM ttrss_entries,ttrss_user_entries FROM ttrss_entries,ttrss_user_entries
WHERE id = '$id' AND ref_id = id AND owner_uid = " . $_SESSION["uid"]); WHERE id = '$id' AND ref_id = id AND owner_uid = " . $_SESSION["uid"]);
print "<html><head> /* print "<html><head>
<title>Tiny Tiny RSS : Article $id</title> <title>Tiny Tiny RSS : Article $id</title>
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">"; <link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">";
@@ -544,7 +544,7 @@
<script type=\"text/javascript\" src=\"prototype.js\"></script> <script type=\"text/javascript\" src=\"prototype.js\"></script>
<script type=\"text/javascript\" src=\"functions.js?$script_dt_add\"></script> <script type=\"text/javascript\" src=\"functions.js?$script_dt_add\"></script>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
</head><body $rtl_tag>"; </head><body $rtl_tag>"; */
if ($result) { if ($result) {
@@ -669,7 +669,7 @@
</script>"; </script>";
} }
print "</body></html>"; // print "</body></html>";
} }
if ($op == "viewfeed") { if ($op == "viewfeed") {
@@ -683,7 +683,7 @@
if ($subop == "undefined") $subop = ""; if ($subop == "undefined") $subop = "";
print "<html><head> /* print "<html><head>
<title>Tiny Tiny RSS : Feed $feed</title> <title>Tiny Tiny RSS : Feed $feed</title>
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">"; <link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">";
@@ -700,7 +700,7 @@
} else { } else {
print "<link title=\"Compact Stylesheet\" rel=\"alternate stylesheet\" print "<link title=\"Compact Stylesheet\" rel=\"alternate stylesheet\"
type=\"text/css\" href=\"tt-rss_compact.css\"/>"; type=\"text/css\" href=\"tt-rss_compact.css\"/>";
} } */
if ($subop == "CatchupSelected") { if ($subop == "CatchupSelected") {
$ids = split(",", db_escape_string($_GET["ids"])); $ids = split(",", db_escape_string($_GET["ids"]));
@@ -757,7 +757,7 @@
$script_dt_add = get_script_dt_add(); $script_dt_add = get_script_dt_add();
print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"> /* print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
<script type=\"text/javascript\" src=\"prototype.js\"></script> <script type=\"text/javascript\" src=\"prototype.js\"></script>
<script type=\"text/javascript\" src=\"functions.js?$script_dt_add\"></script> <script type=\"text/javascript\" src=\"functions.js?$script_dt_add\"></script>
<script type=\"text/javascript\" src=\"viewfeed.js?$script_dt_add\"></script> <script type=\"text/javascript\" src=\"viewfeed.js?$script_dt_add\"></script>
@@ -771,7 +771,7 @@
document.addEventListener(\"DOMContentLoaded\", init, null); document.addEventListener(\"DOMContentLoaded\", init, null);
} }
window.onload = init; window.onload = init;
</script>"; </script>"; */
/// START ///////////////////////////////////////////////////////////////////////////////// /// START /////////////////////////////////////////////////////////////////////////////////
@@ -1053,37 +1053,37 @@
print "</div>"; print "</div>";
print " # print "
<script type=\"text/javascript\"> # <script type=\"text/javascript\">
try { # try {
document.onkeydown = hotkey_handler; # document.onkeydown = hotkey_handler;
try { # try {
parent.update_all_counters(\"$feed\"); # parent.update_all_counters(\"$feed\");
} catch (e) { # } catch (e) {
// this is workaround against mysterious permission # // this is workaround against mysterious permission
// denied feature/bug of firefox (ticket #73) # // denied feature/bug of firefox (ticket #73)
// if call from this context failed - ignore silently # // if call from this context failed - ignore silently
exception_error(\"viewfeed/footer1/counters\", e, true); # exception_error(\"viewfeed/footer1/counters\", e, true);
} # }
} catch (e) { # } catch (e) {
exception_error(\"viewfeed/footer1\", e); # exception_error(\"viewfeed/footer1\", e);
} # }
#
/* for IE */ # /* for IE */
function statechange() { # function statechange() {
if (document.readyState == \"interactive\") init(); # if (document.readyState == \"interactive\") init();
} # }
#
if (document.readyState) { # if (document.readyState) {
if (document.readyState == \"interactive\" || document.readyState == \"complete\") { # if (document.readyState == \"interactive\" || document.readyState == \"complete\") {
init(); # init();
} else { # } else {
document.onreadystatechange = statechange; # document.onreadystatechange = statechange;
} # }
} # }
</script>"; # </script>";
#
print "</body></html>"; # print "</body></html>";
} }
if ($op == "pref-feeds") { if ($op == "pref-feeds") {

View File

@@ -5,31 +5,30 @@ function viewCategory(cat) {
viewfeed(cat, '', true); viewfeed(cat, '', true);
} }
function feedlist_callback() {
if (xmlhttp.readyState == 4) {
var f = document.getElementById("feeds-frame");
f.innerHTML = xmlhttp.responseText;
}
}
function viewfeed(feed, subop, is_cat, subop_param) { function viewfeed(feed, subop, is_cat, subop_param) {
try { try {
enableHotkeys(); enableHotkeys();
var toolbar_query = parent.Form.serialize("main_toolbar_form"); var toolbar_query = parent.Form.serialize("main_toolbar_form");
var toolbar_form = parent.document.forms["main_toolbar_form"]; var toolbar_form = document.forms["main_toolbar_form"];
if (parent.document.forms["main_toolbar_form"].query) { if (document.forms["main_toolbar_form"].query) {
toolbar_form.query.value = ""; toolbar_form.query.value = "";
} }
// setCookie("ttrss_vf_limit", toolbar_form.limit[toolbar_form.limit.selectedIndex].value); /* storeInitParam("toolbar_limit",
// setCookie("ttrss_vf_vmode", toolbar_form.view_mode[toolbar_form.view_mode.selectedIndex].value);
storeInitParam("toolbar_limit",
toolbar_form.limit[toolbar_form.limit.selectedIndex].value); toolbar_form.limit[toolbar_form.limit.selectedIndex].value);
storeInitParam("toolbar_view_mode", storeInitParam("toolbar_view_mode",
toolbar_form.view_mode[toolbar_form.view_mode.selectedIndex].value); toolbar_form.view_mode[toolbar_form.view_mode.selectedIndex].value); */
/* var sp = new Object();
sp["toolbar_limit"] = toolbar_form.limit[toolbar_form.limit.selectedIndex].value;
sp["toolbar_view_mode"] = toolbar_form.view_mode[toolbar_form.view_mode.selectedIndex].value;
storeInitParams(sp); */
var query = "backend.php?op=viewfeed&feed=" + feed + "&" + var query = "backend.php?op=viewfeed&feed=" + feed + "&" +
toolbar_query + "&subop=" + param_escape(subop); toolbar_query + "&subop=" + param_escape(subop);
@@ -56,18 +55,6 @@ function viewfeed(feed, subop, is_cat, subop_param) {
if (subop == "MarkAllRead") { if (subop == "MarkAllRead") {
/* var feedr = document.getElementById("FEEDR-" + feed);
var feedctr = document.getElementById("FEEDCTR-" + feed);
if (feedr && feedctr) {
feedctr.className = "invisible";
if (feedr.className.match("Unread")) {
feedr.className = feedr.className.replace("Unread", "");
}
} */
var feedlist = document.getElementById('feedList'); var feedlist = document.getElementById('feedList');
var next_unread_feed = getRelativeFeedId(feedlist, var next_unread_feed = getRelativeFeedId(feedlist,
@@ -93,12 +80,6 @@ function viewfeed(feed, subop, is_cat, subop_param) {
query = query + "&ts=" + timestamp query = query + "&ts=" + timestamp
} }
debug(query);
headlines_frame.location.href = query;
// cleanSelectedList("feedList");
if (!activeFeedIsCat()) { if (!activeFeedIsCat()) {
var feedr = document.getElementById("FEEDR-" + getActiveFeedId()); var feedr = document.getElementById("FEEDR-" + getActiveFeedId());
if (feedr && !feedr.className.match("Selected")) { if (feedr && !feedr.className.match("Selected")) {
@@ -106,8 +87,19 @@ function viewfeed(feed, subop, is_cat, subop_param) {
} }
} }
parent.disableContainerChildren("headlinesToolbar", false); disableContainerChildren("headlinesToolbar", false);
parent.Form.enable("main_toolbar_form"); Form.enable("main_toolbar_form");
debug(query);
if (xmlhttp_ready(xmlhttp)) {
xmlhttp.open("GET", query, true);
xmlhttp.onreadystatechange=headlines_callback;
xmlhttp.send(null);
} else {
debug("xmlhttp busy (@feeds)");
}
} catch (e) { } catch (e) {
exception_error("viewfeed", e); exception_error("viewfeed", e);
@@ -147,7 +139,7 @@ function toggleCollapseCat(cat) {
} }
} }
function init() { function feedlist_init() {
try { try {
if (arguments.callee.done) return; if (arguments.callee.done) return;
arguments.callee.done = true; arguments.callee.done = true;

View File

@@ -162,6 +162,8 @@ function hotkey_handler(e) {
var keycode; var keycode;
if (!hotkeys_enabled) return; if (!hotkeys_enabled) return;
return; //fixme disables for now
if (window.event) { if (window.event) {
keycode = window.event.keyCode; keycode = window.event.keyCode;
@@ -468,8 +470,8 @@ function setActiveFeedId(id) {
function parse_counters(reply, scheduled_call) { function parse_counters(reply, scheduled_call) {
try { try {
var f_document = getFeedsContext().document; var f_document = document;
var title_obj = getMainContext(); var title_obj = this.window;
var feeds_found = 0; var feeds_found = 0;
@@ -602,7 +604,7 @@ function all_counters_callback() {
return; return;
} }
debug("in all_counters_callback"); debug("in all_counters_callback : " + xmlhttp_rpc.responseXML);
var reply = xmlhttp_rpc.responseXML.firstChild; var reply = xmlhttp_rpc.responseXML.firstChild;
@@ -1287,36 +1289,20 @@ function filterCR(e)
} }
function getMainContext() { function getMainContext() {
if (parent.window != window) { return this.window;
return parent.window;
} else {
return this.window;
}
} }
function getFeedsContext() { function getFeedsContext() {
try { return this.window;
return getMainContext().frames["feeds-frame"];
} catch (e) {
exception_error("getFeedsContext", e);
}
} }
function getContentContext() { function getContentContext() {
try { return this.window;
return getMainContext().frames["content-frame"];
} catch (e) {
exception_error("getContentContext", e);
}
} }
function getHeadlinesContext() { function getHeadlinesContext() {
try { return this.window;
return getMainContext().frames["headlines-frame"];
} catch (e) {
exception_error("getHeadlinesContext", e);
}
} }
var debug_last_class = "even"; var debug_last_class = "even";

View File

@@ -176,44 +176,44 @@ ul.feedList li {
margin : 0px; margin : 0px;
} }
ul.feedlist li.feedUnread, li.feedUnread,
ul.feedlist li.errorUnread, li.errorUnread,
ul.feedlist li.labelUnread, li.labelUnread,
ul.feedlist li.virtUnread, li.virtUnread,
ul.feedlist li.tagUnread { li.tagUnread {
font-weight : bold; font-weight : bold;
} }
ul.feedlist li.errorSelected a, li.errorSelected a,
ul.feedlist li.error a, li.error a,
ul.feedlist li.errorUnread a, li.errorUnread a,
ul.feedlist li.errorUnreadSelected a { li.errorUnreadSelected a {
color : #f04040; color : #f04040;
} }
ul.feedlist li.feedSelected a, li.feedSelected a,
ul.feedlist li.labelSelected a, li.labelSelected a,
ul.feedlist li.virtSelected a, li.virtSelected a,
ul.feedlist li.tagSelected a { li.tagSelected a {
color : #4684ff; color : #4684ff;
} }
ul.feedlist li.feedUnreadSelected a, li.feedUnreadSelected a,
ul.feedlist li.labelUnreadSelected a, li.labelUnreadSelected a,
ul.feedlist li.virtUnreadSelected a, li.virtUnreadSelected a,
ul.feedlist li.tagUnreadSelected a { li.tagUnreadSelected a {
color : #4684ff; color : #4684ff;
} }
ul.feedlist li.feedUnreadSelected, li.feedUnreadSelected,
ul.feedlist li.errorUnreadSelected, li.errorUnreadSelected,
ul.feedlist li.labelUnreadSelected, li.labelUnreadSelected,
ul.feedlist li.virtUnreadSelected, li.virtUnreadSelected,
ul.feedlist li.tagUnreadSelected { li.tagUnreadSelected {
font-weight : bold; font-weight : bold;
} }
ul.feedList li.feed { li.feed {
display : block; display : block;
} }
@@ -1060,14 +1060,14 @@ a.cdmToggleLink:hover {
} }
#debug_output { #debug_output {
width : 400; position : absolute;
height : 200; width : 400px;
right : 20; height : 200px;
bottom : 20; right : 20px;
bottom : 20px;
z-index : 999;
background-color : white; background-color : white;
display : none; display : none;
z-index : 999;
position : absolute;
border : 1px solid #c0c0c0; border : 1px solid #c0c0c0;
overflow : auto; overflow : auto;
margin : 0px; margin : 0px;
@@ -1223,3 +1223,88 @@ table.loginForm2 .innerLoginCell {
#milestoneDetails { #milestoneDetails {
display : none; display : none;
} }
/* layout */
#header {
position : absolute;
white-space: nowrap;
top : 10px;
left : 15px;
right : 5px;
height : 40px;
color : #4684ff;
font-size : x-small;
}
#feeds-holder {
border-width : 1px 1px 1px 0px;
border-style : solid;
border-color : #88b0f0;
top : 50px;
left : 0px;
position : absolute;
width : 260px;
overflow : auto;
bottom : 50px;
}
#toolbar {
position : absolute;
left : 261px;
padding : 5px 10px 5px 5px;
top : 50px;
right : 0px;
white-space: nowrap;
height : 30px;
background-image : url("images/toolbar.png");
background-position : bottom left;
background-repeat : repeat-x;
font-size : small;
}
#headlines-frame {
position : absolute;
border-width : 1px 0px 0px 0px;
border-style : solid;
border-color : #88b0f0;
left : 260px;
height : 300px;
top : 85px;
right : 0px;
overflow : auto;
font-size : small;
}
#content-frame {
position : absolute;
border-width : 1px 0px 1px 0px;
border-style : solid;
border-color : #88b0f0;
overflow : auto;
top : 390px;
left : 260px;
bottom : 50px;
right : 0px;
}
#footer {
position : absolute;
bottom : 0px;
height : 30px;
text-align : center;
color : gray;
font-size : x-small;
background-image : url("images/footer.png");
background-position : top left;
background-repeat : repeat-x;
background-color : white;
right : 0px;
left : 0px;
padding : 10px;
}
#headlinesContainer {
margin-left : 1px;
background-color : white;
}

View File

@@ -222,9 +222,20 @@ function updateFeedList(silent, fetch) {
if (fetch) query_str = query_str + "&fetch=yes"; if (fetch) query_str = query_str + "&fetch=yes";
var feeds_frame = document.getElementById("feeds-frame"); // var feeds_frame = document.getElementById("feeds-frame");
// feeds_frame.src = query_str;
debug("updateFeedList");
if (xmlhttp_ready(xmlhttp)) {
xmlhttp.open("GET", query_str, true);
xmlhttp.onreadystatechange=feedlist_callback;
xmlhttp.send(null);
} else {
debug("xmlhttp busy");
//printLockingError();
}
feeds_frame.src = query_str;
} }
function catchupAllFeeds() { function catchupAllFeeds() {
@@ -382,9 +393,11 @@ function resize_feeds_frame() {
if (th) { if (th) {
header_height = th.scrollHeight; header_height = th.scrollHeight;
} }
f.style.height = document.body.scrollHeight - footer_height - if (f) {
header_height - 50 + "px"; f.style.height = document.body.scrollHeight - footer_height -
header_height - 50 + "px";
}
} }
function init_second_stage() { function init_second_stage() {

View File

@@ -17,6 +17,8 @@
$dt_add = get_script_dt_add(); $dt_add = get_script_dt_add();
?> ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <html>
<head> <head>
<title>Tiny Tiny RSS</title> <title>Tiny Tiny RSS</title>
@@ -52,6 +54,9 @@
<script type="text/javascript" src="tt-rss.js?<?php echo $dt_add ?>"></script> <script type="text/javascript" src="tt-rss.js?<?php echo $dt_add ?>"></script>
<script type="text/javascript" src="functions.js?<?php echo $dt_add ?>"></script> <script type="text/javascript" src="functions.js?<?php echo $dt_add ?>"></script>
<script type="text/javascript" src="feedlist.js?<?php echo $dt_add ?>"></script>
<script type="text/javascript" src="viewfeed.js?<?php echo $dt_add ?>"></script>
<!--[if gte IE 5.5000]> <!--[if gte IE 5.5000]>
<script type="text/javascript" src="pngfix.js"></script> <script type="text/javascript" src="pngfix.js"></script>
<link rel="stylesheet" type="text/css" href="tt-rss-ie.css"> <link rel="stylesheet" type="text/css" href="tt-rss-ie.css">
@@ -70,7 +75,8 @@
<body> <body>
<div id="overlay"><div id="overlay_inner">Loading, please wait...</div></div> <!-- <div id="overlay"><div id="overlay_inner">Loading, please wait...</div></div> -->
<div id="fatal_error"><div id="fatal_error_inner"> <div id="fatal_error"><div id="fatal_error_inner">
<h1>Fatal Error</h1> <h1>Fatal Error</h1>
<div id="fatal_error_msg">Unknown Error</div> <div id="fatal_error_msg">Unknown Error</div>
@@ -89,69 +95,51 @@ window.onload = init;
start the daemon process or contact instance owner. start the daemon process or contact instance owner.
</div> </div>
<iframe id="backReqBox"></iframe>
<ul id="debug_output"></ul> <ul id="debug_output"></ul>
<div id="infoBoxShadow"><div id="infoBox">&nbsp;</div></div> <div id="infoBoxShadow"><div id="infoBox">&nbsp;</div></div>
<table width="100%" height="100%" cellspacing="0" cellpadding="0" class="main"> <div id="header">
<?php if (get_pref($link, 'DISPLAY_HEADER')) { ?> <?php if (!SINGLE_USER_MODE) { ?>
<tr> <div style="float : right">
<td colspan="2" class="headerBox" id="mainHeader">
<table cellspacing="0" cellpadding="0" width="100%"><tr>
<td rowspan="2" class="header" valign="middle">
<img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS">
</td>
<td valign="top" class="notifyBox">
<div id="notify" class="notify"><span id="notify_body">&nbsp;</span></div>
</td>
</tr><tr><td class="welcomePrompt">
<?php if (!SINGLE_USER_MODE) { ?>
Hello, <b><?php echo $_SESSION["name"] ?></b>
(<a href="logout.php">Logout</a>)
<?php } ?>
</td>
</tr></table>
</td>
</tr>
<?php } else { ?>
<tr>
<td class="small" id="mainHeader">
<div id="notify" class="notify_sm"><span id="notify_body">&nbsp;</span></div>
<div id="userDlgShadow"><div id="userDlg">&nbsp;</div></div>
</td><td class="welcomePrompt">
<?php if (!SINGLE_USER_MODE) { ?>
Hello, <b><?php echo $_SESSION["name"] ?></b> Hello, <b><?php echo $_SESSION["name"] ?></b>
(<a href="logout.php">Logout</a>) (<a href="logout.php">Logout</a>)
<?php } ?>
</td></tr>
<?php } ?>
<tr>
<?php if (get_pref($link, 'COMBINED_DISPLAY_MODE'))
$feeds_rowspan = 2;
else
$feeds_rowspan = 3; ?>
<td valign="top" rowspan="<?php echo $feeds_rowspan ?>" class="feeds">
<table class="innerFeedTable"
cellspacing="0" cellpadding="0" height="100%" width="100%">
<tr><td>
<div id="dispSwitch">
<a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
</div> </div>
</td></tr> <?php } ?>
<tr><td height="100%" width="100%" valign="top"> <img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS">
</div>
<iframe frameborder="0" <div id="feeds-holder">
id="feeds-frame" name="feeds-frame" class="feedsFrame"></iframe> <div id="dispSwitch">
<a id="dispSwitchPrompt" href="javascript:toggleTags()">display tags</a>
</div>
<div id="feeds-frame">-fixme-</div>
</div>
</td></tr></table> <div id="toolbar">
</td> <div style="float : right">
<td valign="top" class="headlinesToolbarBox"> <select id="quickMenuChooser" onchange="quickMenuChange()">
<table width="100%" cellpadding="0" cellspacing="0"> <option value="qmcDefault" selected>Actions...</option>
<option value="qmcPrefs">Preferences</option>
<tr><td class="headlinesToolbar" id="headlinesToolbar"> <option value="qmcSearch">Search</option>
<option disabled>--------</option>
<option style="color : #5050aa" disabled>Feed actions:</option>
<option value="qmcAddFeed">&nbsp;&nbsp;Subscribe to feed</option>
<option value="qmcRemoveFeed">&nbsp;&nbsp;Unsubscribe</option>
<!-- <option>Edit this feed</option> -->
<option disabled>--------</option>
<option style="color : #5050aa" disabled>All feeds:</option>
<?php if (!ENABLE_UPDATE_DAEMON && !DAEMON_REFRESH_ONLY) { ?>
<option value="qmcUpdateFeeds">&nbsp;&nbsp;Update</option>
<?php } ?>
<option value="qmcCatchupAll">&nbsp;&nbsp;Mark as read</option>
<option value="qmcShowOnlyUnread">&nbsp;&nbsp;Show only unread</option>
<option disabled>--------</option>
<option style="color : #5050aa" disabled>Other actions:</option>
<option value="qmcAddFilter">&nbsp;&nbsp;Create filter</option>
</select>
</div>
<form id="main_toolbar_form"> <form id="main_toolbar_form">
@@ -203,64 +191,15 @@ window.onload = init;
<input class="button" type="submit" <input class="button" type="submit"
onclick="catchupCurrentFeed()" value="Mark as read"> onclick="catchupCurrentFeed()" value="Mark as read">
</td> </div>
<td align="right">
<select id="quickMenuChooser" onchange="quickMenuChange()"> <div id="headlines-frame"> -fixme- </div>
<option value="qmcDefault" selected>Actions...</option>
<option value="qmcPrefs">Preferences</option> <div id="content-frame"> -fixme- </div>
<option value="qmcSearch">Search</option>
<option disabled>--------</option> <div id="footer">
<option style="color : #5050aa" disabled>Feed actions:</option> <a href="http://tt-rss.spb.ru/">Tiny Tiny RSS</a> v<?php echo VERSION ?> &copy; 2005-2006 Andrew Dolgov
<option value="qmcAddFeed">&nbsp;&nbsp;Subscribe to feed</option> </div>
<option value="qmcRemoveFeed">&nbsp;&nbsp;Unsubscribe</option>
<!-- <option>Edit this feed</option> -->
<option disabled>--------</option>
<option style="color : #5050aa" disabled>All feeds:</option>
<?php if (!ENABLE_UPDATE_DAEMON && !DAEMON_REFRESH_ONLY) { ?>
<option value="qmcUpdateFeeds">&nbsp;&nbsp;Update</option>
<?php } ?>
<option value="qmcCatchupAll">&nbsp;&nbsp;Mark as read</option>
<option value="qmcShowOnlyUnread">&nbsp;&nbsp;Show only unread</option>
<option disabled>--------</option>
<option style="color : #5050aa" disabled>Other actions:</option>
<option value="qmcAddFilter">&nbsp;&nbsp;Create filter</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<?php if (get_pref($link, 'COMBINED_DISPLAY_MODE')) { ?>
<tr>
<td id="headlines" class="headlines2" valign="top">
<iframe frameborder="0" name="headlines-frame"
id="headlines-frame" class="headlinesFrame"></iframe>
</td>
</tr>
<?php } else { ?>
<tr>
<td id="headlines" class="headlines" valign="top">
<iframe frameborder="0" name="headlines-frame"
id="headlines-frame" class="headlinesFrame"></iframe>
</td>
</tr><tr>
<td class="content" id="content" valign="top">
<iframe frameborder="0" name="content-frame"
id="content-frame" class="contentFrame"> </iframe>
</td>
</tr>
<?php } ?>
<?php if (get_pref($link, 'DISPLAY_FOOTER')) { ?>
<tr>
<td colspan="2" class="footer" id="mainFooter">
<a href="http://tt-rss.spb.ru/">Tiny Tiny RSS</a> v<?php echo VERSION ?> &copy; 2005-2006 Andrew Dolgov
<?php if (WEB_DEMO_MODE) { ?>
<br>Running in demo mode, some functionality is disabled.
<?php } ?>
</td>
</td>
<?php } ?>
</table>
<?php db_close($link); ?> <?php db_close($link); ?>

View File

@@ -1,3 +1,3 @@
<?php <?php
define('VERSION', "1.2.3-p1"); define('VERSION', "1.2.3.99");
?> ?>

View File

@@ -2,13 +2,30 @@ var active_post_id = false;
var xmlhttp_rpc = Ajax.getTransport(); var xmlhttp_rpc = Ajax.getTransport();
function headlines_callback() {
if (xmlhttp.readyState == 4) {
debug("headlines_callback");
var f = document.getElementById("headlines-frame");
f.innerHTML = xmlhttp.responseText;
}
}
function article_callback() {
if (xmlhttp.readyState == 4) {
debug("article_callback");
var f = document.getElementById("content-frame");
f.innerHTML = xmlhttp.responseText;
update_all_counters();
}
}
function view(id, feed_id) { function view(id, feed_id) {
try { try {
debug("loading article: " + id + "/" + feed_id); debug("loading article: " + id + "/" + feed_id);
var f_document = getFeedsContext().document; var f_document = getFeedsContext().document;
var m_document = parent.document; var m_document = document;
enableHotkeys(); enableHotkeys();
@@ -29,12 +46,20 @@ function view(id, feed_id) {
var content = m_document.getElementById("content-frame"); var content = m_document.getElementById("content-frame");
content.src = "backend.php?op=view&id=" + param_escape(id) +
"&feed=" + param_escape(feed_id);
selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false); selectTableRowsByIdPrefix('headlinesList', 'RROW-', 'RCHK-', false);
markHeadline(active_post_id); markHeadline(active_post_id);
var query = "backend.php?op=view&id=" + param_escape(id) +
"&feed=" + param_escape(feed_id);
if (xmlhttp_ready(xmlhttp)) {
xmlhttp.open("GET", query, true);
xmlhttp.onreadystatechange=article_callback;
xmlhttp.send(null);
} else {
debug("xmlhttp busy (@view)");
}
} catch (e) { } catch (e) {
exception_error("view", e); exception_error("view", e);
} }
@@ -42,7 +67,7 @@ function view(id, feed_id) {
function toggleMark(id) { function toggleMark(id) {
var f_document = parent.frames["feeds-frame"].document; var f_document = document;
if (!xmlhttp_ready(xmlhttp_rpc)) { if (!xmlhttp_ready(xmlhttp_rpc)) {
printLockingError(); printLockingError();
@@ -58,7 +83,6 @@ function toggleMark(id) {
if (mark_img.alt != "Reset mark") { if (mark_img.alt != "Reset mark") {
mark_img.src = "images/mark_set.png"; mark_img.src = "images/mark_set.png";
mark_img.alt = "Reset mark"; mark_img.alt = "Reset mark";
mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+')');
query = query + "&mark=1"; query = query + "&mark=1";
if (vfeedu && crow.className.match("Unread")) { if (vfeedu && crow.className.match("Unread")) {
@@ -68,7 +92,6 @@ function toggleMark(id) {
} else { } else {
mark_img.src = "images/mark_unset.png"; mark_img.src = "images/mark_unset.png";
mark_img.alt = "Set mark"; mark_img.alt = "Set mark";
mark_img.setAttribute('onclick', 'javascript:toggleMark('+id+')');
query = query + "&mark=0"; query = query + "&mark=0";
if (vfeedu && crow.className.match("Unread")) { if (vfeedu && crow.className.match("Unread")) {
@@ -134,11 +157,6 @@ function moveToPost(mode) {
} }
} }
function viewfeed(id) {
var f = parent.frames["feeds-frame"];
f.viewfeed(id, 0);
}
function toggleUnread(id, cmode) { function toggleUnread(id, cmode) {
try { try {
if (!xmlhttp_ready(xmlhttp_rpc)) { if (!xmlhttp_ready(xmlhttp_rpc)) {
@@ -368,7 +386,7 @@ function labelFromSearch(search, search_mode, match_on, feed_id, is_cat) {
function init() { function headlines_init() {
if (arguments.callee.done) return; if (arguments.callee.done) return;
arguments.callee.done = true; arguments.callee.done = true;