-
-
Add File
-
+class NewFileModal extends React.Component {
+ componentDidMount() {
+ document.getElementById('name').focus();
+ }
+ render() {
+ const modalClass = classNames({
+ modal: true,
+ 'modal--reduced': !this.props.canUploadMedia
+ });
+ return (
+
+
+
+
Add File
+
+
+
+ {(() => {
+ if (this.props.canUploadMedia) {
+ return (
+
+ );
+ }
+ return '';
+ })()}
-
- {(() => {
- if (props.canUploadMedia) {
- return (
-
- );
- }
- return '';
- })()}
-
-
- );
+
+ );
+ }
}
NewFileModal.propTypes = {
diff --git a/client/modules/IDE/components/Preferences.js b/client/modules/IDE/components/Preferences.js
index 06e240ed..59f13c0a 100644
--- a/client/modules/IDE/components/Preferences.js
+++ b/client/modules/IDE/components/Preferences.js
@@ -28,6 +28,11 @@ class Preferences extends React.Component {
this.props.setAutosave(value);
}
+ handleLintWarning(event) {
+ const value = event.target.value === 'true';
+ this.props.setLintWarning(value);
+ }
+
render() {
const preferencesContainerClass = classNames({
preferences: true,
@@ -49,6 +54,14 @@ class Preferences extends React.Component {
preference__option: true,
'preference__option--selected': !this.props.autosave
});
+ let lintWarningOnClass = classNames({
+ preference__option: true,
+ 'preference__option--selected': this.props.lintWarning
+ });
+ let lintWarningOffClass = classNames({
+ preference__option: true,
+ 'preference__option--selected': !this.props.lintWarning
+ });
return (
@@ -77,6 +90,7 @@ class Preferences extends React.Component {
className="preference__value"
aria-live="status"
aria-live="polite"
+ aria-atomic="true"
role="status"
value={this.props.fontSize}
onChange={this.handleUpdateFont}
@@ -106,6 +120,7 @@ class Preferences extends React.Component {
className="preference__value"
aria-live="status"
aria-live="polite"
+ aria-atomic="true"
role="status"
value={this.props.indentationAmount}
onChange={this.handleUpdateIndentation}
@@ -139,6 +154,21 @@ class Preferences extends React.Component {
>Off
+