Use Internet Archive logo for BookReader hosted on archive.org
[bookreader.git] / BookReader / BookReader.js
index 701a216..1569a09 100644 (file)
@@ -2692,12 +2692,18 @@ BookReader.prototype.BRSearchCallback = function(results) {
     //console.log(br.searchResults);
     
     if (0 == results.matches.length) {
-        $(br.popup).text('No matches were found.');
+        var errStr  = 'No matches were found.';
+        var timeout = 1000;
+        if (false === results.indexed) {
+            errStr  = "<p>This book isn't in the search engine yet.</p><p>Please <a href='http://openlibrary.org/contact?path=archive.org/stream/"+this.bookId+"/search'>drop us a line</a> so we can fix it. Thanks!</p>";
+            timeout = 5000;
+        }
+        $(br.popup).html(errStr);
         setTimeout(function(){
             $(br.popup).fadeOut('slow', function() {
                 br.removeProgressPopup();
             })        
-        },1000);
+        },timeout);
         return;
     }
     
@@ -4544,7 +4550,8 @@ BookReader.prototype.gotOpenLibraryRecord = function(self, olObject) {
         // $$$mang cleanup
         self.bookUrl = 'http://openlibrary.org' + olObject.key;
         self.bookTitle = olObject['title'];
-        $('#BRreturn a').attr('href', this.bookUrl);
+        $('#BRreturn a').attr( {'href': self.bookUrl, 'title': "Go to this book's page on Open Library" } );
+        $('#BRreturn a').text(self.bookTitle);
         $('#BookReader .logo').attr('title', 'Go to Open Library'); // i18n
         
         $('#BRinfo').remove();