Sha256: c452349072f4d63910998ec96ba4920385e3a4d4e37841004be3509dc7f89af4
Contents?: true
Size: 452 Bytes
Versions: 2
Compression:
Stored size: 452 Bytes
Contents
$(document).on('click', 'tr[data-url]', function(e) { var row = $(e.currentTarget); if (row.data('url') == 'auto') { var url = row.find('td:not(.actions) a:first').attr('href'); } else { var url = row.data('url'); } if (url) { if (e.metaKey || e.ctrlKey) { window.open(url, '_blank'); } else { Trestle.visit(url); } } }); $(document).on('click', 'tr[data-url] a', function(e) { e.stopPropagation(); });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
trestle-0.8.5 | app/assets/javascripts/trestle/_table.js |
trestle-0.8.4 | app/assets/javascripts/trestle/_table.js |