NIHVIVO-592 Class group browse for home page. Still waiting on update to JSONServlet (NIHVIVO-1674) so classes in class group can be returned for AJAX requests. Introducing alternative bar graph in lieu of pie chart.
This commit is contained in:
parent
67ebb79083
commit
029d0f6b5a
4 changed files with 6 additions and 3922 deletions
|
@ -399,57 +399,6 @@ input.search-home-vivo {
|
|||
margin-top: 2px;
|
||||
}
|
||||
/* BROWSE ------> */
|
||||
#browse {
|
||||
clear: both;
|
||||
width: 920px;
|
||||
margin: 0 auto;
|
||||
border: 1px solid #dfe6e6;
|
||||
background: #f7f9f9;
|
||||
overflow: hidden;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
#browse h4 {
|
||||
width: 13%;
|
||||
height: 30px;
|
||||
margin-bottom: 27px;
|
||||
padding-left: 15px;
|
||||
font-weight: normal;
|
||||
line-height: 38px;
|
||||
color: #fff;
|
||||
background: #5e6363;
|
||||
font-size: 20px;
|
||||
}
|
||||
/* BROWSE CLASS GROUPS ------> */
|
||||
ul#browse-classgroups {
|
||||
float: left;
|
||||
width: 200px;
|
||||
border: 1px solid #dde4e3;
|
||||
border-right: none;
|
||||
background: #f1f2ee;
|
||||
margin-left: 34px;
|
||||
padding: 0 20px 23px 20px;
|
||||
margin-top: 10px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
ul#browse-classgroups li {
|
||||
display: block;
|
||||
border-bottom: 1px solid #dde4e3;
|
||||
font-size: 18px;
|
||||
width: 200px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
}
|
||||
ul#browse-classgroups li:last-child {
|
||||
border-bottom: none
|
||||
}
|
||||
ul#browse-classgroups a {
|
||||
display: block;
|
||||
padding-left: 15px;
|
||||
width: 200px;
|
||||
height: 35px;
|
||||
color: #5e6363;
|
||||
text-decoration: none;
|
||||
}
|
||||
ul#browse-classgroups a:hover {
|
||||
background: url(../images/arrow.gif) 0 12px no-repeat;
|
||||
color: #2ea0cf;
|
||||
|
@ -458,43 +407,6 @@ ul#browse-classgroups a.selected {
|
|||
color: #2ea0cf;
|
||||
background: url(../images/arrow.gif) 0 12px no-repeat;
|
||||
}
|
||||
ul#browse-classgroups .count-classes {
|
||||
font-size: 14px
|
||||
}
|
||||
/* BROWSE CLASSES IN CLASS GROUP ------> */
|
||||
#browse-classes {
|
||||
float: left;
|
||||
width: 610px;
|
||||
border: 1px solid #dde6e5;
|
||||
background: #fff;
|
||||
min-height: 230px;
|
||||
}
|
||||
ul#classgroup-list {
|
||||
float: left;
|
||||
width: 90%;
|
||||
padding: 0 10px 15px 22px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
ul#classgroup-list li {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #dde4e3;
|
||||
font-size: 14px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
}
|
||||
ul#classgroup-list li:last-child {
|
||||
border-bottom: none
|
||||
}
|
||||
ul#classgroup-list a {
|
||||
display: block;
|
||||
padding-left: 15px;
|
||||
height: 35px;
|
||||
color: #5e6363;
|
||||
text-decoration: none;
|
||||
}
|
||||
ul#classgroup-list a:hover {
|
||||
background: url(../images/arrow.gif) 0 12px no-repeat;
|
||||
color: #2ea0cf;
|
||||
|
@ -503,30 +415,11 @@ ul#classgroup-list a.selected {
|
|||
color: #2ea0cf;
|
||||
background: url(../images/arrow.gif) 0 12px no-repeat;
|
||||
}
|
||||
ul#classgroup-list .count-individuals {
|
||||
font-size: 12px;
|
||||
}
|
||||
/* VISUALIZATION ------> */
|
||||
#visual-graph {
|
||||
float: right;
|
||||
width: 270px;
|
||||
height: 270px;
|
||||
position: relative;
|
||||
}
|
||||
#visual-graph h4 {
|
||||
padding: 20px 0 12px 12px;
|
||||
width: auto;
|
||||
font-size: 18px;
|
||||
#visual-graph h5 {
|
||||
color: #2485ae;
|
||||
font-weight: normal;
|
||||
background: url(../images/bullet-visual-graph.png) 120px 25px no-repeat;
|
||||
}
|
||||
#pieViz {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -85px;
|
||||
width: 400px;
|
||||
height: 400px;
|
||||
svg text:hover {
|
||||
color: #2EA0CF;
|
||||
}
|
||||
/* HIGHLIGHTS ------> */
|
||||
#highlights {
|
||||
|
|
85
themes/wilma/js/jquery_plugins/raphael/pie.js
vendored
85
themes/wilma/js/jquery_plugins/raphael/pie.js
vendored
|
@ -1,85 +0,0 @@
|
|||
Raphael.fn.pieChart = function (cx, cy, r, values, labels, stroke) {
|
||||
|
||||
|
||||
var paper = this,
|
||||
rad = Math.PI / 180,
|
||||
chart = this.set();
|
||||
|
||||
|
||||
function sector(cx, cy, r, startAngle, endAngle, params) {
|
||||
var x1 = cx + r * Math.cos(-startAngle * rad),
|
||||
x2 = cx + r * Math.cos(-endAngle * rad),
|
||||
y1 = cy + r * Math.sin(-startAngle * rad),
|
||||
y2 = cy + r * Math.sin(-endAngle * rad);
|
||||
return paper.path(["M", cx, cy, "L", x1, y1, "A", r, r, 0, +(endAngle - startAngle > 180), 0, x2, y2, "z"]).attr(params);
|
||||
}
|
||||
|
||||
|
||||
var angle = 0,
|
||||
total = 0,
|
||||
start = 100,
|
||||
brightNess = 100;
|
||||
process = function (j) {
|
||||
var value = values[j],
|
||||
angleplus = 360 * value / total,
|
||||
popangle = angle + (angleplus / 2),
|
||||
color = "hsb(194, " + start + ", "+ brightNess +")",
|
||||
ms = 500,
|
||||
delta = 30,
|
||||
//bcolor = "hsb(210, " + start + ", 100)",
|
||||
|
||||
|
||||
p = sector(cx, cy, r, angle, angle + angleplus, {
|
||||
gradient: "45-" + color + "-" + color
|
||||
, stroke: stroke, "stroke-width": 1}),
|
||||
|
||||
txt = paper.text
|
||||
(cx + (r + delta + 15) * Math.cos(-popangle * rad),
|
||||
cy + (r + delta + 5) * Math.sin(-popangle * rad),
|
||||
labels[j]).attr({fill: "#424444", stroke: "none",
|
||||
opacity: 0, "font-family": 'Fontin-Sans, Arial', "font-size": "10px"});
|
||||
|
||||
|
||||
|
||||
p.mouseover(function () {
|
||||
p.animate({scale: [1.2, 1.2, cx, cy]}, ms, "elastic");
|
||||
txt.animate({opacity: 1}, ms, "elastic");
|
||||
}).mouseout(function () {
|
||||
p.animate({scale: [1, 1, cx, cy]}, ms, "elastic");
|
||||
txt.animate({opacity: 0}, ms);
|
||||
|
||||
});
|
||||
|
||||
|
||||
angle += angleplus;
|
||||
chart.push(p);
|
||||
chart.push(txt);
|
||||
brightNess -= 7;
|
||||
start -= 5;
|
||||
};
|
||||
|
||||
for (var i = 0, ii = values.length; i < ii; i++) {
|
||||
total += values[i];
|
||||
|
||||
}
|
||||
for (var i = 0; i < ii; i++) {
|
||||
process(i);
|
||||
}
|
||||
return chart;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
(function (raphael) {
|
||||
$(function () {
|
||||
var values = [],
|
||||
labels = [];
|
||||
$("tr").each(function () {
|
||||
values.push(parseInt($("td", this).text(), 10));
|
||||
labels.push($("th", this).text());
|
||||
});
|
||||
$("table").hide();
|
||||
raphael("pieViz", 400, 400).pieChart(200, 200, 100, values, labels, "#fff");
|
||||
});
|
||||
})(Raphael.ninja());
|
3725
themes/wilma/js/jquery_plugins/raphael/raphael.js
vendored
3725
themes/wilma/js/jquery_plugins/raphael/raphael.js
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,8 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<@widget name="login" include="assets" />
|
||||
|
||||
<#include "browse-classgroups.ftl">
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
@ -44,7 +45,7 @@
|
|||
|
||||
<@widget name="login" />
|
||||
|
||||
<#include "browse-classgroups.ftl">
|
||||
<@allClassGroups vClassGroups />
|
||||
|
||||
<#include "footer.ftl">
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue