diff --git a/dev/patchbot/scripts/post-ai.sh b/dev/patchbot/scripts/post-ai.sh index cfd21a00a..654a6a161 100755 --- a/dev/patchbot/scripts/post-ai.sh +++ b/dev/patchbot/scripts/post-ai.sh @@ -267,6 +267,26 @@ function show_only(b,n,u,w,y) { updt(0,"r"); } +// Resynchronizes the review variable with the checked review radio: across +// a reload, the browser restores the radios to the user's last selection +// (e.g. "All") while the variable is regenerated to the default first line +// to review, and the listing would not match the checked radio anymore. +function init_review() { + var i, el; + + if (document.getElementById("show_all").checked) { + review = 0; + return; + } + for (i = 1; i <= nb_patches; i++) { + el = document.getElementById("rv_" + i); + if (el && el.checked) { + review = i; + return; + } + } +} + // --> @@ -383,7 +403,7 @@ for patch in "${PATCHES[@]}"; do resp=$(echo "$resp" | sed -e "s|\([0-9a-f]\{7,40\}\)|\1|g") echo -n "$seq_num
" - echo -n "" + echo -n "" echo -n "$cid${date:+
$date}" echo -n "${pnum:+$pnum }$subj${author:+
$author
}" echo -n "" @@ -406,12 +426,12 @@ for patch in "${PATCHES[@]}"; do fi done -echo "New
CIDSubjectVerdict
N U W Y
Reason" +echo "New
CIDSubjectVerdict
N U W Y
Reason" echo "" echo "

" echo "

Output:

" echo "" echo "

" -echo "" +echo "" echo ""