Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug where multiple metaboxes caused search modal to send posts … #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cggit
Copy link

@cggit cggit commented Apr 9, 2017

…to the wrong metabox

Counts number of attached-posts instances on the page and if finds more than one sets context when clicking the extra search button

@desrosj
Copy link

desrosj commented Oct 16, 2017

I tested this today and it fixes the issues in my testing. My testing environment has:

  • One meta box with an attached post field in a repeating group field.
  • One meta box with a single attached post field.
  • One meta box with two attached post fields (not grouped and not repeating).

One nitpicky thing, when you open a search and type a search term it is preserved if you open the search for a separate instance of the field. Can that field be cleared when the modal is opened? Or stay specific to the field that the search occured for?

var $wrap = $this.closest(' .attached-posts-wrap' );
app.$.retrievedPosts = $wrap.find( '.retrieved' );
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing ;?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants