Skip to content
Snippets Groups Projects
Commit 86e86462 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge remote-tracking branch 'origin/master'

parents 30bb8475 a6a23599
No related branches found
No related tags found
No related merge requests found
......@@ -74,9 +74,13 @@ var QfqNS = QfqNS || {};
suggestion: function (obj) {
return "<div>" + n.TypeAhead.htmlEncode(obj.value) + "</div>";
},
notFound: function (obj) {
return "<div>'" + n.TypeAhead.htmlEncode(obj.query) + "' not found";
}
// No message if field is not set to pedantic.
notFound: (function($_) {
return function (obj) {
if (!!$_.data('typeahead-pedantic'))
return "<div>'" + n.TypeAhead.htmlEncode(obj.query) + "' not found";
};
})($element)
}
});
......@@ -115,6 +119,12 @@ var QfqNS = QfqNS || {};
$shadowElement.val('');
};
})($shadowElement));
} else {
$element.bind('typeahead:change', function (event, suggestion) {
var $shadowElement = n.TypeAhead.getShadowElement($(event.delegateTarget));
// If none pendatic, suggestion key might not exist, so use suggestion instead.
$shadowElement.val(suggestion.key || suggestion);
});
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment