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
54a9db77
Commit
54a9db77
authored
Dec 06, 2016
by
Brian Jacobel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove thread 'inline' rendering mode, make tab mode the One True Mode
parent
f5936b36
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
21 deletions
+12
-21
common/static/common/js/discussion/views/discussion_inline_view.js
+1
-1
common/static/common/js/discussion/views/discussion_thread_view.js
+3
-13
common/static/common/js/spec/discussion/view/discussion_inline_view_spec.js
+6
-1
common/static/common/js/spec/discussion/view/discussion_thread_view_spec.js
+0
-0
common/static/common/templates/discussion/thread-show.underscore
+1
-1
common/static/common/templates/discussion/thread.underscore
+0
-4
lms/djangoapps/discussion/static/discussion/js/views/discussion_user_profile_view.js
+1
-1
No files found.
common/static/common/js/discussion/views/discussion_inline_view.js
View file @
54a9db77
...
...
@@ -141,7 +141,7 @@
this
.
threadView
=
new
DiscussionThreadView
({
el
:
this
.
$
(
'.forum-content'
),
model
:
thread
,
mode
:
'
tab
'
,
mode
:
'
inline
'
,
course_settings
:
this
.
course_settings
});
this
.
threadView
.
render
();
...
...
common/static/common/js/discussion/views/discussion_thread_view.js
View file @
54a9db77
...
...
@@ -152,14 +152,7 @@
});
});
}
if
(
this
.
mode
===
'tab'
)
{
setTimeout
(
function
()
{
return
self
.
loadInitialResponses
();
},
100
);
return
this
.
$
(
'.post-tools'
).
hide
();
}
else
{
return
this
.
collapse
();
}
this
.
loadInitialResponses
();
};
DiscussionThreadView
.
prototype
.
attrRenderer
=
$
.
extend
({},
DiscussionContentView
.
prototype
.
attrRenderer
,
{
...
...
@@ -221,9 +214,7 @@
};
DiscussionThreadView
.
prototype
.
loadResponses
=
function
(
responseLimit
,
$elem
,
firstLoad
)
{
var
takeFocus
,
self
=
this
;
takeFocus
=
this
.
mode
===
'tab'
?
false
:
true
;
var
self
=
this
;
this
.
responsesRequest
=
DiscussionUtil
.
safeAjax
({
url
:
DiscussionUtil
.
urlFor
(
'retrieve_single_thread'
,
this
.
model
.
get
(
'commentable_id'
),
this
.
model
.
id
...
...
@@ -234,7 +225,7 @@
},
$elem
:
$elem
,
$loading
:
$elem
,
takeFocus
:
takeFocus
,
takeFocus
:
false
,
complete
:
function
()
{
self
.
responsesRequest
=
null
;
},
...
...
@@ -253,7 +244,6 @@
);
self
.
trigger
(
'thread:responses:rendered'
);
self
.
loadedResponses
=
true
;
return
self
.
$el
.
find
(
'.discussion-article[data-id="'
+
self
.
model
.
id
+
'"]'
).
focus
();
},
error
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'abort'
)
{
...
...
common/static/common/js/spec/discussion/view/discussion_inline_view_spec.js
View file @
54a9db77
...
...
@@ -52,7 +52,12 @@
title
:
TEST_THREAD_TITLE
}),
page
:
1
,
num_pages
:
1
num_pages
:
1
,
content
:
{
endorsed_responses
:
[],
non_endorsed_responses
:
[],
children
:
[]
}
});
testView
.
$
(
'.discussion-show'
).
click
();
};
...
...
common/static/common/js/spec/discussion/view/discussion_thread_view_spec.js
View file @
54a9db77
This diff is collapsed.
Click to expand it.
common/static/common/templates/discussion/thread-show.underscore
View file @
54a9db77
...
...
@@ -52,7 +52,7 @@
<div class="post-body"><%- body %></div>
<div class="post-context">
<% if (mode == "tab" && obj.courseware_url) { %>
<% if (mode ==
=
"tab" && obj.courseware_url) { %>
<%
var courseware_title_linked = interpolate(
'<a href="%(courseware_url)s">%(courseware_title)s</a>',
...
...
common/static/common/templates/discussion/thread.underscore
View file @
54a9db77
...
...
@@ -32,8 +32,4 @@
<% } %>
</div>
</div>
<div class="post-tools">
<button class="btn-link forum-thread-expand"><span class="icon fa fa-plus" aria-hidden="true"/><%- gettext("Expand discussion") %></button>
<button class="btn-link forum-thread-collapse"><span class="icon fa fa-minus" aria-hidden="true"/><%- gettext("Collapse discussion") %></button>
</div>
</article>
lms/djangoapps/discussion/static/discussion/js/views/discussion_user_profile_view.js
View file @
54a9db77
...
...
@@ -51,7 +51,7 @@
this
.
threadView
=
new
DiscussionThreadView
({
el
:
this
.
$
(
'.forum-content'
),
model
:
thread
,
mode
:
'
tab
'
,
mode
:
'
inline
'
,
course_settings
:
this
.
courseSettings
});
this
.
threadView
.
render
();
...
...
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