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
a00607f4
Commit
a00607f4
authored
Sep 11, 2017
by
attiyaishaque
Committed by
Attiya Ishaque
Sep 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EDUCATOR-1265 Instructor bios would not disappear from course run when edited.
parent
bc5b5bbe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
course_discovery/static/js/publisher/instructors.js
+10
-5
No files found.
course_discovery/static/js/publisher/instructors.js
View file @
a00607f4
...
...
@@ -142,7 +142,7 @@ $(document).on('click', '.selected-instructor a.delete', function (e) {
});
function
renderSelectedInstructor
(
id
,
name
,
image
,
uuid
)
{
var
instructorHtmlStart
=
'<div class="instructor"><div><img src="'
+
image
+
'"></div><div>'
,
var
instructorHtmlStart
=
'<div class="instructor"
id= "instructor_'
+
id
+
'"
><div><img src="'
+
image
+
'"></div><div>'
,
instructorHtmlEnd
=
'<b>'
+
name
+
'</b></div></div>'
,
controlOptions
=
'<a class="delete" id="'
+
id
+
'"href="#"><i class="fa fa-trash-o fa-fw"></i></a>'
;
...
...
@@ -179,7 +179,8 @@ function loadInstructor(uuid, editMode) {
id
,
label
,
image_source
,
name
;
name
,
instructor_id
;
$
.
getJSON
({
url
:
url
,
...
...
@@ -197,10 +198,14 @@ function loadInstructor(uuid, editMode) {
}).
attr
(
'selected'
,
'selected'
));
if
(
editMode
)
{
//before loading updated instructor it will remove old one.
$
(
'#'
+
id
).
click
();
// Updating the existing instructor
instructor_id
=
$
(
'#instructor_'
+
id
);
instructor_id
.
find
(
'img'
).
attr
(
'src'
,
image_source
);
instructor_id
.
find
(
'b'
).
text
(
name
);
}
else
{
renderSelectedInstructor
(
id
,
name
,
image_source
,
uuid
);
}
renderSelectedInstructor
(
id
,
name
,
image_source
,
uuid
);
}
}
...
...
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