initial hidden feedlist work (refs #194)
This commit is contained in:
parent
54eb7d20dd
commit
24c1e1c144
27
feedlist.js
27
feedlist.js
|
@ -40,6 +40,11 @@ function viewfeed(feed, subop, is_cat, subop_param, skip_history, offset) {
|
||||||
cache_invalidate("F:" + feed);
|
cache_invalidate("F:" + feed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getInitParam("theme") == "" && getInitParam("hide_feedlist")) {
|
||||||
|
Element.hide("feeds-holder");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
var force_nocache = false;
|
var force_nocache = false;
|
||||||
|
|
||||||
var page_offset = 0;
|
var page_offset = 0;
|
||||||
|
@ -338,9 +343,11 @@ function feedlist_init() {
|
||||||
|
|
||||||
if (getInitParam("theme") == "") {
|
if (getInitParam("theme") == "") {
|
||||||
setTimeout("hide_footer()", 5000);
|
setTimeout("hide_footer()", 5000);
|
||||||
}
|
|
||||||
|
|
||||||
// init_hidden_feedlist();
|
if (getInitParam("hide_feedlist")) {
|
||||||
|
init_hidden_feedlist();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
exception_error("feedlist/init", e);
|
exception_error("feedlist/init", e);
|
||||||
|
@ -378,14 +385,26 @@ function hide_footer() {
|
||||||
|
|
||||||
function init_hidden_feedlist() {
|
function init_hidden_feedlist() {
|
||||||
try {
|
try {
|
||||||
|
debug("init_hidden_feedlist");
|
||||||
|
|
||||||
var fl = document.getElementById("feeds-holder");
|
var fl = document.getElementById("feeds-holder");
|
||||||
var fh = document.getElementById("headlines-frame");
|
var fh = document.getElementById("headlines-frame");
|
||||||
var fh = document.getElementById("headlines-frame");
|
var fc = document.getElementById("content-frame");
|
||||||
|
var ft = document.getElementById("toolbar");
|
||||||
|
var ff = document.getElementById("footer");
|
||||||
|
var fbtn = document.getElementById("toggle_feeds_btn");
|
||||||
|
|
||||||
new Effect.Fade(fl);
|
if (fbtn) Element.show(fbtn);
|
||||||
|
|
||||||
|
fl.style.top = fh.offsetTop + "px";
|
||||||
|
fl.style.backgroundColor = "white"; //FIXME
|
||||||
|
|
||||||
|
Element.hide(fl);
|
||||||
|
|
||||||
|
fh.style.left = "0px";
|
||||||
|
ft.style.left = "0px";
|
||||||
|
if (fc) fc.style.left = "0px";
|
||||||
|
if (ff) ff.style.left = "0px";
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
exception_error("init_hidden_feedlist", e);
|
exception_error("init_hidden_feedlist", e);
|
||||||
|
|
|
@ -2925,6 +2925,10 @@
|
||||||
print "<param key=\"hide_read_shows_special\" value=\"" .
|
print "<param key=\"hide_read_shows_special\" value=\"" .
|
||||||
(int) get_pref($link, "HIDE_READ_SHOWS_SPECIAL") . "\"/>";
|
(int) get_pref($link, "HIDE_READ_SHOWS_SPECIAL") . "\"/>";
|
||||||
|
|
||||||
|
if (defined('_HIDDEN_FL_TEST')) {
|
||||||
|
print "<param key=\"hide_feedlist\" value=\"1\"/>";
|
||||||
|
}
|
||||||
|
|
||||||
print "</init-params>";
|
print "</init-params>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
tt-rss.js
15
tt-rss.js
|
@ -739,4 +739,19 @@ function clearFeedArticles(feed_id) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggle_feedlist() {
|
||||||
|
try {
|
||||||
|
debug("toggle_feedlist");
|
||||||
|
|
||||||
|
var fl = document.getElementById("feeds-holder");
|
||||||
|
|
||||||
|
if (!Element.visible(fl)) {
|
||||||
|
Element.show(fl);
|
||||||
|
fl.style.zIndex = 30;
|
||||||
|
} else {
|
||||||
|
Element.hide(fl);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
exception_error(e, "toggle_feedlist");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -158,6 +158,9 @@ window.onload = init;
|
||||||
|
|
||||||
<form id="main_toolbar_form" onsubmit='return false'>
|
<form id="main_toolbar_form" onsubmit='return false'>
|
||||||
|
|
||||||
|
<input type="submit" value="<?php echo __("Toggle Feedlist") ?>" id="toggle_feeds_btn"
|
||||||
|
onclick="toggle_feedlist()" style="display : none">
|
||||||
|
|
||||||
<?php if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
|
<?php if (get_pref($link, 'ENABLE_SEARCH_TOOLBAR')) { ?>
|
||||||
|
|
||||||
<?php echo __('Search:') ?>
|
<?php echo __('Search:') ?>
|
||||||
|
|
Loading…
Reference in New Issue