Typeahead working again

Fix for replacing characters in filenames
This commit is contained in:
OzzieIsaacs
2017-11-12 18:48:44 +01:00
parent ad16194798
commit b8d45b664a
2 changed files with 2 additions and 3 deletions

View File

@ -46,8 +46,7 @@ function prefixedSource(prefix, query, cb, bhAdapter) {
function getPath() {
var jsFileLocation = $("script[src*=edit_books]").attr("src"); // the js file path
jsFileLocation = jsFileLocation.replace("/static/js/edit_books.js", ""); // the js folder path
return jsFileLocation;
return jsFileLocation.substr(0,jsFileLocation.search("/static/js/edit_books.js")); // the js folder path
}
var authors = new Bloodhound({