Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
5d4bb0ef
Commit
5d4bb0ef
authored
Jun 22, 2015
by
José Padilla
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3038 from jpadilla/dropdown
Set dynamic maximum height for dropdown widgets
parents
8c5fc2a9
33a08928
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
docs_theme/base.html
+4
-4
docs_theme/css/default.css
+3
-2
No files found.
docs_theme/base.html
View file @
5d4bb0ef
...
@@ -151,10 +151,10 @@
...
@@ -151,10 +151,10 @@
<script
src=
"{{ base_url }}/js/theme.js"
></script>
<script
src=
"{{ base_url }}/js/theme.js"
></script>
<script>
<script>
//$('.side-nav').scrollspy()
var
shiftWindow
=
function
()
{
var
shiftWindow
=
function
()
{
scrollBy
(
0
,
-
50
)
scrollBy
(
0
,
-
50
)
};
};
if
(
location
.
hash
)
shiftWindow
();
if
(
location
.
hash
)
shiftWindow
();
window
.
addEventListener
(
"hashchange"
,
shiftWindow
);
window
.
addEventListener
(
"hashchange"
,
shiftWindow
);
...
@@ -162,12 +162,12 @@
...
@@ -162,12 +162,12 @@
event
.
stopPropagation
();
event
.
stopPropagation
();
});
});
// Dynamically force sidenav to no higher than browser window
// Dynamically force sidenav
/dropdown
to no higher than browser window
$
(
'.side-nav'
).
css
(
'max-height'
,
window
.
innerHeight
-
130
);
$
(
'.side-nav
, .dropdown-menu
'
).
css
(
'max-height'
,
window
.
innerHeight
-
130
);
$
(
function
()
{
$
(
function
()
{
$
(
window
).
resize
(
function
()
{
$
(
window
).
resize
(
function
()
{
$
(
'.side-nav'
).
css
(
'max-height'
,
window
.
innerHeight
-
130
);
$
(
'.side-nav
, .dropdown-menu
'
).
css
(
'max-height'
,
window
.
innerHeight
-
130
);
});
});
});
});
</script>
</script>
...
...
docs_theme/css/default.css
View file @
5d4bb0ef
...
@@ -5,11 +5,12 @@ pre {
...
@@ -5,11 +5,12 @@ pre {
}
}
.dropdown
.dropdown-menu
{
.dropdown
.dropdown-menu
{
display
:
none
;
display
:
none
;
overflow-y
:
scroll
;
}
}
.dropdown.open
.dropdown-menu
{
.dropdown.open
.dropdown-menu
{
display
:
block
;
display
:
block
;
}
}
@media
(
max-width
:
480px
)
{
@media
(
max-width
:
480px
)
{
...
...
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