mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Only compose tag:value one time on the client.
This commit is contained in:
@@ -130,9 +130,11 @@ 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[0] + (tag[1] ? ":"+tag[1] : '' ) + ' ' }, '' );
|
||||
var tags_with_values = [];
|
||||
_.each(option.tags, function(tag){ tags_with_values.push(tag[0] + (tag[1] ? ":"+tag[1] : '' ))});
|
||||
var filterstr = _.reduce( tags_with_values, function( memo, tag ) { return memo + tag + ' ' }, '' );
|
||||
var filterhtml = '<div class="ui-tags">' +
|
||||
_.reduce( option.tags, function( memo, tag ) { return memo + ' <div class="label label-info">' + tag[0] + (tag[1] ? ":"+tag[1] : '' ) + '</div>' }, '' )
|
||||
_.reduce( tags_with_values, function( memo, tag ) { return memo + ' <div class="label label-info">' + tag + '</div>' }, '' )
|
||||
+ '</div>';
|
||||
self.data2.push( { order: index, id: option.value, text: option.label, filterhtml: filterhtml, filterstr: filterstr } );
|
||||
});
|
||||
|
||||
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
Reference in New Issue
Block a user