From 0c28858c64f262dc2c1883705eb4304d5c819cd9 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Thu, 14 Nov 2013 13:40:16 -0500 Subject: [PATCH] Remove unused forum CoffeeScript code --- .../static/coffee/src/discussion/utils.coffee | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/common/static/coffee/src/discussion/utils.coffee b/common/static/coffee/src/discussion/utils.coffee index 193b6d1a6d..fd31188774 100644 --- a/common/static/coffee/src/discussion/utils.coffee +++ b/common/static/coffee/src/discussion/utils.coffee @@ -110,24 +110,6 @@ class @DiscussionUtil params["$loading"].loaded() return request - @get: ($elem, url, data, success) -> - @safeAjax - $elem: $elem - url: url - type: "GET" - dataType: "json" - data: data - success: success - - @post: ($elem, url, data, success) -> - @safeAjax - $elem: $elem - url: url - type: "POST" - dataType: "json" - data: data - success: success - @bindLocalEvents: ($local, eventsHandler) -> for eventSelector, handler of eventsHandler [event, selector] = eventSelector.split(' ') @@ -202,38 +184,6 @@ class @DiscussionUtil @getWmdInput($content, $local, cls_identifier).val(text) @getWmdEditor($content, $local, cls_identifier).refreshPreview() - @subscriptionLink: (type, id) -> - followLink = -> - @generateDiscussionLink("discussion-follow-#{type}", "Follow", handleFollow) - - unfollowLink = -> - @generateDiscussionLink("discussion-unfollow-#{type}", "Unfollow", handleUnfollow) - - handleFollow = (elem) -> - @safeAjax - $elem: $(elem) - url: @urlFor("follow_#{type}", id) - type: "POST" - success: (response, textStatus) -> - if textStatus == "success" - $(elem).replaceWith unfollowLink() - dataType: 'json' - - handleUnfollow = (elem) -> - @safeAjax - $elem: $(elem) - url: @urlFor("unfollow_#{type}", id) - type: "POST" - success: (response, textStatus) -> - if textStatus == "success" - $(elem).replaceWith followLink() - dataType: 'json' - - if @isSubscribed(id, type) - unfollowLink() - else - followLink() - @processEachMathAndCode: (text, processor) -> codeArchive = []