diff options
Diffstat (limited to 'scraper/client/paper/paper.address.js')
| -rw-r--r-- | scraper/client/paper/paper.address.js | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/scraper/client/paper/paper.address.js b/scraper/client/paper/paper.address.js index c571d8e2..267fe16b 100644 --- a/scraper/client/paper/paper.address.js +++ b/scraper/client/paper/paper.address.js @@ -146,7 +146,22 @@ class PaperAddress extends Component { return ( <div className='form'> <h3>{citation.title}</h3> - <div className='gray'>{citation.id}</div> + <div className='gray'> + {citation.id} + {' | PDFs: '} + {citation.pdf.map((pdf,i) => { + const domain = pdf.replace('www.','').split('/').slice(2,3)[0] || 'unknown' + return ( + <a + key={i} + onClick={() => this.setState({ pdf_index: i })} + className={i === this.state.pdf_index ? 'selected pdfLink' : 'pdfLink'} + > + {'[' + domain + '] '} + </a> + ) + })} + </div> <div className='param'> <input @@ -167,6 +182,9 @@ class PaperAddress extends Component { this.setState({ institution_1: value }) // this.institution_2._el.focus() }} + onCancel={value => { + this.setState({ institution_1: '' }) + }} ref={ref => this.institution_1 = ref} /> </div> @@ -187,6 +205,9 @@ class PaperAddress extends Component { onSelect={value => { this.setState({ institution_2: value }) }} + onCancel={value => { + this.setState({ institution_2: '' }) + }} ref={ref => this.institution_2 = ref} /> </div> @@ -208,6 +229,9 @@ class PaperAddress extends Component { this.setState({ institution_3: value }) // this.institution_4._el.focus() }} + onCancel={value => { + this.setState({ institution_3: '' }) + }} ref={ref => this.institution_3 = ref} /> </div> @@ -227,7 +251,9 @@ class PaperAddress extends Component { value={this.state.institution_4} onSelect={value => { this.setState({ institution_4: value }) - this.button.focus() + }} + onCancel={value => { + this.setState({ institution_4: '' }) }} ref={ref => this.institution_4 = ref} /> @@ -256,22 +282,6 @@ class PaperAddress extends Component { >{'Next >'}</button> </div> - <div className='param pdf_links'> - {citation.pdf.map((pdf,i) => { - const pdf_partz = pdf.replace('www.','').split('/').slice(2,3)[0] || 'unknown' - let domain = '' - return ( - <a - key={i} - onClick={() => this.setState({ pdf_index: i })} - className={i === this.state.pdf_index ? 'selected' : ''} - > - {'[' + domain + ']'} - </a> - ) - })} - </div> - <iframe className='pdfViewer' src={citation.pdf[this.state.pdf_index]} /> </div> ) |
