Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
0556d661
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,发现更多精彩内容 >>
提交
0556d661
编写于
4月 14, 2016
作者:
A
Alfredo Sumaran
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix Label dropdown and organize code
# Conflicts: # app/assets/javascripts/labels_select.js.coffee
上级
88ddce25
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
6 deletion
+13
-6
app/assets/javascripts/gl_dropdown.js.coffee
app/assets/javascripts/gl_dropdown.js.coffee
+5
-2
app/assets/stylesheets/framework/dropdowns.scss
app/assets/stylesheets/framework/dropdowns.scss
+1
-1
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+4
-0
app/views/shared/issuable/_label_page_create.html.haml
app/views/shared/issuable/_label_page_create.html.haml
+2
-2
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-1
未找到文件。
app/assets/javascripts/gl_dropdown.js.coffee
浏览文件 @
0556d661
...
...
@@ -224,6 +224,9 @@ class GitLabDropdown
menu
.
toggleClass
PAGE_TWO_CLASS
# Focus first visible input on active page
@
dropdown
.
find
(
'[class^="dropdown-page-"]:visible :text:visible:first'
).
focus
()
parseData
:
(
data
)
->
@
renderedData
=
data
...
...
@@ -243,7 +246,8 @@ class GitLabDropdown
shouldPropagate
:
(
e
)
=>
if
@
options
.
multiSelect
$target
=
$
(
e
.
target
)
if
not
$target
.
hasClass
(
'dropdown-menu-close'
)
and
not
$target
.
hasClass
(
'dropdown-menu-close-icon'
)
if
not
$target
.
hasClass
(
'dropdown-menu-close'
)
and
not
$target
.
hasClass
(
'dropdown-menu-close-icon'
)
and
(
$target
.
attr
(
'href'
)
is
'#'
)
e
.
stopPropagation
()
return
false
else
...
...
@@ -378,7 +382,6 @@ class GitLabDropdown
selectedObject
=
@
renderedData
[
selectedIndex
]
value
=
if
@
options
.
id
then
@
options
.
id
(
selectedObject
,
el
)
else
selectedObject
.
id
field
=
@
dropdown
.
parent
().
find
(
"input[name='
#{
fieldName
}
'][value='
#{
value
}
']"
)
if
el
.
hasClass
(
ACTIVE_CLASS
)
el
.
removeClass
(
ACTIVE_CLASS
)
field
.
remove
()
...
...
app/assets/stylesheets/framework/dropdowns.scss
浏览文件 @
0556d661
...
...
@@ -320,7 +320,7 @@
}
}
.dropdown-input-field
{
.dropdown-input-field
,
.default-dropdown-input
{
width
:
100%
;
padding
:
0
7px
;
color
:
$dropdown-input-color
;
...
...
app/assets/stylesheets/pages/issuable.scss
浏览文件 @
0556d661
...
...
@@ -248,6 +248,10 @@
background
:
$gray-dark
;
border
:
1px
solid
$border-gray-dark
;
}
&
.btn-primary
{
@extend
.btn-primary
}
}
a
:not
(
.btn
)
{
...
...
app/views/shared/issuable/_label_page_create.html.haml
浏览文件 @
0556d661
...
...
@@ -2,14 +2,14 @@
=
dropdown_title
(
"Create new label"
,
back:
true
)
=
dropdown_content
do
.dropdown-labels-error.js-label-error
%input
#new_label_name
.d
ropdown-input-field
{
type:
"text"
,
placeholder:
"Name new label"
}
%input
#new_label_name
.d
efault-dropdown-input
{
type:
"text"
,
placeholder:
"Name new label"
}
.suggest-colors.suggest-colors-dropdown
-
suggested_colors
.
each
do
|
color
|
=
link_to
'#'
,
style:
"background-color:
#{
color
}
"
,
data:
{
color:
color
}
do
&
nbsp
.dropdown-label-color-input
.dropdown-label-color-preview.js-dropdown-label-color-preview
%input
#new_label_color
.d
ropdown-input-field
{
type:
"text"
}
%input
#new_label_color
.d
efault-dropdown-input
{
type:
"text"
}
.clearfix
%button
.btn.btn-primary.pull-left.js-new-label-btn
{
type:
"button"
}
Create
...
...
app/views/shared/issuable/_sidebar.html.haml
浏览文件 @
0556d661
...
...
@@ -96,7 +96,7 @@
-
issuable
.
labels
.
each
do
|
label
|
=
hidden_field_tag
"
#{
issuable
.
to_ability_name
}
[label_names][]"
,
label
.
id
,
id:
nil
.dropdown
%button
.dropdown-menu-toggle.js-label-select.js-multiselect
.js-extra-options
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
field_name:
"#{issuable.to_ability_name}[label_names][]"
,
ability_name:
issuable
.
to_ability_name
,
show_no:
"true"
,
show_any:
"true"
,
project_id:
(
@project
.
id
if
@project
),
issue_update:
issuable_json_path
(
issuable
),
labels:
(
namespace_project_labels_path
(
@project
.
namespace
,
@project
,
:json
)
if
@project
)}}
%button
.dropdown-menu-toggle.js-label-select.js-multiselect
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
field_name:
"#{issuable.to_ability_name}[label_names][]"
,
ability_name:
issuable
.
to_ability_name
,
show_no:
"true"
,
show_any:
"true"
,
project_id:
(
@project
.
id
if
@project
),
issue_update:
issuable_json_path
(
issuable
),
labels:
(
namespace_project_labels_path
(
@project
.
namespace
,
@project
,
:json
)
if
@project
)}}
%span
.dropdown-toggle-text
Label
=
icon
(
'chevron-down'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录