diff options
author | Romain d'Alverny <rda@mageia.org> | 2012-09-09 22:01:41 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2012-09-09 22:01:41 +0000 |
commit | 2031ed8d939122a16cfc5f9e92fd66458db7ab6b (patch) | |
tree | 2022ba466cb84b73fd2842e4e7709fec9c573fa4 /test_index.php | |
parent | c18473f9b74747b692bf356888811c69841602ad (diff) | |
download | pkgsubmit-2031ed8d939122a16cfc5f9e92fd66458db7ab6b.tar pkgsubmit-2031ed8d939122a16cfc5f9e92fd66458db7ab6b.tar.gz pkgsubmit-2031ed8d939122a16cfc5f9e92fd66458db7ab6b.tar.bz2 pkgsubmit-2031ed8d939122a16cfc5f9e92fd66458db7ab6b.tar.xz pkgsubmit-2031ed8d939122a16cfc5f9e92fd66458db7ab6b.zip |
allow for ctrl/meta+click to open link in a new page/tab
Diffstat (limited to 'test_index.php')
-rw-r--r-- | test_index.php | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/test_index.php b/test_index.php index cfe9fdf..7d51d9d 100644 --- a/test_index.php +++ b/test_index.php @@ -312,31 +312,35 @@ else <script src="js/jquery.js"></script> <script> $(function () { + $('.status-link').on("click", function (ev) { - ev.preventDefault(); - var key = $(this).attr("href"); - var elId = 'e' + key.replace(/\/|\./g, '-'); - - if ($("#" + elId).length == 0) { - $(this).parent().parent().after($("<tr />", - { - class: "build-files-list", - id: elId, - html: '<td colspan="8">loading</td>' - } - )); - $.get( - "/log_files.php", - {"k": $(this).attr("href")}, - function (data) { - $("#" + elId).html('<td colspan="2"></td><td colspan="6">' + data + '</td>'); - } - ); - } else { - $("#" + elId).toggle(); + if (!ev.metaKey) { + ev.preventDefault(); + + var key = $(this).attr("href"); + var elId = 'e' + key.replace(/\/|\./g, '-'); + + if ($("#" + elId).length == 0) { + $(this).parent().parent().after($("<tr />", + { + class: "build-files-list", + id: elId, + html: '<td colspan="8">loading</td>' + } + )); + $.get( + "/log_files.php", + {"k": $(this).attr("href")}, + function (data) { + $("#" + elId).html('<td colspan="8">' + data + '</td>'); + } + ); + } else { + $("#" + elId).toggle(); + } } - return false; }); + }); </script> <div class="clear"></div> |