Organizations: Click anywhere in the list item to open

Suggestion by Dr. Sybren
This commit is contained in:
2017-09-01 11:39:46 +02:00
parent dd3cfe80ef
commit ea9af92bd4
2 changed files with 15 additions and 0 deletions

View File

@@ -154,6 +154,20 @@ script.
);
}
$('li.projects__list-item').click(function(e){
url = $(this).data('url');
if (typeof url === 'undefined') return;
window.location.href = url;
if (console) console.log(url);
$(this).addClass('active');
$(this).find('.projects__list-thumbnail i')
.removeAttr('class')
.addClass('pi-spin spin');
});
{% if open_organization_id %}
$(function() { item_open('{{ open_organization_id }}', false); });
{% endif %}