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
b032a2f6
Commit
b032a2f6
authored
Feb 09, 2017
by
tasawernawaz
Committed by
Tasawer Nawaz
Feb 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix console error on course run page ECOM-7116
parent
bd3f45fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
course_discovery/static/js/publisher/comparing-objects.js
+5
-0
course_discovery/static/js/publisher/publisher.js
+1
-8
course_discovery/templates/publisher/course_detail.html
+1
-0
No files found.
course_discovery/static/js/publisher/comparing-objects.js
View file @
b032a2f6
...
...
@@ -23,4 +23,9 @@ function showDiff($object, $historyObject, $outputDiv) {
$outputDiv
.
show
();
}
function
showDiffCourseDetails
(
currentObject
,
historyObject
,
$outputDiv
)
{
var
d
=
dmp
.
diff_main
(
currentObject
,
historyObject
);
$outputDiv
.
html
(
dmp
.
diff_prettyHtml
(
d
));
$outputDiv
.
show
();
}
course_discovery/static/js/publisher/publisher.js
View file @
b032a2f6
...
...
@@ -261,7 +261,7 @@ function loadRevisionHistory(revisionUrl) {
$
.
each
(
data
,
function
(
key
,
value
)
{
var
currentObject
=
$
(
'.history-field-container'
).
find
(
'.'
+
key
);
if
(
currentObject
.
length
)
{
showDiff
(
value
,
currentObject
.
text
(),
currentObject
.
siblings
(
'.show-diff'
));
showDiff
CourseDetails
(
value
,
currentObject
.
text
(),
currentObject
.
siblings
(
'.show-diff'
));
currentObject
.
hide
();
}
});
...
...
@@ -269,13 +269,6 @@ function loadRevisionHistory(revisionUrl) {
});
}
var
dmp
=
new
diff_match_patch
();
function
showDiff
(
currentObject
,
historyObject
,
$outputDiv
)
{
var
d
=
dmp
.
diff_main
(
historyObject
,
currentObject
);
$outputDiv
.
html
(
dmp
.
diff_prettyHtml
(
d
));
$outputDiv
.
show
();
}
function
addModalError
(
errorMessage
)
{
var
errorHtml
=
'<div class="alert alert-error" role="alert" aria-labelledby="alert-title-error" tabindex="-1">'
+
'<div><p class="alert-copy">'
+
errorMessage
+
'</p></div></div>'
;
...
...
course_discovery/templates/publisher/course_detail.html
View file @
b032a2f6
...
...
@@ -112,4 +112,5 @@
{% block extra_js %}
<script
src=
"{% static 'bower_components/google-diff-match-patch/diff_match_patch.js' %}"
></script>
<script
src=
"{% static 'js/publisher/publisher.js' %}"
></script>
<script
src=
"{% static 'js/publisher/comparing-objects.js' %}"
></script>
{% endblock %}
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