Remove trailing pipe on info modal
[bookreader.git] / BookReaderIA / datanode / BookReaderJSIA.php
index 027e728..af5c795 100644 (file)
@@ -330,7 +330,7 @@ br.getEmbedURL = function(viewParams) {
 //________
 // Returns the embed code HTML fragment suitable for copy and paste
 br.getEmbedCode = function() {
-    return "<iframe src='" + this.getEmbedURL() + "' width='480px' height='430px'></iframe>";
+    return "<iframe src='" + this.getEmbedURL() + "' width='480px' height='430px' frameborder='0' ></iframe>";
 }
 
 // getOpenLibraryRecord
@@ -370,7 +370,7 @@ br.buildInfoDiv = function(jInfoDiv) {
         
     // $$$ cover looks weird before it loads
     jInfoDiv.find('.BRfloatCover').append([
-                    '<a href="', this.bookUrl, '"><img src="http://www.archive.org/download/', this.bookId, '/page/cover_t.jpg" alt="', escapedTitle, '" height="140" /></a>'].join('')
+                    '<div style="height: 140px; min-width: 80px; padding: 0; margin: 0;"><a href="', this.bookUrl, '"><img src="http://www.archive.org/download/', this.bookId, '/page/cover_t.jpg" alt="' + escapedTitle + '" height="140px" /></a></div>'].join('')
     );
 
     jInfoDiv.find('.BRfloatMeta').append([
@@ -385,8 +385,7 @@ br.buildInfoDiv = function(jInfoDiv) {
                         '<li><a href="http://www.archive.org/download/', this.bookId, '/', this.subPrefix, '_djvu.txt">Plain Text</a><span>|</span></li>',
                         '<li><a href="http://www.archive.org/download/', this.bookId, '/', this.subPrefix, '_daisy.zip">DAISY</a><span>|</span></li>',
                         '<li><a href="http://www.archive.org/download/', this.bookId, '/', this.subPrefix, '.epub">ePub</a><span>|</span></li>',
-                        '<li><a href="https://www.amazon.com/gp/digital/fiona/web-to-kindle?clientid=IA&itemid=', this.bookId, '&docid=', this.subPrefix, '">Send to Kindle</a><span>|</span></li>',
-                        '<li><a href="', this.bookUrl, '">More...</a></li>',
+                        '<li><a href="https://www.amazon.com/gp/digital/fiona/web-to-kindle?clientid=IA&itemid=', this.bookId, '&docid=', this.subPrefix, '">Send to Kindle</a></li>',
                     '</ul>',
                     '<p class="moreInfo"><span></span>More information on <a href="'+ this.bookUrl + '">' + domain + '</a>  </p>'].join('\n'));
                     
@@ -402,6 +401,8 @@ br.buildInfoDiv = function(jInfoDiv) {
     }
     
     jInfoDiv.find('.BRfloatTitle a').attr({'href': this.bookUrl, 'alt': this.bookTitle}).text(this.bookTitle);
+    var bookPath = (window.location + '').replace('#','%23');
+    jInfoDiv.find('a.problem').attr('href','http://openlibrary.org/contact?path=' + bookPath);
 
 }
 
@@ -519,17 +520,7 @@ if (typeof(brConfig) != 'undefined') {
             br.reduce = brConfig['reduce'];
         }
     } else if (brConfig['mode'] == 2) {
-        br.mode = 2;
-      
-<?
-        //$$$mang hack to override request for 2up for books with attribution page
-        //   as first page until we can display that page in 2up
-        $needle = 'goog';
-        if (strrpos($id, $needle) === strlen($id)-strlen($needle)) {
-            print "// override for books with attribution page\n";
-            print "br.mode = 1;\n";
-        }
-?>
+        br.mode = 2;      
     }
 } // brConfig
 
@@ -545,7 +536,7 @@ OLAuth.prototype.init = function() {
     htmlStr    +=  '<p>Please wait...</p>';
 
     this.showPopup("#ddd", "#000", htmlStr);
-    $.ajax({url:this.authUrl, dataType:'jsonp', jsonpCallback:'olAuth.initCallback'});
+    $.ajax({url:this.authUrl + '?rand='+Math.random(), dataType:'jsonp', jsonpCallback:'olAuth.initCallback'});
 }
 
 OLAuth.prototype.showPopup = function(bgColor, textColor, msg) {