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
25ee66e8
Commit
25ee66e8
authored
May 19, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sorting improvements and styling
parent
499bb9f3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
9 deletions
+42
-9
app/assets/javascripts/LabelManager.js.coffee
app/assets/javascripts/LabelManager.js.coffee
+2
-0
app/assets/stylesheets/framework/lists.scss
app/assets/stylesheets/framework/lists.scss
+12
-0
app/assets/stylesheets/pages/labels.scss
app/assets/stylesheets/pages/labels.scss
+20
-1
app/views/projects/labels/_label.html.haml
app/views/projects/labels/_label.html.haml
+0
-7
app/views/projects/labels/index.html.haml
app/views/projects/labels/index.html.haml
+1
-1
app/views/shared/_label_row.html.haml
app/views/shared/_label_row.html.haml
+7
-0
No files found.
app/assets/javascripts/LabelManager.js.coffee
View file @
25ee66e8
...
@@ -9,6 +9,8 @@ class @LabelManager
...
@@ -9,6 +9,8 @@ class @LabelManager
@
prioritizedLabels
.
sortable
(
@
prioritizedLabels
.
sortable
(
items
:
'li'
items
:
'li'
placeholder
:
'list-placeholder'
axis
:
'y'
update
:
@
onPrioritySortUpdate
.
bind
(
@
)
update
:
@
onPrioritySortUpdate
.
bind
(
@
)
)
)
...
...
app/assets/stylesheets/framework/lists.scss
View file @
25ee66e8
...
@@ -141,6 +141,18 @@ ul.content-list {
...
@@ -141,6 +141,18 @@ ul.content-list {
padding
:
10px
14px
;
padding
:
10px
14px
;
}
}
}
}
// When dragging a list item
&
.ui-sortable-helper
{
border-bottom
:
none
;
}
&
.list-placeholder
{
background-color
:
$gray-light
;
border
:
dotted
1px
$gray-dark
;
margin
:
1px
0
;
min-height
:
30px
;
}
}
}
}
}
...
...
app/assets/stylesheets/pages/labels.scss
View file @
25ee66e8
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
.label-row
{
.label-row
{
.label-name
{
.label-name
{
display
:
inline-block
;
display
:
inline-block
;
width
:
20
0px
;
width
:
17
0px
;
@media
(
max-width
:
$screen-xs-min
)
{
@media
(
max-width
:
$screen-xs-min
)
{
display
:
block
;
display
:
block
;
...
@@ -140,8 +140,11 @@
...
@@ -140,8 +140,11 @@
}
}
.prioritized-labels
{
.prioritized-labels
{
margin-bottom
:
30px
;
.add-priority
{
.add-priority
{
display
:
none
;
display
:
none
;
color
:
$gray-light
;
}
}
}
}
...
@@ -150,3 +153,19 @@
...
@@ -150,3 +153,19 @@
display
:
none
;
display
:
none
;
}
}
}
}
.toggle-priority
{
display
:
inline-block
;
vertical-align
:
middle
;
button
{
border-color
:
transparent
;
padding
:
5px
8px
;
vertical-align
:
top
;
font-size
:
14px
;
&
:hover
{
border-color
:
transparent
;
}
}
}
app/views/projects/labels/_label.html.haml
View file @
25ee66e8
-
label_css_id
=
dom_id
(
label
)
-
label_css_id
=
dom_id
(
label
)
%li
{
id:
label_css_id
,
:"data-id"
=>
label
.
id
}
%li
{
id:
label_css_id
,
:"data-id"
=>
label
.
id
}
%a
.js-toggle-priority
{
:href
=>
"#"
,
:"data-url"
=>
remove_priority_namespace_project_label_path
(
@project
.
namespace
,
@project
,
label
),
:"data-dom-id"
=>
"#{label_css_id}"
}
%span
.add-priority
(+)
%span
.remove-priority
(-)
=
render
"shared/label_row"
,
label:
label
=
render
"shared/label_row"
,
label:
label
.pull-info-right
.pull-info-right
%span
.append-right-20
%span
.append-right-20
...
...
app/views/projects/labels/index.html.haml
View file @
25ee66e8
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
New label
New label
.labels
.labels
.prioritized-labels
.prioritized-labels
{
class:
(
'hide'
if
params
[
:page
].
present?
)}
%h5
Prioritized Label
%h5
Prioritized Label
%ul
.content-list.manage-labels-list.js-prioritized-labels
{
"data-url"
=>
set_sorting_namespace_project_labels_path
(
@project
.
namespace
,
@project
)
}
%ul
.content-list.manage-labels-list.js-prioritized-labels
{
"data-url"
=>
set_sorting_namespace_project_labels_path
(
@project
.
namespace
,
@project
)
}
-
if
@prioritized
.
present?
-
if
@prioritized
.
present?
...
...
app/views/shared/_label_row.html.haml
View file @
25ee66e8
-
label_css_id
=
dom_id
(
label
)
%span
.label-row
%span
.label-row
.js-toggle-priority.toggle-priority
{
:"data-url"
=>
remove_priority_namespace_project_label_path
(
@project
.
namespace
,
@project
,
label
),
:"data-dom-id"
=>
"#{label_css_id}"
}
%button
.add-priority.btn.has-tooltip
{
title:
'Prioritize'
,
:'data-placement'
=>
'top'
}
%i
.fa.fa-star-o
%button
.remove-priority.btn.has-tooltip
{
title:
'Remove priority'
,
:'data-placement'
=>
'top'
}
%i
.fa.fa-star
%span
.label-name
%span
.label-name
=
link_to_label
(
label
,
tooltip:
false
)
=
link_to_label
(
label
,
tooltip:
false
)
%span
.prepend-left-10
%span
.prepend-left-10
...
...
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