Closed longhotsummer closed 5 years ago
Here's the skeleton of my idea.
data-popup
to decorate just the ones we want, we'll have to see, otherwise it may decorate "edit this work" buttons./works/foo/bar/popover
Something like this (untested):
$('body').on('mouseover', 'a[href^="/works/"]:not(.btn)', function(e) {
var el = this;
$.ajax.get(this.href + '/popup').then(function(html) {
// we probably want to cache html somewhere, for this work on this page
$(el).popover({content: html}).popover('show');
});
});
The popup could look like a simplified version of this:
ie, basic HTML:
For instance, when reviewing that amending information is correct, I don't want to have to click through to the amending work's page. Showing a popover similar to have wikipedia does it would be very helpful.
We could use JS to bind to A tags that link to a work, and use BS4's popover feature to shower a popover box on hover. We can call
.../work/popover
to generate it on the server side.