From: Mark Wooding Date: Thu, 6 Mar 2014 11:58:36 +0000 (+0000) Subject: check-bkp-status.in: Tweak auto-collapse of linked log sections. X-Git-Tag: 1.0.2~2 X-Git-Url: https://git.distorted.org.uk/~mdw/rsync-backup/commitdiff_plain/afd4eb4b06576a9d0d5357f734dff7506885cb5f?hp=9e224eb10854cbc51964722b2a79ea89d7390fba 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. --- 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];