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
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 @@ $ ->
...
@@ -220,7 +220,7 @@ $ ->
.
off
'breakpoint:change'
.
off
'breakpoint:change'
.
on
'breakpoint:change'
,
(
e
,
breakpoint
)
->
.
on
'breakpoint:change'
,
(
e
,
breakpoint
)
->
if
breakpoint
is
'sm'
or
breakpoint
is
'xs'
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'
)
if
$gutterIcon
.
hasClass
(
'fa-angle-double-right'
)
$gutterIcon
.
closest
(
'a'
).
trigger
(
'click'
)
$gutterIcon
.
closest
(
'a'
).
trigger
(
'click'
)
...
@@ -230,36 +230,22 @@ $ ->
...
@@ -230,36 +230,22 @@ $ ->
e
.
preventDefault
()
e
.
preventDefault
()
$this
=
$
(
this
)
$this
=
$
(
this
)
$thisIcon
=
$this
.
find
'i'
$thisIcon
=
$this
.
find
'i'
$allGutterToggleIcons
=
$
(
'.gutter-toggle i'
)
if
$thisIcon
.
hasClass
(
'fa-angle-double-right'
)
if
$thisIcon
.
hasClass
(
'fa-angle-double-right'
)
# It's open -> close it
$allGutterToggleIcons
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
.
removeClass
(
'fa-angle-double-right'
)
.
removeClass
(
'fa-angle-double-right'
)
.
addClass
(
'fa-angle-double-left'
)
.
addClass
(
'fa-angle-double-left'
)
$this
$
(
'aside.right-sidebar'
)
.
closest
(
'aside'
)
.
removeClass
(
'right-sidebar-expanded'
)
.
removeClass
(
'right-sidebar-expanded'
)
.
addClass
(
'right-sidebar-collapsed'
)
.
addClass
(
'right-sidebar-collapsed'
)
$
(
'.page-with-sidebar'
)
$
(
'.page-with-sidebar'
)
.
removeClass
(
'right-sidebar-expanded'
)
.
removeClass
(
'right-sidebar-expanded'
)
.
addClass
(
'right-sidebar-collapsed'
)
.
addClass
(
'right-sidebar-collapsed'
)
else
else
# It's closed -> open it
$allGutterToggleIcons
if
bootstrapBreakpoint
is
'xs'
# it's the gutter open button outside the aside
if
not
$this
.
closest
(
'aside'
).
length
$
(
'aside'
).
removeClass
(
'hidden-xs'
)
$thisIcon
.
removeClass
(
'fa-angle-double-left'
)
.
removeClass
(
'fa-angle-double-left'
)
.
addClass
(
'fa-angle-double-right'
)
.
addClass
(
'fa-angle-double-right'
)
$this
$
(
'aside.right-sidebar'
)
.
closest
(
'aside'
)
.
removeClass
(
'right-sidebar-collapsed'
)
.
removeClass
(
'right-sidebar-collapsed'
)
.
addClass
(
'right-sidebar-expanded'
)
.
addClass
(
'right-sidebar-expanded'
)
$
(
'.page-with-sidebar'
)
$
(
'.page-with-sidebar'
)
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
cabd228f
...
@@ -151,7 +151,6 @@
...
@@ -151,7 +151,6 @@
}
}
}
}
.right-sidebar
{
.right-sidebar
{
position
:
fixed
;
position
:
fixed
;
top
:
58px
;
top
:
58px
;
...
@@ -174,6 +173,12 @@
...
@@ -174,6 +173,12 @@
.gutter-toggle
{
.gutter-toggle
{
border-left
:
1px
solid
$border-gray-light
;
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 @@
...
@@ -184,6 +189,14 @@
}
}
&
.right-sidebar-collapsed
{
&
.right-sidebar-collapsed
{
@media
(
max-width
:
$screen-sm-max
)
{
display
:
none
;
}
@media
(
min-width
:
$screen-sm-min
)
{
display
:
block
}
width
:
$sidebar_collapsed_width
;
width
:
$sidebar_collapsed_width
;
padding-top
:
0
;
padding-top
:
0
;
...
@@ -247,6 +260,10 @@
...
@@ -247,6 +260,10 @@
}
}
}
}
.btn-default.gutter-toggle
{
margin-top
:
4px
;
}
.detail-page-description
{
.detail-page-description
{
small
{
small
{
color
:
$gray-darkest
;
color
:
$gray-darkest
;
...
...
app/helpers/issuables_helper.rb
View file @
cabd228f
...
@@ -5,7 +5,7 @@ module IssuablesHelper
...
@@ -5,7 +5,7 @@ module IssuablesHelper
end
end
def
sidebar_gutter_collapsed_class
def
sidebar_gutter_collapsed_class
"
hidden-xs
right-sidebar-
#{
sidebar_gutter_collapsed?
?
'collapsed'
:
'expanded'
}
"
"right-sidebar-
#{
sidebar_gutter_collapsed?
?
'collapsed'
:
'expanded'
}
"
end
end
def
issuables_count
(
issuable
)
def
issuables_count
(
issuable
)
...
...
app/views/projects/merge_requests/show/_mr_title.html.haml
View file @
cabd228f
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
=
@merge_request
.
state_human_name
=
@merge_request
.
state_human_name
%span
.hidden-sm.hidden-md.hidden-lg
%span
.hidden-sm.hidden-md.hidden-lg
=
icon
(
@merge_request
.
state_icon_name
)
=
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
.issue-meta
%strong
.identifier
%strong
.identifier
Merge Request ##{@merge_request.iid}
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