Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
21e6c7ac
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
21e6c7ac
编写于
1月 08, 2018
作者:
T
Takuya Noguchi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refactor CSS to eliminate vertical misalignment of login nav
上级
9fc2493b
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
21 addition
and
32 deletion
+21
-32
app/assets/javascripts/pages/sessions/new/signin_tabs_memoizer.js
...ts/javascripts/pages/sessions/new/signin_tabs_memoizer.js
+1
-1
app/assets/stylesheets/pages/login.scss
app/assets/stylesheets/pages/login.scss
+2
-18
app/views/devise/shared/_tab_single.html.haml
app/views/devise/shared/_tab_single.html.haml
+1
-1
app/views/devise/shared/_tabs_ldap.html.haml
app/views/devise/shared/_tabs_ldap.html.haml
+1
-1
app/views/devise/shared/_tabs_normal.html.haml
app/views/devise/shared/_tabs_normal.html.haml
+1
-1
changelogs/unreleased/41748-vertical-misalignment-login-box.yml
...logs/unreleased/41748-vertical-misalignment-login-box.yml
+5
-0
spec/features/users/login_spec.rb
spec/features/users/login_spec.rb
+1
-1
spec/javascripts/fixtures/linked_tabs.html.haml
spec/javascripts/fixtures/linked_tabs.html.haml
+1
-1
spec/javascripts/fixtures/signin_tabs.html.haml
spec/javascripts/fixtures/signin_tabs.html.haml
+4
-4
spec/javascripts/signin_tabs_memoizer_spec.js
spec/javascripts/signin_tabs_memoizer_spec.js
+4
-4
未找到文件。
app/assets/javascripts/pages/sessions/new/signin_tabs_memoizer.js
浏览文件 @
21e6c7ac
...
...
@@ -5,7 +5,7 @@ import AccessorUtilities from '~/lib/utils/accessor';
* Does that setting the current selected tab in the localStorage
*/
export
default
class
SigninTabsMemoizer
{
constructor
({
currentTabKey
=
'
current_signin_tab
'
,
tabSelector
=
'
ul.n
av
-tabs
'
}
=
{})
{
constructor
({
currentTabKey
=
'
current_signin_tab
'
,
tabSelector
=
'
ul.n
ew-session
-tabs
'
}
=
{})
{
this
.
currentTabKey
=
currentTabKey
;
this
.
tabSelector
=
tabSelector
;
this
.
isLocalStorageAvailable
=
AccessorUtilities
.
isLocalStorageAccessSafe
();
...
...
app/assets/stylesheets/pages/login.scss
浏览文件 @
21e6c7ac
...
...
@@ -154,26 +154,10 @@
a
{
width
:
100%
;
font-size
:
18px
;
margin-right
:
0
;
&
:hover
{
border
:
1px
solid
transparent
;
}
}
&
.active
{
border-bottom
:
1px
solid
$border-color
;
a
{
border
:
0
;
border-bottom
:
2px
solid
$link-underline-blue
;
margin-right
:
0
;
color
:
$black
;
&
:hover
{
border-bottom
:
2px
solid
$link-underline-blue
;
}
}
&
.active
>
a
{
cursor
:
default
;
}
}
}
...
...
app/views/devise/shared/_tab_single.html.haml
浏览文件 @
21e6c7ac
%ul
.nav-links.n
av-tabs.n
ew-session-tabs.single-tab
%ul
.nav-links.new-session-tabs.single-tab
%li
.active
%a
=
tab_title
app/views/devise/shared/_tabs_ldap.html.haml
浏览文件 @
21e6c7ac
%ul
.n
ew-session-tabs.nav-links.nav
-tabs
{
class:
(
'custom-provider-tabs'
if
form_based_providers
.
any?
)
}
%ul
.n
av-links.new-session
-tabs
{
class:
(
'custom-provider-tabs'
if
form_based_providers
.
any?
)
}
-
if
crowd_enabled?
%li
.active
=
link_to
"Crowd"
,
"#crowd"
,
'data-toggle'
=>
'tab'
...
...
app/views/devise/shared/_tabs_normal.html.haml
浏览文件 @
21e6c7ac
%ul
.nav-links.new-session-tabs
.nav-tabs
{
role:
'tablist'
}
%ul
.nav-links.new-session-tabs
{
role:
'tablist'
}
%li
.active
{
role:
'presentation'
}
%a
{
href:
'#login-pane'
,
data:
{
toggle:
'tab'
},
role:
'tab'
}
Sign in
-
if
allow_signup?
...
...
changelogs/unreleased/41748-vertical-misalignment-login-box.yml
0 → 100644
浏览文件 @
21e6c7ac
---
title
:
Refactor CSS to eliminate vertical misalignment of login nav
merge_request
:
16275
author
:
Takuya Noguchi
type
:
fixed
spec/features/users/login_spec.rb
浏览文件 @
21e6c7ac
...
...
@@ -392,7 +392,7 @@ feature 'Login' do
end
def
ensure_one_active_tab
expect
(
page
).
to
have_selector
(
'
.nav
-tabs > li.active'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'
ul.new-session
-tabs > li.active'
,
count:
1
)
end
def
ensure_one_active_pane
...
...
spec/javascripts/fixtures/linked_tabs.html.haml
浏览文件 @
21e6c7ac
%ul
.nav
.nav
-tabs.linked-tabs
%ul
.nav
-links.new-session
-tabs.linked-tabs
%li
%a
{
href:
'foo/bar/1'
,
data:
{
target:
'div#tab1'
,
action:
'tab1'
,
toggle:
'tab'
}
}
Tab 1
...
...
spec/javascripts/fixtures/signin_tabs.html.haml
浏览文件 @
21e6c7ac
%ul
.nav-tabs
%ul
.nav-links.new-session-tabs
%li
.active
%a
{
href:
'#ldap'
}
LDAP
%li
%a
.active
{
id:
'standard'
,
href:
'#standard'
}
Standard
%li
%a
{
id:
'ldap'
,
href:
'#ldap'
}
Ldap
%a
{
href:
'#login-pane'
}
Standard
spec/javascripts/signin_tabs_memoizer_spec.js
浏览文件 @
21e6c7ac
...
...
@@ -4,7 +4,7 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer';
(()
=>
{
describe
(
'
SigninTabsMemoizer
'
,
()
=>
{
const
fixtureTemplate
=
'
static/signin_tabs.html.raw
'
;
const
tabSelector
=
'
ul.n
av
-tabs
'
;
const
tabSelector
=
'
ul.n
ew-session
-tabs
'
;
const
currentTabKey
=
'
current_signin_tab
'
;
let
memo
;
...
...
@@ -27,7 +27,7 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer';
it
(
'
does nothing if no tab was previously selected
'
,
()
=>
{
createMemoizer
();
expect
(
document
.
querySelector
(
'
li a.active
'
).
getAttribute
(
'
id
'
)).
toEqual
(
'
standard
'
);
expect
(
document
.
querySelector
(
`
${
tabSelector
}
> li.active a`
).
getAttribute
(
'
href
'
)).
toEqual
(
'
#ldap
'
);
});
it
(
'
shows last selected tab on boot
'
,
()
=>
{
...
...
@@ -48,9 +48,9 @@ import SigninTabsMemoizer from '~/pages/sessions/new/signin_tabs_memoizer';
it
(
'
saves last selected tab on change
'
,
()
=>
{
createMemoizer
();
document
.
getElementById
(
'
standard
'
).
click
();
document
.
querySelector
(
'
a[href="#login-pane"]
'
).
click
();
expect
(
memo
.
readData
()).
toEqual
(
'
#
standard
'
);
expect
(
memo
.
readData
()).
toEqual
(
'
#
login-pane
'
);
});
it
(
'
overrides last selected tab with hash tag when given
'
,
()
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录