Skip to content

Commit

Permalink
Allow multiple datatype matching
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Aug 25, 2016
1 parent f98ade1 commit c4e9ecf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Expand Up @@ -3,7 +3,7 @@ define( [], function() {
title : 'Multiple Sequence Alignment',
category : 'Sequence',
library : 'BioJS',
datatype : 'txt',
datatypes : [ 'txt' ],
keywords : 'biojs',
description : 'The MSA viewer is a modular, reusable component to visualize large MSAs interactively on the web.',
settings : {
Expand Down
Expand Up @@ -5,7 +5,7 @@ define( [ 'plugin/charts/utilities/tabular-form' ], function( default_config ) {
library : 'NVD3',
tag : 'svg',
keywords : 'nvd3 default',
datatype : 'tabular',
datatypes : [ 'tabular', 'csv' ],
groups : {
label : {
label : 'Labels',
Expand Down
Expand Up @@ -5,7 +5,7 @@ define([], function() {
library : 'Custom',
tag : 'svg',
keywords : 'others',
datatype : 'tabular',
datatypes : [ 'tabular', 'csv' ],
description : 'This is a developer example which demonstrates how to implement and configure a basic d3-based plugin for charts.',
groups : {
x : { type : 'data_column', is_numeric : true, label : 'Bubble x-position' },
Expand Down
Expand Up @@ -60,7 +60,7 @@ define( [], function() {
library : '',
tag : '',
keywords : '',
datatype : 'tabular',
datatypes : [ 'tabular', 'csv' ],
use_panels : true,
settings : {
x_axis_label : axisLabel( 'x_axis_label' ),
Expand Down
2 changes: 1 addition & 1 deletion config/plugins/visualizations/charts/static/views/types.js
Expand Up @@ -20,7 +20,7 @@ define( [ 'utils/utils', 'mvc/ui/ui-misc', 'mvc/ui/ui-tabs', 'plugin/charts/over
this.index = {};
this.first = null;
_.each( this.app.types, function( type, type_id ) {
if ( self.app.dataset.file_ext === type.datatype ) {
if ( !type.datatypes || type.datatypes.indexOf( self.app.dataset.file_ext ) != -1 ) {
_.each( type.keywords.split( ' ' ), function( keyword ) {
self.index[ keyword ] = self.index[ keyword ] || {};
self.index[ keyword ][ type.category ] = self.index[ keyword ][ type.category ] || {};
Expand Down

0 comments on commit c4e9ecf

Please sign in to comment.