Hi All,
We've been doing some work for a GeoNetwork 3.10 customer to add
tracking links to related URLs in metadata records. I'm adding a class
and an id attribute to all related record URLs, where the id relates
to the type of link being clicked on. This works fine for links like
wms or wfs, as I can adjust the html code directly in (eg) en-search
json, https://github.com/geonetwork/core-geonetwork/blob/3.10.x/web-ui/src/main/resources/catalog/locales/en-search.json#L60
However for generic links the code is handled directly in
https://github.com/geonetwork/core-geonetwork/blob/3.10.x/web-ui/src/main/resources/catalog/components/metadataactions/partials/related.html#L176
I can pass linky a class and an id, using the form:
<span ng-bind-html="r.url | gnLocalized: lang |
linky:'_blank':{class:'relatedURL',id:'generic'}"></span>
However the id is not passed through. Having done some research this
appears to be fixed in a later version of AngularJS, but also possible
in earlier versions by adding the id to the Angular whitelist (see
https://github.com/textAngular/textAngular/issues/355). I don't know
which version of AngularJS we're using in GeoNetwork though.
Does this seem like the correct approach to you or is there a method
that doesn't involve making this change?
Is this the correct place to add it:
https://github.com/geonetwork/core-geonetwork/blob/3.10.x/web-ui/src/main/resources/catalog/lib/angular/angular-sanitize.js#L264
Are there likely to be any problems with adding it there?
Thanks
Jo
--
Jo Cook
t:+44 7930 524 155/twitter:@archaeogeek
Please note that currently I do not work on Friday afternoons. For
urgent responses at that time, please visit
support.astuntechnology.com or phone our office on 01372 744009
--
--
*Sign up to our mailing list
<https://astuntechnology.com/company/#email-updates> for updates on news,
products, conferences, events and training*
*
*
Astun Technology Ltd,
Epsom Square Centre, 6-7 The Derby Square, Epsom, Surrey, KT19 8AG, UK
t:+44 1372 744 009 w: astuntechnology.com <http://astuntechnology.com/>
twitter:@astuntech <https://twitter.com/astuntech>
iShare - enterprise
geographic intelligence platform <https://astuntechnology.com/ishare/>
GeoServer, PostGIS and QGIS training
<https://astuntechnology.com/training-courses/>
Helpdesk and customer
portal
<https://astuntech.atlassian.net/wiki/spaces/ISHAREHELP/pages/364970043/Astun+Technology+Support+Portal>
Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.