BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
9acfa635
Commit
9acfa635
authored
Mar 24, 2017
by
dimitrieh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds todo functionality to closed issuable sidebar and changes todo bell icon to check-square
parent
8cc4a39b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
8 deletions
+30
-8
right_sidebar.js
app/assets/javascripts/right_sidebar.js
+2
-2
issuable.scss
app/assets/stylesheets/pages/issuable.scss
+8
-0
todos.scss
app/assets/stylesheets/pages/todos.scss
+5
-5
_default.html.haml
app/views/layouts/header/_default.html.haml
+1
-1
_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+9
-0
create-collapsed-todo-button.yml
changelogs/unreleased/create-collapsed-todo-button.yml
+5
-0
No files found.
app/assets/javascripts/right_sidebar.js
View file @
9acfa635
...
...
@@ -97,10 +97,10 @@ import Cookies from 'js-cookie';
if
(
data
.
delete_path
!=
null
)
{
$btn
.
attr
(
'aria-label'
,
$btn
.
data
(
'mark-text'
)).
attr
(
'data-delete-path'
,
data
.
delete_path
);
return
$btnText
.
text
(
$btn
.
data
(
'mark-text'
));
return
$btnText
.
html
(
$btn
.
data
(
'mark-text'
));
}
else
{
$btn
.
attr
(
'aria-label'
,
$btn
.
data
(
'todo-text'
)).
removeAttr
(
'data-delete-path'
);
return
$btnText
.
text
(
$btn
.
data
(
'todo-text'
));
return
$btnText
.
html
(
$btn
.
data
(
'todo-text'
));
}
};
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
9acfa635
...
...
@@ -294,6 +294,14 @@
margin-top
:
0
;
}
.todo-undone
{
color
:
$gl-link-color
;
&
:hover
{
color
:
$gl-text-color
;
}
}
.author
{
display
:
none
;
}
...
...
app/assets/stylesheets/pages/todos.scss
View file @
9acfa635
...
...
@@ -7,17 +7,17 @@
li
{
.badge.todos-pending-count
{
position
:
inherit
;
top
:
-
6
px
;
top
:
-
10
px
;
margin-top
:
-5px
;
font-weight
:
normal
;
background
:
$todo-alert-blue
;
margin-left
:
-1
7
px
;
margin-left
:
-1
3
px
;
font-size
:
11px
;
color
:
$white-light
;
padding
:
3
px
;
padding
:
4
px
;
padding-top
:
1px
;
padding-bottom
:
1
px
;
border-radius
:
3
px
;
padding-bottom
:
2
px
;
border-radius
:
6
px
;
}
}
}
...
...
app/views/layouts/header/_default.html.haml
View file @
9acfa635
...
...
@@ -33,7 +33,7 @@
=
icon
(
'wrench fw'
)
%li
=
link_to
dashboard_todos_path
,
title:
'Todos'
,
aria:
{
label:
"Todos"
},
class:
'shortcuts-todos'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'
bell
fw'
)
=
icon
(
'
check-square
fw'
)
%span
.badge.todos-pending-count
{
class:
(
"hidden"
if
todos_pending_count
==
0
)
}
=
todos_count_format
(
todos_pending_count
)
-
if
current_user
.
can_create_project?
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
9acfa635
...
...
@@ -22,6 +22,15 @@
=
icon
(
'spin spinner'
,
class:
'hidden js-issuable-todo-loading'
,
'aria-hidden'
:
'true'
)
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
issuable
],
remote:
true
,
format: :json
,
html:
{
class:
'issuable-context-form inline-update js-issuable-update'
}
do
|
f
|
-
if
current_user
.block.todo
.sidebar-collapsed-icon.dont-change-state.js-issuable-todo
{
type:
"div"
,
aria:
{
label:
(
todo
.
nil?
?
icon
(
'plus-square'
)
:
icon
(
'check-square'
,
class:
'todo-undone'
))
},
data:
{
todo_text:
icon
(
'plus-square'
),
mark_text:
icon
(
'check-square'
,
class:
'todo-undone'
),
issuable_id:
issuable
.
id
,
issuable_type:
issuable
.
class
.
name
.
underscore
,
url:
namespace_project_todos_path
(
@project
.
namespace
,
@project
),
delete_path:
(
dashboard_todo_path
(
todo
)
if
todo
)
}
}
%span
.js-issuable-todo-text
-
if
todo
=
icon
(
'check-square'
,
class:
'todo-undone'
)
-
else
=
icon
(
'plus-square'
)
=
icon
(
'spin spinner'
,
class:
'hidden js-issuable-todo-loading'
)
.block.assignee
.sidebar-collapsed-icon.sidebar-collapsed-user
{
data:
{
toggle:
"tooltip"
,
placement:
"left"
,
container:
"body"
},
title:
(
issuable
.
assignee
.
name
if
issuable
.
assignee
)
}
-
if
issuable
.
assignee
...
...
changelogs/unreleased/create-collapsed-todo-button.yml
0 → 100644
View file @
9acfa635
---
title
:
adds todo functionality to closed issuable sidebar and changes todo bell icon
to check-square
merge_request
:
author
:
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