A first stab at the ‘validatebutton’ plugin
This is not yet integrated in the sliceview and others, but works in a standalone test view like this
http://localhost:8080/trash/simplevalidatebutton/ple.inria.thierry_parmentelat
—
in a nutshell, we have topmenu display a disabled link ‘validation’ and send a query in background
if anything gets returned by this query - meaning the user is PI at some authority - we then
re-enable the menu button
—
There is one catch at this point, which is that the DOM element attached to the plugin - the menu button - needs to
have the ‘plugin’ class because this is what is used to trigger query events
So in this version we add this plugin class to the topmenu buttons, which is awkward
—
The reason why this plugin is special is, it does not come with its own DOM element but piggybacks on an existing one - which had no reason to have this plugin class attached
The plan to get this right is to have the plugin.js code manage an extra class (for example named pubsub) independantly from the DOM building code and conventions