diff --git a/views/bootstrap/styles/application.js b/views/bootstrap/styles/application.js
index a5d2133f1..8bd6b675c 100644
--- a/views/bootstrap/styles/application.js
+++ b/views/bootstrap/styles/application.js
@@ -238,19 +238,40 @@ function initMost() {
* actually provided to update the input field, but here we use
* it to set the document location. */
updater: function (item) {
- strarr = item.value.split("#");
- //console.log(this.$element.data('target'));
target = this.$element.data('target');
- $('#'+target).attr('value', strarr[0]);
- return strarr[1];
+ $('#'+target).attr('value', item.id);
+ return item.value;
+ },
+ sorter: function(items) {
+ return items;
},
/* Set a matcher that allows any returned value */
matcher : function (item) {
return true;
},
highlighter : function (item) {
- strarr = item.split("#");
- return ' ' + strarr[1].replace(/ ' + item.name.replace(/' + item.path + '' : '');
+ },
+ /* This only works with a modified version of bootstrap typeahead located
+ * in boostrap-typeahead.js Search for 'render'
+ * The line
+ * this.render = this.options.render || this.render
+ * was added to bootstrap-typeahead.js
+ * The following function is a copy of the original render function but
+ * access item.name instead of item
+ */
+ render : function (items) {
+ var that = this
+
+ items = $(items).map(function (i, item) {
+ i = $(that.options.item).attr('data-value', item.name).attr('data-id', item.id).attr('data-type', item.type);
+ i./*find('a').*/html(that.highlighter(item))
+ return i[0]
+ })
+
+ items.first().addClass('active')
+ this.$menu.html(items)
+ return this
}
}); /* }}} */
}
diff --git a/views/bootstrap4/styles/application.js b/views/bootstrap4/styles/application.js
index 115c4c110..2e921c62e 100644
--- a/views/bootstrap4/styles/application.js
+++ b/views/bootstrap4/styles/application.js
@@ -261,8 +261,6 @@ function initMost() {
},
highlighter : function (item) {
return ' ' + item.name.replace(/' + item.path + '' : '');
- strarr = item.split("#");
- return ' ' + strarr[1].replace(/