Make seen reports visible, widgetize tables
This commit is contained in:
@@ -4,6 +4,11 @@ define("SITE_ROOT", realpath(dirname(__file__)));
|
|||||||
require_once SITE_ROOT . "/lib/init.php";
|
require_once SITE_ROOT . "/lib/init.php";
|
||||||
$S->requireUser();
|
$S->requireUser();
|
||||||
|
|
||||||
|
function lk($id, $txt)
|
||||||
|
{
|
||||||
|
echo '<a href="'. URL_ROOT . '/report_detail.php?id=' . $id . '">' . htmlentities($txt) . '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
$filter = new SearchFilter();
|
$filter = new SearchFilter();
|
||||||
$total = CrashReport::getTotal($filter);
|
$total = CrashReport::getTotal($filter);
|
||||||
$reports = CrashReport::getReports($filter);
|
$reports = CrashReport::getReports($filter);
|
||||||
@@ -23,12 +28,12 @@ $filter->render();
|
|||||||
<th>Grid (region)</th>
|
<th>Grid (region)</th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php for ($i=0; $i<count($reports); $i++): ?>
|
<?php for ($i=0; $i<count($reports); $i++): ?>
|
||||||
<tr class="rowhighlight hand" onclick="window.location.href='report_detail?id=<?php echo $reports[$i]->id ?>'">
|
<tr class="rowhighlight">
|
||||||
<td><?php echo (int)$reports[$i]->id ?></td>
|
<td><?php lk($reports[$i]->id, $reports[$i]->id) ?></td>
|
||||||
<td><?php echo htmlspecialchars($reports[$i]->client_channel . " " . $reports[$i]->client_version) ?></td>
|
<td><?php lk($reports[$i]->id, $reports[$i]->client_channel . " " . $reports[$i]->client_version) ?></td>
|
||||||
<td><?php echo htmlspecialchars($reports[$i]->os) ?></td>
|
<td><?php lk($reports[$i]->id, $reports[$i]->os) ?></td>
|
||||||
<td><?php echo htmlspecialchars($reports[$i]->gpu) ?></td>
|
<td><?php lk($reports[$i]->id, $reports[$i]->gpu) ?></td>
|
||||||
<td><?php echo htmlspecialchars($reports[$i]->grid . " (" . $reports[$i]->region . ")") ?></td>
|
<td><?php lk($reports[$i]->id, $reports[$i]->grid . " (" . $reports[$i]->region . ")") ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endfor ?>
|
<?php endfor ?>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -47,6 +47,30 @@ td, th {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tr.rowhighlight a {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.jtable tr:hover, table.jtable th {
|
||||||
|
background: #2b3233 url(images/ui-bg_highlight-hard_20_2b3233_1x100.png) 50% 50% repeat-x;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.jtable {
|
||||||
|
border-spacing: 0px;
|
||||||
|
border-collapse:collapse;
|
||||||
|
border: 1px solid #555555;
|
||||||
|
background: #1e1e1e url(images/ui-bg_flat_25_1e1e1e_40x100.png) 50% 50% repeat-x;
|
||||||
|
color: #c5c5c5;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.jtable a:visited {
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.hand {
|
.hand {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@@ -57,7 +81,3 @@ pre {
|
|||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.jtable tr .ui-state-hover {
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
@@ -109,8 +109,8 @@ class Layout
|
|||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||||
<link rel="stylesheet" type="text/css" href="<?php print URL_ROOT ?>/css/singularity/jquery-ui-1.10.3.custom.min.css"/>
|
<link rel="stylesheet" type="text/css" href="<?php print URL_ROOT ?>/css/singularity/jquery-ui-1.10.3.custom.css"/>
|
||||||
<link rel="stylesheet" type="text/css" href="<?php print URL_ROOT ?>/singularity.css"/>
|
<link rel="stylesheet" type="text/css" href="<?php print URL_ROOT ?>/css/singularity/singularity.css"/>
|
||||||
<link rel="shortcut icon" href="<?php print IMG_ROOT ?>/favicon.ico" type="image/x-icon" />
|
<link rel="shortcut icon" href="<?php print IMG_ROOT ?>/favicon.ico" type="image/x-icon" />
|
||||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
|
||||||
@@ -120,32 +120,14 @@ class Layout
|
|||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
$(function() {
|
$(function() {
|
||||||
$( ".toolbarbutton" ).button();
|
$( ".toolbarbutton" ).button();
|
||||||
$( ".rowhighlight" )
|
|
||||||
|
/*
|
||||||
|
$( ".rowhighlight" ).on("mousedown", function(e) {
|
||||||
|
$(this).addClass("ui-state-disabled");
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$().ready(function(){
|
|
||||||
|
|
||||||
$(".jtable th").each(function(){
|
|
||||||
$(this).addClass("ui-widget-header");
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".jtable td").each(function(){
|
|
||||||
|
|
||||||
$(this).addClass("ui-widget-content");
|
|
||||||
|
|
||||||
});
|
|
||||||
$(".jtable tr").hover(
|
|
||||||
function()
|
|
||||||
{
|
|
||||||
$(this).children("td").addClass("ui-state-hover");
|
|
||||||
},
|
|
||||||
function()
|
|
||||||
{
|
|
||||||
$(this).children("td").removeClass("ui-state-hover");
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user