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
e0efdc4b
Commit
e0efdc4b
authored
8 years ago
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make size changes based on screen resize.
parent
f660d8d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+36
-0
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+1
-0
No files found.
app/assets/javascripts/application.js.coffee
View file @
e0efdc4b
...
...
@@ -212,6 +212,13 @@ $ ->
$this
=
$
(
this
)
$this
.
attr
'value'
,
$this
.
val
()
$
(
document
).
on
'breakpoint:change'
,
(
e
,
breakpoint
)
->
if
breakpoint
is
'sm'
or
breakpoint
is
'xs'
$gutterIcon
=
$
(
'.gutter-toggle'
).
find
(
'i'
)
if
$gutterIcon
.
hasClass
(
'fa-angle-double-right'
)
$gutterIcon
.
closest
(
'a'
).
trigger
(
'click'
)
$
(
document
).
on
'click'
,
'aside .gutter-toggle'
,
(
e
)
->
e
.
preventDefault
()
$this
=
$
(
this
)
...
...
@@ -240,4 +247,33 @@ $ ->
$
(
'.right-sidebar'
)
.
hasClass
(
'right-sidebar-collapsed'
),
{
path
:
'/'
})
bootstrapBreakpoint
=
undefined
;
checkBootstrapBreakpoints
=
->
if
$
(
'.device-xs'
).
is
(
':visible'
)
bootstrapBreakpoint
=
"xs"
else
if
$
(
'.device-sm'
).
is
(
':visible'
)
bootstrapBreakpoint
=
"sm"
else
if
$
(
'.device-md'
).
is
(
':visible'
)
bootstrapBreakpoint
=
"md"
else
if
$
(
'.device-lg'
).
is
(
':visible'
)
bootstrapBreakpoint
=
"lg"
setBootstrapBreakpoints
=
->
if
$
(
'.device-xs'
).
length
return
$
(
"body"
)
.
append
(
'<div class="device-xs visible-xs"></div>'
+
'<div class="device-sm visible-sm"></div>'
+
'<div class="device-md visible-md"></div>'
+
'<div class="device-lg visible-lg"></div>'
)
checkBootstrapBreakpoints
()
$
(
window
).
on
"resize"
,
(
e
)
->
oldBootstrapBreakpoint
=
bootstrapBreakpoint
checkBootstrapBreakpoints
()
if
bootstrapBreakpoint
!=
oldBootstrapBreakpoint
$
(
document
).
trigger
(
'breakpoint:change'
,[
bootstrapBreakpoint
])
setBootstrapBreakpoints
()
new
Aside
()
This diff is collapsed.
Click to expand it.
app/assets/stylesheets/pages/issuable.scss
View file @
e0efdc4b
...
...
@@ -184,6 +184,7 @@
&
.right-sidebar-collapsed
{
width
:
$sidebar_collapsed_width
;
padding-top
:
0
;
overflow-x
:
hidden
;
hr
{
margin
:
0
;
...
...
This diff is collapsed.
Click to expand it.
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