https://wiki.eagle-network.eu/wiki/api.php?action=feedcontributions&user=Perseids&feedformat=atom
EAGLE MediaWiki - User contributions [en]
2024-03-28T13:26:01Z
User contributions
MediaWiki 1.34.0
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=78084
Item:Q10353
2018-12-15T16:09:25Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P12: 1. (Hiermit ergeht der Beschluss, dass der Imperator Caesar Vespasian Augustus das Recht haben soll ⠦), und dass er berechtigt sein soll, mit wem immer er will Verträge zu schlieà en, ebenso wi...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=78083
Item:Q10353
2018-12-15T16:09:24Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P12: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=78082
Item:Q10353
2018-12-15T16:09:20Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P11: 1. [It is hereby enacted] that it shall be lawful for [Imperator Caesar Vespasian Augustus] to (…), and to conclude treaties with whomsoever he shall wish, as it was lawful for the deified Augustus,...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=78081
Item:Q10353
2018-12-15T16:09:19Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P11: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10340&diff=78080
Item:Q10340
2018-12-15T16:08:45Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: Pelagini. A Publio Fundanio Prisco, figlio di Publio della tribù Papiria, patrono del municipio, che ha adempiuto a tutti gli onori e gli oneri, patrono della città di Ascoli, il quale spesso si segn...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10340&diff=78079
Item:Q10340
2018-12-15T16:08:44Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11823&diff=78078
Item:Q11823
2018-12-15T16:07:59Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: A Caio Eggio Rufino che visse 45 anni. Caio Eggio Primulo fece per il fratello meritevole.</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11823&diff=78077
Item:Q11823
2018-12-15T16:07:58Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11803&diff=76796
Item:Q11803
2016-05-05T15:32:24Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: Qui giace Publius Cornelius Niger, figlio di Publius, della tribù Esquilina, (attore) di terze parti; il suo comportamento virtuoso non ha danneggiato nessuno. (Pose la dedica) da viva Cornelia Spatal...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11803&diff=76795
Item:Q11803
2016-05-05T15:32:23Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11802&diff=76793
Item:Q11802
2016-05-05T15:31:16Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: (Sacro) agli dei Mani. Quintus Caetronius Passer, figlio di Quintus, della tribù Publilia, soldato della terza coorte pretoria per 18 anni, congedato quando cadeva il consolato dei due Gemini, (pose q...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11802&diff=76792
Item:Q11802
2016-05-05T15:31:14Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11806&diff=76791
Item:Q11806
2016-05-05T15:30:03Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: Lucius Licinius Lucullus, figlio di Lucius, console, pretore, edile curule, questore, tribuno militare, augure. Trionfò su Mitridate re del Ponto e su Tigrane re di Armenia, una volta vinte le ingenti...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11806&diff=76790
Item:Q11806
2016-05-05T15:30:01Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11805&diff=76789
Item:Q11805
2016-05-05T15:28:51Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: Il tintore Amarantus e il portiere Philologus posero la dedica alla consorte Statilia Hilara, liberta di Tito. Che tu possa riposare serenamente, Hilara! Se gli Inferi hanno coscienza, tu ricordati di...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11805&diff=76788
Item:Q11805
2016-05-05T15:28:50Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11287&diff=73236
Item:Q11287
2015-12-14T10:59:43Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: Amor visse cinque anni. Qui è sepolta.</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11287&diff=73235
Item:Q11287
2015-12-14T10:59:42Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11280&diff=73188
Item:Q11280
2015-12-10T09:39:39Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: Il pedagogo Philargurus è sepolto qui.</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q11280&diff=73187
Item:Q11280
2015-12-10T09:39:37Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10315&diff=72916
Item:Q10315
2015-11-16T08:01:19Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: A Caius Lollius Benivolus liberto di Caius magistro Augustale quinquennale, gli eredi, secondo le disposizioni testamentarie. Prima di lui fu deposta in questo stesso luogo Pontia Deutera liberta di Ga...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10315&diff=72915
Item:Q10315
2015-11-16T08:01:18Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10315&diff=72914
Item:Q10315
2015-11-16T08:00:40Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: A Caius Lollius Benivolus liberto di Caius magistro Augustale quinquennale, gli eredi, secondo le disposizioni testamentarie. Prima di lui fu deposta in questo stesso luogo Pontia Deutera liberta di Ga...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10315&diff=72913
Item:Q10315
2015-11-16T08:00:39Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=72910
Item:Q10353
2015-11-13T09:45:24Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P12: 1. (Hiermit ergeht der Beschluss, dass der Imperator Caesar Vespasian Augustus das Recht haben soll ������), und dass er berechtigt sein soll, mit wem immer er will Vertr����ge zu s...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=72909
Item:Q10353
2015-11-13T09:45:23Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P12: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=72908
Item:Q10353
2015-11-13T09:45:20Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P11: 1. [It is hereby enacted] that it shall be lawful for [Imperator Caesar Vespasian Augustus] to (���), and to conclude treaties with whomsoever he shall wish, as it was lawful for the deified Augu...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=72907
Item:Q10353
2015-11-13T09:45:19Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P11: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=72906
Item:Q10353
2015-11-13T09:45:16Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P12: 1. (Hiermit ergeht der Beschluss, dass der Imperator Caesar Vespasian Augustus das Recht haben soll ������), und dass er berechtigt sein soll, mit wem immer er will Vertr����ge zu s...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=72905
Item:Q10353
2015-11-13T09:45:15Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P12: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=72904
Item:Q10353
2015-11-13T09:45:13Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P11: 1. [It is hereby enacted] that it shall be lawful for [Imperator Caesar Vespasian Augustus] to (���), and to conclude treaties with whomsoever he shall wish, as it was lawful for the deified Augu...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=72903
Item:Q10353
2015-11-13T09:45:12Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P11: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q7316&diff=72901
Item:Q7316
2015-11-13T09:23:44Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: Alle Madri. Il quartiere a restaurato dai propri soldi (...).</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q7316&diff=72900
Item:Q7316
2015-11-13T09:23:43Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=72899
Item:Q10353
2015-11-13T09:19:11Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P11: 1. [It is hereby enacted] that it shall be lawful for [Imperator Caesar Vespasian Augustus] to (���), and to conclude treaties with whomsoever he shall wish, as it was lawful for the deified Augu...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10353&diff=72898
Item:Q10353
2015-11-13T09:19:10Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P11: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10347&diff=72896
Item:Q10347
2015-11-13T09:09:28Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: Una figurazione migliore rinnova l���antico decoro, la fronte, restaurata, risplende dei meriti dei santi. Con la mano alzata l���Onnipotente allontana dalla citt�� pesti, guerre, fame,...</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10347&diff=72895
Item:Q10347
2015-11-13T09:09:27Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10316&diff=72894
Item:Q10316
2015-11-13T09:04:19Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P13: [---] Floridus [---] figlio di Marcus, duoviri curarono di far costruire a loro spese la realizzazione del mercato, delle botteghe e del portico per i coloni Firmani.</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q10316&diff=72893
Item:Q10316
2015-11-13T09:04:18Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P13: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=MediaWiki:Perseids-toolbar.js&diff=70547
MediaWiki:Perseids-toolbar.js
2015-08-07T18:03:16Z
<p>Perseids: </p>
<hr />
<div>// For each translation property, this function returns the translation language code.<br />
function langFromProperty(prop) {<br />
// prop: p1, p2, p13, ...<br />
// returns null if the property is not a translation<br />
<br />
var propToLang = {<br />
'p11': 'en',<br />
'p13': 'it',<br />
'p16': 'el',<br />
'p19': 'hu',<br />
'p14': 'es',<br />
'p17': 'ru',<br />
'p20': 'ro',<br />
'p57': 'hr',<br />
'p12': 'de',<br />
'p15': 'fr',<br />
'p18': 'si',<br />
'p61': 'se',<br />
};<br />
<br />
if (prop in propToLang)<br />
return propToLang[prop];<br />
else<br />
return null;<br />
}<br />
<br />
// Returns the name of the property, e.g. 'p59'<br />
function getAssociatedProperty(elem) {<br />
var theClass = elem.parents('.wb-claim-section').attr('class').split(' ')[1];<br />
return theClass.replace('wb-claim-section-', '');<br />
}<br />
<br />
// Returns claim ID<br />
function getAssociatedClaim(elem) {<br />
var claimClass = elem.parents('.wb-statement-claim').find('.wb-claim').attr('class').split(' ')[1];<br />
return claimClass.replace('wb-claim-', '');<br />
}<br />
<br />
// These functions generate and attach the buttons.<br />
<br />
function makeEditButton() {<br />
var itemId = wb.entity.getId();<br />
var claimId = getAssociatedClaim($(this));<br />
<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var editUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&filter=' + claimId;<br />
<br />
var editButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-edit',<br />
'href': editUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'edit in Perseids' );<br />
<br />
$(this).after(editButton);<br />
}<br />
<br />
function makeAddButton() {<br />
<br />
var itemId = wb.entity.getId();<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=' + langCode;<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'add via Perseids' );<br />
<br />
$(this).after(addButton);<br />
}<br />
<br />
function makeAddNewButton() {<br />
<br />
<br />
<br />
var itemId = wb.entity.getId();<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=REPLACE_LANG';<br />
<br />
var selectBox = $( '<select id="perseids_lang_select" name="perseids_lang_select" onchange="submit_addnew();" style="display:none;">' + <br />
'<option value="">Select a language</option>' + <br />
'<option value="hr">Croatian</option>' +<br />
'<option value="en">English</option>' + <br />
'<option value="fr">French</option>' + <br />
'<option value="de">German</option>' + <br />
'<option value="el">Greek (Modern)</option>' +<br />
'<option value="he">Hebrew</option>' + <br />
'<option value="hu">Hungarian</option>' +<br />
'<option value="it">Italian</option>' +<br />
'<option value="si">Slovenian</option>' + <br />
'<option value="es">Spanish</option>' + <br />
'<option value="se">Swedish</option>' +<br />
'<option value="ro">Romenian</option>' + <br />
'<option value="ru">Russian</option>' + <br />
'</select>');<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
'id': 'perseids-add-new',<br />
'onclick': 'return selectLanguage();'<br />
} )<br />
.before( '|' )<br />
.text( 'add new via Perseids' )<br />
.after(selectBox);<br />
<br />
$(this).after(addButton); <br />
}<br />
<br />
function selectLanguage() {<br />
$("#perseids_lang_select").show();<br />
return false;<br />
}<br />
<br />
function submit_addnew() {<br />
var lang = $("#perseids_lang_select").val();<br />
if (lang) {<br />
var addurl = $("#perseids-add-new").attr("href");<br />
$ ("#perseids-add-new").attr("href",addurl.replace('REPLACE_LANG',lang));<br />
window.location.replace($("#perseids-add-new").attr("href"));<br />
} else {<br />
$("#perseids-lang-select").hide();<br />
}<br />
}<br />
<br />
function makeSaveButton() {<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var saveButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-save',<br />
'href': 'javascript:void(0);'<br />
} )<br />
.before( '|' )<br />
.text( 'save to Perseids' );<br />
<br />
$(this).after(saveButton);<br />
}<br />
<br />
jQuery(document).ready(function() {<br />
// Only displays the buttons if the item has a Trismegistos ID.<br />
if($('.wb-claims .wb-claim-section-p3').length === 0 && $('.wb-claims .wb-claim-section-p69').length === 0 ) {<br />
return;<br />
}<br />
<br />
// Edit buttons<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
<br />
// Add buttons<br />
$( '.wb-claimlist .wb-claim-section > .wb-addtoolbar .wb-editsection a.wikibase-toolbarbutton:first-child')<br />
.each(makeAddButton);<br />
<br />
// Add new buttons<br />
<br />
$( '.wb-claimlist .wikibase-toolbar.wb-addtoolbar > .wb-editsection .wikibase-toolbar').last().each(makeAddNewButton);<br />
<br />
// When I click on "edit"...<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup .wikibase-toolbarbutton:first-child:not(.wikibase-toolbarbutton-disabled)' ).click(function () {<br />
// I make the "save to Perseids" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar:not(:has(.perseids-save)) .wikibase-toolbarbutton:first-child')<br />
.each(makeSaveButton);<br />
<br />
// Click on "undo": recreates "edit" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar .wikibase-toolbarbutton:last-child').click(function(){<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar:not(:has(.perseids-edit)) .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
});<br />
});<br />
});</div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=MediaWiki:Perseids-toolbar.js&diff=70545
MediaWiki:Perseids-toolbar.js
2015-08-07T18:00:18Z
<p>Perseids: </p>
<hr />
<div>// For each translation property, this function returns the translation language code.<br />
function langFromProperty(prop) {<br />
// prop: p1, p2, p13, ...<br />
// returns null if the property is not a translation<br />
<br />
var propToLang = {<br />
'p11': 'en',<br />
'p13': 'it',<br />
'p16': 'el',<br />
'p19': 'hu',<br />
'p14': 'es',<br />
'p17': 'ru',<br />
'p20': 'ro',<br />
'p57': 'hr',<br />
'p12': 'de',<br />
'p15': 'fr',<br />
'p18': 'si',<br />
'p61': 'se',<br />
};<br />
<br />
if (prop in propToLang)<br />
return propToLang[prop];<br />
else<br />
return null;<br />
}<br />
<br />
// Returns the name of the property, e.g. 'p59'<br />
function getAssociatedProperty(elem) {<br />
var theClass = elem.parents('.wb-claim-section').attr('class').split(' ')[1];<br />
return theClass.replace('wb-claim-section-', '');<br />
}<br />
<br />
// Returns claim ID<br />
function getAssociatedClaim(elem) {<br />
var claimClass = elem.parents('.wb-statement-claim').find('.wb-claim').attr('class').split(' ')[1];<br />
return claimClass.replace('wb-claim-', '');<br />
}<br />
<br />
// These functions generate and attach the buttons.<br />
<br />
function makeEditButton() {<br />
var itemId = wb.entity.getId();<br />
var claimId = getAssociatedClaim($(this));<br />
<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var editUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&filter=' + claimId;<br />
<br />
var editButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-edit',<br />
'href': editUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'edit in Perseids' );<br />
<br />
$(this).after(editButton);<br />
}<br />
<br />
function makeAddButton() {<br />
<br />
var itemId = wb.entity.getId();<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=' + langCode;<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'add via Perseids' );<br />
<br />
$(this).after(addButton);<br />
}<br />
<br />
function makeAddNewButton() {<br />
<br />
<br />
<br />
var itemId = wb.entity.getId();<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=REPLACE_LANG';<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
'id': 'perseids-add-new',<br />
'onclick': 'return selectLanguage();'<br />
} )<br />
.before( '|' )<br />
.text( 'add new via Perseids' );<br />
<br />
var selectBox = $( '<select id="perseids_lang_select" name="perseids_lang_select" onchange="submit_addnew();" style="display:none;">' + <br />
'<option value="">Select a language</option>' + <br />
'<option value="hr">Croatian</option>' +<br />
'<option value="en">English</option>' + <br />
'<option value="fr">French</option>' + <br />
'<option value="de">German</option>' + <br />
'<option value="el">Greek (Modern)</option>' +<br />
'<option value="he">Hebrew</option>' + <br />
'<option value="hu">Hungarian</option>' +<br />
'<option value="it">Italian</option>' +<br />
'<option value="si">Slovenian</option>' + <br />
'<option value="es">Spanish</option>' + <br />
'<option value="se">Swedish</option>' +<br />
'<option value="ro">Romenian</option>' + <br />
'<option value="ru">Russian</option>' + <br />
'</select>');<br />
$(this).after(addButton);<br />
$(addButton).after(selectBox);<br />
}<br />
<br />
function selectLanguage() {<br />
$("#perseids_lang_select").show();<br />
return false;<br />
}<br />
<br />
function submit_addnew() {<br />
var lang = $("#perseids_lang_select").val();<br />
if (lang) {<br />
var addurl = $("#perseids-add-new").attr("href");<br />
$ ("#perseids-add-new").attr("href",addurl.replace('REPLACE_LANG',lang));<br />
window.location.replace($("#perseids-add-new").attr("href"));<br />
} else {<br />
$("#perseids-lang-select").hide();<br />
}<br />
}<br />
<br />
function makeSaveButton() {<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var saveButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-save',<br />
'href': 'javascript:void(0);'<br />
} )<br />
.before( '|' )<br />
.text( 'save to Perseids' );<br />
<br />
$(this).after(saveButton);<br />
}<br />
<br />
jQuery(document).ready(function() {<br />
// Only displays the buttons if the item has a Trismegistos ID.<br />
if($('.wb-claims .wb-claim-section-p3').length === 0 && $('.wb-claims .wb-claim-section-p69').length === 0 ) {<br />
return;<br />
}<br />
<br />
// Edit buttons<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
<br />
// Add buttons<br />
$( '.wb-claimlist .wb-claim-section > .wb-addtoolbar .wb-editsection a.wikibase-toolbarbutton:first-child')<br />
.each(makeAddButton);<br />
<br />
// Add new buttons<br />
<br />
$( '.wb-claimlist .wikibase-toolbar.wb-addtoolbar > .wb-editsection .wikibase-toolbar').last().each(makeAddNewButton);<br />
<br />
// When I click on "edit"...<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup .wikibase-toolbarbutton:first-child:not(.wikibase-toolbarbutton-disabled)' ).click(function () {<br />
// I make the "save to Perseids" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar:not(:has(.perseids-save)) .wikibase-toolbarbutton:first-child')<br />
.each(makeSaveButton);<br />
<br />
// Click on "undo": recreates "edit" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar .wikibase-toolbarbutton:last-child').click(function(){<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar:not(:has(.perseids-edit)) .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
});<br />
});<br />
});</div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=MediaWiki:Perseids-toolbar.js&diff=70543
MediaWiki:Perseids-toolbar.js
2015-08-07T17:58:58Z
<p>Perseids: </p>
<hr />
<div>// For each translation property, this function returns the translation language code.<br />
function langFromProperty(prop) {<br />
// prop: p1, p2, p13, ...<br />
// returns null if the property is not a translation<br />
<br />
var propToLang = {<br />
'p11': 'en',<br />
'p13': 'it',<br />
'p16': 'el',<br />
'p19': 'hu',<br />
'p14': 'es',<br />
'p17': 'ru',<br />
'p20': 'ro',<br />
'p57': 'hr',<br />
'p12': 'de',<br />
'p15': 'fr',<br />
'p18': 'si',<br />
'p61': 'se',<br />
};<br />
<br />
if (prop in propToLang)<br />
return propToLang[prop];<br />
else<br />
return null;<br />
}<br />
<br />
// Returns the name of the property, e.g. 'p59'<br />
function getAssociatedProperty(elem) {<br />
var theClass = elem.parents('.wb-claim-section').attr('class').split(' ')[1];<br />
return theClass.replace('wb-claim-section-', '');<br />
}<br />
<br />
// Returns claim ID<br />
function getAssociatedClaim(elem) {<br />
var claimClass = elem.parents('.wb-statement-claim').find('.wb-claim').attr('class').split(' ')[1];<br />
return claimClass.replace('wb-claim-', '');<br />
}<br />
<br />
// These functions generate and attach the buttons.<br />
<br />
function makeEditButton() {<br />
var itemId = wb.entity.getId();<br />
var claimId = getAssociatedClaim($(this));<br />
<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var editUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&filter=' + claimId;<br />
<br />
var editButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-edit',<br />
'href': editUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'edit in Perseids' );<br />
<br />
$(this).after(editButton);<br />
}<br />
<br />
function makeAddButton() {<br />
<br />
var itemId = wb.entity.getId();<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=' + langCode;<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'add via Perseids' );<br />
<br />
$(this).after(addButton);<br />
}<br />
<br />
function makeAddNewButton() {<br />
<br />
<br />
<br />
var itemId = wb.entity.getId();<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=REPLACE_LANG';<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
'id': 'perseids-add-new',<br />
'onclick': 'return selectLanguage();'<br />
} )<br />
.before( '|' )<br />
.text( 'add new via Perseids' );<br />
<br />
var selectBox = $( '<select id="perseids_lang_select" name="perseids_lang_select" onchange="submit_addnew();" style="display:none; float:right; margin-left: 8em;">' + <br />
'<option value="">Select a language</option>' + <br />
'<option value="hr">Croatian</option>' +<br />
'<option value="en">English</option>' + <br />
'<option value="fr">French</option>' + <br />
'<option value="de">German</option>' + <br />
'<option value="el">Greek (Modern)</option>' +<br />
'<option value="he">Hebrew</option>' + <br />
'<option value="hu">Hungarian</option>' +<br />
'<option value="it">Italian</option>' +<br />
'<option value="si">Slovenian</option>' + <br />
'<option value="es">Spanish</option>' + <br />
'<option value="se">Swedish</option>' +<br />
'<option value="ro">Romenian</option>' + <br />
'<option value="ru">Russian</option>' + <br />
'</select>');<br />
$(this).after(addButton);<br />
$(addButton).after(selectBox);<br />
}<br />
<br />
function selectLanguage() {<br />
$("#perseids_lang_select").show();<br />
return false;<br />
}<br />
<br />
function submit_addnew() {<br />
var lang = $("#perseids_lang_select").val();<br />
if (lang) {<br />
var addurl = $("#perseids-add-new").attr("href");<br />
$ ("#perseids-add-new").attr("href",addurl.replace('REPLACE_LANG',lang));<br />
window.location.replace($("#perseids-add-new").attr("href"));<br />
} else {<br />
$("#perseids-lang-select").hide();<br />
}<br />
}<br />
<br />
function makeSaveButton() {<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var saveButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-save',<br />
'href': 'javascript:void(0);'<br />
} )<br />
.before( '|' )<br />
.text( 'save to Perseids' );<br />
<br />
$(this).after(saveButton);<br />
}<br />
<br />
jQuery(document).ready(function() {<br />
// Only displays the buttons if the item has a Trismegistos ID.<br />
if($('.wb-claims .wb-claim-section-p3').length === 0 && $('.wb-claims .wb-claim-section-p69').length === 0 ) {<br />
return;<br />
}<br />
<br />
// Edit buttons<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
<br />
// Add buttons<br />
$( '.wb-claimlist .wb-claim-section > .wb-addtoolbar .wb-editsection a.wikibase-toolbarbutton:first-child')<br />
.each(makeAddButton);<br />
<br />
// Add new buttons<br />
<br />
$( '.wb-claimlist .wikibase-toolbar.wb-addtoolbar > .wb-editsection .wikibase-toolbar').last().each(makeAddNewButton);<br />
<br />
// When I click on "edit"...<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup .wikibase-toolbarbutton:first-child:not(.wikibase-toolbarbutton-disabled)' ).click(function () {<br />
// I make the "save to Perseids" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar:not(:has(.perseids-save)) .wikibase-toolbarbutton:first-child')<br />
.each(makeSaveButton);<br />
<br />
// Click on "undo": recreates "edit" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar .wikibase-toolbarbutton:last-child').click(function(){<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar:not(:has(.perseids-edit)) .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
});<br />
});<br />
});</div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q1944&diff=70539
Item:Q1944
2015-08-07T17:45:03Z
<p>Perseids: /* wbsetclaim-update:1||1 */Property:P57: test</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=Item:Q1944&diff=70538
Item:Q1944
2015-08-07T17:45:01Z
<p>Perseids: /* wbcreateclaim-create:1| */Property:P57: somevalue</p>
<hr />
<div></div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=MediaWiki:Perseids-toolbar.js&diff=70537
MediaWiki:Perseids-toolbar.js
2015-08-07T17:41:27Z
<p>Perseids: </p>
<hr />
<div>// For each translation property, this function returns the translation language code.<br />
function langFromProperty(prop) {<br />
// prop: p1, p2, p13, ...<br />
// returns null if the property is not a translation<br />
<br />
var propToLang = {<br />
'p11': 'en',<br />
'p13': 'it',<br />
'p16': 'el',<br />
'p19': 'hu',<br />
'p14': 'es',<br />
'p17': 'ru',<br />
'p20': 'ro',<br />
'p57': 'hr',<br />
'p12': 'de',<br />
'p15': 'fr',<br />
'p18': 'si',<br />
'p61': 'se',<br />
};<br />
<br />
if (prop in propToLang)<br />
return propToLang[prop];<br />
else<br />
return null;<br />
}<br />
<br />
// Returns the name of the property, e.g. 'p59'<br />
function getAssociatedProperty(elem) {<br />
var theClass = elem.parents('.wb-claim-section').attr('class').split(' ')[1];<br />
return theClass.replace('wb-claim-section-', '');<br />
}<br />
<br />
// Returns claim ID<br />
function getAssociatedClaim(elem) {<br />
var claimClass = elem.parents('.wb-statement-claim').find('.wb-claim').attr('class').split(' ')[1];<br />
return claimClass.replace('wb-claim-', '');<br />
}<br />
<br />
// These functions generate and attach the buttons.<br />
<br />
function makeEditButton() {<br />
var itemId = wb.entity.getId();<br />
var claimId = getAssociatedClaim($(this));<br />
<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var editUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&filter=' + claimId;<br />
<br />
var editButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-edit',<br />
'href': editUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'edit in Perseids' );<br />
<br />
$(this).after(editButton);<br />
}<br />
<br />
function makeAddButton() {<br />
<br />
var itemId = wb.entity.getId();<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=' + langCode;<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'add via Perseids' );<br />
<br />
$(this).after(addButton);<br />
}<br />
<br />
function makeAddNewButton() {<br />
<br />
<br />
<br />
var itemId = wb.entity.getId();<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=REPLACE_LANG';<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
'id': 'perseids-add-new',<br />
'onclick': 'return selectLanguage();'<br />
} )<br />
.before( '|' )<br />
.text( 'add new via Perseids' );<br />
<br />
var selectBox = $( '<select id="perseids_lang_select" name="perseids_lang_select" onchange="submit_addnew();" style="display:none; float:right; margin-left: 8em;">' + <br />
'<option value="">Select a language</option>' + <br />
'<option value="hr">Croatian</option>' +<br />
'<option value="en">English</option>' + <br />
'<option value="fr">French</option>' + <br />
'<option value="de">German</option>' + <br />
'<option value="el">Greek (Modern)</option>' +<br />
'<option value="he">Hebrew</option>' + <br />
'<option value="hu">Hungarian</option>' +<br />
'<option value="it">Italian</option>' +<br />
'<option value="si">Slovenian</option>' + <br />
'<option value="es">Spanish</option>' + <br />
'<option value="se">Swedish</option>' +<br />
'<option value="ro">Romenian</option>' + <br />
'<option value="ru">Russian</option>' + <br />
'</select>');<br />
$(this).after(addButton).after(selectBox);<br />
}<br />
<br />
function selectLanguage() {<br />
$("#perseids_lang_select").show();<br />
return false;<br />
}<br />
<br />
function submit_addnew() {<br />
var lang = $("#perseids_lang_select").val();<br />
if (lang) {<br />
var addurl = $("#perseids-add-new").attr("href");<br />
$ ("#perseids-add-new").attr("href",addurl.replace('REPLACE_LANG',lang));<br />
window.location.replace($("#perseids-add-new").attr("href"));<br />
} else {<br />
$("#perseids-lang-select").hide();<br />
}<br />
}<br />
<br />
function makeSaveButton() {<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var saveButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-save',<br />
'href': 'javascript:void(0);'<br />
} )<br />
.before( '|' )<br />
.text( 'save to Perseids' );<br />
<br />
$(this).after(saveButton);<br />
}<br />
<br />
jQuery(document).ready(function() {<br />
// Only displays the buttons if the item has a Trismegistos ID.<br />
if($('.wb-claims .wb-claim-section-p3').length === 0 && $('.wb-claims .wb-claim-section-p69').length === 0 ) {<br />
return;<br />
}<br />
<br />
// Edit buttons<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
<br />
// Add buttons<br />
$( '.wb-claimlist .wb-claim-section > .wb-addtoolbar .wb-editsection a.wikibase-toolbarbutton:first-child')<br />
.each(makeAddButton);<br />
<br />
// Add new buttons<br />
<br />
$( '.wb-claimlist .wikibase-toolbar.wb-addtoolbar > .wb-editsection .wikibase-toolbar').last().each(makeAddNewButton);<br />
<br />
// When I click on "edit"...<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup .wikibase-toolbarbutton:first-child:not(.wikibase-toolbarbutton-disabled)' ).click(function () {<br />
// I make the "save to Perseids" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar:not(:has(.perseids-save)) .wikibase-toolbarbutton:first-child')<br />
.each(makeSaveButton);<br />
<br />
// Click on "undo": recreates "edit" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar .wikibase-toolbarbutton:last-child').click(function(){<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar:not(:has(.perseids-edit)) .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
});<br />
});<br />
});</div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=MediaWiki:Perseids-toolbar.js&diff=70536
MediaWiki:Perseids-toolbar.js
2015-08-07T17:34:49Z
<p>Perseids: </p>
<hr />
<div>// For each translation property, this function returns the translation language code.<br />
function langFromProperty(prop) {<br />
// prop: p1, p2, p13, ...<br />
// returns null if the property is not a translation<br />
<br />
var propToLang = {<br />
'p11': 'en',<br />
'p13': 'it',<br />
'p16': 'el',<br />
'p19': 'hu',<br />
'p14': 'es',<br />
'p17': 'ru',<br />
'p20': 'ro',<br />
'p57': 'hr',<br />
'p12': 'de',<br />
'p15': 'fr',<br />
'p18': 'si',<br />
'p61': 'se',<br />
};<br />
<br />
if (prop in propToLang)<br />
return propToLang[prop];<br />
else<br />
return null;<br />
}<br />
<br />
// Returns the name of the property, e.g. 'p59'<br />
function getAssociatedProperty(elem) {<br />
var theClass = elem.parents('.wb-claim-section').attr('class').split(' ')[1];<br />
return theClass.replace('wb-claim-section-', '');<br />
}<br />
<br />
// Returns claim ID<br />
function getAssociatedClaim(elem) {<br />
var claimClass = elem.parents('.wb-statement-claim').find('.wb-claim').attr('class').split(' ')[1];<br />
return claimClass.replace('wb-claim-', '');<br />
}<br />
<br />
// These functions generate and attach the buttons.<br />
<br />
function makeEditButton() {<br />
var itemId = wb.entity.getId();<br />
var claimId = getAssociatedClaim($(this));<br />
<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var editUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&filter=' + claimId;<br />
<br />
var editButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-edit',<br />
'href': editUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'edit in Perseids' );<br />
<br />
$(this).after(editButton);<br />
}<br />
<br />
function makeAddButton() {<br />
<br />
var itemId = wb.entity.getId();<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=' + langCode;<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'add via Perseids' );<br />
<br />
$(this).after(addButton);<br />
}<br />
<br />
function makeAddNewButton() {<br />
<br />
<br />
<br />
var itemId = wb.entity.getId();<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=REPLACE_LANG';<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
'id': 'perseids-add-new',<br />
'onclick': 'return selectLanguage();'<br />
} )<br />
.before( '|' )<br />
.text( 'add new via Perseids' );<br />
<br />
var selectBox = $( '<select id="perseids_lang_select" name="perseids_lang_select" onchange="submit_addnew();" style="display:none; float:right;">' + <br />
'<option value=““>Select a language</option>' + <br />
'<option value=“hr”>Croatian</option>' +<br />
'<option value=“en”>English</option>' + <br />
'<option value=“fr”>French</option>' + <br />
'<option value=“de”>German</option>' + <br />
'<option value=“el”>Greek (Modern)</option>' +<br />
'<option value=“he”>Hebrew</option>' + <br />
'<option value=“hu”>Hungarian</option>' +<br />
'<option value="it">Italian</option>' +<br />
'<option value=“si”>Slovenian</option>' + <br />
'<option value=“es”>Spanish</option>' + <br />
'<option value=“se”>Swedish</option>' +<br />
'<option value=“ro”>Romenian</option>' + <br />
'<option value=“ru”>Russian</option>' + <br />
'</select>');<br />
$(this).after(addButton).after(selectBox);<br />
}<br />
<br />
function selectLanguage() {<br />
$("#perseids_lang_select").show();<br />
return false;<br />
}<br />
<br />
function submit_addnew() {<br />
var lang = $("#perseids_lang_select").val();<br />
if (lang) {<br />
var addurl = $("#perseids-add-new").attr("href");<br />
$ ("#perseids-add-new").attr("href",addurl.replace('REPLACE_LANG',lang));<br />
window.location.replace($("#perseids-add-new").attr("href"));<br />
} else {<br />
$("#perseids-lang-select").hide();<br />
}<br />
}<br />
<br />
function makeSaveButton() {<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var saveButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-save',<br />
'href': 'javascript:void(0);'<br />
} )<br />
.before( '|' )<br />
.text( 'save to Perseids' );<br />
<br />
$(this).after(saveButton);<br />
}<br />
<br />
jQuery(document).ready(function() {<br />
// Only displays the buttons if the item has a Trismegistos ID.<br />
if($('.wb-claims .wb-claim-section-p3').length === 0 && $('.wb-claims .wb-claim-section-p69').length === 0 ) {<br />
return;<br />
}<br />
<br />
// Edit buttons<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
<br />
// Add buttons<br />
$( '.wb-claimlist .wb-claim-section > .wb-addtoolbar .wb-editsection a.wikibase-toolbarbutton:first-child')<br />
.each(makeAddButton);<br />
<br />
// Add new buttons<br />
<br />
$( '.wb-claimlist .wikibase-toolbar.wb-addtoolbar > .wb-editsection .wikibase-toolbar').last().each(makeAddNewButton);<br />
<br />
// When I click on "edit"...<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup .wikibase-toolbarbutton:first-child:not(.wikibase-toolbarbutton-disabled)' ).click(function () {<br />
// I make the "save to Perseids" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar:not(:has(.perseids-save)) .wikibase-toolbarbutton:first-child')<br />
.each(makeSaveButton);<br />
<br />
// Click on "undo": recreates "edit" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar .wikibase-toolbarbutton:last-child').click(function(){<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar:not(:has(.perseids-edit)) .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
});<br />
});<br />
});</div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=MediaWiki:Perseids-toolbar.js&diff=70534
MediaWiki:Perseids-toolbar.js
2015-08-07T17:31:13Z
<p>Perseids: </p>
<hr />
<div>// For each translation property, this function returns the translation language code.<br />
function langFromProperty(prop) {<br />
// prop: p1, p2, p13, ...<br />
// returns null if the property is not a translation<br />
<br />
var propToLang = {<br />
'p11': 'en',<br />
'p13': 'it',<br />
'p16': 'el',<br />
'p19': 'hu',<br />
'p14': 'es',<br />
'p17': 'ru',<br />
'p20': 'ro',<br />
'p57': 'hr',<br />
'p12': 'de',<br />
'p15': 'fr',<br />
'p18': 'si',<br />
'p61': 'se',<br />
};<br />
<br />
if (prop in propToLang)<br />
return propToLang[prop];<br />
else<br />
return null;<br />
}<br />
<br />
// Returns the name of the property, e.g. 'p59'<br />
function getAssociatedProperty(elem) {<br />
var theClass = elem.parents('.wb-claim-section').attr('class').split(' ')[1];<br />
return theClass.replace('wb-claim-section-', '');<br />
}<br />
<br />
// Returns claim ID<br />
function getAssociatedClaim(elem) {<br />
var claimClass = elem.parents('.wb-statement-claim').find('.wb-claim').attr('class').split(' ')[1];<br />
return claimClass.replace('wb-claim-', '');<br />
}<br />
<br />
// These functions generate and attach the buttons.<br />
<br />
function makeEditButton() {<br />
var itemId = wb.entity.getId();<br />
var claimId = getAssociatedClaim($(this));<br />
<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var editUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&filter=' + claimId;<br />
<br />
var editButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-edit',<br />
'href': editUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'edit in Perseids' );<br />
<br />
$(this).after(editButton);<br />
}<br />
<br />
function makeAddButton() {<br />
<br />
var itemId = wb.entity.getId();<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=' + langCode;<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'add via Perseids' );<br />
<br />
$(this).after(addButton);<br />
}<br />
<br />
function makeAddNewButton() {<br />
<br />
<br />
<br />
var itemId = wb.entity.getId();<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=REPLACE_LANG';<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'style' :'float:right;',<br />
'href': addUrl,<br />
'id': 'perseids-add-new',<br />
'onclick': 'return selectLanguage();'<br />
} )<br />
.before( '|' )<br />
.text( 'add new via Perseids' );<br />
<br />
var selectBox = $( '<select id="perseids_lang_select" name="perseids_lang_select" onchange="submit_addnew();" style="display:none;">' + <br />
'<option value="en">English</option>' + <br />
'<option value="it">Italian</option>' + <br />
'</select>');<br />
$(this).after(addButton).after(selectBox);<br />
}<br />
<br />
function selectLanguage() {<br />
$("#perseids_lang_select").show();<br />
return false;<br />
}<br />
<br />
function submit_addnew() {<br />
var lang = $("#perseids_lang_select").val();<br />
if (lang) {<br />
var addurl = $("#perseids-add-new").attr("href");<br />
$ ("#perseids-add-new").attr("href",addurl.replace('REPLACE_LANG',lang));<br />
window.location($("#perseids-add-new").attr("href"));<br />
} else {<br />
$("#perseids-lang-select").hide();<br />
}<br />
}<br />
<br />
function makeSaveButton() {<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var saveButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-save',<br />
'href': 'javascript:void(0);'<br />
} )<br />
.before( '|' )<br />
.text( 'save to Perseids' );<br />
<br />
$(this).after(saveButton);<br />
}<br />
<br />
jQuery(document).ready(function() {<br />
// Only displays the buttons if the item has a Trismegistos ID.<br />
if($('.wb-claims .wb-claim-section-p3').length === 0 && $('.wb-claims .wb-claim-section-p69').length === 0 ) {<br />
return;<br />
}<br />
<br />
// Edit buttons<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
<br />
// Add buttons<br />
$( '.wb-claimlist .wb-claim-section > .wb-addtoolbar .wb-editsection a.wikibase-toolbarbutton:first-child')<br />
.each(makeAddButton);<br />
<br />
// Add new buttons<br />
<br />
$( '.wb-claimlist .wikibase-toolbar.wb-addtoolbar > .wb-editsection .wikibase-toolbar').last().each(makeAddNewButton);<br />
<br />
// When I click on "edit"...<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup .wikibase-toolbarbutton:first-child:not(.wikibase-toolbarbutton-disabled)' ).click(function () {<br />
// I make the "save to Perseids" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar:not(:has(.perseids-save)) .wikibase-toolbarbutton:first-child')<br />
.each(makeSaveButton);<br />
<br />
// Click on "undo": recreates "edit" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar .wikibase-toolbarbutton:last-child').click(function(){<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar:not(:has(.perseids-edit)) .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
});<br />
});<br />
});</div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=MediaWiki:Perseids-toolbar.js&diff=70533
MediaWiki:Perseids-toolbar.js
2015-08-07T17:25:14Z
<p>Perseids: </p>
<hr />
<div>// For each translation property, this function returns the translation language code.<br />
function langFromProperty(prop) {<br />
// prop: p1, p2, p13, ...<br />
// returns null if the property is not a translation<br />
<br />
var propToLang = {<br />
'p11': 'en',<br />
'p13': 'it',<br />
'p16': 'el',<br />
'p19': 'hu',<br />
'p14': 'es',<br />
'p17': 'ru',<br />
'p20': 'ro',<br />
'p57': 'hr',<br />
'p12': 'de',<br />
'p15': 'fr',<br />
'p18': 'si',<br />
'p61': 'se',<br />
};<br />
<br />
if (prop in propToLang)<br />
return propToLang[prop];<br />
else<br />
return null;<br />
}<br />
<br />
// Returns the name of the property, e.g. 'p59'<br />
function getAssociatedProperty(elem) {<br />
var theClass = elem.parents('.wb-claim-section').attr('class').split(' ')[1];<br />
return theClass.replace('wb-claim-section-', '');<br />
}<br />
<br />
// Returns claim ID<br />
function getAssociatedClaim(elem) {<br />
var claimClass = elem.parents('.wb-statement-claim').find('.wb-claim').attr('class').split(' ')[1];<br />
return claimClass.replace('wb-claim-', '');<br />
}<br />
<br />
// These functions generate and attach the buttons.<br />
<br />
function makeEditButton() {<br />
var itemId = wb.entity.getId();<br />
var claimId = getAssociatedClaim($(this));<br />
<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var editUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&filter=' + claimId;<br />
<br />
var editButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-edit',<br />
'href': editUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'edit in Perseids' );<br />
<br />
$(this).after(editButton);<br />
}<br />
<br />
function makeAddButton() {<br />
<br />
var itemId = wb.entity.getId();<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=' + langCode;<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'add via Perseids' );<br />
<br />
$(this).after(addButton);<br />
}<br />
<br />
function makeAddNewButton() {<br />
<br />
<br />
<br />
var itemId = wb.entity.getId();<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=REPLACE_LANG';<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
'id': 'perseids-add-new',<br />
'onclick': 'return selectLanguage();'<br />
} )<br />
.before( '|' )<br />
.text( 'add new via Perseids' );<br />
<br />
var selectBox = $( '<select id="perseids_lang_select" name="perseids_lang_select" onchange="submit_addnew();" style="display:none;">' + <br />
'<option value="en">English</option>' + <br />
'<option value="it">Italian</option>' + <br />
'</select>');<br />
$(this).after(addButton).after(selectBox);<br />
}<br />
<br />
function selectLanguage() {<br />
$("#perseids_lang_select").show();<br />
return false;<br />
}<br />
<br />
function submit_addnew() {<br />
var lang = $("#perseids_lang_select").val();<br />
var addurl = $("#perseids-add-new").attr("href");<br />
$("#perseids-add-new").attr("href",addurl.replace('REPLACE_LANG',lang));<br />
alert($("#perseids-add-new").attr("href"));<br />
}<br />
<br />
function makeSaveButton() {<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var saveButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-save',<br />
'href': 'javascript:void(0);'<br />
} )<br />
.before( '|' )<br />
.text( 'save to Perseids' );<br />
<br />
$(this).after(saveButton);<br />
}<br />
<br />
jQuery(document).ready(function() {<br />
// Only displays the buttons if the item has a Trismegistos ID.<br />
if($('.wb-claims .wb-claim-section-p3').length === 0 && $('.wb-claims .wb-claim-section-p69').length === 0 ) {<br />
return;<br />
}<br />
<br />
// Edit buttons<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
<br />
// Add buttons<br />
$( '.wb-claimlist .wb-claim-section > .wb-addtoolbar .wb-editsection a.wikibase-toolbarbutton:first-child')<br />
.each(makeAddButton);<br />
<br />
// Add new buttons<br />
<br />
$( '.wb-claimlist .wikibase-toolbar.wb-addtoolbar > .wb-editsection .wikibase-toolbar').last().each(makeAddNewButton);<br />
<br />
// When I click on "edit"...<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup .wikibase-toolbarbutton:first-child:not(.wikibase-toolbarbutton-disabled)' ).click(function () {<br />
// I make the "save to Perseids" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar:not(:has(.perseids-save)) .wikibase-toolbarbutton:first-child')<br />
.each(makeSaveButton);<br />
<br />
// Click on "undo": recreates "edit" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar .wikibase-toolbarbutton:last-child').click(function(){<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar:not(:has(.perseids-edit)) .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
});<br />
});<br />
});</div>
Perseids
https://wiki.eagle-network.eu/wiki/index.php?title=MediaWiki:Perseids-toolbar.js&diff=70532
MediaWiki:Perseids-toolbar.js
2015-08-07T17:23:03Z
<p>Perseids: </p>
<hr />
<div>// For each translation property, this function returns the translation language code.<br />
function langFromProperty(prop) {<br />
// prop: p1, p2, p13, ...<br />
// returns null if the property is not a translation<br />
<br />
var propToLang = {<br />
'p11': 'en',<br />
'p13': 'it',<br />
'p16': 'el',<br />
'p19': 'hu',<br />
'p14': 'es',<br />
'p17': 'ru',<br />
'p20': 'ro',<br />
'p57': 'hr',<br />
'p12': 'de',<br />
'p15': 'fr',<br />
'p18': 'si',<br />
'p61': 'se',<br />
};<br />
<br />
if (prop in propToLang)<br />
return propToLang[prop];<br />
else<br />
return null;<br />
}<br />
<br />
// Returns the name of the property, e.g. 'p59'<br />
function getAssociatedProperty(elem) {<br />
var theClass = elem.parents('.wb-claim-section').attr('class').split(' ')[1];<br />
return theClass.replace('wb-claim-section-', '');<br />
}<br />
<br />
// Returns claim ID<br />
function getAssociatedClaim(elem) {<br />
var claimClass = elem.parents('.wb-statement-claim').find('.wb-claim').attr('class').split(' ')[1];<br />
return claimClass.replace('wb-claim-', '');<br />
}<br />
<br />
// These functions generate and attach the buttons.<br />
<br />
function makeEditButton() {<br />
var itemId = wb.entity.getId();<br />
var claimId = getAssociatedClaim($(this));<br />
<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var editUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&filter=' + claimId;<br />
<br />
var editButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-edit',<br />
'href': editUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'edit in Perseids' );<br />
<br />
$(this).after(editButton);<br />
}<br />
<br />
function makeAddButton() {<br />
<br />
var itemId = wb.entity.getId();<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=' + langCode;<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
} )<br />
.before( '|' )<br />
.text( 'add via Perseids' );<br />
<br />
$(this).after(addButton);<br />
}<br />
<br />
function makeAddNewButton() {<br />
<br />
<br />
<br />
var itemId = wb.entity.getId();<br />
<br />
var addUrl = 'http://sosol.perseids.org/sosol/cts_publications/create_from_agent?agent='<br />
+ 'http://www.eagle-network.eu&id=' + itemId + '&lang=REPLACE_LANG';<br />
<br />
var addButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-add',<br />
'href': addUrl,<br />
'id': 'perseids-add-new',<br />
'onclick': 'return selectLanguage();'<br />
} )<br />
.before( '|' )<br />
.text( 'add new via Perseids' );<br />
<br />
var selectBox = $( '<select id="perseids_lang_select" name="perseids_lang_select" onchange="submit_addnew" display="none;">' + <br />
'<option value="en">English</option>' + <br />
'<option value="it">Italian</option>' + <br />
'</select>');<br />
$(this).after(addButton).after(selectBox);<br />
}<br />
<br />
function selectLanguage() {<br />
$("#perseids_lang_select").show();<br />
return false;<br />
}<br />
<br />
function submit_addnew() {<br />
var lang = $("#perseids_lang_select").val();<br />
var addurl = $("#perseids-add-new").attr("href");<br />
$("#perseids-add-new").attr("href",addurl.replace('REPLACE_LANG',lang));<br />
alert($("#perseids-add-new").attr("href"));<br />
}<br />
<br />
function makeSaveButton() {<br />
var langProp = getAssociatedProperty($(this));<br />
var langCode = langFromProperty(langProp);<br />
<br />
if(!langCode) // only for translation claims<br />
return;<br />
<br />
var saveButton = $( '<a>' )<br />
.attr( {<br />
'class': 'wikibase-toolbarbutton perseids-save',<br />
'href': 'javascript:void(0);'<br />
} )<br />
.before( '|' )<br />
.text( 'save to Perseids' );<br />
<br />
$(this).after(saveButton);<br />
}<br />
<br />
jQuery(document).ready(function() {<br />
// Only displays the buttons if the item has a Trismegistos ID.<br />
if($('.wb-claims .wb-claim-section-p3').length === 0 && $('.wb-claims .wb-claim-section-p69').length === 0 ) {<br />
return;<br />
}<br />
<br />
// Edit buttons<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
<br />
// Add buttons<br />
$( '.wb-claimlist .wb-claim-section > .wb-addtoolbar .wb-editsection a.wikibase-toolbarbutton:first-child')<br />
.each(makeAddButton);<br />
<br />
// Add new buttons<br />
<br />
$( '.wb-claimlist .wikibase-toolbar.wb-addtoolbar > .wb-editsection .wikibase-toolbar').last().each(makeAddNewButton);<br />
<br />
// When I click on "edit"...<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup .wikibase-toolbarbutton:first-child:not(.wikibase-toolbarbutton-disabled)' ).click(function () {<br />
// I make the "save to Perseids" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar:not(:has(.perseids-save)) .wikibase-toolbarbutton:first-child')<br />
.each(makeSaveButton);<br />
<br />
// Click on "undo": recreates "edit" button<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-ineditmode .wikibase-toolbar .wikibase-toolbarbutton:last-child').click(function(){<br />
$( '.wb-claimlist .wb-statement-claim .wikibase-toolbareditgroup-innoneditmode .wikibase-toolbar:not(:has(.perseids-edit)) .wikibase-toolbarbutton:first-child' )<br />
.each(makeEditButton);<br />
});<br />
});<br />
});</div>
Perseids