Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cms/static/js/views/uploads.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ define(['jquery', 'underscore', 'gettext', 'js/views/modals/base_modal', 'edx-ui
renderContents: function() {
var isValid = this.model.isValid(),
selectedFile = this.model.get('selectedFile'),
oldInput = this.$('input[type=file]').get(0);
oldInput = this.$('input[type=file]');
BaseModal.prototype.renderContents.call(this);
// Ideally, we'd like to tell the browser to pre-populate the
// <input type="file"> with the selectedFile if we have one -- but
Expand All @@ -44,7 +44,7 @@ define(['jquery', 'underscore', 'gettext', 'js/views/modals/base_modal', 'edx-ui
// a blank input to prompt the user to upload a different (valid) file.
if (selectedFile && isValid) {
$(oldInput).removeClass('error');
this.$('input[type=file]').replaceWith(HtmlUtils.ensureHtml(oldInput).toString());
this.$('input[type=file]').replaceWith(HtmlUtils.HTML(oldInput).toString());
this.$('.action-upload').removeClass('disabled');
} else {
this.$('.action-upload').addClass('disabled');
Expand Down
4 changes: 2 additions & 2 deletions cms/templates/js/group-configuration-details.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@

<% if(showGroups) { %>
<% allocation = Math.floor(100 / groups.length) %>
<ol class="collection-items groups groups-<%= index %>">
<ol class="collection-items groups groups-<%- index %>">
<% groups.each(function(group, groupIndex) { %>
<li class="item group group-<%= groupIndex %>">
<li class="item group group-<%- groupIndex %>">
<span class="name group-name"><%- group.get('name') %></span>
<span class="meta group-allocation"><%- allocation %>%</span>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%- gettext('You have done a dry run of force publishing the course. Nothing has changed. Had you run it, the following course versions would have been change.') %>
</div>
<div class="main-output">
<%= StringUtils.interpolate(
<%- StringUtils.interpolate(
gettext('The published branch version, {published}, was reset to the draft branch version, {draft}.'),
{
published: current_versions['published-branch'],
Expand Down
6 changes: 3 additions & 3 deletions cms/templates/js/mock/mock-xmodule-editor.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

<script id="metadata-string-entry" type="text/template">
<div class="wrapper-comp-setting">
\t<label class="label setting-label" for="<%= uniqueId %>"><%= model.get('display_name') %></label>
\t<input class="input setting-input" type="text" id="<%= uniqueId %>" value='<%= model.get("value") %>'/>
\t<label class="label setting-label" for="<%- uniqueId %>"><%- model.get('display_name') %></label>
\t<input class="input setting-input" type="text" id="<%- uniqueId %>" value='<%- model.get("value") %>'/>
\t<button class="action setting-clear inactive" type="button" name="setting-clear" value="Clear" data-tooltip="Clear">
<span class="icon fa fa-undo" aria-hidden="true"></span><span class="sr">"Clear Value"</span>
</button>
</div>
<span class="tip setting-help"><%= model.get('help') %></span>
<span class="tip setting-help"><%- model.get('help') %></span>

</script>

Expand Down
6 changes: 3 additions & 3 deletions cms/templates/js/publish-editor.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<% _.each(xblockInfo.get('child_info').children, function(subsection) { %>
<% if (subsection.isPublishable()) { %>
<li class="outline-item outline-subsection">
<h4 class="subsection-title item-title"><%= subsection.get('display_name') %></h4>
<h4 class="subsection-title item-title"><%- subsection.get('display_name') %></h4>
<div class="subsection-content">
<ol class="list-units">
<% _.each(subsection.get('child_info').children, function(unit) { %>
<% if (unit.isPublishable()) { %>
<li class="outline-item outline-unit">
<span class="unit-title item-title"><%= unit.get('display_name') %></span>
<span class="unit-title item-title"><%- unit.get('display_name') %></span>
</li>
<% } %>
<% }); %>
Expand All @@ -27,7 +27,7 @@
<% _.each(xblockInfo.get('child_info').children, function(unit) { %>
<% if (unit.isPublishable()) { %>
<li class="outline-item outline-unit">
<span class="unit-title item-title"><%= unit.get('display_name') %></span>
<span class="unit-title item-title"><%- unit.get('display_name') %></span>
</li>
<% } %>
<% }); %>
Expand Down
24 changes: 12 additions & 12 deletions cms/templates/js/unit-outline.underscore
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<% if (parentInfo) { %>
<li class="outline-item outline-<%= xblockType %> <%= visibilityClass %> <%= xblockInfo.get('id') === currentUnitId ? 'is-current' : '' %>"
data-parent="<%= parentInfo.get('id') %>" data-locator="<%= xblockInfo.get('id') %>">
<div class="<%= xblockType %>-header">
<h3 class="<%= xblockType %>-header-details">
<span class="<%= xblockType %>-title item-title">
<a href="<%= xblockInfo.get('studio_url') %>"><%- xblockInfo.get('display_name') %></a>
<li class="outline-item outline-<%- xblockType %> <%- visibilityClass %> <%- xblockInfo.get('id') === currentUnitId ? 'is-current' : '' %>"
data-parent="<%- parentInfo.get('id') %>" data-locator="<%- xblockInfo.get('id') %>">
<div class="<%- xblockType %>-header">
<h3 class="<%- xblockType %>-header-details">
<span class="<%- xblockType %>-title item-title">
<a href="<%- xblockInfo.get('studio_url') %>"><%- xblockInfo.get('display_name') %></a>
</span>
</h3>
</div>
<% } %>

<div class="<%= xblockType %>-content outline-content">
<ol class="<%= typeListClass %>">
<div class="<%- xblockType %>-content outline-content">
<ol class="<%- typeListClass %>">
</ol>
<% if (childType) { %>
<div class="add-<%= childType %> add-item">
<a href="#" class="button button-new" data-category="<%= childCategory %>"
data-parent="<%= xblockInfo.get('id') %>" data-default-name="<%= defaultNewChildName %>">
<span class="icon fa fa-plus" aria-hidden="true"></span><%= addChildLabel %>
<div class="add-<%- childType %> add-item">
<a href="#" class="button button-new" data-category="<%- childCategory %>"
data-parent="<%- xblockInfo.get('id') %>" data-default-name="<%- defaultNewChildName %>">
<span class="icon fa fa-plus" aria-hidden="true"></span><%- addChildLabel %>
</a>
</div>
<% } %>
Expand Down
4 changes: 2 additions & 2 deletions cms/templates/js/video/transcripts/file-upload.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<form class="file-chooser" action="/transcripts/upload"
method="post" enctype="multipart/form-data">
<input type="file" class="file-input" name="transcript-file"
accept="<%= _.map(ext, function(val){ return '.' + val; }).join(', ') %>">
<input type="hidden" name="locator" value="<%= component_locator %>">
accept="<%- _.map(ext, function(val){ return '.' + val; }).join(', ') %>">
<input type="hidden" name="locator" value="<%- component_locator %>">
</form>
4 changes: 2 additions & 2 deletions cms/templates/js/xblock-validation-messages.underscore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var summaryMessage = validation.get("summary");
var aggregateMessageType = summaryMessage.type;
var aggregateValidationClass = aggregateMessageType === "error"? "has-errors" : "has-warnings";
%>
<div class="xblock-message validation <%= aggregateValidationClass %> <%= additionalClasses %>">
<div class="xblock-message validation <%- aggregateValidationClass %> <%- additionalClasses %>">
<p class="<%- aggregateMessageType %>"><span class="icon fa <%- getIcon(aggregateMessageType) %>" aria-hidden="true"></span>
<%- summaryMessage.text %>
<% if (summaryMessage.action_class) { %>
Expand All @@ -25,7 +25,7 @@ var aggregateValidationClass = aggregateMessageType === "error"? "has-errors" :
var messageType = message.type
var messageTypeDisplayName = getDisplayName(messageType)
%>
<li class="xblock-message-item <%= messageType %>">
<li class="xblock-message-item <%- messageType %>">
<span class="message-text">
<% if (messageTypeDisplayName) { %>
<span class="sr"><%- messageTypeDisplayName %>:</span>
Expand Down