summaryrefslogtreecommitdiffstats
path: root/test_index.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-09-10 08:07:08 +0000
committerRomain d'Alverny <rda@mageia.org>2012-09-10 08:07:08 +0000
commit63bc2714d44a15320b6fbc6ec5df93064a73170e (patch)
treeb773ecf8cc3d40d408b3c9963cb9cf4ff5c0434d /test_index.php
parent3267fb13d7d77e1ae12dec93dbf90b009d8f137b (diff)
downloadpkgsubmit-63bc2714d44a15320b6fbc6ec5df93064a73170e.tar
pkgsubmit-63bc2714d44a15320b6fbc6ec5df93064a73170e.tar.gz
pkgsubmit-63bc2714d44a15320b6fbc6ec5df93064a73170e.tar.bz2
pkgsubmit-63bc2714d44a15320b6fbc6ec5df93064a73170e.tar.xz
pkgsubmit-63bc2714d44a15320b6fbc6ec5df93064a73170e.zip
move js in separate file
Diffstat (limited to 'test_index.php')
-rw-r--r--test_index.php94
1 files changed, 1 insertions, 93 deletions
diff --git a/test_index.php b/test_index.php
index 64087b0..9fcad3c 100644
--- a/test_index.php
+++ b/test_index.php
@@ -311,99 +311,7 @@ else
?>
</ul>
<script src="js/jquery.js"></script>
- <script>
- $(function () {
-
- $('.status-link').on("click", function (ev) {
- if (!ev.metaKey) {
- ev.preventDefault();
-
- var key = $(this).attr("href");
- var elId = 'e' + key.replace(/\/|\./g, '-');
- var el = $("#" + elId);
-
- if (el.length == 0) {
- $(this).parent().parent().after($("<tr />",
- {
- class: "build-files-list",
- id: elId,
- html: '<td colspan="4">loading</td>'
- }
- ));
- $.get(
- "/log_files.php",
- {"k": $(this).attr("href")},
- function (data) {
- $("#" + elId).html('<td colspan="4">' + data + '</td>');
- }
- );
- } else {
- el.toggle();
- }
- }
- });
-
- $("table#submitted-packages tbody").on("click", "tr td li a.view-inline", function (ev) {
-
- // only open text log files
- var ext = $(this).attr("href").split(".").pop();
- if (["log", "done", "youri"].indexOf(ext) < 0)
- return true;
-
- if (!ev.metaKey) {
- ev.preventDefault();
-
- var elId = 'view-' + $(this).attr("href").replace(/\/|\./g, '-');
- var cId = elId + '-container';
-
- var c = $("#" + cId);
- var el = $("#" + elId);
-
- if (c.length == 0) {
- $(this).after($("<div />", {
- id: cId
- })
- .append($("<textarea />", {
- id: elId,
- class: "file-view",
- html: "loading..."
- }))
- );
-
- $.get(
- "/" + $(this).attr("href"),
- {},
- function (data) {
- $("#" + elId).html(data)
- .before(
- $("<div />", {
- class: "controls"
- })
- .append($("<button />", {
- class: "gototop",
- html: "top"
- }).on("click", function (ev) {
- $("#" + elId).animate({ scrollTop: 0 }, 200);
- })
- )
- .append($("<button />", {
- class: "gotobo",
- html: "bottom"
- }).on("click", function (ev) {
- var d = $("#" + elId);
- d.animate({ scrollTop: d.prop("scrollHeight") }, 200);
- })
- )
- )
- }
- );
- } else {
- c.toggle();
- }
- }
- });
- });
- </script>
+ <script src="js/pkgsubmit.js"></script>
<div class="clear"></div>
<hr />
<p>Generated at <?php echo $date_gen; ?>.