DatafariUI - rename facet label
Currently, there is no possibility to rename a facet label into DatafariUI. In AjaxFranceLabs, we can do it by adding the mappingValues property into the declaration of the widget into the search.js. See : https://datafari.atlassian.net/wiki/spaces/DATAFARI/pages/5832716/Widgets+and+Modules "Table widget section". Example to rename PDF label in the extension facet :
- edit $DATAFARI_HOME/tomcat/webapps/Datafari/resources/search.js and add the property value mappingValues :
Manager.addWidget(new AjaxFranceLabs.TableWidget({ elm: $('#facet_extension'), id: 'facet_extension', field: 'extension', name: window.i18n.msgStore['facetextension'], mappingValues:{"pdf":"documentPDF"}, pagination: true, selectionType: 'OR', returnUnselectedFacetValues: true }));
Result into AjaxFranceLabs :
The code that allows it is into $DATAFARI_HOME/tomcat/webapps/Datafari/resources/js/AjaxFranceLabs/widgets/Table.widget.js :
var label = ""; if (!jQuery.isEmptyObject(this.mappingValues) && decodedName in this.mappingValues) { label = this.mappingValues[decodedName]; } else { label = decodedName; }
It would be nice to have the same feature into DatafariUI.