Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
73b93ab5
Commit
73b93ab5
authored
Oct 04, 2016
by
HERBERT Ryan
Committed by
Mathieu Giraud
Oct 05, 2016
Browse files
js/database.js updateList updateInput clarity
Altered some condition statements to improve clarity of code
parent
5eb9313d
Changes
1
Show whitespace changes
Inline
Side-by-side
browser/js/database.js
View file @
73b93ab5
...
...
@@ -898,7 +898,7 @@ Database.prototype = {
that
.
list
.
innerHTML
=
options
.
filter
(
function
(
a
)
{
if
(
a
==
undefined
)
return
0
return
~
a
.
toLowerCase
().
indexOf
(
value
.
toLowerCase
());
return
a
.
toLowerCase
().
indexOf
(
value
.
toLowerCase
())
!=
-
1
;
}).
slice
(
0
,
10
).
map
(
function
(
a
)
{
return
'
<option value="
'
+
value
+
'
|
'
+
a
+
'
">
'
+
a
+
'
</option>
'
;
}).
join
();
...
...
@@ -913,7 +913,7 @@ Database.prototype = {
start
=
that
.
selectionStart
,
end
=
that
.
selectionEnd
;
if
(
~
pos
)
{
if
(
pos
!=
-
1
)
{
value
=
value
.
slice
(
pos
+
1
);
}
that
.
value
=
value
;
...
...
Write
Preview
Markdown
is supported
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