update checkbox with get settings
This commit is contained in:
@@ -80,9 +80,6 @@ class @DiscussionUtil
|
||||
permanent_link_thread : "/courses/#{$$course_id}/discussion/forum/#{param}/threads/#{param1}"
|
||||
permanent_link_comment : "/courses/#{$$course_id}/discussion/forum/#{param}/threads/#{param1}##{param2}"
|
||||
user_profile : "/courses/#{$$course_id}/discussion/forum/users/#{param}"
|
||||
|
||||
user_stats : "/courses/#{$$course_id}/discussion/panel/stats"
|
||||
|
||||
followed_threads : "/courses/#{$$course_id}/discussion/forum/users/#{param}/followed"
|
||||
threads : "/courses/#{$$course_id}/discussion/forum"
|
||||
}[name]
|
||||
|
||||
@@ -197,7 +197,7 @@ if Backbone?
|
||||
@template = _.template($("#discussion-home").html())
|
||||
$(".discussion-column").html(@template)
|
||||
$(".post-list a").removeClass("active")
|
||||
@retrieveUserStats()
|
||||
$(".email-notification").bind "click", @updateEmailNotifications
|
||||
thread_id = null
|
||||
|
||||
toggleTopicDrop: (event) =>
|
||||
@@ -321,16 +321,7 @@ if Backbone?
|
||||
if callback?
|
||||
callback()
|
||||
|
||||
retrieveUserStats: () ->
|
||||
url = DiscussionUtil.urlFor("user_stats")
|
||||
DiscussionUtil.safeAjax
|
||||
url: url
|
||||
type: "GET"
|
||||
success: (response, textStatus) =>
|
||||
alert('success')
|
||||
error: (response) =>
|
||||
alert('error')
|
||||
|
||||
|
||||
retrieveDiscussions: (discussion_ids) ->
|
||||
@discussionIds = discussion_ids.join(',')
|
||||
@mode = 'commentables'
|
||||
@@ -437,3 +428,9 @@ if Backbone?
|
||||
retrieveFollowed: (event)=>
|
||||
@mode = 'followed'
|
||||
@retrieveFirstPage(event)
|
||||
|
||||
updateEmailNotifications: () =>
|
||||
if $('input.email-notification').attr('checked')
|
||||
alert('checked')
|
||||
else
|
||||
alert('unchecked')
|
||||
Reference in New Issue
Block a user