added jstore path
[bookreader.git] / BookReaderDemo / BookReaderJSSimple.js
index 4d08470..4dd476d 100644 (file)
@@ -18,7 +18,10 @@ br.getPageHeight = function(index) {
 
 // We load the images from archive.org -- you can modify this function to retrieve images
 // using a different URL structure
-br.getPageURI = function(index) {
+br.getPageURI = function(index, reduce, rotate) {
+    // reduce and rotate are ignored in this simple implementation, but we
+    // could e.g. look at reduce and load images from a different directory
+    // or pass the information to an image server
     var leafStr = '000';            
     var imgStr = (index+1).toString();
     var re = new RegExp("0{"+imgStr.length+"}$");
@@ -77,8 +80,20 @@ br.getPageNum = function(index) {
 br.numLeafs = 15;
 
 // Book title and the URL used for the book title link
-br.bookTitle= 'Open Library Bookreader Presentation';
+br.bookTitle= 'Open Library BookReader Presentation';
 br.bookUrl  = 'http://openlibrary.org';
 
+// Override the path used to find UI images
+br.imagesBaseURL = '../BookReader/images/';
+
+br.getEmbedCode = function(frameWidth, frameHeight, viewParams) {
+    return "Embed code not supported in bookreader demo.";
+}
+
 // Let's go!
 br.init();
+
+// read-aloud and search need backend compenents and are not supported in the demo
+$('#BRtoolbar').find('.read').hide();
+$('#textSrch').hide();
+$('#btnSrch').hide();