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
44e70dc2
Commit
44e70dc2
authored
Sep 06, 2016
by
Brian Jacobel
Committed by
GitHub
Sep 06, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13406 from edx/bjacobel/toolbarmageddon
Toolbarmageddon! (TNL-5105)
parents
12b8f9d9
2dcb8f81
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 @
44e70dc2
...
...
@@ -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 @
44e70dc2
...
...
@@ -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 @
44e70dc2
/* 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