NIHVIVO-1997 Removed pie charts and class group browse from menu pages due to current limitations of individual counts for classes. This should all be brought back from the dead in the future once we implement counts based on most specific type.

This commit is contained in:
nac26 2011-02-03 03:06:45 +00:00
parent 3a42cbaafe
commit fd49b9f942
4 changed files with 21 additions and 71 deletions

View file

@ -20,7 +20,8 @@ browseByVClass.getIndividuals = function(vclassUri, alpha, page, scroll) {
scroll = true;
}
// First wipe currently displayed individuals and existing pagination
// First wipe currently displayed class heading, individuals, and existing pagination
$('h3.selected-class').remove();
this.individualsInVClass.empty();
$('nav.pagination').remove();
@ -31,6 +32,9 @@ browseByVClass.getIndividuals = function(vclassUri, alpha, page, scroll) {
browseByVClass.pagination(pages, page);
}
selectedClassHeading = '<h3 class="selected-class">'+ results.vclass.name +'</h3>';
browseByVClass.individualsContainer.prepend(selectedClassHeading);
$.each(results.individuals, function(i, item) {
label = results.individuals[i].label;
firstName = results.individuals[i].firstName;
@ -52,7 +56,6 @@ browseByVClass.getIndividuals = function(vclassUri, alpha, page, scroll) {
} else {
preferredTitle = results.individuals[i].preferredTitle;
}
// preferredTitle = results.individuals[i].preferredTitle;
uri = results.individuals[i].URI;
profileUrl = results.individuals[i].profileUrl;
if ( !results.individuals[i].thumbUrl ) {
@ -76,9 +79,9 @@ browseByVClass.getIndividuals = function(vclassUri, alpha, page, scroll) {
browseByVClass.selectedVClass(results.vclass.URI);
browseByVClass.selectedAlpha(alpha);
// Scroll to the top of the browse section unless told otherwise
// Scroll to #menupage-intro unless told otherwise
if ( scroll != false ) {
$.scrollTo('#browse-by', 500);
$.scrollTo('#menupage-intro', 500);
}
});
};

View file

@ -1,39 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
// This file extends and proxies the default behavior defined in vitro/webapp/web/js/menupage/browseByClassGroupsPie.js
// Saving the original graphClasses function from browseClassGroups
var graphPersonClasses = graphClasses.piechart;
// Assigning the proxy function
graphClasses.piechart = function(values, labels, uris) {
// Clear the existing pie chart
$('#menupage-graph').empty();
// Create the canvas
var r = Raphael("menupage-graph", 360, 360);
// Setup the colors for the slices
// colors = ['#192933', '#26404E', '#294656', '#194c68', '#487A96', '#63A8CE', '#67AED6','#758A96', '#9DB9C9' ];
colors = ['#143D52', '#1F5C7A', '#297AA3', '#3399CC', '#5CADD6', '#85C2E0', '#ADD6EB', '#ADCBDD', '#D6EBF5', '#E9F1F5' ];
// Reverse colors to see how it looks with larger slices in lighter hues:
// colors = colors.reverse();
// Now draw the pie chart
var pie = r.g.piechart(110, 120, 100, values, {legend: labels, legendmark: "square", legendpos: "south", colors: colors});
pie.hover(function () {
this.sector.stop();
this.sector.scale(1.1, 1.1, this.cx, this.cy);
if (this.label) {
this.label[0].stop();
this.label[0].scale(1.5);
this.label[1].attr({"font-weight": 800});
}
}, function () {
this.sector.animate({scale: [1, 1, this.cx, this.cy]}, 500, "bounce");
if (this.label) {
this.label[0].animate({scale: 1}, 500, "bounce");
this.label[1].attr({"font-weight": 400});
}
});
};

View file

@ -3,28 +3,18 @@
<#include "menupage-checkForData.ftl">
<#if !noData>
<section id="menupage-intro" role="region">
<section id="menupage-intro" class="people" role="region">
<h3>${page.title}</h3>
<section id="menupage-content" class="people" role="region">
<h4>Visual Graph</h4>
<#include "menupage-vClassesInClassgroup.ftl">
<section id="menupage-graph" class="people" role="region">
<#-- Graph will be dynamically rendered via RaphaelJS library -->
</section>
</section>
<section id="find-by" role="region">
<nav role="navigation">
<h3>Find By</h3>
<ul id="find-filters">
<#assign subjectAreaUri = "http://vivoweb.org/ontology/core#SubjectArea" />
<#assign departmentUri = "http://vivoweb.org/ontology/core#Department" />
<#assign courseUri = "http://vivoweb.org/ontology/core#Course" />
<ul id="find-filters">
<li><a href="${urls.base}/individuallist?vclassId=${subjectAreaUri?url}">Subject Area</a></li>
<li><a href="${urls.base}/individuallist?vclassId=${departmentUri?url}">Department</a></li>
<li><a href="${urls.base}/individuallist?vclassId=${courseUri?url}">Courses</a></li>
@ -39,7 +29,7 @@
<#include "menupage-scripts.ftl">
${scripts.add("/js/menupage/browseByVClassPeople.js", "/js/menupage/browseClassGroupsPiePeople.js")}
${scripts.add("/js/menupage/browseByVClassPeople.js")}
<#else>
${noDataNotification}
</#if>

View file

@ -862,13 +862,15 @@ p{
#menupage-intro {
width: 920px;
background: #fff;
}
#menupage-intro h3 {
font-size: 1.5em;
color: #064d68;
font-weight: normal;
border-bottom: 1px solid #f3f3f4;
}
#menupage-intro.people h3 {
float:left;
width: 200px;
}
#menupage-content.people {
border-right: 1px solid #e8ece9;
@ -907,30 +909,26 @@ ul#vgraph-classes .count-classes {
font-size: .75em;
}
/* FIND BY ------> */
#find-by {
border: 1 solid #749A02;
}
#find-by h3 {
font-size: 1.125em;
color: #2485ae;
font-weight: normal;
border-bottom-color: #fff;
}
ul#find-filters li {
border-bottom: 1px solid #dde4e3;
font-size: 1em;
#menupage-intro.people #find-by h3 {
float: none;
}
ul#find-filters a {
color: #5e6363;
text-decoration: none;
}
ul#find-filters a:hover {
background: url(../images/arrow.gif) 0 12px no-repeat;
background: url(../images/arrow.gif) 0 6px no-repeat;
color: #2ea0cf;
}
ul#find-filters a.selected {
color: #2ea0cf;
background: url(../images/arrow.gif) 0 12px no-repeat;
background: url(../images/arrow.gif) 0 6px no-repeat;
}
/* RESEARCHERS ------> */
#researchers {
@ -976,8 +974,6 @@ ul#find-filters a.selected {
/* BROWSE BY ------> */
#browse-by {
width: 920px;
border: 1px solid #dfe6e6;
background: #f7f9f9;
}
#browse-by h2 {
background: #5e6363;