diff --git a/components/VFBMain.js b/components/VFBMain.js index cb97fe53e..186909bb8 100644 --- a/components/VFBMain.js +++ b/components/VFBMain.js @@ -1194,6 +1194,7 @@ class VFBMain extends React.Component { window.setTermInfo = function (meta, id) { this.handlerInstanceUpdate(meta); + this.props.setTermInfo(meta, true); }.bind(this); window.fetchVariableThenRun = function (idsList, cb, label) { diff --git a/components/configuration/VFBListViewer/listViewerConfiguration.js b/components/configuration/VFBListViewer/listViewerConfiguration.js index e4291aa27..8fd20ff94 100644 --- a/components/configuration/VFBListViewer/listViewerConfiguration.js +++ b/components/configuration/VFBListViewer/listViewerConfiguration.js @@ -36,10 +36,24 @@ const conf = [ { id: "name", title: "Name", - source : entity => { - let path = entity.path.split(".")[0]; - return Instances.getInstance(path).getName(); - } + customComponent: component => { + // Retrieve instance path + let path = component.value.get("path").split(".")[0]; + + let instance = Instances.getInstance(path); + var self = this; + + let click = value => { + let instance = Instances.getInstance(value.target.id); + window.setTermInfo(Instances.getInstance(path)[path + "_meta"], path); + }; + // Create new HTML string with the Type name and tags only + let typeHTML = '' + instance.getName() + "" ; + + // Set HTML string inside div ready for React + return
click(e)} dangerouslySetInnerHTML={{ __html: typeHTML }} /> + }, + source : entity => entity }, { id: "type", @@ -67,8 +81,10 @@ const conf = [ var matchSpan = /]*>([\s\S]*?)<\/span>/g , tags = html.match(matchSpan); + // Make anchor open in new tab, and fix path by adding 'geppetto?' to href + let textContent = type.join().replace('href="?', 'target="_blank" href="geppetto?'); // Create new HTML string with the Type name and tags only - let typeHTML = "
" + type.join('') + tags.join('') + "
" ; + let typeHTML = "
" + textContent + tags.join('') + "
" ; // Set HTML string inside div ready for React return
@@ -88,8 +104,16 @@ const conf = [ if ( instance === undefined ) { return null; } + + let value = GEPPETTO.ModelFactory.getAllVariablesOfMetaType(instance.getType(), 'ImageType')[0].getInitialValues()[0].value; + let img = ""; + if ( value.elements != undefined ) { + img = value.elements[0].initialValue.data; + } else if ( value.data != undefined ) { + img = value.data; + } // Retrieve thumbnail image from Instance - return GEPPETTO.ModelFactory.getAllVariablesOfMetaType(instance.getType(), 'ImageType')[0].getInitialValues()[0].value.data + return img; } } ]; diff --git a/components/configuration/VFBMain/searchConfiguration.js b/components/configuration/VFBMain/searchConfiguration.js index 2b33818d5..e47d1f464 100644 --- a/components/configuration/VFBMain/searchConfiguration.js +++ b/components/configuration/VFBMain/searchConfiguration.js @@ -109,6 +109,7 @@ var searchConfiguration = { "name": "label", "id": "short_form" }, + "filters_expanded": true, "filters": [ { "key": "facets_annotation", diff --git a/components/interface/VFBFocusTerm/VFBFocusTerm.js b/components/interface/VFBFocusTerm/VFBFocusTerm.js index 8956d3e10..1711de5fb 100644 --- a/components/interface/VFBFocusTerm/VFBFocusTerm.js +++ b/components/interface/VFBFocusTerm/VFBFocusTerm.js @@ -610,4 +610,4 @@ function mapDispatchToProps (dispatch) { return { showListViewer: type => dispatch({ type : type }) } } -export default connect(mapStateToProps, mapDispatchToProps)(VFBFocusTerm); +export default connect(mapStateToProps, mapDispatchToProps, null, { forwardRef : true } )(VFBFocusTerm); diff --git a/model/vfb.xmi b/model/vfb.xmi index 031341a56..9c3b47b5d 100644 --- a/model/vfb.xmi +++ b/model/vfb.xmi @@ -146,7 +146,7 @@ id="neo4JDataSourceService" name="neo4j Data Source" dataSourceService="neo4jDataSource" - url="http://pdb.virtualflybrain.org/db/data/transaction" + url="http://pdb.p2.virtualflybrain.org/db/data/transaction" dependenciesLibrary="//@libraries.3" targetLibrary="//@libraries.4">