Skip to content

Instantly share code, notes, and snippets.

@nylen
Last active November 10, 2017 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nylen/58929e94fc1ae7895bd508938d992be2 to your computer and use it in GitHub Desktop.
Save nylen/58929e94fc1ae7895bd508938d992be2 to your computer and use it in GitHub Desktop.
diff --git a/client/components/popover/menu-item.jsx b/client/components/popover/menu-item.jsx
index 77dc01a..82228cd 100644
--- a/client/components/popover/menu-item.jsx
+++ b/client/components/popover/menu-item.jsx
@@ -29,7 +29,8 @@ export default class PopoverMenuItem extends Component {
}
render() {
- const { children, className, focusOnHover, href, icon, isSelected } = this.props;
+ const href = null;
+ const { children, className, focusOnHover, icon, isSelected } = this.props;
const classes = classnames( 'popover__menu-item', className, {
'is-selected': isSelected,
} );
@@ -45,7 +46,11 @@ export default class PopoverMenuItem extends Component {
role="menuitem"
onMouseOver={ hoverHandler }
tabIndex="-1"
- { ...omit( this.props, 'icon', 'focusOnHover', 'isSelected' ) }
+ { ...omit( this.props, 'icon', 'focusOnHover', 'isSelected', 'onClick' ) }
+ onClick={ event => {
+ console.log( 'clicked menu item', this.props.children );
+ return this.props.onClick( event );
+ } }
className={ classes }
>
{ icon && <Gridicon icon={ icon } size={ 18 } /> }
diff --git a/client/my-sites/post-type-list/post-actions-ellipsis-menu/publish.jsx b/client/my-sites/post-type-list/post-actions-ellipsis-menu/publish.jsx
index ecdb79f..f746c4d 100644
--- a/client/my-sites/post-type-list/post-actions-ellipsis-menu/publish.jsx
+++ b/client/my-sites/post-type-list/post-actions-ellipsis-menu/publish.jsx
@@ -44,7 +44,7 @@ class PostActionsEllipsisMenuPublish extends Component {
}
this.props.onPublishPost();
- this.props.savePost( siteId, postId, { status: 'publish' } );
+ // this.props.savePost( siteId, postId, { status: 'publish' } );
}
render() {
diff --git a/client/my-sites/post-type-list/post-actions-ellipsis-menu/restore.jsx b/client/my-sites/post-type-list/post-actions-ellipsis-menu/restore.jsx
index 101d9ce..14ebfdb 100644
--- a/client/my-sites/post-type-list/post-actions-ellipsis-menu/restore.jsx
+++ b/client/my-sites/post-type-list/post-actions-ellipsis-menu/restore.jsx
@@ -45,7 +45,7 @@ class PostActionsEllipsisMenuRestore extends Component {
}
this.props.bumpStat();
- this.props.restorePost( siteId, postId );
+ // this.props.restorePost( siteId, postId );
}
render() {
diff --git a/client/my-sites/post-type-list/post-actions-ellipsis-menu/trash.jsx b/client/my-sites/post-type-list/post-actions-ellipsis-menu/trash.jsx
index 38e8297..9bd860e 100644
--- a/client/my-sites/post-type-list/post-actions-ellipsis-menu/trash.jsx
+++ b/client/my-sites/post-type-list/post-actions-ellipsis-menu/trash.jsx
@@ -47,10 +47,10 @@ class PostActionsEllipsisMenuTrash extends Component {
if ( 'trash' !== status ) {
this.props.onTrashClick();
- this.props.trashPost( siteId, postId );
+ // this.props.trashPost( siteId, postId );
} else if ( confirm( translate( 'Are you sure you want to permanently delete this post?' ) ) ) {
this.props.onDeleteClick();
- this.props.deletePost( siteId, postId );
+ // this.props.deletePost( siteId, postId );
}
}
diff --git a/client/my-sites/post-type-list/post-actions-ellipsis-menu/view.jsx b/client/my-sites/post-type-list/post-actions-ellipsis-menu/view.jsx
index a7bf044..b217231 100644
--- a/client/my-sites/post-type-list/post-actions-ellipsis-menu/view.jsx
+++ b/client/my-sites/post-type-list/post-actions-ellipsis-menu/view.jsx
@@ -42,6 +42,7 @@ class PostActionsEllipsisMenuView extends Component {
previewPost = event => {
const { isPreviewable, previewUrl, siteId } = this.props;
this.props.bumpStat();
+ return;
if ( ! isPreviewable ) {
// The default action for the link is to open the previewUrl with a target of _blank.
// This default action is canceled below for previewable sites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment