Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
737a1ff6
Commit
737a1ff6
authored
Aug 28, 2017
by
bbaer
Browse files
Fixed error where custom values wouldn't be saved, no not found for non pedantic
parent
3a748406
Changes
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/TypeAhead.js
View file @
737a1ff6
...
...
@@ -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
);
});
}
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment