Skip to content

Commit

Permalink
Remove href from grid sorting links
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Mar 2, 2018
1 parent 41910f8 commit 7254d55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions client/galaxy/scripts/mvc/grid/grid-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ export default {
for (let column of options.columns) {
if (column.visible) {
tmpl += `<th id="${column.key}-header">`;
if (column.href) {
tmpl += `<a href="${column.href}" class="sort-link" sort_key="${column.key}">${column.label}</a>`;
if (column.sortable) {
tmpl += `<a href="javascript:void(0)" class="sort-link" sort_key="${column.key}">${column.label}</a>`;
} else {
tmpl += column.label;
}
Expand Down
4 changes: 0 additions & 4 deletions lib/galaxy/web/framework/helpers/grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,12 @@ def url(*args, **kwargs):
if current_item:
grid_config['current_item_id'] = current_item.id
for column in self.columns:
href = None
extra = ''
if column.sortable:
if sort_key.endswith(column.key):
if not sort_key.startswith("-"):
href = url(sort=("-" + column.key))
extra = "&darr;"
else:
href = url(sort=(column.key))
extra = "&uarr;"
else:
href = url(sort=column.key)
Expand All @@ -301,7 +298,6 @@ def url(*args, **kwargs):
'label' : column.label,
'filterable' : column.filterable,
'is_text' : isinstance(column, TextColumn),
'href' : href,
'extra' : extra
})
for operation in self.operations:
Expand Down

0 comments on commit 7254d55

Please sign in to comment.