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
545ef583
Commit
545ef583
authored
Sep 07, 2016
by
Brian Jacobel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug where new posts were not assigned a topic ID and would fail to post
TNL-5442
parent
49f99146
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
+13
-4
common/static/common/js/discussion/views/discussion_topic_menu_view.js
+1
-1
common/static/common/js/discussion/views/new_post_view.js
+1
-1
common/static/common/js/spec/discussion/view/discussion_topic_menu_view_spec.js
+10
-1
lms/static/sass/discussion/views/_create-edit-post.scss
+1
-1
No files found.
common/static/common/js/discussion/views/discussion_topic_menu_view.js
View file @
545ef583
...
...
@@ -46,7 +46,7 @@
'[data-discussion-id="'
+
this
.
getCurrentTopicId
()
+
'"]'
)
);
}
else
{
this
.
setTopic
(
this
.
$
(
'.topic-title'
).
first
());
this
.
setTopic
(
this
.
$
(
'
button
.topic-title'
).
first
());
}
return
this
.
$el
;
},
...
...
common/static/common/js/discussion/views/new_post_view.js
View file @
545ef583
...
...
@@ -177,7 +177,7 @@
DiscussionUtil
.
clearFormErrors
(
this
.
$
(
'.post-errors'
));
this
.
$
(
'.wmd-preview p'
).
html
(
''
);
if
(
this
.
isTabMode
())
{
return
this
.
topicView
.
setTopic
(
this
.
$
(
'.topic-title'
).
first
());
return
this
.
topicView
.
setTopic
(
this
.
$
(
'
button
.topic-title'
).
first
());
}
};
...
...
common/static/common/js/spec/discussion/view/discussion_topic_menu_view_spec.js
View file @
545ef583
...
...
@@ -135,7 +135,7 @@
var
dropdownText
;
this
.
createTopicView
();
this
.
view
.
maxNameWidth
=
this
.
selectedOptionText
.
length
+
100
;
this
.
view
.
$el
.
find
(
'.topic-title'
).
first
().
click
();
this
.
view
.
$el
.
find
(
'
button
.topic-title'
).
first
().
click
();
dropdownText
=
this
.
view
.
$el
.
find
(
'.js-selected-topic'
).
text
();
expect
(
dropdownText
.
indexOf
(
'/ span>'
)).
toEqual
(
-
1
);
});
...
...
@@ -152,6 +152,15 @@
expect
(
completeText
).
toEqual
(
dropdownText
);
});
it
(
"defaults to the first topic if you don't click one"
,
function
()
{
this
.
createTopicView
();
expect
(
this
.
view
.
$el
.
find
(
'.js-selected-topic'
).
text
()
).
toMatch
(
this
.
view
.
$el
.
find
(
'.topic-menu-entry'
)[
0
].
innerHTML
);
});
it
(
'click outside of the dropdown close it'
,
function
()
{
this
.
createTopicView
();
this
.
openMenu
();
...
...
lms/static/sass/discussion/views/_create-edit-post.scss
View file @
545ef583
...
...
@@ -257,7 +257,7 @@
font-size
:
$forum-base-font-size
;
}
a
.topic-title
{
button
.topic-title
{
@include
transition
(
none
);
&
:hover
,
&
:focus
{
...
...
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