b70a6f4e7e5d17234be5fa3c2a9fafe721237baf max Wed Apr 28 02:46:33 2021 -0700 making warnbox a bit less wide, refs #27460 diff --git src/lib/htmshell.c src/lib/htmshell.c index 346a5e6..a79b16a 100644 --- src/lib/htmshell.c +++ src/lib/htmshell.c @@ -615,31 +615,31 @@ // "var app=navigator.appName.substr(0,9); " // "if(app == 'Microsoft') {warnBox.style.display='';} // else {warnBox.style.display=''; warnBox.style.width='auto';}" struct dyString *dy = dyStringNew(2048); fprintf(f,"<center>" "<div id='warnBox' style='display:none;'>" "<CENTER><B id='warnHead'></B></CENTER>" "<UL id='warnList'></UL>" "<CENTER><button id='warnOK'></button></CENTER>" "</div></center>\n"); // TODO we should just move these warnBox functions to utils.js or warning.js or something. dyStringPrintf(dy,"function showWarnBox() {" "document.getElementById('warnOK').innerHTML=' OK ';" "var warnBox=document.getElementById('warnBox');" - "warnBox.style.display=''; warnBox.style.width='65%%';" + "warnBox.style.display='';" "document.getElementById('warnHead').innerHTML='Warning/Error(s):';" "window.scrollTo(0, 0);" "}\n"); dyStringPrintf(dy,"function hideWarnBox() {" "var warnBox=document.getElementById('warnBox');" "warnBox.style.display='none';" "var warnList=document.getElementById('warnList');" "warnList.innerHTML='';" "var endOfPage = document.body.innerHTML.substr(document.body.innerHTML.length-20);" // TODO maybe just looking at the last 20 characters of the html page is no longer enough // because the final js inline trash temp gets emitted. Looks like it is 93 characters long but could be longer. // This might be old cruft needed for a browser issue that no longer exists? "if(endOfPage.lastIndexOf('-- ERROR --') > 0) { history.back(); }" "}\n"); // Note OK button goes to prev page when this page is interrupted by the error. // Added by Galt