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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
e5100c33
Commit
e5100c33
authored
Jun 07, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First FE review changes
parent
cc1e51ef
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
35 deletions
+45
-35
app/assets/javascripts/close_reopen_report_toggle.js
app/assets/javascripts/close_reopen_report_toggle.js
+11
-16
app/assets/stylesheets/framework/buttons.scss
app/assets/stylesheets/framework/buttons.scss
+3
-3
app/assets/stylesheets/framework/dropdowns.scss
app/assets/stylesheets/framework/dropdowns.scss
+13
-4
app/assets/stylesheets/framework/filters.scss
app/assets/stylesheets/framework/filters.scss
+6
-0
app/views/shared/issuable/_close_reopen_report_toggle.html.haml
...ews/shared/issuable/_close_reopen_report_toggle.html.haml
+8
-8
app/views/shared/notes/_comment_button.html.haml
app/views/shared/notes/_comment_button.html.haml
+4
-4
No files found.
app/assets/javascripts/close_reopen_report_toggle.js
View file @
e5100c33
...
@@ -23,30 +23,25 @@ class CloseReopenReportToggle {
...
@@ -23,30 +23,25 @@ class CloseReopenReportToggle {
}
}
updateButton
(
isClosed
)
{
updateButton
(
isClosed
)
{
const
action
=
isClosed
?
this
.
showReopen
:
this
.
showClose
;
this
.
toggleButtonType
(
isClosed
)
;
action
.
call
(
this
);
this
.
button
.
blur
();
this
.
button
.
blur
();
}
}
showClose
()
{
toggleButtonType
(
isClosed
)
{
this
.
closeItem
.
classList
.
remove
(
'
hidden
'
);
const
[
showItem
,
hideItem
]
=
this
.
getButtonTypes
(
isClosed
);
this
.
closeItem
.
classList
.
add
(
'
droplab-item-selected
'
);
this
.
reopenItem
.
classList
.
add
(
'
hidden
'
);
showItem
.
classList
.
remove
(
'
hidden
'
);
this
.
reopenItem
.
classList
.
remove
(
'
droplab-item-selected
'
);
showItem
.
classList
.
add
(
'
droplab-item-selected
'
);
this
.
closeItem
.
click
();
hideItem
.
classList
.
add
(
'
hidden
'
);
}
hideItem
.
classList
.
remove
(
'
droplab-item-selected
'
);
showReopen
()
{
this
.
reopenItem
.
classList
.
remove
(
'
hidden
'
);
this
.
reopenItem
.
classList
.
add
(
'
droplab-item-selected
'
);
this
.
closeItem
.
classList
.
add
(
'
hidden
'
);
showItem
.
click
(
);
this
.
closeItem
.
classList
.
remove
(
'
droplab-item-selected
'
);
}
this
.
reopenItem
.
click
();
getButtonTypes
(
isClosed
)
{
return
isClosed
?
[
this
.
reopenItem
,
this
.
closeItem
]
:
[
this
.
closeItem
,
this
.
reopenItem
];
}
}
setDisable
(
shouldDisable
)
{
setDisable
(
shouldDisable
)
{
...
...
app/assets/stylesheets/framework/buttons.scss
View file @
e5100c33
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
color
:
$text
;
color
:
$text
;
border-color
:
$border
;
border-color
:
$border
;
>
i
{
>
.icon
{
color
:
$text
;
color
:
$text
;
}
}
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
border-color
:
$hover-border
;
border-color
:
$hover-border
;
color
:
$hover-text
;
color
:
$hover-text
;
>
i
{
>
.icon
{
color
:
$hover-text
;
color
:
$hover-text
;
}
}
}
}
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
border-color
:
$active-border
;
border-color
:
$active-border
;
color
:
$hover-text
;
color
:
$hover-text
;
>
i
{
>
.icon
{
color
:
$hover-text
;
color
:
$hover-text
;
}
}
}
}
...
...
app/assets/stylesheets/framework/dropdowns.scss
View file @
e5100c33
...
@@ -310,18 +310,27 @@
...
@@ -310,18 +310,27 @@
li
{
li
{
padding-top
:
6px
;
padding-top
:
6px
;
&
>
a
{
>
a
,
>
button
{
margin
:
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
color
:
inherit
;
border-radius
:
0
;
border-radius
:
0
;
text-overflow
:
inherit
;
text-overflow
:
inherit
;
background-color
:
inherit
;
color
:
inherit
;
border
:
inherit
;
text-align
:
left
;
&
:hover
,
&
:hover
,
&
:focus
{
&
:focus
{
background-color
:
inherit
;
background-color
:
inherit
;
color
:
inherit
;
color
:
inherit
;
}
}
&
.btn
.fa
:not
(
:last-child
)
{
margin-right
:
0
;
margin-left
:
5px
;
}
}
}
&
:hover
,
&
:hover
,
...
@@ -334,12 +343,12 @@
...
@@ -334,12 +343,12 @@
visibility
:
visible
;
visibility
:
visible
;
}
}
i
{
.icon
{
visibility
:
hidden
;
visibility
:
hidden
;
}
}
}
}
i
{
.icon
{
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
top
;
vertical-align
:
top
;
padding-top
:
2px
;
padding-top
:
2px
;
...
...
app/assets/stylesheets/framework/filters.scss
View file @
e5100c33
...
@@ -70,6 +70,12 @@
...
@@ -70,6 +70,12 @@
.input-token
{
.input-token
{
max-width
:
200px
;
max-width
:
200px
;
&
:hover
,
&
:focus
{
background-color
:
inherit
;
color
:
inherit
;
}
}
}
.input-token
:only-child
,
.input-token
:only-child
,
...
...
app/views/shared/issuable/_close_reopen_report_toggle.html.haml
View file @
e5100c33
...
@@ -9,13 +9,13 @@
...
@@ -9,13 +9,13 @@
.pull-left.btn-group.prepend-left-10.issuable-close-dropdown.droplab-dropdown.js-issuable-close-dropdown
.pull-left.btn-group.prepend-left-10.issuable-close-dropdown.droplab-dropdown.js-issuable-close-dropdown
=
link_to
"
#{
display_button_action
}
#{
display_issuable_type
}
"
,
close_reopen_issuable_path
(
issuable
),
{
method:
button_method
.
to_s
,
class:
"
#{
button_class
}
btn-
#{
button_action
}
"
,
title:
"
#{
display_button_action
}
#{
display_issuable_type
}
"
}
=
link_to
"
#{
display_button_action
}
#{
display_issuable_type
}
"
,
close_reopen_issuable_path
(
issuable
),
{
method:
button_method
.
to_s
,
class:
"
#{
button_class
}
btn-
#{
button_action
}
"
,
title:
"
#{
display_button_action
}
#{
display_issuable_type
}
"
}
=
button_tag
type:
'button'
,
class:
"
#{
toggle_class
}
btn-
#{
button_action
}
-color"
,
data:
{
'dropdown-trigger'
=>
'#issuable-close-menu'
},
'aria-label'
=>
'
Open clos
e dropdown'
do
=
button_tag
type:
'button'
,
class:
"
#{
toggle_class
}
btn-
#{
button_action
}
-color"
,
data:
{
'dropdown-trigger'
=>
'#issuable-close-menu'
},
'aria-label'
=>
'
Toggl
e dropdown'
do
=
icon
(
'caret-down'
,
class:
'toggle-icon'
)
=
icon
(
'caret-down'
,
class:
'toggle-icon
icon
'
)
%ul
#issuable-close-menu
.js-issuable-close-menu.dropdown-menu
{
class:
button_responsive_class
,
data:
{
dropdown:
true
}
}
%ul
#issuable-close-menu
.js-issuable-close-menu.dropdown-menu
{
class:
button_responsive_class
,
data:
{
dropdown:
true
}
}
%li
.close-item
{
class:
"#{issuable.closed? ? 'hidden' : 'droplab-item-selected'}"
,
data:
{
text:
"Close #{display_issuable_type}"
,
url:
close_issuable_path
(
issuable
),
button_class:
"#{button_class} btn-close"
,
toggle_class:
"#{toggle_class} btn-close-color"
,
method:
button_method
}
}
%li
.close-item
{
class:
"#{issuable.closed? ? 'hidden' : 'droplab-item-selected'}"
,
data:
{
text:
"Close #{display_issuable_type}"
,
url:
close_issuable_path
(
issuable
),
button_class:
"#{button_class} btn-close"
,
toggle_class:
"#{toggle_class} btn-close-color"
,
method:
button_method
}
}
%
a
{
href:
'#'
}
%
button
.btn.btn-transparent
=
icon
(
'check'
)
=
icon
(
'check'
,
class:
'icon'
)
.description
.description
%strong
%strong
Close
Close
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
%p
%p
%li
.reopen-item
{
class:
"#{issuable.closed? ? 'droplab-item-selected' : 'hidden'}"
,
data:
{
text:
"Reopen #{display_issuable_type}"
,
url:
reopen_issuable_path
(
issuable
),
button_class:
"#{button_class} btn-reopen"
,
toggle_class:
"#{toggle_class} btn-reopen-color"
,
method:
button_method
}
}
%li
.reopen-item
{
class:
"#{issuable.closed? ? 'droplab-item-selected' : 'hidden'}"
,
data:
{
text:
"Reopen #{display_issuable_type}"
,
url:
reopen_issuable_path
(
issuable
),
button_class:
"#{button_class} btn-reopen"
,
toggle_class:
"#{toggle_class} btn-reopen-color"
,
method:
button_method
}
}
%
a
{
href:
'#'
}
%
button
.btn.btn-transparent
=
icon
(
'check'
)
=
icon
(
'check'
,
class:
'icon'
)
.description
.description
%strong
%strong
Reopen
Reopen
...
@@ -34,8 +34,8 @@
...
@@ -34,8 +34,8 @@
%li
.divider.droplab-item-ignore
%li
.divider.droplab-item-ignore
%li
{
data:
{
text:
'Report abuse'
,
url:
new_abuse_report_path
(
user_id:
issuable
.
author
.
id
,
ref_url:
issuable_url
(
issuable
)),
button_class:
"#{button_class} btn-close-color"
,
toggle_class:
"#{toggle_class} btn-close-color"
,
method:
''
}
}
%li
{
data:
{
text:
'Report abuse'
,
url:
new_abuse_report_path
(
user_id:
issuable
.
author
.
id
,
ref_url:
issuable_url
(
issuable
)),
button_class:
"#{button_class} btn-close-color"
,
toggle_class:
"#{toggle_class} btn-close-color"
,
method:
''
}
}
%
a
{
href:
'#'
}
%
button
.btn.btn-transparent
=
icon
(
'check'
)
=
icon
(
'check'
,
class:
'icon'
)
.description
.description
%strong
Report abuse
%strong
Report abuse
%p
%p
...
...
app/views/shared/notes/_comment_button.html.haml
View file @
e5100c33
...
@@ -9,8 +9,8 @@
...
@@ -9,8 +9,8 @@
%ul
#resolvable-comment-menu
.dropdown-menu
{
data:
{
dropdown:
true
}
}
%ul
#resolvable-comment-menu
.dropdown-menu
{
data:
{
dropdown:
true
}
}
%li
#comment
.droplab-item-selected
{
data:
{
value:
''
,
'submit-text'
=>
'Comment'
,
'close-text'
=>
"Comment & close #{noteable_name}"
,
'reopen-text'
=>
"Comment & reopen #{noteable_name}"
}
}
%li
#comment
.droplab-item-selected
{
data:
{
value:
''
,
'submit-text'
=>
'Comment'
,
'close-text'
=>
"Comment & close #{noteable_name}"
,
'reopen-text'
=>
"Comment & reopen #{noteable_name}"
}
}
%
a
{
href:
'#'
}
%
button
.btn.btn-transparent
=
icon
(
'check'
)
=
icon
(
'check'
,
class:
'icon'
)
.description
.description
%strong
Comment
%strong
Comment
%p
%p
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
%li
.divider.droplab-item-ignore
%li
.divider.droplab-item-ignore
%li
#discussion
{
data:
{
value:
'DiscussionNote'
,
'submit-text'
=>
'Start discussion'
,
'close-text'
=>
"Start discussion & close #{noteable_name}"
,
'reopen-text'
=>
"Start discussion & reopen #{noteable_name}"
}
}
%li
#discussion
{
data:
{
value:
'DiscussionNote'
,
'submit-text'
=>
'Start discussion'
,
'close-text'
=>
"Start discussion & close #{noteable_name}"
,
'reopen-text'
=>
"Start discussion & reopen #{noteable_name}"
}
}
%
a
{
href:
'#'
}
%
button
.btn.btn-transparent
=
icon
(
'check'
)
=
icon
(
'check'
,
class:
'icon'
)
.description
.description
%strong
Start discussion
%strong
Start discussion
%p
%p
...
...
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