Fix some eslint warnings
This commit is contained in:
@@ -179,7 +179,7 @@
|
|||||||
),
|
),
|
||||||
options: fieldsData.language.options,
|
options: fieldsData.language.options,
|
||||||
persistChanges: true,
|
persistChanges: true,
|
||||||
focusNextID: '#u-field-select-country',
|
focusNextID: '#u-field-select-country'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
countryFieldView,
|
countryFieldView,
|
||||||
|
|||||||
@@ -74,9 +74,9 @@
|
|||||||
this.model.save();
|
this.model.save();
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSubmitPhotoSuccess: function(redirect_url) {
|
handleSubmitPhotoSuccess: function(redirectUrl) {
|
||||||
// Redirect back to the courseware at the checkpoint location
|
// Redirect back to the courseware at the checkpoint location
|
||||||
window.location.href = redirect_url;
|
window.location.href = redirectUrl;
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSubmissionError: function(xhr) {
|
handleSubmissionError: function(xhr) {
|
||||||
|
|||||||
@@ -11,11 +11,11 @@
|
|||||||
'text!templates/fields/field_textarea.underscore',
|
'text!templates/fields/field_textarea.underscore',
|
||||||
'backbone-super'
|
'backbone-super'
|
||||||
], function(gettext, $, _, Backbone, HtmlUtils, DateUtils,
|
], function(gettext, $, _, Backbone, HtmlUtils, DateUtils,
|
||||||
field_readonly_template,
|
fieldReadOnlyTemplate,
|
||||||
field_dropdown_template,
|
fieldDropDownTemplate,
|
||||||
field_link_template,
|
fieldLinkTemplate,
|
||||||
field_text_template,
|
fieldTextTemplate,
|
||||||
field_textarea_template
|
fieldTextAreaTemplate
|
||||||
) {
|
) {
|
||||||
var messageRevertDelay = 6000;
|
var messageRevertDelay = 6000;
|
||||||
var FieldViews = {};
|
var FieldViews = {};
|
||||||
@@ -288,7 +288,7 @@
|
|||||||
|
|
||||||
fieldType: 'readonly',
|
fieldType: 'readonly',
|
||||||
|
|
||||||
fieldTemplate: field_readonly_template,
|
fieldTemplate: fieldReadOnlyTemplate,
|
||||||
|
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
this._super(options);
|
this._super(options);
|
||||||
@@ -353,7 +353,7 @@
|
|||||||
|
|
||||||
fieldType: 'text',
|
fieldType: 'text',
|
||||||
|
|
||||||
fieldTemplate: field_text_template,
|
fieldTemplate: fieldTextTemplate,
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
'change input': 'saveValue'
|
'change input': 'saveValue'
|
||||||
@@ -397,7 +397,7 @@
|
|||||||
|
|
||||||
fieldType: 'dropdown',
|
fieldType: 'dropdown',
|
||||||
|
|
||||||
fieldTemplate: field_dropdown_template,
|
fieldTemplate: fieldDropDownTemplate,
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
click: 'startEditing',
|
click: 'startEditing',
|
||||||
@@ -543,7 +543,7 @@
|
|||||||
|
|
||||||
fieldType: 'textarea',
|
fieldType: 'textarea',
|
||||||
|
|
||||||
fieldTemplate: field_textarea_template,
|
fieldTemplate: fieldTextAreaTemplate,
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
'keydown .wrapper-u-field': 'startEditing',
|
'keydown .wrapper-u-field': 'startEditing',
|
||||||
@@ -686,7 +686,7 @@
|
|||||||
|
|
||||||
fieldType: 'link',
|
fieldType: 'link',
|
||||||
|
|
||||||
fieldTemplate: field_link_template,
|
fieldTemplate: fieldLinkTemplate,
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
'click a': 'linkClicked'
|
'click a': 'linkClicked'
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Store the inital contents so we can compare for unsaved changes
|
// 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
|
// 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
|
// 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');
|
editor.getInputField().setAttribute('id', 'id_codemirror_content');
|
||||||
$(".control-label[for='id_content']")[0].setAttribute('for', '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
|
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.';
|
return 'You have made changes to the article that have not been saved yet.';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$('.btn-primary').click(function() {
|
$('.btn-primary').click(function() {
|
||||||
initial_contents = editor.getValue();
|
initialContents = editor.getValue();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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-field-account-privacy').length).toBe(0);
|
||||||
expect($('.wrapper-profile-section-one').length).toBe(0);
|
expect($('.wrapper-profile-section-one').length).toBe(0);
|
||||||
expect($('.wrapper-profile-section-two').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);
|
expect($badgeListingView.find('.badge-display').length).toBe(updatedLength);
|
||||||
};
|
};
|
||||||
|
|
||||||
var expectBadgesHidden = function(learnerProfileView) {
|
var expectBadgesHidden = function() {
|
||||||
var $accomplishmentsTab = $('#tabpanel-accomplishments');
|
var $accomplishmentsTab = $('#tabpanel-accomplishments');
|
||||||
if ($accomplishmentsTab.length) {
|
if ($accomplishmentsTab.length) {
|
||||||
// Nonexistence counts as hidden.
|
// 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();
|
var errorMessage = $('.badge-set-display').text();
|
||||||
expect(errorMessage).toBe(
|
expect(errorMessage).toBe(
|
||||||
'Your request could not be completed. Reload the page and try again. If the issue persists, click the ' +
|
'Your request could not be completed. Reload the page and try again. If the issue persists, click the ' +
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ module.exports = Merge.smart({
|
|||||||
XModuleShim: 'xmodule/js/src/xmodule.js',
|
XModuleShim: 'xmodule/js/src/xmodule.js',
|
||||||
|
|
||||||
VerticalStudentView: './common/lib/xmodule/xmodule/assets/vertical/public/js/vertical_student_view.js',
|
VerticalStudentView: './common/lib/xmodule/xmodule/assets/vertical/public/js/vertical_student_view.js',
|
||||||
commons : 'babel-polyfill',
|
commons: 'babel-polyfill'
|
||||||
},
|
},
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
|
|||||||
Reference in New Issue
Block a user