X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=BookReader%2FBookReader.js;h=17fc7f7d75d13d87285c8fbd43ff1e0891a63e2c;hb=9c21cfe909dcaab362099efef6fd81ce33e2fb69;hp=404bf2d975258cc42cef62697631b2037ac5f348;hpb=4f61bd0f39ac50f526405dbf4f253cff5c04a93f;p=bookreader.git diff --git a/BookReader/BookReader.js b/BookReader/BookReader.js index 404bf2d..17fc7f7 100644 --- a/BookReader/BookReader.js +++ b/BookReader/BookReader.js @@ -354,7 +354,6 @@ BookReader.prototype.bindGestures = function(jElement) { br.zoom(-1); } }); - } BookReader.prototype.setClickHandler2UP = function( element, data, handler) { @@ -3201,7 +3200,27 @@ BookReader.prototype.initNavbar = function() { // $$$ should make this work inside the BookReader div (self-contained), rather than after $('#BookReader').after( - '
' + '
' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + // XXXmang update code to update pagenum + + '
n141 / 325
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' ); /* @@ -3259,8 +3278,14 @@ BookReader.prototype.initNavbar = function() { }); }); */ - - $("#pager").draggable({axis:'x',containment:'parent'}); + $("#BRslider").draggable({axis:'x',containment:'parent'}); + $("#BRzoombtn").draggable({axis:'y',containment:'parent'}); + $("#BRslider").hover( + function(){ + $("#pagenum").show(); + },function(){ + $("#pagenum").hide(); + }); } BookReader.prototype.addSearchResult = function(queryString, pageNumber, pageIndex) { @@ -3410,34 +3435,56 @@ BookReader.prototype.addChapterFromEntry = function(tocEntryObject) { if (pageIndex) { this.addChapter(tocEntryObject['title'], tocEntryObject['pagenum'], pageIndex); } + $('.chapter').each(function(){ + $(this).hover(function(){ + $(this).addClass('front'); + },function(){ + $(this).removeClass('front'); + }); + }); + $('.search').each(function(){ + $(this).hover(function(){ + $(this).addClass('front'); + },function(){ + $(this).removeClass('front'); + }); + }); + $('.searchChap').each(function(){ + $(this).hover(function(){ + $(this).addClass('front'); + },function(){ + $(this).removeClass('front'); + }); + }); } BookReader.prototype.initToolbar = function(mode, ui) { // $$$mang should be contained within the BookReader div instead of body - $("body").append("
" - + "" - + "" - + "" - + "" - + "" - + "" -// + "" -// + "" -// + "" -// + "" - + "" - - + "" - + "" - + "" + $("body").append( + "
" + + "" /* XXXmang integrate search */ - + "
" - + "" - + "" - + "" - + "
" + + "
" + // XXXmang icons incorrect or handlers wrong + + "" + + "" + + "" + + "" + + "" + + "" + + "Back to" + this.bookTitle + "" + + "
" + + "
" + + "
" + + "" + + "
" + + "
" + + "
" + + "
" + + "" + + "
" + "
"); this.updateToolbarZoom(this.reduce); // Pretty format @@ -3697,6 +3744,7 @@ BookReader.prototype.hideNavigation = function() { // $$$ don't hardcode height $('#BRtoolbar').animate({top:-60}); $('#BRnav').animate({bottom:-60}); + $('#BRzoomer').animate({right:-26}); } } @@ -3708,6 +3756,7 @@ BookReader.prototype.showNavigation = function() { if (!this.navigationIsVisible()) { $('#BRtoolbar').animate({top:0}); $('#BRnav').animate({bottom:0}); + $('#BRzoomer').animate({right:0}); } }