a415b46e764f69b880f0cb1220964c92c76e4914 chmalee Thu Jun 15 11:00:04 2023 -0700 Don't show notification box on configure page of hgTracks, no refs diff --git src/hg/js/utils.js src/hg/js/utils.js index c637730..8fc1bc2 100644 --- src/hg/js/utils.js +++ src/hg/js/utils.js @@ -789,33 +789,35 @@ ix = content.indexOf(sectionEnd); if (ix < 0) return ""; content = content.substring(0,ix); if (debug) alert('page nonce='+content); return content; } function notifBoxShow(cgiName, keyName) { /* move the notification bar div under '#TrackHeaderForm' */ let lsKey = cgiName + "_" + keyName; var notifEl = document.getElementById(lsKey + "notifBox"); // TODO: make a generic element for positioning this var parentEl = document.getElementById('TrackHeaderForm'); + if (parentEl) { parentEl.appendChild(notifEl); notifEl.style.display = 'block'; } +} function notifBoxSetup(cgiName, keyName, msg) { /* Create a notification box if one hasn't been created, and * add msg to the list of shown notifications. * cgiName.keyName will be saved to localStorage in order to show * or hide this notification. * Must call notifBoxShow() in order to display the notification */ lsKey = cgiName + "_" + keyName; let notifBox = document.getElementById(lsKey+"notifBox"); if (notifBox) { notifBox.innerHTML += "<br>" + msg; } else { let newDiv = document.createElement("div"); newDiv.className = "notifBox"; newDiv.style.display = "none";