From afd4eb4b06576a9d0d5357f734dff7506885cb5f Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 6 Mar 2014 11:58:36 +0000 Subject: [PATCH] check-bkp-status.in: Tweak auto-collapse of linked log sections. If a log is manually collapsed then forget it as being the auto-expanded section so that if it gets manually expanded again then it doesn't get auto-collapsed. --- check-bkp-status.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check-bkp-status.in b/check-bkp-status.in index 3e1f714..5bbbdc2 100644 --- a/check-bkp-status.in +++ b/check-bkp-status.in @@ -264,10 +264,11 @@ html_header () { function do_hide(d, b) { add_elt_class(d, 'hide'); b.textContent = '[show]'; + if (LAST_EXPAND !== null && d === LAST_EXPAND[0]) + LAST_EXPAND = null; } function expand_log(tag) { - if (LAST_EXPAND !== null) - do_hide(LAST_EXPAND[0], LAST_EXPAND[1]); + if (LAST_EXPAND !== null) do_hide(LAST_EXPAND[0], LAST_EXPAND[1]); var d = elt('logdump-' + tag); var b = elt('expand-' + tag); LAST_EXPAND = [d, b]; -- 2.11.0