diff --git a/app/templates/ApiUsers/columns.inc b/app/templates/ApiUsers/columns.inc index 0d2dc59e6..add209b90 100644 --- a/app/templates/ApiUsers/columns.inc +++ b/app/templates/ApiUsers/columns.inc @@ -35,7 +35,8 @@ if(!empty($vv_cur_mg)) { $indexColumns = [ 'username' => [ - 'type' => 'link' + 'type' => 'link', + 'cssClass' => 'row-link' ] ]; diff --git a/app/templates/AttributeGroups/columns.inc b/app/templates/AttributeGroups/columns.inc index 5ad7ec404..0e23b1e39 100644 --- a/app/templates/AttributeGroups/columns.inc +++ b/app/templates/AttributeGroups/columns.inc @@ -27,6 +27,7 @@ $indexColumns = [ 'name' => [ - 'type' => 'link' + 'type' => 'link', + 'cssClass' => 'row-link' ] ]; diff --git a/app/templates/AttributeMappings/columns.inc b/app/templates/AttributeMappings/columns.inc index 0356bb0b9..87bd4a30f 100644 --- a/app/templates/AttributeMappings/columns.inc +++ b/app/templates/AttributeMappings/columns.inc @@ -29,7 +29,8 @@ $indexColumns = [ 'query' => [ 'type' => 'link', - 'sortable' => true + 'sortable' => true, + 'cssClass' => 'row-link' ], 'value' => [ 'type' => 'echo', diff --git a/app/templates/AttributeMaps/columns.inc b/app/templates/AttributeMaps/columns.inc index 18c983844..4ab1ecdfa 100644 --- a/app/templates/AttributeMaps/columns.inc +++ b/app/templates/AttributeMaps/columns.inc @@ -27,7 +27,8 @@ $indexColumns = [ 'name' => [ - 'type' => 'link' + 'type' => 'link', + 'cssClass' => 'row-link' ] ]; diff --git a/app/templates/Attributes/columns.inc b/app/templates/Attributes/columns.inc index 9f02e671d..7eb1c6dbb 100644 --- a/app/templates/Attributes/columns.inc +++ b/app/templates/Attributes/columns.inc @@ -27,7 +27,8 @@ $indexColumns = [ 'name' => [ - 'type' => 'link' + 'type' => 'link', + 'cssClass' => 'row-link' ], 'attribute_group_id' => [ 'type' => 'fk' diff --git a/app/templates/Matchgrids/columns.inc b/app/templates/Matchgrids/columns.inc index 47e450773..c001f7bee 100644 --- a/app/templates/Matchgrids/columns.inc +++ b/app/templates/Matchgrids/columns.inc @@ -27,7 +27,8 @@ $indexColumns = [ 'table_name' => [ - 'type' => 'link' + 'type' => 'link', + 'cssClass' => 'row-link' ], 'status' => [ 'type' => 'enum', diff --git a/app/templates/Matchgrids/pending.php b/app/templates/Matchgrids/pending.php index 3fed4d7fc..bb3e6aacb 100644 --- a/app/templates/Matchgrids/pending.php +++ b/app/templates/Matchgrids/pending.php @@ -44,13 +44,12 @@
| > | |
|---|---|
| + | > [ - 'type' => 'link' + 'type' => 'link', + 'cssClass' => 'row-link' ], 'resolution_mode' => [ 'type' => 'enum', diff --git a/app/templates/element/javascript.php b/app/templates/element/javascript.php index b22a0c93e..fb6c62f95 100644 --- a/app/templates/element/javascript.php +++ b/app/templates/element/javascript.php @@ -175,11 +175,24 @@ // Enable Bootstrap Popovers. Unless needed elsewhere, constrain this to #content $('#content [data-toggle="popover"]').popover(); - - // Generic row click handling - $('.linked-row').click(function (e) { - location.href = $(this).find('a.row-link').attr('href'); + + // Generic row click handling for div-based rows + $('div.linked-row').click(function (e) { + location.href = $(this).find('a.row-link').attr('href'); }); + + // Generic row click handling for table rows + $('td.row-link').each(function (e) { + url = $(this).find('a').attr('href'); + if(url != undefined && url != '') { + $(this).closest('tr').addClass('linked-row').attr('data-target',url).click(function (e) { + location.href = $(this).attr('data-target'); + }).find('a').on('click',function(e){ + // don't propagate on other links to avoid redirecting dialog boxes + e.stopPropagation(); + }); + } + }); // Add loading animation when a form is submitted, when any item with a "spin" class is clicked, // or on any button or anchor tag lacking the .nospin class. @@ -203,4 +216,4 @@ -= $this->Flash->render() ?> \ No newline at end of file += $this->Flash->render() ?> diff --git a/app/webroot/css/co-base.css b/app/webroot/css/co-base.css index bed15781c..6d2798c49 100644 --- a/app/webroot/css/co-base.css +++ b/app/webroot/css/co-base.css @@ -1161,7 +1161,7 @@ td.indented { } .linked-row:hover, .linked-row:hover td { - background-color: var(--cmg-color-lightgray-002) !important; + background-color: var(--cmg-color-lightgray-004) !important; } .menuitembutton { width: 250px; |