X-Git-Url: http://git.rot13.org/?p=bookreader.git;a=blobdiff_plain;f=BookReader%2FBookReader.js;h=82cb5040ed9b5fd8fb131b026f297af915e34412;hp=20a42c57d4b6ebf73445c6830e08ecd8ac5397f1;hb=d3c8000549c150b898dbf5cd26f30e0cdc8f409d;hpb=4b70a70867e6e0fef5f9581b8f7472ec38c2a2d2 diff --git a/BookReader/BookReader.js b/BookReader/BookReader.js index 20a42c5..82cb504 100644 --- a/BookReader/BookReader.js +++ b/BookReader/BookReader.js @@ -3727,13 +3727,21 @@ BookReader.prototype.initToolbar = function(mode, ui) { jToolbar.find('.share').colorbox({inline: true, opacity: "0.5", href: "#BRshare", onLoad: function() { self.ttsStop(); } }); jToolbar.find('.info').colorbox({inline: true, opacity: "0.5", href: "#BRinfo", onLoad: function() { self.ttsStop(); } }); - $("body").append(['
', - '
', - '
', - 'Share', - 'Close', - '
', - '
', + $('
').append(this.blankShareDiv()).append(this.blankInfoDiv()).appendTo($('body')); + + $('#BRinfo .BRfloatTitle a').attr( {'href': this.bookUrl} ).text(this.bookTitle).addClass('title'); + + // These functions can be overridden + this.buildInfoDiv($('#BRinfo')); + this.buildShareDiv($('#BRshare')); + + // Switch to requested mode -- binds other click handlers + //this.switchToolbarMode(mode); + +} + +BookReader.prototype.blankInfoDiv = function() { + return $([ '
', '
About this book', 'Close', @@ -3752,17 +3760,19 @@ BookReader.prototype.initToolbar = function(mode, ui) { '', - '
'].join('\n')); + '
'].join('\n') + ); +} - $('#BRinfo .BRfloatTitle a').attr( {'href': this.bookUrl} ).text(this.bookTitle).addClass('title').appendTo - - // These functions can be overridden - this.buildInfoDiv($('#BRinfo')); - this.buildShareDiv($('#BRshare')); - - // Switch to requested mode -- binds other click handlers - //this.switchToolbarMode(mode); - +BookReader.prototype.blankShareDiv = function() { + return $([ + '
', + '
', + 'Share', + 'Close', + '
', + '
'].join('\n') + ); } @@ -4634,25 +4644,7 @@ BookReader.prototype.gotOpenLibraryRecord = function(self, olObject) { $('#BRreturn a').attr('href', this.bookUrl); $('#BRinfo').remove(); - $('#BRshare').after(['
', - '
About this book', - 'Close', - '
', - '
', - '
', - '
', - '
', - '
', - '

', - '
', - - '
', - '
', - '
', - '
', - 'About the BookReader', - '
', - '
'].join('\n')); + $('#BRshare').after(self.blankShareDiv()); self.buildInfoDiv($('#BRinfo')); } }