-
Notifications
You must be signed in to change notification settings - Fork 20
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
Make reference search / citations work again #100
base: master
Are you sure you want to change the base?
Conversation
The search now works with the above changes. I'm stuck at the Cite tool not doing anything, or rather, just inserting ??? instead of opening the CitePanel and allowing me to Cite something. |
I can confirm this also happens outside of the PubSweet context, i.e. by running |
data: bibEntry.data, | ||
format: 'citeproc' | ||
}; | ||
doc.create(bibItem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need a Surface transaction here:
var surface = this.context.surface;
surface.transaction(function(tx) {
tx.create(bibItem);
});
That's actually intended. The citation gets created with no targets (hence ???) which are specified afterwards. After you used the surface.transaction you should see the EditBibItemPanel appearing. |
this.context.surface is undefined: Uncaught TypeError: Cannot read property 'transaction' of undefined doc.create actually works just fine, for some reason... ? The remaining issues which I had is addressed in: substance/substance#571 The click events were being ignored, because I didn't click exactly on the small area of the button. |
Ah you are in the panel here... which doesn't have a surface parent. Try this.controller.transaction ? Sorry can't do fixing myself since internet connection is too flaky to do an npm install. |
Sorry |
I think this is good to go now. |
No description provided.