Include values in tags and tag selection lgoic

This commit is contained in:
Dannon Baker
2017-03-06 16:30:26 -05:00
parent 2e5e6bb028
commit d20e19e85a
9 changed files with 12 additions and 12 deletions
@@ -130,9 +130,9 @@ var View = Backbone.View.extend({
if ( this.model.get( 'searchable' ) ) {
this.data2 = [];
_.each( this.data, function( option, index ) {
var filterstr = _.reduce( option.tags, function( memo, tag ) { return memo + tag + ' ' }, '' );
var filterstr = _.reduce( option.tags, function( memo, tag ) { return memo + tag[0] + (tag[1] ? ":"+tag[1] : '' ) + ' ' }, '' );
var filterhtml = '<div class="ui-tags">' +
_.reduce( option.tags, function( memo, tag ) { return memo + '&nbsp;<div class="label label-info">' + tag + '</div>' }, '' )
_.reduce( option.tags, function( memo, tag ) { return memo + '&nbsp;<div class="label label-info">' + tag[0] + (tag[1] ? ":"+tag[1] : '' ) + '</div>' }, '' )
+ '</div>';
self.data2.push( { order: index, id: option.value, text: option.label, filterhtml: filterhtml, filterstr: filterstr } );
});
+3 -3
View File
@@ -1771,7 +1771,7 @@ class DataToolParameter( BaseDataToolParameter ):
return list.append( { 'id' : trans.security.encode_id( hda.id ),
'hid' : hda.hid,
'name' : name,
'tags' : [ t.user_tname for t in hda.tags ],
'tags' : [ (t.user_tname, t.value) for t in hda.tags ],
'src' : src,
'keep' : keep } )
@@ -1929,7 +1929,7 @@ class DataCollectionToolParameter( BaseDataToolParameter ):
'hid' : hdca.hid,
'name' : hdca.name,
'src' : 'hdca',
'tags' : [ t.user_tname for t in hdca.tags ]
'tags' : [ (t.user_tname, t.value) for t in hdca.tags ]
})
# append matching subcollections
@@ -1940,7 +1940,7 @@ class DataCollectionToolParameter( BaseDataToolParameter ):
'hid' : hdca.hid,
'name' : hdca.name,
'src' : 'hdca',
'tags' : [ t.user_tname for t in hdca.tags ],
'tags' : [ (t.user_tname, t.value) for t in hdca.tags ],
'map_over_type': subcollection_type
})
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long