Commit 895e4f63 by Alan Boudreault Committed by Zia Fazal

XBlock Discussion changes

Conflicts:
	cms/djangoapps/contentstore/views/helpers.py
	common/static/coffee/src/discussion/content.coffee
	common/static/coffee/src/discussion/discussion_filter.coffee
	common/static/coffee/src/discussion/discussion_module_view.coffee
	common/static/coffee/src/discussion/discussion_router.coffee
	common/static/coffee/src/discussion/views/discussion_content_view.coffee
	common/static/coffee/src/discussion/views/discussion_thread_profile_view.coffee
	common/static/coffee/src/discussion/views/discussion_thread_show_view.coffee
	common/static/coffee/src/discussion/views/discussion_thread_view.coffee
	common/static/coffee/src/discussion/views/new_post_view.coffee
	common/static/coffee/src/discussion/views/response_comment_show_view.coffee
	common/static/coffee/src/discussion/views/thread_response_show_view.coffee
	common/static/coffee/src/discussion/views/thread_response_view.coffee
	lms/djangoapps/django_comment_client/forum/views.py
	lms/static/sass/discussion/_discussion.scss
	lms/templates/discussion/_discussion_module.html
	lms/templates/discussion/_filter_dropdown.html
	lms/templates/discussion/_js_head_dependencies.html
	lms/templates/discussion/_thread_list_template.html
	lms/templates/discussion/_underscore_templates.html
	lms/templates/discussion/index.html
	lms/templates/discussion/mustache/_inline_discussion.mustache
	lms/templates/discussion/mustache/_pagination.mustache
	lms/templates/discussion/mustache/_profile_thread.mustache
parent 07b463a9
...@@ -19,6 +19,10 @@ from contentstore.utils import reverse_course_url, reverse_library_url, reverse_ ...@@ -19,6 +19,10 @@ from contentstore.utils import reverse_course_url, reverse_library_url, reverse_
__all__ = ['edge', 'event', 'landing'] __all__ = ['edge', 'event', 'landing']
# Add Discussion templates
add_lookup('lms.main', 'templates', package='discussion_app')
# points to the temporary course landing page with log in and sign up # points to the temporary course landing page with log in and sign up
def landing(request, org, course, coursename): def landing(request, org, course, coursename):
return render_to_response('temp-course-landing.html', {}) return render_to_response('temp-course-landing.html', {})
......
...@@ -17,3 +17,6 @@ def run(): ...@@ -17,3 +17,6 @@ def run():
clear_lookups(namespace) clear_lookups(namespace)
for directory in directories: for directory in directories:
add_lookup(namespace, directory) add_lookup(namespace, directory)
# Add Discussion templates
add_lookup('main', 'templates', package='discussion_app')
...@@ -12,12 +12,10 @@ ...@@ -12,12 +12,10 @@
<%block name="headextra"> <%block name="headextra">
<%static:css group='style-course-vendor'/> <%static:css group='style-course-vendor'/>
<%static:css group='style-course'/> <%static:css group='style-course'/>
<%include file="_js_head_dependencies.html" />
</%block> </%block>
<%block name="js_extra"> <%block name="js_extra">
<%include file="_js_body_dependencies.html" /> <%include file="/discussion/_js_body_dependencies.html" />
<%static:js group='discussion'/> <%static:js group='discussion'/>
<script language="javascript"> <script language="javascript">
$(function () { $(function () {
...@@ -30,25 +28,4 @@ ...@@ -30,25 +28,4 @@
<%include file="_discussion_course_navigation.html" args="active_page='discussion'" /> <%include file="_discussion_course_navigation.html" args="active_page='discussion'" />
<section class="discussion container" id="discussion-container" <%include file="/discussion/_discussion_course.html" />
data-roles="${roles}"
data-course-id="${course_id | h}"
data-user-info="${user_info}"
data-threads="${threads}"
data-thread-pages="${thread_pages}"
data-content-info="${annotated_content_info}"
data-sort-preference="${sort_preference}"
data-flag-moderator="${flag_moderator}"
data-user-cohort-id="${user_cohort}"
data-course-settings="${course_settings}">
<div class="discussion-body">
<div class="forum-nav"></div>
<div class="discussion-column">
<article class="new-post-article" style="display: none"></article>
<div class="forum-content"></div>
</div>
</div>
</section>
<%include file="_underscore_templates.html" />
<%include file="_thread_list_template.html" />
...@@ -9,12 +9,10 @@ ...@@ -9,12 +9,10 @@
<%block name="headextra"> <%block name="headextra">
<%static:css group='style-course-vendor'/> <%static:css group='style-course-vendor'/>
<%static:css group='style-course'/> <%static:css group='style-course'/>
<%include file="_js_head_dependencies.html" />
</%block> </%block>
<%block name="js_extra"> <%block name="js_extra">
<%include file="_js_body_dependencies.html" /> <%include file="/discussion/_js_body_dependencies.html" />
<%static:js group='discussion'/> <%static:js group='discussion'/>
<script language="javascript"> <script language="javascript">
$(function () { $(function () {
...@@ -33,7 +31,7 @@ ...@@ -33,7 +31,7 @@
<nav> <nav>
<article class="sidebar-module discussion-sidebar"> <article class="sidebar-module discussion-sidebar">
<%include file="_user_profile.html" /> <%include file="/discussion/_user_profile.html" />
</article> </article>
</nav> </nav>
...@@ -43,4 +41,4 @@ ...@@ -43,4 +41,4 @@
</div> </div>
</section> </section>
<%include file="_underscore_templates.html" /> <%include file="/discussion/_underscore_templates.html" />
...@@ -179,12 +179,7 @@ span.edx { ...@@ -179,12 +179,7 @@ span.edx {
} }
.loading-animation { .loading-animation {
position: absolute; @extend %loading-animation;
left: 50%;
width: 20px;
height: 20px;
margin-left: -($baseline/2);
background: url(../images/spinner.gif) no-repeat;
} }
mark { mark {
......
...@@ -267,3 +267,40 @@ $right: right; ...@@ -267,3 +267,40 @@ $right: right;
text-decoration: underline !important; text-decoration: underline !important;
} }
} }
%tooltip {
position: absolute;
top: 0;
left: 0;
z-index: 99999;
padding: 0 10px;
border-radius: 3px;
background: rgba(0, 0, 0, .85);
font-size: 11px;
font-weight: 400;
line-height: 26px;
color: #fff;
pointer-events: none;
opacity: 0;
@include transition(opacity .1s linear 0s);
&:after {
content: '▾';
display: block;
position: absolute;
bottom: -14px;
left: 50%;
margin-left: -7px;
font-size: 20px;
color: rgba(0, 0, 0, .85);
}
}
%loading-animation {
position: absolute;
left: 50%;
width: 20px;
height: 20px;
margin-left: -10px;
background: url(../images/spinner.gif) no-repeat;
}
// Discussion app styles
@import 'bourbon/bourbon';
// base - utilities
@import 'base/variables';
@import 'base/mixins';
@import 'base/extends';
// base - elements
@import 'elements/typography';
@import 'shared/modal';
@import 'discussion/discussion';
...@@ -36,8 +36,6 @@ ${page_title_breadcrumbs(course_name())} ...@@ -36,8 +36,6 @@ ${page_title_breadcrumbs(course_name())}
<%block name="nav_skip">${"#seq_content" if section_title else "#course-content"}</%block> <%block name="nav_skip">${"#seq_content" if section_title else "#course-content"}</%block>
<%include file="../discussion/_js_head_dependencies.html" />
% if show_chat: % if show_chat:
<link rel="stylesheet" href="${static.url('css/vendor/ui-lightness/jquery-ui-1.8.22.custom.css')}" /> <link rel="stylesheet" href="${static.url('css/vendor/ui-lightness/jquery-ui-1.8.22.custom.css')}" />
## It'd be better to have this in a place like lms/css/vendor/candy, ## It'd be better to have this in a place like lms/css/vendor/candy,
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
<%static:css group='style-app'/> <%static:css group='style-app'/>
<%static:css group='style-app-extend1'/> <%static:css group='style-app-extend1'/>
<%static:css group='style-app-extend2'/> <%static:css group='style-app-extend2'/>
<%static:css group='style-discussion-app'/>
% if disable_courseware_js: % if disable_courseware_js:
<%static:js group='base_vendor'/> <%static:js group='base_vendor'/>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
{% compressed_css 'style-app-extend2' %} {% compressed_css 'style-app-extend2' %}
{% compressed_css 'style-course-vendor' %} {% compressed_css 'style-course-vendor' %}
{% compressed_css 'style-course' %} {% compressed_css 'style-course' %}
{% compressed_css 'style-discussion-app' %}
{% block main_vendor_js %} {% block main_vendor_js %}
{% compressed_js 'main_vendor' %} {% compressed_js 'main_vendor' %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment