Skip to content
Snippets Groups Projects
Commit fceb5e80 authored by john's avatar john
Browse files

linter fixes and new routes

parent f6061262
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,6 @@ api/db/*
api/db/*
logs/*
node_modules
public/assets/*
pubsweet.log
.nvmrc 0 → 100644
6
......@@ -151,11 +151,11 @@ export class BookBuilder extends React.Component {
const productionEditor = this.state.productionEditor || 'unassigned'
return (
<div className="bootstrap pubsweet-component pubsweet-component-scroll">
<div className='bootstrap pubsweet-component pubsweet-component-scroll'>
<div className={styles.bookBuilder}>
<div
className="col-lg-offset-2 col-lg-8 col-md-8 col-sm-12 col-xs-12"
ref="outerContainer">
className='col-lg-offset-2 col-lg-8 col-md-8 col-sm-12 col-xs-12'
ref='outerContainer'>
<h1>{this.props.book.title}</h1>
......@@ -166,8 +166,8 @@ export class BookBuilder extends React.Component {
</div>
<Division
title="Front Matter"
type="front"
title='Front Matter'
type='front'
outerContainer={outerContainer}
add={createFragment}
remove={deleteFragment}
......@@ -180,8 +180,8 @@ export class BookBuilder extends React.Component {
<div className={styles.sectionDivider} />
<Division
title="Body"
type="body"
title='Body'
type='body'
outerContainer={outerContainer}
add={createFragment}
remove={deleteFragment}
......@@ -194,8 +194,8 @@ export class BookBuilder extends React.Component {
<div className={styles.sectionDivider} />
<Division
title="Back Matter"
type="back"
title='Back Matter'
type='back'
outerContainer={outerContainer}
add={createFragment}
remove={deleteFragment}
......@@ -209,12 +209,12 @@ export class BookBuilder extends React.Component {
</div>
<BookBuilderModal
title="Editoria Team Manager"
action="EditoriaTeamManager"
title='Editoria Team Manager'
action='EditoriaTeamManager'
show={this.state.showTeamManager}
toggle={this._toggleTeamManager}
container={outerContainer}
size="large"
size='large'
teams={teams}
users={users}
updateTeam={updateTeam}
......
......@@ -25,6 +25,7 @@ export class BookList extends React.Component {
}
render () {
console.log('render')
const { book } = this.props
const { showModal } = this.state
let bookTitle = book ? book.title : 'Fetching...'
......@@ -32,9 +33,9 @@ export class BookList extends React.Component {
return (
<div className={styles.bookList + ' bootstrap'}>
<div className="container col-lg-offset-2 col-lg-8">
<div className='container col-lg-offset-2 col-lg-8'>
<div className="col-lg-12">
<div className='col-lg-12'>
<h1 className={styles.bookTitle}>
Books
<div className={styles.addBookBtn} onClick={this._toggleModal}>
......@@ -43,11 +44,11 @@ export class BookList extends React.Component {
</h1>
</div>
<div className="col-lg-12">
<div className='col-lg-12'>
<div className={styles.bookContainer}>
<h2>{bookTitle}</h2>
<LinkContainer to={`/manage/books/${bookId}/book-builder`}>
<a href="#"
<LinkContainer to={`/books/${bookId}/book-builder`}>
<a href='#'
className={styles.editBook}
onClick={this._toggleModal} >
Edit
......@@ -59,7 +60,7 @@ export class BookList extends React.Component {
</div>
<Modal
className="modal"
className='modal'
show={showModal}
onHide={this._toggleModal}
container={this}
......@@ -76,7 +77,7 @@ export class BookList extends React.Component {
</Modal.Body>
<Modal.Footer>
<a className="modal-button discard-chapter"
<a className='modal-button discard-chapter'
onClick={this._toggleModal}>
Close
</a>
......
......@@ -292,8 +292,8 @@ export class Chapter extends React.Component {
const input = (
<TextInput
className="edit"
ref="chapterInput"
className='edit'
ref='chapterInput'
onSave={this._onSaveRename}
value={title}
/>
......@@ -313,7 +313,7 @@ export class Chapter extends React.Component {
// could do with refs, but that would mean mounting instead of
// shallow rendering to access enzyme's refs() api method
renameButton = (
<a id="bb-rename"
<a id='bb-rename'
onClick={renameButtonFunction}>
{ renameButtonText } &nbsp;&nbsp;
</a>
......@@ -393,7 +393,7 @@ export class Chapter extends React.Component {
titleArea = (
<DropdownButton
title={title}
id="dropbutton"
id='dropbutton'
className={styles.dropDown}
open={this.state.open}
onClick={this._toggleList}
......@@ -401,10 +401,10 @@ export class Chapter extends React.Component {
<div style={{ width: width }}>
<div className={styles.dropDownInputContairer}>
<TextInput
ref="dropDownInput"
ref='dropDownInput'
className={styles.dropDownInput}
onSave={this._onClickCustomTitle}
placeholder="Type a custom title"
placeholder='Type a custom title'
/>
</div>
......@@ -421,13 +421,13 @@ export class Chapter extends React.Component {
<div>
{ renameButton }
<LinkContainer
to={`/manage/books/${book.id}/fragments/${chapter.id}`}
id="bb-edit"
to={`/books/${book.id}/fragments/${chapter.id}`}
id='bb-edit'
>
<a>{ editOrView } &nbsp;&nbsp;</a>
</LinkContainer>
<a id="bb-delete"
<a id='bb-delete'
onClick={this._toggleDelete}>
Delete
</a>
......@@ -442,14 +442,14 @@ export class Chapter extends React.Component {
}
editorArea = (
<a id="bb-unlock"
<a id='bb-unlock'
className={styles.lEditing}
onClick={this._toggleUnlock}>
<i
className={styles.lockIcon + ' fa fa-lock'}
aria-hidden="true"
alt="unlock"
aria-hidden='true'
alt='unlock'
/>
<span className={styles.lockMessage}>
{ chapter.lock.editor.username + message}
......@@ -469,7 +469,7 @@ export class Chapter extends React.Component {
className={styles.chapterContainer + ' col-lg-12 bb-chapter ' + (chapter.subCategory === 'chapter' ? styles.isChapter : styles.isPart)}
style={{ opacity: opacity }}>
<div className={styles.grabIcon + ' ' + (chapter.division === 'body' ? styles.grabIconBody : '')}>
<i className="fa fa-circle" />
<i className='fa fa-circle' />
<div className={styles.tooltip}>
Grab to sort
</div>
......@@ -490,19 +490,19 @@ export class Chapter extends React.Component {
<div className={styles.secondLineContainer}>
<div className={styles.noPadding + ' col-lg-2 col-md-12 col-sm-12 col-xs-12'}>
<div id="bb-upload" className={styles.btnFile}>
<div id='bb-upload' className={styles.btnFile}>
Upload Word
<input
type="file"
accept=".docx"
title=" "
type='file'
accept='.docx'
title=' '
/>
</div>
</div>
<ul className={styles.secondActions + ' col-lg-7 col-md-12 col-sm-12 col-xs-12'}>
<ProgressIndicator
type="style"
type='style'
book={book}
chapter={chapter}
update={update}
......@@ -513,7 +513,7 @@ export class Chapter extends React.Component {
/>
<ProgressIndicator
type="edit"
type='edit'
book={book}
chapter={chapter}
update={update}
......@@ -524,7 +524,7 @@ export class Chapter extends React.Component {
/>
<ProgressIndicator
type="review"
type='review'
book={book}
chapter={chapter}
update={update}
......@@ -535,7 +535,7 @@ export class Chapter extends React.Component {
/>
<ProgressIndicator
type="clean"
type='clean'
book={book}
chapter={chapter}
roles={roles}
......@@ -576,8 +576,8 @@ export class Chapter extends React.Component {
<BookBuilderModal
title={'Delete ' + type}
chapter={chapter}
action="delete"
successText="Delete"
action='delete'
successText='Delete'
type={type}
successAction={this._onClickDelete}
show={this.state.showDeleteModal}
......@@ -588,8 +588,8 @@ export class Chapter extends React.Component {
<BookBuilderModal
title={'Unlock ' + type}
chapter={chapter}
action="unlock"
successText="Unlock"
action='unlock'
successText='Unlock'
type={type}
successAction={this._onClickUnlock}
show={this.state.showUnlockModal}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment