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
e809fb3b
Commit
e809fb3b
authored
Sep 19, 2012
by
Ibrahim Awwal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use loadMorePages to load All as well.
parent
74ba9319
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
12 deletions
+6
-12
lms/static/coffee/src/discussion/discussion.coffee
+1
-0
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+5
-12
No files found.
lms/static/coffee/src/discussion/discussion.coffee
View file @
e809fb3b
...
...
@@ -53,6 +53,7 @@ if Backbone?
Content
.
loadContentInfos
(
response
.
annotated_content_info
)
@
reset
new_collection
@
pages
=
response
.
num_pages
@
current_page
=
response
.
page
sortByDate
:
(
thread
)
->
thread
.
get
(
"created_at"
)
...
...
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
e809fb3b
...
...
@@ -298,17 +298,10 @@ if Backbone?
# @displayedCollection.reset(@collection.models)
retrieveAllThreads
:
()
->
@
mode
=
'all'
url
=
DiscussionUtil
.
urlFor
(
"threads"
)
DiscussionUtil
.
safeAjax
url
:
url
type
:
"GET"
success
:
(
response
,
textStatus
)
=>
@
collection
.
current_page
=
response
.
page
@
collection
.
pages
=
response
.
num_pages
@
collection
.
reset
(
response
.
discussion_data
)
Content
.
loadContentInfos
(
response
.
annotated_content_info
)
@
displayedCollection
.
reset
(
@
collection
.
models
)
#Don't think this is necessary
@
mode
=
'all'
@
collection
.
current_page
=
0
@
collection
.
reset
()
@
loadMorePages
()
sortThreads
:
(
event
)
->
@
$
(
".sort-bar a"
).
removeClass
(
"active"
)
...
...
@@ -321,7 +314,7 @@ if Backbone?
when
'votes'
then
@
displayedCollection
.
sortByVotes
when
'comments'
then
@
displayedCollection
.
sortByComments
@
loadMorePages
(
event
)
#@displayedCollection.sort() # This should be called automatically and calling
this
makes the loading indicator go away
#@displayedCollection.sort() # This should be called automatically and calling
manually
makes the loading indicator go away
performSearch
:
(
event
)
->
if
event
.
which
==
13
...
...
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