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
8a7f0224
Commit
8a7f0224
authored
Dec 11, 2014
by
E. Kolpakov
Committed by
Jonathan Piacenti
Aug 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed email notifications enable/disable
parent
40be656e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+9
-18
No files found.
common/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
8a7f0224
...
@@ -261,10 +261,7 @@ if Backbone?
...
@@ -261,10 +261,7 @@ if Backbone?
url
:
url
url
:
url
type
:
"GET"
type
:
"GET"
success
:
(
response
,
textStatus
)
=>
success
:
(
response
,
textStatus
)
=>
if
response
.
status
$
(
'input.email-setting'
).
prop
(
'checked'
,
response
.
status
)
$
(
'input.email-setting'
).
attr
(
'checked'
,
'checked'
)
else
$
(
'input.email-setting'
).
removeAttr
(
'checked'
)
#select all threads
#select all threads
isBrowseMenuVisible
:
=>
isBrowseMenuVisible
:
=>
...
@@ -516,17 +513,11 @@ if Backbone?
...
@@ -516,17 +513,11 @@ if Backbone?
@
retrieveFirstPage
()
@
retrieveFirstPage
()
updateEmailNotifications
:
()
=>
updateEmailNotifications
:
()
=>
if
$
(
'input.email-setting'
).
attr
(
'checked'
)
checkbox
=
$
(
'input.email-setting'
)
DiscussionUtil
.
safeAjax
checked
=
checkbox
.
prop
(
'checked'
)
url
:
DiscussionUtil
.
urlFor
(
"enable_notifications"
)
url_name
=
if
checked
then
"enable_notifications"
else
"disable_notifications"
type
:
"POST"
DiscussionUtil
.
safeAjax
error
:
()
=>
url
:
DiscussionUtil
.
urlFor
(
url_name
)
$
(
'input.email-setting'
).
removeAttr
(
'checked'
)
type
:
"POST"
else
error
:
()
=>
DiscussionUtil
.
safeAjax
checkbox
.
prop
(
'checked'
,
!
checked
)
url
:
DiscussionUtil
.
urlFor
(
"disable_notifications"
)
type
:
"POST"
error
:
()
=>
$
(
'input.email-setting'
).
attr
(
'checked'
,
'checked'
)
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