From a665f3aa18019f0c30ca05ade52d46dc77d1d0ab Mon Sep 17 00:00:00 2001 From: Ibrahim Awwal Date: Fri, 14 Sep 2012 02:59:47 -0700 Subject: [PATCH 1/2] Change CSS class for more pages button to .more-pages --- lms/static/sass/_discussion.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/static/sass/_discussion.scss b/lms/static/sass/_discussion.scss index d9aea37371..abeb9f48bc 100644 --- a/lms/static/sass/_discussion.scss +++ b/lms/static/sass/_discussion.scss @@ -1039,7 +1039,7 @@ body.discussion { } } - .more a { + .more-pages a { background: #eee; font-size: 12px; line-height: 33px; From a570b6030af0063551f6c30ff6020177ee300641 Mon Sep 17 00:00:00 2001 From: Ibrahim Awwal Date: Fri, 14 Sep 2012 03:40:41 -0700 Subject: [PATCH 2/2] Prevent threads from being added to a discussion twice. Probably slow, but it works for now. --- lms/static/coffee/src/discussion/discussion.coffee | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lms/static/coffee/src/discussion/discussion.coffee b/lms/static/coffee/src/discussion/discussion.coffee index 698fa1b039..eadf65c6ae 100644 --- a/lms/static/coffee/src/discussion/discussion.coffee +++ b/lms/static/coffee/src/discussion/discussion.coffee @@ -18,11 +18,12 @@ if Backbone? @current_page < @pages addThread: (thread, options) -> - # TODO: Check for existing thread with same ID? - options ||= {} - model = new Thread thread - @add model - model + # TODO: Check for existing thread with same ID in a faster way + if not @find(thread.id) + options ||= {} + model = new Thread thread + @add model + model retrieveAnotherPage: (search_text="", commentable_ids="", sort_key="")-> # TODO: I really feel that this belongs in DiscussionThreadListView