Открыть боковую панель
nt_test121
nt_project_9da4a5yt9x4b
Коммиты
5387fcc3
Коммит
5387fcc3
создал
Июл 27, 2016
по автору
Phil Hughes
Просмотр файлов
Fixed enter key for GL dropdown in JS
владелец
6985fea2
Изменения
3
Скрыть пробелы
Построчно
Рядом
app/assets/javascripts/gl_dropdown.js
Просмотр файла @
5387fcc3
...
...
@@ -255,8 +255,13 @@
if
(
_this
.
dropdown
.
find
(
'
.dropdown-toggle-page
'
).
length
)
{
selector
=
"
.dropdown-page-one
"
+
selector
;
}
$
(
selector
,
_this
.
dropdown
).
first
().
find
(
'
a
'
).
addClass
(
'
is-focused
'
);
return
currentIndex
=
0
;
if
(
$
(
_this
.
el
).
is
(
'
input
'
))
{
currentIndex
=
-
1
;
}
else
{
$
(
selector
,
_this
.
dropdown
).
first
().
find
(
'
a
'
).
addClass
(
'
is-focused
'
);
currentIndex
=
0
;
}
}
};
})(
this
)
...
...
@@ -611,7 +616,11 @@
if
(
$el
.
length
)
{
e
.
preventDefault
();
e
.
stopImmediatePropagation
();
return
$el
.
first
().
trigger
(
'
click
'
);
$el
.
first
().
trigger
(
'
click
'
);
if
(
$el
.
first
()[
0
]
&&
$el
.
first
()[
0
].
click
)
{
$el
.
first
()[
0
].
click
();
}
}
};
...
...
app/assets/javascripts/search_autocomplete.js
Просмотр файла @
5387fcc3
...
...
@@ -66,7 +66,10 @@
},
data
:
this
.
getData
.
bind
(
this
),
selectable
:
true
,
clicked
:
this
.
onClick
.
bind
(
this
)
clicked
:
this
.
onClick
.
bind
(
this
),
id
:
function
(
data
)
{
return
_
.
escape
(
data
.
text
);
}
});
};
...
...
spec/features/search_spec.rb
Просмотр файла @
5387fcc3
...
...
@@ -51,6 +51,16 @@
end
describe
'Right header search field'
,
feature:
true
do
it
'allows enter key to search'
,
js:
true
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
fill_in
'search'
,
with:
'gitlab'
find
(
'#search'
).
native
.
send_keys
(
:enter
)
page
.
within
'.title'
do
expect
(
page
).
to
have_content
'Search'
end
end
describe
'Search in project page'
do
before
do
visit
namespace_project_path
(
project
.
namespace
,
project
)
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать