Skip to content

Commit

Permalink
fix: Remove touch-tap plugin
Browse files Browse the repository at this point in the history
Incompatible with newer react and probably unnecessary. See: zilverline/react-tap-event-plugin#121
  • Loading branch information
testower committed Aug 7, 2019
1 parent f1bf28c commit 9d2c58e
Show file tree
Hide file tree
Showing 35 changed files with 66 additions and 70 deletions.
2 changes: 1 addition & 1 deletion components/Dialogs/AddAdjacentStopsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class AddAdjacentStopDialog extends React.Component {
<FlatButton
label={formatMessage({ id: 'cancel' })}
primary={true}
onTouchTap={handleClose}
onClick={handleClose}
/>,
<FlatButton
label={formatMessage({ id: 'confirm' })}
Expand Down
4 changes: 2 additions & 2 deletions components/Dialogs/AddMemberToGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ class AddMemberToGroup extends Component {
<FlatButton
label={formatMessage({ id: 'change_coordinates_cancel' })}
primary={true}
onTouchTap={handleClose}
onClick={handleClose}
/>,
<FlatButton
label={formatMessage({ id: 'add' })}
primary={true}
keyboardFocused={true}
disabled={!canSave}
onTouchTap={() => handleConfirm(checkedItems)}
onClick={() => handleConfirm(checkedItems)}
/>
];

Expand Down
2 changes: 1 addition & 1 deletion components/Dialogs/AddStopPlaceToParent.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class AddStopPlaceToParent extends Component {
<FlatButton
label={formatMessage({ id: 'change_coordinates_cancel' })}
primary={true}
onTouchTap={handleClose}
onClick={handleClose}
/>,
<FlatButton
label={formatMessage({ id: 'add' })}
Expand Down
4 changes: 2 additions & 2 deletions components/Dialogs/AltNamesDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,15 @@ class AltNamesDialog extends React.Component {
{!disabled
? <div style={{display: 'flex'}}>
<IconButton
onTouchTap={() => {
onClick={() => {
this.handleEdit(i);
}}
>
<MdEdit color={getPrimaryColor()}
/>
</IconButton>
<IconButton
onTouchTap={() => {
onClick={() => {
this.handleRemoveName(i);
}}
>
Expand Down
7 changes: 4 additions & 3 deletions components/Dialogs/CompassBearingDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licence for the specific language governing permissions and
limitations under the Licence. */

import React from 'react';

import React from 'react';
import PropTypes from 'prop-types';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
Expand Down Expand Up @@ -103,15 +104,15 @@ class CompassBearingDialog extends React.Component {
label={compassBearingTranslation.cancel}
primary={false}
keyboardFocused={true}
onTouchTap={() => this.handleClose()}
onClick={() => this.handleClose()}
style={{ marginRight: 5 }}
/>
<FlatButton
label={compassBearingTranslation.confirm}
primary={true}
disabled={!this.state.compassBearing}
keyboardFocused={true}
onTouchTap={() => this.handleConfirm()}
onClick={() => this.handleConfirm()}
/>
</div>,
];
Expand Down
7 changes: 4 additions & 3 deletions components/Dialogs/ConfirmDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licence for the specific language governing permissions and
limitations under the Licence. */

import React from 'react';

import React from 'react';
import PropTypes from 'prop-types';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
Expand Down Expand Up @@ -41,13 +42,13 @@ class ConfirmDialog extends React.Component {
<FlatButton
label={confirmDialogTranslation.cancel}
primary={true}
onTouchTap={handleClose}
onClick={handleClose}
/>,
<FlatButton
label={confirmDialogTranslation.confirm}
primary={true}
keyboardFocused={true}
onTouchTap={handleConfirm}
onClick={handleConfirm}
/>,
];

Expand Down
7 changes: 4 additions & 3 deletions components/Dialogs/CoordinatesDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licence for the specific language governing permissions and
limitations under the Licence. */

import React from 'react';

import React from 'react';
import PropTypes from 'prop-types';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
Expand Down Expand Up @@ -108,14 +109,14 @@ class CoordinatesDialog extends React.Component {
label={confirmDialogTranslation.cancel}
primary={false}
keyboardFocused={true}
onTouchTap={() => this.handleClose()}
onClick={() => this.handleClose()}
style={{ marginRight: 5 }}
/>
<FlatButton
label={confirmDialogTranslation.confirm}
primary={true}
keyboardFocused={true}
onTouchTap={() => this.handleConfirm()}
onClick={() => this.handleConfirm()}
/>
</div>,
];
Expand Down
2 changes: 1 addition & 1 deletion components/Dialogs/DeleteQuayDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class DeleteQuayDialog extends React.Component {
const actions = [
<FlatButton
label={translations.cancel}
onTouchTap={handleClose}
onClick={handleClose}
icon={<MdCancel />}
/>,
<FlatButton
Expand Down
2 changes: 1 addition & 1 deletion components/Dialogs/DialogHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class DialogHeader extends Component {
</div>
<IconButton
style={{ marginRight: 5 }}
onTouchTap={handleClose}
onClick={handleClose}
>
<MdClose />
</IconButton>
Expand Down
7 changes: 4 additions & 3 deletions components/Dialogs/FavoriteNameDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licence for the specific language governing permissions and
limitations under the Licence. */

import React from 'react';

import React from 'react';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import TextField from 'material-ui/TextField';
Expand Down Expand Up @@ -70,13 +71,13 @@ class FavoriteNameDialog extends React.Component {
<FlatButton
label={labelTexts.cancel}
primary={true}
onTouchTap={this.handleClose.bind(this)}
onClick={this.handleClose.bind(this)}
/>,
<FlatButton
label={labelTexts.use}
primary={true}
keyboardFocused={true}
onTouchTap={this.handleSubmit.bind(this)}
onClick={this.handleSubmit.bind(this)}
/>,
];

Expand Down
2 changes: 1 addition & 1 deletion components/Dialogs/MergeQuaysDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class MergeQuaysDialog extends React.Component {
const actions = [
<FlatButton
label={translations.cancel}
onTouchTap={handleClose}
onClick={handleClose}
icon={<MdCancel />}
/>,
<FlatButton
Expand Down
4 changes: 2 additions & 2 deletions components/Dialogs/MergeStopDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class MergeStopDialog extends React.Component {
const actions = [
<FlatButton
label={translations.cancel}
onTouchTap={handleClose}
onClick={handleClose}
icon={<MdCancel />}
/>
];
Expand All @@ -118,7 +118,7 @@ class MergeStopDialog extends React.Component {
<FlatButton
label={translations.confirm}
disabled={!enableConfirm || isLoading || isFetchingQuays}
onTouchTap={() => {
onClick={() => {
handleConfirm(fromVersionComment, toVersionComment);
}}
primary={true}
Expand Down
4 changes: 2 additions & 2 deletions components/Dialogs/MoveQuayDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ class MoveQuayDialog extends React.Component {
const actions = [
<FlatButton
label={translations.cancel}
onTouchTap={handleClose}
onClick={handleClose}
icon={<MdCancel />}
/>,
<FlatButton
label={translations.confirm}
disabled={!enableConfirm || isLoading}
onTouchTap={() => { handleConfirm(fromVersionComment,toVersionComment) }}
onClick={() => { handleConfirm(fromVersionComment,toVersionComment) }}
primary={true}
keyboardFocused={true}
icon={isLoading ? <Spinner/> : <MdMerge />}
Expand Down
4 changes: 2 additions & 2 deletions components/Dialogs/MoveQuayNewStopDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ class MoveQuayNewStopDialog extends React.Component {
const actions = [
<FlatButton
label={translations.cancel}
onTouchTap={handleClose}
onClick={handleClose}
icon={<MdCancel />}
/>,
<FlatButton
label={translations.confirm}
disabled={!enableConfirm || isLoading || !quayIds.length}
onTouchTap={() => {
onClick={() => {
handleConfirm(quayIds, fromVersionComment, toVersionComment);
}}
primary={true}
Expand Down
2 changes: 1 addition & 1 deletion components/Dialogs/NewAltName.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class NewAltName extends Component {
style={{ marginTop: 10, width: '100%', textAlign: 'center' }}
disabled={!value}
primary={true}
onTouchTap={() => {
onClick={() => {
handleAddAltName();
}}
>
Expand Down
2 changes: 1 addition & 1 deletion components/Dialogs/RemoveStopFromParentDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class RemoveStopFromParentDialog extends React.Component {
let actions = [
<FlatButton
label={translations.cancel}
onTouchTap={handleClose}
onClick={handleClose}
icon={<MdCancel />}
/>,
<FlatButton
Expand Down
4 changes: 2 additions & 2 deletions components/Dialogs/SaveDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class SaveDialog extends React.Component {
const actions = [
<FlatButton
label={translations.cancel}
onTouchTap={handleClose}
onClick={handleClose}
icon={<MdCancel />}
/>,
<FlatButton
Expand All @@ -203,7 +203,7 @@ class SaveDialog extends React.Component {
keyboardFocused={true}
icon={isSaving && !errorMessage.length ? <MdSpinner /> : <MdSave />}
disabled={!timeLegal || !dateLegal || isSaving}
onTouchTap={() => this.handleSave()}
onClick={() => this.handleSave()}
/>
];

Expand Down
2 changes: 1 addition & 1 deletion components/Dialogs/TerminateStopPlaceDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class TerminateStopPlaceDialog extends React.Component {
const actions = [
<FlatButton
label={translations.cancel}
onTouchTap={handleClose}
onClick={handleClose}
icon={<MdCancel />}
/>,
<FlatButton
Expand Down
7 changes: 4 additions & 3 deletions components/Dialogs/WalkingDistanceDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licence for the specific language governing permissions and
limitations under the Licence. */

import React from 'react';

import React from 'react';
import PropTypes from 'prop-types';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
Expand Down Expand Up @@ -111,14 +112,14 @@ class WalkingDistanceDialog extends React.Component {
label={translation.cancel}
primary={false}
keyboardFocused={true}
onTouchTap={() => this.handleClose()}
onClick={() => this.handleClose()}
style={{ marginRight: 5 }}
/>
<FlatButton
label={translation.confirm}
primary={true}
keyboardFocused={true}
onTouchTap={() => this.handleConfirm()}
onClick={() => this.handleConfirm()}
/>
</div>,
];
Expand Down
5 changes: 3 additions & 2 deletions components/EditStopPage/ColumnFilterPopover.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licence for the specific language governing permissions and
limitations under the Licence. */

import React from 'react';

import React from 'react';
import Popover, { PopoverAnimationVertical } from 'material-ui/Popover';
import RaisedButton from 'material-ui/RaisedButton';
import Menu from 'material-ui/Menu';
Expand Down Expand Up @@ -48,7 +49,7 @@ class ColumnFilterPopover extends React.Component {
<RaisedButton
label={buttonLabel}
labelStyle={{fontSize: 12}}
onTouchTap={this.handleTouchTap.bind(this)}
onClick={this.handleTouchTap.bind(this)}
/>
<Popover
open={this.state.open}
Expand Down
5 changes: 3 additions & 2 deletions components/EditStopPage/MakeExpandable.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Licence for the specific language governing permissions and
limitations under the Licence. */

import React from 'react';

import React from 'react';
import MdExpand from 'material-ui/svg-icons/navigation/expand-more';
import MdCollapse from 'material-ui/svg-icons/navigation/expand-less';
import IconButton from 'material-ui/IconButton';
Expand Down Expand Up @@ -58,7 +59,7 @@ class MakeExpandable extends React.PureComponent {
<div style={style}>
{this.props.children}
<div style={iconButtonStyle}>
<IconButton onTouchTap={this.handleToggle.bind(this)}>
<IconButton onClick={this.handleToggle.bind(this)}>
{this.state.expanded ? <MdCollapse /> : <MdExpand />}
</IconButton>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/EditStopPage/ModalitiesMenuItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ModalitiesMenuItems extends React.Component {
{type.name}
</span>
}
onTouchTap={() => {
onClick={() => {
!type.submodes && handleStopTypeChange(type.value);
}}
insetChildren={true}
Expand Down
4 changes: 2 additions & 2 deletions components/EditStopPage/StopPlaceDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ class StopPlaceDetails extends React.Component {
borderBottom: disabled ? 'none' : '1px dotted grey',
marginLeft: 5
}}
onTouchTap={e => {
onClick={e => {
this.handleOpenStopPlaceTypePopover(e);
}}
>
Expand Down Expand Up @@ -556,7 +556,7 @@ class StopPlaceDetails extends React.Component {
style={{ marginLeft: 6, borderBottom: '1px dotted', marginTop: -3 }}
>
<IconButton
onTouchTap={e => {
onClick={e => {
this.handleOpenWeightPopover(e);
}}
>
Expand Down
2 changes: 1 addition & 1 deletion components/EditStopPage/TagsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class TagsDialog extends Component {
</div>
<IconButton
style={{ marginRight: 5 }}
onTouchTap={() => {
onClick={() => {
handleClose();
}}
>
Expand Down
Loading

0 comments on commit 9d2c58e

Please sign in to comment.