From 526e785993e8dbafc886244fdf036fb99982ce5f Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 6 Oct 2016 21:48:10 +1300 Subject: [PATCH] Bug 14242: (follow-up) Strip hyphen from ISBN for search purposes To test, enter a valid ISBN complete with - eg 978-1-78416-110-1 The search should still work Signed-off-by: Marc --- koha-tmpl/opac-tmpl/bootstrap/js/autofill.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js b/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js index 171cc93..23ef57a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/autofill.js @@ -67,7 +67,7 @@ var gAPI = 'https://www.googleapis.com/books/v1/volumes?q='; if(self.type) gAPI += self.type + ':'; - gAPI += self.$elm.val(); + gAPI += self.$elm.val().replace(/\-/g, ''); gAPI += '&maxResults=1'; $.getJSON(gAPI, function (response) { if(response.totalItems == 0) { -- 2.1.4