switch lineNo to lineNumber

This commit is contained in:
MathuraMG 2016-08-12 14:23:34 -04:00
parent e964df2fe2
commit 018a8b970c
6 changed files with 12 additions and 12 deletions

View file

@ -15,9 +15,9 @@ export function clearLintMessage() {
}; };
} }
export function updateLineNumber(lineNo) { export function updateLineNumber(lineNumber) {
return { return {
type: ActionTypes.UPDATE_LINENUMBER, type: ActionTypes.UPDATE_LINENUMBER,
lineNo lineNumber
}; };
} }

View file

@ -104,7 +104,7 @@ class Editor extends React.Component {
</div> </div>
<EditorAccessibility <EditorAccessibility
lintMessages={this.props.lintMessages} lintMessages={this.props.lintMessages}
lineNo={this.props.lineNo} lineNumber={this.props.lineNumber}
/> />
</div> </div>
); );
@ -113,7 +113,7 @@ class Editor extends React.Component {
Editor.propTypes = { Editor.propTypes = {
lintWarning: PropTypes.bool.isRequired, lintWarning: PropTypes.bool.isRequired,
lineNo: PropTypes.string.isRequired, lineNumber: PropTypes.string.isRequired,
lintMessages: PropTypes.array.isRequired, lintMessages: PropTypes.array.isRequired,
updateLintMessage: PropTypes.func.isRequired, updateLintMessage: PropTypes.func.isRequired,
clearLintMessage: PropTypes.func.isRequired, clearLintMessage: PropTypes.func.isRequired,

View file

@ -27,7 +27,7 @@ class EditorAccessibility extends React.Component {
{messages} {messages}
</ul> </ul>
<p> Current line <p> Current line
<span className="editor-linenumber" aria-live="polite" aria-atomic="true" id="current-line"> {this.props.lineNo} </span> <span className="editor-linenumber" aria-live="polite" aria-atomic="true" id="current-line"> {this.props.lineNumber} </span>
</p> </p>
</div> </div>
); );
@ -36,7 +36,7 @@ class EditorAccessibility extends React.Component {
EditorAccessibility.propTypes = { EditorAccessibility.propTypes = {
lintMessages: PropTypes.array.isRequired, lintMessages: PropTypes.array.isRequired,
lineNo: PropTypes.string.isRequired, lineNumber: PropTypes.string.isRequired,
}; };
export default EditorAccessibility; export default EditorAccessibility;

View file

@ -33,7 +33,7 @@ const hijackConsoleScript = `<script>
}); });
// catch reference errors, via http://stackoverflow.com/a/12747364/2994108 // catch reference errors, via http://stackoverflow.com/a/12747364/2994108
window.onerror = function (msg, url, lineNo, columnNo, error) { window.onerror = function (msg, url, lineNumber, columnNo, error) {
var string = msg.toLowerCase(); var string = msg.toLowerCase();
var substring = "script error"; var substring = "script error";
var data = {}; var data = {};
@ -41,7 +41,7 @@ const hijackConsoleScript = `<script>
if (string.indexOf(substring) > -1){ if (string.indexOf(substring) > -1){
data = 'Script Error: See Browser Console for Detail'; data = 'Script Error: See Browser Console for Detail';
} else { } else {
data = msg + ' Line: ' + lineNo + 'column: ' + columnNo; data = msg + ' Line: ' + lineNumber + 'column: ' + columnNo;
} }
window.parent.postMessage({ window.parent.postMessage({
method: 'error', method: 'error',

View file

@ -175,7 +175,7 @@ class IDEView extends React.Component {
isTabIndent={this.props.preferences.isTabIndent} isTabIndent={this.props.preferences.isTabIndent}
files={this.props.files} files={this.props.files}
lintMessages={this.props.editorAccessibility.lintMessages} lintMessages={this.props.editorAccessibility.lintMessages}
lineNo={this.props.editorAccessibility.lineNo} lineNumber={this.props.editorAccessibility.lineNumber}
/> />
<Console <Console
consoleEvent={this.props.ide.consoleEvent} consoleEvent={this.props.ide.consoleEvent}
@ -254,7 +254,7 @@ IDEView.propTypes = {
openPreferences: PropTypes.func.isRequired, openPreferences: PropTypes.func.isRequired,
editorAccessibility: PropTypes.shape({ editorAccessibility: PropTypes.shape({
lintMessages: PropTypes.array.isRequired, lintMessages: PropTypes.array.isRequired,
lineNo: PropTypes.string.isRequired lineNumber: PropTypes.string.isRequired
}).isRequired, }).isRequired,
updateLintMessage: PropTypes.func.isRequired, updateLintMessage: PropTypes.func.isRequired,
clearLintMessage: PropTypes.func.isRequired, clearLintMessage: PropTypes.func.isRequired,

View file

@ -1,7 +1,7 @@
import * as ActionTypes from '../../../constants'; import * as ActionTypes from '../../../constants';
const initialState = { const initialState = {
lineNo: 'line', lineNumber: 'line',
lintMessages: [] lintMessages: []
}; };
@ -15,7 +15,7 @@ const editorAccessibility = (state = initialState, action) => {
case ActionTypes.CLEAR_LINT_MESSAGE: case ActionTypes.CLEAR_LINT_MESSAGE:
return Object.assign({}, state, { lintMessages: [] }); return Object.assign({}, state, { lintMessages: [] });
case ActionTypes.UPDATE_LINENUMBER: case ActionTypes.UPDATE_LINENUMBER:
return Object.assign({}, state, { lineNo: `line ${action.lineNo}` }); return Object.assign({}, state, { lineNumber: `line ${action.lineNumber}` });
default: default:
return state; return state;
} }