mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-28 02:58:18 +08:00
Sort tags for display (note, this is stupid to have in 3 places -- refactor)
This commit is contained in:
@@ -307,7 +307,7 @@ var DatasetListItemView = _super.extend(
|
||||
|
||||
_renderNametags : function(){
|
||||
var tpl = _.template([
|
||||
'<% _.each(_.uniq(tags), function(tag){ %>',
|
||||
'<% _.each(_.sortBy(_.uniq(tags), function(x) { return x }), function(tag){ %>',
|
||||
'<% if (tag.indexOf("name:") == 0){ %>',
|
||||
'<span class="label label-info"><%- tag.slice(5) %></span>',
|
||||
'<% } %>',
|
||||
|
||||
@@ -16,7 +16,7 @@ var _super = DATASET_LI.DatasetListItemView;
|
||||
var HDAListItemView = _super.extend(
|
||||
/** @lends HDAListItemView.prototype */{
|
||||
|
||||
className : _super.prototype.className + " history-content",
|
||||
className : _super.prototype.className + " history-content",
|
||||
|
||||
initialize : function( attributes, options ){
|
||||
_super.prototype.initialize.call( this, attributes, options );
|
||||
@@ -45,7 +45,7 @@ HDAListItemView.prototype.templates = (function(){
|
||||
'</div>',
|
||||
'</br>',
|
||||
'<span class="nametags">',
|
||||
'<% _.each(dataset.tags, function(tag){ %>',
|
||||
'<% _.each(_.sortBy(_.uniq(dataset.tags), function(x) { return x }), function(tag){ %>',
|
||||
'<% if (tag.indexOf("name:") == 0){ %>',
|
||||
'<span class="label label-info"><%- tag.slice(5) %></span>',
|
||||
'<% } %>',
|
||||
|
||||
@@ -85,7 +85,7 @@ HDCAListItemView.prototype.templates = (function(){
|
||||
'</div>',
|
||||
'<div class="subtitle"></div>',
|
||||
'<span class="nametags">',
|
||||
'<% _.each(_.uniq(collection.tags), function(tag){ %>',
|
||||
'<% _.each(_.sortBy(_.uniq(collection.tags), function(x) { return x }), function(tag){ %>',
|
||||
'<% if (tag.indexOf("name:") == 0){ %>',
|
||||
'<span class="label label-info"><%- tag.slice(5) %></span>',
|
||||
'<% } %>',
|
||||
|
||||
Reference in New Issue
Block a user