From 56b35b894997527cdae047eeddb86090fa69c6e5 Mon Sep 17 00:00:00 2001 From: Harald von Waldow Date: Thu, 17 May 2018 20:22:24 +0200 Subject: [PATCH] separation tags as chars from str.split() --- ckan/public/base/javascript/modules/autocomplete.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ckan/public/base/javascript/modules/autocomplete.js b/ckan/public/base/javascript/modules/autocomplete.js index dbcaf0e2dec..562854a7afe 100644 --- a/ckan/public/base/javascript/modules/autocomplete.js +++ b/ckan/public/base/javascript/modules/autocomplete.js @@ -9,9 +9,8 @@ * from the ajax returned results * label - A string of the label you want to appear within the dropdown for * returned results - * tokensep - An array (passed as string) that contains characters which will - be interpreted as separators for tags when typed or pasted - (default "[',']"). + * tokensep - A string that contains characters which will be interpreted + * as separators for tags when typed or pasted (default ","). * Examples * * // @@ -26,7 +25,7 @@ this.ckan.module('autocomplete', function (jQuery) { label: false, items: 10, source: null, - tokensep: [','], + tokensep: ',', interval: 300, dropdownClass: '', containerClass: '' @@ -54,7 +53,7 @@ this.ckan.module('autocomplete', function (jQuery) { formatInputTooShort: this.formatInputTooShort, dropdownCssClass: this.options.dropdownClass, containerCssClass: this.options.containerClass, - tokenSeparators: eval(this.options.tokensep) + tokenSeparators: this.options.tokensep.split('') }; // Different keys are required depending on whether the select is