Override image directory in BookReaderJSSimple.js for the standalone BookReader....
authorMichael Ang <mang@archive.org>
Fri, 17 Sep 2010 23:10:11 +0000 (23:10 +0000)
committerMichael Ang <mang@archive.org>
Fri, 17 Sep 2010 23:10:11 +0000 (23:10 +0000)
BookReader/BookReader.js
BookReaderDemo/BookReaderDemo.css [new file with mode: 0644]
BookReaderDemo/BookReaderJSSimple.js
BookReaderDemo/index.html

index a7162a2..d0eb83d 100644 (file)
@@ -72,9 +72,13 @@ function BookReader() {
     this.lastDisplayableIndex2up = null;
     
     // We link to index.php to avoid redirect which breaks back button
+    // Should be overriden (before init) by custom implmentations.
     this.logoURL = 'http://www.archive.org/index.php';
     
-    // Base URL for images
+    // Base URL for UI images - should be overriden (before init) by
+    // custom implementations.
+    // $$$ This is the same directory as the images referenced by relative
+    //     path in the CSS.  Would be better to automagically find that path.
     this.imagesBaseURL = '/bookreader/images/';
     
     // Mode constants
diff --git a/BookReaderDemo/BookReaderDemo.css b/BookReaderDemo/BookReaderDemo.css
new file mode 100644 (file)
index 0000000..6d88d64
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+ * Custom overrides for BookReader Demo.
+ */
+
+/* Hide print and embed functionality */
+#BRtoolbar .embed, .print {
+    display: none;
+}
index baa0741..fe3219a 100644 (file)
@@ -80,8 +80,11 @@ 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/';
+
 // Let's go!
 br.init();
index 6dcc1da..12932fe 100644 (file)
@@ -3,7 +3,11 @@
 <html>
 <head>
     <title>bookreader demo</title>
-    <link rel="stylesheet" type="text/css" href="../BookReader/BookReader.css">    
+    
+    <link rel="stylesheet" type="text/css" href="../BookReader/BookReader.css"></link>
+    <!-- Custom CSS overrides -->
+    <link rel="stylesheet" type="text/css" href="BookReaderDemo.css"></link>
+    
     <script type="text/javascript" src="http://www.archive.org/download/BookReader/lib/jquery-1.2.6.min.js"></script>
     <script type="text/javascript" src="http://www.archive.org/download/BookReader/lib/jquery.easing.1.3.js"></script>
     <script type="text/javascript" src="../BookReader/BookReader.js"></script>