Commit bddc29a8 by cahrens

Remove last Mustache usage.

parent 21bcf02d
......@@ -42,8 +42,8 @@ such that the value can be defined later than this assignment (file load order).
add_btn_label: 'Add Member',
add_handler: function() {}
});
templateHtml = window.Mustache.render($('#member-list-widget-template').html(), memberListParams);
edx.HtmlUtils.setHtml(this.$container, edx.HtmlUtils.HTML(templateHtml));
templateHtml = edx.HtmlUtils.template($('#membership-list-widget-tpl').text())(memberListParams);
edx.HtmlUtils.setHtml(this.$container, templateHtml);
this.$('input[type="button"].add').click(function() {
condition = typeof memberListParams.add_handler === 'function';
return condition ? memberListParams.add_handler(memberlistwidget.$('.add-field').val()) : undefined;
......
......@@ -38,7 +38,6 @@ from openedx.core.djangolib.markup import HTML
</script>
<script type="text/javascript" src="${static.url('js/instructor_dashboard/proctoring.js')}"></script>
<script type="text/javascript" src="${static.url('js/vendor/date.js')}"></script>
<script type="text/javascript" src="${static.url('js/vendor/mustache.js')}"></script>
<script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.js')}"></script>
<script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.axislabels.js')}"></script>
<script type="text/javascript" src="${static.url('js/vendor/jquery-jvectormap-1.1.1/jquery-jvectormap-1.1.1.min.js')}"></script>
......@@ -81,7 +80,7 @@ from openedx.core.djangolib.markup import HTML
## Include Underscore templates
<%block name="header_extras">
% for template_name in ["cohorts", "discussions", "enrollment-code-lookup-links", "cohort-editor", "cohort-group-header", "cohort-selector", "cohort-form", "notification", "cohort-state", "divided-discussions-inline", "divided-discussions-course-wide", "cohort-discussions-category", "cohort-discussions-subcategory", "certificate-white-list", "certificate-white-list-editor", "certificate-bulk-white-list", "certificate-invalidation"]:
% for template_name in ["cohorts", "discussions", "enrollment-code-lookup-links", "cohort-editor", "cohort-group-header", "cohort-selector", "cohort-form", "notification", "cohort-state", "divided-discussions-inline", "divided-discussions-course-wide", "cohort-discussions-category", "cohort-discussions-subcategory", "certificate-white-list", "certificate-white-list-editor", "certificate-bulk-white-list", "certificate-invalidation", "membership-list-widget"]:
<script type="text/template" id="${template_name}-tpl">
<%static:include path="instructor/instructor_dashboard_2/${template_name}.underscore" />
</script>
......
<div class="member-list-widget">
<div class="header">
<div class="title"><%- title %></div>
</div>
<div class="info"><%- info %></div>
<div class="member-list">
<table>
<thead>
<tr>
<% _.each(labels, function(label) { %>
<th class="label" scope="column"><%- label %></th>
<% }); %>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div class="bottom-bar">
<label>
<span class="label-text sr"><%- add_placeholder %></span>
<input type="text" name="add-field" class="add-field" placeholder="<%- add_placeholder %>">
</label>
<input type="button" name="add" class="add" value="<%- add_btn_label %>">
</div>
</div>
<%page args="section_data" expression_filter="h"/>
<%namespace name='static' file='/static_content.html'/>
<%page args="section_data"/>
<%!
from django.utils.translation import ugettext as _
from openedx.core.djangolib.markup import HTML, Text
%>
<script type="text/template" id="member-list-widget-template">
<div class="member-list-widget">
<div class="header">
<div class="title"> {{title}} </div>
</div>
<div class="info"> {{info}} </div>
<div class="member-list">
<table>
<thead>
<tr>
{{#labels}}
<th class="label" scope="column">{{.}}</th>
{{/labels}}
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div class="bottom-bar">
<label>
<span class="label-text sr">{{add_placeholder}}</span>
<input type="text" name="add-field" class="add-field" placeholder="{{add_placeholder}}">
</label>
<input type="button" name="add" class="add" value="{{add_btn_label}}">
</div>
</div>
</script>
<fieldset class="batch-enrollment membership-section">
<legend id="heading-batch-enrollment" class="hd hd-3">${_("Batch Enrollment")}</legend>
<label>
......@@ -54,8 +27,8 @@ from django.utils.translation import ugettext as _
<div class="hint auto-enroll-hint">
<span class="hint-caret"></span>
<p id="auto-enroll-tip">
${_("If this option is <em>checked</em>, users who have not yet registered for {platform_name} will be automatically enrolled.").format(platform_name=settings.PLATFORM_NAME)}
${_("If this option is left <em>unchecked</em>, users who have not yet registered for {platform_name} will not be enrolled, but will be allowed to enroll once they make an account.").format(platform_name=settings.PLATFORM_NAME)}
${Text(_("If this option is {em_start}checked{em_end}, users who have not yet registered for {platform_name} will be automatically enrolled.")).format(em_start=HTML('<em>'), em_end=HTML('</em>'), platform_name=settings.PLATFORM_NAME)}
${Text(_("If this option is left {em_start}unchecked{em_end}, users who have not yet registered for {platform_name} will not be enrolled, but will be allowed to enroll once they make an account.")).format(em_start=HTML('<em>'), em_end=HTML('</em>'), platform_name=settings.PLATFORM_NAME)}
<br /><br />
${_("Checking this box has no effect if 'Unenroll' is selected.")}
</p>
......@@ -70,7 +43,7 @@ from django.utils.translation import ugettext as _
<div class="hint email-students-hint">
<span class="hint-caret"></span>
<p id="email-students-tip">
${_("If this option is <em>checked</em>, users will receive an email notification.")}
${Text(_("If this option is {em_start}checked{em_end}, users will receive an email notification.")).format(em_start=HTML('<em>'), em_end=HTML('</em>'))}
</p>
</div>
</label>
......@@ -122,7 +95,7 @@ from django.utils.translation import ugettext as _
<div class="hint auto-enroll-beta-hint">
<span class="hint-caret"></span>
<p id="auto-enroll-beta-tip">
${_("If this option is <em>checked</em>, users who have not enrolled in your course will be automatically enrolled.")}
${Text(_("If this option is {em_start}checked{em_end}, users who have not enrolled in your course will be automatically enrolled.")).format(em_start=HTML('<em>'), em_end=HTML('</em>'))}
<br /><br />
${_("Checking this box has no effect if 'Remove beta testers' is selected.")}
</p>
......@@ -136,7 +109,7 @@ from django.utils.translation import ugettext as _
<div class="hint email-students-beta-hint">
<span class="hint-caret"></span>
<p id="email-students-beta-tip">
${_("If this option is <em>checked</em>, users will receive an email notification.")}
${Text(_("If this option is {em_start}checked{em_end}, users will receive an email notification.")).format(em_start=HTML('<em>'), em_end=HTML('</em>'))}
</p>
</div>
</label>
......
......@@ -74,7 +74,6 @@
// "modernizr.fontface-generatedcontent": "custom 2.7.1",
"moment": "2.10.6",
// "moment-with-locales": "unknown",
"mustache": "0.5.1",
"noreferrer": "0.1.3",
// "number-polyfill": "unknown",
"openseaddragon": "0.9.131",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment