Skip to content
Snippets Groups Projects
Commit 26af3c7e authored by Andrea Biancini's avatar Andrea Biancini
Browse files

Reviewed graphical layout

parent 473a5b9c
No related branches found
No related tags found
No related merge requests found
......@@ -8,26 +8,10 @@ $xml = new SimpleXmlElement($feed);
$entities = $xml->xpath("//md:EntityDescriptor");
$entityid = $_GET["id"];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="shCore.js"></script>
<script type="text/javascript" src="shBrushXml.js"></script>
<link type="text/css" rel="stylesheet" href="shCoreDefault.css"/>
<script type="text/javascript">SyntaxHighlighter.all();</script>
</head>
<body style="background: white; font-family: Helvetica; font-size: 10pt">
<pre class="brush: xml;">
<?php
foreach($entities as $entity) {
if ((string) $entity["entityID"] == $entityid) {
print $entity->asXML();
}
}
?>
</pre>
</html>
......@@ -9,6 +9,9 @@ $mod_details = parse_ini_file("module.ini");
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<script src="module.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="../../shCore.js"></script>
<script type="text/javascript" src="../../shBrushXml.js"></script>
<link type="text/css" rel="stylesheet" href="../../shCoreDefault.css"/>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(draw_<?= $mod_details["name"] ?>);
......@@ -18,21 +21,22 @@ $mod_details = parse_ini_file("module.ini");
a { text-decoration: none; color: #696969; }
a:hover { text-decoration: underline; }
a:visited { color: #696969; }
#<?= $mod_details["name"] ?>_graph { width: 400px; height: 500px; }
#<?= $mod_details["name"] ?>_details { height: 500px; overflow: auto; }
iframe { height: 400px; width: 100%; overflow: auto; border: 0px; }
#<?= $mod_details["name"] ?>_graph { width: 400px; height: 500px; float: left; }
#<?= $mod_details["name"] ?>_details { height: 500px; width: auto; overflow: auto; }
#entityframe { height: 420px; width: 100%; border: 1px solid red; overflow: hidden; border: 0px; }
.entitylist { display: block; }
.highlight { background-color: lightgrey; }
</style>
</head>
<body>
<h1><?= $mod_details["description"] ?></h1>
<h3><a href="../../">IDEM Statistics</a> | <a href="#">Module <?= $mod_details["name"] ?></a></h3>
<hr/>
<table border="0" cellspacing="0" cellpadding="0"> <tr>
<td height="500"><div id="<?= $mod_details["name"] ?>_graph"></div></td>
<td height="500"><div id="<?= $mod_details["name"] ?>_details"></div></td>
<div id="<?= $mod_details["name"] ?>_graph"></div>
<div id="<?= $mod_details["name"] ?>_details"></div>
</tr></table>
<hr/>
<iframe id="entityframe"></iframe>
<pre id="entityframe"></pre>
</body>
</html>
......@@ -16,7 +16,7 @@ function draw_entity() {
var options = {
title: 'IDEM entities by type',
pieHole: 0.4,
legend: { "position": "bottom" }
legend: { "position": "top" }
};
entity_chart = new google.visualization.PieChart(document.getElementById('entity_graph'));
entity_chart.draw(entity_data, options);
......@@ -40,15 +40,28 @@ function select_entity() {
var html = "<h3>List of all the " + value + " of the IDEM federation:</h3><ul>";
for (var i = 0; i < entities.length; ++i) {
html += "<li><a href=\"#\" onclick=\"show_entity('" + entities[i]["id"] + "');\">" + entities[i]["name"] + "</a></li>";
html += "<li class='entitylist'><a href=\"#\" onclick=\"return show_entity(this, '" + entities[i]["id"] + "');\">" + entities[i]["name"] + "</a></li>";
}
html += "</ul>";
$("#entity_details").append(html);
} else {
document.getElementById('entityframe').innerHTML = '';
}
}
function show_entity(entityId) {
var url = "../../getentity.php?id=" + entityId;
$("#entityframe").attr('src', url);
function show_entity(entitylist, entityId) {
$('.entitylist').removeClass('highlight');
entitylist.className = 'entitylist highlight';
$.ajax({
url: "../../getentity.php?id=" + entityId,
success: function(data) {
var brush = new SyntaxHighlighter.brushes.Xml();
brush.init({ toolbar: false });
var html = brush.getHtml(data);
document.getElementById('entityframe').innerHTML = html;
}
});
return false;
}
......@@ -9,6 +9,9 @@ $mod_details = parse_ini_file("module.ini");
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<script src="module.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="../../shCore.js"></script>
<script type="text/javascript" src="../../shBrushXml.js"></script>
<link type="text/css" rel="stylesheet" href="../../shCoreDefault.css"/>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(draw_<?= $mod_details["name"] ?>);
......@@ -18,21 +21,22 @@ $mod_details = parse_ini_file("module.ini");
a { text-decoration: none; color: #696969; }
a:hover { text-decoration: underline; }
a:visited { color: #696969; }
#<?= $mod_details["name"] ?>_graph { width: 400px; height: 500px; }
#<?= $mod_details["name"] ?>_details { height: 500px; overflow: auto; }
iframe { height: 400px; width: 100%; overflow: auto; border: 0px; }
#<?= $mod_details["name"] ?>_graph { width: 400px; height: 500px; float: left; }
#<?= $mod_details["name"] ?>_details { height: 500px; width: auto; overflow: auto; }
#entityframe { height: 420px; width: 100%; border: 1px solid red; overflow: hidden; border: 0px; }
.entitylist { display: block; }
.highlight { background-color: lightgrey; }
</style>
</head>
<body>
<h1><?= $mod_details["description"] ?></h1>
<h3><a href="../../">IDEM Statistics</a> | <a href="#">Module <?= $mod_details["name"] ?></a></h3>
<hr/>
<table border="0" cellspacing="0" cellpadding="0"> <tr>
<td height="500"><div id="<?= $mod_details["name"] ?>_graph"></div></td>
<td height="500"><div id="<?= $mod_details["name"] ?>_details"></div></td>
<div id="<?= $mod_details["name"] ?>_graph"></div>
<div id="<?= $mod_details["name"] ?>_details"></div>
</tr></table>
<hr/>
<iframe id="entityframe"></iframe>
<pre id="entityframe"></pre>
</body>
</html>
......@@ -18,7 +18,7 @@ function draw_info_page() {
var options = {
title: 'Information Pages stats',
pieHole: 0.4,
legend: { "position": "bottom" }
legend: { "maxLines": 2, "position": "top" }
};
info_page_chart = new google.visualization.PieChart(document.getElementById('info_page_graph'));
info_page_chart.draw(info_page_data, options);
......@@ -40,17 +40,30 @@ function select_info_page() {
var entities = info_page_data.getValue(selectedItem.row || 0, 2);
//console.log('The user selected ' + value);
var html = "<h3>List of entities with " + value + ":</h3><ul>";
var html = "<h3>List of entities with " + value.toLowerCase() + ":</h3><ul>";
for (var i = 0; i < entities.length; ++i) {
html += "<li><a href=\"#\" onclick=\"show_entity('" + entities[i]["id"] + "');\">" + entities[i]["name"] + "</a></li>";
html += "<li class='entitylist'><a href=\"#\" onclick=\"return show_entity(this, '" + entities[i]["id"] + "');\">" + entities[i]["name"] + "</a></li>";
}
html += "</ul>";
$("#info_page_details").append(html);
} else {
document.getElementById('entityframe').innerHTML = '';
}
}
function show_entity(entityId) {
var url = "../../getentity.php?id=" + entityId;
$("#entityframe").attr('src', url);
function show_entity(entitylist, entityId) {
$('.entitylist').removeClass('highlight');
entitylist.className = 'highlight entitylist';
$.ajax({
url: "../../getentity.php?id=" + entityId,
success: function(data) {
var brush = new SyntaxHighlighter.brushes.Xml();
brush.init({ toolbar: false });
var html = brush.getHtml(data);
document.getElementById('entityframe').innerHTML = html;
}
});
return false;
}
......@@ -9,6 +9,9 @@ $mod_details = parse_ini_file("module.ini");
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<script src="module.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="../../shCore.js"></script>
<script type="text/javascript" src="../../shBrushXml.js"></script>
<link type="text/css" rel="stylesheet" href="../../shCoreDefault.css"/>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(draw_<?= $mod_details["name"] ?>);
......@@ -18,21 +21,22 @@ $mod_details = parse_ini_file("module.ini");
a { text-decoration: none; color: #696969; }
a:hover { text-decoration: underline; }
a:visited { color: #696969; }
#<?= $mod_details["name"] ?>_graph { width: 400px; height: 500px; }
#<?= $mod_details["name"] ?>_details { height: 500px; overflow: auto; }
iframe { height: 400px; width: 100%; overflow: auto; border: 0px; }
#<?= $mod_details["name"] ?>_graph { width: 400px; height: 500px; float: left; }
#<?= $mod_details["name"] ?>_details { height: 500px; width: auto; overflow: auto; }
#entityframe { height: 420px; width: 100%; border: 1px solid red; overflow: hidden; border: 0px; }
.entitylist { display: block; }
.highlight { background-color: lightgrey; }
</style>
</head>
<body>
<h1><?= $mod_details["description"] ?></h1>
<h3><a href="../../">IDEM Statistics</a> | <a href="#">Module <?= $mod_details["name"] ?></a></h3>
<hr/>
<table border="0" cellspacing="0" cellpadding="0"> <tr>
<td height="500"><div id="<?= $mod_details["name"] ?>_graph"></div></td>
<td height="500"><div id="<?= $mod_details["name"] ?>_details"></div></td>
<div id="<?= $mod_details["name"] ?>_graph"></div>
<div id="<?= $mod_details["name"] ?>_details"></div>
</tr></table>
<hr/>
<iframe id="entityframe"></iframe>
<pre id="entityframe"></pre>
</body>
</html>
......@@ -18,7 +18,7 @@ function draw_privacy_page() {
var options = {
title: 'Information Pages stats',
pieHole: 0.4,
legend: { "position": "bottom" }
legend: { "maxLines": 2, "position": "top" }
};
privacy_page_chart = new google.visualization.PieChart(document.getElementById('privacy_page_graph'));
privacy_page_chart.draw(privacy_page_data, options);
......@@ -40,17 +40,30 @@ function select_privacy_page() {
var entities = privacy_page_data.getValue(selectedItem.row || 0, 2);
//console.log('The user selected ' + value);
var html = "<h3>List of entities with " + value + ":</h3><ul>";
var html = "<h3>List of entities with " + value.toLowerCase() + ":</h3><ul>";
for (var i = 0; i < entities.length; ++i) {
html += "<li><a href=\"#\" onclick=\"show_entity('" + entities[i]["id"] + "');\">" + entities[i]["name"] + "</a></li>";
html += "<li class='entitylist'><a href=\"#\" onclick=\"return show_entity(this, '" + entities[i]["id"] + "');\">" + entities[i]["name"] + "</a></li>";
}
html += "</ul>";
$("#privacy_page_details").append(html);
} else {
document.getElementById('entityframe').innerHTML = '';
}
}
function show_entity(entityId) {
var url = "../../getentity.php?id=" + entityId;
$("#entityframe").attr('src', url);
function show_entity(entitylist, entityId) {
$('.entitylist').removeClass('highlight');
entitylist.className = 'highlight entitylist';
$.ajax({
url: "../../getentity.php?id=" + entityId,
success: function(data) {
var brush = new SyntaxHighlighter.brushes.Xml();
brush.init({ toolbar: false });
var html = brush.getHtml(data);
document.getElementById('entityframe').innerHTML = html;
}
});
return false;
}
......@@ -54,6 +54,7 @@
.syntaxhighlighter {
width: 100% !important;
height: 400px;
margin: 1em 0 1em 0 !important;
position: relative !important;
overflow: auto !important;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment