[VIVO-1235] Temporal graph bug fixes

This commit is contained in:
Benjamin Gross 2016-03-16 16:58:30 -06:00
parent 18d551b1a2
commit 93f263d8f5
4 changed files with 21 additions and 17 deletions

View file

@ -164,13 +164,21 @@ $(".filter-option").live('click', function() {
if ($(this).attr('id') === 'people-filter') { if ($(this).attr('id') === 'people-filter') {
$("#organizations-filter").removeClass('active-filter'); $("#organizations-filter").removeClass('active-filter');
$("#no-filter").removeClass('active-filter');
temporalGraphProcessor.currentSelectedFilter = "PEOPLE"; temporalGraphProcessor.currentSelectedFilter = "PEOPLE";
} else if ($(this).attr('id') === 'organizations-filter') { } else if ($(this).attr('id') === 'organizations-filter') {
$("#people-filter").removeClass('active-filter'); $("#people-filter").removeClass('active-filter');
$("#no-filter").removeClass('active-filter');
temporalGraphProcessor.currentSelectedFilter = "ORGANIZATIONS"; temporalGraphProcessor.currentSelectedFilter = "ORGANIZATIONS";
} }
else if ($(this).attr('id') === 'no-filter') {
$("#people-filter").removeClass('active-filter');
$("#organizations-filter").removeClass('active-filter');
temporalGraphProcessor.currentSelectedFilter = "NONE";
}
$(this).addClass('active-filter'); $(this).addClass('active-filter');
@ -639,11 +647,6 @@ temporalGraphProcessor = {
}); });
} }
/*
* Reset the "is default selections maintained" value.
* */
temporalGraphProcessor.isDefaultSelectionsMaintained = true;
clearRenderedObjects(); clearRenderedObjects();
initConstants(); initConstants();

View file

@ -221,7 +221,10 @@ var DatatableCustomFilters = {
var currentEntityVisMode = URIToEntityRecord[entityURI].visMode; var currentEntityVisMode = URIToEntityRecord[entityURI].visMode;
if (currentEntityVisMode === "ORGANIZATION" if (temporalGraphProcessor.currentSelectedFilter === "NONE") {
return true;
}
else if (currentEntityVisMode === "ORGANIZATION"
&& temporalGraphProcessor.currentSelectedFilter === "ORGANIZATIONS") { && temporalGraphProcessor.currentSelectedFilter === "ORGANIZATIONS") {
return true; return true;
} else if (currentEntityVisMode === "PERSON" } else if (currentEntityVisMode === "PERSON"
@ -1065,7 +1068,7 @@ function prepareTableForDataTablePagination(jsonData, dataTableParams){
// console.log(processJSONData.currentEntityLevel); // console.log(processJSONData.currentEntityLevel);
if (processJSONData.currentEntityLevel.toUpperCase() === "ORGANIZATIONS & PEOPLE") { if (processJSONData.currentEntityLevel.toUpperCase() === "ORGANIZATIONS AND PEOPLE") {
$.fn.dataTableExt.afnFiltering.push(DatatableCustomFilters.peopleOrOrganizations); $.fn.dataTableExt.afnFiltering.push(DatatableCustomFilters.peopleOrOrganizations);
} }
@ -1189,7 +1192,7 @@ function prepareTableForDataTablePagination(jsonData, dataTableParams){
*/ */
function reloadDataTablePagination(preselectedEntityURIs, jsonData){ function reloadDataTablePagination(preselectedEntityURIs, jsonData){
if (processJSONData.currentEntityLevel.toUpperCase() === "ORGANIZATIONS & PEOPLE") { if (processJSONData.currentEntityLevel.toUpperCase() === "ORGANIZATIONS AND PEOPLE") {
/* /*
* This will make sure that duplicate filters are not added. * This will make sure that duplicate filters are not added.

View file

@ -69,10 +69,11 @@
</div> </div>
</div> </div>
<h3>${i18n().what_to_compare}</h3>
<div id="people-organizations-filter"> <div id="people-organizations-filter">
<span id="organizations-filter" class="filter-option active-filter">${i18n().organizations_capitalized}</span> | <h3>${i18n().what_to_compare}</h3>
<span id="people-filter" class="filter-option">${i18n().people_capitalized}</span> <span id="organizations-filter" class="filter-option">${i18n().organizations_capitalized}</span> |
<span id="people-filter" class="filter-option">${i18n().people_capitalized}</span> |
<span id="no-filter" class="filter-option">${i18n().view_all}</span>
<img class="filterInfoIcon" src="${urls.images}/iconInfo.png" <img class="filterInfoIcon" src="${urls.images}/iconInfo.png"
alt="${i18n().info_icon}" alt="${i18n().info_icon}"
title="${i18n().organization_hierarchy_note(organizationLabel)}" /> title="${i18n().organization_hierarchy_note(organizationLabel)}" />

View file

@ -46,9 +46,6 @@ $(document).ready(function () {
<#assign currentParameterObject = grantParameter> <#assign currentParameterObject = grantParameter>
<div id="temporal-graph-response"> <div id="temporal-graph-response">
<#if (builtFromCacheTime??) >
<div class="cache-info-small">${i18n().using_cache_time} ${builtFromCacheTime?time} (${builtFromCacheTime?date?string("MMM dd yyyy")})</div>
</#if>
<#include "entityComparisonBody.ftl"> <#include "entityComparisonBody.ftl">