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
Kazuhiko Shiozaki
gitlab-ce
Commits
cabd228f
Commit
cabd228f
authored
Mar 02, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bugs with open and close buttons
parent
61ce134f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
22 deletions
+27
-22
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+6
-20
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+18
-1
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+1
-1
app/views/projects/merge_requests/show/_mr_title.html.haml
app/views/projects/merge_requests/show/_mr_title.html.haml
+2
-0
No files found.
app/assets/javascripts/application.js.coffee
View file @
cabd228f
...
...
@@ -220,7 +220,7 @@ $ ->
.
off
'breakpoint:change'
.
on
'breakpoint:change'
,
(
e
,
breakpoint
)
->
if
breakpoint
is
'sm'
or
breakpoint
is
'xs'
$gutterIcon
=
$
(
'.gutter-toggle'
).
find
(
'i'
)
$gutterIcon
=
$
(
'
aside
.gutter-toggle'
).
find
(
'i'
)
if
$gutterIcon
.
hasClass
(
'fa-angle-double-right'
)
$gutterIcon
.
closest
(
'a'
).
trigger
(
'click'
)
...
...
@@ -230,36 +230,22 @@ $ ->
e
.
preventDefault
()
$this
=
$
(
this
)
$thisIcon
=
$this
.
find
'i'
$allGutterToggleIcons
=
$
(
'.gutter-toggle i'
)
if
$thisIcon
.
hasClass
(
'fa-angle-double-right'
)
# It's open -> close it
if
bootstrapBreakpoint
is
'xs'
# it's the gutter open button outside the aside
if
not
$this
.
closest
(
'aside'
).
length
$
(
'aside'
).
addClass
(
'hidden-xs'
)
console
.
log
(
bootstrapBreakpoint
);
$thisIcon
$allGutterToggleIcons
.
removeClass
(
'fa-angle-double-right'
)
.
addClass
(
'fa-angle-double-left'
)
$this
.
closest
(
'aside'
)
$
(
'aside.right-sidebar'
)
.
removeClass
(
'right-sidebar-expanded'
)
.
addClass
(
'right-sidebar-collapsed'
)
$
(
'.page-with-sidebar'
)
.
removeClass
(
'right-sidebar-expanded'
)
.
addClass
(
'right-sidebar-collapsed'
)
else
# It's closed -> open it
if
bootstrapBreakpoint
is
'xs'
# it's the gutter open button outside the aside
if
not
$this
.
closest
(
'aside'
).
length
$
(
'aside'
).
removeClass
(
'hidden-xs'
)
$thisIcon
$allGutterToggleIcons
.
removeClass
(
'fa-angle-double-left'
)
.
addClass
(
'fa-angle-double-right'
)
$this
.
closest
(
'aside'
)
$
(
'aside.right-sidebar'
)
.
removeClass
(
'right-sidebar-collapsed'
)
.
addClass
(
'right-sidebar-expanded'
)
$
(
'.page-with-sidebar'
)
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
cabd228f
...
...
@@ -151,7 +151,6 @@
}
}
.right-sidebar
{
position
:
fixed
;
top
:
58px
;
...
...
@@ -174,6 +173,12 @@
.gutter-toggle
{
border-left
:
1px
solid
$border-gray-light
;
@media
(
max-width
:
$screen-sm-max
)
{
display
:
none
;
}
@media
(
min-width
:
$screen-sm-min
)
{
display
:
block
}
}
}
...
...
@@ -184,6 +189,14 @@
}
&
.right-sidebar-collapsed
{
@media
(
max-width
:
$screen-sm-max
)
{
display
:
none
;
}
@media
(
min-width
:
$screen-sm-min
)
{
display
:
block
}
width
:
$sidebar_collapsed_width
;
padding-top
:
0
;
...
...
@@ -247,6 +260,10 @@
}
}
.btn-default.gutter-toggle
{
margin-top
:
4px
;
}
.detail-page-description
{
small
{
color
:
$gray-darkest
;
...
...
app/helpers/issuables_helper.rb
View file @
cabd228f
...
...
@@ -5,7 +5,7 @@ module IssuablesHelper
end
def
sidebar_gutter_collapsed_class
"
hidden-xs
right-sidebar-
#{
sidebar_gutter_collapsed?
?
'collapsed'
:
'expanded'
}
"
"right-sidebar-
#{
sidebar_gutter_collapsed?
?
'collapsed'
:
'expanded'
}
"
end
def
issuables_count
(
issuable
)
...
...
app/views/projects/merge_requests/show/_mr_title.html.haml
View file @
cabd228f
...
...
@@ -4,6 +4,8 @@
=
@merge_request
.
state_human_name
%span
.hidden-sm.hidden-md.hidden-lg
=
icon
(
@merge_request
.
state_icon_name
)
%a
.btn.btn-default.pull-right.hidden-sm.hidden-md.hidden-lg.gutter-toggle
{
href:
"#"
}
=
icon
(
'angle-double-left'
)
.issue-meta
%strong
.identifier
Merge Request ##{@merge_request.iid}
...
...
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