[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Antwort: Re: Citation Style Language (CSL) & EPrints?



CAUTION: This e-mail originated outside the University of Southampton.

Here the files

Il 12/10/21 14:44, David R Newman via Eprints-tech ha scritto:

I think removing JS files is probably a sensible precaution, as they could possibly be executed through web browsers and possibly do something nasty.  Replacing with a .txt extension should allow you to send such attachments to the list, as it will likely load in a text editor and therefore not be executed.

On 12/10/2021 13:36, Martin Braendle via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.

Thank you Yuri,

looks interesting. Unfortunately, ep-tech removed the citation.js you sent.

Kind regards,

Martin




[Inactive                hide details for "Yuri via Eprints-tech"                ---12/10/2021 14:23:11---CAUTION: This e-mail originated                outside the Universi]"Yuri via Eprints-tech" ---12/10/2021 14:23:11---CAUTION: This e-mail originated outside the University of Southampton. This is what I did. It is not

Von: "Yuri via Eprints-tech" <eprints-tech at ecs.soton.ac.uk><mailto:eprints-tech at ecs.soton.ac.uk>
An: eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>
Datum: 12/10/2021 14:23
Betreff: Re: [EP-tech] Citation Style Language (CSL) & EPrints?
Gesendet von: <eprints-tech-bounces at ecs.soton.ac.uk><mailto:eprints-tech-bounces at ecs.soton.ac.uk>

________________________________



CAUTION: This e-mail originated outside the University of Southampton.

This is what I did. It is not a plugin but a eprint_render part + a javascript which uses https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcitation.crosscite.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=wIYriDDv56h%2Bwd%2BLui88cw1WCiQTDpGqp%2BZZuaQWSXI%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcitation.crosscite.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=wIYriDDv56h%2Bwd%2BLui88cw1WCiQTDpGqp%2BZZuaQWSXI%3D&amp;reserved=0> api and need a DOI. The script has been modified from the one in the https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcitation.crosscite.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=wIYriDDv56h%2Bwd%2BLui88cw1WCiQTDpGqp%2BZZuaQWSXI%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcitation.crosscite.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=wIYriDDv56h%2Bwd%2BLui88cw1WCiQTDpGqp%2BZZuaQWSXI%3D&amp;reserved=0> page.

Maybe not exacly what asked for...

Il 12/10/21 13:48, Martin Braendle via Eprints-tech ha scritto:

CAUTION: This e-mail originated outside the University of Southampton.

Hi,

warming up a very old question from a former colleague:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Feprints-tech.ecs.soton.ac.narkive.com%2F3pmd0NPr%2Fep-tech-citation-style-language-csl-eprints&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=LsT3aeJfx9fLlPgiQSzbF150U0MRqFqNuVYHs8Kb3QU%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Feprints-tech.ecs.soton.ac.narkive.com%2F3pmd0NPr%2Fep-tech-citation-style-language-csl-eprints&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=LsT3aeJfx9fLlPgiQSzbF150U0MRqFqNuVYHs8Kb3QU%3D&amp;reserved=0>

Has anyone written a plugin that would allow to choose and render a CSL style when rendering an eprint, e.g. using citeproc.js as renderer?

For example, PKP's Open Journal System has a plugin that does this (it uses citeproc.php).

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpkp%2FcitationStyleLanguage&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=A%2B1praTEh8rwU%2F7XI69PiIRrCSmMV22NiB4Pa1myPPI%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpkp%2FcitationStyleLanguage&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=A%2B1praTEh8rwU%2F7XI69PiIRrCSmMV22NiB4Pa1myPPI%3D&amp;reserved=0>

You can see it in action here:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fejhc.org%2Farticle%2Fview%2F2584&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=NcEL%2FndPkHl9dKaTye%2FrvreROelIbC%2FsYZOQPWH%2FaaQ%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fejhc.org%2Farticle%2Fview%2F2584&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=NcEL%2FndPkHl9dKaTye%2FrvreROelIbC%2FsYZOQPWH%2FaaQ%3D&amp;reserved=0>   (under "How To Cite")


Kind regards,

Martin

--
Dr. Martin Br?ndle
Zentrale Informatik
Universit?t Z?rich
Stampfenbachstr. 73
CH-8006 Z?rich

mail: martin.braendle at uzh.ch<mailto:martin.braendle at uzh.ch>
phone: +41 44 63 56705
fax: +41 44 63 54505
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.zi.uzh.ch%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=m2DXoP0Dunf5irj2Nep45oXWm6EhTnREEZ9pPfMYtVE%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.zi.uzh.ch%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353364898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=m2DXoP0Dunf5irj2Nep45oXWm6EhTnREEZ9pPfMYtVE%3D&amp;reserved=0>

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2B84CTEmYyFliL8D9qbzdtTYiZdzCZG5Eakk79JAbasI%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2B84CTEmYyFliL8D9qbzdtTYiZdzCZG5Eakk79JAbasI%3D&amp;reserved=0>
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=UBNujjnRDKZgegLzWrF5%2F4jaN02sezfMdBN%2BA6FED94%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=UBNujjnRDKZgegLzWrF5%2F4jaN02sezfMdBN%2BA6FED94%3D&amp;reserved=0>[attachment "Unsupported File Types Alert.txt" deleted by Martin Br?ndle/at/UZH] *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2B84CTEmYyFliL8D9qbzdtTYiZdzCZG5Eakk79JAbasI%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2B84CTEmYyFliL8D9qbzdtTYiZdzCZG5Eakk79JAbasI%3D&amp;reserved=0>
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=UBNujjnRDKZgegLzWrF5%2F4jaN02sezfMdBN%2BA6FED94%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=UBNujjnRDKZgegLzWrF5%2F4jaN02sezfMdBN%2BA6FED94%3D&amp;reserved=0>




*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2B84CTEmYyFliL8D9qbzdtTYiZdzCZG5Eakk79JAbasI%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2B84CTEmYyFliL8D9qbzdtTYiZdzCZG5Eakk79JAbasI%3D&amp;reserved=0>
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=UBNujjnRDKZgegLzWrF5%2F4jaN02sezfMdBN%2BA6FED94%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=UBNujjnRDKZgegLzWrF5%2F4jaN02sezfMdBN%2BA6FED94%3D&amp;reserved=0>

[https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fipmcdn.avast.com%2Fimages%2Ficons%2Ficon-envelope-tick-green-avg-v1.png&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=6%2F%2Bg0Ob7QHDKhC%2FLk08a3xeGWOdkyRbv3YqLg7MgOO8%3D&amp;reserved=0]<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353374855%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=nRH1pxEUFSTZ3Q6hIkj6UEgOnTsEeLy5bFqTHuh6RYE%3D&amp;reserved=0>    Virus-free. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353384814%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Cu7jM%2FXrAkG0VchAqHu7jnLELVosSCbfOjrqyWa1fpw%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353384814%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=6hKatVkEQ5SwA35huaUFaJiWLaRJTgtjcgXzsh5EeT0%3D&amp;reserved=0>



*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353384814%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=bwMNR9bz6N2ujvgkLHslV3qMS79Dgy1YspnXFUS5ENk%3D&amp;reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ca1fff3d48fa24407e55908d98d83b16b%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637696420353384814%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=KAIAl3sJJ1iBVFmU%2FvZwBIFWGS57hBc1Vp6adCN0wAo%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20211012/d7d436d8/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20211012/d7d436d8/attachment-0001.gif 
-------------- next part --------------
=== insert in eprint_render ===

# Citation block
    my $div_citation = $repository->make_element('div', class => "rd_citation_right");
    $div_citation->appendChild($repository->make_element('script', src => '//code.jquery.com/jquery-1.12.4.js'));
    $div_citation->appendChild($repository->make_element('script', src => '//code.jquery.com/ui/1.12.0/jquery-ui.js'));
    $div_citation->appendChild($repository->make_element('script', src => '/javascript/citation.js'));
    #my $cittable =
    #  $repository->make_element(
    #                            "table",
    #                            border      => "0",
    #                            cellpadding => "2",
    #                            width       => "100%"
    #                           );
    my $citfrag = $repository->make_doc_fragment;
    my $citheading = $repository->make_element('h2', class => "file_list_heading", style=>"margin-bottom: 1em;");
    $citheading->appendChild($repository->make_text("Cite As"));
    $citfrag->appendChild($citheading);
    #$citfrag->appendChild($cittable );

    my $doitocite = $eprint->render_value("doi");
    my $citeform = $repository->make_element("form", action=>"",id=>"form", style=>"font-size: small;");

    #my $labelcite=$repository->make_element("label", for=>"doi");
    #$labelcite->appendChild($repository->make_text("This item DOI:"));
    my $inputdoi=$repository->make_element("input", id=>"doi", type=>"hidden", required=>"true", class=>"form-control", value=>$doitocite);
    #my $pdoi=$repository->make_element("p", class=>"help-block");
    #$pdoi->appendChild($repository->make_text($doitocite));
    my $labelformat = $repository->make_element("label", for=>"styles");
    $labelformat->appendChild($repository->make_text("Select Formatting Style:"));
    my $selectstyle = $repository->make_element("select", id=>"styles", class=>"form-control");
    my $phelp = $repository->make_element("p", class=>"help-block");
    $phelp->appendChild($repository->make_text("Begin typing (e.g. Chicago or IEEE.) or use the drop down menu."));
    my $labellocales = $repository->make_element("label", for=>"locales");
    $labellocales->appendChild($repository->make_text("Select Language and Country:"));
    my $selectlocales = $repository->make_element("select", id=>"locales", class=>"form-control");
    my $phelpselect = $repository->make_element("p", class=>"help-block");
    $phelpselect->appendChild($repository->make_text("Begin typing (e.g. en-GB for English, Great Britain) or use the drop down menu."));
    my $inputformat = $repository->make_element("input", type=>"submit", value=>"Format", class=>"btn-lg btn-default center-block", style=>"margin-bottom: 1em;");
    my $citationdiv = $repository->make_element("div", id=>"citation");
    #$citeform->appendChild($labelcite);
    $citeform->appendChild($inputdoi);
    #$citeform->appendChild($pdoi);
    $citeform->appendChild($labelformat);
    $citeform->appendChild($selectstyle);
    $citeform->appendChild($phelp);
    $citeform->appendChild($labellocales);
    $citeform->appendChild($selectlocales);
    $citeform->appendChild($phelpselect);
    $citeform->appendChild($inputformat);

    $citfrag->appendChild($citeform);
    $citfrag->appendChild($citationdiv);
    $div_citation->appendChild($citfrag);

    $fragments{citation} = $div_citation;
-------------- next part --------------

/* 
 * This javascript file will be loaded after all the system files.
 * (so other javascript functions will already be loaded)
 * 
 * Javascript files are loaded in alphabetic order, hence the "90" 
 * in the filename to force it to load after the other files!
 * 
 * To totally replace a system js file, create a file of the same 
 * name in this directory. eg. 50_preview.js
 * 
*/

var $j = jQuery.noConflict();

function init() {
	$j("#form").submit(submit);
	$j("#styles").loadSelect("https://citation.crosscite.org/styles/";).val("apa");
	$j("#locales").loadSelect("https://citation.crosscite.org/locales";).val("it-IT");
	$j("#styles").combobox();
	$j("#locales").combobox();

//	(new URL(window.location.href)).searchParams.forEach((x, y) =>
//		document.getElementById(y).value = x);

	new URL(window.location.href).searchParams.forEach(function (x, y) {
  	  return document.getElementById(y).value = x;
	});

	// TODO: there is an issue in order to get plain-text right-of-thebox in github https://github.com/zenorocha/clipboard.js/issues/299
	//$j("#citation_row").hide();
	$j("#copy_citation").hide();
}

$j.fn.loadSelect = function(url) {
	var select = $j(this);
	$j.getAsync(url, function(data) {
		data.sort();
		var options = arrayToSelectOptions(data);
		select.html(options);
	});
	return select;
};

$j.getAsync = function(url, success) {
	$j.ajax({
		url : url,
		async : false,
		success: success
	});
};

function arrayToSelectOptions(array) {
	var options = $j.map(array, function(elem) {
		return '<option value="' + elem + '">' + elem + '</option>';
	});
	return options.join("");
}

function submit() {
	$j("#citation_row").hide();
	var doi = $j("#doi").val().trim();
	$j.ajax({
		url : "https://citation.crosscite.org/format";,
		data : {
			doi : doi,
			style : $j("#styles").val(),
			lang : $j("#locales").val()
		},
		dataType : "text",
		success : function(data) {
			$j("#citation").text(data);
			$j("#citation_row").show();
		},
		error : function(jqXHR, textStatus, errorThrown) {
			$j("#citation_row").hide();
			alert(jqXHR.responseText);
		}
	});
	return false;
}


$j( function() {
	$j.widget( "custom.combobox", {
		_create: function() {
			this.wrapper = $j( "<span>" )
				.addClass( "custom-combobox" )
				.insertAfter( this.element );

			this.element.hide();
			this._createAutocomplete();
			this._createShowAllButton();
		},

		_createAutocomplete: function() {
			var selected = this.element.children( ":selected" ),
				value = selected.val() ? selected.text() : "";

			this.input = $j( "<input>" )
				.appendTo( this.wrapper )
				.val( value )
				.attr( "title", "" )
				.addClass( "custom-combobox-input ui-widget ui-widget-content ui-state-default ui-corner-left" )
				.autocomplete({
					delay: 0,
					minLength: 0,
					source: $j.proxy( this, "_source" )
				})
				.tooltip({
					classes: {
						"ui-tooltip": "ui-state-highlight"
					}
				});

			this._on( this.input, {
				autocompleteselect: function( event, ui ) {
					ui.item.option.selected = true;
					this._trigger( "select", event, {
						item: ui.item.option
					});
				},

				autocompletechange: "_removeIfInvalid"
			});
		},

		_createShowAllButton: function() {
			var input = this.input,
				wasOpen = false;

			$j( "<a>" )
				.attr( "tabIndex", -1 )
				.attr( "title", "Show All Items" )
				.tooltip()
				.appendTo( this.wrapper )
				.button({
					icons: {
						primary: "ui-icon-triangle-1-s"
					},
					text: false
				})
				.removeClass( "ui-corner-all" )
				.addClass( "custom-combobox-toggle ui-corner-right" )
				.on( "mousedown", function() {
					wasOpen = input.autocomplete( "widget" ).is( ":visible" );
				})
				.on( "click", function() {
					input.trigger( "focus" );

					// Close if already visible
					if ( wasOpen ) {
						return;
					}

					// Pass empty string as value to search for, displaying all results
					input.autocomplete( "search", "" );
				});
		},

		_source: function( request, response ) {
			var matcher = new RegExp( $j.ui.autocomplete.escapeRegex(request.term), "i" );
			response( this.element.children( "option" ).map(function() {
				var text = $j( this ).text();
				if ( this.value && ( !request.term || matcher.test(text) ) )
					return {
						label: text,
						value: text,
						option: this
					};
			}) );
		},

		_removeIfInvalid: function( event, ui ) {

			// Selected an item, nothing to do
			if ( ui.item ) {
				return;
			}

			// Search for a match (case-insensitive)
			var value = this.input.val(),
				valueLowerCase = value.toLowerCase(),
				valid = false;
			this.element.children( "option" ).each(function() {
				if ( $j( this ).text().toLowerCase() === valueLowerCase ) {
					this.selected = valid = true;
					return false;
				}
			});

			// Found a match, nothing to do
			if ( valid ) {
				return;
			}

			// Remove invalid value
			this.input
				.val( "" )
				.attr( "title", value + " didn't match any item" )
				.tooltip( "open" );
			this.element.val( "" );
			this._delay(function() {
				this.input.tooltip( "close" ).attr( "title", "" );
			}, 2500 );
			this.input.autocomplete( "instance" ).term = "";
		},

		_destroy: function() {
			this.wrapper.remove();
			this.element.show();
		}
	});

	$j( "#combobox" ).combobox();
	$j( "#toggle" ).on( "click", function() {
		$j( "#combobox" ).toggle();
	});
} );


$j(document).ready(init);