Skip to content

Commit

Permalink
Changes for new interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Lance Arthur committed Oct 18, 2010
1 parent f46f1f5 commit 0929bea
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 118 deletions.
82 changes: 49 additions & 33 deletions BookReader/BookReader.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ h3 {
font-weight: 700;
color: #dedede;
}
a {
outline: none;
}
#BookReader {
position:absolute;
font-family: arial, sans-serif;
Expand All @@ -19,7 +22,7 @@ h3 {
bottom:0;
}
#BRtoolbar {
position: fixed;
position: relative;
top: 0;
left: 0;
height: 40px;
Expand Down Expand Up @@ -188,9 +191,10 @@ h3 {
height: 20px;
}
#BRreturn span {
font-size: 12px;
font-size: 11px;
display: block;
height: 12px;
padding-top: 3px;
}
#BRreturn a {
font-size: 14px;
Expand Down Expand Up @@ -229,43 +233,30 @@ h3 {
.BRicon.book_left:hover {background-position:-480px 0;}
.BRicon.book_right {background-position:-520px 0;}
.BRicon.book_right:hover {background-position:-560px 0;}
.BRicon.zoom_out {background-position:-606px 0;}
.BRicon.zoom_out:hover {background-position:-646px 0;}
.BRicon.zoom_in {background-position:-686px 0;}
.BRicon.zoom_in:hover {background-position:-726px 0;}
.BRicon.zoom_out {background-position:-600px 0;}
.BRicon.zoom_out:hover {background-position:-640px 0;}
.BRicon.zoom_in {background-position:-680px 0;}
.BRicon.zoom_in:hover {background-position:-720px 0;}
.BRicon.play {background-position:-760px 0;}
.BRicon.play:hover {background-position:-800px 0;}
.BRicon.pause {background-position:-840px 0;}
.BRicon.pause:hover {background-position:-880px 0;}
.BRicon.twopg {background-position:-920px 0;}
.BRicon.twopg:hover {background-position:-960px 0;}
.BRicon.onepg {background-position:-1000px 0;}
.BRicon.onepg:hover {background-position:-1040px 0;}
.BRicon.thumb {background-position:-1080px 0;}
.BRicon.thumb:hover {background-position:-1120px 0;}
.BRicon.fit {background-position:-1160px 0;}
.BRicon.fit:hover {background-position:-1200px 0;}


/* NOT CURRENTLY IN USE
.BRicon.embed {background-position:-440px;}
.BRicon.embed:hover {background-position:-480px 0;}
.BRicon.read {background-position:-520px 0;}
.BRicon.read:hover {background-position:-560px 0;}
.BRicon.full {background-position:-600px 0;}
.BRicon.full:hover {background-position:-640px 0;}
.BRicon.thumb {background-position:-680px 0;}
.BRicon.thumb:hover {background-position:-720px 0;}
.BRicon.twopg {background-position:-760px 0;display:none;}
.BRicon.twopg:hover {background-position:-800px 0;}
.BRicon.one_page_mode {background-position:;}
.BRicon.two_page_mode {background-position:;}
.BRicon.thumbnail_mode {background-position:;}
.BRicon.book_up {background-position:;}
.BRicon.book_down {background-position:;}
.BRicon.book_leftmost {background-position:;}
.BRicon.book_rightmost {background-position:;}
.BRicon.book_top {background-position:;}
.BRicon.book_bottom {background-position:;}
*/
a.logo {
display: block;
float: left;
width: 40px;
height: 40px;
margin-right: 10px;
margin: 0 5px;
background: transparent url(images/icon_home.png) no-repeat 0 0;
}
a.popOff {
Expand All @@ -278,7 +269,6 @@ a.popOff {
background-color: transparent;
background-repeat: no-repeat;
background-position: -1050px 0;
outline: none;
}
a.popOff:hover {
background-position: -1100px 0;
Expand Down Expand Up @@ -412,7 +402,7 @@ a.BRgrey:visited { color: #666; }

div#BRpage {
float: right;
width: 80px;
width: 320px;
padding-left:12px;
text-align: right;
}
Expand All @@ -428,16 +418,14 @@ div#BRnav {
}
div#BRnavpos {
position: relative;
margin-right: 80px;
margin-right: 320px;
height: 40px;
}
div#BRpager {
position: relative;

/* Account for padding around nav line */
margin-left: 10px;
margin-right: 10px;

height: 40px;
}
div#BRslider {
Expand All @@ -455,6 +443,9 @@ div#BRslider {
margin-left: -12px; /* Center icon */
background: url(images/slider.png);
z-index: 103;
}
#BRpager a {
text-decoration: none;
}
/*
width: 8px;
Expand Down Expand Up @@ -699,3 +690,28 @@ div#BRzoombtn {
font-size: 0.8em;
z-index: 3;
}
.BRnavCntl {
background-color: #e2dcc5;
position: absolute;
right: 20px;
width: 40px;
height: 30px;
cursor: pointer;
}
#BRnavCntlBtm {
bottom: 40px;
-moz-border-radius-topright: 8px;
-webkit-border-top-right-radius: 8px;
-moz-border-radius-topleft: 8px;
-webkit-border-top-left-radius: 8px;
}
.BRup {
background-image: url("images/nav_control-up.png");
background-position: 8px 4px;
background-repeat: no-repeat;
}
.BRdn {
background-image: url("images/nav_control-dn.png");
background-position: 8px 4px;
background-repeat: no-repeat;
}
66 changes: 56 additions & 10 deletions BookReader/BookReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2415,7 +2415,7 @@ BookReader.prototype.prefetchImg = function(index) {
if (index < 0 || index > (this.numLeafs - 1) ) {
// Facing page at beginning or end, or beyond
$(img).css({
'background-color': 'transparent'
'background-color': '#efefef'
});
}
img.src = pageURI;
Expand Down Expand Up @@ -3280,6 +3280,12 @@ BookReader.prototype.initNavbar = function() {
$('#BookReader').after(
'<div id="BRnav">'
+ '<div id="BRpage">' // Page turn buttons
+ '<button class="BRicon onepg"></button>'
+ '<button class="BRicon twopg"></button>'
+ '<button class="BRicon thumb"></button>'
+ '<button class="BRicon fit"></button>'
+ '<button class="BRicon zoom_in"></button>'
+ '<button class="BRicon zoom_out"></button>'
+ '<button class="BRicon book_left"></button>'
+ '<button class="BRicon book_right"></button>'
+ '</div>'
Expand All @@ -3291,6 +3297,7 @@ BookReader.prototype.initNavbar = function() {
+ '<div class="BRnavend" id="BRnavright"></div>'
+ '</div>'
+ '</div>'
+ '<div id="BRnavCntlBtm" class="BRnavCntl BRdn"></div>'
+ '</div>'
);

Expand Down Expand Up @@ -3502,8 +3509,7 @@ BookReader.prototype.addChapter = function(chapterTitle, pageNumber, pageIndex)
closeWhenOthersOpen: true,
cssStyles: {
padding: '12px 14px',
//backgroundColor: '#000',
backgroundColor: '#444', // To set it off slightly from the chapter marker
backgroundColor: '#000',
border: '4px solid #e2dcc5',
//borderBottom: 'none',
fontFamily: '"Arial", sans-serif',
Expand Down Expand Up @@ -3617,7 +3623,7 @@ BookReader.prototype.initToolbar = function(mode, ui) {
+ "<span><a class='logo' href='" + this.logoURL + "'></a></span>"
+ "<span id='BRreturn'><span>Back to</span><a href='" + this.bookUrl + "'>" + this.bookTitle + "</a></span>"
+ "</div>"

/*
+ "<div id='BRzoomer'>"
+ "<div id='BRzoompos'>"
+ "<button class='BRicon zoom_out'></button>"
Expand All @@ -3627,7 +3633,9 @@ BookReader.prototype.initToolbar = function(mode, ui) {
+ "</div>"
+ "<button class='BRicon zoom_in'></button>"
+ "</div>"
+ "</div>");
+ "</div>"
*/
);

this.updateToolbarZoom(this.reduce); // Pretty format

Expand Down Expand Up @@ -3809,12 +3817,12 @@ BookReader.prototype.bindToolbarNavHandlers = function(jToolbar) {
});

// $$$mang cleanup
$('#BRzoomer .zoom_in').bind('click', function() {
$('#BRpage .zoom_in').bind('click', function() {
self.zoom(1);
return false;
});

$('#BRzoomer .zoom_out').bind('click', function() {
$('#BRpage .zoom_out').bind('click', function() {
self.zoom(-1);
return false;
});
Expand Down Expand Up @@ -3902,7 +3910,7 @@ BookReader.prototype.hideNavigation = function() {
// $$$ don't hardcode height
$('#BRtoolbar').animate({top:-60});
$('#BRnav').animate({bottom:-60});
$('#BRzoomer').animate({right:-26});
//$('#BRzoomer').animate({right:-26});
}
}

Expand All @@ -3914,7 +3922,7 @@ BookReader.prototype.showNavigation = function() {
if (!this.navigationIsVisible()) {
$('#BRtoolbar').animate({top:0});
$('#BRnav').animate({bottom:0});
$('#BRzoomer').animate({right:0});
//$('#BRzoomer').animate({right:0});
}
}

Expand Down Expand Up @@ -4304,7 +4312,7 @@ BookReader.prototype._getPageHeight= function(index) {
// Returns the page URI or transparent image if out of range
BookReader.prototype._getPageURI = function(index, reduce, rotate) {
if (index < 0 || index >= this.numLeafs) { // Synthesize page
return this.imagesBaseURL + "/transparent.png";
return this.imagesBaseURL + "transparent.png";
}

if ('undefined' == typeof(reduce)) {
Expand Down Expand Up @@ -4803,3 +4811,41 @@ BookReader.prototype.ttsStartPolling = function () {
self.ttsNextChunk();
},500);
}
//FADING, ETC.
function changeArrow(){
setTimeout(function(){
$('#BRnavCntlBtm').removeClass('BRdn').addClass('BRup');
},3000);
};
$().ready(function(){
$('#BRtoolbar').animate({top:0},3000).animate({top:-40});
$('#BRnav').animate({bottom:0},3000).animate({bottom:-40});
changeArrow();
$('.BRnavCntl').animate({opacity:1},4000).animate({opacity:.25},1000);
$('.BRnavCntl').click(
function(){
if ($('#BRnavCntlBtm').hasClass('BRdn')) {
$('#BRtoolbar').animate({top:-40});
$('#BRnav').animate({bottom:-40});
$('#BRnavCntlBtm').addClass('BRup').removeClass('BRdn');
$('.BRnavCntl').animate({opacity:1},1000).animate({opacity:.25},1000);
} else {
$('#BRtoolbar').animate({top:0});
$('#BRnav').animate({bottom:0});
$('#BRnavCntlBtm').addClass('BRdn').removeClass('BRup');
$('.BRnavCntl').animate({opacity:1});
};
}
);
$('#BRnavCntlBtm').mouseover(function(){
if ($(this).hasClass('BRup')) {
$('.BRnavCntl').animate({opacity:1},250);
};
});
$('#BRnavCntlBtm').mouseleave(function(){
if ($(this).hasClass('BRup')) {
$('.BRnavCntl').animate({opacity:.25},250);
};
});
});

Binary file modified BookReader/images/BRicons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BookReader/images/marker_chap-off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified BookReader/images/marker_chap-on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BookReader/images/nav_control-dn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BookReader/images/nav_control-up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0929bea

Please sign in to comment.