Skip to content

Commit

Permalink
NAS-2889 Show/hide crawler traps
Browse files Browse the repository at this point in the history
  • Loading branch information
bnfleb committed Aug 2, 2023
1 parent 01b069f commit 25d6c99
Showing 1 changed file with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ Display all the form information for this domain
<tr>
<th><fmt:message key="crawler.traps"/></th>
</tr>
<tr><td><a id="showCrawlertraps" href="" onclick="showHideCrawlertraps();return false;">
<span id="showCrawlerTrap"><fmt:message key="show.crawler.traps"/></span>
<span id="hideCrawlerTrap"><fmt:message key="hide.crawler.traps"/></span>
</a></td></tr>
<tr id="crawlertrapRow">
<td>
<textarea rows="<%=Constants.CRAWLERTRAPS_ROWS%>" cols="<%=Constants.CRAWLERTRAPS_COLUMNS%>"
Expand All @@ -330,15 +334,23 @@ Display all the form information for this domain
</table>
</div>

<a id="showCrawlertraps" href="" onclick="showCrawlertraps();return false;">
<fmt:message key="show.crawler.traps"/></a>


<script type="text/javascript">
document.getElementById("crawlertrapRow").style.display = "none";
function showCrawlertraps() {
document.getElementById("crawlertrapRow").style.display = "none";
document.getElementById("hideCrawlerTrap").style.display = "none";
function showHideCrawlertraps() {
if (document.getElementById("hideCrawlerTrap").style.display == "none") {
// show crawler traps
document.getElementById("crawlertrapRow").style.display = "block";
document.getElementById("showCrawlertraps").style.display = "none";
document.getElementById("hideCrawlerTrap").style.display = "block";
document.getElementById("showCrawlerTrap").style.display = "none";
} else {
// hide crawler traps
document.getElementById("crawlertrapRow").style.display = "none";
document.getElementById("hideCrawlerTrap").style.display = "none";
document.getElementById("showCrawlerTrap").style.display = "block";
}
}
</script>

<br/>
Expand Down

0 comments on commit 25d6c99

Please sign in to comment.