Add a "Home" in the bottom bar, to start a new search

Fix the "top" button in the bottom bar : on a device, it did not work because it was too close to the scrollbar and triggered a "page down"
Fixes #36
This commit is contained in:
mossroy 2013-08-02 11:21:09 +02:00
parent 5cd5a80551
commit 2c2f45b2be
2 changed files with 15 additions and 4 deletions

View File

@ -130,9 +130,15 @@
</article> </article>
<footer> <footer>
<div id="navigationButtons" class="btn-toolbar"> <div id="navigationButtons" class="btn-toolbar">
<a class="btn btn-large" id="btnBack" title="Back"><span class="glyphicon glyphicon-circle-arrow-left"></span></a> <!-- We need to restrict the size of this navbar,
<a class="btn btn-large" id="btnForward" title="Forward"><span class="glyphicon glyphicon-circle-arrow-right"></span></a> to avoid the top button to be in the scrollbar area :
<a class="btn btn-large pull-right" id="btnTop" title="Top" href="#top"><span class="glyphicon glyphicon-arrow-up"></span></a> on a device, it can trigger a "page down" of the scrollbar -->
<div style="max-width: 80%; margin-left: auto; margin-right: auto;">
<a class="btn btn-large pull-left" id="btnHomeBottom" title="Home"><span class="glyphicon glyphicon-home"></span></a>
<a class="btn btn-large" id="btnBack" title="Back"><span class="glyphicon glyphicon-circle-arrow-left"></span></a>
<a class="btn btn-large" id="btnForward" title="Forward"><span class="glyphicon glyphicon-circle-arrow-right"></span></a>
<a class="btn btn-large pull-right" id="btnTop" title="Top" href="#top"><span class="glyphicon glyphicon-arrow-up"></span></a>
</div>
</div> </div>
</footer> </footer>
</section> </section>

View File

@ -25,6 +25,7 @@ define(function(require) {
$('#prefix').on('keyup', function(e) { $('#prefix').on('keyup', function(e) {
onKeyUpPrefix(e); onKeyUpPrefix(e);
}); });
// Bottome bar :
$('#btnBack').on('click', function(e) { $('#btnBack').on('click', function(e) {
history.back(); history.back();
return false; return false;
@ -33,7 +34,11 @@ define(function(require) {
history.forward(); history.forward();
return false; return false;
}); });
// Navigation bar : $('#btnHomeBottom').on('click', function(e) {
$('#btnHome').click();
return false;
});
// Top menu :
$('#btnHome').on('click', function(e) { $('#btnHome').on('click', function(e) {
// Highlight the selected section in the navbar // Highlight the selected section in the navbar
$('#liHomeNav').attr("class","active"); $('#liHomeNav').attr("class","active");