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
Boxiang Sun
gitlab-ce
Commits
aec0e226
Commit
aec0e226
authored
Mar 22, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusted alignment for the new label form
parent
6d40eee5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
20 deletions
+48
-20
app/assets/javascripts/labels_select.js.coffee
app/assets/javascripts/labels_select.js.coffee
+6
-0
app/assets/stylesheets/framework/dropdowns.scss
app/assets/stylesheets/framework/dropdowns.scss
+6
-5
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+2
-2
app/assets/stylesheets/pages/labels.scss
app/assets/stylesheets/pages/labels.scss
+25
-8
app/views/shared/issuable/_label_dropdown.html.haml
app/views/shared/issuable/_label_dropdown.html.haml
+9
-5
No files found.
app/assets/javascripts/labels_select.js.coffee
View file @
aec0e226
...
@@ -23,8 +23,14 @@ class @LabelsSelect
...
@@ -23,8 +23,14 @@ class @LabelsSelect
newColorField
.
val
$
(
this
).
data
(
'color'
)
newColorField
.
val
$
(
this
).
data
(
'color'
)
$
(
'.js-dropdown-label-color-preview'
)
$
(
'.js-dropdown-label-color-preview'
)
.
css
'background-color'
,
$
(
this
).
data
(
'color'
)
.
css
'background-color'
,
$
(
this
).
data
(
'color'
)
.
parent
()
.
addClass
'is-active'
.
addClass
'is-active'
$
(
'.js-cancel-label-btn'
).
on
'click'
,
(
e
)
->
e
.
preventDefault
()
e
.
stopPropagation
()
$
(
'.dropdown-menu-back'
,
$dropdown
.
parent
()).
trigger
'click'
$
(
'.js-new-label-btn'
).
on
'click'
,
(
e
)
->
$
(
'.js-new-label-btn'
).
on
'click'
,
(
e
)
->
e
.
preventDefault
()
e
.
preventDefault
()
e
.
stopPropagation
()
e
.
stopPropagation
()
...
...
app/assets/stylesheets/framework/dropdowns.scss
View file @
aec0e226
...
@@ -183,7 +183,7 @@
...
@@ -183,7 +183,7 @@
}
}
.dropdown-select
{
.dropdown-select
{
width
:
28
0px
;
width
:
30
0px
;
}
}
.dropdown-menu-align-right
{
.dropdown-menu-align-right
{
...
@@ -237,7 +237,7 @@
...
@@ -237,7 +237,7 @@
.dropdown-title-button
{
.dropdown-title-button
{
position
:
absolute
;
position
:
absolute
;
top
:
-1px
;
top
:
0
;
padding
:
0
;
padding
:
0
;
color
:
$dropdown-title-btn-color
;
color
:
$dropdown-title-btn-color
;
font-size
:
14px
;
font-size
:
14px
;
...
@@ -357,8 +357,9 @@
...
@@ -357,8 +357,9 @@
.dropdown-label-box
{
.dropdown-label-box
{
position
:
relative
;
position
:
relative
;
top
:
3px
;
top
:
3px
;
margin-right
:
5px
;
display
:
inline-block
;
display
:
inline-block
;
width
:
20
px
;
width
:
15
px
;
height
:
1
6
px
;
height
:
1
5
px
;
border-radius
:
3px
;
border-radius
:
$border-radius-base
;
}
}
app/assets/stylesheets/framework/variables.scss
View file @
aec0e226
...
@@ -168,13 +168,13 @@ $regular_font: 'Source Sans Pro', "Helvetica Neue", Helvetica, Arial, sans-serif
...
@@ -168,13 +168,13 @@ $regular_font: 'Source Sans Pro', "Helvetica Neue", Helvetica, Arial, sans-serif
*/
*/
$dropdown-bg
:
#fff
;
$dropdown-bg
:
#fff
;
$dropdown-link-color
:
#555
;
$dropdown-link-color
:
#555
;
$dropdown-link-hover-bg
:
rgba
(
#000
,
.04
)
;
$dropdown-link-hover-bg
:
$row-hover
;
$dropdown-border-color
:
rgba
(
#000
,
.1
);
$dropdown-border-color
:
rgba
(
#000
,
.1
);
$dropdown-shadow-color
:
rgba
(
#000
,
.1
);
$dropdown-shadow-color
:
rgba
(
#000
,
.1
);
$dropdown-divider-color
:
rgba
(
#000
,
.1
);
$dropdown-divider-color
:
rgba
(
#000
,
.1
);
$dropdown-header-color
:
#959494
;
$dropdown-header-color
:
#959494
;
$dropdown-title-btn-color
:
#bfbfbf
;
$dropdown-title-btn-color
:
#bfbfbf
;
$dropdown-input-color
:
#
c7c7c7
;
$dropdown-input-color
:
#
555
;
$dropdown-input-focus-border
:
rgb
(
58
,
171
,
240
);
$dropdown-input-focus-border
:
rgb
(
58
,
171
,
240
);
$dropdown-input-focus-shadow
:
rgba
(
#000
,
.2
);
$dropdown-input-focus-shadow
:
rgba
(
#000
,
.2
);
$dropdown-loading-bg
:
rgba
(
#fff
,
.6
);
$dropdown-loading-bg
:
rgba
(
#fff
,
.6
);
...
...
app/assets/stylesheets/pages/labels.scss
View file @
aec0e226
...
@@ -9,28 +9,45 @@
...
@@ -9,28 +9,45 @@
}
}
&
.suggest-colors-dropdown
{
&
.suggest-colors-dropdown
{
margin-bottom
:
5px
;
margin-top
:
10px
;
margin-bottom
:
10px
;
border-radius
:
$border-radius-base
;
overflow
:
hidden
;
a
{
a
{
@include
border-radius
(
0
);
@include
border-radius
(
0
);
width
:
36
.7px
;
width
:
(
100%
/
7
)
;
margin-right
:
0
;
margin-right
:
0
;
margin-bottom
:
-5px
;
margin-bottom
:
-5px
;
}
}
}
}
}
}
.dropdown-label-color-preview
{
.dropdown-new-label
{
display
:
none
;
.dropdown-content
{
margin-top
:
5px
;
max-height
:
260px
;
width
:
100%
;
}
height
:
25px
;
}
.dropdown-label-color-input
{
position
:
relative
;
margin-bottom
:
10px
;
&
.is-active
{
&
.is-active
{
display
:
block
;
padding-left
:
32px
;
}
}
}
}
.dropdown-label-color-preview
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
32px
;
height
:
32px
;
border-top-left-radius
:
$border-radius-base
;
border-bottom-left-radius
:
$border-radius-base
;
}
.label-row
{
.label-row
{
.label
{
.label
{
padding
:
9px
;
padding
:
9px
;
...
...
app/views/shared/issuable/_label_dropdown.html.haml
View file @
aec0e226
...
@@ -24,17 +24,21 @@
...
@@ -24,17 +24,21 @@
-
else
-
else
View labels
View labels
-
if
can?
current_user
,
:admin_label
,
@project
and
@project
-
if
can?
current_user
,
:admin_label
,
@project
and
@project
.dropdown-page-two
.dropdown-page-two
.dropdown-new-label
=
dropdown_title
(
"Create new label"
,
back:
true
)
=
dropdown_title
(
"Create new label"
,
back:
true
)
=
dropdown_content
do
=
dropdown_content
do
.dropdown-labels-error.js-label-error
.dropdown-labels-error.js-label-error
%input
#new_label_color
{
type:
"hidden"
}
%input
#new_label_name
.dropdown-input-field
{
type:
"text"
,
placeholder:
"Name new label"
}
%input
#new_label_name
.dropdown-input-field
{
type:
"text"
,
placeholder:
"Name new label"
}
.dropdown-label-color-preview.js-dropdown-label-color-preview
.suggest-colors.suggest-colors-dropdown
.suggest-colors.suggest-colors-dropdown
-
suggested_colors
.
each
do
|
color
|
-
suggested_colors
.
each
do
|
color
|
=
link_to
'#'
,
style:
"background-color:
#{
color
}
"
,
data:
{
color:
color
}
do
=
link_to
'#'
,
style:
"background-color:
#{
color
}
"
,
data:
{
color:
color
}
do
&
nbsp
&
nbsp
%button
.btn.btn-primary.js-new-label-btn
{
type:
"button"
}
.dropdown-label-color-input
Create
.dropdown-label-color-preview.js-dropdown-label-color-preview
%input
#new_label_color
.dropdown-input-field
{
type:
"text"
}
.clearfix
%button
.btn.btn-primary.pull-left.js-new-label-btn
{
type:
"button"
}
Create
%button
.btn.btn-default.pull-right.js-cancel-label-btn
{
type:
"button"
}
Cancel
=
dropdown_loading
=
dropdown_loading
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