Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx-platform
Commits
1caef344
Commit
1caef344
authored
Sep 04, 2012
by
Matthew Mongeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sidebar alignment
parent
a51ae8cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+16
-16
No files found.
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
1caef344
...
@@ -23,32 +23,32 @@ class @DiscussionThreadListView extends Backbone.View
...
@@ -23,32 +23,32 @@ class @DiscussionThreadListView extends Backbone.View
scrollTop
=
$
(
window
).
scrollTop
();
scrollTop
=
$
(
window
).
scrollTop
();
windowHeight
=
$
(
window
).
height
();
windowHeight
=
$
(
window
).
height
();
$discussionBody
=
$
(
".discussion-body
"
)
discussionBody
=
$
(
".discussion-article
"
)
discussionsBodyTop
=
$
discussionBody
.
offset
().
top
;
discussionsBodyTop
=
discussionBody
.
offset
().
top
;
discussionsBodyBottom
=
discussionsBodyTop
+
$discussionBody
.
h
eight
();
discussionsBodyBottom
=
discussionsBodyTop
+
discussionBody
.
outerH
eight
();
$
sidebar
=
$
(
".sidebar"
)
sidebar
=
$
(
".sidebar"
)
if
scrollTop
>
discussionsBodyTop
-
@
sidebar_padding
if
scrollTop
>
discussionsBodyTop
-
@
sidebar_padding
$
sidebar
.
addClass
(
'fixed'
);
sidebar
.
addClass
(
'fixed'
);
$
sidebar
.
css
(
'top'
,
@
sidebar_padding
);
sidebar
.
css
(
'top'
,
@
sidebar_padding
);
else
else
$
sidebar
.
removeClass
(
'fixed'
);
sidebar
.
removeClass
(
'fixed'
);
$
sidebar
.
css
(
'top'
,
'0'
);
sidebar
.
css
(
'top'
,
'0'
);
sidebarWidth
=
.
32
*
$
discussionBody
.
width
()
-
10
;
sidebarWidth
=
.
32
*
$
(
".discussion-body"
)
.
width
()
-
10
;
$
sidebar
.
css
(
'width'
,
sidebarWidth
+
'px'
);
sidebar
.
css
(
'width'
,
sidebarWidth
+
'px'
);
sidebarHeight
=
windowHeight
-
Math
.
max
(
discussionsBodyTop
-
scrollTop
,
@
sidebar_padding
)
sidebarHeight
=
windowHeight
-
Math
.
max
(
discussionsBodyTop
-
scrollTop
,
@
sidebar_padding
)
top
Amoun
t
=
scrollTop
+
windowHeight
top
Offse
t
=
scrollTop
+
windowHeight
bottomAmoun
t
=
discussionsBodyBottom
+
@
sidebar_padding
discussionBottomOffse
t
=
discussionsBodyBottom
+
@
sidebar_padding
amount
=
Math
.
max
(
top
Amount
-
bottomAmoun
t
,
0
)
amount
=
Math
.
max
(
top
Offset
-
discussionBottomOffse
t
,
0
)
sidebarHeight
=
sidebarHeight
-
@
sidebar_padding
-
amount
sidebarHeight
=
sidebarHeight
-
@
sidebar_padding
-
amount
$sidebar
.
css
'height'
,
Math
.
max
(
sidebarHeight
,
400
)
sidebar
.
css
'height'
,
Math
.
min
(
Math
.
max
(
sidebarHeight
,
400
),
discussionBody
.
outerHeight
()
)
$
postListWrapper
=
@
$
(
'.post-list-wrapper'
)
postListWrapper
=
@
$
(
'.post-list-wrapper'
)
$
postListWrapper
.
css
(
'height'
,
(
sidebarHeight
-
@
sidebar_header_height
-
4
)
+
'px'
);
postListWrapper
.
css
(
'height'
,
(
sidebarHeight
-
@
sidebar_header_height
-
4
)
+
'px'
);
# Because we want the behavior that when the body is clicked the menu is
# Because we want the behavior that when the body is clicked the menu is
...
...
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