camptocamp/cgxp — pull request #120 by asaunier (2012-06-20 16:24:04+00:00)
Title: Moved metadata action handler into a dedicated method

This change allows to customize what happens when the user clicks on the metadataUrl action in the layertree nodes. The default behaviour is to open a new window.

If one wants to do something else (open an Ext.Window for instance), he may override the method or simply pass it in the "outputConfig" param of the layertree plugin in viewer.js. For instance:
```
{
ptype: "cgxp_layertree",
id: "layertree",
outputConfig: {
header: false,
flex: 1,
layout: "fit",
autoScroll: true,
themes: THEMES,
defaultThemes: ["Default"],
wmsURL: "${request.route_url('mapserverproxy', path='')}",
onMetadataAction: function(node) {
alert(node.attributes.metadataUrl)
},
wmsOptions: {
transitionEffect: "resize"
}
},
outputTarget: "layerpanel"
},
```