summaryrefslogtreecommitdiff
path: root/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-05-20 04:43:21 +0100
committerAndrew Dolgov <[email protected]>2008-05-20 04:43:21 +0100
commitd16a515917244bcc3a2ee98cabb2ebc0fd22e7d2 (patch)
tree5ce0854f8f9881b82d9849af9a99597c358fc4c9 /tt-rss.js
parentcfd58e50aa29ef1fbcb83a7e45576ba3b15d0b39 (diff)
add action to reset UI layout, resize_headlines parameter checking
Diffstat (limited to 'tt-rss.js')
-rw-r--r--tt-rss.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/tt-rss.js b/tt-rss.js
index dcfcb87ab..61598a99b 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -376,12 +376,14 @@ function resize_headlines(delta_x, delta_y) {
if (getInitParam("theme") == "3pane") {
if (c_frame.offsetLeft > feeds_frame.offsetWidth + feeds_frame.offsetLeft + 100) {
- hor_offset = delta_x;
+ if (delta_x != undefined) {
+ hor_offset = delta_x;
+ }
}
debug("resize_headlines: HOR-mode");
- c_frame.style.width = (400+hor_offset) + "px";
+ c_frame.style.width = (400 + hor_offset) + "px";
h_frame.style.right = c_frame.offsetWidth - 1 + "px";
resize_grab.style.top = (h_frame.offsetTop + h_frame.offsetHeight - 60) + "px";
@@ -391,7 +393,9 @@ function resize_headlines(delta_x, delta_y) {
} else {
- ver_offset = delta_y;
+ if (delta_y != undefined) {
+ ver_offset = delta_y;
+ }
debug("resize_headlines: VER-mode");
@@ -578,6 +582,12 @@ function quickMenuGo(opid) {
Effect.Appear("hotkey_help_overlay", {duration : 0.3});
}
+ if (opid == "qmcResetUI") {
+ hor_offset = 0;
+ ver_offset = 0;
+ resize_headlines();
+ }
+
} catch (e) {
exception_error("quickMenuGo", e);
}