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
2dcb8f81
Commit
2dcb8f81
authored
Sep 06, 2016
by
Brian Jacobel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue where duplicate toolbars would be displayed above discussion forum comments while posting
TNL-5105
parent
91c1049b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
common/static/common/js/discussion/utils.js
+1
-1
common/static/common/js/discussion/views/thread_response_view.js
+1
-1
common/static/common/js/spec/discussion/view/thread_response_view_spec.js
+20
-1
No files found.
common/static/common/js/discussion/utils.js
View file @
2dcb8f81
...
...
@@ -309,7 +309,7 @@
var
appended_id
,
editor
,
elem
,
id
,
imageUploadUrl
,
placeholder
,
_processor
;
elem
=
$local
(
'.'
+
cls_identifier
);
placeholder
=
elem
.
data
(
'placeholder'
);
id
=
elem
.
attr
(
'data-
id'
);
id
=
elem
.
data
(
'
id'
);
appended_id
=
'-'
+
cls_identifier
+
'-'
+
id
;
imageUploadUrl
=
this
.
urlFor
(
'upload'
);
_processor
=
function
(
self
)
{
...
...
common/static/common/js/discussion/views/thread_response_view.js
View file @
2dcb8f81
...
...
@@ -72,7 +72,7 @@
container
=
$
(
'.discussion-module'
);
}
templateData
=
_
.
extend
(
this
.
model
.
toJSON
(),
{
wmdId
:
(
_ref
=
this
.
model
.
id
)
!==
null
?
_ref
:
(
new
Date
()).
getTime
(),
wmdId
:
typeof
(
this
.
model
.
id
)
!==
'undefined'
?
this
.
model
.
id
:
(
new
Date
()).
getTime
(),
create_sub_comment
:
container
.
data
(
'user-create-subcomment'
),
readOnly
:
this
.
readOnly
});
...
...
common/static/common/js/spec/discussion/view/thread_response_view_spec.js
View file @
2dcb8f81
/* globals DiscussionSpecHelper, ResponseCommentView, Thread, ThreadResponseView, ThreadResponseShowView */
/* globals DiscussionSpecHelper, ResponseCommentView, Thread, ThreadResponseView, ThreadResponseShowView
, _
*/
(
function
()
{
'use strict'
;
describe
(
'ThreadResponseView'
,
function
()
{
...
...
@@ -89,6 +89,25 @@
return
expect
(
this
.
view
.
$
(
'.action-show-comments'
)).
not
.
toBeVisible
();
}
);
it
(
'calls renderTemplate with a temporary id if the model lacks one'
,
function
()
{
this
.
view
=
new
ThreadResponseView
({
model
:
this
.
response
,
el
:
$
(
'#fixture-element'
),
collapseComments
:
true
});
spyOn
(
_
,
'extend'
).
and
.
callThrough
();
spyOn
(
window
,
'Date'
).
and
.
callFake
(
function
()
{
return
{
getTime
:
function
()
{
return
1
;
}
};
});
this
.
view
.
render
();
expect
(
_
.
extend
).
toHaveBeenCalledWith
(
jasmine
.
any
(
Object
),
jasmine
.
objectContaining
({
wmdId
:
1
}));
});
it
(
'populates commentViews and binds events'
,
function
()
{
this
.
view
.
createEditView
();
spyOn
(
this
.
view
,
'cancelEdit'
);
...
...
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