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
d984311b
Commit
d984311b
authored
Sep 06, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove references to template loader JS library
parent
2c2668ca
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
25 additions
and
51 deletions
+25
-51
cms/static/client_templates/advanced_entry.html
+0
-12
cms/static/js/views/checklists_view.js
+3
-18
cms/static/js/views/settings/settings_grading_view.js
+2
-13
cms/templates/checklists.html
+10
-2
cms/templates/js/checklist.underscore
+0
-0
cms/templates/js/course_grade_policy.underscore
+0
-0
cms/templates/settings.html
+0
-1
cms/templates/settings_advanced.html
+0
-1
cms/templates/settings_discussions_faculty.html
+0
-1
cms/templates/settings_graders.html
+10
-3
No files found.
cms/static/client_templates/advanced_entry.html
deleted
100644 → 0
View file @
2c2668ca
<li
class=
"field-group course-advanced-policy-list-item"
>
<div
class=
"field is-not-editable text key"
id=
"<%= key %>"
>
<label
for=
"<%= keyUniqueId %>"
>
Policy Key:
</label>
<input
readonly
title=
"This field is disabled: policy keys cannot be edited."
type=
"text"
class=
"short policy-key"
id=
"<%= keyUniqueId %>"
value=
"<%= key %>"
/>
</div>
<div
class=
"field text value"
>
<label
for=
"<%= valueUniqueId %>"
>
Policy Value:
</label>
<textarea
class=
"json text"
id=
"<%= valueUniqueId %>"
><
%=
value
%
></textarea>
</div>
</li>
\ No newline at end of file
cms/static/js/views/checklists_view.js
View file @
d984311b
...
...
@@ -10,27 +10,12 @@ CMS.Views.Checklists = Backbone.View.extend({
},
initialize
:
function
()
{
var
self
=
this
;
this
.
collection
.
fetch
({
complete
:
function
()
{
window
.
templateLoader
.
loadRemoteTemplate
(
"checklist"
,
"/static/client_templates/checklist.html"
,
function
(
raw_template
)
{
self
.
template
=
_
.
template
(
raw_template
);
self
.
render
();
}
);
},
reset
:
true
}
);
this
.
template
=
_
.
template
(
$
(
"#checklist-tpl"
).
text
());
this
.
listenTo
(
this
.
collection
,
'reset'
,
this
.
render
);
this
.
render
();
},
render
:
function
()
{
// catch potential outside call before template loaded
if
(
!
this
.
template
)
return
this
;
this
.
$el
.
empty
();
var
self
=
this
;
...
...
cms/static/js/views/settings/settings_grading_view.js
View file @
d984311b
...
...
@@ -20,6 +20,7 @@ CMS.Views.Settings.Grading = CMS.Views.ValidatingView.extend({
initialize
:
function
()
{
// load template for grading view
var
self
=
this
;
this
.
template
=
_
.
template
(
$
(
"#course_grade_policy-tpl"
).
text
());
this
.
gradeCutoffTemplate
=
_
.
template
(
'<li class="grade-specific-bar" style="width:<%= width %>%"><span class="letter-grade" contenteditable="true">'
+
'<%= descriptor %>'
+
'</span><span class="range"></span>'
+
...
...
@@ -27,27 +28,15 @@ CMS.Views.Settings.Grading = CMS.Views.ValidatingView.extend({
'</li>'
);
this
.
setupCutoffs
();
// instantiates an editor template for each update in the collection
// Because this calls render, put it after everything which render may depend upon to prevent race condition.
window
.
templateLoader
.
loadRemoteTemplate
(
"course_grade_policy"
,
"/static/client_templates/course_grade_policy.html"
,
function
(
raw_template
)
{
self
.
template
=
_
.
template
(
raw_template
);
self
.
render
();
}
);
this
.
listenTo
(
this
.
model
,
'invalid'
,
this
.
handleValidationError
);
this
.
listenTo
(
this
.
model
,
'change'
,
this
.
showNotificationBar
);
this
.
model
.
get
(
'graders'
).
on
(
'reset'
,
this
.
render
,
this
);
this
.
model
.
get
(
'graders'
).
on
(
'add'
,
this
.
render
,
this
);
this
.
selectorToField
=
_
.
invert
(
this
.
fieldToSelectorMap
);
this
.
render
();
},
render
:
function
()
{
// prevent bootstrap race condition by event dispatch
if
(
!
this
.
template
)
return
;
this
.
clearValidationErrors
();
this
.
renderGracePeriod
();
...
...
cms/templates/checklists.html
View file @
d984311b
...
...
@@ -5,9 +5,17 @@
<
%
block
name=
"bodyclass"
>
is-signedin course uxdesign checklists
</
%
block>
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<
%
block
name=
"header_extras"
>
% for template_name in ["checklist"]:
<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>
<script
type=
"text/javascript"
src=
"${static.url('js/views/checklists_view.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/models/checklists.js')}"
></script>
...
...
@@ -20,7 +28,7 @@
el
:
$
(
'.course-checklists'
),
collection
:
checklistCollection
});
checklistCollection
.
fetch
({
reset
:
true
});
});
</script>
...
...
cms/
static/client_templates/checklist.html
→
cms/
templates/js/checklist.underscore
View file @
d984311b
File moved
cms/
static/client_templates/course_grade_policy.html
→
cms/
templates/js/course_grade_policy.underscore
View file @
d984311b
File moved
cms/templates/settings.html
View file @
d984311b
...
...
@@ -16,7 +16,6 @@ from contentstore import utils
<script
src=
"${static.url('js/vendor/timepicker/datepair.js')}"
></script>
<script
src=
"${static.url('js/vendor/date.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/template_loader.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/models/course_relative.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/views/validating_view.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/views/settings/main_settings_view.js')}"
></script>
...
...
cms/templates/settings_advanced.html
View file @
d984311b
...
...
@@ -13,7 +13,6 @@
</script>
% endfor
<script
type=
"text/javascript"
src=
"${static.url('js/template_loader.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/views/validating_view.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/models/settings/advanced.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/views/settings/advanced_view.js')}"
></script>
...
...
cms/templates/settings_discussions_faculty.html
View file @
d984311b
...
...
@@ -12,7 +12,6 @@ from contentstore import utils
<
%
block
name=
"jsextra"
>
<script
type=
"text/javascript"
src=
"${static.url('js/template_loader.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/models/course_relative.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/views/validating_view.js')}"
></script>
...
...
cms/templates/settings_graders.html
View file @
d984311b
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<
%
inherit
file=
"base.html"
/>
<
%
block
name=
"title"
>
${_("Grading Settings")}
</
%
block>
<
%
block
name=
"bodyclass"
>
is-signedin course grading settings
</
%
block>
<
%
namespace
name=
'static'
file=
'static_content.html'
/>
<
%!
from
contentstore
import
utils
from
contentstore
import
utils
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<
%
block
name=
"header_extras"
>
% for template_name in ["course_grade_policy"]:
<script
type=
"text/template"
id=
"${template_name}-tpl"
>
<%
static
:
include
path
=
"js/${template_name}.underscore"
/>
</script>
% endfor
</
%
block>
<
%
block
name=
"jsextra"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"${static.url('js/vendor/timepicker/jquery.timepicker.css')}"
/>
<script
src=
"${static.url('js/vendor/timepicker/jquery.timepicker.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/template_loader.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/models/course_relative.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/views/validating_view.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/models/settings/course_grading_policy.js')}"
></script>
...
...
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