Fix some eslint warnings

This commit is contained in:
Michael Youngstrom
2018-12-18 12:41:46 -05:00
parent 7b04832606
commit 4feaee2bd8
6 changed files with 20 additions and 20 deletions

View File

@@ -179,7 +179,7 @@
),
options: fieldsData.language.options,
persistChanges: true,
focusNextID: '#u-field-select-country',
focusNextID: '#u-field-select-country'
})
},
countryFieldView,

View File

@@ -74,9 +74,9 @@
this.model.save();
},
handleSubmitPhotoSuccess: function(redirect_url) {
handleSubmitPhotoSuccess: function(redirectUrl) {
// Redirect back to the courseware at the checkpoint location
window.location.href = redirect_url;
window.location.href = redirectUrl;
},
handleSubmissionError: function(xhr) {

View File

@@ -11,11 +11,11 @@
'text!templates/fields/field_textarea.underscore',
'backbone-super'
], function(gettext, $, _, Backbone, HtmlUtils, DateUtils,
field_readonly_template,
field_dropdown_template,
field_link_template,
field_text_template,
field_textarea_template
fieldReadOnlyTemplate,
fieldDropDownTemplate,
fieldLinkTemplate,
fieldTextTemplate,
fieldTextAreaTemplate
) {
var messageRevertDelay = 6000;
var FieldViews = {};
@@ -288,7 +288,7 @@
fieldType: 'readonly',
fieldTemplate: field_readonly_template,
fieldTemplate: fieldReadOnlyTemplate,
initialize: function(options) {
this._super(options);
@@ -353,7 +353,7 @@
fieldType: 'text',
fieldTemplate: field_text_template,
fieldTemplate: fieldTextTemplate,
events: {
'change input': 'saveValue'
@@ -397,7 +397,7 @@
fieldType: 'dropdown',
fieldTemplate: field_dropdown_template,
fieldTemplate: fieldDropDownTemplate,
events: {
click: 'startEditing',
@@ -543,7 +543,7 @@
fieldType: 'textarea',
fieldTemplate: field_textarea_template,
fieldTemplate: fieldTextAreaTemplate,
events: {
'keydown .wrapper-u-field': 'startEditing',
@@ -686,7 +686,7 @@
fieldType: 'link',
fieldTemplate: field_link_template,
fieldTemplate: fieldLinkTemplate,
events: {
'click a': 'linkClicked'

View File

@@ -8,7 +8,7 @@ $(document).ready(function() {
});
// Store the inital contents so we can compare for unsaved changes
var initial_contents = editor.getValue();
var initialContents = editor.getValue();
// The Wiki associates a label with the text area that has ID "id_content". However, when we swap in
// CodeMirror, that text area is hidden. We need to associate the label with visible CodeMirror text area
@@ -17,12 +17,12 @@ $(document).ready(function() {
editor.getInputField().setAttribute('id', 'id_codemirror_content');
$(".control-label[for='id_content']")[0].setAttribute('for', 'id_codemirror_content');
window.onbeforeunload = function askConfirm() { // Warn the user before they navigate away
if (editor.getValue() != initial_contents) {
if (editor.getValue() != initialContents) {
return 'You have made changes to the article that have not been saved yet.';
}
};
$('.btn-primary').click(function() {
initial_contents = editor.getValue();
initialContents = editor.getValue();
});
});

View File

@@ -107,7 +107,7 @@ define(['underscore', 'URI', 'edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers'
}
};
var expectProfileSectionsNotToBeRendered = function(learnerProfileView) {
var expectProfileSectionsNotToBeRendered = function() {
expect($('.wrapper-profile-field-account-privacy').length).toBe(0);
expect($('.wrapper-profile-section-one').length).toBe(0);
expect($('.wrapper-profile-section-two').length).toBe(0);
@@ -138,7 +138,7 @@ define(['underscore', 'URI', 'edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers'
expect($badgeListingView.find('.badge-display').length).toBe(updatedLength);
};
var expectBadgesHidden = function(learnerProfileView) {
var expectBadgesHidden = function() {
var $accomplishmentsTab = $('#tabpanel-accomplishments');
if ($accomplishmentsTab.length) {
// Nonexistence counts as hidden.
@@ -158,7 +158,7 @@ define(['underscore', 'URI', 'edx-ui-toolkit/js/utils/spec-helpers/ajax-helpers'
});
};
var expectBadgeLoadingErrorIsRendered = function(learnerProfileView) {
var expectBadgeLoadingErrorIsRendered = function() {
var errorMessage = $('.badge-set-display').text();
expect(errorMessage).toBe(
'Your request could not be completed. Reload the page and try again. If the issue persists, click the ' +

View File

@@ -80,7 +80,7 @@ module.exports = Merge.smart({
XModuleShim: 'xmodule/js/src/xmodule.js',
VerticalStudentView: './common/lib/xmodule/xmodule/assets/vertical/public/js/vertical_student_view.js',
commons : 'babel-polyfill',
commons: 'babel-polyfill'
},
output: {