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
62f6e2d5
Commit
62f6e2d5
authored
Jul 29, 2013
by
Kevin Chugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
home button working, default to home when no thread selected
parent
47dbf2e6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
13 deletions
+15
-13
common/static/coffee/src/discussion/discussion_router.coffee
+1
-0
common/static/coffee/src/discussion/utils.coffee
+1
-0
common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+13
-11
lms/lib/comment_client/user.py
+0
-2
No files found.
common/static/coffee/src/discussion/discussion_router.coffee
View file @
62f6e2d5
...
...
@@ -20,6 +20,7 @@ if Backbone?
allThreads
:
->
@
nav
.
updateSidebar
()
@
nav
.
goHome
()
setActiveThread
:
=>
if
@
thread
...
...
common/static/coffee/src/discussion/utils.coffee
View file @
62f6e2d5
...
...
@@ -84,6 +84,7 @@ class @DiscussionUtil
threads
:
"/courses/
#{
$$course_id
}
/discussion/forum"
"enable_notifications"
:
"/notification_prefs/enable/"
"disable_notifications"
:
"/notification_prefs/disable/"
"notifications_status"
:
"/user_api/v1/user_prefs/?key=notification_pref&use=
#{
param
}
"
}[
name
]
@
safeAjax
:
(
params
)
->
...
...
common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
62f6e2d5
...
...
@@ -198,12 +198,20 @@ if Backbone?
$
(
".discussion-column"
).
html
(
@
template
)
$
(
".post-list a"
).
removeClass
(
"active"
)
$
(
"input.email-setting"
).
bind
"click"
,
@
updateEmailNotifications
url
=
DiscussionUtil
.
urlFor
(
"get_notifications_state
"
,
window
.
user
.
get
(
"id"
))
url
=
DiscussionUtil
.
urlFor
(
"notifications_status
"
,
window
.
user
.
get
(
"id"
))
DiscussionUtil
.
safeAjax
url
:
url
type
:
"
POS
T"
type
:
"
GE
T"
dataType
:
'json'
success
:
(
response
,
textStatus
)
=>
if
response
.
count
==
1
$
(
'input.email-setting'
).
attr
(
'checked'
,
'checked'
)
else
$
(
'input.email-setting'
).
removeAttr
(
'checked'
)
thread_id
=
null
@
trigger
(
"thread:removed"
)
#select all threads
toggleTopicDrop
:
(
event
)
=>
event
.
preventDefault
()
...
...
@@ -435,25 +443,19 @@ if Backbone?
@
retrieveFirstPage
(
event
)
updateEmailNotifications
:
()
=>
if
$
(
'input.email-
notification
'
).
attr
(
'checked'
)
if
$
(
'input.email-
setting
'
).
attr
(
'checked'
)
DiscussionUtil
.
safeAjax
url
:
DiscussionUtil
.
urlFor
(
"enable_notifications"
)
type
:
"POST"
dataType
:
'json'
data
:
user
:
window
.
user
.
get
(
"id"
)
error
:
()
=>
$
(
'input.email-
notification
'
).
removeAttr
(
'checked'
)
$
(
'input.email-
setting
'
).
removeAttr
(
'checked'
)
else
DiscussionUtil
.
safeAjax
url
:
DiscussionUtil
.
urlFor
(
"disable_notifications"
)
type
:
"POST"
dataType
:
'json'
data
:
user
:
window
.
user
.
get
(
"id"
)
error
:
()
=>
$
(
'input.email-
notification
'
).
attr
(
'checked'
,
'checked'
)
$
(
'input.email-
setting
'
).
attr
(
'checked'
,
'checked'
)
lms/lib/comment_client/user.py
View file @
62f6e2d5
...
...
@@ -97,7 +97,6 @@ def _url_for_subscription(user_id):
def
_url_for_user_active_threads
(
user_id
):
print
(
"
\n\n\n
*********** ACTIVE THREADS **********
\n\n\n
"
)
return
"{prefix}/users/{user_id}/active_threads"
.
format
(
prefix
=
settings
.
PREFIX
,
user_id
=
user_id
)
...
...
@@ -105,7 +104,6 @@ def _url_for_user_subscribed_threads(user_id):
return
"{prefix}/users/{user_id}/subscribed_threads"
.
format
(
prefix
=
settings
.
PREFIX
,
user_id
=
user_id
)
def
_url_for_user_stats
(
user_id
,
course_id
):
print
(
"
\n\n\n
*********** USER STATS **********
\n\n\n
"
)
return
"{prefix}/users/{user_id}/stats?course_id={course_id}"
.
format
(
prefix
=
settings
.
PREFIX
,
user_id
=
user_id
,
course_id
=
course_id
)
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