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
5b9e2835
Commit
5b9e2835
authored
Jul 25, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load course info update template on page instead of via AJAX
parent
97fb08ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
cms/static/js/views/course_info_edit.js
+1
-10
cms/templates/course_info.html
+7
-0
cms/templates/js/course_info_update.underscore
+0
-0
No files found.
cms/static/js/views/course_info_edit.js
View file @
5b9e2835
...
...
@@ -34,16 +34,7 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
},
initialize
:
function
()
{
var
self
=
this
;
// instantiates an editor template for each update in the collection
window
.
templateLoader
.
loadRemoteTemplate
(
"course_info_update"
,
// TODO Where should the template reside? how to use the static.url to create the path?
"/static/client_templates/course_info_update.html"
,
function
(
raw_template
)
{
self
.
template
=
_
.
template
(
raw_template
);
self
.
render
();
}
);
this
.
template
=
_
.
template
(
$
(
"#course_info_update-tpl"
).
text
());
// when the client refetches the updates as a whole, re-render them
this
.
listenTo
(
this
.
collection
,
'reset'
,
this
.
render
);
},
...
...
cms/templates/course_info.html
View file @
5b9e2835
...
...
@@ -6,6 +6,13 @@
<
%
block
name=
"title"
>
${_("Course Updates")}
</
%
block>
<
%
block
name=
"bodyclass"
>
is-signedin course course-info updates
</
%
block>
<
%
block
name=
"header_extras"
>
% for template_name in ["course_info_update"]:
<script
type=
"text/template"
id=
"${template_name}-tpl"
>
<%
static
:
include
path
=
"js/${template_name}.underscore"
/>
</script>
% endfor
</
%
block>
<
%
block
name=
"jsextra"
>
<script
type=
"text/javascript"
src=
"${static.url('js/template_loader.js')}"
></script>
...
...
cms/
static/client_templates/course_info_update.html
→
cms/
templates/js/course_info_update.underscore
View file @
5b9e2835
File moved
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