added title attributes for toolbar buttons

This commit is contained in:
Bala Clark 2011-09-03 08:39:05 +02:00
parent 130463606c
commit 3629bbbc2e

View file

@ -4,8 +4,9 @@
TODOs: TODOs:
Fo sho: Fo sho:
- make control images sprites
- disable the strech button if in an auto zoom mode
- page controls - current page indicator - page controls - current page indicator
- style page controls
- improve prev/next buttons, only show them when they can possibly work (not at beginning/end) - improve prev/next buttons, only show them when they can possibly work (not at beginning/end)
- an "alert" control for any error messages / notifications ( & remove any instances of alert() ) - an "alert" control for any error messages / notifications ( & remove any instances of alert() )
- decouple controls from reader api - decouple controls from reader api
@ -163,6 +164,7 @@ function ComicBook(id, srcs, opts) {
.addClass("cb-control") .addClass("cb-control")
.append( .append(
$(document.createElement("button")) $(document.createElement("button"))
.attr("title", "close the toolbar")
.addClass("cb-close") .addClass("cb-close")
.click(function(){ .click(function(){
ComicBook.prototype.toggleToolbar(); ComicBook.prototype.toggleToolbar();
@ -170,6 +172,7 @@ function ComicBook(id, srcs, opts) {
) )
.append( .append(
$(document.createElement("button")) $(document.createElement("button"))
.attr("title", "switch between dual and single page modes")
.addClass("cb-layout " + options.displayMode) .addClass("cb-layout " + options.displayMode)
.click(function(){ .click(function(){
ComicBook.prototype.toggleLayout(); ComicBook.prototype.toggleLayout();
@ -177,6 +180,7 @@ function ComicBook(id, srcs, opts) {
) )
.append( .append(
$(document.createElement("button")) $(document.createElement("button"))
.attr("title", "tweak the page colors")
.addClass("cb-color cb-menu-button") .addClass("cb-color cb-menu-button")
.click(function(){ .click(function(){
ComicBook.prototype.toggleControl("color"); ComicBook.prototype.toggleControl("color");
@ -184,6 +188,7 @@ function ComicBook(id, srcs, opts) {
) )
.append( .append(
$(document.createElement("button")) $(document.createElement("button"))
.attr("title", "zoom out")
.addClass("cb-zoom-out") .addClass("cb-zoom-out")
.click(function(){ .click(function(){
ComicBook.prototype.zoom(scale - 0.1); ComicBook.prototype.zoom(scale - 0.1);
@ -191,6 +196,7 @@ function ComicBook(id, srcs, opts) {
) )
.append( .append(
$(document.createElement("button")) $(document.createElement("button"))
.attr("title", "zoom in")
.addClass("cb-zoom-in") .addClass("cb-zoom-in")
.click(function(){ .click(function(){
ComicBook.prototype.zoom(scale + 0.1); ComicBook.prototype.zoom(scale + 0.1);
@ -198,6 +204,7 @@ function ComicBook(id, srcs, opts) {
) )
.append( .append(
$(document.createElement("button")) $(document.createElement("button"))
.attr("title", "fit to page width")
.addClass("cb-fit-width") .addClass("cb-fit-width")
.click(function(){ .click(function(){
options.zoomMode = "fitWidth" options.zoomMode = "fitWidth"