Skip to content

Commit

Permalink
Merge pull request #5634 from guerler/fix_async_grid_links
Browse files Browse the repository at this point in the history
[18.01] Remove href from grid sorting links
  • Loading branch information
martenson committed Mar 2, 2018
2 parents 41910f8 + 7ffabb1 commit e01f9fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 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
6 changes: 0 additions & 6 deletions lib/galaxy/web/framework/helpers/grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,18 +279,13 @@ 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)
grid_config['columns'].append({
'key' : column.key,
'visible' : column.visible,
Expand All @@ -301,7 +296,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 e01f9fa

Please sign in to comment.