Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
3e1e9b67
Commit
3e1e9b67
authored
Jul 28, 2016
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed specs
parent
49c7ca2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
app/assets/javascripts/gl_dropdown.js
app/assets/javascripts/gl_dropdown.js
+3
-2
spec/javascripts/search_autocomplete_spec.js
spec/javascripts/search_autocomplete_spec.js
+4
-4
No files found.
app/assets/javascripts/gl_dropdown.js
View file @
3e1e9b67
...
@@ -617,6 +617,7 @@
...
@@ -617,6 +617,7 @@
}
}
$el
=
$
(
selector
,
this
.
dropdown
);
$el
=
$
(
selector
,
this
.
dropdown
);
if
(
$el
.
length
)
{
if
(
$el
.
length
)
{
return
$el
.
first
().
trigger
(
'
click
'
);
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopImmediatePropagation
();
e
.
stopImmediatePropagation
();
$el
.
first
().
trigger
(
'
click
'
);
$el
.
first
().
trigger
(
'
click
'
);
...
@@ -690,8 +691,8 @@
...
@@ -690,8 +691,8 @@
if
(
!
index
)
{
if
(
!
index
)
{
$dropdownContent
.
scrollTop
(
0
)
$dropdownContent
.
scrollTop
(
0
)
}
else
if
(
index
===
(
$listItems
.
length
-
1
))
{
}
else
if
(
index
===
(
$listItems
.
length
-
1
))
{
$dropdownContent
.
scrollTop
(
$dropdownContent
.
prop
(
'
scrollHeight
'
)
);
$dropdownContent
.
scrollTop
$dropdownContent
.
prop
(
'
scrollHeight
'
);
}
else
if
(
listItemBottom
>
(
dropdownContentBottom
+
dropdownScrollTop
))
{
}
else
if
(
listItemBottom
>
(
dropdownContentBottom
+
dropdownScrollTop
))
$dropdownContent
.
scrollTop
(
listItemBottom
-
dropdownContentBottom
+
CURSOR_SELECT_SCROLL_PADDING
);
$dropdownContent
.
scrollTop
(
listItemBottom
-
dropdownContentBottom
+
CURSOR_SELECT_SCROLL_PADDING
);
}
else
if
(
listItemTop
<
(
dropdownContentTop
+
dropdownScrollTop
))
{
}
else
if
(
listItemTop
<
(
dropdownContentTop
+
dropdownScrollTop
))
{
return
$dropdownContent
.
scrollTop
(
listItemTop
-
dropdownContentTop
-
CURSOR_SELECT_SCROLL_PADDING
);
return
$dropdownContent
.
scrollTop
(
listItemTop
-
dropdownContentTop
-
CURSOR_SELECT_SCROLL_PADDING
);
...
...
spec/javascripts/search_autocomplete_spec.js
View file @
3e1e9b67
...
@@ -105,13 +105,13 @@
...
@@ -105,13 +105,13 @@
a3
=
"
a[href='
"
+
mrsAssignedToMeLink
+
"
']
"
;
a3
=
"
a[href='
"
+
mrsAssignedToMeLink
+
"
']
"
;
a4
=
"
a[href='
"
+
mrsIHaveCreatedLink
+
"
']
"
;
a4
=
"
a[href='
"
+
mrsIHaveCreatedLink
+
"
']
"
;
expect
(
list
.
find
(
a1
).
length
).
toBe
(
1
);
expect
(
list
.
find
(
a1
).
length
).
toBe
(
1
);
expect
(
list
.
find
(
a1
).
text
()).
toBe
(
'
Issues assigned to me
'
);
expect
(
list
.
find
(
a1
).
text
()).
toBe
(
'
Issues assigned to me
'
);
expect
(
list
.
find
(
a2
).
length
).
toBe
(
1
);
expect
(
list
.
find
(
a2
).
length
).
toBe
(
1
);
expect
(
list
.
find
(
a2
).
text
()).
toBe
(
"
Issues I've created
"
);
expect
(
list
.
find
(
a2
).
text
()).
toBe
(
"
Issues I've created
"
);
expect
(
list
.
find
(
a3
).
length
).
toBe
(
1
);
expect
(
list
.
find
(
a3
).
length
).
toBe
(
1
);
expect
(
list
.
find
(
a3
).
text
()).
toBe
(
'
Merge requests assigned to me
'
);
expect
(
list
.
find
(
a3
).
text
()).
toBe
(
'
Merge requests assigned to me
'
);
expect
(
list
.
find
(
a4
).
length
).
toBe
(
1
);
expect
(
list
.
find
(
a4
).
length
).
toBe
(
1
);
return
expect
(
list
.
find
(
a4
).
text
()).
toBe
(
"
Merge requests I've created
"
);
return
expect
(
list
.
find
(
a4
).
text
()).
toBe
(
"
Merge requests I've created
"
);
};
};
describe
(
'
Search autocomplete dropdown
'
,
function
()
{
describe
(
'
Search autocomplete dropdown
'
,
function
()
{
...
...
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