From 0c1eccbea32fda29d062e056eb101f575be6e422 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 Signed-off-by: Maryse Simard Signed-off-by: Lisette Scheer --- 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 171cc937a6..23ef57a425 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.11.0