public/assets/js/application.js
author Vincent Tondellier <tonton+hg@team1664.org>
Thu, 03 May 2012 13:17:05 +0200
changeset 6 8dfc7e5dbdc7
parent 3 2ff78fe4abda
child 12 c98d3fa4a948
permissions -rw-r--r--
Fix compatibility with perl < 5.11

$(document).ready(function () {
    $('.signature-column').append(' <a class="expand" href="#">[Expand]</a>');
    $('.expand').click(function () {
        // swap cell title into cell text for each cell in this column
        $(".shortened-signature", $(this).parents('table')).each(function () {
            $(this).text($(this).attr('title')).removeAttr('title');
        });
        $(this).remove();
        return false;
    });
});