Skip to content

Commit

Permalink
Clean up unnecessary usage of HtmlUtils.setHtml
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-armstrong committed Mar 22, 2016
1 parent a0970d6 commit 57e5d51
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Expand Up @@ -47,7 +47,7 @@
);
}
else {
HtmlUtils.setHtml(this.$el, '<ul class="edit-members"></ul>');
HtmlUtils.setHtml(this.$el, HtmlUtils.HTML('<ul class="edit-members"></ul>'));
this.renderTeamMembers();
}
return this;
Expand Down
3 changes: 1 addition & 2 deletions lms/djangoapps/teams/static/teams/js/views/topic_card.js
Expand Up @@ -19,8 +19,7 @@

render: function() {
var teamCount = this.model.get('team_count');
HtmlUtils.setHtml(
this.$el,
this.$el.text(
StringUtils.interpolate(
ngettext('{team_count} Team', '{team_count} Teams', teamCount),
{team_count: teamCount}
Expand Down
4 changes: 2 additions & 2 deletions lms/static/js/views/fields.js
Expand Up @@ -290,7 +290,7 @@
},

updateValueInField: function () {
HtmlUtils.setHtml(this.$('.u-field-value '), this.modelValue());
this.$('.u-field-value ').text(this.modelValue());
}
});

Expand Down Expand Up @@ -429,7 +429,7 @@
value = this.options.placeholderValue || '';
}
this.$('.u-field-value').attr('aria-label', this.options.title);
HtmlUtils.setHtml(this.$('.u-field-value-readonly'), value);
this.$('.u-field-value-readonly').text(value);

if (this.mode === 'display') {
this.updateDisplayModeClass();
Expand Down
4 changes: 2 additions & 2 deletions lms/static/js/views/image_field.js
Expand Up @@ -189,13 +189,13 @@
showUploadInProgressMessage: function() {
this.$('.u-field-upload-button').css('opacity', 1);
HtmlUtils.setHtml(this.$('.upload-button-icon'), this.iconProgressHtml);
HtmlUtils.setHtml(this.$('.upload-button-title'), this.titleUploading);
this.$('.upload-button-title').text(this.titleUploading);
},

showRemovalInProgressMessage: function() {
this.$('.u-field-remove-button').css('opacity', 1);
HtmlUtils.setHtml(this.$('.remove-button-icon'), this.iconProgressHtml);
HtmlUtils.setHtml(this.$('.remove-button-title'), this.titleRemoving);
this.$('.remove-button-title').text(this.titleRemoving);
},

setCurrentStatus: function(status) {
Expand Down

0 comments on commit 57e5d51

Please sign in to comment.