Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Fixes directory filter clicks not being handled
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krienbühl committed Sep 26, 2018
1 parent 28ea8ba commit 407191d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
3 changes: 3 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
---------

- Fixes directory filter clicks not being handled.
[href]

0.36.1 (2018-09-25)
~~~~~~~~~~~~~~~~~~~

Expand Down
16 changes: 11 additions & 5 deletions onegov/org/assets/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,17 @@ var processCommonNodes = function(elements, out_of_band) {
}

// send clicks from certain blocks down to the first link
$(document).ready(function() {
$('.click-through').click(function() {
$(this).find('a:first')[0].click();
return false;
});
targets.find('.click-through').click(function() {
var link = $(this).find('a:first');
var handlers = $._data(link[0]);

if (handlers && handlers.click && handlers.click.length > 0) {
link[0].click();
} else {
window.location = link.attr('href');
}

return false;
});
};

Expand Down

0 comments on commit 407191d

Please sign in to comment.