Fix "undefined" text on search
This commit is contained in:
parent
caeef10df2
commit
8d27f2a0c0
|
@ -47,6 +47,9 @@
|
||||||
theme: "bootstrap4",
|
theme: "bootstrap4",
|
||||||
minimumInputLength: 2,
|
minimumInputLength: 2,
|
||||||
dropdownParent: "#jsclippyContainer",
|
dropdownParent: "#jsclippyContainer",
|
||||||
|
language: {
|
||||||
|
inputTooShort: function () { return ''; }
|
||||||
|
},
|
||||||
ajax: {
|
ajax: {
|
||||||
url: HTML_PATH_ADMIN_ROOT+"ajax/clippy",
|
url: HTML_PATH_ADMIN_ROOT+"ajax/clippy",
|
||||||
data: function (params) {
|
data: function (params) {
|
||||||
|
@ -58,7 +61,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
templateResult: function(data) {
|
templateResult: function(data) {
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
|
if (typeof data.id === 'undefined') {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
var html = '';
|
var html = '';
|
||||||
if (data.type=='menu') {
|
if (data.type=='menu') {
|
||||||
html += '<a href="'+data.url+'"><div class="search-suggestion">';
|
html += '<a href="'+data.url+'"><div class="search-suggestion">';
|
||||||
|
|
Loading…
Reference in New Issue