Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
course-discovery
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
course-discovery
Commits
7c0e4240
Commit
7c0e4240
authored
Dec 09, 2016
by
Tasawer Nawaz
Committed by
GitHub
Dec 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #484 from edx/tasawer/ECOM-6579-fix-js-issue
Fix js issue on comment page
parents
82d7c4f9
f90776b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
20 deletions
+16
-20
course_discovery/static/js/publisher/comments.js
+13
-0
course_discovery/templates/comments/add_auth_comments.html
+2
-20
course_discovery/templates/publisher/course_run_detail.html
+1
-0
No files found.
course_discovery/static/js/publisher/comments.js
0 → 100644
View file @
7c0e4240
$
(
document
).
ready
(
function
()
{
var
box
=
$
(
'#id_comment'
);
$
(
"#id_submit"
).
click
(
function
(
event
){
if
(
!
box
.
val
()
)
{
box
.
addClass
(
'has-error'
);
box
.
focus
();
}
else
{
$
(
"#frm_comment"
).
submit
();
}
});
});
course_discovery/templates/comments/add_auth_comments.html
View file @
7c0e4240
{% load i18n %}
{% load staticfiles %}
{% load comments %}
{% if user.is_authenticated and comment_object %}
<div
class=
"comments-container"
>
<p>
{% trans 'Add new comment' %}
</p>
...
...
@@ -13,7 +13,7 @@
{{ form.object_pk }}
{{ form.timestamp }}
{{ form.security_hash }}
<input
type=
"hidden"
name=
"next"
value=
"{
{ comment_object.post_back_url }
}"
/>
<input
type=
"hidden"
name=
"next"
value=
"{
% url 'publisher:publisher_course_run_detail' object.id %
}"
/>
<div>
<input
type=
"button"
value=
"Add comment"
id=
"id_submit"
class=
"btn-brand btn-base"
/>
</div>
...
...
@@ -21,21 +21,3 @@
</div>
</div>
{% endif %}
{% block extra_js %}
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
var
box
=
$
(
'#id_comment'
);
$
(
"#id_submit"
).
click
(
function
(
event
){
if
(
!
box
.
val
()
)
{
box
.
addClass
(
'has-error'
);
box
.
focus
();
}
else
{
$
(
"#frm_comment"
).
submit
();
}
});
});
</script>
{% endblock %}
course_discovery/templates/publisher/course_run_detail.html
View file @
7c0e4240
...
...
@@ -68,6 +68,7 @@
{% block extra_js %}
<script
src=
"{% static 'bower_components/clipboard/dist/clipboard.min.js' %}"
></script>
<script
src=
"{% static 'js/publisher/publisher.js' %}"
></script>
<script
src=
"{% static 'js/publisher/comments.js' %}"
></script>
<script>
new
Clipboard
(
".btn-copy"
,
{
text
:
function
(
trigger
)
{
...
...
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