- added popover to p2p/stealth mode button to explain the peer mode and

privacy issues.
- added popover to first-time use case to explain that specific servlets
are only visible after customization and/or crawl starts
This commit is contained in:
Michael Peter Christen 2014-04-02 13:33:43 +02:00
parent 8d35fcb1c7
commit 1b9ec9a1c5
5 changed files with 48 additions and 25 deletions

View File

@ -120,4 +120,7 @@ ul.nav li.dropdown:hover ul.dropdown-menu{
.tt-suggestion p {
margin: 0;
}
.popover {
z-index: 1600;
}

View File

@ -65,14 +65,23 @@
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
<ul class="nav nav-sidebar menugroup">
<ul class="nav nav-sidebar menugroup" id="first-steps"
data-trigger="hover" data-placement="right" data-container="body"
data-original-title="You just started a YaCy peer!"
data-content="As a first-time-user you see only basic functions. Set a use case or name your peer to see more options. Start a first web crawl to see all monitoring options."
>
<li><h3>First Steps</h3></li>
<li><a href="ConfigBasic.html" class="MenuItemLink">Use Case &amp; Account</a></li>
<li><a href="CrawlStartSite.html" class="MenuItemLink">Load Web Pages (Crawler)</a></li>
<li><a href="Performance_p.html" class="MenuItemLink lock">RAM/Disk Usage &amp; Updates</a></li>
</ul>
<ul class="nav nav-sidebar menugroup">
#(navigation-advanced)#<script>$("#first-steps").popover();</script>::#(/navigation-advanced)#
<ul class="nav nav-sidebar menugroup" id="monitoring"
data-trigger="hover" data-placement="right" data-container="body"
data-original-title="You did not yet start a web crawl!"
data-content="You do not see all monitoring options here, because some belong to crawl result monitoring. Start a web crawl to see that!"
>
<li><h3>Monitoring</h3></li>
<li><a href="Status.html" class="MenuItemLink">System Status</a></li>
#(navigation-p2p)#::<li><a href="Network.html" accesskey="w" class="MenuItemLink">Peer-to-Peer Network</a></li>#(/navigation-p2p)#
@ -81,6 +90,8 @@
#(navigation-crawlmonitor)#::<li><a href="Crawler_p.html" class="MenuItemLink lock">Crawler Monitor</a></li>#(/navigation-crawlmonitor)#
<!-- <li><a href="terminal_p.html" accesskey="t" class="MenuItemLink lock">Terminal</a></li> -->
</ul>
#(navigation-crawlmonitor)#<script>$("#monitoring").popover();</script>::#(/navigation-crawlmonitor)#
#(navigation-advanced)#::
<ul class="nav nav-sidebar menugroup">
<li><h3>Production</h3></li>

View File

@ -9,6 +9,10 @@
<title>Dashboard Template for Bootstrap</title>
<script src="/env/bootstrap/js/jquery.min.js"></script>
<script src="/env/bootstrap/js/bootstrap.min.js"></script>
<script src="/env/bootstrap/js/docs.min.js"></script>
<!-- Bootstrap core CSS -->
<link href="env/bootstrap/css/bootstrap.min.css" rel="stylesheet">
@ -112,6 +116,15 @@
</div>
</div>
<div>
<a href="#" id="example1" class="btn btn-lg btn-danger" data-content="And here's some amazing content." data-original-title="A title">popover</a>
<a href="#" id="example2" class="btn btn-lg btn-danger" title="A Title" role="button">tooltip</a>
<script type="text/javascript">
$("#example1").popover({'trigger':'hover', offset: 10});
$("#example2").tooltip();
</script>
</div>
<h2 class="sub-header">Section title</h2>
<div class="table-responsive">
<table class="table table-striped">
@ -243,12 +256,5 @@
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="env/bootstrap/js/jquery.min.js"></script>
<script src="env/bootstrap/js/bootstrap.min.js"></script>
<script src="env/bootstrap/js/docs.min.js"></script>
</body>
</html>

View File

@ -8,33 +8,36 @@
</script>
#(resource-select)#::
<form action="yacysearch.html" method="get" accept-charset="UTF-8">
<form
action="yacysearch.html" method="get" accept-charset="UTF-8" id="resource-switch-form"
data-trigger="hover" data-placement="right" data-container="body"
data-original-title="Your search is done using peers in the YaCy P2P network."
data-content="You can switch to 'Stealth Mode' which will switch off P2P, giving you full privacy. Expect less results then, because then only your own search index is used."
>
<input checked="checked"
data-label-text="Privacy"
data-on-text="<span style='padding:0 20px 0 20px;'>Peer-to-Peer</span>"
data-off-text="<span style='padding:0 20px 0 20px;'>Stealth&nbsp;Mode</span>"
data-on-text="<span>&nbsp;&nbsp;&nbsp;Peer-to-Peer&nbsp;&nbsp;&nbsp;&nbsp;</span>"
data-off-text="<span>&nbsp;&nbsp;&nbsp;&nbsp;Stealth&nbsp;Mode&nbsp;&nbsp;&nbsp;</span>"
data-on-color="warning" data-off-color="success"
type="checkbox" name="resource-switch" value="local" data-size="large"
onchange="document.getElementById('resource').value='local';document.searchform.submit();">
</form>
<script>$("[name='resource-switch']").bootstrapSwitch();</script>
<!--
<span>Your search is done using peers in the YaCy P2P network. You can switch to 'Stealth Mode' which will switch off P2P, giving you full privacy. Expect less results then, because then only your own search index is used.</span>
-->
<script>$("#resource-switch-form").popover(); $("[name='resource-switch']").bootstrapSwitch();</script>
::
<form action="yacysearch.html" method="get" accept-charset="UTF-8">
<form action="yacysearch.html" method="get" accept-charset="UTF-8" id="resource-switch-form"
data-trigger="hover" data-placement="right" data-container="body"
data-original-title="Your search is done using only your own peer, locally."
data-content="You can switch to 'Peer-to-Peer Mode' which will cause that your search is done using the other peers in the YaCy network."
>
<input
data-label-text="Privacy"
data-on-text="<span style='padding:0 20px 0 20px';>Peer-to-Peer</span>"
data-off-text="<span style='padding:0 20px 0 20px;'>Stealth&nbsp;Mode</span>"
data-on-text="<span>&nbsp;&nbsp;&nbsp;Peer-to-Peer&nbsp;&nbsp;&nbsp;&nbsp;</span>"
data-off-text="<span>&nbsp;&nbsp;&nbsp;&nbsp;Stealth&nbsp;Mode&nbsp;&nbsp;&nbsp;</span>"
data-on-color="warning" data-off-color="success"
type="checkbox" name="resource-switch" value="global" data-size="large"
onchange="document.getElementById('resource').value='global';document.searchform.submit();">
</form>
<script>$("[name='resource-switch']").bootstrapSwitch();</script>
<!--
<span>Your search is done using only your own peer, locally. You can switch to 'Peer-to-Peer Mode' which will cause that your search is done using the other peers in the YaCy network.</span>
-->
<script>$("#resource-switch-form").popover(); $("[name='resource-switch']").bootstrapSwitch();</script>
#(/resource-select)#
<p class="navbutton">

View File

@ -892,7 +892,7 @@ public class YaCyDefaultServlet extends HttpServlet {
templatePatterns.putHTML("newpeer_peerhash", myPeer.hash);
templatePatterns.put("navigation-p2p", sb.getConfigBool(SwitchboardConstants.DHT_ENABLED, true) || !sb.isRobinsonMode() ? 1 : 0);
templatePatterns.put("navigation-crawlmonitor", sb.getConfig("server.servlets.submitted", "").indexOf("Crawler_p") >= 0);
templatePatterns.put("navigation-advanced", sb.getConfig("server.servlets.submitted", "").indexOf("Config") >= 0 || sb.getConfig("server.servlets.called", "").indexOf("CrawlStart") >= 0);
templatePatterns.put("navigation-advanced", sb.getConfig("server.servlets.submitted", "").indexOf("ConfigBasic") >= 0 || sb.getConfig("server.servlets.submitted", "").indexOf("CrawlStart") >= 0);
templatePatterns.put(SwitchboardConstants.GREETING_HOMEPAGE, sb.getConfig(SwitchboardConstants.GREETING_HOMEPAGE, ""));
templatePatterns.put(SwitchboardConstants.GREETING_SMALL_IMAGE, sb.getConfig(SwitchboardConstants.GREETING_SMALL_IMAGE, ""));