From a45f88c966234888afbb8d1cf17a95da1332398b Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 6 Oct 2016 21:48:10 +1300 Subject: [PATCH] Bug 14242 - Strip - from ISBN for serach purposes To test, enter a valid ISBN complete with - eg 978-1-78416-110-1 The search should still work --- 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.9.3