hideOrShowFeeds(document, getInitParam("hide_read_feeds") == 1);
document.onkeydown = hotkey_handler;
+ document.onmousemove = mouse_move_handler;
+ document.onmousedown = mouse_down_handler;
+ document.onmouseup = mouse_up_handler;
setTimeout("timeout()", 0);
/* debug("about to remove splash, OMG!");
}
+var mouse_is_down = false;
+var mouse_y = 0;
+function mouse_move_handler(e) {
+ try {
+ var client_y;
+
+ if (window.event) {
+ client_y = window.event.clientY;
+ } else if (e) {
+
+ }
+
+ if (mouse_is_down) {
+ if (mouse_y == 0) mouse_y = client_y;
+
+ debug("moved delta: " + (mouse_y - client_y));
+
+ resize_headlines(0, mouse_y - client_y);
+ return false;
+ }
+
+ } catch (e) {
+ exception_error("mouse_move_handler", e);
+ }
+}
+
+function mouse_down_handler(e) {
+ try {
+
+ mouse_is_down = true;
+
+ } catch (e) {
+ exception_error("mouse_move_handler", e);
+ }
+}
+
+function mouse_up_handler(e) {
+ try {
+
+ mouse_is_down = false;
+
+ } catch (e) {
+ exception_error("mouse_move_handler", e);
+ }
+}
/* height: expression((parseInt(document.documentElement.clientHeight)-40-305-50)+'px'); */
}
+#resize-grabber {
+ position : absolute;
+ border-width : 1px;
+ border-style : dotted;
+ border-color : #88b0f0;
+ background-color : white;
+ width : 10px;
+ height : 10px;
+ z-index : 20;
+ right : 10px;
+ top : 20px;
+ display : none;
+ cursor : move;
+}
+
#footer, #prefFooter {
position : absolute;
bottom : 0px;
var _hfd_scrolltop = 0;
var hotkey_prefix = false;
var init_params = new Object();
+var ver_reflow_delta = 0;
function tagsAreDisplayed() {
return display_tags;
}
}
-function resize_headlines() {
+function resize_headlines(delta_x, delta_y) {
+
+ ver_reflow_delta = delta_y;
var h_frame = document.getElementById("headlines-frame");
var c_frame = document.getElementById("content-frame");
var f_frame = document.getElementById("footer");
var feeds_frame = document.getElementById("feeds-holder");
+ var resize_grab = document.getElementById("resize-grabber");
if (!c_frame || !h_frame) return;
debug("resize_headlines: VER-mode");
if (!is_msie()) {
- h_frame.style.height = 30 + "%";
- c_frame.style.top = h_frame.offsetTop + h_frame.offsetHeight + 1 + "px";
+ h_frame.style.height = (300 - ver_reflow_delta) + "px";
+
+ c_frame.style.top = (h_frame.offsetTop + h_frame.offsetHeight + 1) + "px";
h_frame.style.height = h_frame.offsetHeight + "px";
+
+ resize_grab.style.top = (h_frame.offsetTop + h_frame.offsetHeight - 5) + "px";
+ resize_grab.style.display = "block";
+
} else {
h_frame.style.height = document.documentElement.clientHeight * 0.3 + "px";
c_frame.style.top = h_frame.offsetTop + h_frame.offsetHeight + 1 + "px";
c_frame.style.height = c_bottom - (h_frame.offsetTop +
h_frame.offsetHeight + 1) + "px";
h_frame.style.height = h_frame.offsetHeight + "px";
-
+
}
}
<div id="headlines-frame" class="headlines_normal">
<div class="whiteBox"><?php echo __('No feed selected.') ?></div></div>
<div id="content-frame"><div class="whiteBox"> </div></div>
+ <div id="resize-grabber" title="<?php echo __('Drag me to resize panels') ?>"> </div>
<?php } else { ?>
<div id="headlines-frame" class="headlines_cdm">
<div class="whiteBox"><?php echo __('No feed selected.') ?></div></div>