Commit 02dac2b0 authored by pierre.tremouilhac's avatar pierre.tremouilhac
Browse files

Merge branch '573-upd-uglifify' into 'development'

Resolve "upd uglifify"

Closes #573

See merge request ComPlat/chemotion_ELN!811
parents bc0ac93a c998f043
......@@ -151,13 +151,14 @@ export default class ElementsTable extends React.Component {
let items = [];
const minPage = Math.max(page - 2, 1);
const maxPage = Math.min(minPage + 4, pages);
items.push(<Pagination.First onClick={() => this.handlePaginationSelect(1)} />);
items.push(<Pagination.First key="First" onClick={() => this.handlePaginationSelect(1)} />);
if (page>1) {
items.push(<Pagination.Prev onClick={() => this.handlePaginationSelect(page - 1)} />);
items.push(<Pagination.Prev key="Prev" onClick={() => this.handlePaginationSelect(page - 1)} />);
}
for (let _page = minPage; _page <= maxPage; _page=_page+1) {
items.push(
<Pagination.Item
key={`eltPage${_page}`}
active={_page === page}
onClick={() => this.handlePaginationSelect(_page)}>
{_page}
......@@ -166,12 +167,12 @@ export default class ElementsTable extends React.Component {
}
if (pages > maxPage) {
items.push(<Pagination.Ellipsis />);
items.push(<Pagination.Ellipsis key="Ell" />);
}
if (page==pages) {
items.push(<Pagination.Next onClick={() => this.handlePaginationSelect(page+1)} />);
items.push(<Pagination.Next key="Next" onClick={() => this.handlePaginationSelect(page+1)} />);
}
items.push(<Pagination.Last onClick={() => this.handlePaginationSelect(pages)} />);
items.push(<Pagination.Last key="Last" onClick={() => this.handlePaginationSelect(pages)} />);
return (
<div className="list-pagination">
......
......@@ -521,7 +521,7 @@ export default class SampleDetails extends React.Component {
const textAreaStyle = {
height: '35px',
overflow: 'auto',
'white-space': 'pre',
whiteSpace: 'pre',
};
return (
......@@ -850,7 +850,7 @@ export default class SampleDetails extends React.Component {
width: '500px',
height: '640px',
margin: '30px',
'white-space': 'pre-line',
whiteSpace: 'pre-line',
};
if (this.state.showMolfileModal) {
let molfile = this.molfileInput.value;
......
import alt from 'alt';
import React from 'react';
import { Glyphicon, ButtonGroup, Button, DropdownButton, MenuItem,
Form, FormControl, Radio, Grid, Row, Col } from 'react-bootstrap';
import {
Glyphicon, ButtonGroup, Button, DropdownButton, MenuItem,
Form, FormControl, Radio, Grid, Row, Col
} from 'react-bootstrap';
import PropTypes from 'prop-types';
import AutoCompleteInput from './AutoCompleteInput';
......@@ -23,6 +24,7 @@ export default class Search extends React.Component {
tanimotoThreshold: 0.7
};
this.handleClearSearchSelection = this.handleClearSearchSelection.bind(this);
this.handleStructureEditorCancel = this.handleStructureEditorCancel.bind(this);
}
handleSelectionChange(selection) {
......@@ -225,7 +227,7 @@ export default class Search extends React.Component {
<StructureEditorModal
showModal={this.state.showStructureEditor}
onSave={this.props.noSubmit ? null : this.handleStructureEditorSave.bind(this)}
onCancel={this.handleStructureEditorCancel.bind(this)}
onCancel={this.handleStructureEditorCancel}
molfile={this.state.queryMolfile}
submitBtnText="Search"
submitAddons={submitAddons}
......
......@@ -121,8 +121,7 @@ export default class StructureEditorModal extends React.Component {
render() {
const handleSaveBtn = !this.props.onSave ? null : this.handleSaveBtn.bind(this);
const cancelBtnText = this.props.cancelBtnText ? this.props.cancelBtnText : 'Cancel';
const submitBtnText = this.props.submitBtnText ? this.props.submitBtnText : 'Save';
const { cancelBtnText, submitBtnText } = this.props;
const submitAddons = this.props.submitAddons ? this.props.submitAddons : '';
const { editor, showWarning } = this.state;
......@@ -185,19 +184,23 @@ export default class StructureEditorModal extends React.Component {
}
StructureEditorModal.propTypes = {
editors: PropTypes.objectOf(StructureEditor),
editors: PropTypes.objectOf(PropTypes.instanceOf(StructureEditor)),
molfile: PropTypes.string,
showModal: PropTypes.bool,
hasChildren: PropTypes.bool,
hasParent: PropTypes.bool,
onCancel: PropTypes.func,
onSave: PropTypes.func,
submitBtnText: PropTypes.string,
cancelBtnText: PropTypes.string,
};
StructureEditorModal.defaultProps = {
editors: EditorList,
molfile: "\n noname\n\n 0 0 0 0 0 0 0 0 0 0999 V2000\nM END\n",
molfile: "\n noname\n\n 0 0 0 0 0 0 0 0 0 0999 V2000\nM END\n",
showModal: false,
hasChildren: false,
hasParent: false,
submitBtnText: 'Save',
cancelBtnText: 'Cancel',
};
......@@ -27,7 +27,7 @@ Rails.application.configure do
config.serve_static_files = true
# Compress JavaScripts and CSS.
# config.assets.js_compressor = Uglifier.new(harmony: true)
config.assets.js_compressor = Uglifier.new(harmony: true, mangle: false, compress: false)
config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
......
This diff is collapsed.
......@@ -2,6 +2,7 @@
"name": "chemotion",
"repository": {},
"dependencies": {
"@novnc/noVNC": "novnc/noVNC#v1.0.0",
"ag-grid": "17.1.1",
"ag-grid-react": "17.1.0",
"alt": "0.18.6",
......@@ -11,12 +12,13 @@
"babel-preset-es2015": "6.13.2",
"babel-preset-react": "6.11.1",
"babelify": "~7.3.0",
"browserify": "16.1.0",
"browserify": "16.2.3",
"browserify-incremental": "^3.1.1",
"bundle-collapser": "^1.2.1",
"citation-js": "^0.4.0-9 ",
"classnames": "^2.2.5",
"clipboard": "^1.5.12",
"commonmark": "^0.28.1",
"create-react-class": "^15.6.3",
"d3": "^3.5.15",
"debounce": "^1.0.0",
......@@ -31,7 +33,7 @@
"moment-precise-range-plugin": "^1.2.4",
"numeral": "^1.5.3",
"path": "^0.12.7",
"prop-types": "15.6.0",
"prop-types": "15.6.2",
"qrcode.react": "^0.6.1",
"quagga": "^0.11.5",
"quill": "1.1.9",
......@@ -43,6 +45,7 @@
"react-barcode": "^1.1.0",
"react-bootstrap": "~0.32.4",
"react-cookie": "^0.4.8",
"react-datepicker": "~1.4.1",
"react-dnd": "^2.1.4",
"react-dnd-html5-backend": "^2.1.2",
"react-dom": "15.3.2",
......@@ -53,22 +56,19 @@
"react-notification-system": "^0.2.7",
"react-qr-reader": "^0.3.1",
"react-select": "1.1.0",
"react-virtualized-select": "3.0.1",
"react-stickydiv": "^3.4.19",
"react-stickynode": "^2.0.1",
"react-svg-file-zoom-pan": "0.1.4",
"react-svg-inline": "^1.2.0",
"react-treeview": "0.4.7",
"react-ui-tree": "3.1.0",
"react-datepicker": "~1.4.1",
"react-virtualized-select": "3.0.1",
"react-vis": "1.9.3",
"redux": "^4.0.0",
"sha.js": "^2.4.11",
"sha256": "^0.2.0",
"uglify-js": "~3.3.16",
"uglifyify": "~4.0.5",
"uglifyify": "~5.0.1",
"uuid": "^2.0.2",
"commonmark": "^0.28.1",
"@novnc/noVNC": "novnc/noVNC#v1.0.0",
"whatwg-fetch": "2.0.3",
"xlsx": "^0.12.9"
},
......
Markdown is supported
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