summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-09-09 22:01:41 +0000
committerRomain d'Alverny <rda@mageia.org>2012-09-09 22:01:41 +0000
commit2031ed8d939122a16cfc5f9e92fd66458db7ab6b (patch)
tree2022ba466cb84b73fd2842e4e7709fec9c573fa4
parentc18473f9b74747b692bf356888811c69841602ad (diff)
downloadpkgsubmit-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
-rw-r--r--test_index.php48
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>